Grayscale release method, device and system

By storing and pushing update file packages on the file server, allowing the production environment server to pull and achieve grayscale effect on its own, solving the problems of low efficiency and error-prone update configuration files in the existing technology, and improving the reliability of grayscale release and system stability.

CN115145616BActive Publication Date: 2024-12-27HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210630567.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-06
Publication Date
2024-12-27
Estimated Expiration
2042-06-06

AI Technical Summary

Technical Problem

When updating the application's configuration files, the existing technology is inefficient and error-prone, affecting the online application functions and user experience, especially when grayscale releases are performed on multiple production environment servers, maintenance is difficult and inflexible.

Method used

A grayscale release method is proposed. By obtaining update file packages and grayscale information, it stores and pushes them to the file server, allowing the production environment server to pull update file packages by itself without restarting the server, so as to achieve grayscale effect of the file and simplify the operation process. .

Benefits of technology

It improves development efficiency and system stability, reduces development costs, ensures the reliability of grayscale modifications, and can be rolled back to the original file in case of errors, avoiding large-scale impacts on online services and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145616B_ABST
    Figure CN115145616B_ABST
Patent Text Reader

Abstract

The present application provides a grayscale publishing method, device and system. After the developer completes the modification of the code file and / or configuration file of the target application, the developer packages the determined files to be released, sends the obtained update file package to the file server for storage, and configures the corresponding update grayscale information for the first production environment server that needs to be updated, so as to instruct the first production environment server to pull the target update file package (update code package or update configuration package) required for running the target application from the file server for loading and execution. The grayscale effectiveness of the files to be released can be achieved without restarting, thereby improving development efficiency and reducing development costs. Moreover, the grayscale effectiveness configured according to the production environment server improves the reliability of grayscale modification and system stability. Even when an update error occurs, the original file can still be pulled for loading and execution, so as not to affect online services and user experience on a large scale.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer communication technology, and in particular to a grayscale publishing method, device and system. Background Art

[0002] In today's Internet big data era, in order to facilitate the management of applications developed to support different business functions, program codes and configuration files that support the implementation of business functions are usually sent to multiple production environment servers for deployment, so that clients can access the corresponding production environment servers to implement the business functions of the application, including system stability and access reliability.

[0003] However, when it is necessary to update the application configuration file and upgrade the application version, if the application has a large number of configuration files, each production environment server must specify a configuration file to be modified to make the configuration file change take effect in grayscale. All production environment servers must be restarted to complete the grayscale modification of a large number of configuration files. This is very inefficient and can easily cause configuration file errors due to difficulties in modification and maintenance, affecting online application functions and user experience. Summary of the invention

[0004] To achieve the above objectives, the present application proposes a grayscale release method, which includes:

[0005] Obtaining at least one update file package for a target application; the update file package is generated by packaging the obtained files to be published after updating the code file and / or at least one first configuration file in the batch configuration file of the target application, and has an update file identifier configured for the files to be published; the files to be published include a batch configuration file consisting of the updated first configuration file and the unupdated second configuration file, or all the updated code files and the batch configuration files referenced by them;

[0006] Receive update grayscale information sent by the operation management platform of the target application; the update grayscale information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server;

[0007] Storing the at least one update file package and the update grayscale information;

[0008] Receiving a file pull request for a target file to be released sent by the first production environment server; the file pull request is sent by the first production environment server based on the content of the updated grayscale information when executing the target application;

[0009] In response to the file pull request, a target update file package including the requested target file to be published is sent to the first production environment server for execution.

[0010] Optionally, the process of acquiring at least one update file package for the target application includes:

[0011] In response to an update request for a target application, updating a code file and / or at least one first configuration file in a batch configuration file of the target application, and obtaining a to-be-published file of the target application and an update file identifier corresponding to the to-be-published file;

[0012] If the update file identifier includes an update configuration identifier, the batch configuration files with the update configuration identifier in the to-be-published file are packaged to obtain an update configuration package with the update configuration identifier; the batch configuration files with the update configuration identifier include all updated first configuration files and all unupdated second configuration files;

[0013] If the update file identifier includes an update code identifier, all code files with the update code identifier in the to-be-released file and the batch configuration files referenced by them are packaged to obtain an update code package with the update code identifier;

[0014] The obtained update configuration package and / or the update code package is uploaded to a file server.

[0015] Optionally, if the at least one update file package is the update configuration package, the update grayscale information includes a grayscale state relationship between the original code identifier of the target application of the indicated production environment server and the update configuration identifier of the update configuration package, indicating that the production environment server loads the update configuration package;

[0016] If the at least one update file package is the update code package, the update grayscale information is consistent with the content of the original grayscale information, and the production environment server is instructed to load the update code package.

[0017] This application also proposes a grayscale release method, which includes:

[0018] Sending a grayscale publishing query request to a file server, and obtaining updated grayscale information fed back by the file server in response to the grayscale publishing query request; the updated grayscale information is used to indicate a first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server;

[0019] Determining that the application update condition is met according to the update grayscale information, and generating a file pull request for the target file to be released using the content of the update grayscale information; wherein the target file to be released is a batch configuration file consisting of the updated first configuration file and the unupdated second configuration file contained in the update file package, or all the updated code files and the batch configuration files referenced by them;

[0020] Sending a file pull request for the target application to the file server, and pulling a target update file package from the file server; the target update file package refers to an update file package corresponding to the target update file identifier carried in the file pull request;

[0021] The target to-be-published file in the target update file package is loaded and executed.

[0022] Optionally, determining that an application update condition is met according to the update grayscale information includes:

[0023] Determine, according to the indication correspondence between the grayscale information with different names and at least one production environment server supporting the target application, the service address of the production environment server indicated by the name of the obtained updated grayscale information;

[0024] It is detected that the service address of the service belongs to any of the determined service addresses, and it is determined that the application update conditions are met;

[0025] It is detected that the service address of the service itself does not belong to any of the determined service addresses, and it is determined that the application update condition is not met, and new update grayscale information continues to be queried from the file server.

[0026] Optionally, the step of generating a file pull request for a target file to be published by using the content of the updated grayscale information includes:

[0027] If the update grayscale information includes the grayscale state relationship between the original code identifier of the target application of the indicated production environment server and the update configuration identifier of the update configuration package, and the update grayscale information contains different contents from the original grayscale information, determine that the update configuration identifier in the grayscale state relationship is the target update file identifier of the target file to be released;

[0028] If the updated grayscale information is the same as the original grayscale information, the updated code identifier is determined as the target updated file identifier of the target file to be released; the target file to be released includes the updated code and the batch configuration file referenced by it;

[0029] Generate a file pull request containing the target updated file identifier.

[0030] Optionally, the method further includes:

[0031] If the running target file to be released is a configuration file, verifying the target application function implemented based on the target file to be released;

[0032] If the verification is successful, the corresponding grayscale indication information is output to instruct all production environment servers supporting the target application to configure the updated grayscale information and load the target file to be released;

[0033] If the verification fails, a rollback operation is performed to restore the production environment server executing the target file to be released to the state before responding to the update grayscale information;

[0034] If the running target file to be released is a code file, verifying the function and security of the target application implemented based on the target file to be released;

[0035] If all verifications are passed, the code file is released in phased mode. When the released code file is monitored to be normally applied, the code file is released in full.

[0036] If the verification fails or the published code file is applied abnormally, the code file of the target application is restored to the original code file.

[0037] The present application also proposes a grayscale release device, the device comprising:

[0038] An update file package obtaining module, used to obtain at least one update file package for a target application; wherein the update file package is generated by packaging the obtained files to be published after updating the code file and / or at least one first configuration file in the batch configuration file of the target application, and has an update file identifier configured for the files to be published; the files to be published include a batch configuration file consisting of the updated first configuration file and the unupdated second configuration file, or all the updated code files and the batch configuration files referenced by them;

[0039] An update grayscale information receiving module, used to receive update grayscale information sent by the operation management platform of the target application; wherein the update grayscale information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server;

[0040] An information storage module, used for storing the at least one update file package and the update grayscale information;

[0041] A file pull request receiving module, configured to receive a file pull request for a target file to be released sent by the first production environment server; the file pull request is sent by the first production environment server based on the content of the update grayscale information when executing the target application;

[0042] The file pull request response module is used to respond to the file pull request and send the target update file package containing the requested target file to be published to the first production environment server for execution.

[0043] The present application also proposes a grayscale release device, the device comprising:

[0044] A grayscale information acquisition module is used to send a grayscale publishing query request to a file server, and obtain updated grayscale information fed back by the file server in response to the grayscale publishing query request; the updated grayscale information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server;

