CN-117950693-B - Application service deployment method, device, computer equipment and storage medium
Abstract
The application relates to an application service deployment method, an application service deployment device, computer equipment and a storage medium. The method comprises the steps of obtaining a plurality of service messages, a bluish green application stack and a gray application stack, dividing each service message into a plurality of message partitions, identifying asynchronous service consumption and pulled target message partitions in each service message of each message partition, carrying out consumption verification processing on each synchronous service message in the target message partition based on the bluish green application stack to obtain a first verification result of each synchronous service message, carrying out consumption verification processing on each asynchronous service message in the target message partition based on the gray application stack to obtain a second verification result of each asynchronous service message, and deploying consumption code logic of each service message to finish an application service deployment task under the condition that the first verification result and the second verification result meet system stable operation conditions. By adopting the method, the deployment stability effect of the system in asynchronous consumption logic change deployment can be improved.
Inventors
- ZHANG JIANGUO
- YUE YANAN
- CHEN ZHI
- ZHANG HE
- SUN LIN
- LI HUI
Assignees
- 中国人寿保险股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20240104
Claims (10)
- 1. An application service deployment method, the method comprising: acquiring change contents of application service deployment, and identifying a change type of each change content; Acquiring a gray application stack based on the change type of the consumption logic change and acquiring a blue-green application stack based on each change type except the change type of the consumption logic change under the condition that the change type is the consumption logic change; Responding to the message production operation of the user, acquiring each message content corresponding to each change type and consumption rule information corresponding to each message content, and taking each message content and consumption rule information corresponding to each message content as each service message; Dividing each service message into a plurality of message partitions based on the service type of each service message; For each message partition, identifying consumption rule information of each service message in the message partition, and acquiring keywords corresponding to asynchronous service consumption; The business information corresponding to the consumption rule information containing the key words in the consumption rule information is used as asynchronous business information, and the business information corresponding to the consumption rule information not containing the key words in the consumption rule information is used as synchronous business information; identifying a target message partition pulled by an asynchronous consumer; Performing consumption verification processing on each synchronous service message in the target message partition based on the blue-green application stack to obtain a first verification result of each synchronous service message, and performing consumption verification processing on each asynchronous service message in the target message partition based on the gray-scale application stack to obtain a second verification result of each asynchronous service message; And under the condition that the first verification result and the second verification result meet the stable operation condition of the system, deploying the consumption code logic of each service message in the target message partition to a blue-green application stack to complete the application service deployment task.
- 2. The method according to claim 1, wherein the performing, based on the blue-green application stack, a consumption verification process on each synchronous service message in the target message partition to obtain a first verification result of each synchronous service message includes: Based on the message content in each synchronous service message, identifying consumption logic corresponding to all synchronous service messages, and based on the consumption logic, simulating and executing the consumption process of each synchronous service message to obtain consumption log information of each synchronous service message; and identifying the running state information of each consumption log information based on the blue-green application stack, and taking the running state information of each synchronous service message as a first verification result of each synchronous service message.
- 3. The method according to claim 1, wherein said performing, based on the gray application stack, a consumption verification process on each asynchronous service message in the target message partition to obtain a second verification result of each asynchronous service message includes: respectively identifying consumption logic corresponding to consumption content of each asynchronous service message, and carrying out simulated consumption processing on the consumption content of the asynchronous service consumption based on the consumption logic of the asynchronous service consumption aiming at each asynchronous service message to obtain consumption log information corresponding to the asynchronous service consumption; And identifying logic operation information corresponding to the consumption logic of the asynchronous service consumption in the consumption log information, and taking the logic operation information of each asynchronous service consumption as a second verification result of each asynchronous service consumption.
- 4. The method of claim 1, wherein the deploying the consumption code logic of each service message in the target message partition to the blue-green application stack, before completing the application service deployment task, further comprises: For each synchronous service message, based on the running state information of the synchronous service message, identifying a first system stability in the running process of the synchronous service message, and determining that a first verification result of the synchronous service message meets a system stable running condition under the condition that the first system stability is greater than a preset stability threshold; And identifying logic operation fluency of the asynchronous service message and second system stability of the asynchronous service message in the operation process according to logic operation information of each asynchronous service message, and determining that a second verification result of the asynchronous service message meets a system stable operation condition under the condition that the logic operation fluency is greater than a preset fluency threshold and the second system stability is greater than a preset stability threshold.
- 5. An application service deployment apparatus, the apparatus comprising: The acquisition module is used for acquiring the change content of the application service deployment and identifying the change type of each change content; obtaining gray application stacks based on the change types of the change logic change and obtaining blue-green application stacks based on the change types except the change types of the change logic change when the change types are the change of the consumption logic, responding to the message production operation of a user, obtaining message contents corresponding to each change type and consumption rule information corresponding to each message content, and taking the message contents and the consumption rule information corresponding to each message content as service messages; the system comprises a message partition, an identification module, a target message partition, a synchronous service message, a message processing module and a message processing module, wherein the message partition is used for receiving the message, the identification module is used for identifying consumption rule information of each service message in the message partition and acquiring keywords corresponding to asynchronous service consumption for each message partition; The verification module is used for carrying out consumption verification processing on each synchronous service message in the target message partition based on the blue-green application stack to obtain a first verification result of each synchronous service message, and carrying out consumption verification processing on each asynchronous service message in the target message partition based on the gray-scale application stack to obtain a second verification result of each asynchronous service message; And the deployment module is used for deploying the consumption code logic of each service message in the target message partition to a blue-green application stack to complete an application service deployment task under the condition that the first verification result and the second verification result meet the system stable operation condition.
- 6. The apparatus of claim 5, wherein the verification module is specifically configured to: Based on the message content in each synchronous service message, identifying consumption logic corresponding to all synchronous service messages, and based on the consumption logic, simulating and executing the consumption process of each synchronous service message to obtain consumption log information of each synchronous service message; and identifying the running state information of each consumption log information based on the blue-green application stack, and taking the running state information of each synchronous service message as a first verification result of each synchronous service message.
- 7. The apparatus of claim 5, wherein the verification module is specifically configured to: respectively identifying consumption logic corresponding to consumption content of each asynchronous service message, and carrying out simulated consumption processing on the consumption content of the asynchronous service consumption based on the consumption logic of the asynchronous service consumption aiming at each asynchronous service message to obtain consumption log information corresponding to the asynchronous service consumption; And identifying logic operation information corresponding to the consumption logic of the asynchronous service consumption in the consumption log information, and taking the logic operation information of each asynchronous service consumption as a second verification result of each asynchronous service consumption.
- 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 4 when the computer program is executed.
- 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 4.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any of claims 1 to 4.
Description
Application service deployment method, device, computer equipment and storage medium Technical Field The present application relates to the field of software deployment and release technologies, and in particular, to an application service deployment method, an application service deployment device, a computer device, and a storage medium. Background The technical scheme belongs to the field of high availability of mobile internet service. A loop is indispensable in the production process of internet software, namely deployment and release. By deploying the codes in a specific environment and then releasing new functions to the outside, the deployment mode is continuously evolving as the support of user experience is improved and the service is required to be provided for continuous service for 7 x 24 hours. And the stability and continuity of the system can be affected by continuous deployment and release. It is therefore a current focus of research how to promote system stability under continuous deployment conditions. In the traditional technical scheme, the application service can transmit a special tag to carry out a blue-green deployment mode by calling an interface in the deployment and release process, so that the application always provides service to the outside, and the stability of the system is ensured. However, due to the operation mechanism of asynchronous consumption, the service message of asynchronous consumption cannot be split from the message partition of the micro-service, and when the consumption code logic of the service message is adjusted, the existing micro-service blue-green deployment mode cannot verify the new consumption logic, so that the deployment stability of the asynchronous consumption logic change deployment of the system is poor. Disclosure of Invention In view of the foregoing, it is desirable to provide an application service deployment method, apparatus, computer device, computer readable storage medium, and computer program product. In a first aspect, the present application provides an application service deployment method. The method comprises the following steps: acquiring a plurality of service messages, a blue-green application stack and a gray application stack, and dividing each service message into a plurality of message partitions based on the service type of each service message; Identifying asynchronous service consumption in each service message of each message partition, and identifying a target message partition pulled by an asynchronous consumer; Performing consumption verification processing on each synchronous service message in the target message partition based on the blue-green application stack to obtain a first verification result of each synchronous service message, and performing consumption verification processing on each asynchronous service message in the target message partition based on the gray-scale application stack to obtain a second verification result of each asynchronous service message; And under the condition that the first verification result and the second verification result meet the stable operation condition of the system, deploying the consumption code logic of each service message in the target message partition to a blue-green application stack to complete the application service deployment task. Optionally, the acquiring the plurality of service messages, the blue-green application stack, and the gray application stack includes: acquiring change contents of application service deployment, and identifying a change type of each change content; Acquiring a gray application stack based on the change type of the consumption logic change and acquiring a blue-green application stack based on each change type except the change type of the consumption logic change under the condition that the change type is the consumption logic change; And responding to the message production operation of the user, acquiring each message content corresponding to each change type and consumption rule information corresponding to each message content, and taking each message content and consumption rule information corresponding to each message content as each service message. Optionally, the identifying asynchronous service consumption in each service message of each message partition includes: For each message partition, identifying consumption rule information of each service message in the message partition, and acquiring keywords corresponding to asynchronous service consumption; And taking the business message corresponding to the consumption rule information containing the key words in the consumption rule information as an asynchronous business message, and taking the business message corresponding to the consumption rule information not containing the key words in the consumption rule information as a synchronous business message. Optionally, the performing, based on the blue-green application stack, consumption verification processing