Data processing method and related device
Patent Information
- Application Number
- CN202510481310.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]本申请实施例提供了数据处理方法以及相关设备,该相关设备可以包括数据处理装置、电子设备、计算机可读存储介质、计算机程序产品,可以解决存储环境的存储空间消耗过大的问题
[0011]本申请实施例中,基于接收的针对目标应用的发布指令对应的发布类型,从与目标应用对应的多个存储环境中确定第一目标存储环境,并基于发布指令对应的修改数据,对该第一目标存储环境中配置的数据分桶进行数据更新,得到更新后版本的数据。由于数据分桶存储的是目标应用在存储环境下的一个版本的数据,而数据分桶是配置在存储环境中,即,同一个存储环境配置的数据分桶只存储一个版本下的数据,且在对数据分桶的数据修改后,得到的也是一个更新后版本下的数据,因此,采用本申请实施例提供的数据处理方法,同一个存储环境不会存储多个版本的数据,从而减少了存储环境存储的数据量,进而能够有效节省存储环境的存储空间。此外,由于在进行数据更新时,只对发布指令所对应的第一目标存储环境配置的数据分桶进行数据更新,即不是对所有存储环境配置的数据分桶进行数据更新,因此,有利于对发布指令对应的存储环境进行实时更新,提高了更新的灵活性。
Smart Images

