Data searching method and device and computer equipment

Through a multi-level data organization structure, when searching for differential data, the device identification and data version range query location identification information is solved, and the problem of low efficiency in differential data search in the existing technology is achieved, and a more efficient and accurate data backup process is achieved.

CN119311742APending Publication Date: 2025-01-14SUGON INFORMATION IND +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411406657.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing technology is less efficient when looking for differential data, resulting in inefficiency and increased errors during data backup, and excessive human resources consumption.

Method used

A multi-level data organization structure is adopted to query the location identification information of the target differential data through device identification and data version range, avoid traversing useless information, improve query speed and efficiency, and reduce errors in manual participation.

Benefits of technology

It improves the search speed and efficiency of differential data, enhances the accuracy of query results, and reduces labor costs and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311742A_ABST
    Figure CN119311742A_ABST
Patent Text Reader

Abstract

The invention relates to a data searching method and device and computer equipment. The method comprises the following steps: in response to a search instruction of target difference data, obtaining a device identifier carried in the search instruction and a data version range corresponding to the target difference data, and querying position identifier information corresponding to the target difference data in a pre-generated data organization structure according to the device identifier and the data version range, the target difference data is searched according to the position identification information, and the data organization structure is a multi-level structure formed based on different device identifications, data versions under different devices and the position identification information of the difference data between the data versions. According to the method, due to the fact that the data organization structure is a multi-level structure, useless information can be avoided in the query process, the amount of data traversed in the query process can be reduced, the query speed and efficiency of the position identification information can be improved, and the search speed and efficiency of the target difference data can be further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data storage, and in particular to a data search method, device and computer equipment. Background Art

[0002] With the development of computer technology, more and more valuable data are generated in various fields, and these data need to be stored for subsequent applications. In practical applications, in order to ensure the security and reliability of data, it is particularly important to back up such data.

[0003] In the related technology, the data in the storage device can be updated in real time, and the location identification information of the difference data before and after the update can be recorded. When there is a need for data synchronization, multiple independent information items stored in advance are traversed, and information items containing multiple location identification information to be queried are queried from the multiple information items. Then, the difference data is searched according to the queried location identification information to synchronize the difference data and complete the data backup.

[0004] However, in the related art, there is a problem of low efficiency in searching for difference data during the process of searching for difference data. Summary of the invention

[0005] Based on this, it is necessary to provide a data search method, device and computer equipment to address the above technical problems, which can improve the efficiency of difference data search in the process of searching difference data.

[0006] In a first aspect, an embodiment of the present application provides a data search method, the method comprising:

[0007] In response to a search instruction for target difference data, obtaining a device identifier carried in the search instruction and a data version range corresponding to the target difference data;

[0008] According to the device identification and data version range, the location identification information corresponding to the target difference data is queried in the pre-generated data organization structure; the data organization structure is a multi-level structure composed of different device identifications, data versions under different devices and location identification information of the difference data between each data version;

[0009] The target difference data is searched according to the position identification information corresponding to the target difference data.

[0010] The technical solution in the embodiment of the present application responds to a search instruction for target difference data, obtains the device identification carried in the search instruction and the data version range corresponding to the target difference data, queries the location identification information corresponding to the target difference data in a pre-generated data organization structure according to the device identification and the data version range, and searches for the target difference data according to the location identification information, wherein the data organization structure is a multi-level structure composed of location identification information of different device identifications, data versions under different devices, and difference data between each data version; the above method avoids the process of traversing all independent information items to query the location identification information corresponding to the target difference data, and can query the location identification information corresponding to the target difference data based on the pre-generated data organization structure. Since the data organization structure is a multi-level structure, useless information, that is, information that is inconsistent with the instruction, can be avoided during the query process. The operation of traversing the data version related information that does not match the device identification carried in the query can reduce the amount of data traversed in the query process, improve the query speed and efficiency of the location identification information, and further improve the search speed and efficiency of the target difference data; at the same time, the above method does not require human participation, can reduce the errors caused by human participation in the query, thereby improving the correctness of the query results, and on this basis, can improve the correctness of the query results to a certain extent, and can also reduce the human resources required for data search and reduce labor costs; in addition, the data organization structure in the above method is a multi-level structure. Therefore, during the query process, you only need to enter one data organization structure to query the location identification information corresponding to the target difference data, and you do not need to enter and exit multiple times to complete the query, thereby saving query time and greatly improving the query speed and efficiency.

[0011] In one embodiment, obtaining the device identification carried in the search instruction and the data version range corresponding to the target difference data includes:

[0012] Get the instruction information carried in the search instruction;

[0013] Parse the instruction information and obtain the data version range corresponding to the device identification and target difference data.

[0014] The technical solution in the embodiment of the present application obtains the instruction information carried in the search instruction, and parses the instruction information to obtain the data version range corresponding to the device identification and the target difference data; the above method can obtain the useful information required for the difference data search from the instruction information carried in the search instruction, that is, the data version range corresponding to the device identification and the target difference data, so as to provide effective reference information for subsequent accurate search, and can reduce the inevitable invalid queries and search processes in the subsequent search process, thereby speeding up the subsequent search speed.

[0015] In one embodiment, according to the device identification and the data version range, querying the location identification information corresponding to the target difference data in the pre-generated data organization structure includes:

[0016] According to the hierarchical order of the data organization structure, the location identification information that satisfies the device identification and the data version range is queried in the data organization structure.

[0017] The technical solution in the embodiment of the present application searches for location identification information that satisfies the device identification and data version range in the data organization structure according to the hierarchical order of the data organization structure; the above method can search for location identification information of target difference data in a data organization structure with a hierarchical relationship, and can avoid traversing useless information, that is, data version related information that does not match the device identification carried in the instruction, thereby reducing the amount of data traversed during the query process, thereby improving the query speed and efficiency of the location identification information; at the same time, the above method can search layer by layer in the data organization structure according to the hierarchical order of the data organization structure, thereby avoiding the problem of missed searches, thereby improving the accuracy of the query results.

[0018] In one embodiment, the data organization structure includes a first layer structure, a second layer structure, and a third layer structure; according to the hierarchical order of the data organization structure, searching the data organization structure for location identification information that satisfies the device identification and the data version range includes:

[0019] Searching the information table in the first layer structure for a device identifier that matches the device identifier carried in the search instruction;

[0020] Querying a plurality of target data versions within a data version range in a target version storage structure in a second-layer structure; wherein the target version storage structure is associated with a matching device identifier in a first-layer structure;

[0021] The location identification information corresponding to each target data version is queried in the multiple target identification storage structures in the third layer structure; wherein the multiple target identification storage structures are associated with the multiple target data versions in the second layer structure.

[0022] The technical solution in the embodiment of the present application queries the device identifier matching the device identifier carried in the search instruction in the information table within the first layer structure of the data organization structure, queries the multiple target data versions within the data version range in the target version storage structure within the second layer structure of the data organization structure, and queries the location identification information corresponding to each target data version in the multiple target identification storage structures within the third layer structure of the data organization structure; the above method can query the information layer by layer in the data organization structure to obtain the location identification information corresponding to the target difference data, which can not only avoid the problem of missing queries, but also avoid querying some useless information, thereby greatly improving the correctness of the query results, reducing the amount of data processed during the query process, and improving query efficiency.

[0023] In one embodiment, querying the location identification information corresponding to each target data version in multiple target identification storage structures in the third layer structure includes:

[0024] According to the partition query range carried in the search instruction, the location identification information corresponding to each target data version is partitioned and searched in multiple target identification storage structures.

[0025] The technical solution in the embodiment of the present application partitions and queries the location identification information corresponding to each target data version in multiple target identification storage structures according to the partition query range carried in the search instruction; the above method can partition and query the location identification information that meets the conditions in each target identification storage structure according to the partition query range, which not only avoids the problem of high query complexity caused by a one-time query, but also improves the accuracy of the query results by distinguishing multiple queries.

[0026] In one of the embodiments, each location identification storage structure within the third layer structure in the data organization structure is composed of multiple bitmap nodes and multiple interval nodes; the location identification information of each bitmap node includes the location information of different difference data, and the location identification information of each interval node includes the location interval information of different difference data.

[0027] According to the technical solution in the embodiment of the present application, each location identification storage structure in the third-layer structure in the data organization structure is composed of multiple bitmap nodes and multiple interval nodes, and the location identification information of each bitmap node includes the location information of different difference data, and the location identification information of each interval node includes the location interval information of different difference data; the third-layer structure in the above method records the location identification information of different difference data through a mixed node of bitmap nodes and interval nodes, which can ensure that the location identification information of different difference data is fully recorded, while reducing the number of nodes for recording the location identification information and the number of layers of the location identification storage structure, so as to prepare for the subsequent improvement of the query speed and query efficiency of the location identification information, and on the basis of ensuring that the number of layers of the location identification storage structure is small, it can also reduce the storage space occupied by the computer device for storing the data organization structure, and can reduce the resource consumption required for the query in the subsequent query process.

