Version control method, version control device, electronic device, computer-readable storage medium, and computer program
The version control method ensures data version consistency by incrementally managing data packet versions during loading, addressing the lack of consistency in existing systems.
Patent Information
- Application Number
- JP2024573761
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-07-01
- Filing Date
- 2023-06-13
- Publication Date
- 2026-02-19
- Estimated Expiration
- 2043-06-13
AI Technical Summary
Existing systems lack a method to ensure consistency between data versions corresponding to each piece of data waiting to be loaded and the data packet version during the data loading process.
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 the increment version, and setting the increment version as the data version of the loaded data, ensuring consistency between data versions and packet versions.
Ensures the consistency of data versions during loading by using an increment version to manage data packet versions, allowing accurate and up-to-date data application.
Smart Images

Figure 0007818107000001 
Figure 0007818107000002 
Figure 0007818107000003
Abstract
Description
[Technical Field]
[0001] [CROSS-REFERENCE TO RELATED APPLICATIONS] This application claims priority from a Chinese patent application bearing application number 202210774149.X, filed with the China Patent Office on July 1, 2022, the entire contents of which are incorporated herein by reference.
[0002] The present disclosure relates to the computer technology field, for example, to a version control method, device, electronic device, and storage medium. [Background technology]
[0003] In product management, the products with potential, quality, and popularity selected automatically or manually can be used for accurate investment promotion guidance. To effectively utilize these products, the relevant data can be loaded into the management platform for the management personnel to apply.
[0004] As time passes, these data may change. In order to apply data that matches the current actual situation, version control can be performed on these data when they are loaded into the operating platform. However, there is no related solution that can achieve this function. Summary of the Invention [Problem to be solved by the invention]
[0005] The present disclosure provides a version control method, device, electronic equipment, and storage medium for ensuring consistency between a data version corresponding to each piece of data waiting to be loaded and a data packet version. [Means for solving the problem]
[0006] According to a first aspect, the present disclosure provides a version control method, the method comprising: In response to a data load command, obtain a plurality of load waiting data, a data packet corresponding to the plurality of load waiting data, 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 load waiting data 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 item waiting to be loaded, load the data item waiting to be loaded into an item table corresponding to the item waiting to be loaded among at least one item table based on the item waiting to be loaded corresponding to the data item waiting to be loaded, obtain data after loading, and set the increment version as the data version of the data after loading; When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, the increment version is set as the data packet version.
[0007] According to a second aspect, the present disclosure further provides a version control device, the device comprising: a data packet version acquisition module configured to acquire, in response to a data load command, a plurality of load-waiting data, data packets corresponding to the plurality of load-waiting data, 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 load-waiting data corresponds to a load-waiting item in the load-waiting pool; an increment version obtaining module configured to perform an increment operation on the data packet version to obtain an increment version; a data version acquisition module configured to load, for each data item waiting to be loaded, the data item waiting to be loaded into an item table corresponding to the item waiting to be loaded among at least one item table according to the item waiting to be loaded corresponding to the data item waiting to be loaded, obtain data after loading, and set the increment version as the data version of the data after loading; The data packet version acquisition module may further include a data packet version acquisition module configured to, when obtaining the data version of the loaded data corresponding to each of the data waiting to be loaded, set the incremented version as the data packet version.
[0008] According to a third aspect, the present disclosure further provides an electronic device, the electronic device comprising: one or more processors; and a memory configured to store one or more programs; When one or more programs are executed by one or more processors, they cause the one or more processors to implement the version control method described above.
[0009] According to a fourth aspect, the present disclosure further provides a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the above version control method.
[0010] According to a fifth aspect, the present disclosure further provides a computer program product, the computer program product comprising a computer program contained on a non-transitory computer readable medium, said computer program comprising program code for use in performing the version control method described above. [Brief explanation of the drawings]
[0011] [Figure 1] 1 is a flowchart of a version control method provided by an embodiment of the present disclosure. [Figure 2a]1 is a timing chart of data packet deletion in a version control method provided by an embodiment of the present disclosure; [Figure 2b] 1 is a timing chart of data packet browsing in a version control method provided by an embodiment of the present disclosure; [Figure 3a] FIG. 10 is a schematic diagram of the output of a product selection pool in a version control method provided by an embodiment of the present disclosure. [Figure 3b] FIG. 1 is a schematic diagram of data distribution in a version control method provided by an embodiment of the present disclosure. [Figure 4] FIG. 1 is a schematic diagram of a product package model in a version control method provided by an embodiment of the present disclosure; [Figure 5] 1 is a flowchart of another version control method provided by an embodiment of the present disclosure. [Figure 6] 1 is a flowchart of another version control method provided by an embodiment of the present disclosure. [Figure 7] 1 is a flowchart of another version control method provided by an embodiment of the present disclosure. [Figure 8] 1 is a timing chart of a breakpoint restart in a version control method provided by an embodiment of the present disclosure; [Figure 9] FIG. 2 is a flow diagram of the complete functionality of a version control method provided by an embodiment of the present disclosure. [Figure 10a] 1 is a first timing chart of the complete function of the version control method provided by the embodiment of the present disclosure; [Figure 10b] 10 is a second timing chart of the complete function of the version control method provided by the embodiment of the present disclosure; [Figure 11] FIG. 1 is a block diagram illustrating a configuration of a version control device provided by an embodiment of the present disclosure. [Figure 12] 1 is a schematic diagram illustrating the configuration of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0012] The following describes embodiments of the present disclosure with reference to the drawings. Although several embodiments of the present disclosure are shown in the drawings, the present disclosure can be realized in various forms, and these embodiments are provided for understanding the present disclosure. The drawings and embodiments of the present disclosure are for illustrative purposes only.
[0013] The steps described in the method embodiments of the present disclosure may be performed in a different order and / or in parallel. Method embodiments may also include additional steps and / or omit steps shown. The scope of the present disclosure is not limited in this respect.
[0014] As used herein, the term "including" and variations thereof are open inclusive, i.e., "including, but not limited to." The term "based on" means "based at least in part on." The term "in one embodiment" means "at least one embodiment," the term "in another embodiment" means "at least one other embodiment," and the term "in some embodiments" means "at least some embodiments." Relevant definitions of other terms are provided below.
[0015] The concepts of "first", "second", etc. mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of functions performed by these devices, modules or units.
[0016] It should be understood by those skilled in the art that the modifications "a" and "a plurality" referred to in this disclosure are general and not limiting, and should be understood as "one or more" unless the context indicates otherwise.
[0017] The names of messages or information exchanged between devices in the embodiments of the present disclosure are used for descriptive purposes only and are not intended to limit the scope of these messages or information.
[0018] 1 is a flowchart of a version control method provided by an embodiment of the present disclosure. This embodiment can be applied to controlling data versions and data packet versions during data loading. This method can be performed by a version control device provided by an embodiment of the present disclosure. This device can be implemented in software and / or hardware. This device can be integrated into an electronic device, which can 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 load command, obtain a plurality of data waiting to be loaded, a data packet corresponding to the plurality of data waiting to be loaded, and a data packet version of the data packet, where the data packet corresponds to a pool waiting to be loaded, the pool waiting to be loaded includes an item pool or an item cluster pool waiting to be loaded, the data packet includes at least one item table, and the data waiting to be loaded corresponds to an item waiting to be loaded in the pool waiting to be loaded.
[0021] The data load command may be a command used to load data to a data packet corresponding to the load-waiting data, and in response to the data load command, a plurality of load-waiting data, a data packet, and a data packet version of the data packet may be acquired. The above steps may directly acquire a data packet, which means that the data packet has already been created in advance. If the data packet has not been created in advance, after acquiring the plurality of load-waiting data, the version control method may further include creating the data packet and setting the data packet version of the data packet to an initial version, thereby ensuring subsequent successful acquisition of the data packet and the data packet version of the data packet, and the initial version may be a predetermined data packet version.
[0022] The data packet corresponds to a waiting-to-load pool, which may be an item pool or item cluster pool waiting to be loaded (i.e., there is a demand for data loading); in actual applications, the item pool may include at least one waiting-to-load item, and the item cluster pool may include at least one item cluster, each of which may include at least one waiting-to-load item. The waiting-to-load data corresponds to the waiting-to-load items in the waiting-to-load pool, and the data packet includes at least one item table; in actual applications, each item table may correspond to one or more waiting-to-load items in the waiting-to-load pool; therefore, the data loading process realized based on the following steps may be understood as a process of loading waiting data corresponding to each waiting-to-load item in the waiting-to-load 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 incremented version, for example, the result obtained by data packet version + N is the incremented version, where N may be any positive integer.
[0025] S130: For each data waiting to be loaded, load the data waiting to be loaded into an item table corresponding to the item waiting to be loaded among at least one item table based on the item waiting to be loaded corresponding to the data waiting to be loaded, obtain data after loading, and set the increment version as the data version of the data after loading.
[0026] In one data loading process, multiple pieces of data waiting to be loaded may need to be loaded. Here, the following steps may be performed for each piece of data waiting to be loaded: Based on the items waiting to be loaded corresponding to the data waiting to be loaded, determine the item table corresponding to the items waiting to be loaded from at least one item table; load the data waiting to be loaded into the item table to obtain the loaded data corresponding to the items waiting to be loaded, with the previously obtained incremented version being the data version of the loaded data. In practical applications, the data waiting to be loaded may be the item identifiers of the items waiting to be loaded. During the data loading process, the item identifiers can be used to accurately determine the corresponding items waiting to be loaded from the multiple items waiting to be loaded. Accurately determining the corresponding item table from the at least one item table can ensure the accuracy of the data loading. Furthermore, the fields under the item table may include at least the data packet identifier of the data packet, the item identifier of the items waiting to be loaded, and the data version of the loaded data corresponding to the items 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, so the data after loading is both the data in the item table and the data in the data packet.
[0028] In actual applications, when pre-loaded data corresponding to the data waiting to be loaded is not loaded into a data packet, the process of loading the data waiting to be loaded may be understood as a process of directly inserting the data waiting to be loaded into the data packet. When pre-loaded data is loaded into a data packet, this may occur when a piece of data has already been loaded into a data packet in the past, but the value of this data has changed over time and it needs to be reloaded into the data packet. In this case, the process of loading the data waiting to be loaded may be understood as a process of updating the pre-loaded data in the data packet based on the data waiting to be loaded.
[0029] S140: When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, the incremented version is set as the data packet version.
[0030] When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, that is, when the loading of each data waiting to be loaded is completed and the loaded data corresponding to each data waiting to be loaded all have their own data versions, the previously obtained increment version may be used as the data packet version, thereby ensuring the consistency of the data version of each loaded data in the data packet and the data packet version.
[0031] The technical solution of the embodiment of the present disclosure responds to a data load command to obtain 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, where the data packets correspond to a pool waiting to be loaded, the pool waiting to be loaded including a pool of items waiting to be loaded or an item cluster pool, the data packets including at least one item table, and the data waiting to be loaded corresponds to the items waiting to be loaded in the pool waiting to be loaded, and performs an increment process on the data packet version to obtain an increment version, and for each data waiting to be loaded, loads the data waiting to be loaded into an item table corresponding to the item waiting to be loaded among the at least one item table based on the items waiting to be loaded corresponding to the data waiting to be loaded, and obtains the data after loading, thereby realizing a process of loading the data waiting to be loaded into the data packet, and the increment version is 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, the increment version is the data packet version. In the above technical solution, during the data loading process, the data version of the loaded data is controlled by the increment version obtained after performing an increment process on the data packet version, and after each loaded data has its own data version, the data packet version is controlled 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 through a progressive version control policy.
[0032] According to one technical solution, based on the above embodiment, the version control method may further include, in response to a data packet deletion command for a 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 expired state. Here, the data packet deletion command may be a command for deleting the above-mentioned data packet, which is triggered manually or automatically when a preset deletion condition is met. In actual application, in order to achieve 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 expired state. This data packet data may be the data after loading as described above, or may be data loaded into the data packet before responding to the current data load command, etc., but is not limited thereto. Therefore, in response to a data packet deletion command, the data states of all the data packet data in the data packet may be set to an offline state and the data packet state of the data packet may be set to an expired state, so that each data packet data in the data packet cannot be applied, thereby achieving an effect similar to deleting a data packet. Any data belonging to a data packet may be considered as data packet data; in other words, the already mentioned post-load data and loaded data, as well as the previously loaded data, breakpoint load data and breakpoint deployment data, etc., which may be mentioned later, may all be considered as different representations of data packet data in different application scenarios.
[0033] Furthermore, the data packet data in the online state is associated with a data packet label corresponding to the data packet, and the above 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 possible application scenarios related to the embodiments of the present disclosure, a data packet may contain multiple data packet data, so one data packet label (i.e., a data packet label corresponding to a data packet) may be associated with multiple data packet data. When deleting a data packet, in addition to changing the data packet status and the data status, the association between the data packet data and the data packet label may also be deleted, so that the data packet data in the deleted data packet is no longer associated with the remaining contents, thereby realizing thorough deletion of the data packet.
[0034] In order to understand the above data packet deletion method, the following will be illustratively described with examples, together with possible application scenarios related to the embodiments of the present disclosure. For example, referring to Figure 2a, taking the example where the data packet is a data packet of a commodity (hereinafter referred to as a commodity package) and the data packet data is commodity data (hereinafter referred to as a commodity), first obtain the commodity pool to be deleted on the data platform, then view the commodity packages corresponding to the commodity pool on the operating platform, view the commodity in the commodity package, remove the commodity package labels corresponding to the online commodity in the commodity package stored in the commodity middle platform label center, and then delete all commodity in the commodity package, i.e., modify the commodity status of all commodity to offline, and delete the commodity package, i.e., set the commodity package status of the commodity package to expired, thereby realizing the effective deletion of the commodity package and the effective deletion of the commodity pool.
[0035] According to another technical solution, the version control method may further include, in response 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 a command triggering device of the data packet viewing command. Here, the data packet viewing command may be a command for viewing the data packet data in the data packet triggered by a user. In response to this data packet viewing command, the loaded data currently loaded into the data packet is data meaningful for viewing that matches the current actual situation, so the data version of the loaded data 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 a command triggering device of the data packet viewing command, such as a back-platform front-end device 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 loaded data described above, and is simply named differently here to distinguish between different situations and not to limit their substantive meanings.
[0036] In order to better visualize the above data packet browsing method, the following will exemplarily illustrate possible application scenarios of the embodiments of the present disclosure with examples. For example, referring to Fig. 2b, still taking the example that the data packet is a product package and the data packet data is a product, first obtain the product pool to be browsed on the data platform, then browse the product package corresponding to the product pool on the operation platform, and then browse the products whose product version in the product package is equal to the product package version, and then render these products back on the page, so that the operation staff can effectively browse the corresponding products.
[0037] For the following two technical solutions, the application scenarios of these two technical solutions will be described here as examples. Illustratively, the related data of commodities selected (i.e., mined) automatically or manually may be stored in the data platform in the form of a commodity pool (which may be referred to herein as a commodity selection pool), and the production characteristics of these commodity 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 (e.g., week, month, or year), and the following describes an example in which the preset cycle is week.
[0039] 2. Some types of product selection pools produce a new independent pool every week (i.e., unrelated to the previous output), such as popular search terms, hot news, or hot topics, because the content of these pools varies greatly in different weeks, so the related products selected every week may be completely different, and the life cycle of such types of product selection pools is short.
[0040] 3. Some types of product selection pools remain constant forever, and only the products in them are updated each time they are produced (i.e., full update), such as popular products. This is because although the contents change every week, the changes are not particularly large. Therefore, there are relatively few such product selection pools, and they can be maintained forever.
[0041] 4. The number of products in the product selection pool is often enormous.
[0042] Considering the possible application scenarios related to the embodiments of the present disclosure, and in accordance with the data flow diagram shown in FIG. 3b (the product selection pool reporting process in the figure may be understood as the data loading process described above), the criteria for delivering the product selection pool to the operating platform may be as follows:
[0043] 1. Multiple product selection pools can be viewed on the operating platform, and for fully updated product selection pools, only the latest version may be presented, which has been described in the data packet viewing method.
[0044] 2. All product selection pools must be kept permanently for operation, and it may be manually determined whether to delete them or automatically delete them after a long period of time, which has already been described in the data packet deletion method.
[0045] 3. Products in the product selection pool need to be represented at both ends, namely, end B (i.e., merchant end) and end C (i.e., user end). For example, at end B, a merchant may be informed that a product is related to this week's hot spot (in one product selection pool) and a promotional event may be suggested, and at end C, a product in one product selection pool may be provided as a venue or floor on the purchasing guide page for publicity, 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, and the product selection pool label can be automatically loaded into search engines, so that the information representation at both ends B and C can be searched by each search engine.
[0046] While the above description uses a product selection pool as an example, considering business scenarios that may be relevant to embodiments of the present disclosure, in addition to product selection pools, product selection cluster pools may also be relevant. A product selection pool may be understood as a product collection, and a product selection cluster pool may be understood as a collection of product collections. That is, a product selection cluster pool may contain many product selection clusters, and each product selection cluster may be considered as a single product collection. For example, a collection of multiple toothbrushes from the same brand and series as a popular toothbrush of an internet celebrity may appear as a cluster. The remaining toothbrushes may be obtained by clustering based on the popular toothbrush of the internet celebrity. Next, the data loading process for the two business scenarios, the product selection pool and the product selection cluster pool, will be described. Taking the product selection pool as an example, the item pool described below may be obtained by selecting products as in the product selection pool, or by selecting or mining the remaining non-sale items, and is not limited thereto. The same applies to the item cluster pool.
[0047] According to one technical solution, when the waiting-to-load pool includes an item pool, the data loading process has already been described in S130 and will not be further described here. Also, the product selection pool mentioned above may be understood as an example of an item pool.
[0048] According to another technical solution, the load waiting pool is an item cluster pool, and the item cluster pool includes at least one item cluster, and 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 relational table associated with each reference table, and for each load waiting data, the load waiting data is loaded into an item table corresponding to the load waiting items of the at least one item table based on the load waiting items corresponding to the load waiting data, and obtaining the loaded data includes, for each item cluster, clustering the item classes of each load waiting data. the method may include: setting awaiting-to-load data corresponding to a first item in the item cluster as first load data, and setting awaiting-to-load data corresponding to each second item in the item cluster as second load data; loading the first load data into a target table of the at least one reference table corresponding to the first item in the item cluster to obtain loaded data for the first item in the item cluster; and for each second load data, setting a second item in the item cluster corresponding to the second load data as a current item, and loading the second load data into a relational table of the at least one relational table associated with the target table corresponding to the current item to obtain loaded data for the current item.
[0049] The item cluster pool may include at least one item cluster, each of which may include a first item and at least one second item obtained by clustering based on the first item, where the first item and the second item are both the items waiting to be loaded. The at least one item table may include at least one reference table (i.e., an item table corresponding to the first item) and at least one relationship table associated with each reference table. In practical applications, the relationship table may represent the relationship between the first item and the second item obtained by clustering based on the first item. Furthermore, for each item cluster, the loading process of the first load data for the first item and the second load data for each second item may be realized according to the following steps: the first load data is loaded into a target table corresponding to the first item in the at least one reference table; and for each second load data, the second load data is loaded into a relationship table corresponding to the current item in at least one relationship table associated with the target table.
[0050] In practical application, the fields under each reference table may include a data packet identifier of the data packet, an item identifier of the first item, and a data version of the loaded data corresponding to the first item, and the fields under each relationship table may include a data packet identifier, an item identifier, a relationship identifier for identifying a relationship between the first item and a second item, and a data state and a 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, and the data state and the data version here may correspond to the uniquely determined second item.
[0051] In actual applications, the data to be loaded in the above two data loading methods may be raw data directly obtained from the data platform, or may be operational data obtained after processing the raw data and available for user application. For example, for each raw data, fields that do not need to be involved in the operational process may be filtered, structurally aligned, or fields with different business meanings may be converted. This data processing process can be implemented based on a data packet model (i.e., a database). Furthermore, to further understand the above data loading process, the following will continue to use the above-mentioned product package and product as examples to provide an illustrative explanation. For illustrative purposes, see Figure 4.
[0052] In a business scenario 1 of a product selection pool, a field under a 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, and a field under a product table related to any one of the products may include a product selection pool identifier and a product identifier. Through a product package model, the product selection pool table may be converted into a product package table related to product packages, and the product table may be converted into a product table related to the product package table. Fields under the product package table may include a product package identifier, a product package status, a product package version, and other data, and fields under a product table related to the 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, a field under a product selection cluster pool table related to the product selection cluster pool may include a product selection cluster pool identifier, and each product selection cluster pool may include n product selection clusters. A field under a product selection cluster table related to any one of the product selection clusters may include a product selection cluster pool identifier and a product selection cluster identifier, and each product selection cluster may include n products (in the above example, one toothbrush that is a hit product of an internet celebrity corresponds to n toothbrushes of the same brand and series), and a field under a product table related to any one of the products may include a product selection cluster pool identifier, a product selection cluster identifier, and a product identifier. Through a product package model, the product selection cluster pool table may be converted into a product package table related to product packages, the product selection cluster table may be converted into a product table related to the product package table, and the product table may be further converted into a relational table related to the product table. The product package table and product table in business scenario 2 are the same as those in business scenario 1, and the fields under the relationship table may include product package identifier, product identifier, relationship identifier, product status, product version, and other data. In other words, to meet business scenario 2, based on business scenario 1, the product package model further branches out into relationship tables.
[0054] The above example is relatively versatile and can be applied to any type of product loop selection task by loading various business scenarios related to product selection into the product package model (i.e., database).
[0055] 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 loaded data, the version control method may further include: setting the data state of the loaded data to a waiting-to-deploy state when the data packet does not contain loaded data corresponding to the data to be loaded, or when the data packet contains loaded data corresponding to the data to be loaded and the data version of the loaded data is smaller than the data packet version. When the data version of the loaded data corresponding to each of the data to be loaded is obtained, setting the increment version to the data packet version may include: deploying the loaded data in a waiting-to-deploy state when the data version of the loaded data corresponding to each of the data to be loaded is obtained, and updating the data state of the loaded data from the waiting-to-deploy state to an online state after deployment is completed; and setting the increment version to the data packet version when the data state of each of the loaded data is an online state. Here, the interpretation of terms that are the same as or correspond to those in the above embodiment 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 load command, obtain a plurality of load-pending data, a data packet corresponding to the plurality of load-pending data, and a data packet version of the data packet, where the data packet corresponds to a load-pending pool, the load-pending pool includes a load-pending item pool or an item cluster pool, the data packet includes at least one item table, and the load-pending data corresponds to a load-pending item in the load-pending pool.
[0058] S220, perform an increment process on the data packet version to obtain an increment version.
[0059] S230: For each data waiting to be loaded, load the data waiting to be loaded into an item table corresponding to the item waiting to be loaded among at least one item table based on the item waiting to be loaded corresponding to the data waiting to be loaded, obtain the data after loading, and set the increment version as the data version of the data after loading.
[0060] S230 and S240 may be executed in sequence for each data item waiting to be loaded, and via S230, the data item waiting to be loaded may be loaded into the corresponding item table, that is, into a data packet including the item table.
[0061] S240: 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, set the data state of the data after loading to a waiting-to-deploy state.
[0062] As mentioned above, in a data packet, there may be loaded data corresponding to the data waiting to be loaded, or there may 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 equal to the data packet version. Considering possible application scenarios related to the embodiments of the present disclosure, for loaded data whose data version is equal to the data packet version, its data state is online, i.e., it has already been deployed. For loaded data whose data version is smaller than the data packet version, its data state is offline, i.e., it has not been deployed. If there is no corresponding loaded data, the corresponding loaded data needs to be deployed. Therefore, if the loaded data 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 loaded data may be set to a deployment-waiting state. For the former, this is a process from nonexistence to a deployment-waiting state, and for the latter, this is a process from offline to a deployment-waiting state, so that the loaded data can be subsequently deployed.
[0063] The process of setting the data version of the loaded data and the process of setting the data status may be performed sequentially or simultaneously, and are not limited thereto. Furthermore, the online state may be understood as a state currently being applied, and the offline state may be understood as a state not currently being applied. In consideration of possible application scenarios related to the embodiments of the present disclosure, when the entire pool is synchronized, the above step and the subsequent step may be combined to deploy only the products newly added to the pool or the products already in the pool but not currently applied, thereby eliminating the need to repeatedly deploy the products already in the pool and currently being applied, thereby ensuring deployment efficiency.
[0064] S250: When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, the loaded data in the deployment waiting state is deployed, and the data state of the loaded data after the deployment is completed is updated from the deployment waiting state to the online state.
[0065] When each loaded data has its own data version, the loaded data in a waiting state for deployment may be deployed, and the data state of the loaded data may be updated from a waiting state for deployment to an online state after deployment is complete. In actual applications, the deployment operation and data state update operation may be performed sequentially for each loaded data in a waiting state for deployment, or the deployment operation may be performed for all loaded data in a waiting state for deployment, and then the data state update operation may be performed for them, and the implementation method of the deployment operation here may also be, and is not limited to, the labeling operation described above (i.e., the operation of assigning a data packet label) or the sending of a message to notify other tasks of related operations.
[0066] S260, if the data state of the data after each loading is in the online state, the increment version is set as the data packet version.
[0067] When the data state of each loaded data is online, by setting the increment version as the data packet version, all data packet data (i.e., the loaded data here) whose data packet version matches the data version in the data packet is made online.
[0068] In the technical solution of the embodiment of the present disclosure, for the loaded data that has a deployment demand, the data status is set to a waiting-for-deployment status, and then the loaded data that is waiting for deployment is deployed. After the deployment is completed, the data status of the loaded data is updated to online status. When the data status of each loaded data is online status, the increment version is set as the data packet version. This means that by determining whether the data status is online status and / or whether the data version matches the data packet version, the loaded data obtained after this data loading can be accurately referenced from the data packet data in the data packet, which may be considered as data with operational value that matches the current actual situation.
[0069] 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, the version control method may further include, for previous load data that was previously loaded into a data packet and does not correspond to data waiting to be loaded, updating the data state of all previously loaded data that is in an online state from an online state to a deployment-waiting state; and determining deployment-waiting data that is in a deployment-waiting state from the data packet data in the data packet, where the loaded data waiting to be deployed is first deployment data whose data version is greater than the data packet version among the data waiting to be deployed. Deploying the loaded data that is in a deployment-waiting state and updating the data state of the loaded data from the deployment-waiting state to an online state after deployment is completed may include determining first deployment data from the deployment-waiting data, deploying the first deployment data according to a first deployment manner corresponding to the first deployment data, and updating the data state of the first deployment data after deployment from the deployment-waiting state to an online state. Here, interpretations of terms that are the same as or applicable to the above embodiment will not be further described herein.
[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 command, obtain a plurality of load-pending data, a data packet corresponding to the plurality of load-pending data, and a data packet version of the data packet, where the data packet corresponds to a load-pending pool, the load-pending pool includes a load-pending item pool or an item cluster pool, the data packet includes at least one item table, and the load-pending data corresponds to a load-pending item in the load-pending pool.
[0072] S320: perform an increment process on the data packet version to obtain an increment version.
[0073] S330: for each data waiting to be loaded, load the data waiting to be loaded into an item table corresponding to the item waiting to be loaded among at least one item table based on the item waiting to be loaded corresponding to the data waiting to be loaded, obtain 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 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, set the data state of the data after loading to a waiting-to-deploy state.
[0075] S350: For the previous load data that has been loaded into the previous data packet and does not correspond to the data waiting to be loaded, update the data status of the previous load data that is in online status among all the previous load data from online status to waiting to be deployed status.
[0076] In a data packet, there may be loaded data that was previously loaded into the data packet and corresponds to one of the data waiting to be loaded, and there may also be previous load data that was previously loaded into the data packet and does not correspond to any of the data waiting to be loaded, which explains that the previous load data does not match the current situation and cannot be in an online state, which indicates that the data is currently being applied. Therefore, the data state of the previous load data that is in an online state among all the previous load data may be updated from an online state to a waiting to be deployed state.
[0077] S360: determining data awaiting deployment from data packet data in the data packet, where the loaded data awaiting deployment is the first deployment data among the data awaiting deployment whose data version is greater than the data packet version;
[0078] The data packet data waiting to be deployed in the data packet data is referred to as the data waiting to be deployed. At this time, the data waiting to be deployed may be data after loading waiting to be deployed, or may be data previously loaded waiting to be deployed. 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 distinguish between the two later.
[0079] S370: when the data version of the loaded data corresponding to each of the data waiting to be loaded is obtained, first deployment data is determined from the data waiting to be deployed, the first deployment data is deployed based on the first deployment method corresponding to the first deployment data, and the data state of the first deployment data after deployment is updated from a deployment waiting state to an online state.
[0080] The effect of targeted deployment of the first deployment data is achieved by determining first deployment data (i.e., loaded data waiting to be deployed) whose data version is greater than the data packet version from the data waiting to be deployed, and deploying the first deployment data based on a first deployment method corresponding to the first deployment data.
[0081] S380, if the data state of the data after each loading is online, the increment version is set as the data packet version.
[0082] The technical solution of the embodiment of the present disclosure updates the data state of the previously loaded data in an online state from an online state to a state waiting to be deployed. At this time, the data waiting to be deployed may be the loaded data waiting to be deployed or the previously loaded data. Furthermore, considering the difference between the two, the first deployment data (i.e., the loaded data waiting to be deployed) is determined from the data waiting to be deployed based on the numerical relationship between the data version and the data packet version, and the first deployment data is deployed based on the first deployment method corresponding to the first deployment data, thereby realizing the effect of targeted deployment of the first deployment data.
[0083] According to a technical solution, based on the above embodiment, the previous load data in a waiting-for-deployment state is second deployment data among the data waiting-for-deployment, whose data version is equal to the data packet version, and the above version control method may further include determining the second deployment data from the data waiting-for-deployment, deploying the second deployment data according to a second deployment manner corresponding to the second deployment data, and updating the data state of the second deployment data after deployment from a waiting-for-deployment state to an offline state, thereby ensuring the effect of targeted deployment of the second deployment data. Furthermore, the first deployment manner may include adding a data packet label corresponding to the data packet, thereby associating the data packet data in an online state with the data packet, and / or the second deployment manner may include deleting a data packet label corresponding to the data packet, thereby no longer associating the data packet data in an offline state with the data packet. In accordance with possible application scenarios related to the embodiments of the present disclosure, when the full pool is synchronized, the second deployment data that needs to be removed from the full pool can be delabeled in a timely manner, thereby effectively solving the problem of data packet label contamination.
[0084] 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 data packets corresponding to multiple data items waiting to be loaded, the version control method may further include: updating the data packet status of the data packets from a valid status to a loaded status; updating the loaded status to a deploying status after the loading of each data item has been completed; and updating the deploying status to a valid status if the data status of each loaded data item is an online status. Here, the interpretation of terms that are the same as or correspond to those in the above embodiment 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 command, obtain a plurality of load-pending data, a data packet corresponding to the plurality of load-pending data, and a data packet version of the data packet, where the data packet corresponds to a load-pending pool, the load-pending pool includes a load-pending item pool or an item cluster pool, the data packet includes at least one item table, and the load-pending data corresponds to a load-pending item in the load-pending pool.
[0087] S420: update the data packet state of the data packet from the valid state to the loaded state, and perform an increment process on the data packet version to obtain an increment version.
[0088] When responding to a data load command, if a data packet is obtained, this indicates that this data packet has been created previously and is currently in a valid state. The data packet state and data packet version of the data packet jointly serve as indicators to identify the start and end of different processes (e.g., data load process, data deployment process, and data application process), and the data state can now be updated from a valid state to a loaded state, thereby indicating the start of the data load process.
[0089] S430: for each data waiting to be loaded, load the data waiting to be loaded into an item table corresponding to the item waiting to be loaded among at least one item table based on the item waiting to be loaded corresponding to the data waiting to be loaded, obtain 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 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, set the data state of the data after loading to a waiting-to-deploy state.
[0091] S450: When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, the data packet state is updated from the loaded state to the deployed state.
[0092] When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, this explains that the loading of all data waiting to be loaded has already been completed, thereby marking the end of the data loading process and the start of the data deployment process by updating the data packet state from the loaded state to the deploying state.
[0093] S460: Deploy the loaded data in the deployment waiting state, and update the data state of the loaded data after the deployment is completed from the deployment waiting state to online state.
[0094] S470, if the data state of the data after each loading is online, the increment version is set as the data packet version, and the data packet state is updated from the deploying state to the valid state.
[0095] When the data status of each loaded data is online, this indicates that all loaded data in the data packet matches the current actual situation and has certain operational value, so the data packet status can be updated from the deploying status to the valid status to mark the end of the data deployment process and the start of the data application process.
[0096] The technical proposal of the embodiments of the present disclosure can use the data packet status and the data packet version as joint indicators to mark the beginning and end of different processes by updating the data packet status accordingly at different stages, thereby ensuring the smooth running of the entire process.
[0097] According to one technical solution, based on the above embodiment, the above version control method may further include: acquiring a data packet status in response to a breakpoint resume command; determining, based on the data packet status, to perform an update operation on the acquired data waiting to be loaded or the loaded data waiting to be deployed; and performing the update operation based on the determination result. Considering possible application scenarios related to the embodiments of the present disclosure, in response to a data loading command, it may be necessary to load a large amount of data waiting to be loaded from the data platform. In this case, a batch loading method may be adopted to realize the data loading process. However, during this period, due to uncontrollable issues such as network abnormalities, a situation may occur where some of the data waiting to be loaded is successfully loaded and some of the data waiting to be loaded fails. When the above situation occurs, a breakpoint resume command can be triggered, and a breakpoint resume function can be realized by responding to the breakpoint resume command, in order to avoid the occurrence of a situation where data waiting to be loaded that has already been loaded is repeatedly loaded or data waiting to be deployed that has already been deployed is repeatedly deployed. In response to a triggered breakpoint resume command, a data packet state is acquired, and the data packet state may indicate whether the data is currently in the data loading process or the data deployment process. Based on the data packet state, it is possible to determine whether to perform an update operation on the acquired data waiting to be loaded (this applies when the data is currently in the data loading process and loading of some of the acquired data waiting to be loaded has already been completed), or whether to perform an update operation on the loaded data waiting to be deployed (this applies when the data is currently in the data deployment process and some of the loaded data waiting to be deployed has already been deployed). By performing the update operation based on the determination result, it is possible to realize a breakpoint resume function, i.e., the function of continuing loading or deployment from the interrupted position, thereby ensuring the timeliness of data processing.In practice, since the data packet state is determined based on the above version control mechanism, the breakpoint resume function here may be understood to be realized under the above version control mechanism.
[0098] Furthermore, if the data packet state is a load state, the determination result is to perform an update operation on the acquired load-waiting data, and performing the update operation based on the determination result may include determining history load data whose data version is equal to or lower than the data packet version from the data packet data in the data packet, setting the load-waiting data corresponding to the history load data among the acquired load-waiting data as breakpoint load data, and updating the acquired load-waiting data based on the breakpoint load data. Here, the history load data may be understood as data previously loaded in the data packet, and may correspond to data that needs to be loaded in the data packet again this time, or may correspond to data that does not need to be loaded in the data packet this time. Therefore, by determining breakpoint load data that needs to be loaded this time but has not yet been loaded in the data packet from the load-waiting data acquired based on the history load data, the acquired load-waiting data can be updated based on the breakpoint load data, making it easy to subsequently load only the breakpoint load data, thereby realizing the breakpoint load function.
[0099] If the data packet state is in the deploying state, the determination result is to perform an update operation on the loaded data in a waiting-to-deploy state, and performing the update operation according to the determination result may include determining breakpoint deployment data in a waiting-to-deploy state from the data packet data in the data packet, and updating the loaded data in a waiting-to-deploy state according to the breakpoint deployment data. Here, the data packet data that has already been deployed in the data packet is in an online state or an offline state, and only the data packet data that has not been deployed is in a waiting-to-deploy state. Therefore, in order to subsequently deploy only the breakpoint deployment data, the data packet data in a waiting-to-deploy state may be used as the breakpoint deployment data, thereby realizing the breakpoint deployment function.
[0100] To understand the above breakpoint restart scheme, the following will continue to use the product package and product in the above example as an example to explain it illustratively. For example, referring to FIG. 8, in response to a breakpoint restart command, if 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, product loading process, and product deployment process can be performed. If the product package state is in the loading state, this indicates that the initialization stage has been completed but the loading stage has not yet been completed, and the product loading process and product deployment process can be performed. If the product package state is in the deployment state, this indicates that the initialization stage and the loading stage have both been completed but the deployment stage has not yet been completed, and the product deployment process can be performed. In actual application, in business scenario 1, the product may be a product within a product package, and in business scenario 2, the product may be a product represented by a product-in-product relationship.
[0101] According to another technical solution, based on the above embodiment, updating the load status to a deploying status after the loading of each piece of data waiting to be loaded is completed may include updating the load status to a loaded completed status after the loading of each piece of data waiting to be loaded is completed, and updating the loaded completed status to a deploying status in response to a data deployment command input by a user. Deploying the loaded data waiting to be deployed when obtaining a data version of the loaded data corresponding to each piece of data waiting to be loaded may include obtaining a data version of the loaded data corresponding to each piece of data waiting to be loaded, and deploying the loaded data waiting to be deployed when the data packet is in the deploying status. Here, setting the loaded status separates the loaded status and the deploying status, and the loaded data in the data packet in the loaded completed status can be viewed by the user. In the loaded status, the user can decide whether to deploy the loaded data waiting to be deployed. If the user decides to deploy the loaded data waiting to be deployed, updating the loaded status to a deploying status achieves the data deployment function. The above technical solution decouples the two operations of loading and deployment, so that when the deployment operation takes a long time to complete, the user can preview the data after loading, and the data throughput capacity of the operating platform can be improved.
[0102] To fully understand the above technical solutions, the following will continue to use the product packages and products in the above example as an example to provide an illustrative explanation. For example, referring to FIG. 9 , taking business scenario 1 as an example, after the data platform notifies the operating platform that a product selection pool is ready, it may first determine whether a product package corresponding to this product selection pool exists in the operating platform. If a product package corresponding to this product selection pool does not exist in the operating platform, it will create a product package in the initialization phase, with its product package state being initialized and its product package version being 0 (this can be achieved by inserting a statement in Structured Query Language (SQL)), and then enter the load phase to update the initialization state to loaded. If a product package corresponding to this product selection pool exists in the operating platform, it will note that a corresponding product package previously existed in the valid state (here, the product package version is assumed to be v), and directly enter the load phase to update the product package state from valid to loaded.
[0103] During the loading phase, two main cases can be considered:
[0104] Case 1: For any one product X in the newly loaded (i.e., ready) product selection pool, we will further divide it into two smaller cases. Case (11) is when X does not exist in the product package, which means it cannot be queried by product version <= v, and X can be directly loaded into the product package, with the product status of X being awaiting deployment and the product version being v+1. Case (12) is when X exists in the product package, which means it can be queried by product version <= v, and if the queried X is in an online state, we can directly increment its product version by +1 to v+1 and perform a corresponding update to X itself. If the queried X is in an offline state, we can interpret this as its product version being in the historical version, and update the offline state to awaiting deployment, and update its product version to v+1 and perform a corresponding update to X itself.
[0105] Case 2: When any one of the products Y already in the product package does not appear in the newly loaded product selection pool, this case is further divided into two subcases for consideration. Case (21) If Y is online, its product status can be updated to awaiting deployment and the product version can be kept at v; Case (22) If Y is offline, no processing is required, i.e., the product status and product version are not changed.
[0106] At this time, after the processing of each X and each Y is completed, the process proceeds from the loading phase to the deployment phase, and the product package status is updated from the loading state to the deploying state. Product Z in the product package that is waiting to be deployed is queried. Taking labeling (i.e., adding a product package label corresponding to the product package) and delabeling (i.e., removing a product package label) as examples, the deployment of each Z is completed by labeling Z with product version v+1 and delabeling Z with product version v. The product package status is then updated from the deploying state to the valid state, and the product package version is incremented 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 are all online. The product versions of Y that do not need to be updated are all smaller than the product package version and are all offline.
[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 load phase, the load phase can be directly and completely re-executed. The above solution determines that there is no need to repeatedly operate on products whose product status and product version have already been updated before the breakpoint. Similarly, when a breakpoint occurs at any position in the deploy phase, the deploy phase can be directly and completely re-executed. The above solution determines that there is no need to repeatedly operate on products whose product status and product version have already been updated before the breakpoint.
[0109] 2. The state + version forward method can avoid system instability caused by data + long transactions, thereby improving system stability and throughput capacity. In addition, combined with point 1, it can intelligently store the completion state of data synchronization before the breakpoint without requiring the method of full synchronization + transaction at one time.
[0110] 3. Because the data platform often notifies the operating platform to load the latest product selection pool using an asynchronous message method, if a situation such as temporary network congestion occurs, resent messages may be backlogged and arrive at the operating platform until the network is restored. Therefore, by adopting the CASABA method to promote the state, potential concurrency issues can be avoided and security can be improved. As an example of the CASABA method, when updating the product package status from deploying to effective, the method update set status='effective', version=v+1 where status='deploying' and version=v can be adopted, where version may represent the product package version.
[0111] To better understand the above example, the following describes it from a different perspective. For example, refer to Figures 10a and 10b. Figure 10a mainly illustrates the product initialization process and the product loading process, and Figure 10b mainly illustrates the product deployment process. In Figure 10a, during 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 a corresponding product package does not exist in the product selection pool, it creates a product package. If a corresponding product package exists, it updates the product package status from the valid state to the initialized state. At this time, the product initialization process ends and the product loading process begins. During the product loading process, the product package status is updated from the initialized state to the loaded state, and products whose product versions in the product package are equal to or lower than the product package version are queried. When a bulk request is made to acquire a product from the product selection pool, if this product is not in the queried products, this product is created, its product status is awaiting deployment, and its product version is product package version + 1. If this product is in the queried products, if this product version is equal to the product package version, its product version is updated and its product status is maintained. If this product version is less than the product package version, its product version is updated and its product status is updated to awaiting deployment. Referring to Figure 10b, after all product processing in the product selection pool is completed, the product loading process ends and the product deployment process begins. In the product deployment process, the product package status is updated from loaded to deployed, and products in the product package that are awaiting deployment are queried, and each queried product is cycled through. When the product version of the inquired product is greater than the product package version, the product middle platform label center labels the product and updates the product status to online, and when the product version of the inquired product is equal to or less than the product package version, the product middle platform label center delabels the product and updates the product status to offline.After the deployment of each queried product is completed, the product package status is updated to valid and the product package version is incremented by 1. At this time, all product processing processes are completed.
[0112] 11 is a structural block diagram of a version control device provided by an embodiment of the present disclosure, which is configured to perform the version control method according to any of the above embodiments. This device and the version control method of the above embodiments belong to the same concept, and details not described in detail in the version control device embodiment can be referred to the above version control method embodiment. 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, in response to a data load command, 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 including a load waiting item pool or an item cluster pool, the data packets include at least one item table, and the load waiting data correspond to items waiting to be loaded 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, for each data waiting to be loaded, to load the data waiting to be loaded into an item table corresponding to the item waiting to be loaded among the at least one item table based on the items waiting to be loaded corresponding to the data waiting to be loaded, to 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 it obtains the data version of the data after loading corresponding to each data waiting to be loaded.
[0113] Based on the above device, this device: The data packet version acquisition module 540 may further include a deployment waiting state setting module configured to set the data state of the loaded data to a deployment waiting state when, after obtaining the loaded data, the loaded data corresponding to the loaded data is not loaded in the data packet, or when the loaded data corresponding to the loaded data is loaded in the data packet and the data version of the loaded data is smaller than the data packet version, and the data packet version acquisition module 540: The system may include an online status update unit configured to deploy the loaded data in a deployment waiting state when the data version of the loaded data corresponding to each of the data waiting to be loaded is obtained, and to update the data status of the loaded data after the deployment is completed from the deployment waiting state to an online status, and a data packet version acquisition unit configured to set the increment version to the data packet version when the data status of each of the loaded data is in the online state.
[0114] Based on this, the version control device: The data waiting for deployment method may further include a deployment waiting state update module configured to update a data state of the previous load data that is in an online state among all the previous load data from an online state to a deployment waiting state for the previous load data that was previously loaded into the data packet and does not correspond to the data waiting to be loaded, and a deployment waiting state determination module configured to determine the deployment waiting state from the data packet data in the data packet, wherein the loaded data waiting for deployment is the first deployment data among the deployment waiting data whose data version is greater than the data packet version, and the online state update unit: The system may include an online status update subunit configured to determine first deployment data from the deployment-waiting data, deploy the first deployment data based on a first deployment method corresponding to the first deployment data, and update a data status of the first deployment data after deployment from a deployment-waiting status to an online status.
[0115] Based on this, the previous load data waiting to be deployed is the second deployment data among the data waiting to be deployed, the data version of which is equal to the data packet version, and the version control device: The system may further include an offline status update module configured to determine second deployment data from the deployment-awaiting data, deploy the second deployment data based on a second deployment method corresponding to the second deployment data, and update a data status of the second deployment data after deployment from a deployment-awaiting status to an offline status.
[0116] Based on this, the first allocation manner includes adding a data packet label corresponding to the data packet, and / or the second allocation manner includes deleting a data packet label corresponding to the data packet.
[0117] The version control device includes: The system may further include a load status update module configured to update a data packet status of a data packet from a valid status to a loaded status after obtaining data packets corresponding to a plurality of data waiting to be loaded, a deploying status update module configured to update the loaded status to a deploying status after loading of each of the data waiting to be loaded is completed, and a valid status update module configured to update the deploying status to a valid status when the data status of each of the loaded data is an online status.
[0118] Based on this, the version control device: The system may further include a data packet state acquisition module configured to acquire a data packet state in response to a breakpoint resume command, and an update operation execution module configured to determine, based on the data packet state, to perform an update operation on the acquired data waiting to be loaded or loaded data waiting to be deployed, and to execute the update operation based on the determination result.
[0119] Based on this, if the data packet state is a loading state, the judgment result is to perform an update operation on the acquired loading waiting data, and the update operation execution module: The data processing device may include a breakpoint load data acquisition unit configured to determine historical load data whose data version is equal to or less than the data packet version from the data packet data in the data packet, and to 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] If the data packet state is in the deploying state, the judgment result is to perform an update operation on the loaded data in the deploying waiting state, and the update operation execution module: The data transfer method may include a post-load data update unit configured to determine breakpoint deployment data awaiting deployment from the data packet data in the data packet and update the post-load data awaiting deployment based on the breakpoint deployment data.
[0121] The deployment status update module is The online system may include a load completion status updating unit configured to update the load status to a load completion status after the loading of each of the load-waiting data is completed, and a deploying status updating unit configured to update the load completion status to a deploying status in response to a data deployment command input by a user, wherein the online status updating unit: The data storage device may include a post-load data deployment subunit configured to obtain a data version of post-load data corresponding to each of the data packets waiting to be loaded, and deploy the post-load data in the deployment-waiting state when the data packet is in the deploying state.
[0122] The version control device includes: The data packet may further include an initial version setting module configured to create a data packet if the data packet has not been created beforehand and to set the data packet version to the initial version.
[0123] The version control device includes: The data packet may further include an offline state setting module configured to set 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 an invalid state setting module configured to set the data packet state of the data packet to an invalid state.
[0124] Furthermore, the data packet data in the online state is associated with a data packet label corresponding to the data packet, and the version control device The data packet label may further include an association relationship deletion module configured to delete an association relationship between the online data packet data and the data packet label.
[0125] The version control device includes: The data packet 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, and the item cluster pool includes at least one item cluster, and 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 relational table associated with each reference table, and the data version acquisition module 530 The system may include, for each item cluster, a second load data acquisition unit configured to set, among each of the load-waiting data, the load-waiting data corresponding to a first item in the item cluster as first load data, and to set, among each of the load-waiting data, the load-waiting data corresponding to each second item in the item cluster as second load data; a post-load data first acquisition unit configured to load the first load data into a target table among at least one reference table corresponding to the first item in the item cluster, and to obtain post-load data of the first item in the item cluster; and a post-load data second acquisition unit configured, for each of the second load data, to set, as a current item, the second item corresponding to the second load data in the item cluster, and load the second load data into a relational table among at least one relational table associated with the target table, corresponding to the current item, and to obtain post-load data of the current item.
[0127] The version control device provided by the embodiments of the present disclosure uses a data packet version acquisition module to acquire, in response to a data load command, 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, the data packets corresponding to a pool waiting to be loaded, the pool waiting to be loaded including a pool of items waiting to be loaded or an item cluster pool, the data packets including at least one item table, and the data waiting to be loaded corresponding to the items waiting to be loaded in the pool waiting to be loaded, the increment version acquisition module performs an increment process on the data packet version to obtain an increment version, and for each data waiting to be loaded, the data version acquisition module loads the data waiting to be loaded into an item table corresponding to the item waiting to be loaded among the at least one item table based on the items waiting to be loaded corresponding to the data waiting to be loaded, and obtains the data after loading, thereby realizing the process of loading the data waiting to be loaded into the data packet, the increment version being the data version of the data after loading, and when the data packet version acquisition module obtains the data version of the data after loading corresponding to each data waiting to be loaded, the increment version is the data packet version. During the data loading process, the device controls the data version of the loaded data according to the increment version obtained after performing an increment process on the data packet version, and controls the data packet version according to the increment version after each loaded data has its own data 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 according to a progressive version control policy.
[0128] The version control device provided by the embodiments of the present disclosure can execute the version control method provided by any of the embodiments of the present disclosure, and includes corresponding functional modules and effects for executing the method.
[0129] In the above embodiment of the version control device, the multiple units and modules included are simply divided by functional logic, but are not limited to the above divisions as long as the relevant functions can be realized. Furthermore, the names of the multiple functional units are intended to make them easier to distinguish from one another, and do not limit the scope of protection of the present disclosure.
[0130] Referring now to FIG. 12 , a structural schematic diagram of an electronic device (e.g., a terminal device or server in FIG. 12 ) 600 suitable for implementing an embodiment of the present disclosure is shown. The electronic device in the embodiment of the present disclosure may include mobile devices such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable media players (PMPs), and in-vehicle devices (e.g., in-vehicle navigation devices), as well as fixed devices such as digital televisions (TVs) and desktop computers. The electronic device 600 shown in FIG. 12 is merely an example and should not impose any limitations on the functionality and range of use of the embodiment of the present disclosure.
[0131] 12, the electronic device 600 may include a processing unit (e.g., a central processor, a graphics processor, etc.) 601, which can perform a number of appropriate operations and processes based on a program stored in a read-only memory (ROM) 602 or loaded from a storage device 608 into a random access memory (RAM) 603. The RAM 603 further stores a number of programs and data necessary for the operation of the electronic device 600. The processing unit 601, the ROM 602, and the RAM 603 are connected to one another via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0132] Generally, input devices 606, including, for example, a touch screen, touch board, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607, including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 608, including, for example, a magnetic tape, hard disk, etc.; and communication devices 609, can be connected to the I / O interface 805. The communication devices 609 can allow the electronic device 600 to exchange data with other devices via wireless or wired communication. Although FIG. 12 illustrates the electronic device 600 having multiple devices, it is not required that the electronic device 600 implement or include all of the devices shown. Alternatively, more or fewer devices can be implemented or included.
[0133] According to an embodiment of the present disclosure, the processes described with reference to the flowcharts above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program stored on a non-transitory computer-readable medium, the computer program including program code for performing the methods illustrated in the flowcharts. In such an embodiment, the 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 the computer program is executed by the processing device 601, the functions defined in the methods of the embodiments of the present disclosure are performed.
[0134] The 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. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. Examples of computer-readable storage media may include an electrical connection having one or more conductors, a portable computer disk, a hard disk, RAM, ROM, an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a 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. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal, in baseband or as part of a carrier, carrying computer-readable program code. Such propagated data signals may take various forms, including electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which is capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted over any suitable medium, including electrical wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
[0135] In some embodiments, clients and servers may communicate using any network protocol now known or hereafter developed, such as HyperText Transfer Protocol (HTTP), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include local area networks (LANs), wide area networks (WANs), the World Wide Web (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any network now known or hereafter developed.
[0136] The computer-readable medium may be included in the electronic device, or may be a standalone entity independent of the electronic device.
[0137] The computer-readable medium has one or more programs stored therein, and when the one or more programs are executed by the electronic device, the electronic device: In response to a data load command, the method acquires a plurality of load-waiting data, a data packet corresponding to the plurality of load-waiting data, 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 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; loads, for each load-waiting data, the load-waiting data into an item table corresponding to the load-waiting item of the at least one item table based on the load-waiting item corresponding to the load-waiting data, obtains the loaded data, and sets the increment version as the data version of the loaded data; and, when the data version of the loaded data corresponding to each load-waiting data is obtained, sets the increment version as the data packet version.
[0138] Computer program code for carrying out the operations of the present disclosure can be written in one or a variety of programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as general procedural programming languages such as "C" or similar. The program code may run entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a LAN or WAN, or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0139] The flowcharts and block diagrams in the figures illustrate possible system architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or portion of code, which includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some implementations, the functions illustrated in the blocks may occur in a different order than illustrated in the figures. For example, two consecutive blocks may actually be executed essentially in parallel, or may be executed in the reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or operation, or by a combination of dedicated hardware and computer instructions.
[0140] The units described in relation to the embodiments of the present disclosure may be implemented in a software manner or a hardware manner, and the names of the units may not necessarily be limiting of the units themselves, for example, an increment version acquisition module may be further described as a module that performs increment processing on a data packet version to obtain an increment version.
[0141] The functionality described herein above may be performed, 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), Systems on Chips (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0142] In the context of this 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, device, or apparatus. The machine-readable medium may include an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. Examples of machine-readable storage media include one or more line-based electrical connections, portable computer disks, hard disks, RAM, ROM, EPROM, or flash memory, optical fiber, CD-ROM, optical storage devices, magnetic storage devices, or any suitable combination of the above.
[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 command, obtain a plurality of load waiting data, a data packet corresponding to the plurality of load waiting data, 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 load waiting data 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 item waiting to be loaded, load the data item waiting to be loaded into an item table corresponding to the item waiting to be loaded among at least one item table based on the item waiting to be loaded corresponding to the data item waiting to be loaded, obtain data after loading, and set the increment version as the data version of the data after loading; When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, the increment version may be set as the data packet version.
[0144] According to one or more embodiments of the present disclosure, (Example 2) provides the method of Example 1, wherein after obtaining the loaded data, the version control method includes: The method may further include: setting a data state of the loaded data to a deployment waiting state 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; When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, the increment version is set as the data packet version. When a data version of the loaded data corresponding to each of the data waiting to be loaded is obtained, the loaded data in a state waiting to be deployed is deployed, and the data state of the loaded data after the deployment is completed is updated from a state waiting to be deployed to an online state; If the data state of the data after each load is in the online state, setting the increment 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, wherein the version control method includes: For previous load data that has been previously loaded into the data packet and does not correspond to data waiting to be loaded, updating the data state of the previous load data that is in an online state among all the previous load data from an online state to a waiting to be deployed state; The method may further include determining data awaiting deployment that is in a state waiting for deployment from data packet data in the data packet, wherein the loaded data awaiting deployment includes first deployment data whose data version is greater than the data packet version among the data awaiting deployment; Deploying loaded data that is in a deployment waiting state and updating the data status of the loaded data from a deployment waiting state to online after the deployment is complete is The method may include determining first deployment data from the data awaiting deployment, deploying the first deployment data based on a first deployment method corresponding to the first deployment data, and updating the data state of the first deployment data after deployment from a state awaiting deployment to an online state.
[0146] According to one or more embodiments of the present disclosure, (Example 4) provides the method of Example 3, in which the previous load data in a state of waiting for deployment is second deployment data among the data waiting for deployment, the data version of which is equal to the data packet version, and the version control method further comprises: The method may further include determining second deployment data from the data awaiting 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 a deployment awaiting state to an 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 manner includes adding a data packet label corresponding to the data packet, and / or the second deployment manner includes removing a 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, wherein after obtaining data packets corresponding to a plurality of data waiting to be loaded, the version control method includes: updating a data packet state of the data packet from a valid state to a loaded state; After the loading of each of the data waiting to be loaded is completed, updating the loading status to a deploying status; The method may further include updating the deploying state to a valid state when the data state of the data after each loading is an online state.
[0149] According to one or more embodiments of the present disclosure, (Example 7) provides the method of Example 6, wherein the version control method includes: capturing a data packet state in response to a breakpoint resume instruction; The method may further include determining, based on the data packet status, to perform an update operation on the acquired data waiting to be loaded or the loaded data waiting to be deployed, and performing the update operation based on the determination result.
[0150] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 7, in which when the data packet state is a loaded state, the determination result is to perform an update operation on the retrieved data waiting to be loaded; Executing an update operation based on the decision result is determining history load data whose data version is equal to or less than the data packet version from the data packet data in the data packet, and setting the load waiting data corresponding to the history load data among the acquired load waiting data as breakpoint load data; and updating the load waiting data obtained 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, in which when the data packet state is in a deploying state, the determination result is to perform an update operation on the loaded data in a waiting-to-deploy state; Executing an update operation based on the decision result is The method may include determining breakpoint deployment data awaiting deployment from the data packet data in the data packet, and updating the loaded data awaiting deployment 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, wherein after the loading of each of the waiting data is completed, updating the load status to a deploying status includes: After the loading of each of the data waiting to be loaded is completed, updating the loading status to a loading completion status; updating the loaded status to a deploying status in response to a data deployment command input by a user; When the data version of the loaded data corresponding to each of the data waiting to be loaded is obtained, the loaded data waiting to be deployed is The method may include obtaining a data version of the loaded data corresponding to each of the waiting-to-be-loaded data, and deploying the loaded data in the waiting-to-be-deployed state if the data packet is in the deploying state.
[0153] According to one or more embodiments of the present disclosure, (Example 11) provides the method of Example 1, wherein the version control method includes: If the data packet has not been created beforehand, the method may further include creating the data packet and setting the data packet version to an initial version.
[0154] According to one or more embodiments of the present disclosure, Example 12 provides the method of Example 1, wherein the version control method comprises: In response to a data packet deletion command for the data packet, setting a data state of the data packet data in the data packet to an offline state; The method may further include setting the data packet status of the data packet to an expired state.
[0155] According to one or more embodiments of the present disclosure, (Example 13) provides the method of Example 12, wherein the online data packet data is associated with a data packet label corresponding to the data packet, and the version control method includes: The method may further include deleting the association relationship between the online data packet data and the data packet label.
[0156] According to one or more embodiments of the present disclosure, Example 14 provides the method of Example 1, wherein the version control method comprises: In response to a data packet viewing command for the data packet, determining online data from the data packet data in the data packet, the online data having a data version equal to the data packet version; The method may further include returning the online data to the instruction trigger device of the data packet viewing instruction.
[0157] According to one or more embodiments of the present disclosure, (Example 15) provides the method of Example 1, in which the load waiting pool is an item cluster pool, and the item cluster pool includes at least one item cluster, and 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 relational table associated with each reference table; For each data item waiting to be loaded, the data item waiting to be loaded is loaded into an item table corresponding to the item waiting to be loaded among at least one item table based on the item waiting to be loaded corresponding to the data item waiting to be loaded, and the loaded data is obtained. For each item cluster, set the data waiting to be loaded corresponding to a first item in the item cluster among the data waiting to be loaded as first load data, and set the data waiting to be loaded corresponding to each second item in the item cluster as second load data; Loading first load data into a target table corresponding to a first item in an item cluster of at least one reference table to obtain loaded data of the first item in the item cluster; For each second load data, the method may include setting a second item in the item cluster corresponding to the second load data as the current item, loading the second load data into a relational table corresponding to the current item among at least one relational table associated with the target table, and obtaining data after loading of the current item.
[0158] According to one or more embodiments of the present disclosure, Example 16 provides a version control device, the device comprising: a data packet version acquisition module configured to acquire, in response to a data load command, a plurality of load-waiting data, data packets corresponding to the plurality of load-waiting data, and data packet versions of the data packets, wherein the data packets correspond to a load-waiting pool, the load-waiting pool including a load-waiting item pool or an item cluster pool, the data packets including at least one item table, and the load-waiting data corresponding to load-waiting items in the load-waiting pool; an increment version obtaining module configured to perform an increment operation on the data packet version to obtain an increment version; a data version acquisition module configured to load, for each data item waiting to be loaded, the data item waiting to be loaded into an item table corresponding to the item waiting to be loaded among at least one item table according to the item waiting to be loaded corresponding to the data item waiting to be loaded, obtain data after loading, and set the increment version as the data version of the data after loading; The data packet version acquisition module may further include a data packet version acquisition module configured to, when obtaining the data version of the loaded data corresponding to each of the data waiting to be loaded, set the incremented version as the data packet version.
[0159] It should be noted that although operations are described using a particular sequence, this should not be understood as requiring that these operations be performed in the particular sequence shown or in sequential execution. In certain environments, multiple tasks and parallel processing may be advantageous. Similarly, although the above discussion includes multiple implementation details, these should not be construed as limitations on the scope of the disclosure. Some features that are described in the context of a single embodiment may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may be implemented in multiple embodiments, either alone or in any suitable subcombination.
Claims
1. 1. A version control method comprising: In response to a data load command, acquiring a plurality of load waiting data, a data packet corresponding to the plurality of load waiting data, 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 load waiting data 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 item waiting to be loaded, load the data item waiting to be loaded into an item table corresponding to the item waiting to be loaded among the at least one item table based on the item waiting to be loaded corresponding to the data item waiting to be loaded, obtain data after loading, and set the increment version as the data version of the data after loading; When the data version of the loaded data corresponding to each data waiting to be loaded is obtained, the increment version is set as the data packet version; After obtaining the loaded data, further comprising: setting a data state of the loaded data to a deployment waiting state 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; When the data version of the loaded data corresponding to each of the data waiting to be loaded is obtained, the increment version is set as the data packet version, When a data version of the loaded data corresponding to each of the data waiting to be loaded is obtained, deploying the loaded data in the deployment waiting state, and updating the data state of the loaded data after the deployment is completed from the deployment waiting state to an online state; and when a data state of the data after each loading is the online state, setting the increment version as the data packet version; After obtaining data packets corresponding to the plurality of data waiting to be loaded, updating a data packet state of the data packet from a valid state to a loaded state; After the loading of each of the data waiting to be loaded is completed, updating the loading status to a deploying status; If the data state of each loaded data is the online state, updating the deploying state to the valid state; retrieving the data packet state in response to a breakpoint resume command; The version control method further includes determining, based on the data packet status, to perform an update operation on the acquired data waiting to be loaded or the loaded data waiting to be deployed, and performing the update operation based on the determination result.
2. For previous load data that has been previously loaded into the data packet and does not correspond to data waiting to be loaded, updating the data state of the previous load data that is in the online state among all the previous load data from the online state to the waiting to be deployed state; determining the data waiting to be deployed from data packet data in the data packet, and the loaded data waiting to be deployed is first deployment data of the data waiting to be deployed, the data version of which is greater than the data packet version; Executing deployment of the loaded data in the deployment waiting state, and updating the data state of the loaded data after the deployment is completed from the deployment waiting state to an online state, 2. The method of claim 1, further comprising: determining the first deployment data from the deployment-awaiting data; performing deployment on the first deployment data based on a first deployment method corresponding to the first deployment data; and updating a data state of the first deployment data after deployment from the deployment-awaiting state to the online state.
3. The previous load data in the deployment waiting state is second deployment data of the deployment waiting data, the data version of which is equal to the data packet version, and the method includes:
3. The method of claim 2, further comprising: determining the second deployment data from the deployment-waiting data; performing deployment on the second deployment data based on a second deployment method corresponding to the second deployment data; and updating a data state of the second deployment data after deployment from the deployment-waiting state to an offline state.
4. The first deployment manner includes adding a corresponding data packet label to the data packet; and b. the second deployment scheme includes removing a data packet label corresponding to the data packet.
5. When the data packet state is the loading state, the determination result is to perform an update operation on the acquired data waiting to be loaded; performing an update operation based on the determination result, determining, from the data packet data in the data packet, history load data whose data version is equal to or lower than the data packet version, and setting the load waiting data corresponding to the history load data among the acquired load waiting data as breakpoint load data; and updating the obtained load wait data based on the breakpoint load data.
6. When the data packet state is the deploying state, the determination result is to perform an update operation on the loaded data in the deploying waiting state; performing an update operation based on the determination result, 2. The method of claim 1, further comprising determining the pending-deployment breakpoint deployment data from data packet data in the data packet, and updating the pending-deployment post-load data based on the breakpoint deployment data.
7. updating the loading status to a deploying status after the loading of each of the data waiting to be loaded is completed, After the loading of each data item waiting to be loaded is completed, updating the loading status to a loading completion status; updating the loaded status to the deploying status in response to a data deployment command input by a user; When a data version of the loaded data corresponding to each of the data waiting to be loaded is obtained, deploying the loaded data waiting to be deployed is performed, 2. The method of claim 1, further comprising obtaining a data version of loaded data corresponding to each load-waiting data packet, and performing deployment on the loaded data packet in the deployment-waiting state if the data packet is in the deploying state.
8. The method of claim 1 , further comprising: if the data packet has not been previously created, creating the data packet and setting the data packet version to an initial version.
9. In response to a data packet deletion command for the data packet, setting a data state of the data packet data in the data packet to an offline state; The method of claim 1 , further comprising: setting a data packet status of the data packet to an expired state.
10. The online data packet data is associated with a data packet label corresponding to the data packet, and the method includes: The method of claim 9 , further comprising deleting an association between the online data packet data and the data packet label.
11. determining, in response to a data packet viewing command for the data packet, from data packet data in the data packet, online data whose data version is equal to the data packet version; The method of claim 1 , further comprising: returning the online data to an instruction trigger device of the data packet viewing instruction.
12. the loading waiting pool is the item cluster pool, the item cluster pool includes at least one item cluster, the loading 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 relational table associated with each reference table, For each piece of data waiting to be loaded, the data is loaded into an item table corresponding to the item waiting to be loaded among the at least one item table, based on an item waiting to be loaded corresponding to the data waiting to be loaded, and data after loading is obtained, For each item cluster, among the load waiting data, the load waiting data corresponding to a first item in the item cluster is set as first load data, and the load waiting data corresponding to each second item in the item cluster is set as second load data; Loading the first load data into a target table of the at least one reference table corresponding to a first item in the item cluster, to obtain loaded data of the first item in the item cluster; 2. The method of claim 1, further comprising: for each second load data, setting a second item in the item cluster corresponding to the second load data as a current item; loading the second load data into one of at least one relational tables associated with the target table that corresponds to the current item; and obtaining post-load data for the current item.
13. A version control device comprising: a data packet version acquisition module configured to acquire, in response to a data load command, a plurality of load-waiting data, a data packet corresponding to the plurality of load-waiting data, 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 load-waiting data corresponds to a load-waiting item in the load-waiting pool; an increment version obtaining module configured to perform an increment operation on the data packet version to obtain an increment version; a data version acquisition module configured to load, for each data waiting to be loaded, the data waiting to be loaded into an item table corresponding to the item waiting to be loaded among the at least one item table based on the item waiting to be loaded corresponding to the data waiting to be loaded, obtain data after loading, and set the increment version as the data version of the data after loading; a data packet version acquisition module configured to set the increment version as the data packet version when a data version of the loaded data corresponding to each of the data waiting to be loaded is obtained; Further included is a deployment waiting state setting module configured to set a data state of the loaded data to a deployment waiting state when, after obtaining the loaded data, the loaded data corresponding to the load waiting data is not loaded in the data packet, or when the loaded data corresponding to the load waiting data is loaded in the data packet and a data version of the loaded data is smaller than the data packet version; an online status update unit configured to, when obtaining a data version of the loaded data corresponding to each of the load-waiting data, execute deployment for the loaded data in the deployment-waiting state, and update the data status of the loaded data after the deployment is completed from the deployment-waiting state to an online status; and a data packet version acquisition unit configured, when the data status of each of the loaded data is the online status, to set the increment version as the data packet version; The system further includes a loading status update module configured to update a data packet status of the data packets from a valid status to a loaded status after acquiring data packets corresponding to the plurality of data waiting to be loaded; a deploying status update module configured to update the loading status to a deploying status after loading of each of the data waiting to be loaded is completed; and a valid status update module configured to update the deploying status to the valid status when the data status of each of the loaded data is the online status, A version control device further including: 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, based on the data packet state, to perform an update operation on the acquired data waiting to be loaded or the loaded data waiting to be deployed, and to execute the update operation based on the determination result.
14. at least one processor; a memory configured to store at least one program; 13. An electronic device, wherein the at least one program, when executed by the at least one processor, causes the at least one processor to implement the version control method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program stored thereon, the computer program implementing the version control method of any one of claims 1 to 12 when executed by a processor.
16. A computer program comprising: A computer program which, when executed by a processor, causes the processor to carry out the version control method according to any one of claims 1 to 12.
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