WO2022222346A1 - 一种数据存储方法及装置 - Google Patents

一种数据存储方法及装置 Download PDF

Info

Publication number
WO2022222346A1
WO2022222346A1 PCT/CN2021/116373 CN2021116373W WO2022222346A1 WO 2022222346 A1 WO2022222346 A1 WO 2022222346A1 CN 2021116373 W CN2021116373 W CN 2021116373W WO 2022222346 A1 WO2022222346 A1 WO 2022222346A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
server node
group
tag
grouping
Prior art date
Application number
PCT/CN2021/116373
Other languages
English (en)
French (fr)
Inventor
方洪祥
王洪原
王长征
杨乐
汪方方
Original Assignee
浙江中控技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江中控技术股份有限公司 filed Critical 浙江中控技术股份有限公司
Publication of WO2022222346A1 publication Critical patent/WO2022222346A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management

Definitions

  • the present application belongs to the technical field of data storage, and more specifically, to a data storage method and device.
  • the data distribution in the storage server node determines the utilization rate and load capacity of the entire distributed system. In order to achieve the balance and load maximization of the distributed system, the data needs to be evenly stored in each storage server node. Therefore, those skilled in the art need to design A data storage solution to achieve load balancing of each storage server node is developed.
  • the present disclosure provides a data storage method and device that overcomes the above problems or at least partially solves the above problems, and the technical solutions are as follows:
  • a data storage method comprising:
  • the first number group includes at least one target number
  • the target number is the one configured with the first storage server node, wherein the same
  • the first storage server nodes configured by each of the target tag numbers in the first number group are the same;
  • any one of the first number groups in the at least one first number group establish an association relationship between the first number group and the first target server node, wherein the first target server node the first storage server node configured for the target tag number in the first number group; save the data output by the I/O point corresponding to the target tag number in the first number group to the in the first target server node.
  • the obtaining at least one first digit grouping in the target control system includes:
  • Grouping any one of the temporary nodes in the at least one temporary node grouping : dividing the target bit number in the temporary node grouping according to the output data type to obtain at least one temporary type grouping;
  • Grouping any one of the at least one temporary type grouping dividing the target bit number in the temporary type grouping according to the source of the output data to obtain at least one first bit number grouping.
  • the method further includes:
  • the second target server node is other storage server nodes other than the first storage server node configured for the target number in the first number group; the target bit in the first number group
  • the data output by the I/O point corresponding to the number is stored in the second target server node.
  • the method further includes:
  • any of the second tag groupings in the at least one second tag grouping in the at least one second tag grouping: according to the preset number of copies, establish an association relationship between the second tag grouping and at least one third target server node, wherein,
  • the third target server node is a storage server node that is not associated with the second tag group; the data output by the I/O points corresponding to the other tag groups in the second tag group is stored in the in the third target server node.
  • the method further includes:
  • Disconnect any of the third tag grouping from the abnormal storage server node establish an association relationship between the third tag group and a fourth target server node, wherein the fourth target The server node is a storage server node that is not associated with the third bit number group; the data output by the I/O point corresponding to the bit number in the third bit number group is stored in the fourth target server node.
  • a data storage device comprising: a first number grouping obtaining unit, a first association relationship establishing unit and a first data storage unit,
  • the first number group obtaining unit is used to obtain at least one first number group in the target control system, wherein the first number group includes at least one target number, and the target number is configured with The tag number of the first storage server node, wherein the first storage server nodes configured with each of the target tag numbers in the same first number group are the same;
  • the first association relationship establishing unit is configured to group any one of the first number groups in the at least one first number group: establish an association between the first number group and the first target server node relationship, wherein, the first target server node is the first storage server node configured by the target tag in the first number group;
  • the first data storage unit is configured to save the data output from the I/O point corresponding to the target bit number in the first number group to the first target server node.
  • the first number grouping obtaining unit includes: a target position number determining subunit, a temporary node grouping obtaining subunit, a temporary type grouping obtaining subunit, and a position number grouping obtaining subunit,
  • Described target designation subunit is used to determine at least one target designation in the target control system
  • the temporary node grouping obtaining subunit is configured to divide the at least one target bit number according to the configured first storage server node to obtain at least one temporary node grouping, wherein the target bit number in the temporary node grouping is The first storage server nodes configured with the same number are the same;
  • the temporary type grouping obtaining subunit is configured to group any temporary node in the at least one temporary node grouping: divide the target bit number in the temporary node grouping according to the output data type, and obtain at least one of the temporary node groups. a temporary type grouping;
  • the bit number grouping obtaining subunit is used to group any temporary type in the at least one temporary type grouping: divide the target bit number in the temporary type grouping according to the output data source, and obtain at least one temporary type grouping.
  • the device further includes: a second association relationship establishing unit and a second data storage unit,
  • the second association relationship establishing unit is configured to, after the first-order number grouping obtaining unit obtains at least one first-order number grouping in the target control system, perform any analysis on any one of the at least one first-order number groupings.
  • the first number grouping establish an association relationship between the first number group and at least one second target server node according to the preset number of copies, wherein the second target server node is the first number group Other storage server nodes other than the first storage server node configured by the target tag in the;
  • the second data storage unit is configured to save the data output from the I/O point corresponding to the target bit number in the first number group to the second target server node.
  • the device further includes: a second tag grouping obtaining unit, a third association relationship establishing unit, and a third data storage unit,
  • the second tag grouping obtaining unit is configured to divide other tag numbers except the target tag number in the target control system according to the output data source to obtain at least one second tag grouping;
  • the third association relationship establishing unit is configured to group any second tag in the at least one second tag group: according to the preset number of copies, establish the second tag group and at least one third target server An association relationship between nodes, wherein the third target server node is a storage server node that has not established an association relationship with the second tag grouping;
  • the third data storage unit is configured to save the data output by the I/O points corresponding to the other bit numbers in the second bit number group to the third target server node.
  • the device further includes: a working state determination unit, an abnormal node determination unit, an association disconnection unit, a fourth association establishment unit, and a fourth data storage unit,
  • the working state determining unit is used to determine the working state of each storage server node
  • the abnormal node determination unit configured to determine the storage server node whose working state is abnormal as the abnormal storage server node
  • the association relationship disconnecting unit is used to disconnect the association relationship between the abnormal storage server node and the third index group associated with the abnormal storage server node;
  • the fourth association relationship establishing unit is configured to group any of the third tag numbers that are disconnected from the abnormal storage server node: establishing a relationship between the third tag group and a fourth target server node The association relationship, wherein, the fourth target server node is a storage server node that has not established an association relationship with the third tag grouping;
  • the fourth data storage unit is configured to save the data output by the I/O point corresponding to the bit number in the third bit number group to the fourth target server node.
  • a data storage method and device can obtain at least one first-order number grouping in the target control system, wherein the first-order number grouping includes at least one target In order to configure the tag of the first storage server node, wherein the first storage server node configured with each target tag in the same first-digit group is the same; Number grouping: establish an association relationship between the first number group and the first target server node, wherein the first target server node is the first storage server node configured by the target number in the first number group; The data output by the I/O point corresponding to the target bit number in the first bit number group is stored in the first target server node.
  • the target tags with the same configuration of the first storage server are divided into the same first number group, and the association relationship between the first number group and the corresponding first storage server is established, so that the target tag in the first number group is
  • the data output by the corresponding I/O point is centrally stored in the corresponding first target server node, so as to realize the balanced distribution of the target tag in each storage server node of the distributed system, and then realize the storage and distribution of the data in the process of data allocation and storage.
  • Server nodes balance the load.
  • FIG. 1 shows a schematic diagram of an implementation manner of a data storage method provided by an embodiment of the present disclosure
  • FIG. 2 shows a schematic diagram of another implementation manner of a data storage method provided by an embodiment of the present disclosure
  • FIG. 3 shows a schematic diagram of an association relationship between a first number group and a first target server node provided by an embodiment of the present disclosure
  • FIG. 4 shows a schematic diagram of another implementation manner of a data storage method provided by an embodiment of the present disclosure
  • FIG. 5 shows a schematic diagram of the association relationship between the first number group and the second target server node provided by an embodiment of the present disclosure
  • FIG. 6 shows a schematic diagram of another implementation manner of a data storage method provided by an embodiment of the present disclosure
  • FIG. 7 shows a schematic diagram of transferring a third tag group associated with an abnormal storage server node provided by an embodiment of the present disclosure
  • FIG. 8 shows a schematic structural diagram of a data storage device provided by an embodiment of the present disclosure.
  • the data storage method may include:
  • the target control system may be an industrial control system.
  • the industrial control system may specifically be an industrial real-time database platform system VxBase.
  • the tag number is the definition of the I/O point of the industrial control system in the actual scene.
  • the data output by the I/O point corresponding to the target tag number can be preset key data.
  • the preset key data may be the first data whose required storage time is not less than the preset storage time, the second data whose data change rate is not greater than the preset change rate, or the third data that is not open to the public. data.
  • the first storage server nodes configured with different target tags may be different. For example, if the data output by the I/O point corresponding to the target tag number is the first data, configure the target tag number with the first storage server node A. If the data output by the I/O point corresponding to the target tag number is the second data, configure the target tag number with the first storage server Node B. In this embodiment of the present disclosure, the same target tag number of the configured first storage server node can be allocated to the same first number group.
  • the number of target tag numbers in the first number group can be set.
  • step S100 may include:
  • the embodiment of the present disclosure may divide the configured first storage server nodes with the same target tag into at least one temporary node group.
  • the number of target tags in the temporary node grouping can be set.
  • each target tag in the temporary node grouping can be divided into at least one temporary type group according to the data type of the data output by the I/O point corresponding to each target tag in the temporary node grouping.
  • the number of target tags in the temporary type grouping can be set.
  • the data type of the data output by the I/O point corresponding to the target bit number in a temporary type group may be the same or different.
  • the data type of the data output by the I/O point corresponding to the target tag in the temporary type grouping is the same.
  • the number of target tags corresponding to a data type does not meet the requirement of the number of target tags of a temporary type group, these target tags and target tags corresponding to other data types can be assigned to the same temporary type group, that is, a temporary type group.
  • the type grouping may include target tag numbers corresponding to different data types.
  • a temporary type grouping is obtained by grouping the data types of the data output by the I/O point corresponding to the target tag number, so that the target tag number with the same data type is located in the same temporary type group as much as possible, which is beneficial to the same type
  • the data is stored centrally and the target tag is distributed evenly on each storage server node in the distributed system.
  • the data source may be data acquisition software.
  • VxCollector and DDA data acquisition software.
  • each target tag summarized in the temporary type group can be divided into at least one first number group according to the data source of the data output by the I/O point corresponding to each target tag in the temporary type group.
  • the data source of the data output by the I/O point corresponding to the target bit number in a first number group may be the same or different.
  • the data source of the data output by the I/O point corresponding to the target tag number in the first number grouping is the same, but in practice, because the first number grouping may have the number of target tag numbers Therefore, when the number of target tags corresponding to any data source does not meet the requirement for the number of target tags of a first-digit group, these target tags and the target tags corresponding to other data sources can be assigned to the same One-digit number grouping, that is, a first-digit number grouping can include target tag numbers corresponding to different data sources.
  • the data source of the data output by the I/O point corresponding to the target number is grouped to obtain the first number group, so that the target number with the same data source is located in the same first number group as much as possible, It is conducive to the centralized storage of data from the same source and the subsequent balanced distribution of target tags on each storage server node in the distributed system.
  • the data storage method provided by the embodiment of the present disclosure supports the designation of the first storage server node by the target tag, the division of target tags of the same type into the same temporary type group, and the division of target tags of the same source into the same first storage server node.
  • the tag grouping it is beneficial to centrally manage and store target tags with the same characteristics, so as to facilitate the subsequent balanced distribution of the target tags on each storage server node in the distributed system.
  • S200 Group any first number in the at least one first number group: establish an association relationship between the first number group and the first target server node, wherein the first target server node is the first number The first storage server node of the target tag configuration in the tag grouping.
  • FIG. 3 the relationship between the first number group and the first target server node is described.
  • the relationship between the two arrows is represented by a straight solid line.
  • the obtained at least one first-digit number group includes first-digit number groups: Group1, Group2, Group3, Group4, Group5, and Group6, and the distributed system includes storage server nodes Node1, Node2, and Node3, where Group1 and Group2 If the first storage server node configured by the target tag number in is Node1, then Group1 and Group2 are respectively associated with Node1.
  • the first storage server node configured by the target tag in Group3 and Group4 is Node2, and then Group3 and Group4 are respectively associated with Node2.
  • the first storage server node configured by the target tag in Group5 and Group6 is Node3, and then Group5 and Group6 are respectively associated with Node3.
  • the data output by the I/O point corresponding to the target tag number in the association relationship Group1 and Group2 is stored in Node1.
  • the data output by the I/O points corresponding to the target tag numbers in Group3 and Group4 are stored in Node2.
  • the data output by the I/O points corresponding to the target tag numbers in Group5 and Group6 are stored in Node3.
  • At least one first-order number group in a target control system can be obtained, wherein the first-order number group includes at least one target tag number, and the target tag number is a node configured with a first storage server bit number, wherein the first storage server nodes configured for each target bit number in the same first bit number group are the same; for any first bit number group in at least one first bit number group: establish the first number of the first number group The association relationship between the number group and the first target server node, wherein, the first target server node is the first storage server node configured by the target number in the first number group; the target number in the first number group is the first storage server node; The data output by the I/O point corresponding to the bit number is stored in the first target server node.
  • the target tags with the same configuration of the first storage server are divided into the same first number group, and the association relationship between the first number group and the corresponding first storage server is established, so that the target tag in the first number group is
  • the data output by the corresponding I/O point is centrally stored in the corresponding first target server node, so as to realize the balanced distribution of the target tag in each storage server node of the distributed system, and then realize the storage and distribution of the data in the process of data allocation and storage.
  • Server nodes balance the load.
  • the embodiment of the present disclosure may perform a copy backup of each first number group in the first target server.
  • the data storage method further includes:
  • any first number group in the at least one first number group establish an association relationship between the first number group and at least one second target server node according to a preset number of copies, wherein the first number group is The two target server nodes are other storage server nodes other than the first storage server node configured for the target tag in the first number group.
  • the preset number of copies includes the first storage server node configured with the target tag in the first-id group.
  • a first-digit number group can establish an association relationship with a first target server node and a second target server node.
  • a first digit number group can establish an association relationship with one first target server node and two second target server nodes.
  • a first target server node associated with a first digit packet may be a second target server node associated with another first digit packet.
  • the copy backup of the first number group will be described:
  • the association relationship between the first number group and the second target server node is indicated by a double arrow. Dotted line indicates. Assuming that the preset number of replicas is 2, Group3 and Group5 can be associated with Node1 respectively, Group1 and Group6 can be associated with Node2 respectively, and Group2 and Group4 can be associated with Node3 respectively.
  • the embodiment of the present disclosure can evenly distribute the other tags to each storage server node of the distributed system.
  • the data storage method further includes:
  • step S600 for the description of dividing other tag numbers according to the data source in step S600, reference may be made to step S140, which will not be repeated here.
  • the number of other tag numbers in the second tag number group can be set.
  • any second tag group in the at least one second tag group establish an association relationship between the second tag group and at least one third target server node according to a preset number of copies, wherein the third The target server node is a storage server node that is not associated with the second tag group.
  • one second tag group can establish an association relationship with two third target server nodes.
  • one second tag group can establish an association relationship with three third target server nodes.
  • the second tag grouping is obtained by grouping other tags except the target tag in the target control system according to the data source, so that the other tags can be evenly distributed to each storage server of the distributed system in the form of groups.
  • the number of replicas is set for the second tag group at the same time, so that the data corresponding to other tags has a higher disaster tolerance capability.
  • the embodiment of the present disclosure may also transfer the tag group associated with the storage server whose working state is abnormal.
  • the embodiment of the present disclosure can determine the working status of each storage server node.
  • a storage server node whose working status is abnormal is determined as an abnormal storage server node.
  • Any third index group that is disconnected from the abnormal storage server node establish an association relationship between the third index group and a fourth target server node, wherein the fourth target server node is not associated with the
  • the third bit number group establishes the associated storage server node.
  • the data output by the I/O point corresponding to the bit number in the third bit number group is stored in the fourth target server node.
  • the stored data corresponding to the third tag group in the abnormal storage server node may be transferred to the fourth target server node for storage.
  • the stored data can be transferred with a third bit number grouping as a granularity, so as to ensure the balance among the fourth target servers.
  • FIG. 7 shows the transfer of the third digit group associated with the abnormal storage server node.
  • Group2 and Group5 may be disconnected from Node3, respectively, and Node1 may be respectively associated with Group2 and Group5, which is equivalent to transferring Group2 and Group5 from Node3 to Node1.
  • Disconnecting Group4 and Group6 from Node3, and establishing Node2's association with Group4 and Group6, is equivalent to transferring Group4 and Group6 from Node3 to Node2.
  • the storage server node when the storage server node is abnormal, it is possible to transfer the first data associated with the abnormal storage server node without moving the tag group associated with other non-abnormal storage server nodes.
  • the three-digit number is grouped to the fourth target server node, so that the third-digit number group is evenly distributed to other storage server nodes that are not abnormal, while still retaining the disaster recovery capability of the data.
  • an embodiment of the present disclosure further provides a data storage device, the structure of which is shown in FIG. 8 , and may include: a first number group obtaining unit 100 , a first association relationship establishing unit 200 , and a first Data storage unit 300.
  • the first number group obtaining unit 100 is configured to obtain at least one first number group in the target control system, wherein the first number group includes at least one target number, and the target number is a node configured with a first storage server The tag number, wherein the first storage server node configured with each target tag number in the same first number group is the same.
  • the first association relationship establishing unit 200 is configured to group any first digit in the at least one first digit group: establish an association relationship between the first digit group and the first target server node, wherein the first A target server node is the first storage server node configured for the target tag in the first-bit number group.
  • the first data storage unit 300 is configured to save the data output from the I/O point corresponding to the target bit number in the first number group to the first target server node.
  • the first bit number grouping obtaining unit 100 includes: a target bit number determining subunit, a temporary node grouping obtaining subunit, a temporary type grouping obtaining subunit, and a bit number grouping obtaining subunit.
  • the target tag determination subunit is used to determine at least one target tag in the target control system.
  • the temporary node grouping obtaining subunit is configured to divide at least one target tag according to the configured first storage server node to obtain at least one temporary node group, wherein the first storage server node configured by the target tag in the temporary node grouping same.
  • the temporary type grouping obtaining subunit is used for grouping any temporary node in the at least one temporary node grouping: dividing the target bit number in the temporary node grouping according to the output data type to obtain at least one temporary type grouping.
  • the tag grouping obtaining subunit is used to group any temporary type in the at least one temporary type group: divide the target tag in the temporary type group according to the output data source, and obtain at least one first-bit number group.
  • the data storage device further includes: a second association relationship establishing unit and a second data storage unit.
  • the second association relationship establishing unit is used for grouping any first number in the at least one first number grouping after the first number grouping obtaining unit 100 obtains at least one first number grouping in the target control system: Establish an association relationship between the first number group and at least one second target server node according to the preset number of copies, wherein the second target server node is the first number configured for the target number in the first number group.
  • Storage server nodes other than storage server nodes.
  • the second data storage unit is used for saving the data output by the I/O point corresponding to the target bit number in the first number group to the second target server node.
  • the data storage device further includes: a second tag grouping obtaining unit, a third association relationship establishing unit, and a third data storage unit.
  • the second tag grouping obtaining unit is configured to divide other tags in the target control system except the target tag according to the source of the output data to obtain at least one second tag grouping.
  • a third association relationship establishing unit configured to group any second tag in the at least one second tag group: according to the preset number of copies, establish a relationship between the second tag group and at least one third target server node An association relationship, wherein the third target server node is a storage server node that has not established an association relationship with the second tag grouping.
  • the third data storage unit is configured to save the data output by the I/O points corresponding to other bit numbers in the second bit number group to the third target server node.
  • the data storage device further includes: a working state determination unit, an abnormal node determination unit, an association disconnection unit, a fourth association relationship establishment unit, and a fourth data storage unit.
  • the working state determining unit is used for determining the working state of each storage server node.
  • the abnormal node determination unit is used for determining the storage server node whose working state is abnormal as the abnormal storage server node.
  • the association relationship disconnecting unit is used to disconnect the association relationship between the abnormal storage server node and the third index group associated with the abnormal storage server node.
  • the fourth association relationship establishing unit is used to group any third index number whose association relationship is disconnected with the abnormal storage server node: establish an association relationship between the third index group and a fourth target server node, wherein, The fourth target server node is a storage server node that has not established an association relationship with the third tag grouping.
  • the fourth data storage unit is used for saving the data output by the I/O point corresponding to the bit number in the third bit number group to the fourth target server node.
  • a data storage device can obtain at least one first number group in a target control system, wherein the first number group includes at least one target number, and the target number is a node configured with a first storage server bit number, wherein the first storage server nodes configured for each target bit number in the same first bit number group are the same; for any first number group in at least one first bit number group: establish the first number of the first number group The association relationship between the number group and the first target server node, wherein the first target server node is the first storage server node configured by the target number in the first number group; the target number in the first number group is the first storage server node; The data output by the I/O point corresponding to the bit number is stored in the first target server node.
  • the target tags with the same configuration of the first storage server are divided into the same first number group, and the association relationship between the first number group and the corresponding first storage server is established, so that the target tag in the first number group is
  • the data output by the corresponding I/O point is stored in the corresponding first target server node in a centralized manner, so as to realize the balanced distribution of the target tag in each storage server node of the distributed system, and then realize the data allocation and storage process of each storage server.
  • Server nodes balance the load.
  • the data storage device includes a processor and a memory, and the above-mentioned first number grouping obtaining unit 100, the first association relationship establishing unit 200, and the first data storage unit 300 are all stored in the memory as program units, and the processor executes the storage.
  • the above program units in the memory implement the corresponding functions.
  • the processor includes a kernel, and the kernel calls the corresponding program unit from the memory.
  • the kernel can be set with one or more, and by adjusting the kernel parameters, by dividing the target number of the configuration with the same first storage server into the same first number group, the association relationship between the first number group and the corresponding first storage server is established,
  • the data output from the I/O point corresponding to the target tag in the first number group is centrally stored in the corresponding first target server node, so as to realize the balanced distribution of the target tag in each storage server node of the distributed system, and then In the process of data allocation and storage, the load balance of each storage server node is realized.
  • Embodiments of the present disclosure provide a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the data storage method is implemented.
  • An embodiment of the present disclosure provides a processor for running a program, wherein the data storage method is executed when the program runs.
  • An embodiment of the present disclosure provides an electronic device, the electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call the memory
  • the program instructions in to implement the data storage method described above.
  • the electronic devices herein can be servers, PCs, PADs, mobile phones, and the like.
  • the present application also provides a computer program product, which, when executed on an electronic device, is adapted to execute a program initialized with the steps of the above data storage method.
  • an electronic device in a typical configuration, includes one or more processors (CPUs), memory, and a bus.
  • the electronic device may also include input/output interfaces, network interfaces, and the like.
  • Memory may include non-persistent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read only memory (ROM) or flash memory (flash RAM), the memory including at least one memory chip.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash memory
  • Memory is an example of a computer-readable medium.
  • Computer-readable media includes both persistent and non-permanent, removable and non-removable media, and storage of information may be implemented by any method or technology.
  • Information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
  • the embodiments of the present application may be provided as a method, a system or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本公开提供了一种数据存储方法及装置,可以获得目标控制***中的至少一个第一位号分组,第一位号分组包括至少一个目标位号,目标位号为配置有第一存储服务器节点的位号,同一第一位号分组中的各目标位号配置的第一存储服务器节点相同;对至少一个第一位号分组中的任一第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,第一目标服务器节点为该第一位号分组中的目标位号配置的第一存储服务器节点;将该第一位号分组中目标位号对应的I/O点输出的数据保存至第一目标服务器节点中。该数据存储方法实现了目标位号在分布式***的各存储服务器节点中的均衡分布,进而在数据分配存储过程中实现了对各存储服务器节点的均衡负载。

