Data upgrading method and device

By converting the index structure, the data information is upgraded from a low-version search server to a high-version, which solves the complexity and low-efficiency problems of data upgrade across large versions, and achieves efficient and accurate data version upgrades.

CN112579117BActive Publication Date: 2024-08-23BEIJING GRIDSUM TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910944060.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-30
Publication Date
2024-08-23
Estimated Expiration
2039-09-30

AI Technical Summary

Technical Problem

Existing technology cannot effectively implement data upgrades across large versions, especially when the data on the search server needs to be upgraded from a lower version to a higher version. The differences in index structures lead to complex upgrade steps, low efficiency, and poor accuracy.

Method used

By determining the current version and the target version of the data to be upgraded, converting its index structure so that it adapts to the index structure of the target version, thereby writing the data information into the target index structure, the data version upgrade is completed. Specific steps include determining whether the index structures of the current and target versions are the same, and if they are different, perform conversion. The conversion relationship includes operations such as splitting and deletion to adapt to the index type of the target version.

Benefits of technology

It simplifies the data upgrade steps, improves the efficiency and accuracy of data upgrade, and realizes the effective upgrade of data with large version differences from a lower version to a higher version.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112579117B
    Figure CN112579117B
Patent Text Reader

Abstract

The present invention discloses a data upgrade method and device. The method comprises: determining the current version of the data to be upgraded and the target version to which the data to be upgraded needs to be upgraded; determining the target index structure of the data to be upgraded in the target version according to the current version and the target version; the data to be upgraded includes the index structure and data information; and writing the data information of the data to be upgraded into the target index structure to complete the data version upgrade. The present invention solves the technical problem that data upgrade with large version differences cannot be realized in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a data upgrading method and device. Background Art

[0002] Currently, mainstream versions of search servers generally have multiple version series. If there is a business need to upgrade the data of the above search server from a lower version to a higher version, the data upgrade that does not span major versions in the middle can be directly backed up and restored using snapshot technology. However, when the version to be upgraded spans one or more major versions, the above snapshot technology method is not applicable. In addition, the index structures supported by different version series of the above search service data are also different, resulting in complex steps, low efficiency, and poor accuracy in upgrading data with large version differences.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present invention provide a data upgrade method and device to at least solve the technical problem in the related art that data upgrade with large version differences cannot be implemented.

[0005] According to one aspect of an embodiment of the present invention, a data version upgrade method is provided, comprising: determining a current version of data to be upgraded, and a target version to which the data to be upgraded needs to be upgraded; determining a target index structure of the data to be upgraded in the target version based on the current version and the target version; wherein the data to be upgraded includes an index structure and data information; and writing the data information of the data to be upgraded into the target index structure to complete the data version upgrade.

[0006] Optionally, determining the target index structure of the target version of the data to be upgraded based on the current version and the target version includes: determining whether the index structure of the current version of the data to be upgraded is the same as the index structure of the target version; and if the index structure of the current version is different from the index structure of the target version, converting the index structure of the current version to the target index structure of the target version.

[0007] Optionally, it also includes: when the index structure of the current version is the same as the index structure of the target version, determining whether the current version and the target version are the same version; when the current version and the target version are the same version, using the index structure of the current version of the data to be upgraded as the target index structure; when the current version and the target version are different versions, converting the index structure of the current version into the target index structure of the target version.

[0008] Optionally, converting the index structure of the current version into the target index structure of the target version includes: converting the index structure of the data to be upgraded in the current version into index information of the target index structure of the target version; and creating the target index structure of the target version based on the index information.

[0009] Optionally, before converting the data to be upgraded from the index structure of the current version to the index information of the target index structure of the target version, the process includes: determining a conversion relationship between the index structure of the current version and the target index structure of the target version; and converting the index structure of the current version to the target index structure based on the conversion relationship.

[0010] Optionally, determining the conversion relationship between the index structure of the current version and the target index structure of the target version includes: when the index structure of the current version is a multi-class structure and the index structure of the target version is a single-class structure, the conversion relationship is to split the multi-class structure and convert it into multiple single-class structures; when the index structure of the current version is a multi-class structure and the index structure of the target version is a classless structure, the conversion relationship is to split the multi-class structure and convert it into multiple classless structures; when the index structure of the current version is a single-class structure and the index structure of the target version is a classless structure, the conversion relationship is to delete the single-class structure and convert it into a classless structure.

