Data request method and device based on gray isolation, equipment and medium

By assigning grayscale values ​​to programs, data, and data requests, and generating query keys using different grayscale parameters in the memory, the problem of incomplete data isolation in distributed program architecture is solved, achieving reliable data acquisition and effective functional isolation.

CN119127281BActive Publication Date: 2025-10-17QIAN JIN NETWORK INFORMATION TECH SHANGHAI LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411053847.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2025-10-17
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

In distributed, multi-instance program architectures, the lack of canary release support for data leads to incomplete functional isolation, which can easily cause functional confusion, especially when configuring data-related aspects.

Method used

By assigning grayscale values ​​to programs, data, and data requests, and utilizing the different grayscale parameters of modified and original data stored in memory, a query key is generated to achieve effective data isolation. This ensures that the data is read successfully only when the grayscale parameters of the returned data match the query key.

Benefits of technology

This achieves grayscale isolation of data in storage, avoiding data confusion between different versions of functions, ensuring the reliability and accuracy of data acquisition, preventing lower versions from acquiring data from higher versions, and ensuring the effectiveness of function isolation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127281B_ABST
    Figure CN119127281B_ABST
Patent Text Reader

Abstract

The application discloses a data request method and device based on gray isolation, equipment and medium. Including: screening N programs dependent on update function, determining the program for maintaining changed data in N programs as the first program; the program gray parameter of the first program, the data gray parameter of the changed data, and the request gray parameter of the data request of the update function are all configured as the same gray; the changed data and the data gray parameter thereof are associated and stored in the storage, and the data gray parameters of the original data and the changed data are used to indicate different grays; when the target program receives a data request, a query key is generated based on the request gray parameter carried in the data request or the program gray parameter of the target program, and a plurality of return data are obtained from the storage by using the query key; for each return data, if the data gray parameter of the return data in the storage and the query key indicate the same gray, the return data reading is successful, otherwise, the reading fails.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, in particular to the technical field of data request, and particularly relates to a data request method and device based on gray isolation, equipment and medium. BACKGROUND

[0002] At present, distributed and multi-instance program architecture has become mainstream. By assigning different grays to programs, different function versions of the same program can exist in the same environment at the same time. Through gray request to the corresponding instance, function isolation, parallel development, gray online and other functions can be realized.

[0003] In the related art, in the scenario where only the program supports gray isolation, the data does not have corresponding gray support. When the function and the specific data are related, especially when the configuration data has a direct impact on the function, the data cannot be effectively isolated, which will lead to incomplete gray isolation of the function, and cannot realize complete function isolation, and even cause function confusion. SUMMARY

[0004] Therefore, the embodiments of the present application provide a data request method and device based on gray isolation, equipment, medium and product, which can assign gray to data, realize effective gray isolation of data, and ensure the effectiveness of function isolation.

[0005] In the first aspect, the embodiments of the present application provide a data request method based on gray isolation, which comprises: in the case of testing an updated function, obtaining change data associated with the updated function; selecting N programs dependent on the updated function from each program, and determining that a program for maintaining the change data in the N programs is a first program; configuring the program gray parameter of the first program, the data gray parameter of the change data, and the request gray parameter of the data request of the updated function as the same gray; storing the change data and its data gray parameter in the storage, wherein the storage is also used to store original data associated with the updated function, and the original data and its data gray parameter are associatedly stored, and the data gray parameters of the original data and the change data are used to indicate different grays; receiving a data request for the updated function, wherein the data request is used to obtain a plurality of return data, and the plurality of return data contains the change data and / or the original data; in the case that a target program in the N programs receives the data request, generating a query key based on the request gray parameter carried in the data request or the program gray parameter of the target program, and obtaining the plurality of return data from the storage by using the query key; wherein for each return data, if the data gray parameter of the return data in the storage and the query key indicate the same gray, the return data is read successfully, otherwise the reading fails.

[0006] In some possible implementation manners of the first aspect, the query key is generated based on the request gray parameter carried in the data request or the program gray parameter of the target program, and the plurality of pieces of return data are obtained from the memory by using the query key, including: generating the query key based on the request gray parameter carried in the data request to obtain a first query key; generating the query key based on the program gray parameter of the target program to obtain a second query key; and obtaining the plurality of pieces of return data from the memory by using the first query key and / or the second query key.

[0007] In some possible implementation manners of the first aspect, the plurality of pieces of return data are obtained from the memory by using the first query key and / or the second query key, including: for each piece of return data, in a case where the N programs are all configured to be of the same gray, performing a local gray priority strategy; and wherein the local gray priority strategy includes: reading the return data from the memory for the first time by using the second query key, and reading successfully when the return data is changed data, and reading unsuccessfully when the return data is original data.

[0008] In some possible implementation manners of the first aspect, the program gray parameter of the N programs, the data gray parameter of the changed data, and the request gray parameter of the data request of the update function are all configured to be of the target gray, the data gray parameter of the original data is configured to be of a preset initial gray, and the local gray priority strategy further includes: for the return data that fails to be read, generating the query key based on the preset initial gray to obtain a third query key; and reading the return data from the memory again by using the third query key to obtain the requested original data.

[0009] In some possible implementation manners of the first aspect, the program other than the first program in the N programs is a second program, and the plurality of pieces of return data are obtained from the memory by using the first query key and / or the second query key, including: for each piece of return data, in a case where the second program and the first program are configured to be of different grays, performing a request gray priority strategy; and wherein the request gray priority strategy includes: reading the return data from the memory for the first time by using the first query key, and reading successfully when the return data is changed data, and reading unsuccessfully when the return data is original data.

[0010] In some possible implementation manners of the first aspect, the program gray scale parameter of the first program, the data gray scale parameter of the change data, and the request gray scale parameter of the data request of the update function are all configured as a target gray scale, the program gray scale parameter of the second program and the data gray scale parameter of the original data are both configured as a preset initial gray scale, and the local gray scale priority strategy further includes: determining whether the request gray scale parameter carried in the data request is consistent with the program gray scale parameter of the target program for the returned data that fails to be read; in a case where the two are consistent, generating a third query key based on the preset initial gray scale, and reading the returned data from the storage again by using the third query key to obtain the original data returned by the request; and in a case where the two are inconsistent, reading the returned data from the storage again by using the second query key to obtain the original data returned by the request.