Description

一种数据存储方法及装置
本申请要求于2021年04月19日提交中国专利局、申请号为202110418666.9、发明名称为“一种数据存储方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于数据存储技术领域,更具体的说,尤其涉及一种数据存储方法及装置。
背景技术
当前,为了充分利用分布式***中的存储服务器节点,需要将数据分散存储到各个存储服务器节点中。
存储服务器节点中数据分布决定着整个分布式***的利用率和负载能力,为了实现分布式***的均衡和负载最大化,需要将数据均匀存储到各存储服务器节点中,因此本领域技术人员需要设计出实现各存储服务器节点均衡负载的数据存储方案。
发明内容
鉴于上述问题,本公开提供一种克服上述问题或者至少部分地解决上述问题的一种数据存储方法及装置,技术方案如下:
一种数据存储方法,包括:
获得目标控制***中的至少一个第一位号分组,其中,所述第一位号分组包括至少一个目标位号,所述目标位号为配置有第一存储服务器节点的位号,其中,同一所述第一位号分组中的各所述目标位号配置的所述第一存储服务器节点相同;
对所述至少一个第一位号分组中的任一所述第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,其中,所述第一目标服务器节点为该第一位号分组中的所述目标位号配置的所述第一存储服务器节点;将该第一位号分组中所述目标位号对应的I/O点输出的数据保存至所述第一目标服务器节点中。
可选的,所述获得目标控制***中的至少一个第一位号分组,包括:
确定目标控制***中的至少一个目标位号;
对所述至少一个目标位号按照配置的第一存储服务器节点进行划分,获得至少一个临时节点分组,其中,所述临时节点分组中的所述目标位号配置的所述第一存储服务器节点相同;
对所述至少一个临时节点分组中的任一所述临时节点分组:对该临时节点分组中的所述目标位号按照输出数据类型进行划分,获得至少一个临时类型分组;
对所述至少一个临时类型分组中的任一所述临时类型分组:对该临时类型分组中的所述目标位号按照输出数据来源进行划分,获得至少一个第一位号分组。
可选的,在所述获得目标控制***中的至少一个第一位号分组之后,所述方法还包括:
对所述至少一个第一位号分组中的任一所述第一位号分组:按照预设副本数量,建立该第一位号分组与至少一个第二目标服务器节点之间的关联关系,其中,所述第二目标服务器节点为该第一位号分组中的所述目标位号配置的所述第一存储服务器节点以外的其他存储服务器节点;将该第一位号分组中所述目标位号对应的I/O点输出的数据保存至所述第二目标服务器节点中。
可选的,所述方法还包括:
按照输出数据来源对所述目标控制***中除所述目标位号以外的其他位号进行划分,获得至少一个第二位号分组;
对所述至少一个第二位号分组中任一所述第二位号分组:按照预设副本数量,建立该第二位号分组与至少一个第三目标服务器节点之间的关联关系,其中,所述第三目标服务器节点为与该第二位号分组未建立关联关系的存储服务器节点;将该第二位号分组中所述其他位号对应的I/O点输出的数据保存至所述第三目标服务器节点中。
可选的,所述方法还包括:
确定各存储服务器节点的工作状态;
将所述工作状态为异常的存储服务器节点确定为异常存储服务器节点;
断开所述异常存储服务器节点和所述异常存储服务器节点关联的第三位号分组之间的关联关系;
对与所述异常存储服务器节点断开关联关系的任一所述第三位号分组:建立该第三位号分组与一个第四目标服务器节点之间的关联关系,其中,所述第四目标服务器节点为未与该第三位号分组建立关联关系的存储服务器节点;将该第三位号分组中的位号对应的I/O点输出的数据保存至所述第四目标服务器节点中。
一种数据存储装置,包括:第一位号分组获得单元、第一关联关系建立单元以及第一数据存储单元,
所述第一位号分组获得单元,用于获得目标控制***中的至少一个第一位号分组,其中,所述第一位号分组包括至少一个目标位号,所述目标位号为配置有第一存储服务器节点的位号,其中,同一所述第一位号分组中的各所述目标位号配置的所述第一存储服务器节点相同;
所述第一关联关系建立单元,用于对所述至少一个第一位号分组中的任一所述第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,其中,所述第一目标服务器节点为该第一位号分组中的所述目标位号配置的所述第一存储服务器节点;
所述第一数据存储单元,用于将该第一位号分组中所述目标位号对应的I/O点输出的数据保存至所述第一目标服务器节点中。
可选的,所述第一位号分组获得单元包括:目标位号确定子单元、临时节点分组获得子单元、临时类型分组获得子单元以及位号分组获得子单元,
所述目标位号确定子单元,用于确定目标控制***中的至少一个目标位号;
所述临时节点分组获得子单元,用于对所述至少一个目标位号按照配置的第一存储服务器节点进行划分,获得至少一个临时节点分组,其中,所述临时节点分组中的所述目标位号配置的所述第一存储服务器节点相同;
所述临时类型分组获得子单元,用于对所述至少一个临时节点分组中的任一所述临时节点分组:对该临时节点分组中的所述目标位号按照输出数据类型 进行划分,获得至少一个临时类型分组;
所述位号分组获得子单元,用于对所述至少一个临时类型分组中的任一所述临时类型分组:对该临时类型分组中的所述目标位号按照输出数据来源进行划分,获得至少一个第一位号分组。
可选的,所述装置还包括:第二关联关系建立单元以及第二数据存储单元,
所述第二关联关系建立单元,用于所述第一位号分组获得单元获得目标控制***中的至少一个第一位号分组之后,对所述至少一个第一位号分组中的任一所述第一位号分组:按照预设副本数量,建立该第一位号分组与至少一个第二目标服务器节点之间的关联关系,其中,所述第二目标服务器节点为该第一位号分组中的所述目标位号配置的所述第一存储服务器节点以外的其他存储服务器节点;
所述第二数据存储单元,用于将该第一位号分组中所述目标位号对应的I/O点输出的数据保存至所述第二目标服务器节点中。
可选的,所述装置还包括:第二位号分组获得单元、第三关联关系建立单元以及第三数据存储单元,
所述第二位号分组获得单元,用于按照输出数据来源对所述目标控制***中除所述目标位号以外的其他位号进行划分,获得至少一个第二位号分组;
所述第三关联关系建立单元,用于对所述至少一个第二位号分组中任一第二位号分组:按照预设副本数量,建立该第二位号分组与至少一个第三目标服务器节点之间的关联关系,其中,所述第三目标服务器节点为与该第二位号分组未建立关联关系的存储服务器节点;
所述第三数据存储单元,用于将该第二位号分组中所述其他位号对应的I/O点输出的数据保存至所述第三目标服务器节点中。
可选的,所述装置还包括:工作状态确定单元、异常节点确定单元、关联关系断开单元、第四关联关系建立单元以及第四数据存储单元,
所述工作状态确定单元,用于确定各存储服务器节点的工作状态;
所述异常节点确定单元,用于将所述工作状态为异常的存储服务器节点确定为异常存储服务器节点;
所述关联关系断开单元,用于断开所述异常存储服务器节点和所述异常存储服务器节点关联的第三位号分组之间的关联关系;
所述第四关联关系建立单元,用于对与所述异常存储服务器节点断开关联关系的任一所述第三位号分组:建立该第三位号分组与一个第四目标服务器节点之间的关联关系,其中,所述第四目标服务器节点为未与该第三位号分组建立关联关系的存储服务器节点;
所述第四数据存储单元,用于将该第三位号分组中的位号对应的I/O点输出的数据保存至所述第四目标服务器节点中。
借由上述技术方案,本公开提供的一种数据存储方法及装置,可以获得目标控制***中的至少一个第一位号分组,其中,第一位号分组包括至少一个目标位号,目标位号为配置有第一存储服务器节点的位号,其中,同一第一位号分组中的各目标位号配置的第一存储服务器节点相同;对至少一个第一位号分组中的任一第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,其中,第一目标服务器节点为该第一位号分组中的目标位号配置的第一存储服务器节点;将该第一位号分组中目标位号对应的I/O点输出的数据保存至第一目标服务器节点中。本公开通过将配置相同第一存储服务器的目标位号划分至同一第一位号分组中,建立第一位号分组与对应第一存储服务器的关联关系,使得第一位号分组中目标位号对应的I/O点输出的数据集中保存至对应的第一目标服务器节点中,实现目标位号在分布式***的各存储服务器节点中的均衡分布,进而在数据分配存储过程中实现了各存储服务器节点均衡负载。
上述说明仅是本公开技术方案的概述,为了能够更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为了让本公开的上述和其它目的、特征和优点能够更明显易懂,以下特举本公开的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本公开的限制。而且在整个附图中,用相同的参考符号表示相同的 部件。在附图中:
图1示出了本公开实施例提供的数据存储方法的一种实施方式的示意图;
图2示出了本公开实施例提供的数据存储方法的另一种实施方式的示意图;
图3示出了本公开实施例提供的第一位号分组与第一目标服务器节点之间的关联关系的示意图;
图4示出了本公开实施例提供的数据存储方法的另一种实施方式的示意图;
图5示出了本公开实施例提供的第一位号分组与第二目标服务器节点之间的关联关系的示意图;
图6示出了本公开实施例提供的数据存储方法的另一种实施方式的示意图;
图7示出了本公开实施例提供的对异常存储服务器节点关联的第三位号分组进行转移的示意图;
图8示出了本公开实施例提供的一种数据存储装置的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
如图1所示,本公开实施例提供的数据存储方法的一种实施方式的示意 图,该数据存储方法可以包括:
S100、获得目标控制***中的至少一个第一位号分组,其中,第一位号分组包括至少一个目标位号,目标位号为配置有第一存储服务器节点的位号,其中,同一第一位号分组中的各目标位号配置的第一存储服务器节点相同。
其中,目标控制***可以是工业控制***。该工业控制***可以具体为工业实时数据库平台***VxBase。位号为在实际场景中对工业控制***的I/O点的定义。
目标位号对应的I/O点输出的数据可以为预设关键数据。可选的,预设关键数据可以是需求保存时间不小于预设保存时间的第一数据,也可以是数据变化率不大于预设变化率的第二数据,还可以是不对外开放的第三数据。
需要注意的是,不同的目标位号配置的第一存储服务器节点可以不同。例如:在目标位号对应的I/O点输出的数据为第一数据的情况下,将该目标位号与第一存储服务器节点A进行配置。在目标位号对应的I/O点输出的数据为第二数据的情况下,将该目标位号与第一存储服务器节点B进行配置。本公开实施例可以将配置的第一存储服务器节点相同的目标位号分配至同一第一位号分组。
可以理解的是,本公开实施例可以对第一位号分组中的目标位号的数量进行设置。
可选的,基于图1所示的方法,如图2所示,本公开实施例提供的数据存储方法的另一种实施方式的示意图,步骤S100可以包括:
S110、确定目标控制***中的至少一个目标位号。
S120、对至少一个目标位号按照配置的第一存储服务器节点进行划分,获得至少一个临时节点分组,其中,临时节点分组中的目标位号配置的第一存储服务器节点相同。
由于各目标位号所配置的第一存储服务器节点可以不同,因此本公开实施例可以将配置的第一存储服务器节点相同的目标位号划分为至少一个临时节点分组。
可以理解的是,本公开实施例可以对临时节点分组中的目标位号的数量进 行设置。
S130、对至少一个临时节点分组中的任一临时节点分组:对该临时节点分组中的目标位号按照输出数据类型进行划分,获得至少一个临时类型分组。
其中,数据类型可以包括BOOL、BYTE、INT16/UINT16、INT32/UINT32、INT64/UINT64、FLOAT、DOUBLE、string以及Blob。本公开实施例可以根据临时节点分组中各目标位号对应的I/O点输出的数据的数据类型,对该临时节点分组中的各目标位号划分为至少一个临时类型分组。
可以理解的是,本公开实施例可以对临时类型分组中的目标位号的数量进行设置。需要注意的是,一个临时类型分组中的目标位号对应的I/O点输出的数据的数据类型可以相同,也可以不同。在理想的应用环境下,临时类型分组中的目标位号对应的I/O点输出的数据的数据类型相同,但是在实际情况中,由于临时类型分组可能有目标位号的数量要求,因此在任一数据类型对应的目标位号的数量未达到一个临时类型分组的目标位号的数量要求时,可以将这些目标位号与其他数据类型对应的目标位号分配至同一临时类型分组,即一个临时类型分组中可以包括与不同数据类型对应的目标位号。
本公开实施例通过目标位号对应的I/O点输出的数据的数据类型进行分组得到临时类型分组,使得对应的数据类型相同的目标位号尽可能位于同一临时类型分组中,有利于同类型的数据进行集中保存以及目标位号后续在分布式***中的各存储服务器节点上均衡分布。
S140、对至少一个临时类型分组中的任一临时类型分组:对该临时类型分组中的目标位号按照输出数据来源进行划分,获得至少一个第一位号分组。
其中,数据来源可以为数据采集软件。例如:VxCollector和DDA。本公开实施例可以根据临时类型分组中各目标位号对应的I/O点输出的数据的数据来源,对该临时类型分组汇总的各目标位号划分为至少一个第一位号分组。
需要注意的是,一个第一位号分组中的目标位号对应的I/O点输出的数据的数据来源可以相同,也可以不同。在理想的应用环境下,第一位号分组中的目标位号对应的I/O点输出的数据的数据来源相同,但是在实际情况下,由于第一位号分组可能有目标位号的数量要求,因此在任一数据来源对应的目标位 号的数量未达到一个第一位号分组的目标位号的数量要求时,可以将这些目标位号与其他数据来源对应的目标位号分配至同一第一位号分组,即一个第一位号分组中可以包括与不同数据来源对应的目标位号。
本公开实施例通过目标位号对应的I/O点输出的数据的数据来源进行分组得到第一位号分组,使得对应的数据来源相同的目标位号尽可能位于同一第一位号分组中,有利于同来源的数据进行集中保存以及目标位号后续在分布式***中的各存储服务器节点上均衡分布。
本公开实施例提供的数据存储方法,支持目标位号指定第一存储服务器节点、支持将相同类型的目标位号划分至同一临时类型分组中以及支持将相同来源的目标位号划分至同一第一位号分组中,有利于对具有相同特征的目标位号进行集中管理和存储,方便目标位号后续在分布式***中的各存储服务器节点上均衡分布。
S200、对至少一个第一位号分组中的任一第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,其中,第一目标服务器节点为该第一位号分组中的目标位号配置的第一存储服务器节点。
S300、将该第一位号分组中目标位号对应的I/O点输出的数据保存至第一目标服务器节点中。
为了便于理解,此处结合图3所示的第一位号分组与第一目标服务器节点之间的关联关系的示意图进行说明:在图3中,第一位号分组与第一目标服务器节点之间的关联关系以双箭头直实线表示。假设在获得的至少一个第一位号分组中包括第一位号分组:Group1、Group2、Group3、Group4、Group5以及Group6,分布式***中包括存储服务器节点Node1、Node2以及Node3,其中,Group1和Group2中的目标位号配置的第一存储服务器节点为Node1,则将Group1和Group2分别与Node1建立关联关系。Group3和Group4中的目标位号配置的第一存储服务器节点为Node2,则将Group3和Group4分别与Node2建立关联关系。Group5和Group6中的目标位号配置的第一存储服务器节点为Node3,则将Group5和Group6分别与Node3建立关联关系。关联关系Group1和Group2中的目标位号对应的I/O点输出的数据保存至Node1中。Group3和 Group4中的目标位号对应的I/O点输出的数据保存至Node2中。Group5和Group6中的目标位号对应的I/O点输出的数据保存至Node3中。
本公开提供的一种数据存储方法,可以获得目标控制***中的至少一个第一位号分组,其中,第一位号分组包括至少一个目标位号,目标位号为配置有第一存储服务器节点的位号,其中,同一第一位号分组中的各目标位号配置的第一存储服务器节点相同;对至少一个第一位号分组中的任一第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,其中,第一目标服务器节点为该第一位号分组中的目标位号配置的第一存储服务器节点;将该第一位号分组中目标位号对应的I/O点输出的数据保存至第一目标服务器节点中。本公开通过将配置相同第一存储服务器的目标位号划分至同一第一位号分组中,建立第一位号分组与对应第一存储服务器的关联关系,使得第一位号分组中目标位号对应的I/O点输出的数据集中保存至对应的第一目标服务器节点中,实现目标位号在分布式***的各存储服务器节点中的均衡分布,进而在数据分配存储过程中实现了各存储服务器节点均衡负载。
为了提高数据的容灾能力,本公开实施例可以对第一目标服务器中的各第一位号分组进行副本备份。
可选的,基于图1所示的方法,如图4所示,本公开实施例提供的数据存储方法的另一种实施方式的示意图,在步骤S100之后,该数据存储方法还包括:
S400、对至少一个第一位号分组中的任一第一位号分组:按照预设副本数量,建立该第一位号分组与至少一个第二目标服务器节点之间的关联关系,其中,第二目标服务器节点为该第一位号分组中的目标位号配置的第一存储服务器节点以外的其他存储服务器节点。
S500、将该第一位号分组中目标位号对应的I/O点输出的数据保存至第二目标服务器节点中。
可选的,预设副本数量将第一位号分组中的目标位号配置的第一存储服务器节点计算在内。例如:在预设副本数量为2的情况下,一个第一位号分组可以与一个第一目标服务器节点和一个第二目标服务器节点建立关联关系。在预 设副本数量为3的情况下,一个第一位号分组可以与一个第一目标服务器节点和两个第二目标服务器节点建立关联关系。
可以理解的是,一个第一位号分组关联的第一目标服务器节点可以是另一个第一位号分组关联的第二目标服务器节点。为了便于理解,此处基于图3,结合图5对第一位号分组的副本备份进行说明:在图5中,第一位号分组与第二目标服务器节点之间的关联关系以双箭头直虚线表示。假设预设副本数量为2,则可以将Group3和Group5分别与Node1建立关联关系,将Group1和Group6分别与Node2建立关联关系,将Group2和Group4分别与Node3建立关联关系。
可以理解的是,在目标控制***中,除了目标位号以外还存在其他位号,本公开实施例可以对该其他位号均衡分布至分布式***的各存储服务器节点中。
可选的,基于图1所示的方法,如图6所示,本公开实施例提供的数据存储方法的另一种实施方式的示意图,该数据存储方法还包括:
S600、按照输出数据来源对目标控制***中除目标位号以外的其他位号进行划分,获得至少一个第二位号分组。
其中,步骤S600中按照数据数据来源对其他位号进行划分的说明可参考步骤S140,此处不再赘述。
可以理解的是,本公开实施例可以对第二位号分组中的其他位号的数量进行设置。
S700、对至少一个第二位号分组中任一第二位号分组:按照预设副本数量,建立该第二位号分组与至少一个第三目标服务器节点之间的关联关系,其中,第三目标服务器节点为与该第二位号分组未建立关联关系的存储服务器节点。
S800、将该第二位号分组中其他位号对应的I/O点输出的数据保存至第三目标服务器节点中。
为了便于理解,此处通过举例进行说明:在预设副本数量为2的情况下,一个第二位号分组可以与两个第三目标服务器节点建立关联关系。在预设副本数量为3的情况下,一个第二位号分组可以与三个第三目标服务器节点建立关 联关系。
本公开实施例通过对目标控制***中除目标位号以外的其他位号按照数据来源进行分组得到第二位号分组,使得其他位号可以以分组的形式均匀分布至分布式***的各存储服务器节点中,同时对第二位号分组设置副本数量,使得其他位号对应的数据具备较高的容灾能力。
可选的,本公开实施例还可以对工作状态为异常的存储服务器关联的位号分组进行转移。具体的,本公开实施例可以确定各存储服务器节点的工作状态。将工作状态为异常的存储服务器节点确定为异常存储服务器节点。断开异常存储服务器节点和异常存储服务器节点关联的第三位号分组之间的关联关系。对与异常存储服务器节点断开关联关系的任一第三位号分组:建立该第三位号分组与一个第四目标服务器节点之间的关联关系,其中,第四目标服务器节点为未与该第三位号分组建立关联关系的存储服务器节点。将该第三位号分组中的位号对应的I/O点输出的数据保存至第四目标服务器节点中。
可选的,本公开实施例可以将异常存储服务器节点中第三位号分组对应的已存储数据转移至第四目标服务器节点中进行保存。其中,已存储数据可以以一个第三位号分组为颗粒度进行转移,以确保各第四目标服务器中的均衡。
为了便于理解,此处基于图5,结合图7对异常存储服务器节点关联的第三位号分组的转移过程进行说明:图7展示了异常存储服务器节点关联的第三位号分组转移的情况。假设Node3为异常存储服务器节点,则Group2、Group4、Group5和Group6为第三位号分组。本公开实施例可以将Group2和Group5分别断开与Node3的关联关系,建立Node1分别与Group2和Group5的关联关系,相当于将Group2和Group5从Node3转移至Node1。将Group4和Group6分别断开与Node3的关联关系,建立Node2分别与Group4和Group6的关联关系,相当于将Group4和Group6从Node3转移至Node2。
本公开实施例提供的数据存储方法,可以在存储服务器节点出现异常的情况下,可以在不移动其他未异常的存储服务器节点关联的位号分组的前提下,转移该异常存储服务器节点关联的第三位号分组至第四目标服务器节点,实现对第三位号分组均匀分布至其他未异常的存储服务器节点的同时,依然保留数 据的容灾能力。
与上述方法实施例相对应,本公开实施例还提供一种数据存储装置,其结构如图8所示,可以包括:第一位号分组获得单元100、第一关联关系建立单元200以及第一数据存储单元300。
第一位号分组获得单元100,用于获得目标控制***中的至少一个第一位号分组,其中,第一位号分组包括至少一个目标位号,目标位号为配置有第一存储服务器节点的位号,其中,同一第一位号分组中的各目标位号配置的第一存储服务器节点相同。
第一关联关系建立单元200,用于对至少一个第一位号分组中的任一第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,其中,第一目标服务器节点为该第一位号分组中的目标位号配置的第一存储服务器节点。
第一数据存储单元300,用于将该第一位号分组中目标位号对应的I/O点输出的数据保存至第一目标服务器节点中。
可选的,第一位号分组获得单元100包括:目标位号确定子单元、临时节点分组获得子单元、临时类型分组获得子单元以及位号分组获得子单元。
目标位号确定子单元,用于确定目标控制***中的至少一个目标位号。
临时节点分组获得子单元,用于对至少一个目标位号按照配置的第一存储服务器节点进行划分,获得至少一个临时节点分组,其中,临时节点分组中的目标位号配置的第一存储服务器节点相同。
临时类型分组获得子单元,用于对至少一个临时节点分组中的任一临时节点分组:对该临时节点分组中的目标位号按照输出数据类型进行划分,获得至少一个临时类型分组。
位号分组获得子单元,用于对至少一个临时类型分组中的任一临时类型分组:对该临时类型分组中的目标位号按照输出数据来源进行划分,获得至少一个第一位号分组。
可选的,该数据存储装置还包括:第二关联关系建立单元以及第二数据存储单元。
第二关联关系建立单元,用于第一位号分组获得单元100获得目标控制***中的至少一个第一位号分组之后,对至少一个第一位号分组中的任一第一位号分组:按照预设副本数量,建立该第一位号分组与至少一个第二目标服务器节点之间的关联关系,其中,第二目标服务器节点为该第一位号分组中的目标位号配置的第一存储服务器节点以外的其他存储服务器节点。
第二数据存储单元,用于将该第一位号分组中目标位号对应的I/O点输出的数据保存至第二目标服务器节点中。
可选的,该数据存储装置还包括:第二位号分组获得单元、第三关联关系建立单元以及第三数据存储单元。
第二位号分组获得单元,用于按照输出数据来源对目标控制***中除目标位号以外的其他位号进行划分,获得至少一个第二位号分组。
第三关联关系建立单元,用于对至少一个第二位号分组中任一第二位号分组:按照预设副本数量,建立该第二位号分组与至少一个第三目标服务器节点之间的关联关系,其中,第三目标服务器节点为与该第二位号分组未建立关联关系的存储服务器节点。
第三数据存储单元,用于将该第二位号分组中其他位号对应的I/O点输出的数据保存至第三目标服务器节点中。
可选的,该数据存储装置还包括:工作状态确定单元、异常节点确定单元、关联关系断开单元、第四关联关系建立单元以及第四数据存储单元。
工作状态确定单元,用于确定各存储服务器节点的工作状态。
异常节点确定单元,用于将工作状态为异常的存储服务器节点确定为异常存储服务器节点。
关联关系断开单元,用于断开异常存储服务器节点和异常存储服务器节点关联的第三位号分组之间的关联关系。
第四关联关系建立单元,用于对与异常存储服务器节点断开关联关系的任一第三位号分组:建立该第三位号分组与一个第四目标服务器节点之间的关联关系,其中,第四目标服务器节点为未与该第三位号分组建立关联关系的存储服务器节点。
第四数据存储单元,用于将该第三位号分组中的位号对应的I/O点输出的数据保存至第四目标服务器节点中。
本公开提供的一种数据存储装置,可以获得目标控制***中的至少一个第一位号分组,其中,第一位号分组包括至少一个目标位号,目标位号为配置有第一存储服务器节点的位号,其中,同一第一位号分组中的各目标位号配置的第一存储服务器节点相同;对至少一个第一位号分组中的任一第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,其中,第一目标服务器节点为该第一位号分组中的目标位号配置的第一存储服务器节点;将该第一位号分组中目标位号对应的I/O点输出的数据保存至第一目标服务器节点中。本公开通过将配置相同第一存储服务器的目标位号划分至同一第一位号分组中,建立第一位号分组与对应第一存储服务器的关联关系,使得第一位号分组中目标位号对应的I/O点输出的数据集中保存至对应的第一目标服务器节点中,实现目标位号在分布式***的各存储服务器节点中的均衡分布,进而在数据分配存储过程中实现了各存储服务器节点均衡负载。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
所述数据存储装置包括处理器和存储器,上述第一位号分组获得单元100、第一关联关系建立单元200以及第一数据存储单元300等均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。
处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来通过将配置相同第一存储服务器的目标位号划分至同一第一位号分组中,建立第一位号分组与对应第一存储服务器的关联关系,使得第一位号分组中目标位号对应的I/O点输出的数据集中保存至对应的第一目标服务器节点中,实现目标位号在分布式***的各存储服务器节点中的均衡分布,进而在数据分配存储过程中实现了各存储服务器节点均衡负载。
本公开实施例提供了一种计算机可读存储介质,其上存储有程序,该程序 被处理器执行时实现所述数据存储方法。
本公开实施例提供了一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行所述数据存储方法。
本公开实施例提供了一种电子设备,电子设备包括至少一个处理器、以及与处理器连接的至少一个存储器、总线;其中,处理器、存储器通过总线完成相互间的通信;处理器用于调用存储器中的程序指令,以执行上述的数据存储方法。本文中的电子设备可以是服务器、PC、PAD、手机等。
本申请还提供了一种计算机程序产品,当在电子设备上执行时,适于执行初始化有上述数据存储方法步骤的程序。
本申请是参照根据本申请实施例的方法、装置、电子设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程设备的处理器以产生一个机器,使得通过计算机或其他可编程设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
在一个典型的配置中,电子设备包括一个或多个处理器(CPU)、存储器和总线。电子设备还可以包括输入/输出接口、网络接口等。
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。存储器是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他 磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。
本领域技术人员应明白,本申请的实施例可提供为方法、***或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (10)

  1. 一种数据存储方法,其特征在于,包括:
    获得目标控制***中的至少一个第一位号分组,其中,所述第一位号分组包括至少一个目标位号,所述目标位号为配置有第一存储服务器节点的位号,其中,同一所述第一位号分组中的各所述目标位号配置的所述第一存储服务器节点相同;
    对所述至少一个第一位号分组中的任一所述第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关系,其中,所述第一目标服务器节点为该第一位号分组中的所述目标位号配置的所述第一存储服务器节点;将该第一位号分组中所述目标位号对应的I/O点输出的数据保存至所述第一目标服务器节点中。
  2. 根据权利要求1所述的方法,其特征在于,所述获得目标控制***中的至少一个第一位号分组,包括:
    确定目标控制***中的至少一个目标位号;
    对所述至少一个目标位号按照配置的第一存储服务器节点进行划分,获得至少一个临时节点分组,其中,所述临时节点分组中的所述目标位号配置的所述第一存储服务器节点相同;
    对所述至少一个临时节点分组中的任一所述临时节点分组:对该临时节点分组中的所述目标位号按照输出数据类型进行划分,获得至少一个临时类型分组;
    对所述至少一个临时类型分组中的任一所述临时类型分组:对该临时类型分组中的所述目标位号按照输出数据来源进行划分,获得至少一个第一位号分组。
  3. 根据权利要求1所述的方法,其特征在于,在所述获得目标控制***中的至少一个第一位号分组之后,所述方法还包括:
    对所述至少一个第一位号分组中的任一所述第一位号分组:按照预设副本数量,建立该第一位号分组与至少一个第二目标服务器节点之间的关联关系,其中,所述第二目标服务器节点为该第一位号分组中的所述目标位号配置的所 述第一存储服务器节点以外的其他存储服务器节点;将该第一位号分组中所述目标位号对应的I/O点输出的数据保存至所述第二目标服务器节点中。
  4. 根据权利要求1所述的方法,其特征在于,还包括:
    按照输出数据来源对所述目标控制***中除所述目标位号以外的其他位号进行划分,获得至少一个第二位号分组;
    对所述至少一个第二位号分组中任一所述第二位号分组:按照预设副本数量,建立该第二位号分组与至少一个第三目标服务器节点之间的关联关系,其中,所述第三目标服务器节点为与该第二位号分组未建立关联关系的存储服务器节点;将该第二位号分组中所述其他位号对应的I/O点输出的数据保存至所述第三目标服务器节点中。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,还包括:
    确定各存储服务器节点的工作状态;
    将所述工作状态为异常的存储服务器节点确定为异常存储服务器节点;
    断开所述异常存储服务器节点和所述异常存储服务器节点关联的第三位号分组之间的关联关系;
    对与所述异常存储服务器节点断开关联关系的任一所述第三位号分组:建立该第三位号分组与一个第四目标服务器节点之间的关联关系,其中,所述第四目标服务器节点为未与该第三位号分组建立关联关系的存储服务器节点;将该第三位号分组中的位号对应的I/O点输出的数据保存至所述第四目标服务器节点中。
  6. 一种数据存储装置,其特征在于,包括:第一位号分组获得单元、第一关联关系建立单元以及第一数据存储单元,
    所述第一位号分组获得单元,用于获得目标控制***中的至少一个第一位号分组,其中,所述第一位号分组包括至少一个目标位号,所述目标位号为配置有第一存储服务器节点的位号,其中,同一所述第一位号分组中的各所述目标位号配置的所述第一存储服务器节点相同;
    所述第一关联关系建立单元,用于对所述至少一个第一位号分组中的任一所述第一位号分组:建立该第一位号分组与第一目标服务器节点之间的关联关 系,其中,所述第一目标服务器节点为该第一位号分组中的所述目标位号配置的所述第一存储服务器节点;
    所述第一数据存储单元,用于将该第一位号分组中所述目标位号对应的I/O点输出的数据保存至所述第一目标服务器节点中。
  7. 根据权利要求6所述的装置,其特征在于,所述第一位号分组获得单元包括:目标位号确定子单元、临时节点分组获得子单元、临时类型分组获得子单元以及位号分组获得子单元,
    所述目标位号确定子单元,用于确定目标控制***中的至少一个目标位号;
    所述临时节点分组获得子单元,用于对所述至少一个目标位号按照配置的第一存储服务器节点进行划分,获得至少一个临时节点分组,其中,所述临时节点分组中的所述目标位号配置的所述第一存储服务器节点相同;
    所述临时类型分组获得子单元,用于对所述至少一个临时节点分组中的任一所述临时节点分组:对该临时节点分组中的所述目标位号按照输出数据类型进行划分,获得至少一个临时类型分组;
    所述位号分组获得子单元,用于对所述至少一个临时类型分组中的任一所述临时类型分组:对该临时类型分组中的所述目标位号按照输出数据来源进行划分,获得至少一个第一位号分组。
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:第二关联关系建立单元以及第二数据存储单元,
    所述第二关联关系建立单元,用于所述第一位号分组获得单元获得目标控制***中的至少一个第一位号分组之后,对所述至少一个第一位号分组中的任一所述第一位号分组:按照预设副本数量,建立该第一位号分组与至少一个第二目标服务器节点之间的关联关系,其中,所述第二目标服务器节点为该第一位号分组中的所述目标位号配置的所述第一存储服务器节点以外的其他存储服务器节点;
    所述第二数据存储单元,用于将该第一位号分组中所述目标位号对应的I/O点输出的数据保存至所述第二目标服务器节点中。
  9. 根据权利要求6所述的装置,其特征在于,第二位号分组获得单元、第三关联关系建立单元以及第三数据存储单元,
    所述第二位号分组获得单元,用于按照输出数据来源对所述目标控制***中除所述目标位号以外的其他位号进行划分,获得至少一个第二位号分组;
    所述第三关联关系建立单元,用于对所述至少一个第二位号分组中任一第二位号分组:按照预设副本数量,建立该第二位号分组与至少一个第三目标服务器节点之间的关联关系,其中,所述第三目标服务器节点为与该第二位号分组未建立关联关系的存储服务器节点;
    所述第三数据存储单元,用于将该第二位号分组中所述其他位号对应的I/O点输出的数据保存至所述第三目标服务器节点中。
  10. 根据权利要求6至9中任一项所述的装置,其特征在于,还包括:工作状态确定单元、异常节点确定单元、关联关系断开单元、第四关联关系建立单元以及第四数据存储单元,
    所述工作状态确定单元,用于确定各存储服务器节点的工作状态;
    所述异常节点确定单元,用于将所述工作状态为异常的存储服务器节点确定为异常存储服务器节点;
    所述关联关系断开单元,用于断开所述异常存储服务器节点和所述异常存储服务器节点关联的第三位号分组之间的关联关系;
    所述第四关联关系建立单元,用于对与所述异常存储服务器节点断开关联关系的任一所述第三位号分组:建立该第三位号分组与一个第四目标服务器节点之间的关联关系,其中,所述第四目标服务器节点为未与该第三位号分组建立关联关系的存储服务器节点;
    所述第四数据存储单元,用于将该第三位号分组中的位号对应的I/O点输出的数据保存至所述第四目标服务器节点中。
