Version control method, device, electronic device and storage medium
By incrementing the packet version, the problem of inconsistent versions during data loading is solved, ensuring the consistency of the data version and packet version of each loaded data in the packet, and achieving the accuracy of data loading.
Patent Information
- Application Number
- CN202210774149.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-01
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-07-01
AI Technical Summary
There is a lack of effective version control methods in the prior art, which leads to the inability to ensure the consistency of data versions when loading data to the operating platform.
By obtaining the data to be loaded and the data packet version, performing incremental processing, loading each data to be loaded into the item table, and using the incremental version as the loaded data and packet version, ensuring the consistency of the data version and packet version of each loaded data in the data packet.
The consistency between the data version and the packet version during data loading is achieved, ensuring the accuracy and consistency of each loaded data in the data packet.
Smart Images

Figure CN115048140B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and more particularly to a version control method, device, electronic device, and storage medium. Background Art
[0002] In product operations, automatically or manually identifying high-quality, popular, and promising products helps guide investment promotion. To effectively utilize these products, their relevant data can be loaded into the operations platform for operational personnel to use.
[0003] It should be noted that this data may change over time. To ensure that data matches current real-world conditions, version control can be implemented during the loading process of this data into the operations platform. However, there is currently no solution that can achieve this. Summary of the Invention
[0004] The embodiments of the present disclosure provide a version control method, apparatus, electronic device, and storage medium to ensure consistency between a data version corresponding to each data to be loaded and a data packet version.
[0005] In a first aspect, an embodiment of the present disclosure provides a version control method, which may include:
[0006] In response to a data loading instruction, obtaining data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded includes a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded;
[0007] Incrementally process the data packet version to obtain an incremental version;
[0008] For each data to be loaded, the data to be loaded is loaded into an item table corresponding to the item to be loaded in at least one item table to obtain loaded data, and an incremented version is used as a data version of the loaded data;
[0009] When the data version of the loaded data corresponding to each piece of data to be loaded is obtained, the incremented version is used as the data packet version.
[0010] In a second aspect, an embodiment of the present disclosure further provides a version control device, which may include:
[0011] a data packet version acquisition module, configured to, in response to a data loading instruction, acquire data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded including a pool of items to be loaded or a pool of item clusters, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded;
[0012] The incremental version obtaining module is used to perform incremental processing on the data packet version to obtain the incremental version;
[0013] a data version obtaining module, configured to load each piece of data to be loaded into an item table corresponding to the item to be loaded in at least one item table, obtain loaded data, and use an incremented version as a data version of the loaded data;
[0014] The data packet version obtaining module is used to use the incremental version as the data packet version when the data version of the loaded data corresponding to each piece of data to be loaded is obtained.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, which may include:
[0016] one or more processors;
[0017] a memory for storing one or more programs,
[0018] When one or more programs are executed by one or more processors, the one or more processors implement the version control method provided by any embodiment of the present disclosure.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the version control method provided by any embodiment of the present disclosure is implemented.
[0020] The technical solution of the embodiment of the present disclosure is to obtain, in response to a data loading instruction, data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded including a pool of items to be loaded or a pool of item clusters to be loaded, the data packet including at least one item table, and the data to be loaded corresponding to the items to be loaded in the pool to be loaded; perform incremental processing on the data packet version to obtain an incremental version; for each data to be loaded, load the data to be loaded into the item table corresponding to the item to be loaded in at least one item table to obtain the loaded data, thereby achieving the process of loading the data to be loaded into the data packet, and then use the incremental version as the data version of the loaded data; when the data version of the loaded data corresponding to each data to be loaded is obtained, use the incremental version as the data packet version. The above technical solution, during the data loading process, controls the data version of the loaded data by the incremental version obtained after the incremental processing of the data packet version, and after each loaded data has its own data version, controls the data packet version based on the incremental version. The progressive version control strategy ensures the consistency of the data version of each loaded data in the data packet and the data packet version of the data packet. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0022] Figure 1 is a flow chart of a version control method in an embodiment of the present disclosure;
[0023] Figure 2a is a timing diagram of data packet deletion in a version control method according to an embodiment of the present disclosure;
[0024] Figure 2b is a timing diagram of data packet checking in a version control method according to an embodiment of the present disclosure;
[0025] Figure 3a This is a schematic diagram of a product selection pool output in a version control method according to an embodiment of the present disclosure;
[0026] Figure 3b is a schematic diagram of data flow in a version control method according to an embodiment of the present disclosure;
[0027] Figure 4 is a schematic diagram of a product package model in a version control method according to an embodiment of the present disclosure;
[0028] Figure 5is a flowchart of another version control method in an embodiment of the present disclosure;
[0029] Figure 6 is a flowchart of another version control method in an embodiment of the present disclosure;
[0030] Figure 7 is a flowchart of another version control method in an embodiment of the present disclosure;
[0031] Figure 8 This is a timing diagram of breakpoint resume in another version control method in an embodiment of the present disclosure;
[0032] Figure 9 It is a flow diagram of complete functions in another version control method in an embodiment of the present disclosure;
[0033] Figure 10a is a first timing diagram of complete functions in another version control method in an embodiment of the present disclosure;
[0034] Figure 10b is a second timing diagram of complete functions in another version control method in an embodiment of the present disclosure;
[0035] Figure 11 is a structural block diagram of a version control device in an embodiment of the present disclosure;
[0036] Figure 12 It is a structural diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0037] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0038] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0039] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0040] It should be noted that the concepts of "first" and "second" 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 the functions performed by these devices, modules or units.
[0041] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0042] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0043] Figure 1 This is a flow chart of a version control method provided in an embodiment of the present disclosure. This embodiment is applicable to controlling data and data packet versions during data loading. This method can be executed by a version control device provided in an embodiment of the present disclosure. This device can be implemented in software and / or hardware and can be integrated into an electronic device, such as various terminal devices or servers.
[0044] See also Figure 1 The method of the embodiment of the present disclosure specifically includes the following steps:
[0045] S110. In response to a data loading instruction, obtain data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded includes a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded.
[0046] The data loading instruction may be an instruction for loading the data to be loaded into a data packet corresponding to the data to be loaded, and in response to the data loading instruction, the data to be loaded, the data packet, and the data packet version of the data packet are obtained. It is understandable that the above steps can directly obtain the data packet, which means that the data packet has been created in advance. In the event that the data packet has not been created in advance, optionally, after obtaining the data to be loaded, the above 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 that the data packet and its data packet version are subsequently successfully obtained. The initial version may be a pre-set data packet version.
[0047] The data packet corresponds to a pool to be loaded, which can be a pool of items or a pool of item clusters to be loaded (i.e., a data loading requirement exists). In actual applications, the item pool can optionally include at least one item to be loaded, the item cluster pool can include at least one item cluster, and each item cluster can include at least one item to be loaded. The data to be loaded corresponds to the items to be loaded in the pool to be loaded, and the data packet includes at least one item table. In actual applications, each item table can optionally correspond to one or more items to be loaded in the pool to be loaded. Therefore, the data loading process implemented in subsequent steps can be understood as the process of loading the data to be loaded corresponding to each item to be loaded in the pool to be loaded into the corresponding item table in the data packet.
[0048] S120: Perform incremental processing on the data packet version to obtain an incremental version.
[0049] After obtaining the data packet version, it can be incremented to obtain an incremented version. For example, the result obtained by adding N to the data packet version is used as the incremented version, where N can be any positive integer.
[0050] S130 , for each data to be loaded, loading the data into at least one item table corresponding to the item to be loaded, obtaining loaded data, and using the incremented version as the data version of the loaded data.
[0051] During a data loading process, multiple data items may need to be loaded. For each data item, the following steps may be performed: based on the item to be loaded corresponding to the data item, determine the item table corresponding to the item to be loaded from at least one item table, and load the data item to be loaded into the item table, thereby obtaining the loaded data corresponding to the item to be loaded; further, use the previously obtained incremented version as the data version of the loaded data. In practical applications, the data item to be loaded may optionally be the item identifier of the item to be loaded. During the data loading process, the item identifier can be used to accurately determine the corresponding item to be loaded from the multiple items to be loaded, and then accurately determine the corresponding item table from the at least one item table, thereby ensuring the accuracy of data loading. Furthermore, the fields under the item table may optionally include at least the data packet identifier of the data packet, the item identifier of the item to be loaded, and the data version of the loaded data corresponding to the item to be loaded.
[0052] It should be noted that since the item table is located in the data packet, the process of loading the data to be loaded into the item table can also be understood as the process of loading the data to be loaded into the data packet. Therefore, the data after loading is the data in the item table and the data in the data packet.
[0053] In actual applications, optionally, when the data packet does not contain loaded data corresponding to the data to be loaded, the loading process of the data to be loaded can be understood as a process of directly inserting the data to be loaded into the data packet; optionally, when the data packet is loaded with loaded data, this may be when a certain data has been previously loaded into the data packet, but as time goes by, the specific value of the data has changed, so it needs to be reloaded into the data packet. At this time, the loading process of the data to be loaded can be understood as a process of updating the loaded data in the data packet based on the data to be loaded; and so on.
[0054] S140 . When the data version of the loaded data corresponding to each piece of data to be loaded is obtained, the incremented version is used as the data packet version.
[0055] Among them, when the data version of the loaded data corresponding to each data to be loaded is obtained, that is, when each data to be loaded is loaded and the loaded data corresponding to each data to be loaded has its own data version, the previously obtained incremental version can 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.
[0056] The technical solution of the embodiment of the present disclosure is to obtain, in response to a data loading instruction, data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded including a pool of items to be loaded or a pool of item clusters to be loaded, the data packet including at least one item table, and the data to be loaded corresponding to the items to be loaded in the pool to be loaded; perform incremental processing on the data packet version to obtain an incremental version; for each data to be loaded, load the data to be loaded into the item table corresponding to the item to be loaded in at least one item table to obtain the loaded data, thereby achieving the process of loading the data to be loaded into the data packet, and then use the incremental version as the data version of the loaded data; when the data version of the loaded data corresponding to each data to be loaded is obtained, use the incremental version as the data packet version. The above technical solution, during the data loading process, controls the data version of the loaded data by the incremental version obtained after the incremental processing of the data packet version, and after each loaded data has its own data version, controls the data packet version based on the incremental version. The progressive version control strategy ensures the consistency of the data version of each loaded data in the data packet and the data packet version of the data packet.
[0057] An optional technical solution, based on the above embodiment, the above version control method may further include: in response to a packet deletion instruction for a data packet, setting the data status of the data packet data in the data packet to an offline state; and setting the data packet status of the data packet to an invalid state. The packet deletion instruction may be an instruction for deleting the data packet mentioned above, which is triggered manually or automatically when a preset deletion condition is met. In actual application, optionally, in order to achieve permanent data preservation, the deletion process here can be understood as the process of stopping the application of the data packet data in the data packet by setting the data packet status of the data packet to an invalid state. The data packet data may be the loaded data mentioned above, or the data loaded into the data packet before responding to the current data loading instruction, etc., which are not specifically limited here. To this end, in response to the packet deletion instruction, the data status of all the data packet data in the data packet may be set to an offline state, and then the data packet status of the data packet may be set to an invalid state. In this way, each data packet in the data packet cannot be applied, thereby achieving an effect similar to deleting the data packet. It should be noted that all data within a data packet can be considered as data packet data. In other words, the loaded data and loaded data mentioned so far, as well as the previously loaded data, breakpoint loading data, and breakpoint deployment data that may be mentioned later, can all be considered as different representations of data packet data in different application scenarios.
[0058] On this basis, optionally, the data packet data in the online state is associated with a data packet tag 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 tag. The data packet tag can be used to identify the data packet to which the corresponding data packet data belongs. Taking into account the application scenarios that may be involved in the embodiments of the present disclosure, since a data packet may include multiple data packet data, a data packet tag (i.e., a data packet tag corresponding to a data packet) can be associated with multiple data packet data. When deleting a data packet, in addition to the changes in the data packet state and the data state, the association between the data packet data and the data packet tag can also be deleted, so that the data packet data in the deleted data packet is no longer associated with the remaining content, thereby achieving complete deletion of the data packet.
[0059] In order to understand the above data packet deletion scheme more vividly, the following is an exemplary description of it with reference to specific examples in combination with possible application scenarios of the embodiments of the present disclosure. Figure 2a Taking the data package being a data package of a product (hereinafter referred to as a product package) and the data package data being data of a product (hereinafter referred to as a product) as an example, first obtain the product pool that needs to be deleted on the data platform, then check the product package corresponding to the product pool on the operation platform, and check the products in the product package, and remove the product package labels corresponding to the products in the product package stored on the product middle platform label center that are in an online state; then, delete all the products in the product package, that is, change the product status of all the products to an offline state, and then delete the product package, that is, set the product package status of the product package to an invalid state. In this way, the product pool can be effectively deleted by effectively deleting the product package.
[0060] Another optional technical solution, the version control method described above, may further include: in response to a packet viewing instruction for a data packet, determining online data with a data version equal to the data packet version from the packet data within the data packet; and returning the online data to the instruction triggering device for the packet viewing instruction. The packet viewing instruction may be a user-triggered instruction for viewing the packet data within the data packet. In response to this packet viewing instruction, since the loaded data currently loaded into the data packet is data that matches the current actual situation and is meaningful to view, and the data version of this loaded data is equal to the packet version, online data with a data version equal to the packet version can be determined from the packet data, and the online data can then be returned to the instruction triggering device for the packet viewing instruction, such as the backend front-end device where the user is located, so that the user can view the online data that matches the current actual situation. It should be noted that the online data here is essentially the same as the loaded data mentioned above. The different names are used here only to distinguish between scenarios and do not specifically limit their substantive meanings.
[0061] In order to understand the above-mentioned data packet viewing solution more vividly, in combination with the application scenarios that may be involved in the embodiments of the present disclosure, the following is an exemplary description of it with reference to specific examples. Figure 2b , still taking the example of a data package being a product package and the data package data being a product, first obtain the product pool that needs to be viewed on the data platform, then view the product package corresponding to the product pool on the operation platform, and then view the products in the product package whose product version is equal to the product package version, and then render these products into a page and return it, so that the operation personnel can effectively view the corresponding products.
[0062] In order to better understand the following two technical solutions, the application scenarios of these two technical solutions are first illustrated here. For example, the relevant data of the products selected (i.e. mined) by automatic or manual methods can be stored on the data platform in the form of product pools (also referred to as selection pools). The production characteristics of these selection pools can be as follows: Figure 3a As shown, specifically:
[0063] 1. Each type of product pool is produced once according to a preset cycle (such as a week, month, or year). The following explanation uses the preset cycle of a week as an example;
[0064] 2. Some types of product pools generate a new independent pool each week (i.e., unrelated to the previous one), such as trending search terms, hot news, or hot topics. This is because these contents vary greatly from week to week, so the related products selected each week may be completely different. This type of product pool has a short life cycle.
[0065] 3. For some types of product pools, there is always only one, and each time a new product is created, only the products in it are updated (i.e., a full update). For example, this is because although the content of these products changes every week, the changes are not particularly large. This type of product pool is relatively rare and can be retained permanently.
[0066] 4. The number of products in the product selection pool is often huge.
[0067] Considering the possible application scenarios of the embodiments of the present disclosure, combined with Figure 3b As shown in the data flow diagram (the product selection pool reporting process in the diagram can be understood as the data loading process described above), the standards for delivering the product selection pool to the operation platform can be as follows:
[0068] 1. You can view various product selection pools on the operation platform. For fully updated product selection pools, only the latest version can be displayed. This has been explained in the data package viewing solution.
[0069] 2. All product selection pools must be permanently retained for operations. Deletion can be determined manually or automatically after a long period of time. This has been explained in the data packet deletion plan.
[0070] 3. The products in the selection pool need to be expressed to both the B-end (i.e., the merchant end) and the C-end (i.e., the user end). For example, on the B-end, merchants can be prompted that a certain product is related to this week's hot topic (in a certain selection pool) and recommended to participate in promotional activities. On the C-end, products in a certain selection pool can be exposed in a venue or floor on the shopping guide page. The specific expression method can be to label the product with a selection pool tag associated with the selection pool in the product middle platform tag center. Since the selection pool tag can be automatically loaded into the search engine, the information expressed by both the B-end and the C-end can be searched through their respective search engines.
[0071] The above is explained using the product selection pool as an example. Considering the business scenarios that may be involved in the embodiments of the present disclosure, in addition to the product selection pool, the business scenarios of the product selection cluster pool may also be involved. Specifically, the product selection pool can be understood as a collection of goods, and the product selection cluster pool can be understood as a collection of product collections, that is, there are many product selection clusters in the product selection cluster pool, and each product selection cluster can be considered as a collection of goods, such as a collection of toothbrushes of the same brand and series as a popular online celebrity toothbrush. They appear as a cluster as a whole, and the remaining toothbrushes can be obtained based on the clustering of the popular online celebrity toothbrush. Next, the data loading process under the two business scenarios of the product selection pool and the product selection cluster pool is explained. It should be noted that, taking the product selection pool as an example, the item pool explained later can be obtained by circling goods like the product selection pool, or it can be obtained by circling or mining the remaining non-sale items, which is not specifically limited here. The situation of the item cluster pool is similar.
[0072] An optional technical solution is that when the pool to be loaded includes an item pool, the specific data loading process has been described in S130 and will not be repeated here. In addition, the item selection pool mentioned above can be understood as an example of an item pool.
[0073] Another optional technical solution is that the pool to be loaded is an item cluster pool, the item cluster pool includes at least one item cluster, the items to be loaded in each item cluster include a first item or a second item obtained by clustering the first items, and the at least one item table includes at least one reference table and at least one relationship table associated with each reference table; for each piece of data to be loaded, the data to be loaded is loaded into the item table corresponding to the item to be loaded in the at least one item table to obtain loaded data, which may include: for each item cluster, using the data to be loaded corresponding to the first item in each piece of data to be loaded as the first loaded data, and using the data to be loaded corresponding to each second item in the item cluster as the second loaded data; loading the first loaded data into the target table corresponding to the first item in the item cluster in the at least one reference table to obtain loaded data for the first item in the item cluster; for each piece of second loaded data, using the second item in the item cluster corresponding to the second loaded data as the current item, and loading the second loaded data into the relationship table corresponding to the current item in the at least one relationship table associated with the target table to obtain loaded data for the current item.
[0074] The item cluster pool may include at least one item cluster, and each item cluster may include a first item and at least one second item obtained based on the clustering of the first items. The first item and the second item here are both the items to be loaded mentioned above. The at least one item table may include at least one reference table (i.e., the item table corresponding to the first item) and at least one relationship table associated with each reference table. In practical applications, the relationship table may optionally represent the relationship between the second item obtained based on the clustering of the first item and the first item. On this basis, taking each item cluster as a unit, the loading process of the first loading data of the first item in the item cluster and the second loading data of each second item can be implemented based on the following steps: the first loading data is loaded into the target table corresponding to the first item in at least one reference table, thereby implementing the loading process of the first loading data; on this basis, for each second loading data, the second loading data is loaded into the relationship table corresponding to the current item in at least one relationship table associated with the target table, thereby implementing the loading process of the second loading data.
[0075] In practical applications, the fields under each reference table may optionally include a data packet identifier, an item identifier of a first item, and a data version of the loaded data corresponding to the first item. Furthermore, the fields under each relationship table may optionally include a data packet identifier, an item identifier, a relationship identifier identifying the relationship between the first item and the second item, and the data status and data version of the loaded data corresponding to the second item. It should be noted that, based on the item identifier and the relationship identifier, a second item can be uniquely identified from the at least one second item, and the data status and data version herein may also correspond to the uniquely identified second item.
[0076] In actual applications, the data to be loaded in the above two data loading schemes can be the original data directly obtained from the data platform, or the operational data that can be used by users after processing the original data. For example, for each piece of original data, filter out the fields that are not required in the operation process, align the structure, or convert fields with different business meanings. This data processing process can be implemented based on the data packet model (i.e., database). On this basis, in order to understand the above data loading process more vividly, we will continue to use the product packages and products mentioned above as examples to illustrate it. For example, see Figure 4 :
[0077] In business scenario 1 of the product selection pool, the fields under the product selection pool table associated with the product selection pool may include a product selection pool identifier, each product selection pool may include n products, and the fields under the product table associated with any product may include a product selection pool identifier and a product identifier. Through the product package model, the product selection pool table can be converted into a product package table associated with the product package, and the product table can be converted into a product table associated with the above-mentioned product package table. Specifically, the fields under the product package table may include a product package identifier, product package status, product package version, and other data, and the fields under the product table associated with the product package table may include a product package identifier, product identifier, product status, product version, and other data.
[0078] In the business scenario 2 of the product selection cluster pool, the fields under the product selection cluster pool table associated with the product selection cluster pool may include the product selection cluster pool identifier, each product selection cluster pool may include n product selection clusters, and the fields under the product selection cluster table associated with any product selection cluster may include the product selection cluster pool identifier and the product selection cluster identifier; further, each product selection cluster may include n products (such as the example above where one popular online toothbrush corresponds to n toothbrushes of the same brand and series), and the fields under the product table associated with any product may include the product selection cluster pool identifier, the product selection cluster identifier, and the product identifier. Through the product package model, the product selection cluster pool table can be converted into a product package table associated with the product package, and the product cluster table can be converted into a product table associated with the above product package table, and then the product table can be converted into a relationship table associated with the above product table. Specifically, the product package table and product table in business scenario 2 are the same as the product package table and product table in business scenario 1. The fields under the relationship table may include the product package identifier, product identifier, relationship identifier, product status, product version, and other data. In other words, in order to meet business scenario 2, based on business scenario 1, the product package model branches out another layer of relationship table.
[0079] The above example uses the product package model (i.e., database) to carry a variety of product selection-related business scenarios, making it applicable to any type of product selection business and has good versatility.
[0080] Figure 5 It is a flowchart of another version control method provided in an embodiment of the present disclosure. This embodiment is optimized based on the various optional schemes in the above embodiment. In this embodiment, optionally, after obtaining the loaded data, the above version control method may further include: when the data packet does not contain the loaded data corresponding to the data to be loaded, or when the data packet contains the loaded data and the data version of the loaded data is smaller than the data packet version, the data state of the loaded data is set to the to-be-deployed state; when the data version of the loaded data corresponding to each data to be loaded is obtained, the incremental version is used as the data packet version, which may include: when the data version of the loaded data corresponding to each data to be loaded is obtained, the loaded data in the to-be-deployed state is deployed, and the data state of the loaded data after the deployment is completed is updated from the to-be-deployed state to the online state; when the data state of each loaded data is the online state, the incremental version is used as the data packet version. Among them, the explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here.
[0081] Correspondingly, such as Figure 5 As shown, the method of this embodiment may specifically include the following steps:
[0082] S210. In response to a data loading instruction, obtain data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded includes a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded.
[0083] S220: Perform incremental processing on the data packet version to obtain an incremental version.
[0084] S230 , for each data to be loaded, load the data to be loaded into an item table corresponding to the item to be loaded in at least one item table to obtain loaded data, and use the incremented version as the data version of the loaded data.
[0085] S230 and S240 are sequentially executed for each data to be loaded. Through S230, the data to be loaded can be loaded into the corresponding item table, that is, loaded into the data packet containing the item table.
[0086] S240: If the data packet does not contain loaded data corresponding to the data to be loaded, or if the data packet contains loaded data and the data version of the loaded data is smaller than the data packet version, set the data state of the loaded data to a state to be deployed.
[0087] Among them, as mentioned above, there may be loaded data corresponding to the data to be loaded in the data packet, or there may be no such loaded data; on this basis, for the former, the data version of the loaded data may be less than the data packet version, or it may be equal to the data packet version. Taking into account the application scenarios that may be involved in the embodiments of the present disclosure, for the loaded data whose data version is equal to the data packet version, its data status is online, that is, it has been deployed; for the loaded data whose data version is less than the data packet version, its data status is offline, that is, it has not been deployed; for the case where there is no corresponding loaded data, the corresponding data to be loaded needs to be deployed. For this reason, when the loaded data does not correspond to the loaded data or the data version of the corresponding loaded data is less than the data packet version, the data status of the loaded data can be set to the state to be deployed. For the former, it is a process from nothing to the state to be deployed, and for the latter, it is a process from offline to the state to be deployed, so that the loaded data can be deployed later.
[0088] It should be noted that the process of setting the data version of the loaded data and the process of setting the data status can be executed successively or simultaneously, and there is no specific limitation here. In addition, the online state can be understood as the state that is currently being applied, and the offline state can be understood as the state that is not currently being applied. In combination with the application scenarios that may be involved in the embodiments of the present disclosure, in the case of full pool synchronization, the above steps are combined with the subsequent steps, and only the products that are newly added to the pool or already exist in the pool but are not currently applied can be deployed. There is no need to repeat the deployment of products that already exist in the pool and are currently being applied, thereby ensuring deployment efficiency.
[0089] S250: When the data version of the loaded data corresponding to each data to be loaded is obtained, the loaded data in the to-be-deployed state is deployed, and the data state of the loaded data after deployment is updated from the to-be-deployed state to the online state.
[0090] Among them, in the case that each loaded data has its own data version, the loaded data in the state to be deployed can be deployed, and the data state of the loaded data after the deployment is completed can be updated from the state to be deployed to the online state. In actual applications, optionally, the deployment operation and the data state update operation can be performed in sequence for each loaded data in the state to be deployed, or the deployment operation can be performed on all loaded data in the state to be deployed, and then the update operation can be performed on their data states, etc., which are not specifically limited here. Optionally, the specific implementation method of the deployment operation here can be related to the specific business, such as the labeling operation (i.e., the operation of assigning a label to a data packet) explained above, and sending messages to other businesses to notify them to perform related operations, etc., which are not specifically limited here.
[0091] S260: When the data status of each loaded data is online, use the incremented version as the data packet version.
[0092] Among them, when the data status of each loaded data is online, the incremental version is used as the data packet version, so that the data packet data (that is, the loaded data here) with the data version consistent with the data packet version in the data packet is all online.
[0093] The technical solution of the embodiment of the present disclosure is to set the data status of the loaded data that has deployment requirements to the to-be-deployed status, then deploy the loaded data in the to-be-deployed status, and update the data status of the loaded data after deployment to the online status. In this way, when the data status of each loaded data is online, the incremental version is used as the data packet version. This means that by judging whether the data status is online and / or whether the data version is consistent with the data packet version, the loaded data obtained after this data loading can be accurately queried from the data packet data in the data packet, which can be considered as data with operational value that matches the current actual situation.
[0094] Figure 6 It is a flowchart of another version control method provided in an embodiment of the present disclosure. This embodiment is optimized based on the various optional schemes in the above-mentioned embodiment. In this embodiment, optionally, the above-mentioned version control method may also include: for previously loaded data that was previously loaded in a data packet and does not correspond to data to be loaded, updating the data status of previously loaded data in an online state in all previously loaded data from an online state to a state to be deployed; determining the data to be deployed in a state to be deployed from the data packet data in the data packet, wherein the loaded data in a state to be deployed is the first deployment data in which the data version of the data to be deployed is greater than the data packet version; deploying the loaded data in a state to be deployed, and updating the data status of the loaded data after deployment from a state to be deployed to an online state, which may include: determining the first deployment data from the data to be deployed, and deploying the first deployment data based on a first deployment method corresponding to the first deployment data, and updating the data status of the first deployment data after deployment from a state to be deployed to an online state. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0095] Correspondingly, such as Figure 6 As shown, the method of this embodiment may specifically include the following steps:
[0096] S310. In response to a data loading instruction, obtain data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded includes a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded.
[0097] S320: Perform incremental processing on the data packet version to obtain an incremental version.
[0098] S330 , for each data to be loaded, load the data to be loaded into at least one item table corresponding to the item to be loaded, obtain loaded data, and use the incremented version as the data version of the loaded data.
[0099] S340: If the data packet does not contain loaded data corresponding to the data to be loaded, or the data packet contains loaded data and the data version of the loaded data is smaller than the data packet version, set the data state of the loaded data to a state to be deployed.
[0100] S50 , for previously loaded data previously loaded in the data package and not corresponding to data to be loaded, update the data status of previously loaded data in the online state among all previously loaded data from the online state to the to-be-deployed state.
[0101] The data packet may contain previously loaded data that corresponds to data to be loaded, or it may contain previously loaded data that does not correspond to any data to be loaded. This indicates that the previously loaded data does not match the current actual situation and cannot be in an online state that represents the current application. To this end, the data state of the previously loaded data in the online state can be updated from the online state to the pending deployment state.
[0102] S360: Determine the data to be deployed in a state to be deployed from the data packet data in the data packet, wherein the loaded data to be deployed is the first deployment data in the data to be deployed whose data version is greater than the data packet version.
[0103] The data package data in the pending deployment state is used as the data package data. The data package data can be loaded data in the pending deployment state or previously loaded data in the pending deployment state. The difference between the two is that the data version of the former is greater than the data package version, while the data version of the latter is equal to the data package version. This difference is the key to distinguishing the two later.
[0104] S370. When the data version of the loaded data corresponding to each data to be loaded is obtained, the first deployment data is determined from the data to be deployed, and the first deployment data is deployed based on the first deployment method corresponding to the first deployment data, and the data status of the first deployment data after deployment is updated from the to-be-deployed status to the online status.
[0105] Among them, the first deployment data (i.e., the loaded data in the state to be deployed) whose data version is greater than the data packet version is determined from the data to be deployed, and then the first deployment data is deployed based on the first deployment method corresponding to the first deployment data, thereby achieving the targeted deployment effect of the first deployment data.
[0106] S380: When the data status of each loaded data is online, use the incremented version as the data packet version.
[0107] The technical solution of the embodiment of the present disclosure updates the data state of the previously loaded data in the online state from the online state to the to-be-deployed state. At this point, the to-be-deployed data may be the loaded data in the to-be-deployed state or the previously loaded data. On this basis, taking into account the difference between the two, the first deployment data (i.e., the loaded data in the to-be-deployed state) is determined from the to-be-deployed data through 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 achieving the effect of targeted deployment of the first deployment data.
[0108] An optional technical solution, based on the above embodiment, the previously loaded data in the to-be-deployed state is the second deployment data whose data version in the to-be-deployed data is equal to the data packet version. The above version control method may also include: determining the second deployment data from the to-be-deployed data, and deploying the second deployment data based on the second deployment method corresponding to the second deployment data, and updating the data state of the deployed second deployment data from the to-be-deployed state to the offline state, thereby ensuring the targeted deployment effect of the second deployment data. On this basis, optionally, the first deployment method may include adding a data packet label corresponding to the data packet, so that the data packet data in the online state is associated with the data packet; and / or, the second deployment method may include deleting the data packet label, so that the data packet data in the offline state is no longer associated with the data packet, and combined with the application scenarios that may be involved in the embodiments of the present disclosure, in the case of full pool synchronization, it can timely remove the label for the second deployment data that needs to be removed from the full pool, thereby effectively solving the problem of data packet label contamination.
[0109] Figure 7 It is a flowchart of another version control method provided in the embodiment of the present disclosure. This embodiment is optimized based on the various optional schemes in the above embodiments. In this embodiment, optionally, after obtaining the data packet corresponding to the data to be loaded, the above version control method may also include: updating the data packet status of the data packet from the effective state to the loading state; after each data to be loaded is loaded, updating the loading state to the deploying state; when the data state of each loaded data is online, updating the deploying state to the effective state. Among them, the explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here.
[0110] Correspondingly, such as Figure 7 As shown, the method of this embodiment may specifically include the following steps:
[0111] S410. In response to a data loading instruction, obtain data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded includes a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded.
[0112] S420: Update the data packet state of the data packet from the effective state to the loading state, and perform incremental processing on the data packet version to obtain an incremental version.
[0113] In response to a data loading instruction, if a data packet can be obtained, it means that the data packet has been previously created and is currently in the valid state. In order to use the data packet status and data packet version as indicators to mark the start and end of different processes (such as the data loading process, data deployment process, and data application process), the data status can be updated from the valid state to the loading state to indicate the start of the data loading process.
[0114] S430 , for each data to be loaded, load the data to be loaded into at least one item table corresponding to the item to be loaded, obtain loaded data, and use the incremented version as the data version of the loaded data.
[0115] S440: If the data packet does not contain loaded data corresponding to the data to be loaded, or if the data packet contains loaded data and the data version of the loaded data is smaller than the data packet version, set the data state of the loaded data to a state to be deployed.
[0116] S450: When the data version of the loaded data corresponding to each piece of data to be loaded is obtained, the data packet status is updated from the loading status to the deploying status.
[0117] Among them, when the data version of the loaded data corresponding to each data to be loaded is obtained, this means that all the data to be loaded has been loaded. Therefore, the data packet status can be updated from the loading status to the deploying status, thereby marking the end of the data loading process and the beginning of the data deployment process.
[0118] S460: Deploy the loaded data in the pending deployment state, and update the data state of the loaded data after the deployment is completed from the pending deployment state to the online state.
[0119] S470: When the data status of each loaded data is online, the incremental version is used as the data package version, and the data package status is updated from the deploying state to the effective state.
[0120] Among them, when the data status of each loaded data is online, this means that all the loaded data in the data package matches the current actual situation and has certain operational value. Therefore, the data package status can be updated from the deploying status to the effective status, thereby marking the end of the data deployment process and the beginning of the data application process.
[0121] The technical solution of the embodiment of the present disclosure updates the data packet status accordingly at different stages, so that the data packet status and data packet version can be used as indicators to mark the start and end of different processes, thereby ensuring the smooth execution of the entire process.
[0122] An optional technical solution, based on the above embodiment, the above version control method may further include: obtaining the data packet status in response to a breakpoint resume instruction; performing an update operation on the acquired data to be loaded or the loaded data in the state to be deployed according to the data packet status, and performing the update operation according to the judgment result. In particular, in combination with the application scenarios that may be involved in the embodiments of the present disclosure, when responding to a data loading instruction, it may be necessary to load a large amount of data to be loaded from the data platform. At this time, the data loading process can be implemented in batches. However, during this period, it is possible that some of the data to be loaded are loaded successfully and some of the data to be loaded fail to load due to uncontrollable problems such as network anomalies. When encountering the above situation, in order to avoid the repeated loading of the loaded data to be loaded or the repeated deployment of the deployed data to be deployed, the breakpoint resume function can be implemented by triggering and then responding to the breakpoint resume instruction. Specifically, in response to the triggered breakpoint resume instruction, the data packet status is obtained. Since the data packet status can indicate whether the process is currently in the data loading process or the data deployment process, it can be determined based on the data packet status whether to perform an update operation on the acquired data to be loaded (this is the case that the process is currently in the data loading process, and part of the acquired data to be loaded has been loaded), or to perform an update operation on the loaded data in the state to be deployed (this is the case that the process is currently in the data deployment process, and part of the loaded data in the state to be deployed has been deployed). Then, the update operation can be performed based on the judgment result, thereby realizing the breakpoint resume function, that is, the function of continuing to load or deploy from the interrupted position, thereby ensuring the timeliness of data processing. In fact, the data packet status is determined based on the above-mentioned version control mechanism, so the breakpoint resume function here can also be considered to be implemented under the above-mentioned version control mechanism.
[0123] On this basis, optionally, when the data packet state is in the loading state, the judgment result is to perform an update operation on the acquired data to be loaded; performing the update operation according to the judgment result may include: determining historical loading data whose data version is less than or equal to the data packet version from the data packet data in the data packet, and using the acquired data to be loaded corresponding to the historical loading data as breakpoint loading data; updating the acquired data to be loaded based on the breakpoint loading data. The historical loading data can be considered as data previously loaded into the data packet, which may correspond to data that also needs to be loaded into the data packet this time, or may correspond to data that does not need to be loaded into the data packet this time. Therefore, the breakpoint loading data that needs to be loaded this time but has not yet been loaded into the data packet can be determined from the acquired data to be loaded based on the historical loading data, thereby updating the acquired data to be loaded based on the breakpoint loading data, so that only the breakpoint loading data is subsequently loaded, thereby realizing the breakpoint loading function.
[0124] Optionally, when the data packet status is in the deploying state, the judgment result is to perform an update operation on the loaded data in the pending deployment state; performing the update operation based on the judgment result may include: determining the breakpoint deployment data in the pending deployment state from the data packet data within the data packet, and updating the loaded data in the pending deployment state based on the breakpoint deployment data. The deployed data packet data within the data packet is either in an online state or an offline state, and only the undeployed data packet data is in the pending deployment state. Therefore, the data packet data in the pending deployment state can be used as the breakpoint deployment data, so that only the breakpoint deployment data is subsequently deployed, thereby realizing the breakpoint deployment function.
[0125] In order to better understand the above breakpoint resume solution, the following continues to use the product package and product in the above example as an example to illustrate it. Figure 8 In response to the breakpoint resume instruction, when the product package is in the initialization state, this indicates that the initialization phase has not yet completed, and the product initialization process, product loading process, and product deployment process can be executed; when the product package is in the loading state, this indicates that the initialization phase has completed, but the loading phase has not yet completed, and the product loading process and product deployment process can be executed; when the product package is in the deployment state, this indicates that the initialization phase and the loading phase have both completed, but the deployment phase has not yet completed, and the product deployment process can be executed. In actual applications, in business scenario 1, the above-mentioned products can be products within the product package; in business scenario 2, the above-mentioned products can be products represented by the relationship between products within the product package.
[0126] Another optional technical solution, based on the above embodiment, after each data to be loaded is loaded, the loading state is updated to the deploying state, which may include: after each data to be loaded is loaded, the loading state is updated to the loading completed state; in response to the data deployment instruction input by the user, the loading completed state is updated to the deploying state; when the data version of the loaded data corresponding to each data to be loaded is obtained, the loaded data in the to-be-deployed state is deployed, which may include: when the data version of the loaded data corresponding to each data to be loaded is obtained and the data packet is in the deploying state, the loaded data in the to-be-deployed state is deployed. Among them, by setting the loading completed state to isolate the loading state and the deploying state, the loaded data in the data packet in the loading completed state can be viewed by the user; and, in the loading completed state, the user can determine whether to deploy the loaded data in the to-be-deployed state, and if so, the loading completed state is updated to the deploying state, thereby realizing the data deployment function. The above technical solution decouples the loading and deployment operations. Thus, even if the deployment operation takes a long time to complete, users can view the loaded data in advance. In addition, it can also improve the data throughput capacity of the operation platform.
[0127] In order to better understand the above technical solutions as a whole, the following continues to use the product package and product in the above example as an example to illustrate them. Figure 9 Taking business scenario 1 as an example, when the data platform notifies the operation platform that a product selection pool is ready, it can first determine whether there is a product package corresponding to the product selection pool in the operation platform. If it does not exist, a product package is created in the initialization phase, and its product package status is the initialization state, and the product package version is 0 (this can be achieved by inserting a statement in SQL (Structured Query Language)). Then, the loading phase is entered to update the initialization state to the loading state. If it exists, it means that a corresponding product package in the effective state previously existed (here it is assumed that its product package version is v), and the loading phase is directly entered to update its product package status from the effective state to the loading state.
[0128] During the loading phase, we can discuss the following two situations:
[0129] Case 1: For any item X in the newly loaded (i.e., ready) selection pool, we will discuss two smaller cases. Case 11) When X does not exist in the product package, it cannot be found using the product version ≤ v. X can be directly loaded into the product package. At this time, X's product status is pending deployment and its product version is v+1. Case 12) When X exists in the product package, it can be found using the product version ≤ v. If the queried X is in the online state, its product version can be directly iterated +1 to update to v+1, and X itself can be updated accordingly. If the queried X is in the offline state, which indicates that its product version is at a certain historical version, the offline state can be updated to the pending deployment state and its product version can be updated to v+1, and X itself can be updated accordingly.
[0130] Case 2: Any product Y that already exists in the product package does not appear in the newly loaded product selection pool. This is discussed in two small cases. Case 21) If Y is online, its product status can be updated to the pending deployment status, and the product version is retained on v; Case 22) If Y is offline, no processing is required, that is, the product status and product version remain unchanged.
[0131] At this point, after each X and each Y has been processed, the loading phase is advanced to the deployment phase, and the product package status is updated from the loading state to the deploying state. Query the product Z in the product package that is in the state to be deployed. Here, we take the two deployment methods of marking (i.e., adding the product package label corresponding to the product package) and unmarking (i.e., removing the product package label) as examples. The Z with product version v+1 is marked, and the Z with product version v is unmarked, thereby completing the deployment of each Z. Then, the product package status is updated from the deploying state to the effective state and the product package version is iterated by +1 to obtain v+1. At this point, the product versions of all X that need to be updated are consistent with the product package version, and the product status is all online; moreover, the product versions of Y that do not need to be updated are all smaller than the product package version, and the product status is all offline.
[0132] In addition to version control, the above technical solution also has the following advantages:
[0133] 1. If a breakpoint occurs anywhere during the loading phase, simply re-execute the loading phase completely. This solution eliminates the need for repeating operations for products whose status and product versions have been updated before the breakpoint. Similarly, if a breakpoint occurs anywhere during the deployment phase, simply re-execute the deployment phase completely. This solution eliminates the need for repeating operations for products whose status has been updated before the breakpoint.
[0134] 2. The state + version progression approach can avoid system instability caused by data + long transactions, thereby improving system stability and throughput. In addition, combined with point 1, the data synchronization completion status before the breakpoint can be intelligently remembered without the need for a one-time full synchronization + transaction approach.
[0135] 3. Since the data platform often notifies the operation platform to load the latest product selection pool through asynchronous messaging, temporary network congestion may cause retransmitted messages to accumulate multiple times until the network is restored and arrive at the operation platform concurrently. Therefore, the CASABA method is used to advance the status to avoid potential concurrency issues and improve security. For example, when the status of a product package is updated from the deploying state to the effective state, the update set status = 'effective', version = v + 1 where status = 'deploying' and version = v method can be used, where version can represent the product package version.
[0136] To better understand the above example, let's explain it from another perspective. Figure 10a and Figure 10b ,in, Figure 10a It mainly shows the product initialization process and product loading process. Figure 10b It mainly shows the product deployment process. Specifically, Figure 10a In the product initialization process, when the operation platform receives a notification of a new addition or update to the product selection pool from the data platform, if there is no product package corresponding to the product selection pool, a product package will be created; if there is a corresponding product package, its product package status will be updated from the effective status to the initialization status. At this point, the product initialization process ends and the product loading process begins. In the product loading process, the product package status is updated from the initialization status to the loading status, and then the product package is queried for products whose product version is less than or equal to the product package version. When batch requesting products from the product selection pool, if the product is not among the queried products, the product is created, and its product status is to be deployed and the product version is the product package version + 1; if the product is among the queried products, if the product version of the product is equal to the product package version, its product version is updated and its product status is maintained, and if the product version of the product is less than the product package version, its product version is updated and its product status is updated to the to-be-deployed status. When all products in the product selection pool are processed, the product loading process ends and the product deployment process begins, see Figure 10b. During the product deployment process, the product package status is updated from the loading status to the deploying status, and then the products in the product package that are in the to-be-deployed status are queried, and each queried product is processed in a loop. When the product version of the queried product is greater than the product package version, the product is tagged in the product middle station tag center, and then its product status is updated to the online status; when the product version of the queried product is less than or equal to the product package version, the product is untagged in the product middle station tag center, and its product status is updated to the offline status. After each queried product is deployed, the product package status is updated to the effective status and its product package version is increased by 1. At this point, the entire product processing process is completed.
[0137] Figure 11 This is a structural block diagram of a version control device provided in an embodiment of the present disclosure, which is used to execute the version control method provided in any of the above embodiments. This device and the version control method of the above embodiments are based on the same concept. For details not fully described in the embodiment of the version control device, please refer to the embodiment of the above version control method. Figure 11 The device may specifically include: a data packet version acquisition module 510, an incremental version acquisition module 520, a data version acquisition module 530, and a data packet version acquisition module 540.
[0138] The data packet version acquisition module 510 is configured to, in response to a data loading instruction, acquire data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded including a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded;
[0139] The incremental version obtaining module 520 is used to perform incremental processing on the data packet version to obtain an incremental version;
[0140] A data version obtaining module 530 is configured to load each piece of data to be loaded into an item table corresponding to the item to be loaded in at least one item table, obtain loaded data, and use the incremented version as the data version of the loaded data;
[0141] The data packet version obtaining module 540 is configured to, when obtaining the data version of the loaded data corresponding to each piece of data to be loaded, use the incremented version as the data packet version.
[0142] Optionally, based on the above device, the device may further include:
[0143] a module for setting a state to be deployed, configured to, after obtaining the loaded data, set the data state of the loaded data to the state to be deployed if the data packet does not contain the loaded data corresponding to the data to be loaded, or if the data packet contains the loaded data and the data version of the loaded data is smaller than the data packet version;
[0144] The data packet version obtaining module 540 may include:
[0145] An online status updating unit is configured to deploy the loaded data in a to-be-deployed state upon obtaining a data version of the loaded data corresponding to each piece of to-be-loaded data, and update the data state of the loaded data after deployment from the to-be-deployed state to the online state;
[0146] The data packet version obtaining unit is used to use the incremented version as the data packet version when the data status of each loaded data is online.
[0147] On this basis, optionally, the version control device may further include:
[0148] a to-be-deployed state updating module, configured to update the data state of previously loaded data in an online state among all previously loaded data, which is previously loaded in a data packet and does not correspond to data to be loaded, from an online state to a to-be-deployed state;
[0149] a to-be-deployed data determining module, configured to determine, from the data packet data in the data packet, the to-be-deployed data in the to-be-deployed state, wherein the loaded data in the to-be-deployed state is the first deployment data in the to-be-deployed data whose data version is greater than the data packet version;
[0150] The online status updating unit may include:
[0151] The online status updating subunit is configured to determine first deployment data from the data to be deployed, deploy the first deployment data based on a first deployment mode corresponding to the first deployment data, and update the data status of the first deployment data after deployment from the to-be-deployed state to the online state.
[0152] On this basis, optionally, the previously loaded data in the to-be-deployed state is second deployment data whose data version is equal to the data packet version in the to-be-deployed data. The version control device may further include:
[0153] The offline state updating module is used to determine the second deployment data from the data to be deployed, deploy the second deployment data based on the second deployment mode corresponding to the second deployment data, and update the data state of the deployed second deployment data from the to-be-deployed state to the offline state.
[0154] On this basis, optionally, the first deployment method includes adding a data packet label corresponding to the data packet; and / or the second deployment method includes deleting the data packet label.
[0155] Alternatively, the version control device may further include:
[0156] A loading status updating module is used to update the data packet status of the data packet from the valid state to the loading state after obtaining the data packet corresponding to the data to be loaded;
[0157] The deploying status update module is used to update the loading status to the deploying status after all the data to be loaded is loaded;
[0158] The effective status update module is used to update the deployment status to the effective status when the data status of each loaded data is online.
[0159] On this basis, optionally, the version control device may further include:
[0160] A data packet status acquisition module, configured to acquire a data packet status in response to a breakpoint resume instruction;
[0161] The update operation execution module is used to determine whether to execute an update operation on the acquired data to be loaded or the loaded data in the state to be deployed according to the data packet state, and to execute the update operation according to the determination result.
[0162] On this basis, optionally, when the data packet state is in the loading state, the judgment result is to perform an update operation on the acquired data to be loaded, and the update operation execution module may include:
[0163] a breakpoint loading data obtaining unit, configured to determine historical loading data whose data version is less than or equal to the data packet version from the data packet data in the data packet, and use the data to be loaded corresponding to the historical loading data in the obtained data to be loaded as the breakpoint loading data;
[0164] The data to be loaded updating unit is used to update the acquired data to be loaded based on the breakpoint loading data.
[0165] Alternatively, when the data packet state is in the deploying state, the determination result is to perform an update operation on the loaded data in the to-be-deployed state. The update operation execution module may include:
[0166] The loaded data updating unit is used to determine the breakpoint deployment data in the to-be-deployed state from the data packet data in the data packet, and update the loaded data in the to-be-deployed state based on the breakpoint deployment data.
[0167] Another optional deployment status update module may include:
[0168] A loading completion status updating unit, configured to update the loading status to a loading completion status after each data to be loaded is loaded;
[0169] A deploying state updating unit, configured to update the loading completion state to the deploying state in response to a data deployment instruction input by a user;
[0170] The online status updating unit may include:
[0171] The loaded data deployment subunit is used to obtain the data version of the loaded data corresponding to each to-be-loaded data, and deploy the loaded data in the to-be-deployed state when the data package is in the deploying state.
[0172] Optionally, the version control device may further include:
[0173] The initial version setting module is used to create a data package and set the data package version to the initial version when no data package has been created in advance.
[0174] Optionally, the version control device may further include:
[0175] 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 instruction for the data packet;
[0176] The invalid state setting module is used to set the data packet state of the data packet to the invalid state.
[0177] On this basis, optionally, the data packet data in the online state is associated with a data packet tag corresponding to the data packet. The version control device may further include:
[0178] The association relationship deletion module is used to delete the association relationship between the data packet data in the online state and the data packet label.
[0179] Optionally, the version control device may further include:
[0180] an online data determining module for determining, in response to a data packet viewing instruction for a data packet, online data having a data version equal to a data packet version from data packet data within the data packet;
[0181] The online data return module is used to return the online data to the instruction triggering device of the data packet viewing instruction.
[0182] Optionally, the to-be-loaded pool includes an item cluster pool, the item cluster pool includes at least one item cluster, the to-be-loaded items in each item cluster include a first item or a second item obtained based on a clustering of the first items, the at least one item table includes at least one reference table and at least one relationship table associated with each reference table, and the data version obtaining module 530 may include:
[0183] a second loading data obtaining unit configured to, for each item cluster, use the data to be loaded corresponding to the first item in each data to be loaded as the first loading data, and use the data to be loaded corresponding to each second item in the item cluster as the second loading data;
[0184] a first loaded data obtaining unit, configured to load the first loaded data into a target table corresponding to the first item in the item cluster in at least one reference table, to obtain the loaded data of the first item in the item cluster;
[0185] The second unit for obtaining the loaded data is used to, for each second loaded data, take the second item in the item cluster corresponding to the second loaded data as the current item, load the second loaded data into a relational table corresponding to the current item in at least one relational table associated with the target table, and obtain the loaded data of the current item.
[0186] The version control device provided by the embodiment of the present disclosure obtains the data to be loaded, the data packet corresponding to the data to be loaded, and the data packet version of the data packet in response to the data loading instruction through the data packet version acquisition module, the data packet corresponds to the to-be-loaded pool, the to-be-loaded pool includes an item pool or an item cluster pool to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the to-be-loaded items in the to-be-loaded pool; the data packet version is incremented by incrementing the version to obtain the incremented version; the data version is obtained by loading the data to be loaded into the item table corresponding to the item to be loaded in at least one item table for each data to be loaded to obtain the loaded data, thereby realizing the process of loading the data to be loaded into the data packet, and then the incremented version is used as the data version of the loaded data; when the data version of the loaded data corresponding to each data to be loaded is obtained by the data packet version acquisition module, the incremented version is used as the data packet version. During the data loading process, the above-mentioned device controls the data version of the loaded data by using the incremental version obtained by incrementally processing the data packet version, and controls the data packet version based on the incremental version after each loaded data has its own data version. Through a progressive version control strategy, it ensures the consistency of the data version of each loaded data in the data packet and the data packet version of the data packet.
[0187] The version control device provided in the embodiments of the present disclosure can execute the version control method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0188] It is worth noting that in the embodiment of the above-mentioned version control device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this disclosure.
[0189] Reference below Figure 12 , which shows an electronic device (eg Figure 12 The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 12 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0190] like Figure 12 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0191] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 12 6 shows an electronic device 600 having various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0192] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart 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 carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0193] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk 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 that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0194] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0195] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0196] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0197] In response to a data loading instruction, obtaining data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded includes a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded;
[0198] Incrementally process the data packet version to obtain an incremental version;
[0199] For each data to be loaded, the data to be loaded is loaded into an item table corresponding to the item to be loaded in at least one item table to obtain loaded data, and an incremented version is used as a data version of the loaded data;
[0200] When the data version of the loaded data corresponding to each piece of data to be loaded is obtained, the incremented version is used as the data packet version.
[0201] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0202] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0203] The units described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a unit does not, in some cases, limit the unit itself. For example, a module for obtaining an incremental version may also be described as a module for performing incremental processing on a data packet version to obtain an incremental version.
[0204] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0205] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0206] According to one or more embodiments of the present disclosure, [Example 1] provides a version control method, which may include:
[0207] In response to a data loading instruction, obtaining data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded includes a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded;
[0208] Incrementally process the data packet version to obtain an incremental version;
[0209] For each data to be loaded, the data to be loaded is loaded into an item table corresponding to the item to be loaded in at least one item table to obtain loaded data, and an incremented version is used as a data version of the loaded data;
[0210] When the data version of the loaded data corresponding to each piece of data to be loaded is obtained, the incremented version is used as the data packet version.
[0211] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1. After obtaining the loaded data, the version control method may further include:
[0212] If the data package does not contain loaded data corresponding to the data to be loaded, or if the data package contains loaded data and the data version of the loaded data is smaller than the data package version, the data state of the loaded data is set to a state to be deployed.
[0213] When the data version of the loaded data corresponding to each piece of data to be loaded is obtained, the incremented version is used as the data packet version, which may include:
[0214] When the data version of the loaded data corresponding to each data to be loaded is obtained, the loaded data in the to-be-deployed state is deployed, and the data state of the loaded data after deployment is updated from the to-be-deployed state to the online state;
[0215] When the data status of each loaded data is online, the incremented version is used as the data package version.
[0216] According to one or more embodiments of the present disclosure, [Example 3] provides the method of Example 2. The version control method may further include:
[0217] For previously loaded data that is previously loaded in a data packet and does not correspond to data to be loaded, updating the data state of previously loaded data that is in an online state among all previously loaded data from an online state to a to-be-deployed state;
[0218] Determining data to be deployed that is in a state to be deployed from the data packet data in the data packet, wherein the loaded data to be deployed includes first deployment data in the data to be deployed whose data version is greater than the data packet version;
[0219] Deploy the loaded data in the pending deployment state and update the data state of the loaded data from the pending deployment state to the online state after the deployment is completed. This may include:
[0220] Determine first deployment data from the data to be deployed, deploy the first deployment data based on a first deployment method corresponding to the first deployment data, and update the data state of the deployed first deployment data from a to-be-deployed state to an online state.
[0221] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 3, wherein the previously loaded data in the to-be-deployed state is second deployment data whose data version is equal to the data packet version in the to-be-deployed data. The version control method may further include:
[0222] Second deployment data is determined from the data to be deployed, the second deployment data is deployed based on a second deployment method corresponding to the second deployment data, and a data state of the deployed second deployment data is updated from a to-be-deployed state to an offline state.
[0223] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 4, wherein the first deployment method includes adding a data packet label corresponding to the data packet; and / or, the second deployment method includes deleting the data packet label.
[0224] According to one or more embodiments of the present disclosure, [Example 6] provides the method of Example 2. After obtaining the data packet corresponding to the data to be loaded, the version control method may further include:
[0225] Update the data packet status of the data packet from the valid state to the loading state;
[0226] After all data to be loaded is loaded, the loading status is updated to the deploying status;
[0227] When the data status of each loaded data is online, the deploying status is updated to the effective status.
[0228] According to one or more embodiments of the present disclosure, [Example 7] provides the method of Example 6. The above version control method may further include:
[0229] Responding to the breakpoint resume instruction, obtaining the data packet status;
[0230] An update operation is performed on the acquired data to be loaded or loaded data in a state to be deployed according to the data packet status, and the update operation is performed according to the judgment result.
[0231] According to one or more embodiments of the present disclosure, [Example 8] provides the method of Example 7, wherein when the data packet state is in the loading state, the judgment result is to perform an update operation on the acquired data to be loaded;
[0232] Perform update operations based on the judgment results, which may include:
[0233] Determine historical loading data whose data version is less than or equal to the data packet version from the data packet data in the data packet, and use the data to be loaded corresponding to the historical loading data in the acquired data to be loaded as the breakpoint loading data;
[0234] Update the acquired data to be loaded based on the breakpoint loading data.
[0235] According to one or more embodiments of the present disclosure, [Example 9] provides the method of Example 7, wherein when the data packet state is in the deploying state, the judgment result is to perform an update operation on the loaded data in the to-be-deployed state;
[0236] Perform update operations based on the judgment results, which may include:
[0237] The breakpoint deployment data in the to-be-deployed state is determined from the data packet data in the data packet, and the loaded data in the to-be-deployed state is updated based on the breakpoint deployment data.
[0238] According to one or more embodiments of the present disclosure, [Example 10] provides the method of Example 6. After each data to be loaded is loaded, the loading state is updated to the deploying state, which may include:
[0239] After each data to be loaded is loaded, the loading status is updated to the loading completed status;
[0240] In response to a data deployment instruction input by a user, the loading completion state is updated to the deploying state;
[0241] When the data version of the loaded data corresponding to each piece of data to be loaded is obtained, deploying the loaded data in a state to be deployed may include:
[0242] When the data version of the loaded data corresponding to each piece of data to be loaded is obtained and the data package is in the deploying state, the loaded data in the deploying state is deployed.
[0243] According to one or more embodiments of the present disclosure, [Example 11] provides the method of Example 1. The above version control method may further include:
[0244] If no data package has been created in advance, a data package is created and the data package version is set to the initial version.
[0245] According to one or more embodiments of the present disclosure, [Example 12] provides the method of Example 1. The above version control method may further include:
[0246] In response to a data packet deletion instruction for the data packet, setting a data state of the data packet data in the data packet to an offline state;
[0247] Sets the packet status of a packet to invalid state.
[0248] 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 tag corresponding to the data packet. The version control method may further include:
[0249] Delete the association between online data packets and data packet labels.
[0250] According to one or more embodiments of the present disclosure, [Example 14] provides the method of Example 1. The above version control method may further include:
[0251] In response to a data packet viewing instruction for a data packet, determining online data having a data version equal to a data packet version from data packet data in the data packet;
[0252] Returns online data to the command triggering device of the packet viewing command.
[0253] According to one or more embodiments of the present disclosure, [Example 15] provides the method of Example 1, wherein the pool to be loaded is an item cluster pool, the item cluster pool includes at least one item cluster, the items to be loaded in each item cluster include a first item or a second item obtained based on a clustering of the first items, and the at least one item table includes at least one reference table and at least one relationship table associated with each reference table;
[0254] For each piece of data to be loaded, loading the data to be loaded into at least one item table corresponding to the item to be loaded to obtain the loaded data may include:
[0255] For each item cluster, the data to be loaded corresponding to the first item in the item cluster in each data to be loaded is used as the first loading data, and the data to be loaded corresponding to each second item in the item cluster is used as the second loading data;
[0256] Loading the first loaded data into a target table corresponding to the first item in the item cluster in at least one reference table to obtain loaded data of the first item in the item cluster;
[0257] For each second loaded data, the second item in the item cluster corresponding to the second loaded data is used as the current item, and the second loaded data is loaded into a relational table corresponding to the current item in at least one relational table associated with the target table to obtain loaded data of the current item.
[0258] According to one or more embodiments of the present disclosure, [Example 16] provides a version control device, which may include:
[0259] a data packet version acquisition module, configured to, in response to a data loading instruction, acquire data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded including a pool of items to be loaded or a pool of item clusters, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded;
[0260] The incremental version obtaining module is used to perform incremental processing on the data packet version to obtain the incremental version;
[0261] a data version obtaining module, configured to load each piece of data to be loaded into an item table corresponding to the item to be loaded in at least one item table, obtain loaded data, and use an incremented version as a data version of the loaded data;
[0262] The data packet version obtaining module is used to use the incremental version as the data packet version when the data version of the loaded data corresponding to each piece of data to be loaded is obtained.
[0263] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0264] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0265] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A version control method, characterized in that: include: In response to a data loading instruction, acquiring data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded including a pool of items to be loaded or a pool of item clusters to be loaded, the data packet includes at least one item table, and the data to be loaded corresponds to the items to be loaded in the pool to be loaded; Performing incremental processing on the data packet version to obtain an incremental version; For each piece of data to be loaded, the data to be loaded is loaded into the item table corresponding to the item to be loaded in the at least one item table to obtain loaded data, and the incremented version is used as the data version of the loaded data; When a data version of the loaded data corresponding to each of the to-be-loaded data is obtained, the incremented version is used as the data packet version; The fields under the item table include the data packet identifier of the data packet, the item identifier of the item to be loaded, and the data version of the loaded data corresponding to the item to be loaded; Among them, after obtaining the data packet corresponding to the data to be loaded, the method also includes: updating the data packet status of the data packet from the effective status to the loading status; after each data to be loaded is loaded, updating the loading status to the deploying status; when the data status of each loaded data is the online status, updating the deploying status to the effective status.
2. The method according to claim 1, characterized in that After obtaining the loaded data, the method further includes: If the data packet does not contain loaded data corresponding to the data to be loaded, or if the data packet contains the loaded data and the data version of the loaded data is smaller than the data packet version, setting the data state of the loaded data to a pending deployment state; The step of obtaining the data version of the loaded data corresponding to each of the to-be-loaded data, and using the incremented version as the data packet version, includes: When the data version of the loaded data corresponding to each of the to-be-loaded data is obtained, deploying the loaded data in the to-be-deployed state, and updating the data state of the loaded data after deployment from the to-be-deployed state to the online state; In a case where the data state of each loaded data is the online state, the incremented version is used as the data packet version.
3. The method according to claim 2, characterized in that Also includes: For previously loaded data previously loaded in the data packet and not corresponding to the data to be loaded, updating the data state of the previously loaded data in the online state among all the previously loaded data from the online state to the to-be-deployed state; Determining data to be deployed in the to-be-deployed state from the data packet data in the data packet, wherein the loaded data in the to-be-deployed state is first deployment data in the data to be deployed whose data version is greater than the data packet version; The deploying the loaded data in the to-be-deployed state, and updating the data state of the loaded data after the deployment is completed from the to-be-deployed state to the online state, includes: The first deployment data is determined from the data to be deployed, and the first deployment data is deployed based on a first deployment mode corresponding to the first deployment data, and the data state of the first deployment data after deployment is updated from the to-be-deployed state to an online state.
4. The method according to claim 3, characterized in that The previously loaded data in the to-be-deployed state is second deployment data in the to-be-deployed data whose data version is equal to the data packet version. The method further includes: The second deployment data is determined from the data to be deployed, and the second deployment data is deployed based on a second deployment mode corresponding to the second deployment data, and the data state of the second deployment data after deployment is updated from the to-be-deployed state to the offline state.
5. The method according to claim 4, characterized in that The first deployment method includes adding a data packet label corresponding to the data packet; and / or the second deployment method includes deleting the data packet label.
6. The method according to claim 2, characterized in that Also includes: In response to a breakpoint resume instruction, obtaining the data packet status; An update operation is performed on the acquired data to be loaded or the loaded data in the to-be-deployed state according to the data packet state, and the update operation is performed according to the judgment result.
7. The method according to claim 6, characterized in that When the data packet state is the loading state, the judgment result is to perform an update operation on the acquired data to be loaded; The performing of the update operation according to the judgment result includes: Determining historical loaded data whose data version is less than or equal to the data packet version from the data packet data in the data packet, and using the data to be loaded corresponding to the historical loaded data in the acquired data to be loaded as breakpoint loaded data; The acquired data to be loaded is updated based on the breakpoint loading data.
8. The method according to claim 6, characterized in that When the data packet state is the deploying state, the judgment result is to perform an update operation on the loaded data in the to-be-deployed state; The performing of the update operation according to the judgment result includes: The breakpoint deployment data in the to-be-deployed state is determined from the data packet data in the data packet, and the loaded data in the to-be-deployed state is updated based on the breakpoint deployment data.
9. The method according to claim 2, characterized in that After each of the to-be-loaded data is loaded, the loading state is updated to a deploying state, including: After all the data to be loaded are loaded, the loading status is updated to a loading completed status; In response to a data deployment instruction input by a user, updating the loading completion state to a deploying state; When the data version of the loaded data corresponding to each piece of the to-be-loaded data is obtained, deploying the loaded data in the to-be-deployed state includes: When the data version of the loaded data corresponding to each of the to-be-loaded data is obtained and the data packet is in the deploying state, the loaded data in the to-be-deployed state is deployed.
10. The method according to claim 1, characterized in that Also includes: If the data package has not been created in advance, the data package is created and the data package version is set to the initial version.
11. The method according to claim 1, characterized in that Also includes: In response to a data packet deletion instruction for the data packet, setting a data state of the data packet data in the data packet to an offline state; The data packet state of the data packet is set to an invalid state.
12. The method according to claim 11, characterized in that The data packet in the online state is associated with a data packet tag corresponding to the data packet, and the method further includes: The association between the data packet data in the online state and the data packet label is deleted.
13. The method according to claim 1, wherein Also includes: In response to a data packet viewing instruction for the data packet, determining online data having a data version equal to the data packet version from data packet data in the data packet; Return the online data to the instruction triggering device of the data packet viewing instruction.
14. The method according to claim 1, wherein The to-be-loaded pool is the item cluster pool, the item cluster pool includes at least one item cluster, the to-be-loaded items in each item cluster include a first item or a second item obtained based on clustering of the first items, and the at least one item table includes at least one reference table and at least one relationship table associated with each reference table; For each piece of data to be loaded, the data to be loaded is loaded into an item table corresponding to the item to be loaded in the at least one item table to obtain loaded data, including: For each of the item clusters, the data to be loaded corresponding to the first item in the item cluster in each of the data to be loaded is used as first loading data, and the data to be loaded corresponding to each of the second items in the item cluster is used as second loading data; loading the first loaded data into a target table corresponding to the first item in the item cluster in the at least one reference table to obtain loaded data of the first item in the item cluster; For each second loaded data, the second item corresponding to the second loaded data in the item cluster is taken as the current item, and the second loaded data is loaded into the relational table corresponding to the current item in the at least one relational table associated with the target table to obtain the loaded data of the current item.
15. A version control device, characterized in that: include: a data packet version acquisition module, configured to, in response to a data loading instruction, acquire data to be loaded, a data packet corresponding to the data to be loaded, and a data packet version of the data packet, wherein the data packet corresponds to a pool to be loaded, the pool to be loaded including a pool of items to be loaded or a pool of item clusters, the data packet includes at least one item table, and the data to be loaded corresponds to an item to be loaded in the pool to be loaded; An incremental version obtaining module, used for performing incremental processing on the data packet version to obtain an incremental version; a data version obtaining module, configured to, for each piece of data to be loaded, load the data to be loaded into an item table corresponding to the item to be loaded in the at least one item table, obtain loaded data, and use the incremented version as the data version of the loaded data; a data packet version obtaining module, configured to, upon obtaining a data version of the loaded data corresponding to each of the to-be-loaded data, use the incremented version as the data packet version; The fields under the item table include the data packet identifier of the data packet, the item identifier of the item to be loaded, and the data version of the loaded data corresponding to the item to be loaded; Wherein, the version control device further includes: A loading status updating module is used to update the data packet status of the data packet from the valid state to the loading state after obtaining the data packet corresponding to the data to be loaded; The deploying status update module is used to update the loading status to the deploying status after all the data to be loaded is loaded; The effective status update module is used to update the deployment status to the effective status when the data status of each loaded data is online.
16. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the version control method according to any one of claims 1 to 14.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the version control method according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Data processing method and device for online table, electronic equipment and storage medium
CN110020328A