[0011] In some possible implementation manners of the first aspect, each piece of data in the storage is stored in association with a key, and the key of each piece of data is generated based on the data gray scale parameter of each piece of data, and the change data and the data gray scale parameter thereof are stored in association in the storage, including: generating a key of the change data based on the data gray scale parameter of the change data; and storing the change data and the key thereof in association in the storage; and for each returned data, if the key of the returned data in the storage and the query key indicate the same gray scale, the returned data is read successfully, otherwise, the returned data fails to be read.

[0012] In the second aspect, an embodiment of the present application provides a data request device based on gray scale isolation, which includes: an acquisition module configured to acquire change data associated with an update function in a case where the update function is tested; a screening module configured to screen N programs dependent on the update function from each program, and determine a program for maintaining the change data in the N programs as a first program; a gray scale configuration module configured to configure a program gray scale parameter of the first program, a data gray scale parameter of the change data, and a request gray scale parameter of a data request of the update function as the same gray scale; an associated storage module configured to store the change data and the data gray scale parameter thereof in association in a storage, wherein the storage is further configured to store original data associated with the update function, and the original data and the data gray scale parameter thereof are stored in association, and the data gray scale parameters of the original data and the change data are used to indicate different gray scales; a receiving module configured to receive a data request for the update function, wherein the data request is used to acquire a plurality of returned data, and the plurality of returned data includes the change data and / or the original data; and a data query module configured to generate a query key based on a request gray scale parameter carried in the data request or a program gray scale parameter of a target program in a case where the target program receives the data request in the N programs, and acquire the plurality of returned data from the storage by using the query key; and for each returned data, if a data gray scale parameter of the returned data in the storage and the query key indicate the same gray scale, the returned data is read successfully, otherwise, the returned data fails to be read.

[0013] In some implementable manners of the second aspect, the data query module comprises: a generation unit configured to generate a query key based on the request gray parameter carried in the data request to obtain a first query key; the generation unit is further configured to generate a query key based on the program gray parameter of the target program to obtain a second query key; and a data acquisition unit configured to acquire the plurality of pieces of return data from the storage by using the first query key and / or the second query key.

[0014] In some implementable manners of the second aspect, the data acquisition unit is specifically configured to: for each piece of return data, in the case where the N programs are all configured to be the same gray, execute a local gray priority strategy; wherein the local gray priority strategy comprises: reading the return data from the storage for the first time by using the second query key, and the reading is successful when the return data is changed data, and the reading fails when the return data is original data.

[0015] In some implementable manners of the second aspect, the program gray parameter of the N programs, the data gray parameter of the changed data, and the request gray parameter of the data request of the update function are all configured to be the target gray, the data gray parameter of the original data is configured to be a preset initial gray, and the local gray priority strategy further comprises: for the return data for which the reading fails, generating a query key based on the preset initial gray to obtain a third query key; and reading the return data from the storage again by using the third query key to obtain the original data returned by the request.

[0016] In some implementable manners of the second aspect, the program other than the first program in the N programs is a second program, and the data acquisition unit is specifically configured to: for each piece of return data, in the case where the second program and the first program are configured to be different grays, execute a request gray priority strategy; wherein the request gray priority strategy comprises: reading the return data from the storage for the first time by using the first query key, and the reading is successful when the return data is changed data, and the reading fails when the return data is original data.

[0017] In some implementable manners of the second aspect, the program gray parameter of the first program, the data gray parameter of the changed data, and the request gray parameter of the data request of the update function are all configured to be the target gray, the program gray parameter of the second program and the data gray parameter of the original data are both configured to be a preset initial gray, and the local gray priority strategy further comprises: for the return data for which the reading fails, determining whether the request gray parameter carried in the data request is consistent with the program gray parameter of the target program; in the case where the two are consistent, generating a third query key based on the preset initial gray, and reading the return data from the storage again by using the third query key to obtain the original data returned by the request; and in the case where the two are inconsistent, reading the return data from the storage again by using the second query key to obtain the original data returned by the request.

[0018] In some possible implementations of the second aspect, each piece of data in the memory is stored in association with a key, and the key of each piece of data is generated based on a data grayscale parameter of each piece of data. The association storage module is specifically configured to: generate the key of the changed data based on the data grayscale parameter of the changed data; and store the changed data and the key of the changed data in association in the memory. For each piece of returned data, if the key of the returned data in the memory indicates the same grayscale as the query key, the returned data reading succeeds, and otherwise, the returned data reading fails.

[0019] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory storing computer program instructions; the processor implements the steps of the data request method based on grayscale isolation according to the first aspect when executing the computer program instructions.

[0020] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the steps of the data request method based on grayscale isolation according to the first aspect.

[0021] In a fifth aspect, an embodiment of the present application provides a computer program product stored in a nonvolatile storage medium, and the computer program product is executed by a processor to implement the steps of the data request method based on grayscale isolation according to the first aspect.

[0022] In a sixth aspect, an embodiment of the present application provides a chip, and the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run programs or instructions to implement the steps of the data request method based on grayscale isolation according to the first aspect.

[0023] The present application provides a data request method, device, equipment, medium and product based on grayscale isolation. When testing the update function, the change data associated with the update function is obtained; N programs that the update function depends on are screened from each program, and the program used to maintain the change data among the N programs is determined to be the first program. The program grayscale parameters of the first program, the data grayscale parameters of the change data, and the request grayscale parameters of the data request of the update function are all configured to the same grayscale. Based on this, the change data and its data grayscale parameters, the original data and its data grayscale parameters can be associated and stored in the memory, and the data grayscale parameters of the original data and the change data are used to indicate different grayscales, so that different grayscale data can be stored in the same memory at the same time, without setting up an independent (physical, logical) memory for each grayscale data, and realizing grayscale isolation of data stored in the same memory. In addition, the data grayscale parameters of the change data can directly reuse the program grayscale parameters of the first program, and developers do not need to perform any additional configuration or encoding work for the grayscale data, and can simply and efficiently realize data grayscale isolation. On this basis, when the target program receives a data request for an update function, it can generate a query key based on the request grayscale parameters carried in the data request or the program grayscale parameters of the target program, and use the query key to obtain multiple return data from the memory. The return data is read successfully only when the data grayscale parameters of the return data in the memory indicate the same grayscale as the query key, ensuring the reliability and accuracy of data acquisition when data requests for different functions are acquired. In this way, in the scenario where the changed data and the original data are distinguished by grayscale in the memory, the changed data and the original data will not be confused with each other or overwritten in the memory, thereby ensuring that the grayscale ranges of the data read by different version functions are different, avoiding the low version function from obtaining the changed data of the higher version, and avoiding the original data overwriting the changed data when the program is restarted, resulting in the update function being unable to obtain the changed data. By assigning grayscale to the program, data, and data request, the effectiveness of functional isolation is guaranteed and functional confusion is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings in the embodiments of the present application.