[0011] Optionally, before writing the data information of the data to be upgraded into the target index structure, the method includes: reading the data information of the data to be upgraded; and storing the data information.

[0012] According to another aspect of an embodiment of the present invention, a data version upgrade device is also provided, including: a first determination module, used to determine the current version of the data to be upgraded, and the target version to be upgraded to; a second determination module, used to determine the target index structure of the data to be upgraded in the target version based on the current version and the target version, wherein the data to be upgraded includes an index structure and data information; a writing module, used to write the data information of the data to be upgraded into the target index structure to complete the data version upgrade.

[0013] According to another aspect of an embodiment of the present invention, a storage medium is further provided, wherein the storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute any one of the above methods.

[0014] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute a data upgrade method as described in any one of the above.

[0015] In an embodiment of the present invention, a current version of the data to be upgraded and a target version to which the data to be upgraded need to be upgraded are determined; a target index structure of the target version of the data to be upgraded is determined based on the current version and the target version; wherein the data to be upgraded includes an index structure and data information; the data information of the data to be upgraded is written into the target index structure to complete the data version upgrade, and the index structure of the data of different versions is re-determined, so as to achieve the purpose of effectively upgrading the data from a lower version to a higher version, thereby realizing the technical effect of simplifying the data upgrade steps and improving the efficiency and accuracy of the data upgrade, thereby solving the technical problem that the data upgrade with large version differences cannot be achieved in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0017] Figure 1 is a flow chart of a data version upgrade method according to an embodiment of the present invention;

[0018] Figure 2 is a flowchart of upgrading es data according to an embodiment of the present invention;

[0019] Figure 3 It is a schematic diagram of a data version upgrading device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0022] According to an embodiment of the present invention, a method embodiment of a data version upgrade method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0023] Figure 1 is a flow chart of a data version upgrade method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0024] Step S102, determining the current version of the data to be upgraded and the target version to which the data to be upgraded needs to be upgraded;

[0025] Step S104, determining a target index structure of a target version of the data to be upgraded according to the current version and the target version, wherein the data to be upgraded includes an index structure and data information;

[0026] Step S106, writing the data information of the data to be upgraded into the target index structure to complete the data version upgrade.

[0027] Through the above steps, the current version of the data to be upgraded and the target version to which the data to be upgraded need to be upgraded are determined; according to the current version and the target version, the target index structure of the target version of the data to be upgraded is determined; wherein the data to be upgraded includes the index structure and data information; the data information of the data to be upgraded is written into the target index structure to complete the data version upgrade, and the index structure of the data of different versions is re-determined, so as to achieve the purpose of effectively upgrading the data from a lower version to a higher version, thereby realizing the technical effect of simplifying the data upgrade steps and improving the efficiency and accuracy of the data upgrade, thereby solving the technical problem that the related technology cannot realize the data upgrade with large version differences.

[0028] The data to be upgraded includes index structure and data information. The data information of different versions of data is the same, but the index structure is different. The data to be upgraded can be data applied to the target software. As the target software is upgraded and the version is updated, the data used also needs to be updated. Therefore, the current version of the data to be upgraded can be the current version of the target software corresponding to the data to be upgraded. The target version is not lower than the current version. In this embodiment, the data to be upgraded can be the es data of the elasticsearch search server.

[0029] The target version to which the data to be upgraded needs to be upgraded can be the target version to which the target software corresponding to the data to be upgraded needs to be upgraded, or the corresponding target software has been upgraded to the higher version, and then the data to be upgraded that is still in the lower version is upgraded. The higher version can be the target version, and the lower version can be the current version.

[0030] It should be noted that the above data to be upgraded may correspond to multiple versions, each version including multiple levels. The upgrade of the above data to be upgraded may be a level upgrade in the same version or a version upgrade in different versions.

[0031] The above-mentioned data to be upgraded include index structure and data information. The index structure is different between different versions of the data to be upgraded, but the data information is the same. Utilizing this feature, this embodiment separates the data to be upgraded and stores the index structure and data information separately. When the above-mentioned data to be upgraded needs to be upgraded, it is only necessary to determine whether the index structure before and after the upgrade has changed. Among them, when the level upgrade is performed in the same version, the index structure is the same.