[0028] In one embodiment, the process of generating the data organization structure includes:

[0029] In the case of storage data backup, key value information of different difference data generated before and after the storage data backup is obtained;

[0030] According to each key value information, the first layer structure, the second layer structure and the third layer structure are constructed in sequence to generate a data organization structure.

[0031] The technical solution in the embodiment of the present application, when storing data backup, obtains the key value information of different difference data generated before and after the storage data backup, and constructs the first layer structure, the second layer structure and the third layer structure in sequence according to each key value information to generate a data organization structure; the above method can construct a multi-level structure in a layer-by-layer manner to generate a data organization structure, which can improve the correctness of the generated data organization structure.

[0032] In one embodiment, the key value information includes a correspondence between a device identifier to which the corresponding difference data belongs, a data version of the device executing data backup, and location identifier information; and according to each key value information, a first layer structure, a second layer structure, and a third layer structure are sequentially constructed to generate a data organization structure, including:

[0033] Different device identifiers are stored in the form of information tables to generate the first layer structure;

[0034] Associating each data version with the corresponding device identifier in the first layer structure, and establishing a data version storage structure for each data version under the corresponding device identifier to generate a second layer structure; the second layer structure includes multiple nodes, and the node information of each node is the corresponding data version;

[0035] Each piece of location identification information is associated with a corresponding node in the second layer structure, and a location identification storage structure of each piece of location identification information is established under the corresponding node in the second layer structure to generate a third layer structure.

[0036] The technical solution in the embodiment of the present application uses an information table to store different device identifiers to generate a first-level structure, associates each data version with the corresponding device identifier in the first-level structure, and establishes a data version storage structure for each data version under the corresponding device identifier to generate a second-level structure, associates each location identification information with the corresponding node in the second-level structure, and then establishes a location identification storage structure for each location identification information under the corresponding node in the second-level structure to generate a third-level structure; the above method can construct a multi-layer structure with an associated relationship in a layer-by-layer manner to generate a data organization structure, which can improve the correctness of the generated data organization structure, and on this basis, can provide effective reference information for subsequent quick queries.

[0037] In one embodiment, before generating the data organization structure, the method further includes:

[0038] For any two adjacent nodes in any location identifier storage structure in the third layer structure, determine whether the two adjacent nodes are in an adjacency relationship according to the location identifier information of the two adjacent nodes;

[0039] If so, the location identification information of the two adjacent nodes is merged, and the merged location identification storage structure is balanced to generate a data organization structure.

[0040] The technical solution in the embodiment of the present application determines, for any two adjacent nodes in any location identification storage structure within the third-layer structure, whether the two adjacent nodes are in an adjacency relationship based on the location identification information of the two adjacent nodes, and when the two adjacent nodes are in an adjacency relationship, merges the location identification information of the two adjacent nodes, and balances the merged location identification storage structure to generate a data organization structure; in the process of generating the data organization structure, the above method can merge nodes, thereby reducing the number of nodes in the location identification storage structure, and balances the merged location identification storage structure to reduce the level of the location identification storage structure, so that the number of nodes and the number of levels in the finally generated data organization structure are as small as possible, so as to prepare for the subsequent improvement of query speed and efficiency.

[0041] In one embodiment, the method further comprises:

[0042] In response to the update instruction of the data organization structure, new key value information of new difference data generated before and after the storage data backup is obtained;

[0043] Update the data organization structure based on the new key value information.

[0044] The technical solution in the embodiment of the present application responds to the update instruction of the data organization structure, obtains the new key value information of the new difference data generated before and after the storage data backup, and updates the data organization structure according to the new key value information; the above method can update the data organization structure to prepare for improving the accuracy of the query results in subsequent query processes.

[0045] In one embodiment, the new key value information includes new location identification information, and the third layer structure in the data organization structure does not include the new location identification information; updating the data organization structure according to the new key value information includes:

[0046] If there is overlap between the new location identification information and the existing location identification information in the third-level structure, the new location identification information is merged with the overlapping location identification information in the third-level structure to complete the update of the data organization structure.

[0047] According to the technical solution in the embodiment of the present application, if there is overlap between the new location identification information of the new difference data and the existing location identification information in the third-layer structure, the new location identification information is merged with the overlapping location identification information in the third-layer structure to complete the update of the data organization structure; the above method can update the data organization structure to prepare for improving the accuracy of the query results in subsequent query processes, and the update process is relatively simple and does not require the participation of complex algorithms, thereby improving the update speed and efficiency of the data organization structure.

[0048] In one embodiment, the new key value information includes new location identification information; and updating the data organization structure according to the new key value information includes:

[0049] If there is no overlap between the new location identification information and the existing location identification information in the third layer structure in the data organization structure, insert a new node in the third layer structure according to the new location identification information;

[0050] The location identifier storage structure after the new node is inserted is balanced to complete the update of the data organization structure.

[0051] The technical solution in the embodiment of the present application, when there is no overlap between the new location identification information of the new difference data and the existing location identification information in the third layer structure of the data organization structure, inserts a new node in the third layer structure according to the new location identification information, and balances the location identification storage structure after the new node is inserted to complete the update of the data organization structure; the above method can update the data organization structure to prepare for improving the accuracy of the query results in the subsequent query process, and the update process is relatively simple and does not require the participation of complex algorithms, thereby improving the update speed and update efficiency of the data organization structure; at the same time, the above method can balance the location identification storage structure for inserting the new node, and can reduce the level of the location identification storage structure in the data organization structure generated after the update, so that the number of nodes and the number of levels in the finally generated data organization structure are as small as possible, which can prepare for the subsequent improvement of query speed and efficiency to a great extent.

[0052] In one embodiment, searching the target difference data according to the position identification information corresponding to the target difference data includes:

[0053] Determine the target offset position range according to the position identification information corresponding to the target difference data;

[0054] determining a plurality of target storage locations in storage locations of different difference data according to a target offset position range;

[0055] The difference data stored in each target storage location is determined as target difference data.

[0056] The technical solution in the embodiment of the present application determines the target offset position range according to the position identification information corresponding to the target difference data, determines multiple target storage positions in the storage positions of different difference data according to the target offset position range, and determines the difference data stored in each target storage position as the target difference data; the above method can obtain the target difference data according to the position identification information corresponding to the target difference data, the processing process is relatively simple, and does not require the participation of complex algorithms, thereby improving the search speed and efficiency of the target difference data.

[0057] In a second aspect, an embodiment of the present application provides a data search device, the device comprising:

[0058] A first acquisition module, configured to respond to a search instruction for target difference data and acquire a device identifier carried in the search instruction and a data version range corresponding to the target difference data;

[0059] An information query module is used to query the location identification information corresponding to the target difference data in the pre-generated data organization structure according to the device identification and data version range; the data organization structure is a multi-level structure composed of different device identifications, data versions under different devices and location identification information of the difference data between each data version;

[0060] The data search module is used to search for target difference data according to the position identification information corresponding to the target difference data.

[0061] In a third aspect, an embodiment of the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of any one of the embodiments of the first aspect when executing the computer program.

[0062] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of any embodiment in the above-mentioned first aspect are implemented.

[0063] In a fifth aspect, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method of any embodiment of the first aspect above.

[0064] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] FIG1 is an application environment diagram of a data search method in one embodiment;

[0066] FIG2 is an application environment diagram of a data search method in another embodiment;

[0067] FIG3 is a schematic diagram of a flow chart of a data search method in one embodiment;

[0068] FIG4 is a schematic flow chart of a data search method in another embodiment;

[0069] FIG5 is a schematic diagram of a flow chart of a data search method in another embodiment;

[0070] FIG6 is a schematic diagram of the structure of a variant interval tree in one embodiment;

[0071] FIG7 is a schematic flow chart of a data search method in another embodiment;

[0072] FIG8 is a schematic flow chart of a data search method in another embodiment;

[0073] FIG9 is a schematic flow chart of a data search method in another embodiment;

[0074] FIG10 is a schematic flow chart of a data search method in another embodiment;

[0075] FIG11 is a schematic flow chart of a data search method in another embodiment;

[0076] FIG12 is a schematic flow chart of a data search method in another embodiment;

[0077] FIG13 is a structural block diagram of a data search device in one embodiment;