[0025] Figure 1 1 is a flow chart of a data request method based on grayscale isolation provided in one embodiment of the present application;

[0026] Figure 2 1 is a flowchart of a data request method based on grayscale isolation provided by another embodiment of the present application;

[0027] Figure 3 1 is a flowchart of a data request method based on grayscale isolation provided in yet another embodiment of the present application;

[0028] Figure 4 is a structural schematic diagram of a data request device based on gray scale isolation provided by an embodiment of the present application.

[0029] Figure 5 is a hardware structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0030] The principles and spirits of the present application will be described below with reference to a number of exemplary embodiments. It should be understood that the purpose of providing these embodiments is to make the principles and spirits of the present application clearer and more thorough, so that those skilled in the art can better understand and implement the principles and spirits of the present application. The exemplary embodiments provided herein are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments herein, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0031] In this document, terms such as first, second, third, etc. are used only to distinguish one entity (or operation) from another entity (or operation), and do not imply or suggest any order or association between the entities (or operations).

[0032] The data request method based on gray scale isolation provided by the embodiments of the present application will be described in detail below in combination with the drawings, specific embodiments and application scenarios.

[0033] Figure 1 is a flow schematic diagram of a data request method based on gray scale isolation provided by an embodiment of the present application. The execution subject of the data request method based on gray scale isolation can be an application program. An application program can be divided into different parts, i.e. each program, so the application program can be composed of each program. Each program is a distributed application program, which is a group of computer programs scattered on multiple computing nodes. Each node is an independent physical device or software process, but all work to achieve the function of the application program.

[0034] The data request method based on gray scale isolation of the present application will be described below with the execution subject of the data request method based on gray scale isolation being an application program as an example. It should be noted that the above execution subject and application scenario do not constitute a limitation on the present application.

[0035] As shown in Figure 1 The data request method based on gray scale isolation provided by the embodiments of the present application can include steps 110-160.

[0036] Step 110, in the case of testing the update function, obtaining change data associated with the update function;

[0037] Step 120, screening N programs dependent on the update function from each program, and determining a program for maintaining the change data in the N programs as a first program;

[0038] Step 130, configuring the program gray parameter of the first program, the data gray parameter of the change data, and the request gray parameter of the data request of the update function as the same gray;

[0039] Step 140, storing the change data and the data gray parameter thereof in the storage in association, the storage also being used for storing original data associated with the update function, the original data and the data gray parameter thereof being stored in association, and the data gray parameters of the original data and the change data being used for indicating different grays;

[0040] Step 150, receiving a data request for the update function, the data request being used for obtaining a plurality of return data;

[0041] Step 160, in the case that a target program in the N programs receives the data request, generating a query key based on the request gray parameter carried in the data request or the program gray parameter of the target program, and obtaining the plurality of return data from the storage by using the query key, wherein, for each return data, if the data gray parameter of the return data in the storage and the query key indicate the same gray, the return data is read successfully, otherwise, the read fails.

[0042] The data request method based on gray isolation provided by the embodiments of the present application can acquire change data associated with the update function in the case of testing the update function, filter N programs dependent on the update function from each program, and determine a program for maintaining the change data in the N programs as a first program. The program gray parameter of the first program, the data gray parameter of the change data, and the request gray parameter of the data request of the update function are all configured as the same gray. Based on this, the change data and the data gray parameter thereof, and the original data and the data gray parameter thereof can be associated and stored in the storage, and the data gray parameters of the original data and the change data are used to indicate different grays, so that different gray data can be saved in the same storage at the same time, without the need to set an independent (physical or logical) storage for each gray data, and the gray isolation of the saved data in the same storage is realized. Moreover, the data gray parameter of the change data can be directly reused as the program gray parameter of the first program, and the developer does not need to perform any configuration or coding work for the gray data, and the gray isolation of the data can be simply and efficiently realized. On this basis, when the target program receives a data request for the update function, a query key can be generated based on the request gray parameter carried in the data request or the program gray parameter of the target program, and the query key is used to acquire a plurality of return data from the storage, and the data reading is successful only when the data gray parameter of the return data in the storage is the same as the gray indicated by the query key, so that the reliability and accuracy of the data acquisition are ensured when the data requests of different functions acquire data. In this way, in the case of distinguishing the grays of the change data and the original data in the storage, the change data and the original data will not be confused or overlapped in the storage, so that the gray range of the data read by different version functions is different, the low version function is prevented from acquiring the change data of the high version, and the original data is prevented from covering the change data to cause the update function to fail to acquire the change data when the program is restarted, and the effectiveness of the function isolation is ensured by assigning the grays to the program, the data, and the data request.

[0043] The specific implementation of the above steps will be described in detail below in combination with specific embodiments.

[0044] In step 110, the change data associated with the update function is acquired in the case of testing the update function.

[0045] In step 110, the update function is an application function updated when the version of the application program is upgraded. Before the update function is put into operation, the tester needs to test the update function to ensure the normal operation of the update function. The change data is the data that needs to be changed when the application function is updated, such as the data item added, deleted, or modified. Therefore, after the update function is developed, the storage needs to maintain the change data in addition to the original data of the stable (old) version application.

[0046] Exemplarily, the application program is a job application program, the developer develops an update function of the job application program, the update function is used for optimizing and updating the style of a resume filling interface of the job application program, for example, the list width is 100 before updating, the input box cursor color is black, the list width is 120 after updating, and the input box cursor color is red, then "the list width is 100" and "the input box cursor color is black" are original data, and "the list width is 120" and "the input box cursor color is red" are changed data.

[0047] Step 120 is related to, N programs dependent on the update function are screened from various programs, and the program in the N programs for maintaining the changed data is determined as the first program.