[0032] Specifically, the target index structure of the target version of the data to be upgraded is determined based on the current version and the target version of the data to be upgraded. That is, it is determined based on whether the index structure will change when the data to be upgraded is upgraded. If the index structure does not change, the index structure of the data to be upgraded is directly used as the target index structure. If the index structure changes, the target index structure of the target version of the data to be upgraded is determined based on the current version and the target version of the data to be upgraded.

[0033] The data information of the data to be upgraded is written into the target index structure, and the index structure and the data information are merged to generate upgraded target data, thereby completing the data version upgrade. The data information can be stored in a stable memory and can be encrypted.

[0034] The above-mentioned determination of the current version of the data to be upgraded and the target version required for the upgrade may include, in specific implementation: determining the current version of the data to be upgraded, which is a first current version range or a second current version range, wherein the index structure of the data in the first current version range is a multi-class structure, the index structure of the data in the second current version range is a single-class structure, and the data version of the second current version range is higher than that of the first current version range; determining the target version, which is a first target version range, a second target version range or a third target version range, wherein the index structure of the data in the first target version range is a multi-class structure, the index structure of the data in the second target version range is a single-class structure, the third target version range is a classless structure, the data version of the third target version range is higher than that of the second target version range, and the data version of the second target version range is higher than that of the first target version range.

[0035] For example, the versions of es data of elasticsearch search server usually include 2.x, 5.x, 6.x, and 7.x version series. The 2.x version series supports multiple types for one index, the 5.x and 6.x version series only support a single type for one index, and 7.x supports a single type for one index or no type for one index. The above current version is a low version, the first current version range can be the 2.x version series, and the second current version range can be the 5.x version series and above. The above first target version range can be the 2.x version series, the second target version range can be the 5.x version series and the 6.x version series, and the third target version range can be the 7.x and above version series.

[0036] Determining the target index structure of the target version of the data to be upgraded based on the current version and the target version includes: determining whether the index structure of the current version of the data to be upgraded is the same as the index structure of the target version; if the index structure of the current version is different from the index structure of the target version, converting the index structure of the current version into the target index structure of the target version.

[0037] Optionally, it also includes determining whether the current version and the target version are the same version when the index structure of the current version is the same as the index structure of the target version; when the current version and the target version are the same version, using the index structure of the current version of the data to be upgraded as the target index structure; when the current version and the target version are different versions, converting the index structure of the current version into the target index structure of the target version.

[0038] It should be noted that the index structures of different versions can be different, for example, 2.x and 5.x, and the index structures of different versions can also be the same, for example, 5.x and 6.x. When the index structure of the current version is different from the index structure of the target version, the index structure of the current version is converted to the target index structure of the target version. When the index structure of the current version is the same as the index structure of the target version, it cannot be said that they are the same version. When the current version and the target version are different versions, the index structure of the current version is converted to the target index structure of the target version. The above-mentioned index structures are the same, and the same index structures in different master versions also need to be processed. For example, the original structure mapping is performed.

[0039] Converting the index structure of the current version to the target index structure of the target version includes: converting the index structure of the data to be upgraded in the current version to the index information of the target index structure of the target version; creating the target index structure of the target version according to the index information. Thus, the target index structure of the target version to be upgraded is effectively and quickly generated, thereby ensuring the upgrade of the target version.

[0040] Specifically, according to the index structure conversion adapter, the index structure of the data to be upgraded in the current version is converted into index information of the target index structure of the target version; and according to the index information, the target index structure of the target version is created.

[0041] Optionally, according to the index structure conversion adapter, before converting the index structure of the data to be upgraded in the current version into the index information of the target index structure of the target version, it includes: determining the conversion relationship between the index structure of the current version and the target index structure of the target version; and converting the index structure of the current version into the target index structure according to the conversion relationship.

[0042] The index structure of the current version can be modified according to the above conversion relationship so that the index structure of the current version can be applied to the index structure of the target version, thereby solving the problem in the related art that the current version cannot be directly upgraded to the target version with a different index structure.