Figure CN122964041A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to data processing methods and related equipment, which may include data processing apparatus, electronic equipment, computer-readable storage media, and computer program products. Background Technology
[0002] After data is published, there may be situations where modifications are needed. For example, if the published data content changes over time, it needs to be updated; or, as business grows, it may be necessary to introduce new data types or data sources, in which case updated data needs to be published to support the new business functions.
[0003] Each modification to published data is equivalent to releasing a new version. Currently, version management is achieved through full table cloning, which involves completely copying all data from one database table to another, creating a copy with identical structure and data. In this existing method, a full table clone is performed every time data changes, and each clone is identified by a version number. Users can then locate the corresponding clone and access the relevant data. However, this approach can lead to multiple versions existing within the same storage environment, potentially resulting in excessive storage space consumption. Summary of the Invention
[0004] This application provides a data processing method and related equipment, which may include a data processing device, electronic equipment, computer-readable storage medium, and computer program product, and can solve the problem of excessive storage space consumption in the storage environment.
[0005] In a first aspect, embodiments of this application provide a data processing method, including:
[0006] Receive a release instruction for a target application, the release instruction including release type information, the release type information indicating the release type corresponding to the release instruction;
[0007] Based on the release type corresponding to the release instruction, a first target storage environment is determined from multiple storage environments corresponding to the target application. The storage environment is configured with data buckets, and the data buckets are used to store data of a version of the target application in the storage environment.
[0008] Determine the modified data corresponding to the release instruction;
[0009] Based on the modified data, the data buckets configured in the first target storage environment are updated to obtain the updated version of the data.
[0010] The beneficial effects of the embodiments in this application compared with the prior art are:
[0011] In this embodiment, based on the release type corresponding to the received release instruction for the target application, a first target storage environment is determined from multiple storage environments corresponding to the target application. Then, based on the modified data corresponding to the release instruction, the data buckets configured in the first target storage environment are updated to obtain the updated version of the data. Since a data bucket stores data for one version of the target application within the storage environment, and the data buckets are configured within the storage environment, meaning that a data bucket configured in the same storage environment only stores data for one version, and modifying the data in a data bucket results in data for an updated version, the data processing method provided in this embodiment prevents the storage environment from storing multiple versions of data, thereby reducing the amount of data stored in the storage environment and effectively saving storage space. Furthermore, since the data update only applies to the data buckets configured in the first target storage environment corresponding to the release instruction, rather than updating data buckets in all storage environments, it facilitates real-time updates to the storage environment corresponding to the release instruction, improving update flexibility.
[0012] Optionally, the step of updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data includes:
[0013] Extract data from the modified data row by row to obtain row data;
[0014] Based on the row data, the data buckets configured in the first target storage environment are updated to obtain the updated version of the data.
[0015] Optionally, the storage environment includes a production environment, and further includes the following before receiving the release instruction for the target application:
[0016] Create the first initial data bucket corresponding to the production environment;
[0017] The data image from the development environment is copied to the first initial data bucket to obtain the first data bucket.
[0018] Optionally, the storage environment further includes a grayscale environment, and before receiving the release instruction for the target application, it also includes:
[0019] Create the second initial data bucket corresponding to the grayscale environment;
[0020] The data in the first data bucket is copied to the second initial data bucket to obtain the second data bucket.
[0021] Optionally, the storage environment further includes a testing environment, which, prior to receiving the release instruction for the target application, also includes:
[0022] Create the third initial data bucket corresponding to the test environment;
[0023] The data in the first data bucket is copied to the third initial data bucket to obtain the third data bucket.
[0024] Optionally, determining the first target storage environment from multiple storage environments corresponding to the target application based on the release type corresponding to the release instruction includes:
[0025] When the release type corresponding to the release instruction is a formal release, the formal environment is determined from multiple storage environments corresponding to the target application as the first target storage environment.
[0026] Optionally, determining the first target storage environment from multiple storage environments corresponding to the target application based on the release type corresponding to the release instruction includes:
[0027] When the release type corresponding to the release instruction is a normal grayscale release, the grayscale environment identification information is parsed from the release instruction, and the grayscale environment corresponding to the grayscale environment identification information is determined from multiple storage environments corresponding to the target application as the first target storage environment.
[0028] When the release type corresponding to the release instruction is a large-scale gray release, the production environment is determined from multiple storage environments corresponding to the target application as the first target storage environment.
[0029] Optionally, when the release type corresponding to the release instruction is a large-scale canary release, determining the modified data corresponding to the release instruction includes:
[0030] Select one regular gray-scale release from the existing regular gray-scale releases as the target regular gray-scale release;
[0031] The modified data corresponding to the target ordinary grayscale release is used as the modified data corresponding to the release instruction;
[0032] When the release type corresponding to the release instruction is either a regular grayscale release or a formal release, determining the modification data corresponding to the release instruction includes:
[0033] The modified data is parsed from the release instruction.
[0034] Optionally, the first target storage environment is the production environment. After updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data, the method further includes:
[0035] Obtain the updated data in the first data bucket corresponding to the formal environment and the version information corresponding to the updated data;
[0036] Based on the updated data in the first data bucket and the corresponding version information update history.
[0037] Optionally, after the data updated based on the first data bucket and the corresponding version information update history, the method further includes:
[0038] Receive a version rollback instruction, wherein the version rollback instruction includes the version information to be rolled back;
[0039] In the historical records, find the data corresponding to the version information of the rollback to obtain the rollback data;
[0040] Update the rollback data to the corresponding position in the first data bucket.
[0041] Optionally, the first target storage environment is the grayscale environment. After updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data, the method further includes:
[0042] Obtain the updated data in the second data bucket corresponding to the grayscale environment and the version information corresponding to the updated data;
[0043] Based on the updated data in the second data bucket and the corresponding version information update history.
[0044] Optionally, after updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data, the method further includes:
[0045] Receive a data processing request, the data processing request including storage environment information of the data to be processed;
[0046] Based on the storage environment information, the storage environment of the data to be processed is determined, and a second target storage environment is obtained;
[0047] Filter the data buckets corresponding to the second target storage environment from the preset data bucket set to obtain the data buckets to be returned;
[0048] Based on the data stored in the data bucket to be returned, determine the data to be processed corresponding to the data processing request and return it.
[0049] Optionally, determining and returning the data to be processed corresponding to the data processing request based on the data stored in the data bucket to be returned includes:
[0050] The data stored in the data bucket to be returned is used as the data to be processed, and the data to be processed corresponding to the data processing request is returned.
[0051] Secondly, embodiments of this application provide a data processing apparatus, including:
[0052] A release instruction receiving module is used to receive release instructions for a target application. The release instruction includes release type information, which indicates the release type corresponding to the release instruction.
[0053] The first target storage environment determination module is used to determine a first target storage environment from multiple storage environments corresponding to the target application based on the release type corresponding to the release instruction. The storage environment is configured with data buckets, and the data buckets are used to store data of a version of the target application in the storage environment.
[0054] The data modification determination module is used to determine the modification data corresponding to the release instruction;
[0055] The data update module is used to update the data buckets configured in the first target storage environment based on the modified data, so as to obtain the updated version of the data.
[0056] Optionally, the data update module includes:
[0057] A row data determination unit is used to extract data from the modified data, row by row, to obtain row data.
[0058] The row-level update unit is used to update the data buckets configured in the first target storage environment based on the row data mentioned above, so as to obtain the updated version of the data.
[0059] Optionally, the storage environment includes a formal environment, and the data processing apparatus further includes:
[0060] The first initial data bucket creation module is used to create the first initial data bucket corresponding to the production environment before receiving the release instruction for the target application.
[0061] The first data bucket determination unit is used to copy the data image from the development environment to the first initial data bucket to obtain the first data bucket.
[0062] Optionally, the storage environment further includes a grayscale environment, and the data processing device further includes:
[0063] The second initial data bucket creation module is used to create a second initial data bucket corresponding to the grayscale environment before receiving the release instruction for the target application.
[0064] The second data bucket determination unit is used to copy the data in the first data bucket to the second initial data bucket to obtain the second data bucket.
[0065] Optionally, the storage environment further includes a testing environment, and the data processing device further includes:
[0066] The third initial data bucket creation module is used to create a third initial data bucket corresponding to the test environment before receiving the release instruction for the target application.
[0067] The third data bucket determination unit is used to copy the data in the first data bucket to the third initial data bucket to obtain the third data bucket.
[0068] Optionally, the first target storage environment determination module includes:
[0069] The formal release environment determination unit is used to determine the formal environment as the first target storage environment from multiple storage environments corresponding to the target application when the release type corresponding to the release instruction is a formal release.
[0070] Optionally, the first target storage environment determination module includes:
[0071] The environment determination unit for ordinary grayscale release is used to parse the grayscale environment identification information from the release instruction when the release type corresponding to the release instruction is ordinary grayscale release, and determine the grayscale environment corresponding to the grayscale environment identification information from multiple storage environments corresponding to the target application as the first target storage environment.
[0072] The environment determination unit for large-scale grayscale release is used to determine the official environment as the first target storage environment from multiple storage environments corresponding to the target application when the release type corresponding to the release instruction is a large-scale grayscale release.
[0073] Optionally, when the release type corresponding to the release instruction is a large-scale grayscale release, the modification data determination module is specifically used to: select one ordinary grayscale release from the ordinary grayscale releases that have been performed as the target ordinary grayscale release; and use the modification data corresponding to the target ordinary grayscale release as the modification data corresponding to the release instruction.
[0074] Optionally, when the release type corresponding to the release instruction is either the normal grayscale release or the formal release, the modified data determination module is specifically used for:
[0075] The modified data is parsed from the release instruction.
[0076] Optionally, the first target storage environment is the formal environment, and the data processing device further includes:
[0077] The first data bucket history update module is used to update the data buckets configured in the first target storage environment based on the modified data, and after obtaining the updated version of the data, obtain the updated data in the first data bucket corresponding to the production environment and the version information corresponding to the updated data; and update the history based on the updated data in the first data bucket and the corresponding version information.
[0078] Optionally, the data processing apparatus further includes:
[0079] The version rollback instruction receiving module is used to receive a version rollback instruction after the data updated based on the first data bucket and the corresponding version information update history, wherein the version rollback instruction includes the version information to be rolled back.
[0080] The rollback data determination module is used to find the data corresponding to the rollback version information in the historical record and obtain the rollback data;
[0081] The version rollback module is used to update the rollback data to the corresponding position in the first data bucket.
[0082] Optionally, the first target storage environment is the grayscale environment, and the data processing device further includes:
[0083] The second data bucket history update module is used to update the data buckets configured in the first target storage environment based on the modified data, and after obtaining the updated version of the data, obtain the updated data in the second data bucket corresponding to the grayscale environment and the version information corresponding to the updated data; and update the history based on the updated data in the second data bucket and the corresponding version information.
[0084] Optionally, the data processing apparatus further includes:
[0085] The data processing request receiving module is used to receive a data processing request after updating the data buckets configured in the first target storage environment based on the modified data and obtaining the updated version of the data. The data processing request includes storage environment information of the data to be processed.
[0086] The target storage environment determination module is used to determine the storage environment of the data to be processed based on the storage environment information, and obtain a second target storage environment;
[0087] The data bucket determination module is used to filter out the data buckets corresponding to the second target storage environment from the preset data bucket set to obtain the data buckets to be returned.
[0088] The data return module is used to determine the data to be processed corresponding to the data processing request based on the data stored in the data bucket to be returned and return it.
[0089] Optionally, the data return module is specifically used for:
[0090] The data stored in the data bucket to be returned is used as the data to be processed, and the data to be processed corresponding to the data processing request is returned.
[0091] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method as described in any of the first aspects.
[0092] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method described in any of the first aspects.
[0093] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in any of the first aspects above.
[0094] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0095] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0096] Figure 1 This is a diagram illustrating a method of version management for data using full table data cloning provided by existing technology;
[0097] Figure 2 This is a schematic flowchart of a data processing method provided in an embodiment of this application;
[0098] Figure 3 This is a schematic flowchart of another data processing method provided in an embodiment of this application;
[0099] Figure 4 This is a schematic flowchart of another data processing method provided in an embodiment of this application;
[0100] Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0101] Figure 6 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation
[0102] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0103] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0104] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0105] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0106] Data publishing refers to the process of transferring data from a source database to a target database or data warehouse. Publishing data requires modifications to the already published data, and each modification to the published data is equivalent to publishing a new version.
[0107] As the number of versions increases, version management of the data corresponding to these versions is required. Since a full table data clone generates a copy that is completely identical to the original table structure and data, if a full table data clone is performed every time data changes during version management, not only will multiple versions appear in the same storage environment, but it will also lead to excessive consumption of storage space in that storage environment (modifications to published data are usually partial modifications, while a full table data clone copies all the data).
[0108] The following is combined with Figure 1 This describes the process of version control of data using full table data cloning.
[0109] exist Figure 1 middle:
[0110] Step S11: User A edits the data in the data draft to obtain the edited data.
[0111] Step S12: Publish the version of the data that includes the edited data.
[0112] Step S13, full table clone, that is, to perform a full table clone of the data in the published version that includes edit data.
[0113] Step S14: Update the version number index in the version number index service, that is, update the version number index of the version containing the edited data in the version number index service.
[0114] Step S15: Store the corresponding version data and version number in the database.
[0115] In step S16, when the version number index service receives a query from user B for the version number index, it queries the database for the corresponding version number and the data corresponding to that version number.
[0116] according to Figure 1 As can be seen, the database stores the version number and corresponding data obtained from each full table clone, which results in low storage space utilization.
[0117] To improve the utilization rate of storage space in the storage environment, this application provides a data processing method.
[0118] In this data processing method, corresponding data buckets are configured for each storage environment outside the development environment, and a version of data published in the corresponding storage environment is stored in the data bucket. For example, if the storage environment is a production environment, and the data bucket corresponding to the production environment is the first data bucket, then the first data bucket stores a version of data published in the production environment. This version of data is also called the current version of data. The current version of data may be the latest version of data, or it may not be the latest version of data.
[0119] Data bucketing is a data management and preprocessing technique that divides data into smaller, more manageable parts according to certain partitioning rules. The same data bucket follows the same partitioning rules, which can be based on numerical range, hash value, or other attributes.
[0120] In this embodiment of the application, the storage environment includes a development environment, a production environment, a testing environment, a grayscale environment, and so on.
[0121] The development environment is an environment specifically designed for developers to write, test, debug, and deploy software programs. The configuration and selection of the development environment usually depend on the type of project being developed, the target platform, and the development team's technology stack.
[0122] The formal environment, also known as the production environment, refers to the actual operating environment in which software or systems are delivered to end users and put into actual use.
[0123] The testing environment is a dedicated, independent environment set up specifically for software testing. It is used to verify the functionality, performance, security, and compatibility of software during the development process. The purpose of the testing environment is to simulate real-world user scenarios, ensuring that the software meets expected requirements before release and to identify and fix potential defects or problems.
[0124] A gray-scale environment is a special environment between the development and production environments. It is used to gradually roll out new versions or features in real-world user scenarios. In other words, before full deployment, it involves small-scale verification to identify and fix potential problems, reducing risk and ensuring system stability and performance. It's important to note that when two gray-scale environments employ different gray-scale strategies, they are considered different gray-scale environments, and their corresponding storage environment information will also differ. For example, suppose gray-scale environment 1 allocates 10% of traffic to the new version and 90% to the old version, while gray-scale environment 2 prioritizes pushing the new version to newly registered users and the old version to existing users. In this case, gray-scale environment 1 and gray-scale environment 2 are two different storage environments, and they correspond to different storage environment information.
[0125] The data processing method provided in the embodiments of this application is described below with reference to the accompanying drawings.
[0126] Figure 2 A flowchart illustrating a data processing method provided in an embodiment of this application is shown. This data processing method can be applied to electronic devices, and is described in detail below:
[0127] Step S21: Receive a release instruction for the target application. The release instruction includes release type information, which indicates the release type corresponding to the release instruction.
[0128] Here, the target application is the application from which the data will be published. This target application can be selected by the user, in which case the electronic device will use the user-selected application as the target application. Alternatively, the target application can be determined in other ways, such as by pre-setting corresponding publication times for different applications, and then using the application corresponding to that publication time as the target application when the publication time arrives.
[0129] The release type information can be represented by characters, with different characters representing different release types; it can also be represented by numerical values, with different numerical values representing different release types. Furthermore, the release type information can also be represented by descriptive information, which is not limited here. In this embodiment, the release type includes gray-scale release and formal release. Gray-scale release refers to releasing modified data to a gray-scale environment, while formal release refers to releasing modified data to a formal environment.
[0130] Specifically, users can issue a release command by triggering a specific action or event. These actions or events are typically provided by the user interface (UI), for example, users can issue release commands through buttons, menu options, or other interactive elements on a UI interface (such as a webpage, mobile application, or desktop software); these actions or events can also be provided through an application programming interface (API), for example, users can trigger a release command by sending a request through an API interface.
[0131] In this embodiment, when data stored in a data bucket needs to be modified—for example, when incorrect data is stored in a data bucket or when new data needs to be added—the data in the data bucket needs to be modified. At this time, the electronic device receives a release command input from its own input device or a release command sent by another electronic device. Subsequently, the electronic device updates the modified data corresponding to the release command to the corresponding data bucket according to the release command, thereby achieving the purpose of publishing the modified data to the storage environment corresponding to the data bucket. Considering that modified data is usually published to a production environment or a gray-scale environment, and the data buckets corresponding to the production environment and the gray-scale environment are not the same, to improve the accuracy of the modified data publication, the release command needs to include release type information to indicate the publication type corresponding to the release command. When the electronic device receives the release command, it can parse the release type information from the release command.
[0132] Step S22: Based on the release type corresponding to the release instruction, determine the first target storage environment from multiple storage environments corresponding to the target application. The storage environment is configured with data buckets, which are used to store data of a version of the target application in the storage environment.
[0133] Specifically, this release type includes official release and canary release. Official release refers to the release method of publishing modified data to the production environment, while canary release refers to the release method of publishing modified data to a canary environment.
[0134] In this embodiment, a pre-defined correspondence between release types and storage environments is established. Once the release type corresponding to a release instruction for a target application is determined, the storage environment corresponding to the release type of that release instruction can be determined based on the pre-defined correspondence between release types and storage environments. Specifically, the correspondence between release types and storage environments includes: when the release type is a formal release, the corresponding storage environment is a formal environment.
[0135] In this embodiment, each storage environment corresponding to the target application is configured with a data bucket. Each data bucket is used to store data for one version of the target application in the corresponding storage environment. For example, assuming the storage environment includes a production environment, a test environment, a gray-scale environment 1, and a gray-scale environment 2, the preset data bucket set includes four data buckets. Assuming these four data buckets are data bucket 1, data bucket 2, data bucket 3, and data bucket 4, and data bucket 1 corresponds one-to-one with the production environment, data bucket 2 with the test environment, data bucket 3 with gray-scale environment 1, and data bucket 4 with gray-scale environment 2, then data bucket 1 is used to store data for one version of the target application released in the production environment, data bucket 2 is used to store data for one version of the target application released in the test environment, data bucket 3 is used to store data for one version of the target application released in gray-scale environment 1, and data bucket 4 is used to store data for one version of the target application released in gray-scale environment 2. It should be noted that the versions of data stored in different data buckets are not necessarily the same.
[0136] If the release type is a formal release, then based on the correspondence between the release type and the storage environment, the first target storage environment corresponding to the formal release is selected from the formal environment, test environment, grayscale environment 1 and grayscale environment 2. The first target storage environment selected is the formal environment.
[0137] Step S23: Determine the modified data corresponding to the above-mentioned release instruction.
[0138] The modified data refers to the data that needs to be publicly disclosed or published in the specified storage environment.
[0139] In this embodiment, the modified data may be the data carried by the release instruction, or the data determined according to the release type of the release instruction; no limitation is made here.
[0140] Step S24: Based on the modified data, update the data buckets configured in the first target storage environment to obtain the updated version of the data.
[0141] Specifically, updating data in the data buckets configured in the first target storage environment can include: modifying the data in the data buckets, which may include modifying some data or all data; updating data in the data buckets can also include: adding data to the data buckets. When the data in a data bucket is updated, the resulting data is called the updated version. For example, assuming the data bucket stores the first version of the data, after updating the first version of the data, the data bucket will store the updated version of the data (let's call it the second version), meaning the first version of the data will no longer be stored in the data bucket.
[0142] Optionally, to improve the accuracy of data updates, row-level updates can be used to update the data in the data buckets. In this case, based on the modified data, the data buckets configured in the first target storage environment are updated to obtain the updated version of the data, including:
[0143] A1. Extract the data from the modified data as a row unit to obtain the row data.
[0144] A2. Based on the above row data, update the data buckets configured in the first target storage environment to obtain the updated version of the data.
[0145] Row-level updates refer to the operation of updating a single row of data. This update method allows users to precisely modify the values of one or more fields in a row of a table without affecting the data in other rows.
[0146] In this embodiment, the modified data can be a single row or multiple rows. When the modified data consists of multiple rows, the data corresponding to each row can be extracted first to obtain row data, and then the extracted row data can be used to update the data in the data bucket row by row. When the modified data consists of a single row, the row data can be used directly to update the data in the data bucket.
[0147] In this embodiment, based on the release type corresponding to the received release instruction for the target application, a first target storage environment is determined from multiple storage environments corresponding to the target application. Then, based on the modified data corresponding to the release instruction, the data buckets configured in the first target storage environment are updated to obtain the updated version of the data. Since a data bucket stores data for one version of the target application within the storage environment, and the data buckets are configured within the storage environment, meaning that a data bucket configured in the same storage environment only stores data for one version, and modifying the data in a data bucket results in data for an updated version, the data processing method provided in this embodiment prevents the storage environment from storing multiple versions of data, thereby reducing the amount of data stored in the storage environment and effectively saving storage space. Furthermore, since the data update only applies to the data buckets configured in the first target storage environment corresponding to the release instruction, rather than updating data buckets in all storage environments, it facilitates real-time updates to the storage environment corresponding to the release instruction, improving update flexibility.
[0148] To more clearly illustrate the advantage of the data processing method provided in the embodiments of this application in saving storage space, a specific example is given below.
[0149] Assume each data entry requires M space, a table contains N data entries (e.g., N entries), the number of historical versions is S, and C is the number of storage environments (e.g., 3 grayscale environments and 1 production environment, then C = 4), where C is a constant. For current technology, since it stores the entire table, each new version release clones the entire table. Therefore, when S versions are released, the total data volume is M * N * S. However, only C versions of this data are currently in use. Therefore, the space utilization rate of the current technology is M * N * C / M * N * S = C / S. For the data processing method provided in this application, since it is not a full table storage, assuming that each released version contains only one piece of data, the storage space added with each release is M, so the space usage brought about by version iteration is M*S; each storage environment of this application has at least one complete data, consuming a total space of M*N*C; therefore, the total space occupation is M*N*C+M*S, and the space utilization rate is M*N*C / (M*N*C+M*S)=N*C / (N*C+S). Since S will become larger and larger as the number of versions increases, while C is a constant, N*C / (N*C+S) is greater than C / S.
[0150] The above describes the process of updating data buckets configured in the primary target storage environment when publishing modified data. Before updating data buckets, the data needs to be stored in the corresponding data buckets first. The following describes the process of storing data in various data buckets (such as data buckets for production environments, data buckets for gray-scale environments, and data buckets for testing environments).
[0151] First, let's describe the process of storing data in data buckets in a production environment. In some embodiments, before step S21 above, the process includes:
[0152] B1. Create the first initial data bucket corresponding to the production environment.
[0153] Specifically, considering that the first initial data bucket is used to store data in the development environment, storage space of the same size can be requested according to the storage space corresponding to the development environment, and the requested storage space can be used as the storage space for the first initial data bucket corresponding to the production environment.
[0154] B2. Copy the data image from the development environment to the first initial data bucket mentioned above to obtain the first data bucket.
[0155] Among them, mirror copying is a data replication technology whose core purpose is to create a copy that is completely identical to the original data, just like a reflection in a mirror.
[0156] Specifically, the data in the development environment (such as all data in the development environment), its configuration information, and status information are copied to the first initial data bucket. To distinguish it from the first initial data bucket before the image data is copied, the first initial data bucket after the image data is copied is called the first data bucket.
[0157] It should be noted that the storage space of the first initial data bucket can be unlimited, that is, when the storage space is insufficient to store new data, the storage space of the first data bucket can be increased.
[0158] In this embodiment of the application, considering that the development environment is where code is written and preliminary functional verification is performed, that is, the data in the development environment is usually the latest and contains the latest business logic and functions, copying the data mirror of the development environment to the first initial data bucket corresponding to the production environment is beneficial to ensure that the first data bucket stores the latest data and the latest business logic and functions, thereby facilitating the return of the latest data to be processed.
[0159] After introducing how to store data in the data buckets corresponding to the production environment, the next step is to describe how to store data in the data buckets corresponding to the grayscale environment. That is, in some embodiments, before step S21 above, the process further includes:
[0160] Create a second initial data bucket corresponding to the grayscale environment; copy the data from the first data bucket to the second initial data bucket to obtain the second data bucket.
[0161] It should be noted that the second initial data bucket can be created simultaneously with the first initial data bucket, or it can be created before or after the first initial data bucket; there is no limitation here. Specifically, the creation process of the second initial data bucket is similar to that of the first initial data bucket, the difference being that the first initial data bucket corresponds to the production environment, while the second initial data bucket corresponds to the grayscale environment.
[0162] In this embodiment, all or part of the data in the first data bucket can be copied to the second initial data bucket. Optionally, when copying a portion of the data from the first data bucket to the second initial data bucket, a grayscale strategy corresponding to the grayscale environment can be used. For example, if the grayscale strategy prioritizes pushing a certain function to the user, the data corresponding to that function in the first data bucket can be copied to the second initial data bucket. Thus, when the data bucket determined based on the storage environment information included in the data processing request is the second data bucket, the data stored in the second data bucket can be returned to achieve the goal of prioritizing the push of the corresponding function to the user.
[0163] In this embodiment, data is mirrored and copied from the first data bucket to the second initial data bucket to obtain the second data bucket. Since the first data bucket corresponds to the production environment and the second data bucket corresponds to the grayscale environment, and both the production and grayscale environments are user-facing environments, performing the mirror copy operation ensures that the data in the second data bucket is consistent with the corresponding data in the first data bucket. That is, it ensures the consistency of the same data stored in the user-facing environment, thereby improving the user experience.
[0164] The above describes the process of storing data in data buckets corresponding to the production environment and the grayscale environment. The following describes the process of storing data in data buckets corresponding to the test environment. Specifically, in some embodiments, before step S21 above, the process further includes:
[0165] Create a third initial data bucket corresponding to the test environment; copy the data from the first data bucket to the third initial data bucket to obtain the third data bucket.
[0166] It should be noted that the third initial data bucket can be created simultaneously with the first and / or second initial data buckets, or it can be created before or after the first and / or second initial data buckets; there is no limitation here. Specifically, the creation process of the third initial data bucket is similar to that of the first initial data bucket, the difference being that the first initial data bucket corresponds to the production environment, while the third initial data bucket corresponds to the test environment.
[0167] In this embodiment, all or part of the data in the first data bucket can be mirrored and copied to the third initial data bucket. Since the first data bucket corresponds to the production environment and the third data bucket corresponds to the testing environment, and the testing environment is used to verify the software's functionality, performance, compatibility, security, and other quality attributes during software development, performing the mirror copy operation ensures that the data in the third data bucket is consistent with the corresponding data in the first data bucket. This makes the testing environment as close as possible to the real user's usage scenario (i.e., the production environment), thereby improving the effectiveness and reliability of the test.
[0168] Of course, if there are other data buckets corresponding to other storage environments, the required data will also be copied from the first data bucket to ensure the consistency between the data stored in these data buckets and the corresponding data in the first data bucket.
[0169] After creating data buckets corresponding to different storage environments and storing the corresponding data in the created data buckets, it may be necessary to modify the data in the data buckets. That is, in some embodiments, in S22 above, based on the release type corresponding to the above release instruction, a first target storage environment is determined from multiple storage environments corresponding to the above target application, including:
[0170] When the release type corresponding to the above release instruction is a formal release, the formal environment is determined from multiple storage environments corresponding to the above target application as the first target storage environment.
[0171] Specifically, if the electronic device determines that the release type is a formal release based on the release type information of the release instruction, it means that the modified data will be released to the production environment. This requires modifying the data stored in the first data bucket corresponding to the production environment. In this case, the production environment is selected from multiple storage environments corresponding to the target application as the first target storage environment. Subsequently, the corresponding first data bucket can be determined based on this production environment, and the data stored in the first data bucket can be modified based on the modified data. Optionally, before modifying the data stored in the first data bucket, the location information corresponding to the modified data in the first data bucket can be determined first. For example, when the location information is set by the user, the location information corresponding to the modified data is determined based on the user-defined information; when the location information is determined by the attribute information of the modified data, the correspondence between data and location information for different attribute information can be pre-defined, and then the location information corresponding to the modified data is determined based on the attribute information of the modified data and the pre-defined correspondence between data and location information for different attribute information. After determining the location information corresponding to the modified data in the first data bucket, the modified data is updated (e.g., mirrored) to the location in the first data bucket corresponding to that location information. In other words, the mirrored data is copied to the data bucket corresponding to the production environment, so as to achieve the purpose of accurately publishing the modified data to the production environment.
[0172] Optionally, after copying the modified data image to the first data bucket, to ensure consistency between the data in other storage environments and the corresponding data in the production environment, the data in other storage environments corresponding to the modified data in the production environment is modified accordingly. That is, after copying the modified data image to the first data bucket, the process also includes:
[0173] In the grayscale environment and / or test environment, determine the data corresponding to the modified data in the production environment, and replace the determined data in the grayscale data and / or test environment with the modified data mentioned above. This modified data is the modified data corresponding to the release command. For example, assuming the modified data in the production environment is the recommended video, and the data before modification is video 1, and the data after modification (i.e., the modified data) is video 2, then video 1 in the grayscale environment and test environment will be automatically modified to video 2.
[0174] In this embodiment of the application, since the corresponding data is automatically updated in the grayscale environment and / or the test environment, the corresponding data in the grayscale environment is consistent with the corresponding data in the official environment, and / or the corresponding data in the test environment is consistent with the corresponding data in the official environment.
[0175] The above describes the process of determining the production environment as the primary target storage environment when the release type is a formal release. This is because there is only one production environment corresponding to the target application. The following describes the process of determining the primary target storage environment when the release type is a canary release. Since canary environments are divided through canary strategies—that is, different canary strategies correspond to different canary environments, and different canary environments correspond to different second data buckets—the number of canary environments may be greater than one or equal to one. When the target application corresponds to only one canary environment, if the electronic device determines that the release type corresponding to the release instruction is a canary release (meaning the user wants to release modified data to the canary environment), then the electronic device can determine that canary environment as the primary target storage environment.
[0176] When the number of grayscale environments corresponding to the target application is greater than 1, in order to improve the flexibility of publishing data in the grayscale environment, the publishing instruction can also be set to include the identification information of the grayscale environment. When the electronic device determines that the publishing type corresponding to the publishing instruction is grayscale publishing, it filters out the grayscale environment corresponding to the identification information of the grayscale environment from the grayscale environment corresponding to the target application according to the identification information of the grayscale environment carried in the publishing instruction, and uses the filtered grayscale environment as the first target storage environment.
[0177] After selecting the grayscale environment as the first target storage environment, the modified data is updated to the data bucket corresponding to the selected grayscale environment. The process of updating the modified data to the second data bucket is similar to the process of updating the modified data to the first data bucket, and will not be described in detail here.
[0178] In the above introduction, there was only one type of canary release. However, considering the actual situation where there are multiple canary environments, after a user publishes modified data to one canary environment, they may want to publish the same modified data to the remaining canary environments. In this case, specifying the canary environments to be published to one by one would result in excessively long operation times. Therefore, canary environments can be further divided into normal canary release and incremental canary release. Normal canary release means publishing the modified data to the canary environment corresponding to the identifier information of the canary environment included in the release command, that is, updating the modified data to the second data bucket corresponding to the identifier information of the canary environment included in the release command. Incremental canary release, on the other hand, is used to publish the modified data from the previous normal canary release to other canary environments besides the one from which the normal canary release was performed, that is, updating the modified data from the previous normal canary release to the data buckets corresponding to the other canary environments besides the one from which the normal canary release was performed.
[0179] That is, in some embodiments, if the grayscale release includes normal grayscale release and large-scale grayscale release, then in step S22 above, based on the release type corresponding to the release instruction, determining the first target storage environment from multiple storage environments corresponding to the target application includes:
[0180] C1. When the release type corresponding to the above release instruction is a normal grayscale release, the grayscale environment identification information is parsed from the above release instruction, and the grayscale environment corresponding to the above grayscale environment identification information is determined from multiple storage environments corresponding to the above target application as the above first target storage environment.
[0181] Specifically, the electronic device parses the grayscale environment identification information from the release command, and selects the corresponding grayscale storage environment from multiple storage environments corresponding to the target application based on the grayscale environment identification information. Subsequently, after determining the modified data corresponding to the release command, the modified data is mirrored and copied to the second data bucket corresponding to the selected grayscale storage environment based on the location information of the modified data.
[0182] C2. When the release type corresponding to the above release instruction is a large-scale gray release, the production environment is determined from multiple storage environments corresponding to the above target application as the first target storage environment.
[0183] Specifically, when the release type is a large-scale canary release, it indicates that the user wants to release the modified data to all canary environments except those that have already undergone a regular canary release. Considering that after data is modified in the production environment, to ensure data consistency across various storage environments, corresponding modifications will be automatically made to other storage environments based on the data modified in the production environment. Therefore, when the electronic device determines that the release type is a large-scale canary release, it will use the production environment as the primary target storage environment.
[0184] In this embodiment, since grayscale release is further divided into normal grayscale release and mass grayscale release, and normal grayscale release and mass grayscale release are two different release methods, when the electronic device receives the release instruction, it can select the corresponding release method according to whether the release type belongs to normal grayscale release or mass grayscale release, which is beneficial to improving the flexibility of release.
[0185] In some embodiments, the information included in the release instruction is related to the release type, and may or may not include modified data; that is, the method for determining the modified data is related to the release type.
[0186] When the release type corresponding to the above release instruction is a large-scale gray release, step S23 above, determining the modification data corresponding to the above release instruction, includes: selecting one ordinary gray release from the ordinary gray releases that have been performed as the target ordinary gray release; and using the modification data corresponding to the target ordinary gray release as the modification data corresponding to the above release instruction.
[0187] When the release type corresponding to the above release instruction is either the above-mentioned ordinary gray-scale release or the above-mentioned formal release, step S23 above, determining the modification data corresponding to the above release instruction, includes:
[0188] The modified data was obtained by parsing the above release command.
[0189] The aforementioned target grayscale release refers to one of the previously conducted grayscale releases. This target grayscale release can be the most recent grayscale release or one selected by the user from the previously conducted grayscale releases. Specifically, if the release type is a volume-based grayscale release, the release type information included in the release instruction can be set to include the identifier information of the target grayscale release. After receiving the release type, the electronic device can parse the identifier information of the target grayscale release from the release type information, and then determine the target grayscale release corresponding to the identifier information. After determining the target grayscale release, the modified data released by the target grayscale release is used as the modified data corresponding to the release instruction currently received by the electronic device. Subsequently, the modified data corresponding to the release instruction can be updated to the first data bucket to synchronously update other storage environments (including grayscale environments that have not been updated).
[0190] Of course, if the release type is a standard grayscale release or a formal release, meaning the release instruction contains modified data, then the corresponding modified data can be parsed from the release instruction. Specifically, the fields used to store modified data in the release instruction can be pre-defined. After receiving the release instruction, the electronic device extracts the corresponding data from the pre-defined fields of the release instruction; the extracted data is the modified data corresponding to that release instruction. Subsequently, this modified data can be updated to the second data bucket (if the release type is a standard grayscale release) or the first data bucket (if the release type is a formal release).
[0191] In some embodiments, to facilitate the review of the data replaced by the mirror copy (i.e., the modified data) and the version information corresponding to the modified data, this information is recorded to obtain the corresponding historical record. Assuming the first target storage environment is the aforementioned production environment, then in S24, after updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data, the process further includes:
[0192] D1. Obtain the updated data in the first data bucket corresponding to the above formal environment, as well as the version information corresponding to the updated data.
[0193] Specifically, the electronic device can determine the updated (e.g., mirror copy replacement) data and its corresponding version information in the first data bucket based on the attribute information of the modified data that can clearly point to the corresponding data in the first data bucket corresponding to the formal environment. The electronic device can also determine the data replaced by mirror copy in the first data bucket and the version information corresponding to the data replaced by mirror copy based on the data and version information input by the user. This is not limited here.
[0194] Optionally, the attribute information of the modified data that can explicitly point to the corresponding data in the first data bucket can be address information, which reflects the storage address of the modified data in the first data bucket. When the attribute information of the modified data is address information, before the mirror copy operation is performed, the data in the first data bucket corresponding to the address information is used as the data to be replaced by the mirror copy in the first data bucket, and the version information corresponding to the first data bucket is used as the version information corresponding to the data to be replaced by the mirror copy. Of course, the attribute information of the modified data can also be the unique identification information of the data, such as the name or sequence number of the data, which is not limited here.
[0195] Optionally, the version information may include the version number, or it may include a description of the version number; this is not limited here.
[0196] D2. Based on the updated data in the first data bucket and the corresponding version information update history.
[0197] The aforementioned history records can be in the form of a table, in which case the history record is a history record table; or they can be in the form of a text file, in which case the history record is a history record file, such as a Word file or a PDF file.
[0198] In this embodiment, the data replaced by the mirror copy in the first data bucket and the corresponding version information are recorded in the history record to update the history record. Since the history record includes the data replaced by the mirror copy and the corresponding version information, the data replaced by the mirror copy and the version information corresponding to the replaced data can be determined based on the information recorded in the history record.
[0199] After the history records the data replaced by the mirror copy and the corresponding version information, users can not only view the data replaced by the mirror copy and / or version information through the history, but also perform version rollback based on the history. That is, after updating the history based on the updated data in the first data bucket and the corresponding version information in step D2 above, the following is also included:
[0200] E1. Receive version rollback command. The version rollback command includes the version information to be rolled back.
[0201] The version rollback instruction refers to the instruction used to implement the version rollback function, which includes the version information to be rolled back to. Optionally, the version information to be rolled back to includes the version number, and may also include descriptive information about the version number. For example, assuming the current version number is the third version, if the version rollback instruction received by the electronic device includes the first version as the version information to be rolled back to, it means that it needs to roll back to the first version.
[0202] Specifically, when user feedback on a newly released version is unsatisfactory, or when the new version contains errors or does not meet expectations, version rollback is typically chosen to revert from the current version to an older version. Version rollback, in software development or system administration, refers to the operation of restoring the code, configuration, or data of the current version to a previous historical version.
[0203] E2. In the above historical records, find the data corresponding to the version information of the rollback and obtain the rollback data.
[0204] Since the historical records contain the updated (e.g., mirror copy) data in the first data bucket and the corresponding version information, i.e., there is a corresponding mapping relationship between the data replaced by the mirror copy in the first data bucket and the version information, after the electronic device parses the rollback version information from the version rollback instruction, it can search for the same version information in the historical records based on the rollback version information. After finding the same version information, the data replaced by the mirror copy in the first data bucket corresponding to the same version information is used as the aforementioned rollback data.
[0205] It should be noted that in the history, the same version information may correspond to one or more data that were replaced by the mirror copy. Therefore, the rollback data found based on the rollback version information may be one or more.
[0206] E3. Update the rollback data to the corresponding position in the first data bucket.
[0207] Specifically, the location of each rollback data entry before it is recorded in the history is determined in the first data bucket. Based on the determined location of each rollback data entry, it is mirrored and copied to the corresponding location in the first data bucket. For example, assuming the rollback data includes rollback data 1 and rollback data 2, and rollback data 1 is located at position 1 in the first data bucket before being recorded in the history, and rollback data 2 is located at position 2 in the first data bucket, then when implementing the version rollback function, rollback data 1 is mirrored and copied to position 1 in the first data bucket, and rollback data 2 is mirrored and copied to position 2 in the first data bucket. It should be noted that the location of the rollback data in the first data bucket is determined by the location information of the rollback data, and the process of determining the location information of the rollback data is similar to the process of determining the location information of the modified data, which will not be elaborated here.
[0208] In this embodiment, since the historical records document the data replaced by mirror copy in the first data bucket and the version information corresponding to the replaced data, upon receiving a version rollback instruction including rollback version information, the corresponding data can be found in the historical records based on the rollback version information, i.e., the corresponding rollback data is located. Furthermore, since the first data bucket stores the data of the current version released in the production environment, mirror copying the found rollback data to the corresponding position in the first data bucket is equivalent to using the data corresponding to the rollback version information as the data of the current version, thus accurately realizing the version rollback function.
[0209] The above describes the specific implementation methods for determining update history and performing version rollback when the first target storage environment is a production environment. The following will describe the specific implementation methods for updating history when the first target storage environment is a grayscale environment.
[0210] Optionally, when the first target storage environment is a grayscale environment, to facilitate viewing the updated data (i.e., modified data) and corresponding version information in the second data bucket, this information is recorded in the history. That is, in step S24, after updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version data, the process further includes:
[0211] F1: Retrieve the updated data in the second data bucket corresponding to the grayscale environment, as well as the version information corresponding to the updated data.
[0212] F2. Updated data based on the data in the second data bucket and the corresponding version information update history.
[0213] The process of recording the updated (e.g., mirror copy replacement) data in the second data bucket and the corresponding version information in the historical record is similar to the process of recording the data replaced by mirror copy in the first data bucket and the corresponding version information in the historical record, and will not be described in detail here.
[0214] Optionally, when the release type is a gradual rollout and the modified data is updated to the first data bucket, the updated data and corresponding version information can also be recorded in the history. The process of updating the history is detailed above and will not be repeated here.
[0215] In some embodiments, once data is stored in the storage environment, a user can access the data stored in the storage environment.
[0216] Figure 3The following is a flowchart illustrating another data processing method provided in an embodiment of this application, wherein steps S31 to S34 are the same as steps S21 to S24 described above, and will not be repeated here.
[0217] Step S31: Receive a release instruction for the target application. The release instruction includes release type information, which indicates the release type corresponding to the release instruction.
[0218] Step S32: Based on the release type corresponding to the release instruction, determine the first target storage environment from multiple storage environments corresponding to the target application. The storage environment is configured with data buckets, and the data buckets are used to store data of a version of the target application in the storage environment.
[0219] Step S33: Determine the modified data corresponding to the above-mentioned release instruction.
[0220] Step S34: Based on the modified data, update the data buckets configured in the first target storage environment to obtain the updated version of the data.
[0221] Step S35: Receive a data processing request, which includes the storage environment information of the data to be processed.
[0222] Specifically, the aforementioned data processing request can be a request issued by the user on the electronic device, or a request received by the electronic device from other devices. There can be one or more such data processing requests; this is not limited here.
[0223] The storage environment information of the data to be processed refers to the information about the storage environment in which the data is stored. This storage environment information includes information that uniquely points to the storage environment. This unique information can consist of one or more pieces of information. When the unique information pointing to the storage environment consists of one piece of information, it means that the storage environment uniquely corresponding to the storage environment information can be determined based on this single piece of information. When the unique information pointing to the storage environment consists of more than one piece of information, it means that the unique storage environment corresponding to the storage environment information needs to be determined by combining all of these pieces of information.
[0224] Optionally, the data processing request may also include data attribute information of the data to be processed. This data attribute information includes information that uniquely points to the data to be processed, and may also include data type, data format, and other information. Optionally, the information that uniquely points to the data to be processed may be the storage address of the data to be processed, or a unique identifier (such as a name) of the data to be processed, etc.
[0225] Step S36: Based on the above storage environment information, determine the storage environment of the data to be processed to obtain the second target storage environment.
[0226] Specifically, the storage environment of the data to be processed can be determined based on the information in the storage environment information that can uniquely point to the storage environment, and the second target storage environment corresponding to the data to be processed can be obtained.
[0227] For example, suppose the information that uniquely points to the storage environment consists of a single piece of information: the name of the storage environment, and different storage environments have different names. If the name of the formal environment is Formal Environment 1, and the names of the grayscale environments are Grayscale Environment 1 and Grayscale Environment 2, respectively, and if the storage environment information of the data to be processed included in the data processing request includes "Grayscale Environment 1", then the second target storage environment obtained is the storage environment corresponding to "Grayscale Environment 1". The grayscale environment corresponding to Grayscale Environment 1 is the storage environment of the data to be processed.
[0228] For example, suppose the information that uniquely points to the storage environment consists of a single identifier value corresponding to the storage environment, and different storage environments have different identifier values. If the identifier value corresponding to the formal environment is "1", the identifier value corresponding to grayscale environment 1 is "2", and the identifier value corresponding to grayscale environment 2 is "3", and if the storage environment information of the data to be processed included in the data processing request includes "1", then the second target storage environment obtained is the formal environment corresponding to "1", and this formal environment is the storage environment of the data to be processed.
[0229] For example, assuming that the information that can uniquely point to the storage environment consists of more than one piece of information, then the storage environment corresponding to the data to be processed is determined by combining the more than one piece of information. In some embodiments, when the more than one piece of information that can uniquely point to the storage environment is environment type identification information and environment identification information, then step S36 above, based on the above storage environment information, determines the storage environment of the data to be processed to obtain the second target storage environment, including:
[0230] G1. Extract the environment type identifier information from the above storage environment information, and determine the storage environment type corresponding to the above data processing request based on the above environment type identifier information.
[0231] The environment type identifier information is used to indicate whether the storage environment type corresponding to the storage environment information belongs to the development environment. Optionally, the environment type identifier information can be represented by an identifier value, or by other characters or strings, which is not limited here. For example, when the environment type identifier information uses the identifier value "11" to indicate that the storage environment type corresponding to the storage environment information belongs to the development environment, the environment type identifier information can be extracted from the location where the environment type identifier information is stored in the storage environment information. Assuming that the extracted environment type identifier information is "11", it means that the storage environment type corresponding to the storage environment information belongs to the development environment; otherwise, it means that the storage environment type corresponding to the storage environment information does not belong to the development environment.
[0232] Optionally, the aforementioned environment type identification information can be information added according to the user's needs. For example, after the user enters the domain name corresponding to the development environment, the storage environment information of the data to be processed included in the data processing request will include the domain name corresponding to the development environment, and the domain name can be used as the environment type identification information corresponding to the development environment.
[0233] G2. When the above storage environment type is a non-development environment, the environment identification information is identified in the above storage environment information.
[0234] Specifically, a pre-defined correspondence between environmental identification information and storage environment is established so that, after the environmental identification information is identified, the storage environment corresponding to the identified environmental identification information can be determined based on the correspondence between the environmental identification information and the storage environment.
[0235] Optionally, the aforementioned environment identification information may be related to user identification information (such as the last character of a user's account). In this case, the environment identification information does not need to be added separately. For example, assuming the data processing request is issued by a terminal device, the storage environment information in the data processing request includes environment type identification information and the user account. If the environment type identification information indicates that the storage environment type corresponding to the data processing request is a storage environment type other than the development environment, then the last character of the user account is determined (i.e., the environment identification information is determined) so that the storage environment of the data to be processed can be determined subsequently based on the last character of the user account. Since the user identification information is used as the environment identification information, and the data processing request usually includes the user identification information, there is no need to add additional information unrelated to the user identification information when generating the data processing request, thereby improving the generation efficiency of the data processing request.
[0236] G3. Based on the above environmental identification information, determine the storage environment of the above data to be processed, and obtain the second target storage environment.
[0237] Since a pre-defined correspondence between environment identifier information and storage environments is established, once the environment identifier information is determined, the corresponding storage environment can be found by combining the pre-defined correspondence. Optionally, the relationship between environment identifier information and storage environments can be one-to-one or many-to-one; it is sufficient to determine the unique storage environment corresponding to the environment identifier information, and this is not limited here.
[0238] Step S37: Select the data bucket corresponding to the second target storage environment from the above-mentioned preset data bucket set to obtain the data bucket to be returned.
[0239] Data buckets are used to store the current version of data published in their corresponding storage environment. For example, when data bucket 1 corresponds to the production environment, data bucket 1 is used to store the current version of data published in the production environment.
[0240] Specifically, a one-to-one mapping relationship between storage environments and data buckets is pre-defined. Based on this one-to-one mapping relationship, the data bucket corresponding to the second target storage environment can be selected from the preset set of data buckets.
[0241] For example, assuming the storage environment includes a production environment, a test environment, a grayscale environment 1, and a grayscale environment 2, the preset data bucket set includes four data buckets. Let these four data buckets be Data Bucket 1, Data Bucket 2, Data Bucket 3, and Data Bucket 4, with Data Bucket 1 corresponding to the production environment, Data Bucket 2 to the test environment, Data Bucket 3 to Grayscale Environment 1, and Data Bucket 4 to Grayscale Environment 2. If the second target storage environment is a production environment, then based on the mapping relationship between storage environments and data buckets, the data bucket corresponding to the production environment (i.e., the second target storage environment) is selected from Data Bucket 1, Data Bucket 2, Data Bucket 3, and Data Bucket 4. The resulting data bucket to be returned is Data Bucket 1.
[0242] Step S38: Based on the data stored in the aforementioned data bucket to be returned, determine the data to be processed corresponding to the aforementioned data processing request and return it.
[0243] Optionally, the data stored in the data bucket to be returned (such as all data) can be used as the data to be processed, and the data to be processed corresponding to the data processing request can be returned. Of course, if the data processing request also includes data attribute information of the data to be processed, the data to be processed can be extracted from the data bucket to be returned based on the information in the data attribute information that uniquely points to the data to be processed, and then the data to be processed can be returned to filter out more matching data. In this case, the returned data is a portion of the data stored in the data bucket to be returned. For example, if the information in the data attribute information that uniquely points to the data to be processed is the address of the data to be processed, then after determining the data bucket to be returned, the corresponding data is extracted based on the address of the data to be processed in the data bucket to be returned, and the extracted data is used as the data to be processed corresponding to the data processing request and returned.
[0244] In this embodiment, upon receiving a data processing request, the storage environment of the data to be processed is determined based on the storage environment information of the data to be processed included in the data processing request. After obtaining the second target storage environment (i.e., the storage environment of the data to be processed), the data bucket corresponding to the second target storage environment is selected from a preset set of data buckets to obtain the data bucket to be returned. Then, the data to be processed corresponding to the data processing request is determined based on the data stored in the data bucket to be returned and returned. Since the data processing request includes the storage environment information of the data to be processed, and the corresponding second target storage environment can be determined based on this storage environment information, and thus the data bucket to be returned corresponding to the second target storage environment can be determined, and the data bucket to be returned is the data bucket storing the data to be processed, therefore, based on the storage environment information of the data to be processed included in the data processing request and the one-to-one correspondence between data buckets and storage environments, the data bucket to be returned can be found quickly, that is, the data to be processed corresponding to the data processing request can be found quickly, thereby improving the data processing speed.
[0245] The above describes how to extract and return data from the data buckets corresponding to the storage environment type when the storage environment type is not a development environment. The following describes how to extract and return data in the development environment when the storage environment type is a development environment. That is, in some embodiments, the data processing method provided in this application further includes:
[0246] When the storage environment type is the development environment, the data to be processed corresponding to the data processing request is determined based on the data stored in the development environment and returned.
[0247] Specifically, when the storage environment type is a development environment, the data to be processed is searched in the storage address corresponding to that development environment. For example, all data stored in the development environment is returned as the data to be processed corresponding to the data processing request. Alternatively, if the data processing request also includes data attribute information of the data to be processed, the electronic device searches for and returns the data to be processed corresponding to that data attribute information in the development environment.
[0248] In this embodiment of the application, when the storage environment type is a development environment, the data to be processed corresponding to the data processing request is returned based on the data stored in the development environment. That is, the returned data to be processed is related to the development environment, which helps to improve the accuracy of the returned data to be processed.
[0249] To more clearly describe the data processing method provided in the embodiments of this application, the following description is based on the overall data processing flow.
[0250] Figure 4 A flowchart illustrating another data processing method provided in an embodiment of this application is shown. Figure 3 In this context, historical records are represented in the form of tables, i.e., historical records are historical record tables.
[0251] S401, Pre-create data buckets corresponding to each storage environment. Specifically, the electronic device pre-creates a first data bucket corresponding to the production environment, a second data bucket corresponding to the grayscale environment, and a third data bucket corresponding to the test environment. When there are multiple grayscale environments, there are also multiple second data buckets.
[0252] S402 receives full table clone commands.
[0253] S403: Clones the entire data table from the development environment to the first data bucket. Specifically, the electronic device copies the data image from the development environment to the first data bucket corresponding to the production environment based on the received full table cloning instruction.
[0254] S404: Determine whether the received instruction is a release instruction or a version rollback instruction. If it is a version rollback instruction, execute S405; if it is a release instruction, execute S407.
[0255] S405, Select a rollback version from the history table. Specifically, the electronic device matches the rollback version information in the history table with the same rollback version information according to the rollback version information included in the rollback instruction, and obtains the rollback version.
[0256] S406, copy the data image corresponding to the rollback version to the first data bucket. Specifically, the electronic device copies the data image corresponding to the rollback version from the history table to the first data bucket, that is, writes the data corresponding to the rollback version to the first data bucket in an overwrite manner.
[0257] S407: Determine whether the release command indicates a grayscale release. If not, execute S408; otherwise, execute S410.
[0258] S408, update the history table based on the data that was replaced by the mirror in the first data bucket and the corresponding version information.
[0259] Specifically, electronic devices record old version data and version information in a history table.
[0260] S409, the mirror copy release command includes the modified data to the first data bucket.
[0261] Specifically, the electronic device copies the modified data mirror to the first data bucket corresponding to the production environment, that is, it writes the modified data to the first data bucket in an overwrite manner. For example, assuming that the row of data to be published is D1' (i.e., the modified data is D1'), the old data D1 of the same row in the first data bucket is first written to the history table; then a mirror of D1' is created and written to the first data bucket, overwriting D1.
[0262] S410: Determine whether the release command indicates a large-scale release. If not, execute S411; if yes, execute S413.
[0263] S411, update the history table based on the data replaced by the mirror copy in the second data bucket corresponding to a normal grayscale release and the corresponding version information. Specifically, when the electronic device determines that the release is a normal grayscale release, it records the old version data and version information in the second data bucket corresponding to the grayscale environment to be released into the history table.
[0264] S412, the mirror copy release command includes the modified data to the second data bucket.
[0265] Specifically, the electronic device writes the modified data to the second data bucket in an overwrite manner. For example, assuming the row of data to be published is D2' (i.e., the modified data is D2'), the old data D2 of the same row in the second data bucket is first written to the history table; then a mirror of D2' is created and written to the second data bucket, overwriting D2.
[0266] S413, determine the target modification data based on the target general grayscale release. Specifically, when the electronic device determines that the release is a large-scale grayscale release, the most recent general grayscale release is determined as the target general grayscale release, or a general grayscale release selected by the user is determined as the target general grayscale release, and the modification data corresponding to the target general grayscale release is determined as the target modification data.
[0267] S414, Mirror copy the target modified data to the first data bucket. Specifically, the electronic device writes the target modified data to the first data bucket in an overwrite manner.
[0268] Specifically, when the release type is a large-scale canary release, a row of data to be released is selected from the second data bucket, marked as D3', and then a mirror of D3' is created and written to the first data bucket.
[0269] It should be pointed out that, in Figure 4 In this process, once the received instruction is determined to be a release instruction, it first checks whether the release instruction is a canary release. Only after determining that it is a canary release does it then determine whether it instructs for a large-scale release. In practice, it's also possible to first determine whether the release instruction instructs for a large-scale release, and only after determining that it does not instruct for a large-scale release does it then determine whether it instructs for a canary release. Alternatively, after determining that the received instruction is a release instruction, it can first check whether the release instruction instructs for a formal release, and only if the release instruction does not instruct for a formal release does it then determine whether it instructs for a large-scale release; this is not a limitation here.
[0270] To more clearly describe the data processing method provided in the embodiments of this application, the following description is based on specific application scenarios.
[0271] Assuming the application scenario is: when a user opens a video application, recommended video information is displayed on the homepage of the video application, such as the name and picture of the recommended video.
[0272] Assume that grayscale environments are divided based on the last character of a user's account, and the corresponding grayscale environment is set according to the last character of that user's account. For example, assume that user accounts whose last character is "1", "2", or "3" correspond to grayscale environment 1, user accounts whose last character is "4", "5", "6", or "7" correspond to grayscale environment 2, and user accounts whose last character is "8", "9", or "0" correspond to grayscale environment 3. Furthermore, grayscale environment 1 corresponds to data bucket 1, grayscale environment 2 corresponds to data bucket 2, and grayscale environment 3 corresponds to data bucket 3.
[0273] When a user opens a video application, the electronic device detects the user's data processing request for that video application. This data processing request includes the user's account, which is used as the storage environment information for the data to be processed.
[0274] Based on the last character of the user account, the storage environment of the data to be processed is determined, resulting in a second target storage environment. For example, assuming the last character of the user account is "1", the resulting second target storage environment is grayscale environment 1.
[0275] Select the data bucket corresponding to grayscale environment 1 from the preset data bucket set, and the resulting target data bucket is data bucket 1.
[0276] The video information stored in data bucket 1 is returned as the data to be processed. The video application displays the video information corresponding to the data to be processed.
[0277] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0278] Corresponding to the data processing method described in the above embodiments, Figure 5 A structural block diagram of a data processing apparatus provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0279] Reference Figure 5 The data processing device 5 includes: a command receiving module 51, a first target storage environment determination module 52, a data modification determination module 53, and a data update module 54. Wherein:
[0280] The release instruction receiving module 51 is used to receive release instructions for a target application. The release instruction includes release type information, which indicates the release type corresponding to the release instruction.
[0281] The first target storage environment determination module 52 is used to determine the first target storage environment from multiple storage environments corresponding to the target application based on the release type corresponding to the release instruction. The storage environment is configured with data buckets, and the data buckets are used to store data of a version of the target application in the storage environment.
[0282] The data modification determination module 53 is used to determine the modified data corresponding to the above-mentioned release instruction.
[0283] The data update module 54 is used to update the data buckets configured in the first target storage environment based on the modified data mentioned above, so as to obtain the updated version of the data.
[0284] In this embodiment, based on the release type corresponding to the received release instruction for the target application, a first target storage environment is determined from multiple storage environments corresponding to the target application. Then, based on the modified data corresponding to the release instruction, the data buckets configured in the first target storage environment are updated to obtain the updated version of the data. Since a data bucket stores data for one version of the target application within the storage environment, and the data buckets are configured within the storage environment, meaning that a data bucket configured in the same storage environment only stores data for one version, and modifying the data in a data bucket results in data for an updated version, the data processing method provided in this embodiment prevents the storage environment from storing multiple versions of data, thereby reducing the amount of data stored in the storage environment and effectively saving storage space. Furthermore, since the data update only applies to the data buckets configured in the first target storage environment corresponding to the release instruction, rather than updating data buckets in all storage environments, it facilitates real-time updates to the storage environment corresponding to the release instruction, improving update flexibility.
[0285] In some embodiments, the data update module 54 includes:
[0286] The row data determination unit is used to extract data from the modified data in rows to obtain row data.
[0287] The row-level update unit is used to update the data buckets configured in the first target storage environment based on the row data mentioned above, so as to obtain the updated version of the data.
[0288] In some embodiments, the storage environment includes a formal environment, and the data processing apparatus 5 further includes:
[0289] The first initial data bucket creation module is used to create the first initial data bucket corresponding to the production environment before receiving the release instruction for the target application.
[0290] The first data bucket determination unit is used to copy the data image from the development environment to the first initial data bucket to obtain the first data bucket.
[0291] In some embodiments, the storage environment further includes a grayscale environment, and the data processing device 5 further includes:
[0292] The second initial data bucket creation module is used to create the second initial data bucket corresponding to the grayscale environment before receiving the release instruction for the target application.
[0293] The second data bucket determination unit is used to copy the data in the first data bucket to the second initial data bucket to obtain the second data bucket.
[0294] In some embodiments, the storage environment further includes a testing environment, and the data processing apparatus 5 further includes:
[0295] The third initial data bucket creation module is used to create the third initial data bucket corresponding to the test environment before receiving the release instruction for the target application.
[0296] The third data bucket determination unit is used to copy the data in the first data bucket to the third initial data bucket to obtain the third data bucket.
[0297] In some embodiments, the first target storage environment determination module 52 includes:
[0298] The formal release environment determination unit is used to determine the formal environment as the first target storage environment from multiple storage environments corresponding to the target application when the release type corresponding to the above release instruction is a formal release.
[0299] In some embodiments, the first target storage environment determination module 52 specifically includes:
[0300] The environment determination unit for ordinary grayscale release is used to parse the grayscale environment identification information from the release instruction when the release type corresponding to the above release instruction is ordinary grayscale release, and determine the grayscale environment corresponding to the grayscale environment identification information from multiple storage environments corresponding to the above target application as the first target storage environment.
[0301] The environment determination unit for large-scale gray-scale release is used to determine the official environment as the first target storage environment from multiple storage environments corresponding to the target application when the release type corresponding to the above release instruction is a large-scale gray-scale release.
[0302] In some embodiments, when the release type corresponding to the above release instruction is a large-scale grayscale release, the above-mentioned modified data determination module 53 is specifically used for:
[0303] Select one regular gray-scale release from the existing regular gray-scale releases as the target regular gray-scale release;
[0304] The modified data corresponding to the above-mentioned target grayscale release will be used as the modified data corresponding to the above-mentioned release command.
[0305] In some embodiments, when the release type corresponding to the above release instruction is either the above-mentioned ordinary grayscale release or the above-mentioned formal release, the above-mentioned modified data determination module 53 is specifically used for:
[0306] The modified data was obtained by parsing the above release command.
[0307] In some embodiments, the first target storage environment is the aforementioned formal environment, and the data processing apparatus 5 further includes:
[0308] The first data bucket history update module is used to update the data bucket configured in the first target storage environment based on the modified data, and after obtaining the updated version of the data, obtain the updated data in the first data bucket corresponding to the production environment and the version information corresponding to the updated data; and update the history based on the updated data in the first data bucket and the corresponding version information.
[0309] In some embodiments, the data processing apparatus 5 further includes:
[0310] The version rollback instruction receiving module is used to receive a version rollback instruction after the data updated based on the first data bucket and the corresponding version information update history. The version rollback instruction includes the version information to be rolled back.
[0311] The rollback data determination module is used to find the data corresponding to the rollback version information in the above historical records and obtain the rollback data.
[0312] The version rollback module is used to update the rollback data to the corresponding position in the first data bucket.
[0313] In some embodiments, the first target storage environment is the aforementioned grayscale environment, and the data processing apparatus 5 further includes:
[0314] The second data bucket history update module is used to update the data buckets configured in the first target storage environment based on the modified data, and after obtaining the updated version of the data, obtain the updated data in the second data bucket corresponding to the grayscale environment and the version information corresponding to the updated data; and update the history based on the updated data in the second data bucket and the corresponding version information.
[0315] In some embodiments, the data processing apparatus 5 further includes:
[0316] The data processing request receiving module is used to update the data buckets configured in the first target storage environment based on the modified data, and after obtaining the updated version of the data, receive a data processing request, which includes the storage environment information of the data to be processed.
[0317] The target storage environment determination module is used to determine the storage environment of the data to be processed based on the above storage environment information, and obtain the second target storage environment.
[0318] The data bucket determination module is used to filter out the data buckets corresponding to the second target storage environment from the above-mentioned preset data bucket set to obtain the data buckets to be returned.
[0319] The data return module is used to determine the data to be processed corresponding to the data processing request based on the data stored in the aforementioned data bucket and return it.
[0320] In some embodiments, the data return module described above is specifically used for:
[0321] The data stored in the aforementioned data bucket to be returned is used as the aforementioned data to be processed, and the aforementioned data to be processed corresponding to the aforementioned data processing request is returned.
[0322] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0323] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 6 of this embodiment includes: at least one processor 60 ( Figure 6 The diagram shows only one processor, a memory 61, and a computer program 62 stored in the memory 61 and executable on at least one processor 60. When the processor 60 executes the computer program 62, it implements the steps in any of the above method embodiments.
[0324] The aforementioned electronic device 6 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. This electronic device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 6 This is merely an example of electronic device 6 and does not constitute a limitation on electronic device 6. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0325] The processor 60 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0326] In some embodiments, the memory 61 may be an internal storage unit of the electronic device 6, such as a hard disk or memory of the electronic device 6. In other embodiments, the memory 61 may be an external storage device of the electronic device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 6. Furthermore, the memory 61 may include both internal and external storage units of the electronic device 6. The memory 61 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 61 can also be used to temporarily store data that has been output or will be output.
[0327] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0328] This application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.
[0329] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the above-described method embodiments.
[0330] This application provides a computer program product that, when run on an electronic device, enables the electronic device to implement the steps described in the various method embodiments above.
[0331] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of including computer program code in a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0332] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0333] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0334] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0335] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0336] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A data processing method, characterized in that, include: Receive a release instruction for a target application, the release instruction including release type information, the release type information indicating the release type corresponding to the release instruction; Based on the release type corresponding to the release instruction, a first target storage environment is determined from multiple storage environments corresponding to the target application. The storage environment is configured with data buckets, and the data buckets are used to store data of a version of the target application in the storage environment. Determine the modified data corresponding to the release instruction; Based on the modified data, the data buckets configured in the first target storage environment are updated to obtain the updated version of the data.
2. The data processing method as described in claim 1, characterized in that, The step of updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data includes: Extract data from the modified data row by row to obtain row data; Based on the row data, the data buckets configured in the first target storage environment are updated to obtain the updated version of the data.
3. The data processing method as described in claim 1 or 2, characterized in that, The storage environment includes a production environment and, prior to receiving the release instruction for the target application, also includes: Create the first initial data bucket corresponding to the production environment; The data image from the development environment is copied to the first initial data bucket to obtain the first data bucket.
4. The data processing method as described in claim 3, characterized in that, The storage environment also includes a grayscale environment, and prior to receiving the release instruction for the target application, it further includes: Create the second initial data bucket corresponding to the grayscale environment; The data in the first data bucket is copied to the second initial data bucket to obtain the second data bucket.
5. The data processing method as described in claim 3, characterized in that, The storage environment also includes a testing environment, which, prior to receiving the release instruction for the target application, further includes: Create the third initial data bucket corresponding to the test environment; The data in the first data bucket is copied to the third initial data bucket to obtain the third data bucket.
6. The data processing method as described in claim 3, characterized in that, The step of determining the first target storage environment from multiple storage environments corresponding to the target application based on the release type corresponding to the release instruction includes: When the release type corresponding to the release instruction is a formal release, the formal environment is determined from multiple storage environments corresponding to the target application as the first target storage environment.
7. The data processing method as described in claim 4, characterized in that, The step of determining the first target storage environment from multiple storage environments corresponding to the target application based on the release type corresponding to the release instruction includes: When the release type corresponding to the release instruction is a normal grayscale release, the grayscale environment identification information is parsed from the release instruction, and the grayscale environment corresponding to the grayscale environment identification information is determined from multiple storage environments corresponding to the target application as the first target storage environment. When the release type corresponding to the release instruction is a large-scale gray release, the production environment is determined from multiple storage environments corresponding to the target application as the first target storage environment.
8. The data processing method as described in claim 7, characterized in that, When the release type corresponding to the release instruction is a large-scale gray-scale release, determining the modified data corresponding to the release instruction includes: Select one regular gray-scale release from the existing regular gray-scale releases as the target regular gray-scale release; The modified data corresponding to the target ordinary grayscale release is used as the modified data corresponding to the release instruction; When the release type corresponding to the release instruction is either a regular grayscale release or a formal release, determining the modification data corresponding to the release instruction includes: The modified data is parsed from the release instruction.
9. The data processing method as described in claim 6, characterized in that, The first target storage environment is the production environment. After updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data, the process further includes: Obtain the updated data in the first data bucket corresponding to the formal environment and the version information corresponding to the updated data; Based on the updated data in the first data bucket and the corresponding version information update history.
10. The data processing method as described in claim 9, characterized in that, Following the data updated in the first data bucket and the corresponding version information update history, the method further includes: Receive a version rollback instruction, wherein the version rollback instruction includes the version information to be rolled back; In the historical records, find the data corresponding to the version information of the rollback to obtain the rollback data; Update the rollback data to the corresponding position in the first data bucket.
11. The data processing method as described in claim 7, characterized in that, The first target storage environment is the grayscale environment. After updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data, the method further includes: Obtain the updated data in the second data bucket corresponding to the grayscale environment and the version information corresponding to the updated data; Based on the updated data in the second data bucket and the corresponding version information update history.
12. The data processing method according to any one of claims 1 to 11, characterized in that, After updating the data buckets configured in the first target storage environment based on the modified data to obtain the updated version of the data, the method further includes: Receive a data processing request, the data processing request including storage environment information of the data to be processed; Based on the storage environment information, the storage environment of the data to be processed is determined, and a second target storage environment is obtained; Filter the data buckets corresponding to the second target storage environment from the preset data bucket set to obtain the data buckets to be returned; Based on the data stored in the data bucket to be returned, determine the data to be processed corresponding to the data processing request and return it.
13. The data processing method as described in claim 12, characterized in that, The step of determining and returning the data to be processed corresponding to the data processing request based on the data stored in the data bucket to be returned includes: The data stored in the data bucket to be returned is used as the data to be processed, and the data to be processed corresponding to the data processing request is returned.
14. A data processing apparatus, characterized in that, include: A release instruction receiving module is used to receive release instructions for a target application. The release instruction includes release type information, which indicates the release type corresponding to the release instruction. The first target storage environment determination module is used to determine a first target storage environment from multiple storage environments corresponding to the target application based on the release type corresponding to the release instruction. The storage environment is configured with data buckets, and the data buckets are used to store data of a version of the target application in the storage environment. The data modification determination module is used to determine the modification data corresponding to the release instruction; The data update module is used to update the data buckets configured in the first target storage environment based on the modified data, so as to obtain the updated version of the data.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 13.
16. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 13.
17. A computer program product, characterized in that, Includes a computer program, which, when run, causes the method as described in any one of claims 1 to 13 to be performed.