[0045] A target update file identification determination module is used to determine whether the product update condition is met according to the update grayscale information, and to generate a file pull request for the target file to be released using the content of the update grayscale information; wherein the target file to be released is a batch configuration file consisting of the updated first configuration file and the unupdated second configuration file contained in the update file package, or all the updated code files and the batch configuration files referenced by them;

[0046] A target update file package pulling module is used to send a file pulling request for a target application to the file server, and pull a target update file package from the file server; the target update file package refers to an update file package corresponding to the target update file identifier carried by the file pulling request;

[0047] The target to-be-published file loading module is used to load and execute the target to-be-published file in the target update file package.

[0048] The present application also proposes a grayscale release system, the system comprising:

[0049] A file identification control system, used for receiving a to-be-released file of any product sent by a client, and an updated file identification corresponding to the to-be-released file;

[0050] A packaging and publishing system is used to package the files to be published and output the generated corresponding update file packages;

[0051] The operation management platform is used to respond to the gray state configuration operation and output the obtained updated gray information; the updated gray information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server;

[0052] A file server, used to implement the grayscale publishing method performed by the corresponding side;

[0053] A system server is deployed with multiple production environment servers, and the production environment servers are used to implement the grayscale release method executed by the corresponding side.

[0054] Based on the above technical solution, the present application provides a grayscale publishing method, device and system. After the developer completes the modification of the code file and / or configuration file of the target application, the developer packages the determined files to be released, sends the obtained updated file package to the file server for storage, and configures the corresponding updated grayscale information for the first production environment server that needs to be updated, so as to instruct the first production environment server to pull the target update file package (update code package or update configuration package) required to run the target application from the file server for loading and execution. The grayscale effectiveness of the files to be released can be achieved without restarting, thereby improving development efficiency and reducing development costs. Moreover, the grayscale effectiveness configured according to the production environment server improves the reliability of grayscale modification and system stability. Even when an update error occurs, the original file can still be pulled for loading and execution, so as not to affect online services and user experience on a large scale. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0056] Figure 1 A schematic diagram of an optional example of a grayscale publishing system for implementing the grayscale publishing method proposed in this application;

[0057] Figure 2 A flowchart of an optional example of the grayscale release method proposed in this application;

[0058] Figure 3 A signaling flow diagram of another optional example of the grayscale release method proposed in this application;

[0059] Figure 4A flowchart of another optional example of the grayscale release method proposed in this application;

[0060] Figure 5 A schematic diagram of an optional application scenario of the grayscale state relationship configured in the grayscale release method proposed in this application;

[0061] Figure 6 A flowchart of another optional example of the grayscale release method proposed in this application;

[0062] Figure 7 A flowchart of another optional example of the grayscale release method proposed in this application;

[0063] Figure 8 A flowchart of another optional example of the grayscale release method proposed in this application;

[0064] Fig. 9 A schematic diagram of the structure of an optional example of the grayscale publishing device proposed in this application;

[0065] Fig.10 This is a structural diagram of another optional example of the grayscale publishing device proposed in this application. DETAILED DESCRIPTION

[0066] In response to the description in the background technology section, this application proposes that after the configuration file is modified, it is possible to load the modified configuration file without restarting multiple production environment servers deployed on the entire system server side, thereby simplifying the grayscale operation steps and improving the efficiency of grayscale publishing, that is, simply and quickly implementing the grayscale effectiveness of large-scale file modifications for production environment servers.

[0067] In the actual application of this application, multiple production environment servers on the system service side can be deployed in different computer rooms. In this way, during the application upgrade and grayscale release process, one or more servers can be designated to implement the grayscale of the configuration file according to the actual situation to ensure that when the configuration file is wrong, it will not affect the online service and user experience on a large scale. If the production environment server does not participate in the grayscale release of the configuration file, it can still be accessed by the user client to improve the corresponding application service for the user.

[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It can be understood that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0069] It should be understood that the "system", "device", "unit" and / or "module" used in this application is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions.

[0070] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "a kind" and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of clearly identified steps and elements, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements. The elements defined by the sentence "includes a..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.

[0071] Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two. The following terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0072] In addition, flow charts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, the various steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or a certain step or several steps of operations may be removed from these processes.

[0073] Reference Figure 1 , is a structural diagram of an optional example of a grayscale release system for implementing the grayscale release method proposed in this application. The system can be applicable to the grayscale release of code files and configuration files of new products under development (such as certain applications, services, etc.), and can also be applicable to the grayscale release of modifications to configuration files and / or code files for implementing product upgrades in an existing product upgrade application scenario. This application does not limit the actual application scenarios.

[0074] like Figure 1As shown, the system may include but is not limited to: a file identification control system 110, a packaging and publishing system 120, an operation management platform 130, a file server 140, and a system server deployed with multiple production environment servers 150, wherein:

[0075] The file identification control system 110 can be used to receive an update file of any product sent by a client, and an update file identification corresponding to the update file. It should be noted that different clients can send update files and update file identifications of different products, and the update files and update file identifications can be configured by the same or different product developers, and the implementation process is not limited in this application.

[0076] In the embodiment of the present application, the file identification control system 110 can also be referred to as a code repository. Taking Git, an open source distributed version control system, as an example, according to actual needs, when the developer needs to update the code file and / or at least one configuration file of the target application, the original code file and the original configuration file of the target application can be cloned from the corresponding production environment server to the local terminal device, so that the developer can modify the corresponding original file and obtain the modified code / configuration file, which is recorded as an update file in this application. Optionally, the developer can also directly write a new code file and / or configuration file as an update file, request an update to the production environment server to run, and implement application function operation and maintenance, etc. This application does not limit how the developer implements the update implementation process of the code file and / or configuration file of the target application, including but not limited to the two implementation methods described above.

[0077] In some embodiments, in a scenario where a large number of configuration files of a target application need to be modified and updated, in order to improve the update efficiency, the update task can be divided into multiple sub-tasks and distributed to different developers. Different developers modify part of the configuration files in the large number of configuration files and send them to the code repository cache. This improves work efficiency compared to a single developer modifying the large number of configuration files. The present application does not impose any restrictions on this task distribution implementation method.

[0078] Among them, for each modification of the code file and / or configuration file of the target application, a corresponding update file identifier can be configured for the corresponding update file to distinguish it from the original file identifier of the original file of the target application. Therefore, an update code identifier can be configured for the update code file, and an update configuration identifier can be configured for the update configuration file. Optionally, the file identifier can be recorded as a Tag, which can be a file version number, such as v1.0.0, etc. This application does not limit the content of the file identifier and the representation method of the file version number, which can be determined according to the circumstances.

[0079] In some embodiments, after the developer submits the update file to the file identification control system 110 (such as the code repository Git), the update file can be tested by a test tool or a tester, such as detecting whether the update file is configured for the target application, whether the file format meets the preset requirements, etc. This application does not limit the test implementation process of the update file, which can be determined according to the situation. After the test passes, the update file identification Tag is configured for it, and an application for updating the online production environment server is initiated, that is, an update instruction for the target application.

[0080] The packaging and publishing system 120 can be a system used by operation and maintenance personnel for automated construction and deployment, and the operation of the system can be supported by a packaging and publishing server. According to application requirements, the packaging and publishing system and the above-mentioned file identification control system can be integrated in the same computer device, such as a rule server, to implement the processing process before the product or its update file is released. This application does not elaborate on the application release process.

[0081] In the embodiment of the present application, according to the method described above, after the application developer completes the modification of its code file and / or configuration file and obtains the corresponding update file (such as all configuration files including at least one modified configuration file, and / or all code files including at least one modified code file), it is necessary to update the content of the update file to the production environment server of the product (i.e., the production environment server). Following the above description, the packaging and publishing system 120 can receive the update instruction for the target application sent by the file identification control system 110, and in response to the update instruction, it can pull the update file corresponding to the update file identification carried by the update instruction from the file identification control system 110, such as the update code file and / or update configuration file corresponding to the Tag, and then, according to the update file identification, the pulled update file can be compressed into at least one update file package and then output, such as compressing all code files and all update configuration files corresponding to the Tag into an update code package, i.e., a system startup package, compressing all update configuration files corresponding to the Tag into an update configuration package, and naming the update file package with the update file identification, and then, the obtained update file package can be uploaded to the file server 140 for storage.

[0082] Optionally, for the above-mentioned update file packaging process, a preset compression algorithm can be used to compress multiple update files into a compressed package of a preset format, such as a zip compressed file, etc. This application does not limit the update file compression implementation method. Among them, for update files of the same type, they have the same update file identifier, ensuring that the name of the update file package obtained by compression can determine the file version type of each update file contained in the update file package.