[0043] Optionally, determining the conversion relationship between the index structure of the current version and the target index structure of the target version includes: when the index structure of the current version is a multi-class structure and the index structure of the target version is a single-class structure, the conversion relationship is splitting the multi-class structure and converting it into multiple single-class structures; when the index structure of the current version is a multi-class structure and the index structure of the target version is a classless structure, the conversion relationship is splitting the multi-class structure and converting it into multiple classless structures; when the index structure of the current version is a single-class structure and the index structure of the target version is a classless structure, the conversion relationship is deleting the single-class structure and converting it to a classless structure.

[0044] Specifically, determining the conversion relationship between the index structure of the current version and the target index structure of the target version includes: when the current version is within the first current version range, determining whether the target version is within a non-first target version range; when the target version is within a non-first target version range, determining the target version to be within the first target version range, the second target version range, or the third target version range; when the target version is within the first target version range, determining the conversion relationship to maintain the multi-class structure conversion; when the target version is within the second target version range, determining the conversion relationship to split the multi-class structure into a single-class structure for conversion; when the target version is within the third target version range, determining the conversion relationship to delete the multi-class structure for conversion into a classless structure.

[0045] For example, when upgrading from version 2.x to version 2.x+n (n is a positive integer), you need to keep the multi-type index structure as a multi-type index structure. When upgrading from version 2.x to version 5.x, you need to split the multi-type index structure into multiple single-type index structures. When upgrading from version 2.x to version 7.x, you need to delete the multi-type index structure and change it to a typeless index structure.

[0046] Determining the conversion relationship between the index structure of the current version and the target index structure of the target version includes: when the current version is within the second current version range, determining whether the target version is not within the first target version range; when the target version is not within the first target version range, determining the target version to be within the second target version range, or the third target version range; when the target version is within the second target version range, determining the conversion relationship to maintain the single-class structure conversion; when the target version is within the third target version range, determining the conversion relationship to delete the single-class structure and convert it to a classless structure.

[0047] For example, when upgrading from version 5.x to version 5.x+m (m is a positive integer), you need to keep the single-type index structure as a single-type index structure. When upgrading from version 5.x to version 7.x, you need to delete the single-type index structure and change it to a non-type index structure.

[0048] Optionally, before writing the data information of the data to be upgraded into the target index structure, the steps include: reading the data information of the data to be upgraded; and storing the data information.

[0049] It should be noted that this embodiment also provides an optional implementation, which is described in detail below.

[0050] At present, the mainstream versions of elasticsearch search server are about 2.x, 5.x, 6.x, and 7.x series. If there is a business demand to upgrade es data from 2.x to 5.x, 5.x to 6.x, and 6.x to 7.x series, this data upgrade that does not span major versions can be directly backed up and restored using snapshot technology. However, when the version to be upgraded spans one or more major versions, this method is not applicable. In addition, the es2.x series supports multiple types for one index, and 5.x and above only support a single type for one index. Therefore, when a 2.x series with multiple types of indexes is upgraded, the type can only be split and migrated to a higher version library through a program.

[0051] Fundamentally speaking, es data can be split into the index structure esmapping and the data itself (that is, the above data information). The above data itself can be output in json format, so the index structure is basically inconsistent between each major version. This technology implements the conversion adapter of each low version to the high version index structure. Special places like 2.x series multi-type index will become multi-index single type in other high versions to meet the upgrade requirements. The final data upgrade plan is to read the index information of the es cluster to be upgraded before the upgrade is initialized, and convert it to the required high version es index structure information through the mapping conversion adapter and create an index in the new high version cluster. Then the data reading program reads the index data to be upgraded and transmits it to the message queue. The data writing program subscribes to the corresponding message queue and writes it to the corresponding index of the specified new cluster, thereby completing the data upgrade.

[0052] The disadvantages of the prior art: the snapshot backup and restore method can only realize the data upgrade of two adjacent major versions, and cannot realize the data upgrade across major versions. This implementation method realizes the conversion adapter of each low version to each high version es index structure, thereby realizing the data upgrade across es major versions.

[0053] The key points of this implementation method include the following specific contents:

[0054] 1. Adapter for converting lower versions of es to higher versions of index structure.

[0055] 2. es index structure and data reading service.

[0056] 3. es index structure and data writing service.

[0057] Core principle: The es index structure and data reading service calls the es index structure conversion adapter to convert the upgraded index structure es index structure and data writing service into the upgraded index structure according to the es cluster and index information to be upgraded and the upgraded es cluster information passed in by the user to realize new index creation and data writing.

