CN-113364627-B - Gray scale release method and device
Abstract
The embodiment of the invention provides a gray level release method and device, wherein the method comprises the steps that a client receives a configuration query request sent by a server, the client is applied to a service system, reads first source configuration data from a source configuration file of the service system according to the configuration query request and sends the first source configuration data to the server, the client receives target configuration data updated by the server based on the first source configuration data and updates the target configuration data to a gray level release file of the service system, the client receives a gray level release instruction sent by the server, writes gray level release control data into the control file according to the gray level release instruction, and applies the gray level release file to the service system through the control file. The method can automatically complete the gray level release of the configuration data, is convenient for the service party to maintain the configuration data, and can also carry out gray level release in the database and non-database environments.
Inventors
- ZHANG FUGUO
Assignees
- 深圳前海微众银行股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20210609
Claims (8)
- 1. A gray scale distribution method, characterized in that the method comprises: The client receives a configuration query request sent by the server, wherein the client is applied to a service system; the client reads first source configuration data from a source configuration file of the service system according to the configuration query request, and sends the first source configuration data to the server; The client receives target configuration data updated by the server based on the first source configuration data and updates the target configuration data into a gray level release file of the service system; The client receives a gray release instruction sent by the server, writes gray release control data into a control file according to the gray release instruction, determines that the IP address of the client belongs to an IP address set in the gray release instruction through the control file, loads the gray release file into a cache, and enables the gray release file to be effective in the cache in a hot effective annotation mode; the gray release file is applied to the service system through the control file; After restarting the service system, the client determines whether the control file contains the IP of the client, if so, the gray release file is applied to the service system, and if not, the source configuration file is applied to the service system.
- 2. The method as claimed in claim 1, wherein said applying said gray scale distribution file to said business system via said control file comprises: The client generates a release response message based on the control file and sends the release response message to the server; And the client updates the gray level release file into the source configuration file based on a cut-back instruction sent by the server, wherein the cut-back instruction is sent after the server verifies the release response message.
- 3. The method as recited in claim 2, further comprising, after updating the grayscale distribution file into the source configuration file: And after the client determines that the source configuration file is consistent with the gray release file, generating a cut-back response message based on the source configuration file, and clearing gray release control data in the control file.
- 4. The method of claim 1, wherein prior to updating the target configuration data into the gray scale release file of the business system, further comprising: The client receives second source configuration data sent by the server, determines that the second source configuration data is consistent with third source configuration data in the source configuration file, and determines that the source configuration file is consistent with the gray release file.
- 5. The method according to any one of claims 1 to 4, wherein before the client writes the gray level distribution control data into the control file of the service system according to the gray level distribution instruction sent by the server, the method further comprises: The client generates a configuration response message based on the target configuration data and sends the configuration response message to the server, and the gray level issuing instruction is sent after the server verifies the configuration response message.
- 6. The method of any of claims 1-4, wherein the source configuration file and the grayscale distribution file have a comment function for adding comment information and description information of configuration parameters and a data sequence writing function for sequentially writing comments and configuration data in the target configuration data into the grayscale distribution file.
- 7. A gradation issuing apparatus, characterized in that the apparatus comprises: The receiving module is used for receiving a configuration query request sent by the server side; the processing module is used for reading first source configuration data from a source configuration file of the service system according to the configuration query request and sending the first source configuration data to the server through the sending module; The receiving module is further used for receiving target configuration data updated by the server based on the first source configuration data, and updating the target configuration data into a gray level release file of the service system through the processing module; The receiving module is further configured to receive a gray release instruction sent by the server, write gray release control data into a control file according to the gray release instruction through the processing module, and if the client determines that an IP address of the client belongs to an IP address set in the gray release instruction through the control file, load the gray release file into a cache, and enable the gray release file to take effect in the cache in a thermal effect annotation mode; the gray release file is applied to the service system through the control file; After restarting the service system, the client determines whether the control file contains the IP of the client, if so, the gray release file is applied to the service system, and if not, the source configuration file is applied to the service system.
- 8. A computing device, comprising: A memory for storing program instructions; A processor for invoking program instructions stored in said memory to perform the method of any of claims 1 to 6 in accordance with the obtained program.
Description
Gray scale release method and device Technical Field The invention relates to the technical field of networks of financial science and technology (Fintech), in particular to a gray level publishing method and device. Background In recent years, with the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changed to the financial technology (Fintech), but due to the requirements of safety and real-time performance of the financial industry, higher requirements are also put on the technologies. For example, companies in the financial industry now have their own business systems to implement efficient processing of businesses under conditions of high security, high real-time performance, and the like through network technologies. However, due to the change of the service requirement, the configuration parameters of the service system also need to be updated correspondingly. Generally, in the prior art, the gray level distribution mode of the configuration parameters of the service system is that a worker maintains the configuration parameters of each version and sets the configuration parameters in an independent device-configuration center outside the service system. When the configuration parameters in the service system need to be updated, a worker derives the configuration parameters of the corresponding version from the configuration center, manually sets the configuration parameters to an automatic release platform, and the automatic release platform sends the configuration parameters to databases of all clients of the service system to release gray scales depending on the databases. The method can improve the safety and the real-time performance of service processing, but the gray level release of the configuration parameters of the service system still needs to be manually released, the gray level release can only be carried out in a database environment, but cannot be carried out in a non-database environment, and in addition, the consistency control of the configuration parameters by a service party is not facilitated because the configuration parameters are maintained in a configuration center and the service system respectively. Therefore, a gray level distribution method and device are needed, which can automatically complete gray level distribution of configuration data, facilitate maintenance of the configuration data by business parties, and perform gray level distribution in database and non-database environments. Disclosure of Invention The embodiment of the invention provides a gray level release method and a gray level release device, which can automatically complete gray level release of configuration data, facilitate maintenance of the configuration data by a business party and can also perform gray level release in database and non-database environments. In a first aspect, an embodiment of the present invention provides a gray scale distribution method, including: The method comprises the steps that a client receives a configuration query request sent by a service end, the client is applied to a service system, the client reads first source configuration data from a source configuration file of the service system according to the configuration query request and sends the first source configuration data to the service end, the client receives target configuration data updated by the service end based on the first source configuration data and updates the target configuration data to a gray release file of the service system, the client receives a gray release instruction sent by the service end, writes gray release control data into a control file according to the gray release instruction, and applies the gray release file to the service system through the control file. The method comprises the steps that a client receives a configuration query request to read first source configuration data from a source configuration file of a service system, acquires updated target configuration data according to the first source configuration data, and updates the target configuration data into a gray level release file of the service system through a gray level release instruction. After receiving the gray level issuing instruction, the client side writes gray level issuing control data into a control file, and applies the gray level issuing file to the service system through the control file. Compared with manual configuration data gray level release in the prior art, the automatic configuration data gray level release method can realize automatic configuration data gray level release, and can realize configuration data consistency maintenance by only storing configuration data at a client, namely, only storing configuration data at a service side, and can carry out gray level release in the environments of a database and a non-database independently of the database environment. Optionally, the method