[0083] The operation management platform 130 can be used to respond to the grayscale status configuration operation and output the obtained grayscale information; it should be noted that the grayscale information can be used to indicate the production environment server where the files to be updated of the target application (such as an application program) are located, and the update relationship between the code package of the production environment server (which may include the original code file and the original configuration file of the target application) and the configuration package, so that the system server can determine one or more production environment servers participating in the file update operation of the target application based on the grayscale information, and then the determined production environment server can pull the required update files from the file server 140 for loading based on the content of the grayscale information.

[0084] It can be seen that the developer logs in to the operation management platform 130 and configures the corresponding grayscale information based on the update file and its update file identifier based on the developer's own configuration. For example, if only at least one configuration file of the target application needs to be modified this time, after obtaining the update configuration file (that is, all configuration files that support the operation of the target application), the corresponding update configuration identifier, such as v1.0.1, can be configured. Prior to this, the original code file and the original file identifier of the original configuration file of the target application, that is, the name of the original code package (that is, the original system activation package) and the original configuration package can be v1.0.0. It can be seen that in order to ensure the normal operation of the target application, this application needs to configure the latest corresponding update code identifier and update configuration identifier of the name of the original code package, thereby determining the original code identifier of the original code file in the original code package and the grayscale status relationship between the update configuration identifier of the update configuration file, that is, during the grayscale validation process, the original code file corresponding to the original code identifier and the update configuration file corresponding to the update configuration identifier need to be loaded. This application does not limit the implementation method of loading and running code files and configuration files.

[0085] Similarly, for other update and upgrade scenarios of the target application, such as when both the code file and the configuration file of the target application need to be upgraded, or when only the code of the target application is upgraded, the corresponding grayscale information can still be configured in the manner described above, and this application does not limit the configuration implementation method of the grayscale information. Among them, for different update relationships (i.e. corresponding to the above different scenarios), the name and content of the configured grayscale information are often different. Since it involves the code update of the target application, it often needs to be determined according to the actual update requirements of the application.

[0086] It should be noted that the above-mentioned update file identifier can be set directly in the file identifier control system after the developer obtains the file to be released, or after logging into the operation management platform, the developer can configure the corresponding update file identifier for each file to be released of the current target application. This application does not limit the configuration implementation method of the update file identifier. In addition, when it is necessary to configure grayscale information, the developer can log in to the operation management platform, set the update configuration identifier of the corresponding update configuration file for the code identifier of the code file of the target application of each production environment server, obtain the update grayscale information of the corresponding production environment server, and send it to the file server for storage after the operation and maintenance personnel have reviewed it and found no problems.

[0087] In some embodiments, different production environment servers deployed in different computer rooms can be the organizational structure of the system server deployed in three dimensions: computer room, cluster, and server. For one or more effective scopes of target application updates and upgrades, the corresponding names can be configured according to the preset grayscale information naming rules, so that the production environment servers that need to be updated can be determined accordingly. The grayscale information naming rules can include but are not limited to: code_config-${DC}- ${CLUSTER}-${SERVER}.properties.

[0088] Based on this, if only 1.1.1.1 (that is, the service address of the production environment server) of the prod1 cluster of the physical computer room or cloud computer room of a certain enterprise (this application takes aliyun as an example, for other enterprises, you can replace the enterprise name in the naming below) that uses the target application is effective, when configuring the grayscale information on the operation management platform, its name can be determined as: code_config-aliyun-prod1-1.1.1.1.properties; if it is only effective on all production environment servers in the prod1 cluster of the enterprise's computer room, the name of the configured grayscale information can be: code_config-aliyun-prod1.properties; if it is only effective on all production environment servers in all clusters of the enterprise's computer room, the name of the configured grayscale information can be: code_config-aliyun.properties; if it is effective on all servers in all clusters of all computer rooms that support the target application, the name of the configured grayscale information can be: code_config.Properties.

[0089] It should be noted that if one or more production environment servers in one or more clusters that support two or more enterprise computer rooms are effective, the name of the corresponding grayscale information can still be determined according to the naming method described above, and this application will not go into details here.

[0090] The file server 140 can be a file storage system, which is used to store the code package, configuration package and grayscale information content of the target application obtained according to the packaging processing method described above. It can be understood that in the initial situation, that is, when the target application development is completed and the grayscale is released for the first time, the file identifiers of various files of the target application are the same, which can be recorded as Tag1, such as v1.0. As described above, the packaging and publishing system packages the code files and configuration files of the target application, and the names of the obtained code packages and configuration packages can both be Tag1. At this time, the content of the initial grayscale information can be empty, so that the system server can pull the code files and configuration files corresponding to the Tag and load and run them accordingly, so that each production environment server can support the functions of the target application and meet the user client's access to the production environment server and the functional use requirements of the target application.

[0091] After that, if the original code files and / or configuration files of the target application need to be upgraded, it can be considered as releasing a new product, which can still be carried out according to the method described above. Therefore, taking the example that both the code files and configuration files need to be modified, Git can set a new file identifier for the updated code files and updated configuration files modified by the developer, recorded as Tag2, such as v2.0, and push the compressed package obtained by the packaging and release system to the file server after packaging and naming the updated code files and updated configuration files (that is, the name of Tag2). At this time, the content of the grayscale information can still be empty, indicating that the production environment server can pull the files in the newly constructed system activation package to load and run.

[0092] If only the configuration file needs to be updated, as analyzed above, the update configuration identifier Tag3 of the configuration file is updated, and the update configuration package named Tag3 is sent to the file server for storage. At the same time, since the configuration file of the original code file required to be loaded by the production environment server to run the target application has changed, the developer is required to configure the grayscale information that represents the update relationship. The present application can be implemented using the file identifiers of two types of files. At this time, the content of the grayscale information can be Tag1=Tag3, that is, v1.0=v3.0. The left side of the equal sign represents the update code identifier of the loaded code file, and the right side of the equal sign represents the update configuration identifier of the configuration file to be loaded.

[0093] It should be noted that when only the code needs to be updated, the implementation process is similar to the implementation process of updating the code file and the configuration file together, and this application will not be described in detail. In actual applications, when the production environment server runs the code file of the target application, it can read the grayscale information according to the preset logic at regular intervals, and pull the latest configuration file from the file server for loading and execution based on the relationship file contained in the grayscale information. The implementation process is not described in detail in this application.

[0094] It can be seen that the file server in the present application is not only used to store the content sent by the packaging and publishing system and the operation management platform, but can also respond to file pull requests from the production environment server to meet the production environment server's requirements for pulling the latest files of the target application to be loaded. The implementation process can refer to the grayscale publishing method described from the file server side in the following embodiment, and this application will not go into details here.

[0095] Combined with the above description, the present application can deploy multiple production environment servers included in the system server in different computer rooms, and each computer room can deploy at least one production environment server. In actual applications, the server organization structure of the system server can be divided into three layers, namely, physical computer rooms and / or cloud computer rooms of different enterprises, different types of clusters and different independent servers, etc., each of which can provide the functions of the target application by loading the code files and configuration files of the target application. The implementation process can refer to the grayscale release method described in the following embodiment from the production environment server side, and this application will not describe it in detail here.

[0096] Reference Figure 2 , is a flowchart of an optional example of the grayscale publishing method proposed in this application, which can be executed by the file server of the above system. Regarding the implementation of the grayscale publishing method, the execution content of other components of the system can be combined with the description of the corresponding part of the context. Figure 2 As shown, the method may include:

[0097] Step S21, obtaining at least one update file package for the target application;

[0098] Combined with the above description of the technical solution of the present application, after the client of the local device can obtain all the code files and all the configuration files of the target application from the file server, the developer can modify the code files and / or configuration files of the target application output by the client according to the actual update requirements, and obtain the updated code files and batch configuration files, which are recorded as files to be released. For the convenience of description, the present application can record the configuration files modified by the developer in the batch configuration file as the first configuration file, and record the other configuration files in the batch configuration file as the second configuration file. It can be seen that the file to be released may include a batch configuration file composed of an updated first configuration file and an unupdated second configuration file (i.e., all configuration files that support the operation of the target application), or all updated code files and batch configuration files referenced by them.

[0099] Among them, since the developer needs to update the code or configuration file to the production environment server each time he completes the modification, in order to distinguish it from the code files and configuration files before the modification, a new version number can be configured for the modified version, that is, the configuration update file identification Tag. This application does not limit the implementation method and its content.