PCT/CN2021/116373 2021-04-19 2021-09-03 一种数据存储方法及装置 WO2022222346A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110418666.9 2021-04-19
CN202110418666.9A CN113110803B (zh) 2021-04-19 2021-04-19 一种数据存储方法及装置

Publications (1)

Publication Number Publication Date
WO2022222346A1 true WO2022222346A1 (zh) 2022-10-27

Family

ID=76718410

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116373 WO2022222346A1 (zh) 2021-04-19 2021-09-03 一种数据存储方法及装置

Country Status (2)

Country Link
CN (1) CN113110803B (zh)
WO (1) WO2022222346A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110803B (zh) * 2021-04-19 2022-10-21 浙江中控技术股份有限公司 一种数据存储方法及装置

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019614A (zh) * 2011-09-23 2013-04-03 阿里巴巴集团控股有限公司 分布式存储***管理装置及方法
CN106533967A (zh) * 2016-12-08 2017-03-22 北京中安智达科技有限公司 一种可自定义负载均衡策略的数据传输方法
CN108427725A (zh) * 2018-02-11 2018-08-21 华为技术有限公司 数据处理方法、装置和***
CN109325062A (zh) * 2018-09-12 2019-02-12 哈尔滨工业大学 一种基于分布式计算的数据依赖挖掘方法及***
CN109376137A (zh) * 2018-12-17 2019-02-22 中国人民解放军战略支援部队信息工程大学 一种文件处理方法及装置
US20190220454A1 (en) * 2016-10-20 2019-07-18 Hitachi, Ltd. Data storage system and process for providing distributed storage in a scalable cluster system and computer program for such data storage system
US10659523B1 (en) * 2014-05-23 2020-05-19 Amazon Technologies, Inc. Isolating compute clusters created for a customer
CN113110803A (zh) * 2021-04-19 2021-07-13 浙江中控技术股份有限公司 一种数据存储方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104040507B (zh) * 2012-12-03 2017-08-04 华为技术有限公司 数据存储方法和客户端设备及客户端计算机程序产品
CN103473334B (zh) * 2013-09-18 2017-01-11 中控技术(西安)有限公司 数据存储、查询方法及***
CN105335448B (zh) * 2014-08-15 2018-09-21 ***股份有限公司 基于分布式环境的数据存储及处理***
CN108920272B (zh) * 2018-06-08 2024-06-11 中国平安人寿保险股份有限公司 一种数据处理方法、装置、计算机设备及存储介质
CN111603765B (zh) * 2020-04-07 2023-03-28 广州多益网络股份有限公司 服务器的分配方法、***及存储介质
CN112083892B (zh) * 2020-09-25 2021-05-18 上海依图网络科技有限公司 一种数据存储方法、装置、设备和介质
CN112328688B (zh) * 2020-11-09 2023-10-13 广州虎牙科技有限公司 数据存储方法、装置、计算机设备及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019614A (zh) * 2011-09-23 2013-04-03 阿里巴巴集团控股有限公司 分布式存储***管理装置及方法
US10659523B1 (en) * 2014-05-23 2020-05-19 Amazon Technologies, Inc. Isolating compute clusters created for a customer
US20190220454A1 (en) * 2016-10-20 2019-07-18 Hitachi, Ltd. Data storage system and process for providing distributed storage in a scalable cluster system and computer program for such data storage system
CN106533967A (zh) * 2016-12-08 2017-03-22 北京中安智达科技有限公司 一种可自定义负载均衡策略的数据传输方法
CN108427725A (zh) * 2018-02-11 2018-08-21 华为技术有限公司 数据处理方法、装置和***
CN109325062A (zh) * 2018-09-12 2019-02-12 哈尔滨工业大学 一种基于分布式计算的数据依赖挖掘方法及***
CN109376137A (zh) * 2018-12-17 2019-02-22 中国人民解放军战略支援部队信息工程大学 一种文件处理方法及装置
CN113110803A (zh) * 2021-04-19 2021-07-13 浙江中控技术股份有限公司 一种数据存储方法及装置