[0058] Introduction to the overall process: Figure 2 is a flowchart of upgrading es data according to an embodiment of the present invention, the flowchart is as follows Figure 2 As shown, this implementation only provides data es version upgrade and does not provide data es version downgrade service. It classifies and analyzes different versions of source es data and target es data, and analyzes the index structure according to the characteristics of each version. 2.x supports multiple types, 5.x and 6.x support single type, 7.x supports single type and the official recommendation is to abandon type. Therefore, this program has some strategies for type upgrade and index splitting during data upgrade. At the same time, the mapping conversion module of this program supports dimension type conversion during the upgrade of each version structure. The data upgrade program only needs to read the source index structure for conversion and create a new index on the target es cluster, and then read the source data and write the target index data.

[0059] This implementation method is to realize the adapter of converting the index structure of each lower version es to the index structure of each higher version es, which solves the problem that the traditional snapshot backup and restore method cannot meet the requirement of cross-large version es data upgrade.

[0060] Figure 3 is a schematic diagram of a data version upgrade device according to an embodiment of the present invention. Figure 3 As shown, according to another aspect of an embodiment of the present invention, a data version upgrade device is also provided, including: a first determination module 32, a second determination module 34 and a writing module 36. The device is described in detail below.

[0061] The first determination module 32 is used to determine the current version of the data to be upgraded and the target version to which the data to be upgraded needs to be upgraded; the second determination module 34 is connected to the above-mentioned first determination module 32, and is used to determine the target index structure of the target version of the data to be upgraded based on the current version and the target version; wherein the data to be upgraded includes an index structure and data information; the writing module 36 is connected to the above-mentioned second determination module 34, and is used to write the data information of the data to be upgraded into the target index structure to complete the data version upgrade.

[0062] Through the above-mentioned device, the first determination module 32 is used to determine the current version of the data to be upgraded, and the target version to which the data to be upgraded needs to be upgraded; the second determination module 34 determines the target index structure of the target version of the data to be upgraded based on the current version and the target version; wherein the data to be upgraded includes the index structure and data information; the writing module 36 writes the data information of the data to be upgraded into the target index structure, so as to complete the data version upgrade, and by re-determining the index structure of the data of different versions, the purpose of effectively upgrading the data from a lower version to a higher version is achieved, thereby realizing the technical effect of simplifying the data upgrade steps and improving the efficiency and accuracy of the data upgrade, thereby solving the technical problem that the related technology cannot realize the data upgrade with large version differences.

[0063] The above-mentioned data version upgrade device includes a processor and a memory. The above-mentioned first determination module 32, second determination module 34 and writing module 36 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0064] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set. By adjusting the kernel parameters, when the event of switching the system occurs, the target system can receive the message of switching system in time, and respond accurately.

[0065] According to another aspect of an embodiment of the present invention, a storage medium is provided, the storage medium including a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the above methods.

[0066] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein any one of the above methods is executed when the program is run.

[0067] According to another aspect of an embodiment of the present invention, an electronic device is provided, characterized in that the electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute any of the front-end system switching methods described above. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0068] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the following method steps:

[0069] Determine the current version of the data to be upgraded and the target version to which the data to be upgraded needs to be upgraded; determine the target index structure of the data to be upgraded in the target version based on the current version and the target version; wherein the data to be upgraded includes an index structure and data information; write the data information of the data to be upgraded into the target index structure to complete the data version upgrade.

[0070] Optionally, determining the target index structure of the target version of the data to be upgraded based on the current version and the target version includes: determining whether the index structure of the current version of the data to be upgraded is the same as the index structure of the target version; if the index structure of the current version is different from the index structure of the target version, converting the index structure of the current version into the target index structure of the target version.

[0071] Optionally, it also includes: when the index structure of the current version is the same as the index structure of the target version, determining whether the current version and the target version are the same version; when the current version and the target version are the same version, using the index structure of the current version of the data to be upgraded as the target index structure; when the current version and the target version are different versions, converting the index structure of the current version into the target index structure of the target version.

[0072] Optionally, converting the index structure of the current version into the target index structure of the target version includes: converting the index structure of the data to be upgraded in the current version into index information of the target index structure of the target version; and creating the target index structure of the target version according to the index information.