[0100] Afterwards, the local client can send the obtained files to be released to the package release system, which packages the files to be released to obtain at least one corresponding update file package and configures the update file identifier for the corresponding files to be released. For example, the batch configuration files obtained after the update process are packaged into a compressed file, which is recorded as a configuration package; all the code files after the update process and the batch configuration files referenced by them (that is, all configuration files) are packaged into a compressed package, which is recorded as a code package (also called a system activation package), the configuration package is named the update configuration identifier of the first configuration file, and the code package is named the update code identifier of the update code file.

[0101] After the package release system obtains one or two update file packages according to the method described above, it can report the update file packages to the file server for storage, waiting for the target application's production environment server to pull the required files for operation. This application does not restrict the storage method of the update file package on the file server, which can be determined according to the situation.

[0102] Based on the above analysis, the update file package obtained by the file server is generated by packaging the files to be published after updating the code file of the target application and / or at least one first configuration file in the batch configuration file, and has an update file identifier configured for the files to be published, such as an update configuration identifier and an update code identifier.

[0103] Step S22, receiving the grayscale update information sent by the operation management platform of the target application;

[0104] Following the above analysis, in order to clarify the relationship between the developer's modification of the target application's code files and / or configuration files and the code files and configuration files of the target application previously run by the production environment server, so that when the production environment server runs the latest code of the target application, it can accurately pull the latest configuration file from the file server. The developer can log in to the operation management platform of the target application to configure the update grayscale information to indicate the production environment server that needs to update the target application, and the latest code file and the latest batch configuration file of the target application to be loaded by the production environment server. Optionally, the configuration update grayscale information may include the correspondence between the update code identifier of the latest code of the production environment server and the update configuration identifier of the latest configuration file, which can be recorded as a grayscale state relationship.

[0105] Afterwards, the file server or other devices in the system can review whether the updated grayscale information content is correct, such as reviewing whether the uploaded updated grayscale information content is correct based on the reported update file package content and its update file identifier, such as verifying whether the production environment server that needs to update the target application is correct, and whether the correspondence between the update code identifier of the latest code of the production environment server and the update configuration identifier of the latest configuration file is correct, etc. This application does not limit the audit implementation method.

[0106] Step S23, storing at least one update file package and update grayscale information;

[0107] In an embodiment of the present application, the file server serves as a file storage system and can store the updated file packages reported by the packaging and publishing system, as well as the updated grayscale information pushed by the operation management platform. For example, the received information can be allocated to the target storage space of the target application for storage. The present application does not impose any restrictions on the data storage method of the file storage system.

[0108] It can be understood that the file server stores the initial code package (which includes the initial code file and all initial configuration files) and the initial configuration file package that are first released by the target application, as well as the file identification relationship between the two and the initial grayscale information of each production server that executes the target application. The implementation process of sending these contents to the file server for storage is similar to the implementation process described in the above steps, and this application will not elaborate on it.

[0109] Step S24, receiving a file pull request for a target file to be published sent by the first production environment server;

[0110] Combined with the above description of updating the grayscale information content, for each production environment server of the target application, the production environment server where this grayscale release takes effect can be determined based on the grayscale information name configured by the developer of the target application on the operation management platform. It is recorded as the first production environment server, which can be one or more servers in one or more dimensions of the computer room, cluster and server IP. It can be determined based on actual application requirements. This application does not limit the number of the first production environment servers and the effective dimensions to which they belong.

[0111] When any production environment server of the target application executes the target application, the update grayscale information of the target application stored on the file server can be polled at regular intervals, and the name or content of the update grayscale information can be used to determine whether it belongs to the first production environment server. If it does not, the code files and configuration files of the target application before the update can still be executed to implement the original functions of the target application; if it belongs to the first production environment server, the latest code can be executed, or according to the correspondence between the update code identifier of the latest code file contained in the update grayscale information and the update configuration identifier of the latest configuration file, a file pull request for the update configuration identifier corresponding to the update code identifier of the first production server's own code can be generated to request to pull the configuration package of the latest configuration file with the update configuration identifier from the file server and then load it.

[0112] It can be seen that when the first production environment server executes the target application, it can generate a file pull request with the above content based on the content of the updated grayscale information, and send the file pull request to the file server to request to pull the latest configuration file corresponding to the code when the first production environment server executes the target application. The configuration file pulling process can be implemented according to the pre-configured processing logic that implements the pulling function. That is to say, when the first production environment server runs the code of the target application, it can perform a configuration file pulling operation on the file server according to the processing logic to ensure that the loaded configuration file is the latest configuration file of the target application. This application does not limit the configuration implementation method of the processing logic.

[0113] Step S25, in response to the file pull request, the target update file package including the requested target file to be published is sent to the first production environment server for execution.

[0114] For the file server, after receiving the file pull request sent by the first production environment server, it can parse the file pull request, and obtain the target update file identifiers such as the update configuration identifier of the latest configuration file and / or the update code identifier of the latest code file that the first production environment server wants to pull. Since each configuration package contains a configuration file with its own configuration identifier, and each code package contains a code file with a corresponding code identifier, the file server can query the configuration package with the update configuration identifier from the stored configuration packages, and send the queried configuration package to the first production environment server for execution. Similarly, the code package with the update code identifier can be queried from the stored code package and sent to the first production environment server for execution.

[0115] It should be noted that in the process of the first production environment server pulling the target update file package from the file server according to the method described above, if its updated grayscale information does not contain the correspondence between the above-mentioned code identifier and the configuration identifier (i.e., the relationship file), or the code identifier of the corresponding relationship is inconsistent with the update code identifier of the first production server's own code, it is actually not necessary to pull a separate configuration package from the file server. The configuration file in the code package where the first production environment server's own code is located can be pulled. If the code package has been obtained, the code package can be directly executed, etc. The implementation process is not limited in this application and can be determined according to the circumstances.

[0116] In summary, in an embodiment of the present application, when the code files and / or configuration files of the target application need to be modified, after the developer completes the modification, the present application will package the update files through a packaged release method, obtain the corresponding update file package and send it to the file server for storage. At the same time, the corresponding update grayscale information is configured so that the first production environment server can send a file pull request for the target file to be released to the file server accordingly. The file server directly sends the corresponding target update file package (which contains the requested target file to be released) to the first production environment server for execution. There is no need to restart the production environment server to achieve the purpose of the update file taking effect, which simplifies the development process, improves development efficiency, and reduces development costs. In addition, the present application supports the grayscale effectiveness of the update files according to each first production environment server of the target application, which improves the reliability of the grayscale modification and the system stability. The grayscale function also avoids the expansion of the impact return when a problem occurs, that is, it ensures that when an update error occurs, the original file can still be pulled for execution, so as not to affect the online service and user experience on a large scale.

[0117] Reference Figure 3, which is a signaling flow diagram of another optional example of the grayscale release method proposed in this application. This embodiment can be a detailed description of the grayscale release method described in the above embodiment, but is not limited to the detailed implementation method described in this embodiment. Figure 3 As shown, this method can:

[0118] Step S31, the file identification control system responds to the update request of the target application, updates the code file of the target application and / or at least one first configuration file in the batch configuration files, and obtains the to-be-published file of the target application;

[0119] In the actual application of this embodiment, the developer can start the client on the electronic device, log in to the file identification control system, obtain all the code files and configuration files of the target application, that is, obtain the content of the code package of the target application and output it, and then modify its code files and / or configuration files according to the update requirements of the target application. The modification process is not described in detail in this application, and the modified code files or batch configuration files are recorded as the corresponding files to be released.

[0120] The target application usually has batch configuration files. When modifying the batch configuration files, one or more of the configuration files can be modified. For the convenience of description, the modified configuration files can be recorded as the first configuration files, and the unmodified configuration files can be recorded as the second configuration files. If the file to be released is a configuration file, it contains all the updated first configuration files and all the second configuration files, that is, all the configuration files required to support the target application; if the file to be released is a code file, it can include all the modified codes and all the configuration files.

[0121] Step S32, the file identification control system configures corresponding updated file identifications for different files to be published;

[0122] Step S33, the file identification control system sends the updated file identification to the packaging and publishing system;

[0123] After completing the modification of the target application's code and / or configuration files in accordance with the method described above, it can be considered that a new version of the target application is obtained. In order to distinguish the code files and configuration files before the modification, the corresponding updated file identification Tag can be configured for the modified files to be released, such as configuring a new version number.

[0124] Step S34, the packaging and publishing system determines that the update file identifier includes the update configuration identifier, and pulls the batch configuration files corresponding to the update configuration identifier from the file identifier control system for packaging processing to obtain an update configuration package having the update configuration identifier;