[0078] FIG. 14 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0079] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0080] In the field of data storage, in order to ensure the security and reliability of data, it is often necessary to back up or synchronize the stored data. In the related art, the data in the storage device can be updated in real time, and the data change log (Data Chang Log, DCL) information of the difference data before and after the update, that is, the location identification information, can be recorded. In the case of data synchronization requirements, multiple independent information items stored in advance are traversed one by one, and information items containing multiple location identification information to be queried are queried from multiple information items. Then, the difference data is searched according to the queried location identification information to synchronize the difference data and complete the data backup. However, in the process of searching for difference data in the related art, there is a problem of low efficiency in searching for difference data. Based on this, an embodiment of the present application provides a data search method, which can improve the search efficiency of difference data in the process of searching for difference data.

[0081] The data search method provided in the embodiment of the present application can be applied to the data search system shown in Figure 1; the data search system includes at least one source device and at least one target device. Among them, each source device and the corresponding target device can be connected by communication, and the communication method can be Wi-Fi, mobile network or Bluetooth connection, etc. Optionally, each source device and each target device can be a database system, a personal computer, a desktop computer, a laptop computer, a tablet computer, a smart phone, a smart bracelet and other devices with storage functions. This embodiment does not limit the specific form of the source device and the target device. In this case, any source device (the source device has both data processing function and data storage function) can be used as the execution subject to implement the above data search method. In practical applications, the above database system can be a key-value storage system. Among them, Figure 1 is an example of a data search system including a source device and a target device, and the source device is a personal computer and the target device is a database system.

[0082] In addition, the above method can also be applied to the data search system shown in Figure 2; the data search system includes a computer device, at least one source device and at least one target device. Optionally, the computer device and each source device can be connected by communication, each source device and the corresponding target device can be connected by communication, and the computer device and each target device can also be connected by communication. Optionally, the above-mentioned computer device can be a personal computer, a desktop computer, a laptop computer, a tablet computer, a smart phone, a smart bracelet and other electronic devices with data processing functions. In the embodiment of the present application, the data search method is introduced by taking this scenario as an example. Among them, Figure 1 is an example of a data search system including a source device and a target device, and the computer device is a personal computer, and the source device and the target device are both database systems. The following embodiment of the present application uses a computer device as the execution subject of the data search method to introduce the specific process of the data search method, wherein the computer device can search for data from the source device, and can also search for data in the target device that is backed up or synchronized.

[0083] As shown in FIG3 , it is a schematic diagram of a flow chart of a data search method provided in an embodiment of the present application. The method can be implemented by the following steps:

[0084] S100 . In response to a search instruction for target difference data, obtain a device identifier carried in the search instruction and a data version range corresponding to the target difference data.

[0085] Specifically, the computer device may automatically trigger the search instructions for different difference data generated on different source devices according to a preset period, and may also receive the search instructions for different difference data generated on different source devices that are passively triggered at irregular intervals.

[0086] When a search instruction for target difference data is triggered at any time, the computer device may respond to the search instruction for target difference data and obtain the device identification carried in the search instruction and the data version range corresponding to the target difference data.

[0087] In one embodiment, the source device may extract the device identification and the data version range corresponding to the target difference data from the information carried in the search instruction according to the specific format and syntax followed by the search instruction.

[0088] In yet another embodiment, the source device may use a regular expression to match the information carried in the search instruction to obtain the device identifier and the data version range corresponding to the target difference data.

[0089] In practical applications, the target difference data may be a plurality of snapshot data generated by any source device after performing data snapshots on its own stored data irregularly or regularly, and the difference data between any two different snapshot data, that is, the difference data between the data stored by the source device at the time of any two data snapshots. At the same time, the device identifiers of different source devices are different, and the device identifiers may be composed of at least one character selected from letters, special symbols, etc.

[0090] At the same time, the above source device will configure a data version, i.e., version number, for each data snapshot executed on the data stored in itself. For example, when executing data snapshot for the first time, data version 1 can be configured for the snapshot data generated this time; when executing data snapshot for the second time, data version 2 can be configured for the snapshot data generated this time, and so on. After each data snapshot is executed, the data version is cumulatively added by 1 to the data version configured after the previous data snapshot is executed.

[0091] Optionally, the data version range may include a set of multiple continuous data versions. Optionally, the target difference data may be all difference data generated on the corresponding source device within the data version range corresponding to the target difference data.

[0092] S200: According to the device identification and data version range, query the location identification information corresponding to the target difference data in the pre-generated data organization structure. The data organization structure is a multi-level structure composed of different device identifications, data versions under different devices and location identification information of the difference data between each data version.

[0093] In practical applications, the pre-generated data organization structure can be stored in the memory of a computer device. Specifically, based on the device identification and data version range obtained in the previous steps, the computer device can pre-train an algorithm model, and then input the device identification, data version range and data organization structure into the algorithm model, and the algorithm model outputs the location identification information corresponding to the target difference data queried in the data organization structure. Optionally, the location identification information corresponding to the target difference data can indicate the storage location of the target difference data generated in the storage space of the corresponding source device.

[0094] In addition, the computer device can also call a search tool to query the location identification information corresponding to the target difference data in the pre-generated data organization structure according to the device identification and the data version range.

[0095] The data organization structure may be a multi-layer chain structure, i.e., a multi-level structure, consisting of device identifiers of different source devices, different data versions under different source devices, and location identifier information of difference data generated between different data versions.

[0096] S300: Search for target difference data according to position identification information corresponding to the target difference data.

[0097] Specifically, the computer device may send the location identification information of the target difference data to the corresponding source device, and instruct the source device to search for the target difference data according to the location identification information of the target difference data.

[0098] In addition, the computer device may also output the location identification information of the target difference data, so that the user can search for the target difference data in the corresponding storage location of the corresponding source device according to the location identification information of the target difference data.

[0099] The technical solution in the embodiment of the present application responds to a search instruction for target difference data, obtains the device identification carried in the search instruction and the data version range corresponding to the target difference data, queries the location identification information corresponding to the target difference data in a pre-generated data organization structure according to the device identification and the data version range, and searches for the target difference data according to the location identification information, wherein the data organization structure is a multi-level structure composed of location identification information of different device identifications, data versions under different devices, and difference data between each data version; the above method avoids the process of traversing all independent information items to query the location identification information corresponding to the target difference data, and can query the location identification information corresponding to the target difference data based on the pre-generated data organization structure. Since the data organization structure is a multi-level structure, useless information, that is, information that is inconsistent with the instruction, can be avoided during the query process. The operation of traversing the data version related information that does not match the device identification carried in the query can reduce the amount of data traversed in the query process, improve the query speed and efficiency of the location identification information, and further improve the search speed and efficiency of the target difference data; at the same time, the above method does not require human participation, can reduce the errors caused by human participation in the query, thereby improving the correctness of the query results, and on this basis, can improve the correctness of the query results to a certain extent, and can also reduce the human resources required for data search and reduce labor costs; in addition, the data organization structure in the above method is a multi-level structure. Therefore, during the query process, you only need to enter one data organization structure to query the location identification information corresponding to the target difference data, and you do not need to enter and exit multiple times to complete the query, thereby saving query time and greatly improving the query speed and efficiency.

[0100] The process of obtaining the device identification carried in the search instruction and the data version range corresponding to the target difference data is described below. In one embodiment, as shown in FIG4 , the step of obtaining the device identification carried in the search instruction and the data version range corresponding to the target difference data in S100 can be implemented in the following manner:

[0101] S110: Obtain instruction information carried in the search instruction.

[0102] In practical applications, the computer device may call an instruction parsing tool to parse the search instruction of the target difference data according to the format and structure of the search instruction, and obtain the instruction information carried in the search instruction of the target difference data.

[0103] Optionally, the instruction information carried in the above-mentioned search instruction may include the time when the search instruction was generated, the source of the search instruction, the amount of instruction information carried in the search instruction, etc. In an embodiment of the present application, the instruction information also includes the device identification and the data version range corresponding to the target difference data.

[0104] S120: Parse the instruction information to obtain the device identification and the data version range corresponding to the target difference data.

[0105] In actual applications, the computer device can parse the instruction information obtained in the previous steps to obtain the data version range corresponding to the device identification and the target difference data.

[0106] Among them, the method of parsing the instruction information can be to obtain the amount of extracted information corresponding to the data version range corresponding to the device identification and the target difference data, and then compare the amount of information of the instruction information with the amount of extracted information. If the two are equal, the data version range corresponding to the device identification and the target difference data is filtered from the instruction information; if the two are not equal, the instruction information is subjected to keyword extraction by a keyword extraction algorithm to obtain mixed information of the data version range corresponding to the device identification and the target difference data in the instruction information, and then the data version range corresponding to the device identification and the target difference data is filtered out from the mixed information. Optionally, the above-mentioned keyword extraction algorithm can be a statistical-based algorithm, a graph-based sorting algorithm, etc.

