Version control method, version control device, electronic device, computer-readable storage medium, and computer program
The version control method ensures data version consistency by increment processing and loading data into item tables, addressing the lack of consistency in existing systems and enhancing data loading accuracy for investment promotion guidance.
Patent Information
- Application Number
- JP2024573761
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-07-01
- Filing Date
- 2023-06-13
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2043-06-13
AI Technical Summary
Existing systems lack a method to ensure consistency between data versions and data packet versions during the loading process, which is crucial for accurate investment promotion guidance in commodity operations.
A version control method that involves obtaining data packets and their versions, performing an increment process to obtain an increment version, loading data into item tables based on corresponding items, and setting the increment version as the data version to ensure consistency between data versions and packet versions.
Ensures the consistency of data versions with data packet versions, facilitating accurate data loading and application, thereby supporting effective investment promotion guidance.
Smart Images

Figure 2025521289000001_ABST
Abstract
Description
Technical Field
[0001] [Cross - Reference to Related Applications] This application claims the priority of a Chinese patent application with the application number 202210774149.X filed with the Chinese Patent Office on July 1, 2022, and all the contents of that application are incorporated herein by reference.
[0002] This disclosure relates to the field of computer technology, for example, to a version control method, apparatus, electronic device, and storage medium.
Background Art
[0003] In commodity operation business, commodities such as potential, quality, and hits selected in an automatic or manual manner are helpful for accurate investment promotion guidance. To effectively utilize these commodities, their related data can be loaded onto the operation platform for the application of operators.
[0004] Over time, these data may change. In order to apply data that matches the current actual situation, version control can be performed on these data during the process of loading them onto the operation platform. However, there is no related solution that can achieve the above function.
Summary of the Invention
Problems to be Solved by the Invention
[0005] This disclosure provides a version control method, apparatus, electronic device, and storage medium for guaranteeing the consistency between the data version and the data packet version corresponding to each data waiting to be loaded.
Means for Solving the Problems
[0006] According to a first aspect, this disclosure provides a version control method, and this method includes In response to a data load instruction, obtaining a plurality of data waiting to be loaded, data packets corresponding to the plurality of data waiting to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a load waiting pool, the load waiting pool includes a load waiting item pool or an item cluster pool, the data packet includes at least one item table, and the data waiting to be loaded corresponds to a load waiting item in the load waiting pool, Performing an increment process on the data packet version to obtain an increment version, For each data waiting to be loaded, based on the load waiting item corresponding to the data waiting to be loaded, loading the data waiting to be loaded into the item table corresponding to the load waiting item in at least one item table, obtaining the data after loading, and setting the increment version as the data version of the data after loading, When obtaining the data version of the data after loading corresponding to each data waiting to be loaded, setting the increment version as the data packet version, may be included.
[0007] According to a second aspect, the present disclosure further provides a version control device, which includes A data packet version acquisition module configured to obtain a plurality of data waiting to be loaded, data packets corresponding to the plurality of data waiting to be loaded, and a data packet version of the data packet in response to a data load instruction, wherein the data packet corresponds to a load waiting pool, the load waiting pool includes a load waiting item pool or an item cluster pool, the data packet includes at least one item table, and the data waiting to be loaded corresponds to a load waiting item in the load waiting pool, the data packet version acquisition module, An increment version acquisition module configured to perform an increment process on the data packet version to obtain an increment version, For each piece of data waiting for loading, based on the item waiting for loading corresponding to the data waiting for loading, load the data waiting for loading into the item table corresponding to the item waiting for loading in at least one of the item tables, obtain the data after loading, and configure the increment version to be the data version of the data after loading. A data version acquisition module; It may further include a data packet version acquisition module configured to set the increment version as the data packet version when obtaining the data version of the data after loading corresponding to each piece of data waiting for loading.
[0008] According to a third aspect, the present disclosure further provides an electronic device, which includes one or more processors, and a memory configured to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above version control method.
[0009] According to a fourth aspect, the present disclosure 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 above version control method is implemented.
[0010] According to a fifth aspect, the present disclosure further provides a computer program product, which includes a computer program included on a non-transitory computer-readable medium, and the computer program includes program code used for executing the above version control method.
Brief Description of the Drawings
[0011]
Figure 1
Figure 2a
Figure 2b
Figure 3a
Figure 3b
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10a
Figure 10b
Figure 11
Figure 12
Embodiments for Carrying Out the Invention
[0012] The following describes embodiments of the present disclosure with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, the present disclosure can be implemented in various forms, and these embodiments are provided for understanding the present disclosure. The drawings and embodiments of the present disclosure are merely illustrative
[0013] The multiple steps described in the embodiments of the method of the present disclosure may be executed in a different order and / or may be executed in parallel. Also, the embodiments of the method may include additional steps and / or may omit the execution of the steps shown. The scope of the present disclosure is not limited in this regard.
[0014] The term "including" and its variants used in this specification are open-ended inclusion, that is, "including (but not limited to)". The term "based on" means "at least partially based on". The term "one embodiment" represents "at least one embodiment", the term "another embodiment" represents "at least one another embodiment", and the term "some embodiments" represents "at least some embodiments". Related definitions of other terms are given in the following description.
[0015] The concepts such as "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions executed by these devices, modules or units.
[0016] Those skilled in the art should understand that the modifiers "one" and "a plurality of" mentioned in the present disclosure are general and not restrictive, and should be understood as "one or a plurality of" unless otherwise indicated in the context.
[0017] The names of the messages or information interacted between multiple devices in the embodiments of the present disclosure are only used for the purpose of explanation and are not used to limit the scope of these messages or information.
[0018] FIG. 1 is a flowchart of a version control method provided by an embodiment of the present disclosure. This embodiment can be applied when controlling the data version and data packet version in the data loading process. This method may be executed by a version control device provided by an embodiment of the present disclosure. This device may be implemented in a software and / or hardware manner, and this device may be integrated into an electronic device, and this electronic device may be various terminal devices or servers.
[0019] Referring to FIG. 1, the method of the embodiment of the present disclosure includes the following steps.
[0020] S110. In response to a data loading instruction, obtain a plurality of data waiting to be loaded, data packets corresponding to the plurality of data waiting to be loaded, and the data packet versions of the data packets. Here, the data packets correspond to a waiting-to-be-loaded pool, and the waiting-to-be-loaded pool includes a waiting-to-be-loaded item pool or an item cluster pool. The data packets include at least one item table, and the data waiting to be loaded corresponds to the waiting-to-be-loaded items in the waiting-to-be-loaded pool.
[0021] The data loading instruction may be an instruction used to load the data waiting to be loaded into the data packet corresponding to the data waiting to be loaded. In response to this data loading instruction, a plurality of data waiting to be loaded, data packets, and data packet versions of the data packets may be obtained. The above step can directly obtain the data packet, which explains that this data packet has already been created in advance. Then, when this data packet has not been created in advance, after obtaining a plurality of data waiting to be loaded, the above version control method may further include creating this data packet and setting the data packet version of this data packet to the initial version, thereby ensuring subsequent successful acquisition of this data packet and the data packet version of this data packet. This initial version may be one preset data packet version.
[0022] The data packet corresponds to the load waiting pool. This load waiting pool may be an item pool or an item cluster pool with load waiting (i.e., there is a need for data loading). In actual applications, this item pool may include at least one item waiting to be loaded, this item cluster pool may include at least one item cluster, and each item cluster may include at least one item waiting to be loaded. The data waiting to be loaded corresponds to the item waiting to be loaded in the load waiting pool, and the data packet includes at least one item table. In actual applications, each item table may correspond to one or more items waiting to be loaded in the load waiting pool. Therefore, the data loading process realized based on the subsequent steps may be understood as a process of loading the data waiting to be loaded corresponding to each item waiting to be loaded in the load waiting pool into the corresponding item table in the data packet.
[0023] S120. Perform an increment process on the data packet version to obtain an increment version.
[0024] After obtaining the data packet version, an increment process may be performed on it to obtain an increment version. For example, the result obtained by data packet version + N may be used as the increment version, where N may be any positive integer.
[0025] S130. For each piece of data waiting to be loaded, based on the item waiting to be loaded corresponding to the data waiting to be loaded, load the data waiting to be loaded into the item table corresponding to the item waiting to be loaded in at least one item table, obtain the data after loading, and set the increment version as the data version of the data after loading.
[0026] In the process of one data loading, it may be necessary to load multiple pieces of data waiting to be loaded. Here, the following steps may be executed for any of the pieces of data waiting to be loaded, that is, based on the item waiting to be loaded corresponding to the data waiting to be loaded, determine the item table corresponding to this item waiting to be loaded from at least one item table, and load this data waiting to be loaded into this item table, so as to obtain the data after loading corresponding to this item waiting to be loaded, and set the previously obtained increment version as the data version of the data after loading. In actual applications, the data waiting to be loaded may be the item identifier of the item waiting to be loaded. Then, in the data loading process, the corresponding item waiting to be loaded can be accurately determined from multiple items waiting to be loaded by the item identifier, and further, by accurately determining the corresponding item table from this at least one item table, the accuracy of data loading can be guaranteed. Furthermore, the fields under the item table may at least include the data packet identifier of the data packet, the item identifier of the item waiting to be loaded, and the data version of the loaded data corresponding to the item waiting to be loaded.
[0027] Since the item table is located in the data packet, the process of loading the data waiting to be loaded into the item table may be understood as the process of loading the data waiting to be loaded into the data packet. Therefore, the data after loading is the data in the item table and also the data in the data packet.
[0028] In actual applications, when the loaded data corresponding to the data waiting to be loaded is not loaded into the data packet, the loading process of the data waiting to be loaded may be understood as the process of directly inserting the data waiting to be loaded into the data packet. When the loaded data is loaded into the data packet, this may occur when a piece of data has already been loaded into the data packet before, but over time, the numerical value of this data has changed, so it is necessary to reload it into the data packet. At this time, the loading process of the data waiting to be loaded may also be understood as the process of updating the loaded data in the data packet based on the data waiting to be loaded.
[0029] S140. When obtaining the data version of the data after loading corresponding to each piece of data waiting to be loaded, set the incremental version as the data packet version.
[0030] When obtaining the data version of the data after loading corresponding to each piece of data waiting to be loaded, that is, when the loading of each piece of data waiting to be loaded is completed and each piece of data after loading corresponding to each piece of data waiting to be loaded has its own data version, the previously obtained incremental version may be used as the data packet version, thereby ensuring the consistency of the data version of each piece of data after loading and the data packet version in the data packet.
[0031] The technical solution of the embodiments of the present disclosure obtains a plurality of load-waiting data, data packets corresponding to the plurality of load-waiting data, and data packet versions of the data packets by responding to a data load instruction. Here, the data packet corresponds to a load-waiting pool, the load-waiting pool includes a load-waiting item pool or an item cluster pool, the data packet includes at least one item table, the load-waiting data corresponds to a load-waiting item in the load-waiting pool, performs an increment process on the data packet version to obtain an increment version, and for each load-waiting data, based on the load-waiting item corresponding to the load-waiting data, loads the load-waiting data into the item table corresponding to the load-waiting item in at least one of the item tables to obtain the loaded data, thereby realizing the process of loading the load-waiting data into the data packet, and setting the increment version as the data version of the loaded data. When obtaining the data versions of the loaded data corresponding to each load-waiting data, set the increment version as the data packet version. The above technical solution controls the data version of the loaded data by the increment version obtained after performing an increment process on the data packet version during the data load process, and after each loaded data has its own data version, controls the data packet version based on the increment version, which ensures the consistency between the data version of each loaded data in the data packet and the data packet version of the data packet by a progressive version control policy.
[0032] According to one technical solution, based on the above embodiments, the version control method may further include setting the data state of the data packet data in the data packet to an offline state in response to a data packet deletion command for the data packet, and setting the data packet state of the data packet to an invalid state. Here, the data packet deletion command may be a command for deleting the above-mentioned data packet that is triggered artificially and spontaneously or automatically triggered when a preset deletion condition is met. In actual applications, to achieve the permanent storage of data, the deletion process here may be understood as a process of stopping the application of the data packet data in the data packet by setting the data packet state of the data packet to an invalid state. This data packet data may be the data after loading in the above text, or the data loaded into the data packet before responding to the current data loading command, etc., and is not limited here. Therefore, when responding to the data packet deletion command, the data state of all the data packet data in the data packet may be set to the offline state, and the data packet state of the data packet may be set to the invalid state. In this way, each data packet data in the data packet cannot be applied, thereby realizing an effect similar to the deletion of the data packet. The data belonging to the data packet may all be considered as data packet data. In other words, the data after loading and the loaded data already mentioned, as well as the previous load data, breakpoint load data, and breakpoint deployment data that may be mentioned later, may all be considered as different expressions in different application scenarios of the data packet data.
[0033] Furthermore, data packet data in an online state is associated with a data packet label corresponding to the data packet, and the version control method may further include deleting the association between the data packet data in the online state and the data packet label. Here, the data packet label may be used to identify the data packet to which the corresponding data packet data belongs. Considering the possible application scenarios related to the embodiments of the present disclosure, since there may be a plurality of data packet data in a data packet, one data packet label (i.e., the data packet label corresponding to the data packet) may be associated with a plurality of data packet data. When deleting a data packet, in addition to changing the data packet state and the data state, the association relationship between the data packet data and the data packet label can also be deleted, so that the data packet data in the deleted data packet is no longer associated with the remaining content, realizing a thorough deletion of the data packet.
[0034] To understand the above data packet deletion solution, in combination with the possible application scenarios related to the embodiments of the present disclosure, the following will exemplarily explain it with examples. Exemplarily, referring to FIG. 2a, taking the data packet as a data packet of a commodity (hereinafter abbreviated as a commodity package) and the data packet data as the data of the commodity (hereinafter abbreviated as a commodity) as an example, first obtain the commodity pool that needs to be deleted on the data platform, then browse the commodity package corresponding to the commodity pool on the operation platform, browse the commodities in the commodity package, remove the commodity package label corresponding to the online commodity in the commodity package stored in the commodity middle platform label center, and further delete all the commodities in the commodity package, that is, modify the commodity state of all the commodities to the offline state, and then delete the commodity package, that is, set the commodity package state of the commodity package to the invalid state. Thereby, through the effective deletion of the commodity package, the effective deletion of the commodity pool is realized.
[0035] According to another technical solution, the version control method may further include: in response to a data packet viewing instruction for a data packet, determining online data in the data packet data of the data packet whose data version is equal to the data packet version; and returning the online data to the instruction triggering device of the data packet viewing instruction. Here, the data packet viewing instruction may be an instruction for viewing the data packet data in the data packet triggered by a user. In response to this data packet viewing instruction, since the data after loading to be loaded into the data packet this time is meaningful data that matches the current actual situation, the data version of these data after loading is equal to the data packet version. Thus, online data whose data version is equal to the data packet version is determined from the data packet data, and the online data is returned to the instruction triggering device of the data packet viewing instruction, such as the front-end device of the back platform where the user is located, so that the user can view the online data that matches the current actual situation. The online data here is substantially the same as the data after loading in the above text, and is only named differently here for distinguishing scenarios, and does not limit their substantial meanings.
[0036] To understand the above data packet viewing solution more vividly, in combination with the possible application scenarios related to the embodiments of the present disclosure, the following will be exemplarily described with examples. Exemplarily, referring to FIG. 2b, still taking the data packet as a product package and the data packet data as a product, first obtain the product pool that needs to be viewed on the data platform, then view the product package corresponding to the product pool on the operation platform, further view the products in the product package whose product version is equal to the product package version, and finally render and return these products to the page, so that the operator can effectively view the corresponding products.
[0037] For the following two technical solutions, the application scenarios of these two technical solutions are exemplarily described here first. Exemplarily, the relevant data of the products selected in an automatic or manual manner (i.e., mined) may be stored in the data platform in the form of a product pool (which may also be called a product selection pool here), and the production characteristics of these product selection pools may be as shown in Figure 3a.
[0038] 1. Each type of product selection pool is produced once according to a preset cycle (such as a week, a month, or a year, etc.). Next, taking the preset cycle being a week as an example for description.
[0039] 2. Some types of product selection pools produce one independent new pool (i.e., independent of the previous production) every week, such as popular search terms, hot news, or hot topics, etc. This is because the differences in these contents in different weeks are large, so the related products selected every week may be completely different. This is because the life cycle of such types of product selection pools is short.
[0040] 3. Some types of product selection pools are only one and only update the products in it every time they are produced (i.e., full update), such as updating hit products, etc. This is because although these contents change every week, the changes are not particularly large. Such types of product selection pools are relatively few and can be retained permanently.
[0041] 4. The number of products in the product selection pool is often extremely large.
[0042] Considering the possible application scenarios related to the embodiments of the present disclosure, while combining the data flow diagram shown in Figure 3b (the product selection pool reporting process in the illustration may be understood as the data loading process described above), the criteria for delivering the product selection pool to the operation platform may be as follows.
[0043] 1. It is possible to view multiple product selection pools on the operation platform. Here, for the product selection pool with full - volume updates, only the latest version may be presented, which has already been described in the data packet viewing plan.
[0044] 2. All product selection pools must be permanently retained for operation. It is also possible to manually decide whether to delete them or to automatically delete them after a long time, which has already been described in the data packet deletion plan.
[0045] 3. The products in the product selection pool need to be represented at both the B - end (i.e., merchant end) and the C - end (i.e., user end). For example, at the B - end, merchants are presented with the fact that one product is related to this week's hot spot (in one product selection pool), and promotion events, etc. are proposed. Also, at the C - end, the products in one product selection pool provide a venue or floor on the purchase guidance page for announcements, etc. The representation method may be to attach a product selection pool label related to the product selection pool to the product in the product middle - platform label center. Since the product selection pool label can be automatically loaded into the search engine, the information representation at both the B and C ends can be searched by their respective search engines.
[0046] In the above, the product selection pool was described as an example. However, considering the business scenarios that may be related to the embodiments of the present disclosure, in addition to the product selection pool, there may also be business scenarios related to the product selection cluster pool. The product selection pool may be understood as a set of products, and the product selection cluster pool may be understood as a set of sets of products. That is, there are many product selection clusters in the product selection cluster pool, and each product selection cluster may be considered as a set of products. For example, it is a set of multiple toothbrushes of the same brand and the same series as the toothbrush of a hit product of an Internet celebrity, and they may appear in the overall form of the cluster. The remaining multiple toothbrushes are obtained by clustering based on the toothbrush of the hit product of this Internet celebrity. Next, the data loading process in the two business scenarios of the product selection pool and the product selection cluster pool will be described. Taking the product selection pool as an example, the item pool to be described later may be obtained by selecting products like the product selection pool, or may be obtained by selecting or mining the remaining non-sale items, and is not limited here. The case of the item cluster pool is similar.
[0047] According to one technical solution, when the load waiting pool includes the item pool, the data loading process has already been described in S130 and will not be further explained here. Also, the product selection pool mentioned above may be understood as an example of the item pool.
[0048] According to another technical solution, the load waiting pool is an item cluster pool, the item cluster pool includes at least one item cluster, the load waiting items in each item cluster include a first item or a second item obtained by clustering based on the first item, at least one item table includes at least one reference table and at least one relationship table associated with each reference table, for each load waiting data, based on the load waiting item corresponding to the load waiting data, loading the load waiting data into the item table corresponding to the load waiting item in at least one item table to obtain the data after loading may include, for each item cluster, taking the load waiting data corresponding to the first item in the item cluster among each load waiting data as the first load data, and taking the load waiting data corresponding to each second item in the item cluster as the second load data, loading the first load data into the target table corresponding to the first item in the item cluster in at least one reference table to obtain the data after loading of the first item in the item cluster, and for each second load data, taking the second item corresponding to the second load data in the item cluster as the current item, loading the second load data into the relationship table corresponding to the current item in at least one relationship table associated with the target table to obtain the data after loading of the current item.
[0049] The item cluster pool may include at least one item cluster, and each item cluster may include a first item and at least one second item obtained by clustering based on the first item. Here, both the first item and the second item are load-waiting items in the above context. The at least one item table may include at least one reference table (i.e., the item table corresponding to the first item) and at least one relationship table associated with each reference table. In actual applications, this relationship table may represent the relationship between the second item obtained by clustering based on the first item and the first item. Further, taking each item cluster as a unit, the loading process of the first load data of the first item and the second load data of each second item in this item cluster may be realized based on the following steps, that is, the loading process of the first load data is realized by loading the first load data into the target table corresponding to this first item in at least one of the reference tables. Further, for each second load data, the loading process of the second load data is realized by loading the second load data into the relationship table corresponding to the current item in at least one of the relationship tables associated with the target table.
[0050] In actual applications, the fields under each reference table may include the data packet identifier of the data packet, the item identifier of the first item, and the data version of the loaded data corresponding to the first item. The fields under each relationship table may include the data packet identifier, the item identifier, the relationship identifier for identifying the relationship between the first item and the second item, and the data status and data version of the loaded data corresponding to the second item. One second item can be uniquely determined from at least one second item based on the item identifier and the relationship identifier. Here, the data status and the data version may correspond to the uniquely determined second item.
[0051] In actual applications, the data waiting to be loaded in the above two data loading schemes may be raw data directly obtained from the data platform, or may be operation data that can be applied by users obtained after processing the raw data. For example, for each piece of raw data, it may involve filtering fields that are not necessary during the operation process, structural alignment, or converting fields with different business meanings. This data processing process can be realized based on the data packet model (i.e., the database). Furthermore, to understand the above data loading process, hereinafter, the product package and the product in the above text will continue to be used as examples for illustrative explanation. Exemplarily, refer to FIG. 4.
[0052] In business scenario 1 of the product selection pool, the fields under the product selection pool table related to the product selection pool may include a product selection pool identifier. Each product selection pool may include n products. The fields under the product table related to any one product may include a product selection pool identifier and a product identifier. Through the product package model, the product selection pool table may be converted into a product package table related to the product package, and the product table may be converted into a product table related to the above product package table. The fields under the product package table may include a product package identifier, a product package status, a product package version, and other data. The fields under the product table related to this product package table may include a product package identifier, a product identifier, a product status, a product version, and other data.
[0053] In business scenario 2 of the product selection cluster pool, the fields under the product selection cluster pool table related to the product selection cluster pool may include a product selection cluster pool identifier. Each product selection cluster pool may include n product selection clusters. The fields under the product selection cluster table related to any one product selection cluster may include a product selection cluster pool identifier and a product selection cluster identifier. Each product selection cluster may include n products (for example, the toothbrushes of a certain type of Internet celebrity's hit product in the above example correspond to n toothbrushes of the same brand and the same series). The fields under the product table related to any one product may include a product selection cluster pool identifier, a product selection cluster identifier, and a product identifier. Through the product package model, the product selection cluster pool table may be converted into a product package table related to the product package, the product selection cluster table may be converted into a product table related to the above product package table, and further the product table may be converted into a relationship table related to the above product table. The product package table and the product table in business scenario 2 are the same as the situation of the product package table and the product table in business scenario 1. The fields under the relationship table may include a product package identifier, a product identifier, a relationship identifier, a product status, a product version, and other data. In other words, to meet business scenario 2, based on business scenario 1, the product package model further branches a layer of relationship tables.
[0054] By loading various business scenarios related to product selection into the above example of the product package model (i.e., the database), it can be applied to any type of product loop selection business, and the versatility is relatively good.
[0055] FIG. 5 is a flowchart of another version control method provided by an embodiment of the present disclosure. This embodiment will be described based on the solution in the above embodiment. In this embodiment, after obtaining the data after loading, if the loaded data corresponding to the data to be loaded in the data packet has not been loaded, or if the loaded data corresponding to the data to be loaded in the data packet has been loaded and the data version of the loaded data is smaller than the data packet version, the version control method may further include setting the data state of the data after loading to the state of waiting for deployment. When obtaining the data version of the data after loading corresponding to each piece of data to be loaded, setting the increment version as the data packet version means that when obtaining the data version of the data after loading corresponding to each piece of data to be loaded, deploying the data after loading in the waiting-for-deployment state, and after the deployment is completed, updating the data state of the data after loading from the waiting-for-deployment state to the online state. When the data state of each piece of data after loading is in the online state, it may include setting the increment version as the data packet version. Here, it is the same as or corresponds to the above embodiment, and the interpretation of the corresponding terms will not be further described here.
[0056] Accordingly, as shown in FIG. 5, the method of this embodiment may include the following steps.
[0057] S210. In response to a data loading instruction, obtain a plurality of pieces of data to be loaded, a data packet corresponding to the plurality of pieces of data to be loaded, and the data packet version of the data packet. Here, the data packet corresponds to a waiting-for-loading pool, the waiting-for-loading pool includes a waiting-for-loading item pool or an item cluster pool, the data packet includes at least one item table, and the data to be loaded corresponds to the waiting-for-loading items in the waiting-for-loading pool.
[0058] S220. Perform an increment process on the data packet version to obtain an increment version.
[0059] S230. For each piece of load-wait data, based on the load-wait item corresponding to the load-wait data, load the load-wait data into the item table corresponding to the load-wait item in at least one of the item tables to obtain the data after loading, and set the incremental version to the data version of the data after loading.
[0060] Execute S230 and S240 in sequence for each piece of load-wait data. Through S230, load this load-wait data into the corresponding item table, that is, load it into the data packet including this item table.
[0061] S240. When the loaded data corresponding to the load-wait data is not loaded in the data packet, or when the loaded data corresponding to the load-wait data is loaded in the data packet and the data version of the loaded data is smaller than the data packet version, set the data state of the data after loading to the deployment-wait state.
[0062] As described above, there may be loaded data corresponding to the data waiting to be loaded in the data packet, and there may also be no such loaded data. Furthermore, in the former case, the data version of the loaded data may be smaller than the data packet version, or may be equal to the data packet version. Considering the possible application scenarios related to the embodiments of the present disclosure, for the loaded data whose data version is equal to the data packet version, its data state is the online state, that is, it has already been deployed. For the loaded data whose data version is smaller than the data packet version, its data state is the offline state, that is, it has not been deployed. When there is no corresponding loaded data, it is necessary to deploy the corresponding data waiting to be loaded. Therefore, when the data after loading does not correspond to the loaded data, or the data version of the corresponding loaded data is smaller than the data packet version, the data state of the data after loading may be set to the waiting-to-be-deployed state. For the former, it is a process from non-existence to the waiting-to-be-deployed state, and for the latter, it is a process from the offline state to the waiting-to-be-deployed state, so that the data after loading can be deployed subsequently.
[0063] The process of setting the data version and the process of setting the data state of the data after loading may be executed sequentially or simultaneously, and are not limited here. Also, the online state may be understood as the currently applied state, and the offline state may be understood as the currently unapplied state. Considering the possible application scenarios related to the embodiments of the present disclosure, when the full pool is synchronized, the above steps and subsequent steps may be combined to deploy only the products newly entered into the pool or the products already in the pool but not currently applied, and there is no need to repeatedly deploy the products already in the pool and currently in use, thereby ensuring the deployment efficiency.
[0064] When the data version of the data after loading corresponding to each load waiting data is obtained, the data after loading in the deployment waiting state is deployed, and the data state of the data after loading after the deployment is completed is updated from the deployment waiting state to the online state.
[0065] When each piece of data after loading has its own data version, the data after loading in the deployment waiting state may be deployed, and the data state of the data after loading after the deployment is completed may be updated from the deployment waiting state to the online state. In actual applications, the deployment operation and the data state update operation may be sequentially executed for each piece of data after loading in the deployment waiting state, or after the deployment operation is executed for all pieces of data after loading in the deployment waiting state, their data state update operations and the like may be executed, which is not limited here. The implementation method of the deployment operation here may be related to the labeling operation (that is, the operation of attaching a data packet label) described above, sending a message to notify other related operations, etc., which is not limited here.
[0066] S260、When the data state of each piece of data after loading is in the online state, set the increment version as the data packet version.
[0067] When the data state of each piece of data after loading is in the online state, by setting the increment version as the data packet version, all data packets (that is, the data after loading here) in which the data version in the data packet matches the data packet version are made online.
[0068] For the data after the load with deployment requirements, set its data status to the waiting-for-deployment status, then deploy the data after the load in the waiting-for-deployment status, and update the data status of the data after the load after deployment to the online status. When the data status of each data after the load is in the online status, set the incremental version as the data packet version. This can accurately query the data after the load obtained after this data load from the data packet data in the data packet by determining whether the data status is in the online status and / or whether the data version matches the data packet version. It may be considered as data with operational value that matches the current actual situation.
[0069] FIG. 6 is a flowchart of another version control method provided by an embodiment of the present disclosure. This embodiment will be described based on the solution in the above embodiment. In this embodiment, for the previous load data that is loaded into the previous data packet and does not correspond to the waiting-for-load data, update the data status of the previous load data in the online status among all the previous load data from the online status to the waiting-for-deployment status, and determine the waiting-for-deployment data in the waiting-for-deployment status from the data packet data in the data packet. The data after the load in the waiting-for-deployment status may further include that it is the first deployment data whose data version is greater than the data packet version among the waiting-for-deployment data. Deploying the data after the load in the waiting-for-deployment status and updating the data status of the data after the load after deployment from the waiting-for-deployment status to the online status may include determining the first deployment data from the waiting-for-deployment data, deploying the first deployment data based on the first deployment method corresponding to the first deployment data, and updating the data status of the first deployment data after deployment from the waiting-for-deployment status to the online status. Here, the same as or corresponding to the above embodiment, the interpretation of the terms will not be further explained here.
[0070] Accordingly, as shown in FIG. 6, the method of this embodiment may include the following steps.
[0071] S310. In response to a data load instruction, obtain a plurality of load-waiting data, data packets corresponding to the plurality of load-waiting data, and data packet versions of the data packets. Here, the data packet corresponds to a load-waiting pool, the load-waiting pool includes a load-waiting item pool or an item cluster pool, the data packet includes at least one item table, and the load-waiting data corresponds to a load-waiting item in the load-waiting pool.
[0072] S320. Perform an increment process on the data packet version to obtain an increment version.
[0073] S330. For each load-waiting data, based on the load-waiting item corresponding to the load-waiting data, load the load-waiting data into the item table corresponding to the load-waiting item in at least one item table, obtain the data after loading, and set the increment version as the data version of the data after loading.
[0074] S340. If the loaded data corresponding to the load-waiting data is not loaded in the data packet, or if the loaded data corresponding to the load-waiting data is loaded in the data packet and the data version of the loaded data is smaller than the data packet version, set the data state of the data after loading to the deployment-waiting state.
[0075] S350. For the previous load data that was loaded in the previous data packet and does not correspond to the load-waiting data, update the data state of the previous load data in the online state among all the previous load data from the online state to the deployment-waiting state.
[0076] There may be loaded data in a previous data packet that corresponds to one piece of data waiting to be loaded, and there may also be previous loaded data that was loaded into the previous data packet but does not correspond to any one piece of data waiting to be loaded. This explains that the previous loaded data does not match the current actual situation and cannot be in an online state representing the current application. Therefore, it may be possible to update the data state of the previous loaded data in the online state among all the previous loaded data from the online state to the state waiting for deployment.
[0077] S360, Determine the data waiting for deployment in the data packet data within the data packet, where the data after loading in the state waiting for deployment is the first deployment data whose data version is greater than the data packet version among the data waiting for deployment.
[0078] Use the data packet data in the state waiting for deployment in the data packet data as the data waiting for deployment. At this time, the data waiting for deployment may be the data after loading in the state waiting for deployment, or it may be the previous loaded data in the state waiting for deployment. The difference between the two is that the data version of the former is greater than the data packet version, and the data version of the latter is equal to the data packet version. This difference will be the key to distinguishing the two subsequently.
[0079] S370, When obtaining the data version of the data after loading corresponding to each piece of data waiting to be loaded, determine the first deployment data from the data waiting for deployment, deploy the first deployment data based on the first deployment method corresponding to the first deployment data, and update the data state of the first deployment data after deployment from the state waiting for deployment to the online state.
[0080] Determine first deployment data (i.e., data after loading in the pending deployment state) whose data version is greater than the data packet version from the pending deployment data, and deploy the first deployment data based on the first deployment method corresponding to the first deployment data, thereby realizing the effect of deployment with the target of the first deployment data narrowed down.
[0081] S380. When the data state of the data after each load is the online state, set the incremental version as the data packet version.
[0082] The technical solution of the embodiment of the present disclosure updates the data state of the previous loaded data in the online state from the online state to the pending deployment state. At this time, the pending deployment data may be the data after loading in the pending deployment state or the previous loaded data. Furthermore, considering the difference between the two, from the numerical relationship between the data version and the data packet version, determine the first deployment data (i.e., the data after loading in the pending deployment state) from the pending deployment data, and deploy the first deployment data based on the first deployment method corresponding to the first deployment data, thereby realizing the effect of deployment with the target of the first deployment data narrowed down.
[0083] According to one technical solution, based on the above embodiments, the previous load data in the waiting-for-deployment state is the second deployment data in the waiting-for-deployment data whose data version is equal to the data packet version. The version control method determines the second deployment data from the waiting-for-deployment data, deploys the second deployment data based on the second deployment method corresponding to the second deployment data, and may further include updating the data state of the second deployment data after deployment from the waiting-for-deployment state to the offline state, thereby ensuring the effect of deployment with the target of the second deployment data narrowed down. Further, the first deployment method may include adding a data packet label corresponding to the data packet, thereby associating the data packet data in the online state with the data packet, and / or the second deployment method may include deleting the data packet label corresponding to the data packet, thereby disassociating the data packet data in the offline state from the data packet, and when the full amount pool is synchronized while combining the possible application scenarios related to the embodiments of the present disclosure, the second deployment data that needs to be removed from the full amount pool can be timely delabeled, thereby effectively solving the problem that the data packet label is contaminated.
[0084] FIG. 7 is a flowchart of another version control method provided by an embodiment of the present disclosure. This embodiment will be described based on the solution in the above embodiment. In this embodiment, after obtaining the data packets corresponding to a plurality of waiting-for-load data, the version control method updates the data packet state of the data packet from the valid state to the load state, updates the load state to the in-deployment state after the load of each waiting-for-load data is completed, and may further include updating the in-deployment state to the valid state when the data state of the data after each load is in the online state. Here, whether it is the same as the above embodiment or the interpretation of the corresponding terms will not be further described here.
[0085] Accordingly, as shown in FIG. 7, the method of this embodiment may include the following steps.
[0086] S410. In response to a data load instruction, obtain a plurality of data items waiting to be loaded, data packets corresponding to the plurality of data items waiting to be loaded, and the data packet version of the data packet. Here, the data packet corresponds to a load waiting pool, the load waiting pool includes a load waiting item pool or an item cluster pool, the data packet includes at least one item table, and the data item waiting to be loaded corresponds to a load waiting item in the load waiting pool.
[0087] S420. Update the data packet state of the data packet from the valid state to the load state, and perform an increment process on the data packet version to obtain an increment version.
[0088] When a data load instruction is responded to, if a data packet can be obtained, this indicates that this data packet has been previously created and is currently in a valid state. The data packet state and the data packet version of the data packet jointly serve as indicators to identify the start and end of different processes (such as a data load process, a data deployment process, and a data application process). Here, the data state can be updated from the valid state to the load state, thereby indicating the start of the data load process.
[0089] S430. For each data item waiting to be loaded, based on the load waiting item corresponding to the data item waiting to be loaded, load the data item waiting to be loaded into the item table corresponding to the load waiting item in at least one item table, obtain the data after loading, and set the increment version as the data version of the data after loading.
[0090] S440. If the loaded data corresponding to the data to be loaded in the data packet has not been loaded, or if the loaded data corresponding to the data to be loaded in the data packet has been loaded and the data version of the loaded data is smaller than the data packet version, set the data state of the data after loading to the state waiting for deployment.
[0091] S450. When obtaining the data version of the data after loading corresponding to each data to be loaded, update the data packet state from the loading state to the state of being in the process of deployment.
[0092] When obtaining the data version of the data after loading corresponding to each data to be loaded, this indicates that the loading of all the data to be loaded has already been completed. By updating the data packet state from the loading state to the state of being in the process of deployment, the end of the data loading process and the start of the data deployment process can be marked.
[0093] S460. Deploy the data after loading in the state waiting for deployment, and update the data state of the data after loading after deployment from the state waiting for deployment to the online state.
[0094] S470. When the data state of each data after loading is in the online state, set the increment version as the data packet version, and update the data packet state from the state of being in the process of deployment to the valid state.
[0095] When the data state of each data after loading is in the online state, this indicates that all the data after loading in the data packet matches the current actual situation and has a certain operation value. By updating the data packet state from the state of being in the process of deployment to the valid state, the end of the data deployment process and the start of the data application process can be marked.
[0096] The technical solution of the embodiments of the present disclosure can mark the start and end of different processes by jointly using the data packet state and the data packet version as indicators by updating the data packet state accordingly at different stages, thereby ensuring the smooth execution of the entire process.
[0097] According to one technical solution, based on the above embodiments, the version control method may further include obtaining a data packet state in response to a breakpoint resume instruction, determining whether to perform an update operation on the obtained load-waiting data or the post-load data in the deployment-waiting state based on the data packet state, and performing the update operation based on the determination result. Here, considering the possible application scenarios related to the embodiments of the present disclosure, when responding to a data load instruction, it may be necessary to load a large amount of load-waiting data from the data platform. At this time, the data load process can be realized by adopting the batch load method. However, during this period, due to uncontrollable problems such as network anomalies, a situation may occur where some load-waiting data is successfully loaded and some load-waiting data fails to be loaded. When encountering the above situation, in order to avoid the situation where the already loaded load-waiting data is repeatedly loaded or the already deployed deployment-waiting data is repeatedly deployed, a breakpoint resume instruction is triggered, and the breakpoint resume function can be realized by further responding to the breakpoint resume instruction. In response to the triggered breakpoint resume instruction, the data packet state is obtained. Since the data packet state can represent whether it is currently in the data load process or the data deployment process, based on the data packet state, it can be determined whether to perform an update operation on the obtained load-waiting data (this belongs to the case where it is currently in the data load process and the loading of some of the obtained load-waiting data has already been completed), or to perform an update operation on the post-load data in the deployment-waiting state (this belongs to the case where it is currently in the data deployment process and some of the post-load data in the deployment-waiting state has already been deployed). Furthermore, by performing the update operation based on the determination result, the breakpoint resume function, that is, the function of continuing the load or deployment from the interruption position, can be realized, thereby ensuring the timeliness of data processing.In practice, since the data packet state is determined based on the above version control mechanism, it may be understood that the breakpoint resumption function here is realized under the above version control mechanism.
[0098] Furthermore, when the data packet state is the loading state, the judgment result is to execute an update operation on the acquired data waiting to be loaded. Executing the update operation based on the judgment result means determining historical load data whose data version is less than or equal to the data packet version from the data packet data in the data packet, and setting the load waiting data corresponding to the historical load data among the acquired load waiting data as breakpoint load data, and updating the load waiting data acquired based on the breakpoint load data. Here, the historical load data may be understood as the data loaded in the previous data packet. Here, it may correspond to the data that needs to be loaded into the data packet this time, and it may also correspond to the data that does not need to be loaded into the data packet this time. Therefore, by determining the breakpoint load data that needs to be loaded this time but has not been loaded into the data packet yet from the load waiting data acquired based on the historical load data, the load waiting data acquired based on the breakpoint load data can be updated, facilitating subsequent loading of only the breakpoint load data, thereby realizing the breakpoint load function.
[0099] When the data packet state is in the deployment state, the judgment result is to perform an update operation on the data after loading that is in the waiting-for-deployment state. Performing the update operation based on the judgment result may include determining the breakpoint deployment data in the waiting-for-deployment state from the data packet data in the data packet, and updating the data after loading that is in the waiting-for-deployment state based on the breakpoint deployment data. Here, the data packet data that has already been deployed within the data packet is in the online state or the offline state, and only the data packet data that has not been deployed is in the waiting-for-deployment state. Therefore, in order to subsequently deploy only the breakpoint deployment data, the data packet data in the waiting-for-deployment state may be used as the breakpoint deployment data, thereby realizing the breakpoint deployment function.
[0100] To understand the above breakpoint resumption plan, the following continues to exemplify and explain it using the product package and product in the above example. Exemplarily, referring to FIG. 8, in response to the breakpoint resumption command, when the product package state is in the initialization state, this indicates that the initialization stage has not yet been completed, and the product initialization process, the product loading process, and the product deployment process can be executed. When the product package state is in the loading state, this indicates that the initialization stage has already been completed, but the loading stage has not yet been completed, and the product loading process and the product deployment process can be executed. When the product package state is in the deployment state, this indicates that both the initialization stage and the loading stage have already been completed, but the deployment stage has not yet been completed, and the product deployment process can be executed. In actual applications, in business scenario 1, the above product may be a product within the product package, and in business scenario 2, the above product may be a product represented by the relationship of the products within the product package.
[0101] According to another technical solution, based on the above embodiment, after the loading of each waiting-to-be-loaded data is completed, updating the loading state to the deploying state may include updating the loading state to the loaded state after the loading of each waiting-to-be-loaded data is completed, and updating the loaded state to the deploying state in response to a data deployment command input by the user. When obtaining the data version of the data after loading corresponding to each waiting-to-be-loaded data, deploying the data after loading in the waiting-to-be-deployed state may include obtaining the data version of the data after loading corresponding to each waiting-to-be-loaded data, and deploying the data after loading in the waiting-to-be-deployed state when the data packet is in the deploying state. Here, by setting the loaded state, the loading state and the deploying state are isolated. The data after loading in the data packet in the loaded state can be browsed by the user. And in the loaded state, the user can determine whether to deploy the data after loading in the waiting-to-be-deployed state. When the user decides to deploy the data after loading in the waiting-to-be-deployed state, the data deployment function is realized by updating the loaded state to the deploying state. The above technical solution decouples the two operations of loading and deploying, so that when the deployment operation takes a long time to complete, the user can browse the data after loading in advance, and the data throughput capacity of the operation platform can also be improved.
[0102] To understand the above-mentioned multiple technical solutions as a whole, the following continues to exemplarily explain them by taking the product package and product in the above example. Exemplarily, referring to FIG. 9, taking business scenario 1 as an example, after the data platform notifies the operation platform that the preparation of a product selection pool is completed, the operation platform may first determine whether there is a product package corresponding to this product selection pool. If there is no product package corresponding to this product selection pool in the operation platform, a product package is created in the initialization stage, the product package status is the initialization status, and the product package version is 0 (this can be achieved by inserting text into the Structured Query Language (SQL)), and then it enters the loading stage, updating the initialization status to the loading status. If there is a product package corresponding to this product selection pool in the operation platform, it explains that there was a previous product package in the corresponding valid state (here, assuming the product package version is v), directly enters the loading stage, and updates the product package status from the valid state to the loading state.
[0103] In the loading stage, it can be considered by dividing it into the following two major cases.
[0104] Case 1: For any one product X in the newly loaded (i.e., ready) product selection pool, it is further divided into two small cases for consideration here. Case (11) X does not exist in the product package, which means it cannot be queried by the product version <= v. X may be directly loaded into the product package. At this time, the product status of X is the deployment pending state, and the product version is v + 1. Case (12) X exists in the product package, which means it can be queried by the product version <= v. If the queried X is in the online state, the corresponding product version can be directly incremented by 1 and updated to v + 1, and the corresponding update of X itself may be performed. If the queried X is in the offline state, this indicates that its product version is in the historical version. Update the offline state to the deployment pending state, and update its product version to v + 1, and the corresponding update of X itself may be performed.
[0105] Case 2: When any one product Y already existing in the product package does not appear in the newly loaded product selection pool, it is further divided into two small cases for consideration here. Case (21) When Y is in the online state, its product status may be updated to the deployment pending state, and the product version may be maintained at v. Case (22) When Y is in the offline state, no processing is required, that is, the product status and product version are not changed.
[0106] At this time, after the processing of each X and each Y is completed, it proceeds from the loading stage to the deployment stage, and updates the product package state from the loading state to the deploying state. Query the product Z in the waiting-for-deployment state within the product package. Here, taking the two deployment methods of labeling (i.e., adding a product package label corresponding to the product package) and delabeling (i.e., removing the product package label) as examples, label Z with a product version of v + 1 and delabel Z with a product version of v to complete the deployment of each Z. Then, update the product package state from the deploying state to the valid state, and repeatedly increment the product package version by 1 to obtain v + 1. As a result, the product versions of X that need to be updated all match the product package version, and the product states are all in the online state. And the product versions of Y that do not need to be updated are all smaller than the product package version, and the product states are all in the offline state.
[0107] In addition to version control, the above technical solution further has the following advantages.
[0108] 1. When a breakpoint occurs at any position in the loading stage, the loading stage can be directly and completely re-executed. The above solution determines that there is no need to repeatedly operate on products whose product states and product versions have already been updated before the breakpoint. Similarly, when a breakpoint occurs at any position in the deployment stage, the deployment stage can be directly and completely re-executed. The above solution determines that there is no need to repeatedly operate on products that have already been labeled / delabeled and whose product states have already been updated before the breakpoint.
[0109] 2. It is possible to avoid the instability of the system caused by data + long transactions in the way of state + version forwarding, thereby improving the stability and throughput capacity of the system. In addition, combined with the first point, it is possible to smartly remember the completed state of data synchronization before the breakpoint without the need for the method of once full synchronization + transaction.
[0110] 3. Since the data platform often notifies the operation platform to load the latest product selection pool in an asynchronous message manner, when situations such as temporary network congestion occur, the re-sent messages may be logged multiple times until the network recovers and arrive at the operation platform. Therefore, the CASABA method is adopted here to promote the state to avoid potential concurrency problems and improve safety. As an example of the CASABA method, when the product package status is updated from the deploying state to the effective state, the method of update set status='effective', version=v+1 where status='deploying' and version=v can be adopted. Here, version may represent the product package version.
[0111] To understand the above example, it will be described from another perspective below. Exemplarily, referring to FIGS. 10a and 10b, where FIG. 10a mainly presents the product initialization process and the product loading process, and FIG. 10b mainly presents the product deployment process. In FIG. 10a, in the product initialization process, when the operation platform receives a notification of a new addition or update to the product selection pool of the data platform, if there is no product package corresponding to the product selection pool, a product package is created, and if the corresponding product package exists, its product package status is updated from the valid state to the initialization state. At this time, the product initialization process ends and the product loading process starts. In the product loading process, the product package status is updated from the initialization state to the loading state, and products whose product versions in the product package are less than or equal to the product package version are queried. When a batch request is made to obtain products from the product selection pool, if this product is not among the queried products, this product is created, its product status is the deployment pending state and its product version is the product package version +1, and if this product is among the queried products and its product version is equal to the product package version, its product version is updated and its product status is maintained, and if its product version is less than the product package version, its product version is updated and its product status is updated to the deployment pending state. Referring to FIG. 10b, after all product processing in the product selection pool is completed, the product loading process ends and the product deployment process starts. In the product deployment process, the product package status is updated from the loading state to the deploying state, and products in the deployment pending state in the product package are queried, and each queried product is processed in a cycle. When the product version of the queried product is greater than the product package version, this product is labeled at the product middleware platform label center and its product status is updated to the online state, and when the product version of the queried product is less than or equal to the product package version, this product is unlabeled at the product middleware platform label center and its product status is updated to the offline state.After the deployment of each of the notified products is completed, update the product package status to the active state and increment the product package version by +1. At this time, all product processing processes are completed.
[0112] FIG. 11 is a structural block diagram of a version control device provided by an embodiment of the present disclosure. This device is configured to execute the version control method according to any of the above embodiments. This device and the version control method of the above embodiment belong to the same concept. For details not described in detail in the embodiment of the version control device, reference may be made to the embodiment of the above version control method. Referring to FIG. 11, this device may include a data packet version acquisition module 510, an increment version acquisition module 520, a data version acquisition module 530, and a data packet version acquisition module 540. Here, the data packet version acquisition module 510 is configured to acquire a plurality of load-waiting data, data packets corresponding to the plurality of load-waiting data, and the data packet version of the data packets in response to a data load instruction. Here, the data packet corresponds to a load-waiting pool, the load-waiting pool includes a load-waiting item pool or an item cluster pool, the data packet includes at least one item table, the load-waiting data corresponds to a load-waiting item in the load-waiting pool, the increment version acquisition module 520 is configured to perform an increment process on the data packet version to obtain an increment version, the data version acquisition module 530 is configured to load each load-waiting data into an item table corresponding to the load-waiting item in at least one item table based on the load-waiting item corresponding to the load-waiting data, obtain the data after loading, and set the increment version as the data version of the data after loading, and the data packet version acquisition module 540 is configured to set the increment version as the data packet version when the data version of the data after loading corresponding to each load-waiting data is obtained.
[0113] Based on the above device, this device After obtaining the data after loading, if the loaded data corresponding to the data to be loaded is not loaded in the data packet, or if the loaded data corresponding to the data to be loaded is loaded in the data packet and the data version of the loaded data is smaller than the data packet version, a deployment waiting state setting module configured to set the data state of the data after loading to the deployment waiting state may be further included. The data packet version acquisition module 540 When obtaining the data version of the data after loading corresponding to each data to be loaded, it is configured to deploy the data after loading in the deployment waiting state and update the data state of the data after loading after deployment from the deployment waiting state to the online state. An online state update unit, and when the data states of all the data after loading are in the online state, it may include a data packet version acquisition unit configured to set the incremental version to the data packet version.
[0114] Based on this, the above version control device For the previous load data that was loaded in the previous data packet and does not correspond to the data to be loaded, a deployment waiting state update module configured to update the data state of the previous load data in the online state among all the previous load data from the online state to the deployment waiting state, and a deployment waiting data determination module configured to determine the deployment waiting data in the deployment waiting state from the data packet data in the data packet. The data after loading in the deployment waiting state is a deployment waiting data determination module that is the first deployment data whose data version is larger than the data packet version among the deployment waiting data, and may further include. The online state update unit It may include an online state update sub-unit configured to determine the first deployment data from the deployment waiting data, deploy the first deployment data based on the first deployment method corresponding to the first deployment data, and update the data state of the first deployment data after deployment from the deployment waiting state to the online state.
[0115] Based on this, the previous load data in the waiting-for-deployment state is the second deployment data among the waiting-for-deployment data whose data version is equal to the data packet version. The version control device may further include an offline state update module configured to determine the second deployment data from the waiting-for-deployment data, deploy the second deployment data based on the second deployment method corresponding to the second deployment data, and update the data state of the second deployment data after deployment from the waiting-for-deployment state to the offline state.
[0116] Based on this, the first deployment method includes adding a data packet label corresponding to the data packet, and / or the second deployment method includes deleting a data packet label corresponding to the data packet.
[0117] The version control device may further include a load state update module configured to update the data packet state of the data packet from the valid state to the load state after obtaining data packets corresponding to a plurality of waiting-for-load data, a deploying state update module configured to update the load state to the deploying state after the load of each waiting-for-load data is completed, and a valid state update module configured to update the deploying state to the valid state when the data state of the data after each load is in the online state.
[0118] Based on this, the version control device may further include a data packet state acquisition module configured to acquire the data packet state in response to a breakpoint resume command, and an update operation execution module configured to determine whether to execute an update operation on the acquired waiting-for-load data or the data after load in the waiting-for-deployment state based on the data packet state, and execute the update operation based on the determination result.
[0119] Based on this, when the data packet state is the loading state, the judgment result is to execute an update operation on the acquired data waiting to be loaded, and the update operation execution module may include a breakpoint load data acquisition unit configured to determine historical load data whose data version is less than or equal to the data packet version from the data packet data in the data packet, and set the load waiting data corresponding to the historical load data among the acquired load waiting data as breakpoint load data, and a load waiting data update unit configured to update the acquired load waiting data based on the breakpoint load data.
[0120] When the data packet state is the being deployed state, the judgment result is to execute an update operation on the data after loading in the waiting-to-be-deployed state, and the update operation execution module may include a data update unit after loading configured to determine breakpoint deployment data in the waiting-to-be-deployed state from the data packet data in the data packet, and update the data after loading in the waiting-to-be-deployed state based on the breakpoint deployment data.
[0121] The being deployed state update module may include a load completion state update unit configured to update the loading state to the load completion state after the loading of each load waiting data is completed, and a being deployed state update unit configured to update the load completion state to the being deployed state in response to a data deployment command input by the user. The online state update unit may include a data deployment sub-unit after loading configured to obtain the data version of the data after loading corresponding to each load waiting data, and deploy the data after loading in the waiting-to-be-deployed state when the data packet is in the being deployed state.
[0122] The above version control device The initial version installation module may further be configured to create a data packet and set the data packet version to the initial version when the data packet has not been pre-created.
[0123] The above version control device may further include an offline state installation module configured to set the data state of the data packet data in the data packet to the offline state in response to a data packet deletion command for the data packet, and a failure state installation module configured to set the data packet state of the data packet to the failure state.
[0124] Furthermore, a data packet label corresponding to the data packet is associated with the data packet data in the online state, and the above version control device may further include a relationship deletion module configured to delete the association relationship between the data packet data in the online state and the data packet label.
[0125] The above version control device may further include an online data determination module configured to determine online data whose data version is equal to the data packet version from the data packet data in the data packet in response to a data packet viewing command for the data packet, and an online data return module configured to return the online data to the command trigger device of the data packet viewing command.
[0126] The load waiting pool includes an item cluster pool, the item cluster pool includes at least one item cluster, the load waiting items in each item cluster include a first item or a second item obtained by clustering based on the first item, the at least one item table includes at least one reference table and at least one relationship table associated with each reference table, and the data version acquisition module 530 a second load data acquisition unit configured to use, for each item cluster, the load waiting data corresponding to the first item in the item cluster among each load waiting data as the first load data, and the load waiting data corresponding to each second item in the item cluster as the second load data; a first post-load data acquisition unit configured to load the first load data into a target table corresponding to the first item in the item cluster among at least one reference table and obtain the post-load data of the first item in the item cluster; and for each second load data, using the second item corresponding to the second load data in the item cluster as the current item, loading the second load data into the relationship table corresponding to the current item among at least one relationship table associated with the target table, and obtaining the post-load data of the current item. It may include a second post-load data acquisition unit configured as such.
[0127] The version control device provided by an embodiment of the present disclosure responds to a data load instruction by a data packet version acquisition module to acquire a plurality of load-waiting data, data packets corresponding to the plurality of load-waiting data, and data packet versions of the data packets. The data packets correspond to a load-waiting pool, and the load-waiting pool includes a load-waiting item pool or an item cluster pool. The data packets include at least one item table. The load-waiting data corresponds to a load-waiting item in the load-waiting pool. An increment version acquisition module performs increment processing on the data packet version to obtain an increment version. A data version acquisition module loads each load-waiting data into an item table corresponding to the load-waiting item in at least one item table based on the load-waiting item corresponding to the load-waiting data, and obtains the data after loading, thereby realizing the process of loading the load-waiting data into the data packet. Then, the increment version is used as the data version of the data after loading. When the data version acquisition module obtains the data version of the data after loading corresponding to each load-waiting data, this increment version is used as the data packet version. In the above device, during the data loading process, the data version of the data after loading is controlled by the increment version obtained after performing increment processing on the data packet version. After each data after loading has its own data version, the data packet version is controlled based on the increment version, which guarantees the consistency between the data version of each data after loading in the data packet and the data packet version of the data packet by a progressive version control policy.
[0128] The version control device provided by an embodiment of the present disclosure can execute the version control method provided by any embodiment of the present disclosure, and has the corresponding functional modules and effects for executing the method.
[0129] In the embodiments of the above version control device, the multiple units and modules included are only separated by functional logic, but are not limited to the above classification, as long as the corresponding functions can be realized. Also, the names of the multiple functional units are for the purpose of facilitating distinction from each other and do not limit the protection scope of the present disclosure.
[0130] Hereinafter, with reference to FIG. 12, a schematic structural diagram of an electronic device (for example, the terminal device or server in FIG. 12) 600 suitable for implementing the embodiments of the present disclosure is shown. The electronic device in the embodiments of the present disclosure may include, for example, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital televisions (TVs), desktop computers, etc. The electronic device 600 shown in FIG. 12 is only an example and should not impose any restrictions on the functions and usage ranges of the embodiments of the present disclosure.
[0131] As shown in FIG. 12, the electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which can execute a plurality of appropriate operations and processes based on a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. The RAM 603 further stores a plurality of programs and data necessary for the operation of the electronic device 600. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0132] Generally, an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyro, etc., an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc., a storage device 608 including, for example, a magnetic tape, a hard disk, etc., and a communication device 609 can be connected to the I / O interface 805. The communication device 609 can allow the electronic device 600 and other devices to perform wireless or wired communication to exchange data. FIG. 12 shows an electronic device 600 having a plurality of devices, but does not require implementing or providing all the shown devices. Alternatively, more or fewer devices can be implemented or provided.
[0133] According to an embodiment of the present disclosure, the process described with reference to the above flowchart can be realized as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and this computer program includes program code for executing the method shown in the flowchart. In such an embodiment, this computer program may be downloaded and installed from a network via the communication device 609, or may be installed from the storage device 608, or may be installed from the ROM 602. When this computer program is executed by the processing device 601, the above functions limited by the method of the embodiment of the present disclosure are executed.
[0134] The above computer-readable medium of the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. Examples of computer-readable storage media include electrical connections having one or more conductors, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in combination with an instruction execution system, apparatus, or device. On the other hand, in the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier, on which a computer-readable program code is carried. Such a propagated data signal can adopt various forms including electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may be any computer-readable medium other than the computer-readable storage medium, and this computer-readable signal medium can transmit, propagate, or convey a program for use by or in combination with an instruction execution system, apparatus, or device. The program code included on the computer-readable medium can be transmitted via any suitable medium including electric wires, optical cables, radio frequency (RF), etc., or any suitable combination of the above.
[0135] In some embodiments, the client and the server can communicate using any network protocol known currently or developed in the future, such as, for example, the HyperText Transfer Protocol (HTTP), and can be interconnected with digital data communication of any form or medium (for example, a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the World Wide Web (for example, the Internet), and end-to-end networks (for example, ad hoc end-to-end networks), and any network known currently or developed in the future.
[0136] The computer-readable medium may be included in the electronic device or may be a separate entity not equipped in this electronic device.
[0137] One or more programs are stored on the computer-readable medium, and when the one or more programs are executed by the electronic device, the electronic device is caused to In response to a data load instruction, obtaining a plurality of data waiting to be loaded, data packets corresponding to the plurality of data waiting to be loaded, and data packet versions of the data packets, wherein the data packets correspond to a load waiting pool, the load waiting pool includes a load waiting item pool or an item cluster pool, the data packets include at least one item table, the data waiting to be loaded corresponds to a load waiting item in the load waiting pool, performing an increment process on the data packet version to obtain an increment version, for each data waiting to be loaded, based on the load waiting item corresponding to the data waiting to be loaded, loading the data waiting to be loaded into the item table corresponding to the load waiting item in at least one of the item tables to obtain the loaded data, setting the increment version as the data version of the loaded data, and when obtaining the data version of the loaded data corresponding to each data waiting to be loaded, setting the increment version as the data packet version.
[0138] Computer program code for performing the operations of the present disclosure can be created in one or various programming languages or combinations thereof, and the programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and further include general procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on a user computer, partially on a user computer, executed as an independent software package, partially on a user computer and partially on a remote computer, or executed entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user computer via any type of network including a LAN or WAN, or may be connected to an external computer (e.g., connected via the Internet using an Internet service provider).
[0139] The flowcharts and block diagrams in the drawings illustrate the possible system architectures, functions, and operations of systems, methods, and computer program products according to multiple embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a portion of code, and this module, program segment, or portion of code includes one or more executable instructions for implementing the defined logic function. It should also be noted that in some realizations as an alternative, the functions assigned to the blocks may occur in an order different from that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or may be executed in the reverse order depending on the functions involved. Further, it should be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated system based on hardware that executes the defined functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0140] The units described in connection with the embodiments of the present disclosure may be implemented in software or in hardware. Here, the name of the unit does not, in some cases, constitute a limitation of the unit itself. For example, the increment version acquisition module may be further described as "a module that performs increment processing on the data packet version and obtains the increment version".
[0141] The functions described above in this specification may be executed, at least in part, by one or more hardware logic components. For example, without limitation, typical types of hardware logic components that may be used include Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Parts (ASSPs), System on Chips (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
[0142] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Examples of a machine-readable storage medium may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM, or flash memory, optical fibers, CD-ROMs, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0143] According to one or more embodiments of the present disclosure, (Example 1) provides a version control method, the method comprising In response to a data load instruction, obtaining a plurality of data waiting to be loaded, data packets corresponding to the plurality of data waiting to be loaded, and the data packet version of the data packet, wherein the data packet corresponds to a load waiting pool, the load waiting pool includes a load waiting item pool or an item cluster pool, the data packet includes at least one item table, the data waiting to be loaded corresponds to a load waiting item in the load waiting pool, and Performing an increment process on the data packet version to obtain an increment version; and For each data waiting to be loaded, based on the load waiting item corresponding to the data waiting to be loaded, loading the data waiting to be loaded into the item table corresponding to the load waiting item in at least one of the item tables, obtaining the data after loading, and setting the increment version as the data version of the data after loading; and When the data version of the data after loading corresponding to each data waiting to be loaded is obtained, it may further include setting the increment version as the data packet version.
[0144] According to one or more embodiments of the present disclosure, (Example 2) provides the method of Example 1, and after obtaining the data after loading, the version control method is as follows: When the loaded data corresponding to the data waiting to be loaded is not loaded in the data packet, or when the loaded data corresponding to the data waiting to be loaded is loaded in the data packet and the data version of the loaded data is smaller than the data packet version, it may further include setting the data state of the data after loading to a state waiting for deployment. When the data version of the data after loading corresponding to each data waiting to be loaded is obtained, setting the increment version as the data packet version means: When obtaining the data version of the data after loading corresponding to each piece of data waiting for loading, deploy the data after loading that is in the waiting-for-deployment state, and update the data state of the data after loading after deployment from the waiting-for-deployment state to the online state, and When the data state of each piece of data after loading is in the online state, it may include using the incremental version as the data packet version.
[0145] According to one or more embodiments of the present disclosure, (Example 3) provides the method of Example 2, and the above version control method is For previous load data that was loaded into a previous data packet and does not correspond to the data waiting for loading, update the data state of the previous load data in the online state among all the previous load data from the online state to the waiting-for-deployment state, and Determining the deployment-waiting data in the data packet data in the data packet, wherein the data after loading in the waiting-for-deployment state includes first deployment data among the deployment-waiting data whose data version is greater than the data packet version, may further be included. Deploying the data after loading in the waiting-for-deployment state and updating the data state of the data after loading after deployment from the waiting-for-deployment state to the online state is Determining the first deployment data from the deployment-waiting data, deploying the first deployment data based on the first deployment method corresponding to the first deployment data, and updating the data state of the first deployment data after deployment from the waiting-for-deployment state to the online state may be included.
[0146] According to one or more embodiments of the present disclosure, (Example 4) provides the method of Example 3, wherein the previous load data in the waiting-for-deployment state is second deployment data among the deployment-waiting data whose data version is equal to the data packet version, and the above version control method is It may further include determining second deployment data from the data waiting for deployment, deploying the second deployment data based on a second deployment method corresponding to the second deployment data, and updating the data state of the second deployment data after deployment from the waiting-for-deployment state to the offline state.
[0147] According to one or more embodiments of the present disclosure, (Example 5) provides the method of Example 4, wherein the first deployment method includes adding a data packet label corresponding to the data packet, and / or the second deployment method includes deleting the data packet label corresponding to the data packet.
[0148] According to one or more embodiments of the present disclosure, (Example 6) provides the method of Example 2. After obtaining data packets corresponding to a plurality of data waiting for loading, the version control method updates the data packet state of the data packet from the valid state to the loading state, after the loading of each data waiting for loading is completed, updates the loading state to the deploying state, and may further include updating the deploying state to the valid state when the data state of the data after each loading is in the online state.
[0149] According to one or more embodiments of the present disclosure, (Example 7) provides the method of Example 6, and the version control method obtains the data packet state in response to a breakpoint resumption command, judges whether to execute an update operation on the obtained data waiting for loading or the data after loading in the waiting-for-deployment state based on the data packet state, and executes the update operation based on the judgment result.
[0150] According to one or more embodiments of the present disclosure, (Example 8) provides the method of Example 7. When the data packet state is the loading state, the judgment result is to execute an update operation on the obtained data waiting for loading, executing the update operation based on the judgment result Determine historical load data in which the data version in the data packet data is less than or equal to the data packet version, and use the load waiting data corresponding to the historical load data among the acquired load waiting data as breakpoint load data, and It may include updating the load waiting data acquired based on the breakpoint load data.
[0151] According to one or more embodiments of the present disclosure, (Example 9) provides the method of Example 7. When the data packet state is the being-deployed state, the determination result is to execute an update operation on the data after loading in the waiting-to-be-deployed state, Executing the update operation based on the determination result is It may include determining breakpoint deployment data in the waiting-to-be-deployed state from the data packet data in the data packet, and updating the data after loading in the waiting-to-be-deployed state based on the breakpoint deployment data.
[0152] According to one or more embodiments of the present disclosure, (Example 10) provides the method of Example 6. After the loading of each load waiting data is completed, updating the load state to the being-deployed state is After the loading of each load waiting data is completed, updating the load state to the load-completed state, and In response to a data deployment command input by the user, updating the load-completed state to the being-deployed state, which may be included, When obtaining the data version of the data after loading corresponding to each load waiting data, deploying the data after loading in the waiting-to-be-deployed state is It may include obtaining the data version of the data after loading corresponding to each load waiting data, and when the data packet is in the being-deployed state, deploying the data after loading in the waiting-to-be-deployed state.
[0153] According to one or more embodiments of the present disclosure, (Example 11) provides the method of Example 1. The above version control method is If the data packet has not been pre-created, it may further include creating a data packet and setting the data packet version to the initial version.
[0154] According to one or more embodiments of the present disclosure, (Example 12) provides the method of Example 1, and the version control method is responding to a data packet deletion command for the data packet, setting the data state of the data packet data in the data packet to an offline state, and setting the data packet state of the data packet to an invalid state, may further be included.
[0155] According to one or more embodiments of the present disclosure, (Example 13) provides the method of Example 12. For the data packet data in the online state, a data packet label corresponding to the data packet is associated. The version control method is may further include deleting the association relationship between the data packet data in the online state and the data packet label.
[0156] According to one or more embodiments of the present disclosure, (Example 14) provides the method of Example 1, and the version control method is responding to a data packet viewing command for the data packet, determining online data whose data version is equal to the data packet version from the data packet data in the data packet, and returning the online data to the command trigger device of the data packet viewing command, may further be included.
[0157] According to one or more embodiments of the present disclosure, (Example 15) provides a method of Example 1, where the load waiting pool is an item cluster pool, the item cluster pool includes at least one item cluster, the load waiting items in each item cluster include a first item or a second item obtained by clustering based on the first item, and at least one item table includes at least one reference table and at least one relationship table associated with each reference table. For each load waiting data, loading the load waiting data into the item table corresponding to the load waiting item in at least one item table based on the load waiting item corresponding to the load waiting data and obtaining the data after loading is For each item cluster, setting the load waiting data corresponding to the first item in the item cluster among each load waiting data as the first load data, and setting the load waiting data corresponding to each second item in the item cluster as the second load data, loading the first load data into the target table corresponding to the first item in the item cluster in at least one reference table and obtaining the data after loading of the first item in the item cluster, For each second load data, using the second item corresponding to the second load data in the item cluster as the current item, loading the second load data into the relationship table corresponding to the current item in at least one relationship table associated with the target table, and obtaining the data after loading of the current item may be included.
[0158] According to one or more embodiments of the present disclosure, (Example 16) provides a version control device, and this device is A data packet version acquisition module configured to acquire a plurality of load-waiting data, data packets corresponding to the plurality of load-waiting data, and data packet versions of the data packets in response to a data load instruction. The data packet corresponds to a load-waiting pool, the load-waiting pool includes a load-waiting item pool or an item cluster pool, the data packet includes at least one item table, and the load-waiting data corresponds to a data packet version acquisition module for a load-waiting item in the load-waiting pool. An increment version acquisition module configured to perform an increment process on the data packet version to obtain an increment version. For each load-waiting data, based on the load-waiting item corresponding to the load-waiting data, load the load-waiting data into the item table corresponding to the load-waiting item in at least one of the item tables to obtain the loaded data, and configure the increment version as the data version of the loaded data. A data version acquisition module. It may include a data packet version acquisition module configured to set the increment version as the data packet version when obtaining the data version of the loaded data corresponding to each load-waiting data.
[0159] Note that although a specific procedure is adopted to describe a plurality of operations, it should not be understood that these operations are required to be executed in the specific procedure or sequential execution shown. In a certain environment, parallel processing of a plurality of tasks may be advantageous. Similarly, although the above discussion includes details of a plurality of implementations, these should not be construed as limitations on the scope of the present disclosure. Some features described in the context of a single embodiment may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may be implemented in a plurality of embodiments alone or in any suitable sub-combination manner.
Claims
1. A version control method, comprising: in response to a data load instruction, obtaining a plurality of data waiting to be loaded, data packets corresponding to the plurality of data waiting to be loaded, and data packet versions of the data packets, wherein the data packets correspond to a load waiting pool, the load waiting pool includes a load waiting item pool or an item cluster pool, the data packets include at least one item table, and the data waiting to be loaded corresponds to a load waiting item in the load waiting pool; performing an increment process on the data packet version to obtain an increment version; for each data waiting to be loaded, based on the load waiting item corresponding to the data waiting to be loaded, loading the data waiting to be loaded into an item table corresponding to the load waiting item in the at least one item table to obtain loaded data, and setting the increment version as the data version of the loaded data; when the data versions of the loaded data corresponding to each data waiting to be loaded are obtained, setting the increment version as the data packet version.
2. After obtaining the loaded data, if the loaded data corresponding to the data waiting to be loaded is not loaded in the data packet, or if the loaded data corresponding to the data waiting to be loaded is loaded in the data packet and the data version of the loaded data is smaller than the data packet version, further setting the data state of the loaded data to a state waiting for deployment; when the data versions of the loaded data corresponding to each data waiting to be loaded are obtained, setting the increment version as the data packet version means: when the data versions of the loaded data corresponding to each data waiting to be loaded are obtained, performing deployment on the loaded data in the state waiting for deployment, and updating the data state of the loaded data after deployment from the state waiting for deployment to an online state. When the data state of the data after each load is the online state, setting the incremental version as the data packet version, the method according to claim 1, comprising:
3. Updating the data state of the previous load data that was previously loaded into the data packet and does not correspond to the data waiting to be loaded, among all the previous load data, from the online state to the state waiting for deployment; Determining the data waiting for deployment from the data packet data in the data packet, wherein the data after loading in the state waiting for deployment is the first deployment data among the data waiting for deployment, and the data version is greater than the data packet version; further comprising: Performing deployment on the data after loading in the state waiting for deployment, and updating the data state of the data after loading after deployment from the state waiting for deployment to the online state, which is: Determining the first deployment data from the data waiting for deployment, performing deployment on the first deployment data based on the first deployment method corresponding to the first deployment data, and updating the data state of the first deployment data after deployment from the state waiting for deployment to the online state, the method according to claim 2, comprising:
4. The previous load data in the state waiting for deployment is the second deployment data among the data waiting for deployment, and the data version is equal to the data packet version, and the method comprises: Determining the second deployment data from the data waiting for deployment, performing deployment on the second deployment data based on the second deployment method corresponding to the second deployment data, and further comprising updating the data state of the second deployment data after deployment from the state waiting for deployment to the offline state, the method according to claim 3, comprising:
5. The first deployment method includes adding a data packet label corresponding to the data packet; The method according to claim 4, satisfying at least one of the second deployment method including deleting a data packet label corresponding to the data packet.
6. After obtaining the data packets corresponding to the multiple data waiting to be loaded, Updating the data packet state of the data packet from the valid state to the loading state; After the loading of each piece of data waiting to be loaded is completed, updating the loading state to the state of being in deployment; When the data state of the data after each loading is the online state, further including updating the state of being in deployment to the valid state, the method according to claim 2.
7. In response to a breakpoint resume command, obtaining the data packet state; Based on the data packet state, determining to execute an update operation on the obtained data waiting to be loaded or the data after loading in the deployment waiting state, and executing the update operation based on the determination result, the method according to claim 6.
8. When the data packet state is the loading state, the determination result is to execute an update operation on the obtained data waiting to be loaded; Executing the update operation based on the determination result is: Determining historical load data whose data version is less than or equal to the data packet version from the data packet data in the data packet, and using the data waiting to be loaded corresponding to the historical load data among the obtained data waiting to be loaded as breakpoint load data; Updating the obtained data waiting to be loaded based on the breakpoint load data, the method according to claim 7.
9. When the data packet state is the state of being in deployment, the determination result is to execute an update operation on the data after loading in the deployment waiting state; Executing the update operation based on the determination result is: Determining breakpoint deployment data in the deployment waiting state from the data packet data in the data packet, and updating the data after loading in the deployment waiting state based on the breakpoint deployment data, the method according to claim 7.
10. After the loading of each piece of data waiting to be loaded is completed, updating the loading state to the state of being in deployment is: After the loading of each piece of data waiting to be loaded is completed, updating the loading state to the loading completed state; In response to a data deployment command input by the user, updating the loading completed state to the state of being in deployment, When obtaining the data version of the data after loading corresponding to each piece of data waiting to be loaded, executing deployment on the data after loading in the deployment waiting state is: Obtaining the data version of the data after loading corresponding to each load-waiting data, and when the data packet is in the deployment state, performing deployment on the data after loading in the deployment-waiting state, the method according to claim 6.
11. When the data packet is not pre-created, further comprising creating the data packet and setting the data packet version to the initial version, the method according to claim 1.
12. In response to a data packet deletion command for the data packet, setting the data state of the data packet data in the data packet to the offline state, and Setting the data packet state of the data packet to the invalid state, further comprising the method according to claim 1.
13. For the data packet data in the online state, a data packet label corresponding to the data packet is associated therewith, and the method comprises Further comprising deleting the association between the data packet data in the online state and the data packet label, the method according to claim 12.
14. In response to a data packet viewing command for the data packet, determining online data from the data packet data in the data packet whose data version is equal to the data packet version, and Returning the online data to the command trigger device of the data packet viewing command, further comprising the method according to claim 1.
15. The load-waiting pool is the item cluster pool, the item cluster pool includes at least one item cluster, the load-waiting items in each item cluster include a first item or a second item obtained by clustering based on the first item, and the at least one item table includes at least one reference table and at least one relationship table associated with each reference table. For each load-waiting data, based on the load-waiting item corresponding to the load-waiting data, loading the load-waiting data into the item table corresponding to the load-waiting item among the at least one item table to obtain the data after loading. For each item cluster, among each piece of load waiting data, the load waiting data corresponding to the first item in the item cluster is defined as first load data, and the load waiting data corresponding to each second item in the item cluster is defined as second load data, and loading the first load data into the target table corresponding to the first item in the item cluster among the at least one reference table, and obtaining the data after loading of the first item in the item cluster, and for each second load data, using the second item corresponding to the second load data in the item cluster as the current item, loading the second load data into the relationship table corresponding to the current item among the at least one relationship table associated with the target table, and obtaining the data after loading of the current item, the method according to claim 1, comprising.
16. A version control device, a data packet version acquisition module configured to acquire a plurality of pieces of load waiting data, data packets corresponding to the plurality of pieces of load waiting data, and the data packet version of the data packets in response to a data load command, wherein the data packets correspond to a load waiting pool, the load waiting pool includes a load waiting item pool or an item cluster pool, at least one item table is included in the data packets, and the load waiting data corresponds to the load waiting items in the load waiting pool, a data packet version acquisition module, and an increment version acquisition module configured to perform an increment process on the data packet version to obtain an increment version, and for each piece of load waiting data, based on the load waiting item corresponding to the load waiting data, loading the load waiting data into the item table corresponding to the load waiting item among the at least one item table, obtaining the data after loading, and a data version acquisition module configured to set the increment version as the data version of the data after loading. A version control device including a data packet version acquisition module configured to set the increment version as the data packet version when obtaining the data version of the data after loading corresponding to each of the load-waiting data.
17. At least one processor and a memory configured to store at least one program, wherein when the at least one program is executed by the at least one processor, the at least one processor realizes the version control method according to any one of claims 1 to 15. An electronic device.
18. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the version control method according to any one of claims 1 to 15 is realized.
19. A computer program including a computer program included on a non-transitory computer-readable medium, the computer program including program code used for executing the version control method according to any one of claims 1 to 15.
Citation Information
Patent Citations
Commodity data management method and device, computer equipment and storage medium
CN108108392A
Commodity information updating processing method and device, equipment, medium and product
CN114328555A
Deployment version management
US9235409B1