[0125] Step S35, the packaging and publishing system determines that the update file identifier includes the update code identifier, and pulls all code files corresponding to the update code identifier and the batch configuration files referenced by them from the file identifier control system for packaging processing to obtain an update code package having the update code identifier;

[0126] As an automated building and deployment system, the packaging and publishing system can, after obtaining the update file identifier Tag, pull down the code files and configuration files corresponding to the Tag, and generate an update configuration package and an update code package by packaging and naming. The update configuration package can include all first configuration files and all second configuration files; the update code package can include all code files and all configuration files after the update is completed.

[0127] In the actual application of the present application, according to the method described above, in the process of putting the code of the target application online, packaging tools such as maven or ant can be used to obtain compressed packages in formats such as zip or jar, such as the above-mentioned update configuration package and update code package, but it is not limited to the packaging implementation method described in this embodiment.

[0128] It can be understood that if only at least part of the configuration files of the target application need to be modified, the update configuration identifier for identifying the updated configuration files of the target application can be determined according to the method described above, and all configuration files corresponding to the update configuration identifier, that is, all configuration files supporting the operation of the updated target application, can be packaged to obtain an update configuration package, and the name of the update configuration package can be formed by the update configuration identifier, and the update configuration package can be uploaded to the file server for storage.

[0129] If you only need to modify the code file of the target application, the processing method is similar. You can configure the corresponding update code identifier for the modified code file, package the updated code file and configuration file into an update code package, and use the update code identifier to constitute the name of the update code package. Then, upload the update code package to the file server. You can also construct the update code package and configuration package in the manner described above. This application does not impose any restrictions on this.

[0130] If both the code file and the configuration file of the target application need to be modified, the method described in this embodiment can be used to obtain an updated code package and an updated configuration package, which can be distinguished from the original code package and the original configuration package before the modification stored in the file server by including the name of the corresponding update file identifier. Step S36, the packaging and publishing system sends the obtained updated code package and updated configuration package to the file server;

[0131] Step S37, the operation management platform responds to the grayscale configuration request for the target application, and determines the update grayscale information indicating the first production environment server that needs to update the target application, and the correspondence between the update code identifier and the update configuration identifier of the latest code file of the first production environment server;

[0132] Step S38, the operation management platform sends the obtained update grayscale information of the target application to the file server;

[0133] In different modification scenarios of the target application's code files and / or configuration files, the content of the configured updated grayscale information is often different, that is, the correspondence between the code identifier used to indicate that the production environment server itself supports the latest code of the target application and the configuration identifier of the latest configuration file (that is, the grayscale status relationship) is different. The content of the updated grayscale information can be determined in combination with the method described above.

[0134] Regarding the grayscale status relationship corresponding to the developer's configuration of different production environment servers, the implementation process of building updated grayscale information is reviewed and verified by the operation and maintenance personnel. After confirming that the content and name of the updated grayscale information are correct, it is sent to the file server. The implementation process is not described in detail in this application.

[0135] Step S39, the file server stores the received update code package, update configuration package and update grayscale information;

[0136] Step S310: The first production environment server loads the code files in the update code package of the target application and generates a file pull request according to the update grayscale information;

[0137] Step S311, the first production environment server sends a file pull request to the file server;

[0138] Step S312: the file server sends the update configuration package having the update configuration identifier corresponding to the update code identifier to the first production environment server according to the file pull request;

[0139] Step S313: The first production environment server loads the update configuration file in the update configuration package and executes the business functions of the target application.

[0140] When the target application is started on the first production environment server, the latest code package stored on the file server can be loaded, and the code files contained in the latest code package can be run. During the running of the code files, the latest code files (which may be the original code files or updated code files) can be periodically pulled from the file server to run the matching configuration files based on the grayscale status relationship in the updated grayscale information. The implementation process can be combined with the embodiments described below from the system server side, and the embodiments of the present application will not be described in detail here.

[0141] In summary, in the embodiment of the present application, in the face of the need to modify batch configuration files of the target application, after completing the modification of the configuration files, the embodiment of the present application packages all configuration files of the target application into a data package and uploads it to the file server for storage. In this way, for any first production environment server that needs to update the target application, when running the target application, it can directly pull the latest configuration file required for its own code execution from the file server, thereby realizing the business functions of the target application without restarting the first production environment server. The operation is simple and efficient, and meets the different target application update requirements of different production environment servers, and realizes the flexibility and diversity of grayscale release. Even if an error occurs in an updated configuration file, the production environment server's own code can still pull the original configuration file for execution, and the client can still access other production environment servers, meeting the use requirements of the target application and ensuring online services and user experience.

[0142] Reference Figure 4 , which is a flowchart of another optional example of the grayscale release method proposed in this application. This embodiment can describe the implementation process of the method from the system server side, that is, the grayscale release method proposed in this embodiment is executed by the production environment server built for the target application, but is not limited to the implementation method described in this embodiment. Figure 4 As shown, the method may include:

[0143] Step S41, sending a grayscale publishing query request to a file server, and obtaining updated grayscale information fed back by the file server in response to the grayscale publishing query request;

[0144] Regarding the configuration implementation method for updating the grayscale information, reference may be made to the description of the corresponding part of the above embodiment, which will not be elaborated in this embodiment.

[0145] Among them, the updated grayscale information can be used to indicate the first production environment server that needs to update the target application, the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server, and the corresponding relationship between the two. For example, the file name of the updated grayscale information (such as code_config.properties, code_config-aliyun-prod1-1.1.1.1.properties, etc. listed above) can represent the effective scope of the updated file. By reading the file name of the update recovery information, the first production environment server can be determined; the content of the updated grayscale information, such as v1.0.0=v1.0.1, etc., can represent the above-mentioned grayscale state relationship, that is, when the first production environment server executes the code file in the code package with the code identifier v1.0.0, it is necessary to pull the configuration file with the configuration identifier v1.0.1 to load.

[0146] In actual applications, any production environment server on the system service side usually identifies its own computer room, cluster, and server IP, and can periodically send grayscale publishing query requests to the file server to query the updated grayscale information on the file server, such as the various .properties files listed above. For various pre-configured grayscale information, as analyzed above, this application pre-configures the file names representing the grayscale information of different effective ranges of the updated file, and can pre-configure query priorities for multiple file names. In this way, according to the query priority, it is possible to sequentially query whether the updated grayscale information of the corresponding file name is stored in the file server. If it exists, the updated grayscale information can be loaded; if it does not exist, the grayscale information of the next priority file name can be queried, and recursively. If the updated grayscale information of the preset file name is not found, the file name of the updated grayscale information can be defaulted to "code_config.properties", that is, all production environment servers of the target application are updated.

[0147] It can be seen from this that the updated grayscale information fed back by the file server can be based on the preset query priority order of the grayscale information of different file names, and the updated grayscale information of the corresponding file name can be fed back. The query implementation method for the updated grayscale information includes but is not limited to the query method described above, and can be flexibly adjusted according to actual conditions.

[0148] Step S42, determining that the application update condition is met according to the update grayscale information, and using the content of the update grayscale information to generate a file pull request for the target file to be released;

[0149] Following the above description of updating grayscale information, the present application can determine the first production environment server where the update file takes effect by updating the file name of the grayscale information. Therefore, the application update condition of this embodiment may refer to the condition that the current production environment server is within the effective range of the update file for the target application.

[0150] Therefore, for any production environment server on the system service side, it can determine whether it meets the application update conditions by reading the file name of the update grayscale information, such as determining whether the production environment server is located in the effective range of the update file corresponding to the update grayscale information based on one or more information such as the deployment location, type, and company to which it belongs. If so, it means that the production environment server belongs to the first production environment server, and when it subsequently starts the target application, it can pull the update file from the file server to load and execute; otherwise, it means that the production environment server does not belong to the first production environment server, and when it starts the target application, it can pull the configuration file from the file server to load and execute.

[0151] Based on this, as any first production environment server, by reading the content of the corresponding update grayscale information, the target update file identifier of the target file to be released of the executed target application can be determined, that is, the code file of the latest code package of the target application is loaded, and the configuration identifier corresponding to the code identifier of the code file is determined. For example, assuming that the code identifier of the original code package on the code repository is v1.0, and the configuration identifier of the original configuration package is v1.0, and the original code package is pushed to the file server, the name of the configured update grayscale information can be the code_config.properties file, and the effective scope of the update file is determined to be all production environment servers. At this time, the code files and configuration files in the code package are the latest, and the file content of the grayscale information can be empty.

