A grayscale publishing method and device

By automating the canary release of configuration data on the client side, the problems of manual operation and environmental limitations in existing technologies are solved. This achieves consistency and reliability of configuration data in both database and non-database environments, and improves the efficiency and accuracy of canary releases.

CN113364627BActive Publication Date: 2026-05-05WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WEBANK (CHINA)
Filing Date
2021-06-09
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In existing technologies, the canary release of configuration parameters in business systems requires manual operation and cannot be carried out in a non-database environment. Furthermore, maintaining configuration parameters in the configuration center and business system is not conducive to consistency control.

Method used

The client-side automated processing of configuration data canary releases includes receiving server instructions, updating configuration data, and applying it to business systems. It supports canary releases in both database and non-database environments and ensures the accuracy and consistency of the releases through control files and caching mechanisms.

Benefits of technology

It enables automated canary release of configuration data, ensuring the consistency of configuration data, improving the reliability and timeliness of canary release, and supporting applications in various environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113364627B_ABST
    Figure CN113364627B_ABST
Patent Text Reader

Abstract

This invention provides a canary deployment method and apparatus. The method includes: a client receiving a configuration query request from a server; the client being applied to a business system; the client reading first source configuration data from a source configuration file of the business system according to the configuration query request, and sending the first source configuration data to the server; the client receiving target configuration data updated by the server based on the first source configuration data, and updating the target configuration data to the canary deployment file of the business system; the client receiving a canary deployment instruction from the server, writing canary deployment control data into a control file according to the canary deployment instruction, and applying the canary deployment file to the business system through the control file. This method can automatically complete the canary deployment of configuration data and facilitate the maintenance of configuration data by the business side; it can also perform canary deployment in both database and non-database environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network technology in financial technology (Fintech), and more particularly to a grayscale release method and apparatus. Background Technology

[0002] In recent years, with the development of computer technology, more and more technologies are being applied in the financial sector, and the traditional financial industry is gradually transforming into Fintech. However, due to the security and real-time requirements of the financial industry, higher demands are being placed on technology. For example, companies in the financial industry now have their own business systems to achieve efficient processing of business under conditions of high security and high real-time performance through network technology. However, due to changes in business needs, the configuration parameters of these business systems also need to be updated.

[0003] Generally, the existing method for canary deployment of configuration parameters in business systems involves staff maintaining and setting configuration parameters for each version on a separate device—a configuration center—outside the business system. When configuration parameters in the business system need to be updated, staff export the corresponding version of the configuration parameters from the configuration center and manually set them to an automated deployment platform. The automated deployment platform then sends these parameters to the databases of each client in the business system, relying on the database for canary deployment. While this method can improve the security and real-time performance of business processing, the canary deployment of configuration parameters still requires manual deployment and can only be performed in a database environment; it cannot be performed in a non-database environment. Furthermore, because configuration parameters are maintained separately in the configuration center and the business system, it is not conducive to the business side's consistency control over configuration parameters.

[0004] Therefore, there is an urgent need for a canary release method and device that can automatically complete the canary release of configuration data and facilitate the maintenance of configuration data by business users; and can also perform canary releases in database and non-database environments. Summary of the Invention

[0005] This invention provides a canary release method and apparatus that can automatically complete the canary release of configuration data and facilitate the maintenance of configuration data by business users; it can also perform canary releases in database and non-database environments.

[0006] In a first aspect, embodiments of the present invention provide a grayscale release method, the method comprising:

[0007] The client receives a configuration query request sent by the server; the client is applied to the business system; according to the configuration query request, the client reads first source configuration data from the source configuration file of the business system and sends the first source configuration data to the server; the client receives target configuration data updated by the server based on the first source configuration data and updates the target configuration data to the canary release file of the business system; the client receives a canary release instruction sent by the server, writes canary release control data into a control file according to the canary release instruction, and applies the canary release file to the business system through the control file.