[0073] Optionally, before converting the index structure of the current version of the data to be upgraded into the index information of the target index structure of the target version, the process includes: determining a conversion relationship between the index structure of the current version and the target index structure of the target version; and converting the index structure of the current version into the target index structure according to the conversion relationship.

[0074] Optionally, determining the conversion relationship between the index structure of the current version and the target index structure of the target version includes: when the index structure of the current version is a multi-class structure and the index structure of the target version is a single-class structure, the conversion relationship is splitting the multi-class structure and converting it into multiple single-class structures; when the index structure of the current version is a multi-class structure and the index structure of the target version is a classless structure, the conversion relationship is splitting the multi-class structure and converting it into multiple classless structures; when the index structure of the current version is a single-class structure and the index structure of the target version is a classless structure, the conversion relationship is deleting the single-class structure and converting it to a classless structure.

[0075] Optionally, before writing the data information of the data to be upgraded into the target index structure, the steps include: reading the data information of the data to be upgraded; and storing the data information.

[0076] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0077] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0078] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0079] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0080] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0081] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0082] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0083] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0084] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A data version upgrade method, characterized in that: include: Determine the current version of the data to be upgraded and the target version to which the data to be upgraded needs to be upgraded; Determine, according to the current version and the target version, a target index structure of the data to be upgraded in the target version; wherein the data to be upgraded includes an index structure and data information; Writing the data information of the data to be upgraded into the target index structure to complete the data version upgrade; Wherein, determining the target index structure of the target version of the data to be upgraded according to the current version and the target version includes: Determine whether the index structure of the current version of the data to be upgraded is the same as the index structure of the target version; If the index structure of the current version is different from the index structure of the target version, converting the index structure of the current version into the target index structure of the target version; Converting the index structure of the current version into the target index structure of the target version includes: Converting the index structure of the current version of the data to be upgraded into index information of the target index structure of the target version; Creating the target index structure of the target version according to the index information; The step of converting the to-be-upgraded data into the index information of the target index structure of the target version includes: Determine a conversion relationship between the index structure of the current version and the target index structure of the target version; According to the conversion relationship, convert the index structure of the current version into the target index structure; Determining the conversion relationship between the index structure of the current version and the target index structure of the target version includes: When the index structure of the current version is a multi-class structure and the index structure of the target version is a single-class structure, the conversion relationship is to split the multi-class structure and convert it into multiple single-class structures; When the index structure of the current version is a multi-class structure and the index structure of the target version is a classless structure, the conversion relationship is to split the multi-class structure and convert it into multiple classless structures; When the index structure of the current version is a single-class structure and the index structure of the target version is a classless structure, the conversion relationship is to delete the single-class structure and convert it to a classless structure.

2. The method according to claim 1, characterized in that Also includes: In the case where the index structure of the current version is the same as the index structure of the target version, determining whether the current version and the target version are the same version; In the case where the current version and the target version are the same version, the index structure of the current version of the data to be upgraded is used as the target index structure; In the case that the current version and the target version are different versions, the index structure of the current version is converted into the target index structure of the target version.

3. The method according to any one of claims 1 to 2, characterized in that Before writing the data information of the data to be upgraded into the target index structure, the process includes: Reading data information of the data to be upgraded; The data information is stored.

4. A data version upgrade device, characterized in that: in, The device is used to execute the data version upgrade method according to claim 1, comprising: A first determination module is used to determine the current version of the data to be upgraded and the target version to be upgraded to; A second determination module is used to determine a target index structure of the data to be upgraded in the target version according to the current version and the target version, wherein the data to be upgraded includes an index structure and data information; A writing module, used to write the data information of the data to be upgraded into the target index structure to complete the data version upgrade; The data version upgrade device is further used to determine whether the index structure of the current version of the data to be upgraded is the same as the index structure of the target version; If the index structure of the current version is different from the index structure of the target version, converting the index structure of the current version into the target index structure of the target version; Converting the index structure of the current version into the target index structure of the target version includes: Converting the index structure of the current version of the data to be upgraded into index information of the target index structure of the target version; The target index structure of the target version is created according to the index information.

5. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 3.

6. An electronic device, comprising at least one processor, and at least one memory and bus connected to the processor; wherein: The processor and the memory communicate with each other via the bus; The processor is used to call the program instructions in the memory to execute the data version upgrade method as described in any one of claims 1 to 3.