[0152] Afterwards, if the code files and configuration files of the target application need to be modified, the implementation process can refer to the description of the corresponding part of the above embodiment, and this embodiment will not be described in detail here. According to the method described above, for the modified and upgraded code files and configuration files, the corresponding configuration update code identifier and update configuration identifier, that is, the latest version number Tag is v2.0, and the updated code package and updated configuration package with the data package name v2.0 are pushed to the file server. At this time, the code files and configuration files in the code package are the latest, and the file content of the grayscale information uploaded by the operation management platform can be empty. Figure 5 As shown, each production environment server determines the upgrade scenario based on the update grayscale information, and learns that the file identifiers of the code file and configuration file loaded by the target application are both v2.0.

[0153] If it is necessary to upgrade the configuration file of the target application based on v2.0, after completing the modification of the configuration file, the update configuration package obtained will have an update configuration identifier of v3.0, which will be pushed to the file server for storage. Since this upgrade requires the v2.0 code file to load the v3.0 configuration file, when configuring the corresponding update grayscale information content, the corresponding relationship can be configured as a grayscale state relationship, that is, v2.0 = v3.0, where the file identifier on the left side of the equal sign represents the code identifier of the code file, and the file identifier on the right side of the equal sign represents the configuration identifier of the configuration file. In this scenario, the code identifier of the code file of the target application loaded by the first production environment server is v2.0. Based on the queried update grayscale information content, it can be determined that the v2.0 code file corresponds to the v3.0 configuration file, that is, the target update file identifier of the target file to be released at this time refers to the target configuration identifier of the target configuration file, such as the configuration identifier v3.0 in this example.

[0154] Similarly, if you further upgrade the target application's code files and configuration files, such as Figure 5 As shown, the file identifiers of the update code package and the update configuration package are both v4.0, but the grayscale status file in the updated grayscale information is v2.0=v3.0 at this time. It is determined that the code identifier of the latest code file of the first production environment server at this time is v4.0, and it can be determined that the target file to be released of the target application is the target update code identifier and target update configuration identifier of v4.0.

[0155] It should be noted that for other application scenarios, during the upgrade and update process of code files and / or configuration files of different types of production environment servers, the implementation method of determining the target update file identifier is similar, and this application will not give detailed examples one by one.

[0156] Step S43, sending a file pull request for the target application to the file server, and pulling the target update file package from the file server;

[0157] Step S44, loading and executing the target to-be-published file in the target update file package.

[0158] When the first production environment server starts the target application, the control logic can generate a file pull request for the file to be published in real time or periodically, and send it to the file server, so as to reliably pull the latest file package of the target application from the file server. The implementation process can refer to the description of the corresponding part of the above embodiment, and this embodiment will not be repeated here.

[0159] Therefore, the target update file package in the above step S43 may include the files to be released requested to be pulled. Combined with the description of the corresponding part above, the target update file package may be a target update configuration package and / or a target update code package, etc., which can be determined based on the content of the target files to be released represented by the update grayscale information.

[0160] Reference Figure 6 , which is a flow chart of another optional example of the grayscale publishing method proposed in this application. This embodiment can still describe an optional detailed implementation process of the grayscale publishing method from the system server side, such as Figure 6 As shown, the method may include:

[0161] Step S61, sending a grayscale publishing query request to a file server, and obtaining updated grayscale information fed back by the file server in response to the grayscale publishing query request;

[0162] Step S62, determining the service address of the production environment server indicated by the name of the obtained updated grayscale information according to the indication correspondence between the grayscale information with different names and at least one production environment server supporting the target application;

[0163] Combined with the description of grayscale information in the above embodiment, the name of the grayscale information can represent the effective range of the production environment server of the target file to be released. Therefore, the name of the updated grayscale information can be compared with the preset corresponding relationship to determine the service address of the production environment server indicated by the name of the updated grayscale information. Among them, the preset corresponding relationship is a pre-defined correspondence between grayscale information with different names and each production environment server, and its content can be determined in combination with the content of the grayscale information of each name in the above embodiment. This embodiment will not be described in detail here.

[0164] In actual applications, since different production environment servers support running different applications, in order to improve processing efficiency and reduce the amount of grayscale information name comparison, the production environment servers that support the target application can be screened out from a large number of production environment servers configured in the system, and then the first production environment server corresponding to the name of the updated grayscale information can be selected from them to determine the service address of each first production environment server, but it is not limited to the first production environment server determination method described in this embodiment.

[0165] Step S63, checking whether the service address belongs to any of the determined service addresses, if not, returning to step S61, continuing to query new update grayscale information from the text server; if yes, entering step S64;

[0166] Step S64, detecting whether the updated grayscale information is the same as the original grayscale information; if yes, proceeding to step S65; if no, executing step S66;

[0167] For any production environment server, after determining the service address of the first production environment server indicated by the name of the updated grayscale information according to the method described above, it can compare its own service address with the service addresses of each first production environment server to determine whether it belongs to the first production environment server, that is, whether it meets the application update conditions. If not, continue to query new update grayscale information from the text server and process it according to the method described above; if so, determine that the code file and / or configuration file of the target application of the production environment server needs to be updated.

[0168] The update method for the target application of each first production environment server may be different. For example, the versions of the original code file and the original configuration file of the target application in different first production environment servers may be different, and the files that need to be updated may be different. Therefore, each first production environment server can determine to update the target to-be-released file of its own target application to generate a file pull request for the target to-be-released file.

[0169] In order to determine the target file to be released, combined with the above description of the grayscale information content, each first production environment server can first determine whether the updated grayscale information is the same as the original grayscale information, such as whether it is blank or contains a grayscale state relationship, whether the contained grayscale state relationship is the same, etc., thereby determining whether the target application of the first production environment server needs to be updated. If it needs to be updated, it can be further determined whether the target file to be released for update is the code file or configuration file of the target application, etc. Therefore, after comparison, it is determined that the content of the currently obtained updated grayscale information is the same as that of the original grayscale information, such as both are blank, or contain the same recovery state relationship, it can be considered that the code file and configuration of the target application of the first production environment server need to be updated and upgraded; conversely, the content of the file to be released that needs to be updated can be further determined based on the grayscale state relationship contained in the updated grayscale information.

[0170] Step S65, determining that the update code identifier is the target update file identifier of the target file to be released;

[0171] Continuing the above description, since the code package of the target application contains code files and configuration files, when the updated grayscale information of the first production environment server is the same as the content of the original grayscale information, the target to-be-released file can include the updated code file and the updated configuration file referenced by it. When the target application needs to be updated, the latest code package can be directly called for execution. Therefore, the present application can determine the updated code identifier of the target application as the target update file identifier of the target to-be-released file.

[0172] Step S66, determining that the update grayscale information includes a grayscale state relationship, and determining the update configuration identifier in the grayscale state relationship as the target update file identifier of the target file to be published;

[0173] Among them, the grayscale state relationship refers to the correspondence between the indicated production environment server (i.e., the first production environment server) having the original code identifier of the target application and the update configuration identifier of the update configuration package. From the grayscale state relationship, it can be known that the configuration file of the target application of the first production environment server needs to be updated, and the target file to be released is the configuration file included in the update configuration package of the target application, so the update configuration identifier is determined as the target update file identifier.

[0174] Step S67, generating a file pull request including a target update file identifier;

[0175] In order to ensure that the file server accurately sends the target to-be-published files in the target update file package required by each of the multiple first production environment servers, the target update file identifier corresponding to the target update file package is set in the file pull request sent by the first production environment server to the file server. It can be understood that the file pull request can also include information such as the service address of the corresponding first production environment server and the application identifier of the target application. This application does not limit the content contained in the file pull request, which can be determined according to the situation.

[0176] Step S68, sending a file pull request to the file server, and receiving a target update file package corresponding to the target update file identifier issued by the file server;

[0177] Step S69: load and execute the target to-be-published file in the target update file package.

[0178] Regarding the implementation process of how the file server sends the target to-be-published files required by each first production environment server to the corresponding first production environment server, reference may be made to the description of the corresponding part of the above embodiment, which will not be elaborated in this embodiment.

[0179] Based on the description of the above embodiments, in the above-mentioned grayscale information configuration updating process, if Figure 7As shown, the update configuration identifier corresponding to the code identifier configuration of any first production environment server can be used to obtain the grayscale status relationship of the first production environment server, determine the update grayscale information containing the grayscale status relationship and the update indication content indicating that the first production environment server updates the target application, and after being reviewed and approved by the operation and maintenance personnel, trigger the first production environment server to pull the target file to be released for execution.