[0048] In step 120, the N programs are distributed application programs that need to be called when the update function runs, and not all programs in the N programs need to maintain the changed data, and these programs that do not need to maintain the changed data can be the second program.

[0049] For example, the second program can be an interface exposed to the outside, which is only used to receive a data request sent by the front end and return to the front end after the first program obtains the request data; for another example, the second program is a program for maintaining original data, and the running of the update function needs to depend on a part of the original data in addition to the changed data, so the second program also needs to be used to read the original data when the update function is implemented.

[0050] Exemplarily, the update function is used for optimizing and updating the style of the resume filling interface of the job application program, so the interface style parameters need to be returned to the front end, the interface style parameters include parameter b and parameter c. Among them, program A is used to receive the parameter acquisition request of the front end and return the interface style parameters to the front end, program B is used to maintain parameter b, and program C is used to maintain parameter c. Parameter b is changed data, and parameter c is original data. Then program A and C are the second program, and program B is the first program.

[0051] Step 130 is related to, the program gray parameter of the first program, the data gray parameter of the changed data, and the request gray parameter of the data request of the update function are all configured to the same gray.

[0052] In step 130, the program gray parameter is a parameter used to indicate the program gray, the data gray parameter is a parameter used to indicate the data gray, and the request gray parameter is a parameter used to indicate the request gray. Among them, the data gray parameter of the changed data and the request gray parameter of the data request of the update function can directly reuse the program gray parameter of the first program, that is, the program gray parameter, the data gray parameter and the request gray parameter are the same, so as to ensure that the grays of the first program, the changed data and all data requests of the update function are consistent.

[0053] Specifically, each program corresponds to a configuration file, and the program gray parameter can be set in the configuration file; the change data is stored in the form of key-value pairs in the memory, and the data gray parameter can be set in the key; and the request gray parameter can be set in the request header of the data request.

[0054] Exemplarily, “spring.cloud.nacos.discovery.metadata.color:nocolor” is the original program gray parameter of the first program, which indicates that the program gray is nocolor, and by changing it to “spring.cloud.nacos.discovery.metadata.color:blue”, the first program is configured to be blue gray, and correspondingly, all data requests of the change data and the update function are also configured to be blue gray.

[0055] Involving step 140, the change data and the data gray parameter thereof are stored in the memory, and the memory is also used to store the original data associated with the update function, and the original data and the data gray parameter thereof are stored in association, and the data gray parameters of the original data and the change data are used to indicate different grays.

[0056] In step 140, the memory is used to store the original data and the change data maintained by each program, and the original data and the change data are stored in association with the data gray parameters thereof. Therefore, by configuring the data gray parameters of the original data and the change data to be different parameters, different gray data can be saved in the same memory at the same time, without the need to set an independent (physical or logical) memory for each gray data, and the gray isolation of the saved data in the same memory is realized.

[0057] In some embodiments of the present application, each piece of data in the memory is stored in association with a key, and the key of each piece of data is generated based on the data gray parameter of each piece of data. The step 140 of storing the change data and the data gray parameter thereof in the memory can specifically include:

[0058] generating the key of the change data based on the data gray parameter of the change data;

[0059] storing the change data and the key thereof in the memory in association;

[0060] Among them, for each returned data, if the key of the returned data in the memory and the query key indicate the same gray, the returned data reading is successful, otherwise the reading fails.

[0061] In the embodiments of the present application, the data gray parameter is part of the key, and the changed data and its key and the original data and its key are stored in the form of key-value pairs, so that a mapping relationship between each piece of data and the data gray can be established in the storage, the data in the storage is divided into different grays, so that different gray data can be saved in the same storage, and there is no need to set an independent (physical or logical) storage for each gray data, and the data gray isolation in the same storage is realized. Moreover, the data gray parameter can directly reuse the program gray parameter of the first program, and the data gray parameter can be directly added to the existing key, and the developer does not need to perform any configuration or coding work for the gray data, and the data gray isolation can be simply and efficiently realized.

[0062] In some embodiments, the storage includes a plurality of storage spaces, and each program corresponds to a storage space, which is used to store all data maintained by the program, i.e., the original data and / or the changed data.

[0063] Step 150 is related to receiving a data request for updating a function, and the data request is used to obtain a plurality of return data, and the plurality of return data includes the changed data and / or the original data.

[0064] In step 150, the data request is used to test whether the update function can be normally implemented, so the data request is a function test request. Since the data relied on by the update function in the running process includes the changed data and the original data, the plurality of return data returned by the request can include the changed data and / or the original data.

[0065] For example, the update function is used to optimize and update the style of the resume filling interface of a job application program, specifically to update the list width, but the plurality of return data returned by the data request includes the updated list width and the un-updated CSS initialization parameter, CSS responsive layout parameter, etc., and these un-updated CSS initialization parameter and CSS responsive layout parameter are the original data under the stable version.

[0066] Step 160 is related to the case that the target program in the N programs receives the data request, generates a query key based on the request gray parameter carried in the data request or the program gray parameter of the target program, and obtains the plurality of return data from the storage by using the query key, wherein for each return data, if the data gray parameter of the return data in the storage is the same as the gray indicated by the query key, the return data reading is successful, otherwise the reading fails.

[0067] The target program is the program receiving the data request, which can be the first program or the second program, and the application does not make a specific limitation. In the case that the target program receives the data request among the N programs, the local gray scale priority strategy or the request gray scale priority strategy can be used to obtain the multiple pieces of return data.

[0068] In some embodiments of the application, Figure 2 is a flowchart of the data request method based on gray scale isolation provided by another embodiment of the application. The step 160 of generating the query key based on the request gray scale parameter carried in the data request or the program gray scale parameter of the target program, and obtaining the multiple pieces of return data from the storage by using the query key can specifically include steps 210-230.

[0069] In step 210, the query key is generated based on the request gray scale parameter carried in the data request, and a first query key is obtained.

[0070] In step 220, the query key is generated based on the program gray scale parameter of the target program, and a second query key is obtained.

[0071] In step 230, the first query key and / or the second query key are used to obtain the multiple pieces of return data from the storage.