[0008] In the above method, the client receives a configuration query request to read the first source configuration data from the source configuration file of the business system; it then obtains the updated target configuration data based on the first source configuration data and updates the target configuration data to the canary release file of the business system using a canary release instruction. After receiving the canary release instruction, the client writes the canary release control data into a control file and applies the canary release file to the business system through the control file. Compared with the manual canary release of configuration data in the prior art, this invention can realize automated canary release of configuration data. By storing configuration data only on the client side, that is, only on the business side, configuration data consistency maintenance is achieved; and it does not depend on the database environment, and canary releases can be performed in both database and non-database environments.

[0009] Optionally, applying the canary release file to the business system through the control file includes: the client generating a release response message based on the control file and sending it to the server; the client updating the canary release file to the source configuration file based on the switchback instruction sent by the server; the switchback instruction is sent by the server after the release response message has been verified.

[0010] In the above method, the client generates a release response message based on the control file and sends it to the server to obtain a rollback instruction generated by the server after verifying the release response message. This improves the accuracy and reliability of canary releases, and the client can update the source configuration file with the completed canary release file according to the rollback instruction, ensuring consistency between the canary release file and the source configuration file.

[0011] Optionally, after updating the grayscale release file to the source configuration file, the method further includes: after the client determines that the source configuration file and the grayscale release file are consistent, generating a switchback response message based on the source configuration file and clearing the grayscale release control data in the control file.

[0012] In the above method, a switchback response message is sent to the server, allowing the server to verify whether the client's switchback was successful and ensuring consistency between the source configuration file and the canary release file in the client. The client also clears the canary release control data in the control file. This provides the conditions for the next canary release.

[0013] Optionally, before the client generates a release response message based on the control file and sends it to the server, the method further includes: the client loading the grayscale release file into the cache through the control file, and making the grayscale release file effective in the cache through a hot-apply annotation.

[0014] In the above method, the canary release file is loaded into the cache via a control file. This allows business systems to access the canary release file. Hot-apply annotations are then used to make the canary release file effective in the cache. Thus, hot-apply annotations allow the canary release file to take effect immediately, ensuring the timeliness of canary releases.

[0015] Optionally, before updating the target configuration data to the canary release file of the business system, the method further includes: the client receiving the second source configuration data sent by the server, determining that the second source configuration data is consistent with the third source configuration data in the source configuration file, and determining that the source configuration file is consistent with the canary release file.

[0016] In the above method, the second source configuration data is the first source configuration data sent by the client to the server. The first source configuration data can be changed or modified; that is, the second source configuration data is the first source configuration data obtained by the client when sending it. The third source configuration data is the source configuration data in the client after a certain period of time. This period refers to the time between the client sending the first source configuration data to the server and receiving the target configuration data returned by the server. During this period, the first source configuration data may change or be modified. The client then compares the second source configuration data obtained from the server with the third source configuration data. This prevents changes to the client's first source configuration data during this period, which could affect the canary release. Therefore, before updating the target source configuration data to the canary release file in the business system, the client first performs consistency verification between the second and third source configuration data to improve the reliability of the canary release. It also ensures that the source configuration file and the canary release file are consistent, guaranteeing that the data in the source configuration file has not changed during this period, preventing version conflicts during the canary release process caused by changes in the source configuration file.

[0017] Optionally, before the client writes the canary release control data into the control file of the business system according to the canary release instruction sent by the server, the method further includes: the client generating a configuration response message based on the target configuration data and sending it to the server; the canary release instruction is sent by the server after the configuration response message has been verified.

[0018] In the above method, the client sends a configuration response message to the server to obtain the canary release instruction generated by the server after verifying the configuration response message. This ensures the accuracy and reliability of the canary release process.

[0019] Optionally, the method further includes: after the business system restarts, the client determines whether the control file contains its own IP address; if it does, the canary release file is applied to the business system; otherwise, the source configuration file is applied to the business system.