[0180] During the execution of the above target file to be released, if Figure 7 As shown, whether the target application function corresponding to the target file to be released is normal can be checked to determine whether the content of the target file to be released is correct; if the target application function is abnormal, a rollback operation can be performed to restore to the state before the configuration updated the grayscale information; if the target application function is normal, the corresponding prompt information is output to prompt the developer to continue to configure the corresponding grayscale state relationship for other production environment servers, determine the corresponding updated grayscale information and report it to the file server. After verification, other production environment servers can pull the updated configuration file corresponding to their own code files from the file server based on the corresponding updated grayscale information and load and execute it.

[0181] In some other embodiments, in the scenario where the target file to be released is a code file, after verifying the target application function implemented based on the target file to be released and determining that the target application function is normal, such as Figure 8 As shown, the file server can also perform security verification on the stored corresponding target files to be released. After the security verification is passed, the target files to be released (such as the update code files contained in the update code package and the configuration files referenced by them) can be released in grayscale, so that other first production environment servers can pull the target files to be released for execution, ensuring the reliable update of the target applications of each first production environment server. Afterwards, the file server can monitor whether the log data generated by the target files to be released executed by each first production environment server is normal, thereby determining whether the target application functions corresponding to the target files to be released are normal in the applications of different first production environment servers. If normal, that is, the application of the code files to be released is monitored normally, the code files can be fully released, that is, the update code package of the target application can be fully released, so that other users can download and use the latest version of the target application.

[0182] During the above-mentioned target application function verification, target to-be-released file security verification, and normal verification of monitored application data after resumption of release, any verification result is failure / abnormal, such as Figure 8As shown, a rollback operation can be performed, that is, rolling back the code / configuration file, so that the production environment server (i.e., the first production environment server) that executes the target file to be released is restored to the state before responding to the updated grayscale information. The corresponding production environment server can restore the code file of the target application to the original code file. In this way, the first production environment server can continue to execute the target application function before this grayscale update, and will not affect the grayscale update of the target application by other first production environment servers, thereby ensuring that users can use the new functions of the target application normally through other first production environment servers to improve user experience.

[0183] Therefore, when the above-mentioned target file to be released belongs to a configuration file, that is, when at least one configuration file of the target application needs to be updated and upgraded, the target application function implemented based on the target file to be released can be verified, such as verifying whether the target application function can be executed normally, etc. If the verification passes, the corresponding grayscale indication information can be output, such as sending the grayscale indication information to the operation management platform to instruct all production environment servers that support the target application to configure the above-mentioned updated grayscale information, so that other production environment servers can load the target file to be released based on the updated grayscale information according to the method described above to achieve the grayscale update of the target application. Of course, if the above-mentioned verification fails, it can be considered that the loaded target file to be released is abnormal, resulting in the failure of the execution of the target application function, and a rollback operation can be performed to prevent the abnormality from affecting the online service and user experience of the target application on a large scale.

[0184] Reference Fig. 9 , is a schematic diagram of an optional example of a grayscale publishing device proposed in this application, and the device is described from the file server side, such as Fig. 9 As shown, the grayscale release device may include:

[0185] An update file package obtaining module 91, used to obtain at least one update file package for a target application;

[0186] The update file package is generated by packaging the files to be released after updating the code file and / or at least one first configuration file in the batch configuration file of the target application, and has an update file identifier configured for the files to be released; the files to be released include a batch configuration file consisting of the updated first configuration file and the unupdated second configuration file, or all the updated code files and the batch configuration files referenced by them.

[0187] An update grayscale information receiving module 92 is used to receive update grayscale information sent by the operation management platform of the target application;

[0188] The update grayscale information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server.

[0189] An information storage module 93, used to store the at least one update file package and the update grayscale information;

[0190] A file pull request receiving module 94, configured to receive a file pull request for a target file to be published sent by the first production environment server;

[0191] Among them, the above-mentioned file pull request can be sent based on the content of the updated grayscale information when the first production environment server executes the target application.

[0192] The file pull request response module 95 is used to respond to the file pull request and send the target update file package containing the requested target file to be published to the first production environment server for execution.

[0193] In order to trigger the update file package obtaining module 91 to obtain at least one update file package for the target application, the file identification control system and the grayscale publishing device included in the package publishing system in the grayscale publishing system may include:

[0194] A file update module, configured to respond to an update request for a target application, update a code file and / or at least one first configuration file in a batch configuration file of the target application, and obtain a to-be-published file of the target application and an update file identifier corresponding to the to-be-published file;

[0195] an update configuration package obtaining module, configured to package the batch configuration files with the update configuration identifier in the to-be-published file to obtain an update configuration package with the update configuration identifier when the update file identifier includes the update configuration identifier; the batch configuration files with the update configuration identifier include all the updated first configuration files and all the second configuration files that have not been updated;

[0196] An update code package obtaining module, for, when the update file identifier includes an update code identifier, packaging all code files with the update code identifier in the to-be-released files and the batch configuration files referenced by them, to obtain an update code package with the update code identifier;

[0197] The file package uploading module is used to upload the obtained update configuration package and / or the update code package to a file server.

[0198] In actual applications, if the at least one update file package is the update configuration package, the update grayscale information obtained by the file server may include: the original code identifier of the target application supported by the indicated production environment server (i.e., the production environment server within the effective range), and the grayscale state relationship between the original code identifier of the target application and the update configuration identifier of the update configuration package, instructing the production environment server to load the update configuration package; if the at least one update file package is the update code package, the update grayscale information is consistent with the content of the original grayscale information, such as a blank or identical grayscale state relationship, which can be used to instruct the production environment server to load the update code package. The implementation process can refer to the description of the corresponding part of the above embodiment, and this embodiment will not be described in detail here.

[0199] It should be noted that the various modules, units, etc. in the above-mentioned device embodiments can be stored in the memory as program modules, and the above-mentioned program modules stored in the memory can be executed by the processor to realize the corresponding functions, or they can be realized by combining the program model and hardware. Regarding the functions realized by each program module and its combination, as well as the technical effects achieved, reference can be made to the contents described on the corresponding device side of the above-mentioned method embodiments, which will not be repeated in this embodiment.

[0200] Reference Fig.10 , which is a structural diagram of another optional example of the grayscale publishing device proposed in this application. The device can be described from the production environment server side, such as Fig.10 As shown, the device may include:

[0201] A grayscale information obtaining module 101 is used to send a grayscale publishing query request to a file server, and obtain updated grayscale information fed back by the file server in response to the grayscale publishing query request;

[0202] In an embodiment of the present application, the above-mentioned update grayscale information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server.

[0203] A target update file identification determination module 102 is used to determine that a product update condition is met according to the update grayscale information, and to generate a file pull request for a target file to be released using the content of the update grayscale information;

[0204] Among them, the target file to be released is a batch configuration file consisting of the updated first configuration file and the unupdated second configuration file contained in the update file package, or all updated code files and the batch configuration files referenced by them. The content of the target file to be released can be determined according to scenario requirements.

[0205] A target update file package pulling module 103 is used to send a file pulling request for a target application to the file server, and pull a target update file package from the file server;

[0206] In the embodiment of the present application, the target update file package refers to the update file package corresponding to the target update file identifier carried by the file pull request.

[0207] The target to-be-published file loading module 104 is used to load and execute the target to-be-published file in the target update file package.

[0208] Optionally, the target update file identification determination module 102 may include:

[0209] A service address determination unit, configured to determine a service address of a production environment server indicated by the name of the obtained updated grayscale information according to an indication correspondence relationship between grayscale information with different names and at least one production environment server supporting the target application;

[0210] A first determining unit, configured to detect that its own service address belongs to any determined service address, and determine that the application update condition is met;

[0211] The second determining unit is configured to detect that its own service address does not belong to any of the determined service addresses, determine that the application update condition is not met, and continue to query new update grayscale information from the file server.

[0212] Optionally, the target update file identification determination module 102 may include:

[0213] A third determining unit is used to determine that the update configuration identifier in the grayscale state relationship is a target update file identifier of a target file to be released when the update grayscale information includes a grayscale state relationship between the original code identifier of the target application of the indicated production environment server and the update configuration identifier of the update configuration package, and the update grayscale information contains different contents from the original grayscale information;

[0214] The fourth determining unit is used to determine the updated code identifier as the target updated file identifier of the target file to be released when the updated grayscale information has the same content as the original grayscale information; the target file to be released includes the updated code file and the batch configuration file referenced by it;

[0215] The file pull request generating unit is used to generate a file pull request including the target update file identifier.

[0216] In some further embodiments, the grayscale publishing device on the production environment server side may further include:

[0217] A function verification module, used for verifying the target application function implemented based on the target file to be released when the running target file to be released belongs to a configuration file;

[0218] A grayscale indication information output module is used to output corresponding grayscale indication information when the function verification module passes the verification, so as to instruct all production environment servers supporting the target application to configure the updated grayscale information and load the target file to be released;