[0107] In addition, the method of parsing the instruction information can also be to use a keyword extraction algorithm to directly extract keywords from the instruction information to obtain mixed information of the data version range corresponding to the device identification and target difference data in the instruction information, and then filter out the data version range corresponding to the device identification and target difference data from the mixed information.

[0108] The technical solution in the embodiment of the present application obtains the instruction information carried in the search instruction, and parses the instruction information to obtain the data version range corresponding to the device identification and the target difference data; the above method can obtain the useful information required for the difference data search from the instruction information carried in the search instruction, that is, the data version range corresponding to the device identification and the target difference data, so as to provide effective reference information for subsequent accurate search, and can reduce the inevitable invalid queries and search processes in the subsequent search process, thereby speeding up the subsequent search speed.

[0109] The following is an explanation of the process of searching for location identification information corresponding to the target difference data in the pre-generated data organization structure according to the device identification and the data version range. In one embodiment, the step in S200 may include: searching for location identification information corresponding to the device identification and the data version range in the data organization structure according to the hierarchical order of the data organization structure.

[0110] Specifically, the computer device can pre-train a query model, and then input the data organization structure, device identification and data version range into the query model, and the query model outputs the location identification information corresponding to the device identification and data version range. Optionally, the query model can be composed of at least one of a convolutional neural network model, a fully connected neural network model, a recurrent neural network model, a long short-term memory neural network model, etc.

[0111] The technical solution in the embodiment of the present application searches for location identification information that satisfies the device identification and data version range in the data organization structure according to the hierarchical order of the data organization structure; the above method can search for location identification information of target difference data in a data organization structure with a hierarchical relationship, and can avoid traversing useless information, that is, data version related information that does not match the device identification carried in the instruction, thereby reducing the amount of data traversed during the query process, thereby improving the query speed and efficiency of the location identification information; at the same time, the above method can search layer by layer in the data organization structure according to the hierarchical order of the data organization structure, thereby avoiding the problem of missed searches, thereby improving the accuracy of the query results.

[0112] In one embodiment, the data organization structure includes a first layer structure, a second layer structure and a third layer structure; as shown in FIG5 , the step of searching the data organization structure for location identification information that satisfies the device identification and the data version range in the data organization structure according to the hierarchical order of the data organization structure may include the following steps:

[0113] S210: Searching the information table in the first layer structure for a device identification that matches the device identification carried in the search instruction.

[0114] The above data organization structure includes three layers, namely, the first layer structure, the second layer structure and the third layer structure; wherein, there is an association relationship between the first layer structure and the second layer structure, and there is an association relationship between the second layer structure and the third layer structure, that is, the data organization structure can be understood as a multi-layer chain structure. In the embodiment of the present application, the first layer structure can be the top-level structure in the data organization structure, the second layer structure can be the middle-level structure in the data organization structure, and the third layer structure can be the bottom-level structure in the data organization structure.

[0115] It should be noted that the first-layer structure includes device identifications of different source devices, the second-layer structure includes different data versions generated under different source devices (i.e., devices), and the third-layer structure includes location identification information of difference data generated between different data versions. Among them, the device identification in the first-layer structure is stored in the form of an information table, the data version in the second-layer structure is stored in the form of a balanced data storage structure, and the location identification information in the third-layer structure is also stored in the form of a balanced data storage structure, but the balanced data storage structure in the second-layer structure is different from the balanced data storage structure in the third-layer structure.

[0116] In actual applications, the computer device may search the information table in the first layer structure for a device identification that matches the device identification carried in the search instruction.

[0117] The information table may include a list of device information of different source devices, and the different device information in the information table is different, so that when querying the device identification in the information table, repeated queries can be avoided, invalid queries can be reduced, and query speed and efficiency can be improved. Optionally, the device information may include device name, device location, device model, etc. In the embodiment of the present application, the device information includes the device identification.

[0118] S220: Query a target version storage structure in the second layer structure for multiple target data versions within the data version range, wherein the target version storage structure is associated with the matching device identifier in the first layer structure.

[0119] Among them, each data version storage structure in the second layer structure can be a balanced data storage structure, and the data version storage structure can be a multi-way balanced search tree, a binary balanced search tree, etc.; in the embodiment of the present application, the data version storage structure can be a red-black tree. Optionally, the target version storage structure can be any data version storage structure in the second layer structure.

[0120] In practical applications, the number of device identifiers in the first layer structure may be equal to the number of data version storage structures in the second layer structure, that is, there is a data version storage structure under each device identifier in the first layer structure. Optionally, each node information in each data version storage structure in the second layer structure may include multiple continuous data versions. Among them, for any source device, all data versions in the data version storage structure under the device identifier of the source device are data versions generated by the source device in the process of executing multiple data snapshots, that is, each source device has its own corresponding data version storage structure.

[0121] Specifically, the computer device may query multiple target data versions within the data version range in the target version storage structure within the second layer structure. Optionally, the data version range may include multiple data versions under all device identifiers carried in the search instruction, and these data versions may be referred to as target data versions.

[0122] S230: Query the location identification information corresponding to each target data version in the multiple target identification storage structures in the third layer structure, wherein the multiple target identification storage structures are associated with the multiple target data versions in the second layer structure.

[0123] Among them, each location identifier storage structure in the third layer structure can be a balanced data storage structure, and the location identifier storage structure can be a multi-way balanced search tree, a binary balanced search tree, an interval tree, etc.; in the embodiment of the present application, the location identifier storage structure can be a variant interval tree. Among them, the node characteristics of all nodes in the variant interval tree include not only the node characteristics in the interval tree, but also other node characteristics.

[0124] Optionally, the number of the target identification storage structures may be equal to the number of target data versions; and the multiple target identification storage structures may be position identification storage structures for each target data version in the third-layer structure.

[0125] The technical solution in the embodiment of the present application queries the device identifier matching the device identifier carried in the search instruction in the information table within the first layer structure of the data organization structure, queries the multiple target data versions within the data version range in the target version storage structure within the second layer structure of the data organization structure, and queries the location identification information corresponding to each target data version in the multiple target identification storage structures within the third layer structure of the data organization structure; the above method can query the information layer by layer in the data organization structure to obtain the location identification information corresponding to the target difference data, which can not only avoid the problem of missing queries, but also avoid querying some useless information, thereby greatly improving the correctness of the query results, reducing the amount of data processed during the query process, and improving query efficiency.

[0126] In one embodiment, the step of querying the location identification information corresponding to each target data version in multiple target identification storage structures within the third-layer structure in the above S230 may include: partitioning the location identification information corresponding to each target data version in multiple target identification storage structures according to the partition query range carried in the search instruction.

[0127] In actual applications, for any source device, different data modification requirements correspond to different data modification locations. Naturally, there may be a need to modify data at intervals in the data stored in the source device. Correspondingly, the location identification information of two adjacent nodes in the third layer structure of the data organization structure may not be continuous. Therefore, it is necessary to find the location identification information of multiple node records through multiple queries to obtain the location identification information of the target difference data.

[0128] In an embodiment of the present application, at least one node in the target identification storage structure can be searched for in partitions at one time to improve the accuracy of the query result. Optionally, the partition query range can be pre-defined or determined based on historical experience values, but in an embodiment of the present application, the search instruction carries the partition query range, and correspondingly, the partition query range is obtained by parsing the instruction information. Optionally, the partition query range can be understood as the partition length.

[0129] It should be noted here that for any target identification storage structure, the partition query range in each query process is the same, but the number of nodes included in two adjacent corresponding intervals may be equal or unequal. In practical applications, the location identification information (i.e., node information) of each node in each location identification storage structure in the third-layer structure may include an offset starting position and a number of data modifications, wherein the offset starting position and the number of data modifications are summed to obtain an offset ending position. Here, any position between the offset starting position and the offset ending position may be referred to as an offset position, and the offset starting position may be understood as a corresponding node recording the modification status of data stored in a plurality of consecutive offset positions starting from the corresponding offset position.