[0020] In the above method, if the client's business system restarts, the configuration file for the business system application can be determined based on whether the control file contains its own IP address. This ensures that after the business system restarts, there is no need to manually configure the corresponding configuration file, reducing the workload for staff during restarts. Furthermore, if the business system restarts during the canary release process, the canary release can still be completed, ensuring its reliability.

[0021] Optionally, the source configuration file and the grayscale release file have annotation and data sequential writing functions. The annotation function is used to add notes and descriptions of configuration parameters, and the sequential writing function is used to write the annotations and configuration data in the target configuration data into the grayscale release file in sequence.

[0022] The above method incorporates commenting and sequential data writing capabilities in both the source configuration file and the canary release file. This allows for the inclusion of annotations and descriptions of corresponding configuration parameters in the configuration data, while the sequential data writing ensures that the configuration data and annotations are written to the canary release file in the correct order, guaranteeing good reliability even with the ability to include comments.

[0023] Secondly, embodiments of the present invention provide a grayscale publishing device, the device comprising:

[0024] The receiving module is used to receive configuration query requests sent by the server; the client is applied in the business system.

[0025] The processing module is used to read the first source configuration data from the source configuration file of the business system according to the configuration query request, and send the first source configuration data to the server through the sending module;

[0026] The receiving module is further configured to receive target configuration data updated by the server based on the first source configuration data, and update the target configuration data to the gray release file of the business system through the processing module;

[0027] The receiving module is further configured to receive the grayscale release instruction sent by the server, and write the grayscale release control data into a control file according to the grayscale release instruction through the processing module, and apply the grayscale release file to the business system through the control file.

[0028] Thirdly, embodiments of the present invention also provide a computing device, comprising: a memory for storing a program; and a processor for calling the program stored in the memory and executing the method described in various possible designs of the first aspect according to the obtained program.

[0029] Fourthly, embodiments of the present invention also provide a computer-readable non-volatile storage medium including a computer-readable program that, when read and executed by a computer, causes the computer to perform the method described in various possible designs of the first aspect.

[0030] These or other implementations of the present invention will become more readily apparent in the following description of the embodiments. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 A schematic diagram of a canary release architecture provided in an embodiment of the present invention;

[0033] Figure 2 A schematic diagram of a canary release architecture provided in an embodiment of the present invention;

[0034] Figure 3 A flowchart illustrating a grayscale release method provided in an embodiment of the present invention;

[0035] Figure 4 A flowchart illustrating a grayscale release method provided in an embodiment of the present invention;