[0219] A rollback module, used for performing a rollback operation when the function verification module fails to pass the verification, so that the production environment server executing the target file to be released is restored to the state before responding to the update grayscale information;

[0220] A security verification module, used for verifying the function and security of the target application implemented based on the target file to be released when the running target file to be released is a code file;

[0221] A grayscale release module, used to grayscale release the code file if the verification of the security verification module is passed;

[0222] A full release module, used for releasing the code file in full when monitoring that the released code file is applied normally;

[0223] The recovery processing module is used to restore the code file of the target application to the original code file when the verification of the security verification module fails or the full release module monitors the application of the released code file abnormally.

[0224] It should be noted that the various modules, units, etc. in the above-mentioned device embodiments can be stored in the memory of the production environment server as program modules. The above-mentioned program modules stored in the memory can be executed by the processor to realize the corresponding functions, or they can be realized by combining the program model and hardware. Regarding the functions realized by each program module and its combination, as well as the technical effects achieved, the processing procedures described on the production environment server side of the above-mentioned embodiments can be referred to, and will not be repeated in this embodiment.

[0225] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded and executed by processors of different devices in the system to implement the steps of the grayscale release method executed by the device on this side. The specific implementation process can refer to the description of the corresponding device side of the above embodiment, which will not be repeated in this embodiment.

[0226] Finally, it should be noted that the various embodiments in this specification are described in a progressive or parallel manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the devices, systems, and servers disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0227] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design preconditions of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0228] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the core idea or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A grayscale release method, characterized in that: The method comprises: Obtaining at least one update file package for a target application; the update file package is generated by packaging the obtained files to be published after updating the code file and / or at least one first configuration file in the batch configuration file of the target application, and has an update file identifier configured for the files to be published; the files to be published include a batch configuration file consisting of the updated first configuration file and the unupdated second configuration file, or all the updated code files and the batch configuration files referenced by them; Receive update grayscale information sent by the operation management platform of the target application; the update grayscale information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server; Storing the at least one update file package and the update grayscale information; Receiving a file pull request for a target file to be released sent by the first production environment server; the file pull request is sent by the first production environment server based on the content of the updated grayscale information when executing the target application; In response to the file pull request, a target update file package including the requested target file to be published is sent to the first production environment server for execution.

2. The method according to claim 1, characterized in that The process of acquiring at least one update file package for the target application includes: In response to an update request for a target application, updating a code file and / or at least one first configuration file in a batch configuration file of the target application, and obtaining a to-be-published file of the target application and an update file identifier corresponding to the to-be-published file; If the update file identifier includes an update configuration identifier, the batch configuration files with the update configuration identifier in the to-be-published file are packaged to obtain an update configuration package with the update configuration identifier; the batch configuration files with the update configuration identifier include all updated first configuration files and all unupdated second configuration files; If the update file identifier includes an update code identifier, all code files with the update code identifier in the to-be-released file and the batch configuration files referenced by them are packaged to obtain an update code package with the update code identifier; The obtained update configuration package and / or the update code package is uploaded to a file server.

3. The method according to claim 2, characterized in that in: If the at least one update file package is the update configuration package, the update grayscale information includes a grayscale state relationship between the original code identifier of the target application of the indicated production environment server and the update configuration identifier of the update configuration package, indicating that the production environment server loads the update configuration package; If the at least one update file package is the update code package, the update grayscale information is consistent with the content of the original grayscale information, and the production environment server is instructed to load the update code package.

4. A grayscale release method, characterized in that: The method comprises: Sending a grayscale publishing query request to a file server, and obtaining updated grayscale information fed back by the file server in response to the grayscale publishing query request; the updated grayscale information is used to indicate a first production environment server that needs to update a target application, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server; Determining that the application update condition is met according to the update grayscale information, and generating a file pull request for the target file to be released using the content of the update grayscale information; wherein the target file to be released is a batch configuration file consisting of an updated first configuration file and an unupdated second configuration file contained in the update file package, or all updated code files and batch configuration files referenced by them; Sending a file pull request for the target application to the file server, and pulling a target update file package from the file server; the target update file package refers to an update file package corresponding to the target update file identifier carried in the file pull request; The target to-be-published file in the target update file package is loaded and executed.

5. The method according to claim 4, characterized in that The determining, based on the update grayscale information, that an application update condition is met includes: Determine, according to the indication correspondence between the grayscale information with different names and at least one production environment server supporting the target application, the service address of the production environment server indicated by the name of the obtained updated grayscale information; It is detected that the service address of the service belongs to any of the determined service addresses, and it is determined that the application update conditions are met; It is detected that the service address of the service itself does not belong to any of the determined service addresses, and it is determined that the application update condition is not met, and new update grayscale information continues to be queried from the file server.

6. The method according to claim 4, characterized in that The step of generating a file pull request for a target file to be published by utilizing the content of the updated grayscale information includes: If the update grayscale information includes the grayscale state relationship between the original code identifier of the target application of the indicated production environment server and the update configuration identifier of the update configuration package, and the update grayscale information contains different contents from the original grayscale information, determine that the update configuration identifier in the grayscale state relationship is the target update file identifier of the target file to be released; If the updated grayscale information is the same as the original grayscale information, the updated code identifier is determined as the target updated file identifier of the target file to be released; the target file to be released includes the updated code and the batch configuration file referenced by it; Generate a file pull request containing the target updated file identifier.

7. The method according to any one of claims 4 to 6, characterized in that: The method further comprises: If the running target file to be released is a configuration file, verifying the target application function implemented based on the target file to be released; If the verification is successful, the corresponding grayscale indication information is output to instruct all production environment servers supporting the target application to configure the updated grayscale information and load the target file to be released; If the verification fails, a rollback operation is performed to restore the production environment server executing the target file to be released to the state before responding to the update grayscale information; If the running target file to be released is a code file, verifying the function and security of the target application implemented based on the target file to be released; If all verifications are passed, the code file is released in phased mode. When the released code file is monitored to be normally applied, the code file is released in full. If the verification fails or the published code file is applied abnormally, the code file of the target application is restored to the original code file.

8. A grayscale publishing device, characterized in that: The device comprises: An update file package obtaining module, used to obtain at least one update file package for a target application; wherein the update file package is generated by packaging the obtained files to be published after updating the code file and / or at least one first configuration file in the batch configuration file of the target application, and has an update file identifier configured for the files to be published; the files to be published include a batch configuration file consisting of the updated first configuration file and the unupdated second configuration file, or all the updated code files and the batch configuration files referenced by them; An update grayscale information receiving module, used to receive update grayscale information sent by the operation management platform of the target application; wherein the update grayscale information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server; An information storage module, used for storing the at least one update file package and the update grayscale information; A file pull request receiving module, configured to receive a file pull request for a target file to be released sent by the first production environment server; the file pull request is sent by the first production environment server based on the content of the update grayscale information when executing the target application; The file pull request response module is used to respond to the file pull request and send the target update file package containing the requested target file to be published to the first production environment server for execution.

9. A grayscale publishing device, characterized in that: The device comprises: A grayscale information acquisition module is used to send a grayscale publishing query request to a file server, and obtain updated grayscale information fed back by the file server in response to the grayscale publishing query request; the updated grayscale information is used to indicate the first production environment server that needs to update the target application, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server; A target update file identification determination module is used to determine whether the product update condition is met according to the update grayscale information, and to generate a file pull request for the target file to be released using the content of the update grayscale information; wherein the target file to be released is a batch configuration file consisting of an updated first configuration file and an unupdated second configuration file contained in the update file package, or all updated code files and batch configuration files referenced by them; A target update file package pulling module is used to send a file pulling request for a target application to the file server, and pull a target update file package from the file server; the target update file package refers to an update file package corresponding to the target update file identifier carried by the file pulling request; The target to-be-published file loading module is used to load and execute the target to-be-published file in the target update file package.

10. A grayscale release system, characterized in that: The system comprises: A file identification control system, used for receiving a to-be-released file of any product sent by a client, and an updated file identification corresponding to the to-be-released file; A packaging and publishing system is used to package the files to be published and output the generated corresponding update file packages; The operation management platform is used to respond to the gray state configuration operation and output the obtained updated gray information; the updated gray information is used to indicate the first production environment server of the target application that needs to be updated, and the latest code file and the latest batch configuration file of the target application to be loaded by the first production environment server; A file server, used to implement the grayscale publishing method as claimed in claim 1; A system server is deployed with multiple production environment servers, and the production environment servers are used to implement the grayscale release method as described in claim 5.