[0072] In the embodiments of the application, the first query key is generated based on the request gray scale parameter, and the request gray scale parameter is consistent with the data gray scale parameter of the changed data, so that the changed data can be effectively obtained from the storage by using the first query key. The second query key is generated based on the program gray scale parameter of the target program, so that the data matching the program gray scale can be effectively obtained from the storage by using the second query key, and the data reading in the data gray scale isolation scenario is realized.

[0073] In some embodiments of the application, the N programs dependent on the update function can be configured as the same gray scale. In this scenario, even if the target program currently receiving the data request does not maintain the changed data, it can also be assigned the same gray scale as the changed data. In this way, the local gray scale priority strategy is used to read the data from the storage, so that the changed data and the original data can be successfully read in the data gray scale isolation scenario.

[0074] Based on the above scenario that the N programs dependent on the update function are configured as the same gray scale, the step 230 of obtaining the multiple pieces of return data from the storage by using the first query key and / or the second query key can specifically include the following steps:

[0075] For each piece of return data, the local gray scale priority strategy is executed in the case that the N programs are configured as the same gray scale.

[0076] The local gray priority strategy includes: reading the returned data from the memory for the first time using the second query key, and reading successfully when the returned data is changed data, and reading unsuccessfully when the returned data is original data.

[0077] Exemplarily, the multiple returned data includes a parameter b and a parameter c, the parameter b is changed data, the parameter c is original data, the data gray parameter of the parameter b in the memory indicates blue gray, and the data gray parameter of the parameter c indicates no color gray. The second query key is generated based on the program gray parameter of the target program, and the program gray parameter of the target program indicates blue gray. Therefore, when the parameter b is obtained from the memory using the second query key, since the second query key and the data gray parameter of the parameter b indicate the same gray, the parameter b can be successfully read; since the second query key and the data gray parameter of the parameter c indicate different grays, the parameter c cannot be successfully read.

[0078] In the embodiments of the present application, since the program gray of the first program is consistent with the data gray of the changed data, the program grays of the N programs including the target program are all consistent with the data gray of the changed data. Based on this, in the local gray priority strategy, the second query key and the data gray parameter of the changed data indicate the same gray, so that the changed data can be directly and accurately obtained from the memory using the second query key. In this way, in the case that the returned data of the request only includes changed data, all the returned data can be successfully queried using the second query key, thereby ensuring the reliability of data acquisition.

[0079] In some embodiments of the present application, in the case that the returned data of the request includes changed data and original data, in order to successfully return all the data, the program gray parameters of the N programs, the data gray parameter of the changed data, and the request gray parameter of the data request of the update function are all configured as the target gray, and the data gray parameter of the original data is configured as a preset initial gray. The above local gray priority strategy can further include:

[0080] For the returned data that fails to be read, a query key is generated based on the preset initial gray, to obtain a third query key;

[0081] The returned data is read from the memory again using the third query key, to obtain the original data returned by the request.

[0082] Specifically, the target gray scale is different from the preset initial gray scale, for example, the preset initial gray scale can be nocolor, and then the data gray scale parameter of the original data is configured as "nocolor" to indicate that the original data is nocolor; or the preset initial gray scale can be blank gray scale, and then the data gray scale parameter of the original data is configured as null to indicate that the original data is blank gray scale. The target gray scale is blue gray scale, and then the data gray scale parameter of the original data is configured as "blue" to indicate that the program gray scale of the N programs, the data gray scale of the changed data, and the request gray scale of the data request of the update function are all blue gray scale.

[0083] With reference to the above example, the parameter b can be successfully read by using the second query key, but the parameter c cannot be successfully read. Based on this, the third query key is generated based on the preset initial gray scale, and since the third query key and the data gray scale parameter of the parameter c both indicate the preset initial gray scale "nocolor", the parameter c can be successfully read.

[0084] In the embodiments of the present application, for the return data with a read result of failure, it can be directly determined that it is original data. Based on this, since the third query key is generated based on the preset initial gray scale, and the data gray scale parameter of the original data in the memory also indicates the preset initial gray scale, the original data can be successfully read from the memory by using the third query key. In this way, in the local gray scale priority strategy, the combination of the second query key and the third query key can be used to accurately obtain all return data in the memory supporting data gray scale isolation, and the reliability of data reading is ensured on the premise of complete isolation of function gray scale.

[0085] In some embodiments of the present application, the program other than the first program in the N programs is the second program, and the first program and the second program can be configured as different gray scales to distinguish the gray scale between the two types of programs of maintained changed data and un-maintained changed data. In this scenario, when the target program receiving the data request is the second program, in order to avoid that the second query key generated based on the program gray scale parameter cannot read the changed data, the request gray scale priority strategy can be used to read data from the memory to ensure that the changed data and the original data can be successfully read in the data gray scale isolation scenario.

[0086] Based on the above scenario of configuring the first program and the second program dependent on the update function as different gray scales, the step 230 of obtaining a plurality of return data from the memory by using the first query key and / or the second query key can specifically include the following steps:

[0087] For each return data, the request gray scale priority strategy is executed when the second program and the first program are configured as different gray scales.

[0088] The request gray scale priority strategy includes: using the first query key to read the returned data from the memory for the first time, and reading successfully when the returned data is changed data, and reading unsuccessfully when the returned data is original data.

[0089] Exemplarily, the multiple returned data includes a parameter b and a parameter c, the parameter b is changed data, and the parameter c is original data, the data gray scale parameter of the parameter b in the memory indicates a blue gray scale, and the data gray scale parameter of the parameter c indicates a no color gray scale. The first query key is generated based on the request gray scale parameter of the data request, and the request gray scale parameter indicates a blue gray scale. Therefore, when the parameter b is obtained from the memory by using the first query key, since the first query key and the data gray scale parameter of the parameter b indicate the same gray scale, the parameter b can be successfully read; since the first query key and the data gray scale parameter of the parameter c indicate different gray scales, the parameter c cannot be successfully read.

[0090] In some embodiments of the present application, the program gray scale parameter of the first program, the data gray scale parameter of the changed data, and the request gray scale parameter of the data request of the update function are all configured as a target gray scale, the program gray scale parameter of the second program and the data gray scale parameter of the original data are both configured as a preset initial gray scale, and the above request gray scale priority strategy can further include:

[0091] For the returned data that fails to be read, it is determined whether the request gray scale parameter carried in the data request is consistent with the program gray scale parameter of the target program;