[0130] Exemplarily, if the minimum offset starting position in all node information included in the target identification storage structure 1 is 50, the starting storage position of the corresponding source device is 1, and the partition query range is 500, then in the first query, all nodes (including 2 nodes) with offset positions from 1 (i.e., the starting storage position) to 500 can be queried from each node in the target identification storage structure 1; in the second query, all nodes (including 4 nodes) with offset positions from 501 to 1000 can be queried from each node in the target identification storage structure 1; in the third query, all nodes (including 3 nodes) with offset positions from 1001 to 1500 can be queried from each node in the target identification storage structure 1; the interval division is similar, and all nodes that meet the interval range are found in each divided interval, and the position identification information of these nodes is used as the position identification information of the target difference data. It should be noted here that the starting storage position in the storage space of any source device starts from 1. An offset starting position of 1 represents storage position 1 (i.e., the starting storage position), and an offset starting position of 2 represents storage position 2. The offset here describes the offset relative to the storage position 0 before the starting storage position.

[0131] The technical solution in the embodiment of the present application partitions and queries the location identification information corresponding to each target data version in multiple target identification storage structures according to the partition query range carried in the search instruction; the above method can partition and query the location identification information that meets the conditions in each target identification storage structure according to the partition query range, which not only avoids the problem of high query complexity caused by a one-time query, but also improves the accuracy of the query results by distinguishing multiple queries.

[0132] In one embodiment, each location identification storage structure within the third layer structure in the above-mentioned data organization structure is constructed based on multiple bitmap nodes and multiple interval nodes; the location identification information of each bitmap node includes the location information of different difference data, and the location identification information of each interval node includes the location interval information of different difference data.

[0133] In practical applications, each location identifier storage structure in the third layer structure is composed of multiple nodes, and the node characteristics of each node may be the same or different. Each location identifier storage structure may include multiple bitmap nodes with bitmap characteristics and multiple interval nodes with interval characteristics.

[0134] In the embodiment of the present application, the location identification information of each graph node may include the location information of different difference data; the location identification information of each interval node may include the location interval information of different difference data. Wherein, the above-mentioned location information and location interval information both include the corresponding offset starting position.

[0135] Exemplarily, FIG6 is a location identification storage structure within the third layer structure, namely, a variant interval tree, which conforms to the rules of a red-black tree, and the leaf nodes of the variant interval tree are all empty nodes (not shown in the figure), and the nodes carrying the identifier B in the variant interval tree are bitmap nodes, and the nodes carrying the identifier E are interval nodes; the location identification information of any node in the variant interval tree may include the offset starting position, the node characteristic identifier (B or E), and the modification status of multiple consecutive data blocks after the offset starting position.

[0136] Taking the interval node (node ​​E) with an offset starting position of 10240 as an example, the 64 recorded in the interval node indicates that the 32 data blocks starting from the offset starting position 10240 have been modified (that is, there are difference data in the storage locations of the 32 data blocks starting from the offset starting position), where the length of each data block is 8 bits; taking the bitmap node (node ​​B) with an offset starting position of 4096 as an example, the 0xFF recorded in the bitmap node is converted into binary and is equal to data A (8 1s, that is, 11111111), and 24 0s are added to the front of the data A to wait for data B (24 0s + 8 1s), and the 0 and 1 in the data B respectively represent the modification status of each data block in the 32 data blocks starting from the offset starting position 4096, 1 ​​indicates that it has been modified, and 0 indicates that it has not been modified; the understanding of the position identification information of other interval nodes and bitmap nodes in the variant interval tree is similar.

[0137] According to the technical solution in the embodiment of the present application, each location identification storage structure in the third-layer structure in the data organization structure is composed of multiple bitmap nodes and multiple interval nodes, and the location identification information of each bitmap node includes the location information of different difference data, and the location identification information of each interval node includes the location interval information of different difference data; the third-layer structure in the above method records the location identification information of different difference data through a mixed node of bitmap nodes and interval nodes, which can ensure that the location identification information of different difference data is fully recorded, while reducing the number of nodes for recording the location identification information and the number of layers of the location identification storage structure, so as to prepare for the subsequent improvement of the query speed and query efficiency of the location identification information, and on the basis of ensuring that the number of layers of the location identification storage structure is small, it can also reduce the storage space occupied by the computer device for storing the data organization structure, and can reduce the resource consumption required for the query in the subsequent query process.

[0138] The generation process of the data organization structure is described below. In one embodiment, as shown in FIG7 , the generation process of the data organization structure can be implemented in the following manner:

[0139] S400 , in the case of storage data backup, obtaining key value (KV) information of different difference data generated before and after the storage data backup.

[0140] In practical applications, data backup can be understood as the process of performing data snapshots on storage data. Specifically, for any source device, in the case of storage data backup of the source device, the source device can obtain the difference between the snapshot data generated when the storage data is backed up and the snapshot data generated last time, and obtain the difference data generated before and after the storage data backup. Different difference data can be generated before and after each storage data backup, and correspondingly, the key value information of each difference data can be obtained according to the snapshot data of each difference data.

[0141] Optionally, the key-value information of the above-mentioned difference data, i.e., KV information, may include the device identifier of the source device storing the difference data, the data version of the snapshot data generated after the storage data is backed up, and the offset position of the difference data in the storage space of the corresponding source device. Among them, the key-value information of the above-mentioned difference data can be stored in the disk of the source device where the difference data is located. It should be noted here that the key-value information in the disk is stored in chronological order. When the disk is full or the disk is about to reach a full state, the oldest version first elimination strategy can be adopted to process the key-value information stored in the disk, that is, to eliminate or delete some of the key-value information that is stored first.

[0142] Specifically, in the case of storing data backup, the computer device may traverse the information stored in the disk of each source device to obtain all key-value information stored in the disk at the current moment.

[0143] S500: According to each key value information, a first layer structure, a second layer structure and a third layer structure are sequentially constructed to generate a data organization structure.

[0144] Furthermore, according to the device identification, data version and offset position in each key value information, the first layer structure, the second layer structure and the third layer structure can be constructed in sequence to generate a data organization structure, and the data organization structure can be stored in the memory to improve the query speed and efficiency in subsequent applications. In the embodiment of the present application, the above-mentioned first layer structure can be called the device layer, the second layer structure can be called the data version layer, and the third layer structure can be called the location identification information layer.

[0145] In one embodiment, the computer device can pre-train an algorithm model, and then input each key value information into the algorithm model, and the algorithm model sequentially constructs the first layer structure, the second layer structure and the third layer structure and then outputs the data organization structure.

[0146] In another embodiment, the computer device may call a data organization structure construction tool to sequentially construct a first layer structure, a second layer structure, and a third layer structure according to each key value information to generate a data organization structure.

[0147] It should be noted that after the computer device is shut down or fails, the data in the memory will disappear. After the computer is restarted or the failure is recovered, the data organization structure in the memory of the computer device will also disappear. In this case, the computer device can rebuild the data organization structure by executing the steps in S400-S500 above. In addition, after the computer device starts to start, during the data backup process of each source device, the computer device can directly build the first layer structure, the second layer structure and the third layer structure according to the generated KV information, and then store each KV information in the disk of the corresponding source device.

[0148] The technical solution in the embodiment of the present application, when storing data backup, obtains the key value information of different difference data generated before and after the storage data backup, and constructs the first layer structure, the second layer structure and the third layer structure in sequence according to each key value information to generate a data organization structure; the above method can construct a multi-level structure in a layer-by-layer manner to generate a data organization structure, which can improve the correctness of the generated data organization structure.

[0149] The following is an explanation of the process of sequentially constructing the first layer structure, the second layer structure and the third layer structure according to the key value information to generate the data organization structure. In one embodiment, the key value information includes the corresponding relationship between the device identification to which the corresponding difference data belongs, the data version of the device executing the data backup and the location identification information; as shown in FIG8, the steps in S500 above can be implemented in the following manner:

[0150] S510: Store different device identifiers in the form of an information table to generate a first layer structure.

[0151] Specifically, the computer device can store the device identifications of different source devices in the form of arrays, lists, etc. to generate the first layer structure. In the embodiment of the present application, different device identifications are stored in the form of information tables, and the above information table can be a hash table.

[0152] S520, associating each data version with the corresponding device identifier in the first layer structure, and establishing a data version storage structure for each data version under the corresponding device identifier to generate a second layer structure; the second layer structure includes multiple nodes, and the node information of each node is the corresponding data version.

[0153] Specifically, all data versions in each key value information may be associated with the corresponding device identification in the first layer structure. For any device identification, a data version storage structure corresponding to all data versions associated with it is established under the device identification to generate a second layer structure.

[0154] In an embodiment of the present application, the above-mentioned data version storage structure is a red-black tree; when constructing a red-black tree under any device identifier, a red-black tree can be constructed according to the rules of the red-black tree and based on all data versions associated with the device identifier; wherein each node in the red-black tree represents a data version, and the red-black tree can include the starting data version and the ending data version of the corresponding source device.