[0036] Figure 5 This is a schematic diagram of a grayscale publishing device provided in an embodiment of the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0038] Figure 1 This invention provides a canary release system architecture where each client receives a configuration query request sent by the server, such as... Figure 1The system consists of clients 1, 2, ..., n. Upon receiving a configuration query request, each client retrieves the first source configuration data from the source configuration file and sends it to the server. The server then updates the target source configuration data based on this first source configuration data. The client then retrieves the target source configuration data and the second source configuration data (i.e., the first source configuration data received by the client from the server). The client verifies whether the second source configuration data and the third source configuration data (i.e., the current configuration data corresponding to the client's first source configuration data; that is, if the client's first source configuration data has not changed, then the first source configuration data is the third source configuration data; if the client's first configuration data has changed, then the changed first source configuration data is the third source configuration data) are consistent. If they are consistent, the client updates the target source configuration data to the canary release file of the business system. After updating the target source configuration data to the canary release file of the business system, the client generates a configuration response message and sends it to the server. Upon receiving the configuration response message, the server verifies it; if the verification fails, the canary release process is stopped. If verification passes, a canary release instruction is generated and sent to the client. Upon receiving the canary release instruction, the client writes the canary release control data to the control file and applies the canary release file to the business system through the control file. After applying the canary release file to the business system, the client generates a release response message and sends it to the server. The server receives the release response message and verifies it. If verification fails, the canary release process stops. If verification passes, a rollback instruction is generated and sent to the client. Upon receiving the rollback instruction, the client updates the canary release file to the source configuration file according to the instruction. After confirming that the source configuration file and the canary release file are consistent, the client clears the canary release control data in the control file, generates a rollback response message based on the source configuration file, and sends the rollback response message to the server. The server receives the rollback response message and verifies it. If verification fails, the canary release process stops. If verification passes, the canary release is considered successful, and the canary release process ends.

[0039] This invention provides a system architecture for canary release, such as... Figure 2 As shown, the server and each client transmit messages through middleware.

[0040] Based on the above system architecture, this embodiment of the invention provides a flow chart for a canary release method, such as... Figure 3 As shown, it includes:

[0041] Step 301: The client receives a configuration query request sent by the server; the client is used in the business system.

[0042] Step 302: The client reads the first source configuration data from the source configuration file of the business system according to the configuration query request, and sends the first source configuration data to the server.

[0043] Step 303: The client receives the target configuration data updated by the server based on the first source configuration data, and updates the target configuration data in the canary release file of the business system;

[0044] Step 304: The client receives the canary release instruction sent by the server, writes the canary release control data into the control file according to the canary release instruction, and applies the canary release file to the business system through the control file.

[0045] In one example, the canary release control data could be ip:task_group_id. Additionally, in the methods described above, the source configuration file, canary release file, and control file can all be located by searching for the systemId+default+namespace.

[0046] In the above method, the client receives a configuration query request to read the first source configuration data from the source configuration file of the business system; it then obtains the updated target configuration data based on the first source configuration data and updates the target configuration data to the canary release file of the business system using a canary release instruction. After receiving the canary release instruction, the client writes the canary release control data into a control file and applies the canary release file to the business system through the control file. Compared with the manual canary release of configuration data in the prior art, this invention can realize automated canary release of configuration data. By storing configuration data only on the client side, that is, only on the business side, configuration data consistency maintenance is achieved; and it does not depend on the database environment, and canary releases can be performed in both database and non-database environments.

[0047] This invention provides a canary deployment method. The canary deployment file is applied to the business system using a control file, comprising: the client generating a deployment response message based on the control file and sending it to the server; the client updating the canary deployment file to the source configuration file based on a switchback command sent by the server; the switchback command is sent by the server after verifying the deployment response message. Here, the deployment response message may carry an encrypted control file, such as returning the MD5 value of the control file to the server. Thus, the server verifies the execution result of the canary deployment command based on the MD5 value of the control file. If the verification fails, the client stops the canary deployment process and can perform corresponding checks on its own deployment process. If the verification passes, the client receives the switchback command sent by the server and updates the canary deployment file to the source configuration file. This ensures the reliability of the canary deployment.

[0048] This invention provides a canary release method. After updating the canary release file to the source configuration file, the method further includes: after the client determines that the source configuration file and the canary release file are consistent, it generates a switchback response message based on the source configuration file and clears the canary release control data in the control file. Here, the switchback response message may contain an encrypted source configuration file; for example, the MD5 value of the source configuration file can be returned to the server. This allows the server to verify the execution result of the switchback command based on the MD5 value of the source configuration file. If the verification fails, the client stops the canary release process and performs corresponding checks. If the verification passes, the client can determine that the control file has successfully updated the canary release file to the source configuration file. This ensures the reliability of the canary release.

[0049] This invention provides a canary release method. Before the client generates a release response message based on the control file and sends it to the server, the method further includes: if the client determines through the control file that its IP address belongs to the IP address set in the canary release instruction, then the client loads the canary release file into the cache and makes the canary release file effective in the cache through a hot-refresh annotation. In other words, if the client determines that its own IP exists in the example IP set in the canary release instruction, it writes the canary release control data into the control file, and hot-refresh annotations can be written into the configuration data of the canary release file. Thus, compared to the prior art where the canary release file content is refreshed to the cache during the canary instance phase and does not take effect immediately, this invention can enable the instant cache effect function through hot-refresh annotations, such as annotating the configuration parameter class with `@RefreshScope`. That is, when the canary release file is loaded into the cache, the canary release file takes effect immediately.

[0050] This invention provides a canary deployment method. Before updating the target configuration data to the canary deployment file of the business system, the method further includes: the client receiving second source configuration data sent by the server, determining that the second source configuration data is consistent with third source configuration data in the source configuration file, and determining that the source configuration file is consistent with the canary deployment file. Here, the first source configuration data is the configuration data corresponding to the source configuration file when the client sends the first source configuration data; the second source configuration data is obtained by the client sending the first source configuration data to the server, and the data content of the first source configuration data and the second source configuration data is the same; the third source configuration data is the configuration data in the client's source configuration file corresponding to the first source configuration data, and the third source configuration data can be obtained after changing the first source configuration data, or it can be the same as the first source configuration data. After the client sends the first source configuration data to the server and receives the target configuration data and the second source configuration data sent by the server, the client determines that the third source configuration data and the second configuration data are consistent, and determines that the source configuration file is consistent with the canary deployment file, before updating the target configuration data to the canary deployment file of the business system. In this way, the client verifies that the third-source configuration data is consistent with the second-source configuration data to ensure that the first-source configuration data has not changed during the client's acquisition of the target configuration data. This prevents version inconsistencies caused by changes to the first-source configuration data, which could lead to canary release errors and ensure the reliability of canary releases. Furthermore, the client verifies that the source configuration file and the canary release file are consistent to ensure that neither has changed during the client's acquisition of the target configuration data. This prevents version conflicts caused by changes to the source configuration file and / or the canary release file, which could lead to canary release errors and further ensure the reliability of canary releases.

[0051] This invention provides a canary release method. Before the client writes canary release control data into the control file of the business system according to the canary release instruction sent by the server, the method further includes: the client generating a configuration response message based on the target configuration data and sending it to the server; the canary release instruction is sent by the server after the configuration response message has been verified. Here, the configuration response message may contain an encrypted canary release file. For example, the MD5 value of the canary release file can be returned to the server so that the server can verify the MD5 value of the canary release file. If the verification fails, the client can determine that the configuration update process in the canary release has failed, and the client stops the canary release process and performs corresponding checks on the canary release process. If the verification passes, the client can determine that the target configuration data has been successfully updated to the canary release file. This ensures the reliability of the canary release.

[0052] This invention provides a method for restarting a business system during a canary deployment, further comprising: after the business system restarts, the client determines whether the control file contains its own IP address; if it does, the canary deployment file is applied to the business system; otherwise, the source configuration file is applied to the business system. Here, the control file can be an IP control file. After the business system restarts, the application source configuration file or canary deployment file can be determined by checking whether the control file contains the client's own IP address. For example, the content of the IP control file of the client's business system instance can be used to determine whether the current instance is undergoing canary deployment; that is, the current instance IP address is obtained, and the content of the IP control file is read to generate a properties object. When the properties object contains the IP address, the canary deployment file data is loaded into the cache; otherwise, the source configuration file data is loaded into the cache. Thus, in a restart scenario, the success of instance canary deployment can be ensured, improving the robustness of canary deployment. Compared to existing technologies where a business system restarts during a canary release, necessitating a complete overhaul of the canary release process, this invention allows for direct application of the canary release files from the canary release process after a business system restarts, preventing canary release failures caused by business system restarts.

[0053] This invention provides a source configuration file and a canary release file. Both the source configuration file and the canary release file offer annotation and sequential data writing capabilities. The annotation function adds notes and descriptions to configuration parameters, while the sequential writing function writes the notes and configuration data from the target configuration data sequentially into the canary release file. In other words, the annotation function in the source configuration file and the canary release file allows the configuration data to be annotated with notes and descriptions for configuration parameters. To prevent the annotation information (corresponding to the notes and descriptions of configuration parameters) and configuration parameters from being out of order during the writing process, the sequential writing function is added to ensure that the annotation information and configuration parameters are written in the correct order.

[0054] Based on the above method flow, this application embodiment provides a flow of a grayscale release method, such as... Figure 4 As shown, it includes:

[0055] Step 401: The client receives the configuration query request sent by the server, queries the first source configuration data of the source configuration file, and sends the first source configuration data to the server.

[0056] Step 402: The client receives the target configuration data updated by the server based on the first source configuration data, and receives the second source configuration data, wherein the second source configuration data is the first source configuration data received by the server.

[0057] Step 403: After receiving the target configuration data and the second source configuration data, the client compares the third source configuration data corresponding to the original first source configuration data in the source configuration file with the second source configuration data. If the third source configuration data is consistent with the second source configuration data and the canary release file is consistent with the source configuration file, the target configuration data is updated to the canary release file of the business system.

[0058] Step 404: The client generates a configuration response message based on the MD5 value of the canary release file and sends it to the server.

[0059] Step 405: The client receives the canary release instruction sent by the server. This canary release instruction is sent by the server after the server has verified the configuration response message. If the verification fails, the client stops the canary release process.

[0060] Step 406: After receiving the canary release instruction, the client determines that its own IP belongs to the IP set in the canary release instruction, then writes the canary release control data into the control file, and writes the canary release file into the cache through the control file.

[0061] Step 407: The client's grayscale release file contains a hot-reactivation annotation. The hot-reactivation annotation enables the grayscale release file to take effect in the cache and applies the grayscale release file to the business system.

[0062] Step 408: The client generates a publish response message based on the MD5 value of the control file and sends it to the server.

[0063] Step 409: The client receives a rollback command from the server. This rollback command is sent by the server after verifying the release response message. If the verification fails, the client stops the canary release process.

[0064] Step 410: After receiving the rollback instruction, the client updates the grayscale release file to the source configuration file and generates a rollback response message based on the MD5 value of the source configuration file.

[0065] Step 411: If the client's business system restarts, check if the control file contains its own IP address. If it does, apply the canary release file to the business system.

[0066] Step 412: The client clears the canary release control data in the control file and sends the switchback response message to the server.

[0067] It should be noted that the above process steps are not unique. Step 411 can occur before or after any of the steps 407 to 410, or it can not occur at all.

[0068] Based on the same concept, embodiments of the present invention provide a grayscale publishing device. Figure 5 This is a schematic diagram of a grayscale publishing device provided in an embodiment of this application, as shown below. Figure 5 The following are examples:

[0069] The receiving module 501 is used to receive configuration query requests sent by the server; the client is applied in the business system.

[0070] Processing module 502 is used to read first source configuration data from the source configuration file of the business system according to the configuration query request, and send the first source configuration data to the server through sending module 503;

[0071] The receiving module 501 is further configured to receive target configuration data updated by the server based on the first source configuration data, and update the target configuration data to the gray release file of the business system through the processing module 502;

[0072] The receiving module 501 is further configured to receive the grayscale release instruction sent by the server, and write the grayscale release control data into a control file according to the grayscale release instruction through the processing module 502, and apply the grayscale release file to the business system through the control file.

[0073] Optionally, the processing module 502 is specifically used to: generate a release response message based on the control file and send it to the server through the sending module 503; update the grayscale release file to the source configuration file based on the switchback instruction sent by the server; the switchback instruction is sent by the server after the release response message has been verified.

[0074] Optionally, the processing module 502 is further configured to: after determining that the source configuration file is consistent with the grayscale release file, generate a switchback response message based on the source configuration file, and clear the grayscale release control data in the control file.

[0075] Optionally, the processing module 502 is further configured to: if the IP address of the client is determined to belong to the set of IP addresses in the grayscale release instruction through the control file, then load the grayscale release file into the cache, and make the grayscale release file effective in the cache through a hot-apply annotation.

[0076] Optionally, the receiving module 501 is further configured to: receive the second source configuration data sent by the server, and determine, through the processing module 502, that the second source configuration data is consistent with the third source configuration data in the source configuration file, and determine that the source configuration file is consistent with the grayscale release file.

[0077] Optionally, the processing module 502 is further configured to: generate a configuration response message based on the target configuration data, and send it to the server through the sending module 503; the grayscale release instruction is sent by the server after the configuration response message has been verified.

[0078] Optionally, the processing module 502 is further configured to: after the business system restarts, determine whether the control file contains its own IP address; if it does, apply the grayscale release file to the business system; otherwise, apply the source configuration file to the business system.

[0079] Optionally, the source configuration file and the grayscale release file have annotation and data sequential writing functions. The annotation function is used to add notes and descriptions of configuration parameters, and the sequential writing function is used to write the annotations and configuration data in the target configuration data into the grayscale release file in sequence.

[0080] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0081] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0082] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0083] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0084] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A grayscale release method, characterized in that, The method includes: The client receives a configuration query request sent by the server; the client is used in the business system. The client reads the first source configuration data from the source configuration file of the business system according to the configuration query request, and sends the first source configuration data to the server. The client receives the target configuration data updated by the server based on the first source configuration data, and updates the target configuration data in the canary release file of the business system; The client receives the canary release instruction sent by the server, writes the canary release control data into the control file according to the canary release instruction, and determines through the control file that the client's IP address belongs to the IP address set in the canary release instruction. Then, the client loads the canary release file into the cache and makes the canary release file effective in the cache through hot-effective annotation. The grayscale release file is applied to the business system through the control file; After the business system restarts, the client determines whether its own IP address is included in the control file; if it is, the canary release file is applied to the business system; otherwise, the source configuration file is applied to the business system.