[0092] In a case where the two are consistent, a third query key is generated based on the preset initial gray scale, and the returned data is read from the memory again by using the third query key, to obtain the original data returned by the request;

[0093] In a case where the two are inconsistent, the returned data is read from the memory again by using the second query key, to obtain the original data returned by the request.

[0094] With reference to the above example, the parameter b can be successfully read by using the first query key, and the parameter c cannot be successfully read. Based on this, it can be further compared whether the request gray scale parameter carried in the data request is consistent with the program gray scale parameter of the target program. If the two are consistent, it indicates that the target program is the first program, the target program is a blue gray scale, and the parameter c cannot be obtained by using the second query key. Therefore, a new third query key is generated based on the preset initial gray scale no color, to ensure that the parameter c can be successfully obtained. If the two are inconsistent, it indicates that the target program is the second program, and the target program is a no color gray scale. Therefore, the parameter c can be directly obtained by using the second query key.

[0095] In the embodiments of the present application, for the return data with a read result of failure, it can be directly determined as original data. Based on this, it can be further compared whether the request gray parameter carried in the data request is consistent with the program gray parameter of the target program. If they are consistent, it indicates that the target program is the first program, and the target program is also the target gray, and the original data cannot be obtained by using the second query key. Therefore, a new third query key is generated based on the preset initial gray, so as to ensure that the original data can be successfully obtained. If they are inconsistent, it indicates that the target program is the second program, and the target program is the preset initial gray. Therefore, the original data can be directly obtained by using the second query key, without the need to generate a new query key, thereby saving resources. In this way, by using the combination of the first query key and the third query key, or the first query key and the second query key, all return data can be accurately obtained in the storage supporting data gray isolation, and the reliability of data reading is ensured on the premise of complete isolation of function grays.

[0096] In some embodiments of the present application, different upgrade versions of the application program correspond to different grays when the function is upgraded. Since each update function of the same upgrade version may be responsible by different testers, even if it is the same upgrade version, each update function involved can correspond to different grays.

[0097] In some embodiments of the present application, for the local gray priority strategy, the return data first read from the storage by using the second query key is the priority acquisition data, and the return data read again from the storage by using the third query key is the lag acquisition data. For the request gray priority strategy, the return data first read from the storage by using the first query key is the priority acquisition data, and the return data read again from the storage by using the second query key or the third query key is the lag acquisition data.

[0098] The above priority acquisition data can be regarded as priority matching data, and the lag acquisition data can be regarded as borrowed data obtained by borrowing operation.

[0099] As a specific example, for the local gray priority strategy, Figure 3 is a flowchart of a data request method based on gray isolation provided by another embodiment of the present application, as Figure 3 shown, storage is a storage, and the data request 3.1 is a data request of update function 1. The data request is blue gray. Therefore, after the app instance 1 of blue gray receives the data request 3.1, it can read the data request 3.1 from the <color:blue>The changed data of the blue gray scale is read directly from the storage space and returned, and the original data of the non-color gray scale not queried can be borrowed from the <no color> storage space maintained by the app instance 3 of the non-color gray scale and returned.

[0100] The data requests 3.2 and 3.3 are data requests of the update function 2, in order to be distinguished from the data requests of the update function 1, the data requests of the update function 2 are configured as the red gray scale.

[0101] For the data request 3.2, the program receiving the data request 3.2 is the app instance 3 of the non-color gray scale, so the original data of the non-color gray scale can be read from the <no color> storage space maintained by the app instance 3 and returned, and the changed data of the red gray scale not queried can be borrowed from the <color:red> storage space maintained by the app instance 2 of the red gray scale and returned.

[0102] For the data request 3.3, the program receiving the data request 3.3 is the app instance 2 of the red gray scale, so the changed data of the red gray scale can be read from the <color:red> storage space maintained by the app instance 2 and returned, and the original data of the non-color gray scale not queried can be borrowed from the <no color> storage space maintained by the app instance 3 of the non-color gray scale and returned.

[0103] The above data request process can request the changed data and the original data matched for each update function in the scenario of receiving the data requests of different gray scale update functions, and improve the reliability of data request and reading in the data gray scale isolation scenario.

[0104] Corresponding to the method embodiment of the application, the application further provides a data request device based on gray scale isolation.

[0105] Figure 4 Fig. 4 is a structural schematic diagram of a data request device based on gray scale isolation provided by an embodiment of the application. As shown in Fig. 4, the data request device 400 based on gray scale isolation can include an acquisition module 410, a screening module 420, a gray scale configuration module 430, an associated storage module 440, a receiving module 450, and a data query module 460. Figure 4

[0106] ​The acquisition module 410 is configured to acquire change data associated with the update function in the case of testing the update function; the screening module 420 is configured to screen N programs dependent on the update function from each program, and determine a program for maintaining the change data in the N programs as a first program; the gray configuration module 430 is configured to configure a program gray parameter of the first program, a data gray parameter of the change data, and a request gray parameter of a data request of the update function as the same gray; the associated storage module 440 is configured to store the change data and the data gray parameter of the change data in association in the storage, wherein the storage is further configured to store original data associated with the update function, the original data and the data gray parameter of the original data are stored in association, and the data gray parameters of the original data and the change data are used to indicate different grays; the receiving module 450 is configured to receive a data request for the update function, wherein the data request is used to acquire a plurality of return data, and the plurality of return data contains the change data and / or the original data; the data query module 460 is configured to generate a query key based on the request gray parameter carried in the data request or the program gray parameter of a target program in the N programs in the case that the target program receives the data request, and acquire the plurality of return data from the storage by using the query key; wherein for each return data, if the data gray parameter of the return data in the storage and the query key indicate the same gray, the return data is read successfully, otherwise, the reading fails.