[0155] S530: Associating each piece of location identification information with a corresponding node in the second layer structure, and establishing a location identification storage structure for each piece of location identification information under the corresponding node in the second layer structure to generate a third layer structure.

[0156] Among them, the computer device can generate corresponding multiple position identification information according to the offset position in each key value information; one position identification information can correspond to the offset position in at least one key value information.

[0157] Specifically, based on the acquired location identification information, each location identification information can be associated with the corresponding data version (i.e., node) in the second layer structure. For any node in the second layer structure, a location identification storage structure corresponding to all location identification information associated with it is established under the node in the second layer structure to generate a third layer structure.

[0158] It should be noted here that when the memory space for storing the data organization structure is greater than the preset memory space threshold, it indicates that the memory space for storing the data organization structure is full or is about to reach a full memory state. At this time, the oldest version first elimination strategy can be adopted to process each location identifier storage structure in the third-layer structure, that is, a preset number of nodes with a top ranking in each location identifier storage structure in the third-layer structure are eliminated or deleted, that is, the location identifier information recorded in these nodes in each location identifier storage structure is deleted.

[0159] The technical solution in the embodiment of the present application uses an information table to store different device identifiers to generate a first-level structure, associates each data version with the corresponding device identifier in the first-level structure, and establishes a data version storage structure for each data version under the corresponding device identifier to generate a second-level structure, associates each location identification information with the corresponding node in the second-level structure, and then establishes a location identification storage structure for each location identification information under the corresponding node in the second-level structure to generate a third-level structure; the above method can construct a multi-layer structure with an associated relationship in a layer-by-layer manner to generate a data organization structure, which can improve the correctness of the generated data organization structure, and on this basis, can provide effective reference information for subsequent quick queries.

[0160] In one embodiment, before generating the data organization structure, as shown in FIG9 , the method may further include the following steps:

[0161] S540: For any two adjacent nodes in any location identifier storage structure in the third layer structure, determine whether the two adjacent nodes are in an adjacency relationship according to location identifier information of the two adjacent nodes.

[0162] In practical applications, when the third layer structure is generated, for any two adjacent nodes in any location identifier storage structure in the third layer structure, it can be determined whether the two adjacent nodes are in an adjacency relationship based on the location identifier information of the two adjacent nodes.

[0163] In one implementation method, each offset position can be obtained from the location identification information of two adjacent nodes. If the boundary offset position in any location identification information is adjacent to the boundary offset position in the other location identification information, it is determined that the two adjacent nodes are in an adjacent relationship; if the boundary offset position in any location identification information is not adjacent to the boundary offset position in the other location identification information, it is determined that the two adjacent nodes are in a non-adjacent relationship.

[0164] In another way, an algorithm model may be pre-trained, and then the location identification information of two adjacent nodes may be input into the algorithm model, and the algorithm model outputs whether there is an adjacency relationship between the two adjacent nodes.

[0165] S550: If yes, merge the location identification information of two adjacent nodes, and balance the merged location identification storage structure to generate a data organization structure.

[0166] Specifically, when it is determined that two adjacent nodes are in an adjacency relationship, the position identification information of the two adjacent nodes can be merged, and the merged position identification storage structure can be balanced to generate a data organization structure. Optionally, the above-mentioned balancing process can be left-handed, right-handed and white data.

[0167] The technical solution in the embodiment of the present application determines, for any two adjacent nodes in any location identification storage structure within the third-layer structure, whether the two adjacent nodes are in an adjacency relationship based on the location identification information of the two adjacent nodes, and when the two adjacent nodes are in an adjacency relationship, merges the location identification information of the two adjacent nodes, and balances the merged location identification storage structure to generate a data organization structure; in the process of generating the data organization structure, the above method can merge nodes, thereby reducing the number of nodes in the location identification storage structure, and balances the merged location identification storage structure to reduce the level of the location identification storage structure, so that the number of nodes and the number of levels in the finally generated data organization structure are as small as possible, so as to prepare for the subsequent improvement of query speed and efficiency.

[0168] In actual applications, the data stored on any source device may be modified in real time, so it is not necessary to update the data organization structure to ensure the accuracy of subsequent query results. In one embodiment, as shown in FIG10 , the above method may further include the following steps:

[0169] S600 , in response to an instruction to update the data organization structure, obtain new key value information of new difference data generated before and after the data backup is stored.

[0170] Specifically, the computer device may periodically trigger an update instruction of the data organization structure, or receive an update instruction of the data organization structure input from the outside. Further, the computer device may respond to the update instruction of the data organization structure and obtain new key value information of new difference data generated before and after the storage data backup. Optionally, the new difference data may be one or more, and correspondingly, the new key value information may also be one or more.

[0171] S700: Update the data organization structure according to the new key value information.

[0172] Furthermore, based on any new key value information obtained in the previous steps, the data organization structure can be updated according to the new key value information.

[0173] In one embodiment, the method of updating the data organization structure according to the new key value information may be to generate a new node according to the new key value information and insert it into the data organization structure to complete the update of the data organization structure.

[0174] In another embodiment, the data organization structure may be updated according to the new key value information by merging the new key value information with the existing information in the data organization structure to complete the update of the data organization structure.

[0175] The technical solution in the embodiment of the present application responds to the update instruction of the data organization structure, obtains the new key value information of the new difference data generated before and after the storage data backup, and updates the data organization structure according to the new key value information; the above method can update the data organization structure to prepare for improving the accuracy of the query results in subsequent query processes.

[0176] In one embodiment, the new key value information includes new location identification information, and the third layer structure in the data organization structure does not include the new location identification information; the step of updating the data organization structure according to the new key value information in the above S700 may include: if there is overlap between the new location identification information and the existing location identification information in the third layer structure, then the new location identification information is merged with the overlapping location identification information in the third layer structure to complete the update of the data organization structure.

[0177] Specifically, the computer device can obtain the existing location identification information in the third-layer structure, determine whether there is overlap between the new location identification information and the existing location identification information, and if so, merge the new location identification information with the overlapping location identification information in the third-layer structure to complete the update of the data organization structure.

[0178] In one implementation, for any existing location identification information, the offset positions in the location identification information and the new location identification information can be obtained to determine whether there is at least one identical offset position between the offset position in the location identification information and the offset position in the new location identification information. If so, there is an overlap between the location identification information and the new location identification information.

[0179] In another implementation, for any existing location identification information, it can also be determined whether the location identification information and the new location identification information have the same characters. If so, it is determined that there is overlap between the location identification information and the new location identification information.

[0180] According to the technical solution in the embodiment of the present application, if there is overlap between the new location identification information of the new difference data and the existing location identification information in the third-layer structure, the new location identification information is merged with the overlapping location identification information in the third-layer structure to complete the update of the data organization structure; the above method can update the data organization structure to prepare for improving the accuracy of the query results in subsequent query processes, and the update process is relatively simple and does not require the participation of complex algorithms, thereby improving the update speed and efficiency of the data organization structure.

[0181] In one embodiment, the new key value information includes new location identification information; as shown in FIG. 11 , the step of updating the data organization structure according to the new key value information in S700 can be implemented in the following manners:

[0182] S710: If there is no overlap between the new location identification information and the existing location identification information in the third layer structure in the data organization structure, insert a new node in the third layer structure according to the new location identification information.

[0183] In practical applications, if there is no overlap between the new location identification information and the existing location identification information in the third-layer structure, a new node can be generated according to the new location identification information and inserted into the third-layer structure.

[0184] Among them, the method of generating a new node according to the new position identification information and inserting it into the third-layer structure can be to determine the insertion position of the new node in the third-layer structure according to the offset position in the new position identification information and the offset positions in the existing position identification information in the third-layer structure, and insert the new position identification information as the node information of the new node into the third-layer structure according to the insertion position.

[0185] In addition, a method for generating a new node based on the new location identification information and inserting it into the third layer structure can also be to pre-train an algorithm model, and then input the new location identification information into the algorithm model, and the algorithm model outputs the location identification storage structure after the new node is inserted.

[0186] Exemplarily, if the offset position in the new location identification information is 2048, and the offset positions in the location identification information of two adjacent nodes (node ​​1 and node 2) stored in the location identification storage structure 1 within the third-layer structure are 2001 and 2064 respectively, then since 2048 is greater than 2001 and less than 2064, at this time, the new location identification information can be inserted as a new node between node 1 and node 2.

[0187] S720: Perform a balancing process on the location identifier storage structure after the new node is inserted to complete the update of the data organization structure.

[0188] Furthermore, the location identifier storage structure after the new node is inserted may be balanced to complete the update of the data organization structure.