2. The method as described in claim 1, characterized in that, The step of applying the canary release file to the business system through the control file includes: The client generates a publish response message based on the control file and sends it to the server. The client updates the grayscale release file to the source configuration file based on the switchback command sent by the server; the switchback command is sent by the server after verifying the release response message.

3. The method as described in claim 2, characterized in that, After updating the grayscale deployment file to the source configuration file, the process also includes: After the client determines that the source configuration file is consistent with the canary release file, it generates a switchback response message based on the source configuration file and clears the canary release control data in the control file.

4. The method as described in claim 1, characterized in that, Before updating the target configuration data to the canary release file of the business system, the process also includes: The client receives the second source configuration data sent by the server, determines that the second source configuration data is consistent with the third source configuration data in the source configuration file, and determines that the source configuration file is consistent with the grayscale release file.

5. The method according to any one of claims 1-4, characterized in that, Before the client writes the canary release control data into the control file of the business system according to the canary release instruction sent by the server, the process also includes: The client generates a configuration response message based on the target configuration data and sends it to the server; the canary release instruction is sent by the server after the configuration response message has been verified.

6. The method according to any one of claims 1-4, characterized in that, The source configuration file and the grayscale release file have annotation and data sequential writing functions. The annotation function is used to add notes and descriptions of configuration parameters, and the sequential writing function is used to write the annotations and configuration data in the target configuration data into the grayscale release file in sequence.

7. A grayscale publishing device, characterized in that, The device includes: The receiving module is used to receive configuration query requests sent by the server; the client is used in the business system. The processing module is used to read the first source configuration data from the source configuration file of the business system according to the configuration query request, and send the first source configuration data to the server through the sending module; The receiving module is further configured to receive target configuration data updated by the server based on the first source configuration data, and update the target configuration data to the gray release file of the business system through the processing module; The receiving module is further configured to receive the gray-scale release instruction sent by the server, and write the gray-scale release control data into a control file according to the gray-scale release instruction through the processing module. If the client determines through the control file that the client's IP address belongs to the IP address set in the gray-scale release instruction, then the gray-scale release file is loaded into the cache, and the gray-scale release file is made effective in the cache through a hot-effective annotation. The grayscale release file is applied to the business system through the control file; After the business system restarts, the client determines whether its own IP address is included in the control file; if it is, the canary release file is applied to the business system; otherwise, the source configuration file is applied to the business system.

8. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Gray release method and device and electronic device

    CN110442361A

  • Method, device and system for performing grey-releasing on mobile application

    WO2016179958A1