[0107] The data request device based on gray isolation provided by the embodiments of the present application can obtain change data associated with an update function in the case of testing the update function; filter N programs dependent on the update function from each program, and determine a program for maintaining the change data in the N programs as a first program. The program gray parameter of the first program, the data gray parameter of the change data, and the request gray parameter of the data request of the update function are all configured as the same gray. Based on this, the change data and the data gray parameter thereof, and the original data and the data gray parameter thereof can be associated and stored in the storage, and the data gray parameters of the original data and the change data are used to indicate different grays, so that different gray data can be simultaneously saved in the same storage, without the need to set an independent (physical or logical) storage for each gray data, and the gray isolation of the saved data in the same storage is realized. Moreover, the data gray parameter of the change data can directly reuse the program gray parameter of the first program, and the developer does not need to additionally perform any configuration or coding work for the gray data, and the gray isolation of the data can be simply and efficiently realized. On this basis, when the target program receives a data request for the update function, a query key can be generated based on the request gray parameter carried in the data request or the program gray parameter of the target program, and the storage is queried by using the query key to obtain a plurality of return data, and the data reading is successful only when the data gray parameter of the return data in the storage is the same as the gray indicated by the query key, so that the reliability and accuracy of the data acquisition are ensured when the data requests of different functions acquire data. In this way, in the scenario where the change data and the original data are distinguished in gray in the storage, the change data and the original data will not be confused or overlapped in the storage, so that the gray range of the data read by different versions of functions is different, the low version function is prevented from acquiring the change data of the high version, and the original data is prevented from covering the change data to cause the update function to fail to acquire the change data when the program is restarted, and the effectiveness of the function isolation is ensured by assigning the gray to the program, the data, and the data request.

[0108] In some embodiments of the present application, the data query module 460 includes: a generation unit configured to generate a query key based on the request gray parameter carried in the data request to obtain a first query key; the generation unit is further configured to generate a query key based on the program gray parameter of the target program to obtain a second query key; and a data acquisition unit configured to acquire a plurality of return data from the storage by using the first query key and / or the second query key.

[0109] In some embodiments of the present application, the data acquisition unit is specifically configured to: for each piece of returned data, in the case that the N programs are all configured with the same gray level, execute the local gray level priority strategy; wherein the local gray level priority strategy comprises: reading the returned data from the storage for the first time by using the second query key, and reading successfully when the returned data is changed data, and reading unsuccessfully when the returned data is original data.

[0110] In some embodiments of the present application, the program gray level parameter of the N programs, the data gray level parameter of the changed data, and the request gray level parameter of the data request of the update function are all configured with the target gray level, and the data gray level parameter of the original data is configured with the preset initial gray level, and the local gray level priority strategy further comprises: for the returned data that fails to be read, generating a query key based on the preset initial gray level to obtain a third query key; reading the returned data from the storage again by using the third query key to obtain the original data returned by the request.

[0111] In some embodiments of the present application, the program other than the first program in the N programs is the second program, and the data acquisition unit is specifically configured to: for each piece of returned data, in the case that the second program and the first program are configured with different gray levels, execute the request gray level priority strategy; wherein the request gray level priority strategy comprises: reading the returned data from the storage for the first time by using the first query key, and reading successfully when the returned data is changed data, and reading unsuccessfully when the returned data is original data.

[0112] In some embodiments of the present application, the program gray level parameter of the first program, the data gray level parameter of the changed data, and the request gray level parameter of the data request of the update function are all configured with the target gray level, and the program gray level parameter of the second program and the data gray level parameter of the original data are both configured with the preset initial gray level, and the request gray level priority strategy further comprises: for the returned data that fails to be read, determining whether the request gray level parameter carried in the data request is consistent with the program gray level parameter of the target program; in the case that the two are consistent, generating a third query key based on the preset initial gray level, and reading the returned data from the storage again by using the third query key to obtain the original data returned by the request; in the case that the two are inconsistent, reading the returned data from the storage again by using the second query key to obtain the original data returned by the request.

[0113] In some embodiments of the present application, each piece of data in the storage is stored in association with a key, and the key of each piece of data is generated based on the data gray level parameter of each piece of data, and the association storage module is specifically configured to: generate the key of the changed data based on the data gray level parameter of the changed data; store the changed data and the key thereof in the storage in association; wherein for each piece of returned data, if the key of the returned data in the storage and the query key indicate the same gray level, the returned data is read successfully, otherwise, the returned data is read unsuccessfully.

[0114] The data request device based on gray scale isolation provided by the embodiment of the application can realize Figures 1-3 the processes implemented by the service platform in the method embodiment, and can realize the same technical effects. To avoid repetition, no further description is given here.

[0115] Figure 5 is a hardware structure schematic diagram of an electronic device provided by the embodiment of the application.

[0116] As shown in Figure 5 , the electronic device 500 includes a memory 501, a processor 502, and a computer program stored in the memory 501 and executable on the processor 502.

[0117] In one example, the processor 502 described above can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured as one or more integrated circuits that implement one or more embodiments of the application.

[0118] The memory 501 can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (for example, memory devices) encoded with software including computer-executable instructions and, when the software is executed (for example, by one or more processors), is operable to perform the operations described with reference to the card opening method in the embodiments according to the first aspect of the application.

[0119] The processor 502 runs the computer program corresponding to the executable program code stored in the memory 501 by reading the executable program code, for implementing the card opening method in the embodiments of the first aspect described above.

[0120] In some examples, the electronic device 500 can also include a communication interface 503 and a bus 510. As shown in Figure 5 , the memory 501, the processor 502, and the communication interface 503 are connected through the bus 510 and complete communication with each other.

[0121] The communication interface 503 is mainly used to realize the communication between the modules, devices, units, and / or devices in the embodiments of the application. The input device and / or output device can also be accessed through the communication interface 503.

[0122] Bus 510 includes hardware, software, or both, to couple components of electronic device 500 to each other and to couple electronic device 500 to other systems or devices. While Fig. 1 shows bus 510 as a single component, bus 510 can include multiple busses or other interconnection media that are implemented in various ways, including as a solution to connect the components of electronic device 500 to each other. For example, and without limitation, bus 510 can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or another suitable bus or interconnect in other embodiments, or a combination of two or more of these. Bus 510 can include one or more buses, where appropriate. Although this application describes and shows a particular bus, this application contemplates any suitable bus or interconnect.

[0123] The electronic device provided by the embodiments of the present application can realize Figures 1-3 The method embodiments of the present application can realize the various processes of the electronic device, and achieve the same technical effects. To avoid repetition, the details are not described here.

[0124] In combination with the data request method based on gray isolation in the above embodiments, the embodiments of the present application can provide a computer storage medium to realize. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to realize the steps of any one of the data request methods based on gray isolation in the above embodiments.

[0125] In combination with the data request method based on gray isolation in the above embodiments, the embodiments of the present application can provide a computer program product to realize. The (computer) program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to realize the steps of any one of the data request methods based on gray isolation in the above embodiments.