[0189] The technical solution in the embodiment of the present application, when there is no overlap between the new location identification information of the new difference data and the existing location identification information in the third layer structure of the data organization structure, inserts a new node in the third layer structure according to the new location identification information, and balances the location identification storage structure after the new node is inserted to complete the update of the data organization structure; the above method can update the data organization structure to prepare for improving the accuracy of the query results in the subsequent query process, and the update process is relatively simple and does not require the participation of complex algorithms, thereby improving the update speed and update efficiency of the data organization structure; at the same time, the above method can balance the location identification storage structure for inserting the new node, and can reduce the level of the location identification storage structure in the data organization structure generated after the update, so that the number of nodes and the number of levels in the finally generated data organization structure are as small as possible, which can prepare for the subsequent improvement of query speed and efficiency to a great extent.

[0190] The process of searching for target difference data according to the location identification information is described below. In one embodiment, as shown in FIG. 12 , the step of searching for target difference data according to the location identification information in S300 can be implemented in the following manner:

[0191] S310: Determine a target offset position range according to position identification information corresponding to the target difference data.

[0192] Specifically, the computer device may obtain each offset position in the position identification information corresponding to the target difference data, and determine at least one offset position range as the target offset position range according to each offset position. It should be noted that the multiple offset positions included in each offset position range are continuous.

[0193] S320: Determine multiple target storage locations in storage locations of different difference data according to the target offset position range.

[0194] In practical applications, the computer device may determine multiple target storage locations in storage locations of different difference data according to each offset position in the target offset position range.

[0195] It should be noted that the offset positions in the target offset position range may be offset positions under the same source device or offset positions under different source devices. Specifically, the computer device may search for corresponding offset positions in storage positions of the source device according to the offset positions corresponding to the same source device in the target offset position range, and determine the storage positions matching the offset positions as the target storage positions.

[0196] S330: Determine the difference data stored in each target storage location as target difference data.

[0197] The different target storage locations may be different storage locations in at least one source device. Specifically, the computer device may obtain the difference data stored in each target storage location, and determine the difference data stored in each target storage location as the target difference data.

[0198] The technical solution in the embodiment of the present application determines the target offset position range according to the position identification information corresponding to the target difference data, determines multiple target storage positions in the storage positions of different difference data according to the target offset position range, and determines the difference data stored in each target storage position as the target difference data; the above method can obtain the target difference data according to the position identification information corresponding to the target difference data, the processing process is relatively simple, and does not require the participation of complex algorithms, thereby improving the search speed and efficiency of the target difference data.

[0199] In one embodiment, the present application also provides a data search method, which is applied to a computer device, and the method includes the following process:

[0200] (1) in response to a search instruction for target difference data, obtaining instruction information carried in the search instruction;

[0201] (2) Parse the instruction information and obtain the data version range corresponding to the device identification and target difference data;

[0202] (3) searching the information table in the first layer of the data organization structure for a device identifier that matches the device identifier carried in the search instruction;

[0203] (4) querying a plurality of target data versions within a data version range in a target version storage structure within a second-level structure of the data organization structure; wherein the target version storage structure is associated with a matching device identifier within the first-level structure;

[0204] (5) According to the partition query range carried in the search instruction, partition query the location identification information corresponding to each target data version in multiple target identification storage structures in the third layer structure of the data organization structure; wherein the multiple target identification storage structures are associated with the multiple target data versions in the second layer structure; the data organization structure is a multi-level structure composed of different device identifications, data versions under different devices, and location identification information of difference data between each data version;

[0205] The generation process of the above data organization structure includes:

[0206] (6) In the case of storage data backup, obtaining key value information of different difference data generated before and after the storage data backup;

[0207] (7) Using information tables to store different device identifiers and generate the first layer structure;

[0208] (8) Associating each data version with the corresponding device identifier in the first layer structure, and establishing a data version storage structure for each data version under the corresponding device identifier to generate a second layer structure; the second layer structure includes multiple nodes, and the node information of each node is the corresponding data version;

[0209] (9) Associating each piece of location identification information with a corresponding node in the second-layer structure, and establishing a location identification storage structure for each piece of location identification information under the corresponding node in the second-layer structure;

[0210] (10) For any two adjacent nodes in any location identifier storage structure in the third layer structure, determine whether the two adjacent nodes are in an adjacency relationship based on the location identifier information of the two adjacent nodes;

[0211] (11) If yes, merge the location identification information of the two adjacent nodes, and balance the merged location identification storage structure to generate a data organization structure;

[0212] (12) in response to the data organization structure update instruction, obtaining new key value information of new difference data generated before and after the storage data backup;

[0213] (13) Update the data organization structure based on the new key value information;

[0214] The above step (13) can be implemented in two ways:

[0215] If the new key value information includes new location identification information, and the third layer structure in the data organization structure does not include the new location identification information, the first method may include:

[0216] (131) If there is overlap between the new location identification information and the existing location identification information in the third-level structure, the new location identification information is merged with the overlapping location identification information in the third-level structure to complete the update of the data organization structure;

[0217] If the new key value information includes new location identification information, the second method may include:

[0218] (132) If there is no overlap between the new location identification information and the existing location identification information in the third layer structure in the data organization structure, insert a new node in the third layer structure according to the new location identification information;

[0219] (133) Balancing the location identifier storage structure after inserting the new node to complete the update of the data organization structure;

[0220] (14) determining the target offset position range according to the position identification information corresponding to the target difference data;

[0221] (15) determining a plurality of target storage locations in storage locations of different difference data according to the target offset position range;

[0222] (16) The difference data stored in each target storage location is determined as the target difference data.

[0223] The execution process of the above (1) to (16) can be specifically referred to the description of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.

[0224] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0225] Based on the same inventive concept, the embodiment of the present application also provides a data search device for implementing the data search method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data search device embodiments provided below can refer to the limitations on the data search method above, and will not be repeated here.

[0226] In one embodiment, FIG13 is a schematic diagram of the structure of a data search device in an embodiment of the present application. The data search device provided in the embodiment of the present application can be applied to a computer device. As shown in FIG13, the data search device in the embodiment of the present application may include: a first acquisition module 11, an information query module 12 and a data search module 13, wherein:

[0227] A first acquisition module 11 is used to respond to a search instruction for target difference data and acquire a device identifier carried in the search instruction and a data version range corresponding to the target difference data;

[0228] The information query module 12 is used to query the location identification information corresponding to the target difference data in the pre-generated data organization structure according to the device identification and the data version range; the data organization structure is a multi-level structure composed of different device identifications, data versions under different devices and location identification information of the difference data between each data version;

[0229] The data search module 13 is used to search for the target difference data according to the position identification information corresponding to the target difference data.

[0230] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0231] In one embodiment, the first acquisition module 11 includes: an instruction information acquisition unit and a parsing unit, wherein:

[0232] An instruction information acquisition unit, used to acquire instruction information carried in a search instruction;

[0233] The parsing unit is used to parse the instruction information and obtain the data version range corresponding to the device identification and the target difference data.

[0234] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0235] In one embodiment, the information query module 12 includes: a query unit, wherein:

[0236] A query unit, used to query the data organization structure for location identification information that satisfies the device identification and data version range in accordance with the hierarchical order of the data organization structure;

[0237] Among them, each location identification storage structure in the third layer structure in the data organization structure is composed of multiple bitmap nodes and multiple interval nodes; the location identification information of each bitmap node includes the location information of different difference data, and the location identification information of each interval node includes the location interval information of different difference data.

[0238] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0239] In one embodiment, the data organization structure includes a first layer structure, a second layer structure and a third layer structure; the query unit includes: a first query sub-unit, a second query sub-unit and a third query sub-unit, wherein:

[0240] A first query subunit, configured to query the information table in the first layer structure for a device identifier that matches the device identifier carried in the search instruction;

[0241] A second query subunit is used to query a plurality of target data versions within a data version range in a target version storage structure within a second layer structure; wherein the target version storage structure is associated with a matching device identifier within the first layer structure;

[0242] The third query subunit is used to query the location identification information corresponding to each target data version in the multiple target identification storage structures in the third layer structure; wherein the multiple target identification storage structures are associated with the multiple target data versions in the second layer structure.

[0243] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0244] In one embodiment, the third query subunit is specifically used for:

[0245] According to the partition query range carried in the search instruction, the location identification information corresponding to each target data version is partitioned and searched in multiple target identification storage structures.

[0246] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0247] In one embodiment, the data search device includes: a second acquisition module and an organizational structure generation module, wherein:

[0248] The second acquisition module is used to acquire key value information of different difference data generated before and after the storage data backup in the case of storage data backup;

[0249] The organizational structure generation module is used to construct the first layer structure, the second layer structure and the third layer structure in sequence according to each key value information to generate a data organizational structure.