Also Published As

Publication number Publication date
CN113110803A (zh) 2021-07-13
CN113110803B (zh) 2022-10-21

Similar Documents

Publication Publication Date Title
JP6882511B2 (ja) ブロックチェーンコンセンサスのための方法、装置およびシステム
TWI743458B (zh) 一種並行化執行區塊鏈交易的方法、裝置及系統
US20180337847A1 (en) Indexing a multi-layer blockchain system
CA2892889C (en) Scaling computing clusters
CN110177118A (zh) 一种基于rdma的rpc通信方法
TWI694700B (zh) 資料處理方法和裝置、用戶端
US9830091B2 (en) Policy-based data tiering using a cloud architecture
WO2022222346A1 (zh) 一种数据存储方法及装置
CN114679457B (zh) 一种区块链中的节点分组方法及区块链节点
US11563805B2 (en) Method, apparatus, client terminal, and server for data processing
TWI686703B (zh) 資料儲存與業務處理的方法及裝置
CN110515731A (zh) 一种数据处理方法、装置及***
US11461053B2 (en) Data storage system with separate interfaces for bulk data ingestion and data access
WO2023207082A1 (zh) 负载均衡方法及装置和电子设备
CN105339899A (zh) 用于在软件定义网络中使应用程序集群的方法和控制器
US20230136615A1 (en) Virtual pools and resources using distributed networked processing units
WO2023040203A1 (zh) 一种人工智能平台的数据获取方法、装置、设备、介质
CN108063821A (zh) 一种基于x86架构的电力营销***
CN111770150B (zh) 访问流量控制方法、装置及电子设备
WO2023207087A1 (zh) 用于区块链的最优链路选择方法及装置和电子设备
US9438638B2 (en) Method for transparently connecting augmented network socket operations
WO2024021470A1 (zh) 一种跨区域的数据调度方法、装置、设备及存储介质
TWI714017B (zh) 資料處理方法和裝置、伺服器
CN113630317A (zh) 一种数据传输方法、装置、非易失性存储介质及电子装置
CN105389368A (zh) 一种mpp架构数据库集群元数据管理方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21937568

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21937568

Country of ref document: EP

Kind code of ref document: A1