[0126] The chip according to the embodiments of the present application can also be referred to as a system chip, a system on chip, a chip system, or a system on chip system.

[0127] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system chip, a system on chip, a chip system, or a system on chip system.

[0128] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system chip, a system on chip, a chip system, or a system on chip system.

[0129] The functional blocks shown in the structural block diagrams described above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, or the like. When implemented in software, the elements of the present application are program or code segments used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of the machine-readable medium include an electronic circuit, a semiconductor memory device, a ROM, a flash memory, an erasable ROM (EROM), a floppy disk, a CD-ROM, an optical disk, a hard disk, an optical fiber medium, a radio frequency (RF) link, and the like. The code segments can be downloaded via a computer network such as the Internet, an intranet, or the like.

[0130] It should be understood that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.

[0131] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0132] The above only is a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described herein. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements shall be covered within the protection scope of the present application.< / color:blue>

Claims

1. A data request method based on grayscale isolation, characterized in that: include: When testing an update function, obtaining change data associated with the update function; Screening N programs on which the update function depends from various programs, and determining a program for maintaining the changed data among the N programs as a first program; configuring the program grayscale parameter of the first program, the data grayscale parameter of the change data, and the request grayscale parameter of the data request of the update function to be the same grayscale; The changed data and its data grayscale parameters are stored in association with each other in a memory, wherein the memory is also used to store original data associated with the update function, the original data and its data grayscale parameters are stored in association with each other, and the data grayscale parameters of the original data and the changed data are used to indicate different grayscales; receiving a data request for the update function, wherein the data request is used to obtain a plurality of return data, and the plurality of return data includes changed data and / or original data; When a target program among the N programs receives the data request, generating a query key based on a request grayscale parameter carried in the data request or a program grayscale parameter of the target program, and obtaining the plurality of returned data from the memory using the query key; For each piece of returned data, if the grayscale parameter of the returned data in the memory indicates the same grayscale as the query key, the returned data is read successfully; otherwise, the reading fails.

2. The method according to claim 1, characterized in that The generating a query key based on the request grayscale parameter carried in the data request or the program grayscale parameter of the target program, and obtaining the plurality of returned data from the memory using the query key, includes: Generate a query key based on the request grayscale parameter carried in the data request to obtain a first query key; Generate a query key based on the program grayscale parameter of the target program to obtain a second query key; The plurality of returned data are acquired from the memory using the first query key and / or the second query key.

3. The method according to claim 2, characterized in that The acquiring the plurality of returned data from the memory using the first query key and / or the second query key includes: For each piece of returned data, when the N programs are all configured as the same grayscale, a local grayscale priority strategy is executed; The local grayscale priority strategy includes: The returned data is read from the memory for the first time using the second query key, and the reading is successful when the returned data is changed data, and the reading fails when the returned data is original data.

4. The method according to claim 3, characterized in that The program grayscale parameters of the N programs, the data grayscale parameters of the changed data, and the request grayscale parameters of the data request of the update function are all configured as target grayscales, and the data grayscale parameters of the original data are configured as preset initial grayscales. The local grayscale priority strategy also includes: For the returned data that failed to be read, a query key is generated based on the preset initial grayscale to obtain a third query key; The returned data is read again from the memory using the third query key to obtain the original data requested to be returned.

5. The method according to claim 2, characterized in that Programs other than the first program among the N programs are second programs, and obtaining the plurality of returned data from the memory using the first query key and / or the second query key includes: For each piece of returned data, if the second program and the first program are configured with different grayscales, executing the request grayscale priority strategy; The grayscale priority request strategy includes: The returned data is read from the memory for the first time using the first query key, and the reading is successful when the returned data is changed data, and the reading fails when the returned data is original data.

6. The method according to claim 5, characterized in that The program grayscale parameters of the first program, the data grayscale parameters of the changed data, and the request grayscale parameters of the data request of the update function are all configured as target grayscales, and the program grayscale parameters of the second program and the data grayscale parameters of the original data are all configured as preset initial grayscales. The request grayscale priority strategy further includes: For the returned data that fails to be read, determining whether the request grayscale parameter carried in the data request is consistent with the program grayscale parameter of the target program; If the two are consistent, a third query key is generated based on the preset initial grayscale, and Using the third query key, read the returned data again from the memory to obtain the original data requested to be returned; In the case that the two are inconsistent, the returned data is read again from the memory using the second query key to obtain the original data requested to be returned.

7. The method according to claim 1, characterized in that Each piece of data in the memory is stored in association with a key, the key of each piece of data is generated based on a data grayscale parameter of each piece of data, and the associated storage of the changed data and its data grayscale parameter in the memory includes: Generate a key for the changed data based on a data grayscale parameter of the changed data; storing the changed data and its key in association with each other in a memory; For each piece of returned data, if the key of the returned data in the memory indicates the same grayscale as the query key, the returned data is read successfully, otherwise the reading fails.

8. A data request device based on grayscale isolation, characterized in that: include: An acquisition module, configured to acquire change data associated with an update function when the update function is being tested; a screening module, configured to screen N programs on which the update function depends from various programs, and determine, among the N programs, a program for maintaining the change data as a first program; a grayscale configuration module, configured to configure the program grayscale parameters of the first program, the data grayscale parameters of the change data, and the request grayscale parameters of the data request of the update function to the same grayscale; an associated storage module, configured to associate and store the changed data and its data grayscale parameters in a memory, wherein the memory is further configured to store original data associated with the update function, the original data and its data grayscale parameters being associated and stored, the data grayscale parameters of the original data and the changed data being used to indicate different grayscales; a receiving module, configured to receive a data request for the update function, wherein the data request is used to obtain a plurality of return data, and the plurality of return data include changed data and / or original data; a data query module, configured to, when a target program among the N programs receives the data request, generate a query key based on a request grayscale parameter carried in the data request or a program grayscale parameter of the target program, and obtain the plurality of returned data from the memory using the query key; For each piece of returned data, if the grayscale parameter of the returned data in the memory indicates the same grayscale as the query key, the returned data is read successfully; otherwise, the reading fails.

9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; and when the electronic device executes the computer program instructions, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Database change gray release method and system and computer equipment

    CN117149747A

  • Container cloud server and gray release method

    CN117768513A