[0250] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0251] In one embodiment, the key value information includes a correspondence between a device identifier to which the corresponding difference data belongs, a data version of the device executing data backup, and location identifier information; the organizational structure generation module includes: a first generation unit, a second generation unit, and a third generation unit, wherein:

[0252] A first generating unit, configured to store different device identifiers in the form of an information table to generate a first layer structure;

[0253] The second generating unit is used to associate each data version with the corresponding device identifier in the first layer structure, and establish a data version storage structure for each data version under the corresponding device identifier to generate a second layer structure; the second layer structure includes a plurality of nodes, and the node information of each node is the corresponding data version;

[0254] The third generating unit is used to associate each location identification information with a corresponding node in the second layer structure, and to establish a location identification storage structure for each location identification information under the corresponding node in the second layer structure to generate a third layer structure.

[0255] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0256] In one embodiment, the organizational structure generation module further includes: a determination unit and an information merging unit, wherein:

[0257] A determination unit, configured to determine, for any two adjacent nodes in any location identifier storage structure in the third layer structure, whether the two adjacent nodes are in an adjacency relationship according to location identifier information of the two adjacent nodes;

[0258] The information merging unit is used to merge the location identification information of two adjacent nodes when there is an adjacency relationship between the two adjacent nodes, and to balance the merged location identification storage structure to generate a data organization structure.

[0259] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0260] In one embodiment, the data search device further includes: an instruction response module and an update module, wherein:

[0261] An instruction response module, used to respond to the update instruction of the data organization structure and obtain new key value information of new difference data generated before and after the storage data backup;

[0262] The update module is used to update the data organization structure according to the new key value information.

[0263] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0264] In one embodiment, the new key value information includes new location identification information, and the third layer structure in the data organization structure does not include the new location identification information; the update module includes: an update unit, wherein:

[0265] The updating unit is used to merge the new location identification information with the overlapping location identification information in the third layer structure when there is overlap between the new location identification information and the existing location identification information in the third layer structure, so as to complete the update of the data organization structure.

[0266] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0267] In one embodiment, the new key value information includes new location identification information; the update module includes: a node insertion unit and a balance processing unit, wherein:

[0268] A node insertion unit, used for inserting a new node in the third layer structure according to the new location identification information when there is no overlap between the new location identification information and the existing location identification information in the third layer structure in the data organization structure;

[0269] The balancing processing unit is used to perform balancing processing on the location identification storage structure after the new node is inserted to complete the update of the data organization structure.

[0270] The data search device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data search method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.

[0271] For the specific definition of the data search device, please refer to the definition of the data search method above, which will not be repeated here. Each module in the above data search device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0272] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG14. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide processing capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a data organization structure. The network interface of the computer device is used to communicate with an external endpoint via a network connection. When the computer program is executed by the processor, a data search method is implemented.

[0273] Those skilled in the art will understand that the structure shown in FIG. 14 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. Specifically, the computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0274] In one embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the technical solution in the above-mentioned data search method embodiment of the present application is implemented, and its implementation principle and technical effect are similar and will not be repeated here.

[0275] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the above-mentioned data search method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0276] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the technical solution of the above-mentioned data search method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.

[0277] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0278] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0279] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A data search method, characterized in that: The method comprises: In response to a search instruction for target difference data, obtaining a device identifier carried in the search instruction and a data version range corresponding to the target difference data; According to the device identification and the data version range, query the location identification information corresponding to the target difference data in the pre-generated data organization structure; the data organization structure is a multi-level structure composed of different device identifications, data versions under different devices and location identification information of the difference data between the data versions; The target difference data is searched for according to the position identification information corresponding to the target difference data.

2. The method according to claim 1, characterized in that The obtaining of the device identification carried in the search instruction and the data version range corresponding to the target difference data includes: Obtaining instruction information carried in the search instruction; The instruction information is parsed to obtain the data version range corresponding to the device identification and the target difference data.

3. The method according to claim 1 or 2, characterized in that: The querying, in a pre-generated data organization structure according to the device identifier and the data version range, of location identifier information corresponding to the target difference data includes: According to the hierarchical order of the data organization structure, the data organization structure is searched for location identification information that satisfies the device identification and the data version range.

4. The method according to claim 3, characterized in that The data organization structure includes a first layer structure, a second layer structure and a third layer structure; and searching the data organization structure for location identification information that satisfies the device identification and the data version range according to the hierarchical order of the data organization structure, including: Searching the information table in the first layer structure for a device identification that matches the device identification carried in the search instruction; Querying a plurality of target data versions within the data version range in a target version storage structure within the second layer structure; wherein the target version storage structure is associated with a matching device identifier within the first layer structure; The location identification information corresponding to each of the target data versions is queried in the multiple target identification storage structures in the third layer structure; wherein the multiple target identification storage structures are associated with the multiple target data versions in the second layer structure.

5. The method according to claim 4, characterized in that The step of searching for location identification information corresponding to each target data version in the plurality of target identification storage structures in the third layer structure includes: According to the partition query range carried in the search instruction, the location identification information corresponding to each of the target data versions is partitioned and searched in the plurality of target identification storage structures.

6. The method according to claim 1 or 2, characterized in that: Each location identification storage structure within the third layer structure in the data organization structure is composed of multiple bitmap nodes and multiple interval nodes; the location identification information of each bitmap node includes the location information of different difference data, and the location identification information of each interval node includes the location interval information of different difference data.

7. The method according to claim 1 or 2, characterized in that: The process of generating the data organization structure includes: In the case of storage data backup, obtaining key value information of different difference data generated before and after the storage data backup; According to each of the key value information, a first layer structure, a second layer structure and a third layer structure are sequentially constructed to generate the data organization structure.

8. The method according to claim 7, characterized in that The key value information includes a corresponding relationship between the device identifier to which the corresponding difference data belongs, the data version of the device executing the data backup, and the location identifier information; The step of sequentially constructing a first layer structure, a second layer structure, and a third layer structure according to each of the key value information to generate the data organization structure includes: The first layer structure is generated by storing different device identifiers in the form of an information table; Associating each of the data versions with the corresponding device identifier in the first layer structure, and establishing a data version storage structure for each of the data versions under the corresponding device identifier to generate the second layer structure; the second layer structure includes a plurality of nodes, and the node information of each of the nodes is the corresponding data version; Each piece of the location identification information is associated with a corresponding node in the second layer structure, and a location identification storage structure for each piece of the location identification information is established under the corresponding node in the second layer structure to generate the third layer structure.

9. The method according to claim 7, characterized in that: Before generating the data organization structure, the method further includes: For any two adjacent nodes in any location identifier storage structure in the third layer structure, determine whether there is an adjacency relationship between the two adjacent nodes according to the location identifier information of the two adjacent nodes; If so, the location identification information of the two adjacent nodes is merged, and the merged location identification storage structure is balanced to generate the data organization structure.

10. The method according to claim 1 or 2, characterized in that: The method further comprises: In response to the update instruction of the data organization structure, new key value information of new difference data generated before and after the storage data backup is obtained; The data organization structure is updated according to the new key value information.

11. The method according to claim 10, characterized in that The new key value information includes new location identification information, and the third layer structure in the data organization structure does not include the new location identification information; The updating of the data organization structure according to the new key value information includes: If there is overlap between the new location identification information and the existing location identification information in the third-level structure, the new location identification information is merged with the overlapping location identification information in the third-level structure to complete the update of the data organization structure.

12. The method according to claim 10, characterized in that The new key value information includes new location identification information; and updating the data organization structure according to the new key value information includes: If there is no overlap between the new location identification information and the existing location identification information in the third layer structure in the data organization structure, inserting a new node in the third layer structure according to the new location identification information; The location identifier storage structure after the new node is inserted is balanced to complete the update of the data organization structure.

13. The method according to claim 1 or 2, characterized in that: The searching the target difference data according to the position identification information corresponding to the target difference data includes: Determine the target offset position range according to the position identification information corresponding to the target difference data; Determining a plurality of target storage locations in storage locations of different difference data according to the target offset position range; The difference data stored in each of the target storage locations is determined as target difference data.

14. A data search device, characterized in that: The device comprises: A first acquisition module, configured to respond to a search instruction for target difference data and acquire a device identifier carried in the search instruction and a data version range corresponding to the target difference data; An information query module, used to query the location identification information corresponding to the target difference data in a pre-generated data organization structure according to the device identification and the data version range; the data organization structure is a multi-level structure composed of different device identifications, data versions under different devices and location identification information of the difference data between the data versions; The data search module is used to search for the target difference data according to the position identification information corresponding to the target difference data.

15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 13 are implemented.