Application service deployment method and apparatus, computer device, and storage medium

By partitioning messages in microservice deployments and using blue-green and canary application stacks for verification, the problem of asynchronous consumption not being recognized in the blue-green deployment mode of microservices is solved, and the stability of the system is improved when asynchronous consumption logic is changed and deployed.

CN117950693BActive Publication Date: 2026-05-08CHINA LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA LIFE INSURANCE CO LTD
Filing Date
2024-01-04
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

The existing microservice blue-green deployment model cannot effectively verify changes in asynchronous consumption logic, resulting in poor system stability when deploying asynchronous consumption logic changes.

Method used

By dividing business messages into multiple message partitions, identifying asynchronous and synchronous business consumption, and using blue-green application stacks and canary application stacks for verification processing respectively, deployment is carried out only after the verification results meet the conditions for stable system operation.

Benefits of technology

It improves the accuracy of verification for asynchronous business messages and changes in consumption code logic during application service deployment, and comprehensively enhances the stability of the system during asynchronous consumption logic changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117950693B_ABST
    Figure CN117950693B_ABST
Patent Text Reader

Abstract

The application relates to an application service deployment method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a plurality of service messages, a blue-green application stack and a gray application stack, and dividing the service messages into a plurality of message partitions; identifying asynchronous service consumption and a target message partition of pulled target messages in each service message of each message partition; 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 application stack to obtain a second verification result of each asynchronous service message; and deploying consumption code logic of each service message to complete an application service deployment task in the case that the first verification result and the second verification result both satisfy system stable operation conditions. The method can improve the deployment stability effect of the system in asynchronous consumption logic change deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of software deployment and release technology, and in particular to an application service deployment method, apparatus, computer equipment, and storage medium. Background Technology

[0002] This technical solution falls under the category of high availability in mobile internet services. Deployment and release are essential steps in the production process of internet software. By deploying code in a specific environment and then releasing new features to users, and as user experience improves, the demand for 24 / 7 uninterrupted service grows, leading to continuous evolution in deployment methods. However, continuous deployment and release can impact system stability and continuity. Therefore, improving system stability under continuous deployment conditions is a current research focus.

[0003] In traditional technical solutions, application services use a blue-green deployment pattern by passing special tags when calling interfaces during deployment and release. This ensures that the application continuously provides services and guarantees system stability. However, due to the asynchronous consumption mechanism, asynchronously consumed business messages cannot be separated from the message partitions of microservices. When the logic for consuming business messages is adjusted, the existing microservice blue-green deployment pattern cannot verify the new consumption logic, resulting in poor deployment stability when the asynchronous consumption logic is changed. Summary of the Invention

[0004] Therefore, it is necessary to provide an application service deployment method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems.

[0005] Firstly, this application provides an application service deployment method. The method includes:

[0006] Obtain multiple business messages, blue-green application stacks, and gray-scale application stacks, and divide each business message into multiple message partitions based on the business type of each business message;

[0007] Identify asynchronous business consumption in each business message of each message partition, and identify the target message partition pulled by the asynchronous consumer;

[0008] Based on the blue-green application stack, each synchronous business message in the target message partition is consumed and verified to obtain a first verification result for each synchronous business message. Based on the gray application stack, each asynchronous business message in the target message partition is consumed and verified to obtain a second verification result for each asynchronous business message.

[0009] If both the first verification result and the second verification result meet the conditions for stable system operation, the consumption code logic of each business message in the target message partition is deployed to the blue-green application stack to complete the application service deployment task.

[0010] Optionally, obtaining multiple business messages, blue-green application stacks, and gray-scale application stacks includes:

[0011] Obtain changes to the application service deployment and identify the type of change for each change;

[0012] In the case of a change type of consumption logic change, a grayscale application stack is obtained based on the change type of the consumption logic change, and a blue-green application stack is obtained based on each change type other than the change type of the consumption logic change.

[0013] In response to the user's message production operation, obtain the message content corresponding to each change type and the consumption rule information corresponding to each message content, and use each message content and the consumption rule information corresponding to each message content as each business message.

[0014] Optionally, identifying asynchronous business consumption in each business message of each message partition includes:

[0015] For each message partition, identify the consumption rule information of each business message in the message partition, and obtain the keywords corresponding to asynchronous business consumption;

[0016] The business messages corresponding to the consumption rule information that contains the keyword are treated as asynchronous business messages, while the business messages corresponding to the consumption rule information that does not contain the keyword are treated as synchronous business messages.

[0017] Optionally, the step of consuming and verifying each synchronous business message in the target message partition based on the blue-green application stack to obtain a first verification result for each synchronous business message includes:

[0018] Based on the message content in each synchronous business message, identify the consumption logic corresponding to all synchronous business messages, and based on the consumption logic, simulate the consumption process of each synchronous business message to obtain the consumption log information of each synchronous business message.

[0019] Based on the blue-green application stack, the running status information of each of the consumption log information is identified, and the running status information of each of the synchronization business messages is used as the first verification result of each of the synchronization business messages.

[0020] Optionally, the step of consuming and verifying each asynchronous business message in the target message partition based on the grayscale application stack to obtain a second verification result for each asynchronous business message includes:

[0021] The consumption logic corresponding to the consumption content of each asynchronous business message is identified, and for each asynchronous business message, based on the consumption logic of the asynchronous business consumption, the consumption content of the asynchronous business consumption is simulated and processed to obtain the consumption log information corresponding to the asynchronous business consumption.

[0022] Identify the logic execution information corresponding to the consumption logic of the asynchronous business consumption in the consumption log information, and use the logic execution information of each asynchronous business consumption as the second verification result of each asynchronous business consumption.

[0023] Optionally, before deploying the consumption code logic of each business message in the target message partition to the blue-green application stack to complete the application service deployment task, the method further includes:

[0024] For each synchronous service message, based on the running status information of the synchronous service message, the first system stability during the running process of the synchronous service message is identified, and if the first system stability is greater than a preset stability threshold, the first verification result of the synchronous service message is determined to meet the system stable operation conditions.

[0025] For each asynchronous business message, based on the logical operation information of the asynchronous business message, the logical operation smoothness of the asynchronous business message and the second system stability of the asynchronous business message during operation are identified. If the logical operation smoothness is greater than a preset smoothness threshold and the second system stability is greater than a preset stability threshold, the second verification result of the asynchronous business message is determined to meet the system stable operation conditions.

[0026] Secondly, this application also provides an application service deployment apparatus. The apparatus includes:

[0027] The acquisition module is used to acquire multiple business messages, blue-green application stacks, and gray-scale application stacks, and divide each business message into multiple message partitions based on the business type of each business message;

[0028] The identification module is used to identify asynchronous business consumption in each business message of each message partition, and to identify the target message partition pulled by the asynchronous consumer.

[0029] The verification module is used to perform consumption verification processing on each synchronous business message in the target message partition based on the blue-green application stack to obtain a first verification result for each synchronous business message, and to perform consumption verification processing on each asynchronous business message in the target message partition based on the gray application stack to obtain a second verification result for each asynchronous business message.

[0030] The deployment module is used to deploy the consumption code logic of each business message in the target message partition to the blue-green application stack, and complete the application service deployment task, provided that both the first verification result and the second verification result meet the conditions for stable system operation.

[0031] Optionally, the acquisition module is specifically used for:

[0032] Obtain changes to the application service deployment and identify the type of change for each change;

[0033] In the case of a change type of consumption logic change, a grayscale application stack is obtained based on the change type of the consumption logic change, and a blue-green application stack is obtained based on each change type other than the change type of the consumption logic change.

[0034] In response to the user's message production operation, obtain the message content corresponding to each change type and the consumption rule information corresponding to each message content, and use each message content and the consumption rule information corresponding to each message content as each business message.

[0035] Optionally, the identification module is specifically used for:

[0036] For each message partition, identify the consumption rule information of each business message in the message partition, and obtain the keywords corresponding to asynchronous business consumption;

[0037] The business messages corresponding to the consumption rule information that contains the keyword are treated as asynchronous business messages, while the business messages corresponding to the consumption rule information that does not contain the keyword are treated as synchronous business messages.

[0038] Optionally, the verification module is specifically used for:

[0039] Based on the message content in each synchronous business message, identify the consumption logic corresponding to all synchronous business messages, and based on the consumption logic, simulate the consumption process of each synchronous business message to obtain the consumption log information of each synchronous business message.

[0040] Based on the blue-green application stack, the running status information of each of the consumption log information is identified, and the running status information of each of the synchronization business messages is used as the first verification result of each of the synchronization business messages.

[0041] Optionally, the verification module is specifically used for:

[0042] The consumption logic corresponding to the consumption content of each asynchronous business message is identified, and for each asynchronous business message, based on the consumption logic of the asynchronous business consumption, the consumption content of the asynchronous business consumption is simulated and processed to obtain the consumption log information corresponding to the asynchronous business consumption.

[0043] Identify the logic execution information corresponding to the consumption logic of the asynchronous business consumption in the consumption log information, and use the logic execution information of each asynchronous business consumption as the second verification result of each asynchronous business consumption.

[0044] Optionally, the device further includes:

[0045] The first determining module is used to identify the first system stability during the operation of each synchronous service message based on the running status information of the synchronous service message, and determine that the first verification result of the synchronous service message meets the system stable operation conditions if the first system stability is greater than a preset stability threshold.

[0046] The second determining module is used to identify the logical operation smoothness of the asynchronous business message and the second system stability of the asynchronous business message during operation, based on the logical operation information of the asynchronous business message, for each asynchronous business message, and determine that the second verification result of the asynchronous business message meets the system stable operation conditions when the logical operation smoothness is greater than a preset smoothness threshold and the second system stability is greater than a preset stability threshold.

[0047] Thirdly, this application provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described in any one of the first aspects.

[0048] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0049] Fifthly, this application provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0050] The aforementioned application service deployment method, apparatus, computer equipment, and storage medium acquire multiple business messages, a blue-green application stack, and a gray-scale application stack. Based on the business type of each business message, the business messages are divided into multiple message partitions. Asynchronous business consumption in each business message of each message partition is identified, and the target message partition pulled by the asynchronous consumer is identified. Based on the blue-green application stack, the consumption verification processing of each synchronous business message in the target message partition is performed to obtain a first verification result for each synchronous business message. Based on the gray-scale application stack, the consumption verification processing of each asynchronous business message in the target message partition is performed to obtain a second verification result for each asynchronous business message. When both the first verification result and the second verification result meet the system's stable operating conditions, the consumption code logic of each business message in the target message partition is deployed to the blue-green application stack to complete the application service deployment task. This solution identifies synchronous and asynchronous business messages within the target message partition. It then verifies synchronous business messages using a blue-green application stack and asynchronous business messages using a canary application stack. This avoids the problems of the blue-green deployment mode failing to recognize asynchronously consumed business messages and failing to logically verify the consumption logic of business messages. By adding a canary deployment mode corresponding to the canary application stack while maintaining the blue-green deployment mode, the accuracy of verifying asynchronous business messages and changes in consumption logic during application service deployment is improved. This comprehensively enhances the system's deployment stability when asynchronous consumption logic changes are deployed. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating an application service deployment method in one embodiment;

[0052] Figure 2 This is a flowchart illustrating an application service deployment example in one embodiment;

[0053] Figure 3 This is a structural block diagram of an application service deployment device in one embodiment;

[0054] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0056] The application service deployment method provided in this application embodiment can be applied to the application environment of application service deployment. This method can be applied to terminals, servers, and systems including terminals and servers, and is implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. The terminal identifies synchronous and asynchronous business messages in the target message partition, and verifies synchronous business messages through a blue-green application stack and asynchronous business messages through a gray-scale application stack. This avoids the problems of the blue-green deployment mode corresponding to the blue-green application stack being unable to identify asynchronously consumed business messages and unable to logically verify the consumption code logic of business messages. By adding a gray-scale deployment mode corresponding to the gray-scale application stack while maintaining the blue-green deployment mode, the verification accuracy of asynchronous business messages and changes in consumption code logic during application service deployment is improved, thereby comprehensively improving the deployment stability of the system when asynchronous consumption logic changes occur.

[0057] In one embodiment, such as Figure 1 As shown, an application service deployment method is provided, which is illustrated by applying the method to a terminal, including the following steps:

[0058] Step S101: Obtain multiple business messages, blue-green application stacks, and gray-scale application stacks, and divide each business message into multiple message partitions based on the business type of each business message.

[0059] In this embodiment, the terminal obtains business messages containing changes to the application service transmitted from an external system. Each business message corresponds to a consumption message and a consumption rule. Then, the terminal obtains the blue-green application stack based on the blue-green deployment strategy and the gray-scale application stack corresponding to the gray-scale deployment strategy. The blue-green application stack and the gray-scale application stack are used to verify whether the message content of the business messages meets the conditions for stable system operation. The specific verification process will be described in detail later. Then, based on the message topic (i.e., the business type mentioned above) to which each business message belongs, the terminal divides each business message into multiple partitions, resulting in multiple message partitions. The partitioning process of the business messages is the same as the partitioning process of message information in Kafka, which is classified, organized, and managed according to topic, and will not be described in detail here. The blue-green application stack includes a blue application stack and a green application stack.

[0060] Step S102: Identify asynchronous business consumption in each business message of each message partition, and identify the target message partition pulled by the asynchronous consumer.

[0061] In this embodiment, the terminal identifies asynchronous business consumption within each business message of each message partition and identifies the target message partition pulled by the asynchronous consumer. Asynchronous business consumption information refers to consumption information between other systems, while synchronous business consumption information refers to consumption information within the same system. Then, the terminal obtains the target message partition pulled by the asynchronous consumer by responding to the pull-and-consume operation of each consumption partition by the asynchronous consumer (i.e., the other system corresponding to the asynchronous business consumption information). Each message partition includes business messages corresponding to the asynchronous business consumption information and business messages corresponding to the synchronous business consumption information.

[0062] Step S103: Based on the blue-green application stack, perform consumption verification processing on each synchronous business message in the target message partition to obtain the first verification result of each synchronous business message; and based on the gray application stack, perform consumption verification processing on each asynchronous business message in the target message partition to obtain the second verification result of each asynchronous business message.

[0063] In this embodiment, the terminal performs consumption verification processing on each synchronous business message in the target message partition based on the blue-green application stack, obtaining a first verification result for each synchronous business message. Then, it performs consumption verification processing on each asynchronous business message in the target message partition based on the gray-scale application stack, obtaining a second verification result for each asynchronous business message. The consumption verification process for synchronous business messages simulates the consumption process of synchronous business messages to identify the impact of synchronous business messages on system stability. The consumption verification process for asynchronous business messages simulates the consumption process of asynchronous business messages to identify the execution of the asynchronous business message consumption code logic and the impact of asynchronous messages on system stability. The specific verification process will be explained in detail later. The consumption logic for synchronous business messages is the same, while the consumption logic for asynchronous business messages is different.

[0064] Step S104: If both the first verification result and the second verification result meet the conditions for stable system operation, the consumption code logic of each business message in the target message partition is deployed to the blue-green application stack to complete the application service deployment task.

[0065] In this embodiment, if both the first and second verification results meet the system's stable operation conditions, the terminal deploys the consumption code logic for each business message in the target message partition to the blue-green application stack, completing the application service deployment task. The system's stable operation conditions vary depending on the verification results; the specific determination process will be explained in detail later. If both the first and second verification results meet the system's stable operation conditions, the terminal deploys the consumption logic for the consumption information corresponding to each asynchronous business message, as well as the consumption logic for the consumption information corresponding to each synchronous business message, to the application service, completing the application service deployment task.

[0066] Based on the above solution, by identifying synchronous and asynchronous business messages in the target message partition, synchronous business messages are verified through the blue-green application stack, and asynchronous business messages are verified through the canary application stack. This avoids the problems that the blue-green deployment mode corresponding to the blue-green application stack cannot identify asynchronously consumed business messages, and the blue-green deployment mode corresponding to the blue-green application stack cannot perform logical verification of the consumption code logic of business messages. By adding the canary deployment mode corresponding to the canary application stack while maintaining the blue-green deployment mode, the verification accuracy of asynchronous business messages and changes in consumption code logic during the application service deployment process is improved, thereby comprehensively improving the deployment stability of the system when asynchronous consumption logic changes are deployed.

[0067] Optionally, multiple business messages, blue-green application stacks, and canary application stacks can be obtained, including: obtaining the changes in application service deployment and identifying the change type of each change; if there is a change type of consumption logic change, obtaining the canary application stack based on the change type of consumption logic change, and obtaining the blue-green application stack based on each change type other than the change type of consumption logic change; in response to the user's message production operation, obtaining each message content corresponding to each change type and the consumption rule information corresponding to each message content, and using each message content and the consumption rule information corresponding to each message content as each business message.

[0068] In this embodiment, the terminal responds to the user's application service change operation by obtaining the changed content of the application service deployment uploaded by the user and identifying the change type of each change. These change types include port adjustments and consumption logic changes, among others. Then, when a consumption logic change exists, the terminal obtains a grayscale application stack based on that change type and a blue-green application stack based on all other change types. The grayscale application stack is used to verify business messages related to consumption logic changes. The blue-green application stack is used to verify business messages other than those related to consumption logic changes.

[0069] Then, in response to the user's message production operation, the terminal obtains the message content corresponding to each change type and the consumption rule information corresponding to each message content, and uses each message content and the consumption rule information corresponding to each message content as each business message.

[0070] Based on the above solution, the decision to add a canary application stack is made based on the type of consumption change, thereby improving the intelligence of adding a canary application stack.

[0071] Optionally, identifying asynchronous business consumption in each business message of each message partition includes: for each message partition, identifying the consumption rule information of each business message in the message partition, and obtaining the keyword corresponding to the asynchronous business consumption; taking the business messages corresponding to the consumption rule information containing the keyword as asynchronous business messages, and taking the business messages corresponding to the consumption rule information not containing the keyword as synchronous business messages.

[0072] In this embodiment, the terminal identifies the consumption rule information for each business message in each message partition. The consumption rule information is the content of the consumption rule code in the code corresponding to the business message. Then, the terminal obtains the keyword corresponding to asynchronous business consumption, where the keyword is preset in the terminal. The terminal classifies the business messages corresponding to consumption rule information containing the first keyword as asynchronous business messages, and the business messages corresponding to consumption rule information containing the second keyword as synchronous business messages. Specifically, the keyword identification process is as follows: if the consumption rule code `if(env={blue||green})&msg` does not contain the keyword, it is a synchronous business message. If the consumption rule code `if(env={gray})&msg` contains the keyword, it is an asynchronous business message.

[0073] Based on the above solution, asynchronous business messages are filtered by identifying whether they contain keywords in the consumption rule information corresponding to the asynchronous business messages, thereby improving the efficiency and accuracy of asynchronous business message filtering.

[0074] Optionally, based on the blue-green application stack, consumption verification processing is performed on each synchronous business message in the target message partition to obtain the first verification result of each synchronous business message, including: based on the message content in each synchronous business message, identifying the consumption logic corresponding to all synchronous business messages, and based on the consumption logic, simulating the execution of the consumption process of each synchronous business message to obtain the consumption log information of each synchronous business message; based on the blue-green application stack, identifying the running status information of each consumption log information, and using the running status information of each synchronous business message as the first verification result of each synchronous business message.

[0075] In this embodiment, the terminal identifies the consumption logic corresponding to all synchronous business messages based on the message content in each synchronous business message, and simulates the consumption process of each synchronous business message based on the consumption logic to obtain consumption log information for each synchronous business message. The consumption log information represents the execution process of the message content corresponding to the synchronous business message during the simulation. Based on the blue-green application stack, the terminal identifies the running status information of each consumption log information and uses the running status information of each synchronous business message as the first verification result for each synchronous business message. The running status information characterizes the degree of system operation fluctuation during the execution of the business message.

[0076] The process of obtaining the first verification result involves the blue-green deployment strategy verifying each message before the application service is deployed. This solution will not elaborate on this process. Since the consumption logic for synchronous business messages is the same and no changes have been made to the consumption logic, the first verification result only contains the runtime status information of each synchronous business message.

[0077] Based on the above scheme, by identifying the blocking application stack to verify the consumption log information of each synchronous business message, the first verification result of each synchronous business message is obtained, thereby improving the verification accuracy of synchronous business messages.

[0078] Optionally, based on the grayscale application stack, consumption verification processing is performed on each asynchronous business message in the target message partition to obtain a second verification result for each asynchronous business message. This includes: identifying the consumption logic corresponding to the consumption content of each asynchronous business message, and for each asynchronous business message, simulating consumption processing on the consumption content of the asynchronous business consumption based on the consumption logic of the asynchronous business consumption to obtain consumption log information corresponding to the asynchronous business consumption; identifying the logic execution information corresponding to the consumption logic of the asynchronous business consumption in the consumption log information, and using the logic execution information of each asynchronous business consumption as the second verification result for each asynchronous business consumption.

[0079] In this embodiment, the terminal identifies the consumption logic corresponding to the consumption content of each asynchronous service message. For each asynchronous service message, based on the consumption logic, it simulates the consumption of the asynchronous service content to obtain consumption log information corresponding to the asynchronous service consumption. Then, the terminal identifies the logic execution information corresponding to the consumption logic of the asynchronous service in the consumption log information and uses the logic execution information of each asynchronous service consumption as the second verification result for each asynchronous service consumption. The consumption logic of asynchronous services can change, therefore the consumption logic of each asynchronous service consumption is different. The logic execution information includes the running state of the consumption logic and the degree of fluctuation in the system running state.

[0080] Based on the above scheme, by simulating and processing different asynchronous business consumption separately, the accuracy of identifying the logical operation information of asynchronous business consumption is improved.

[0081] Optionally, before deploying the consumption code logic of each business message in the target message partition to the blue-green application stack and completing the application service deployment task, the following steps are also included: for each synchronous business message, based on the running status information of the synchronous business message, identifying the first system stability during the running process of the synchronous business message, and determining that the first verification result of the synchronous business message meets the system stable operation conditions if the first system stability is greater than a preset stability threshold; for each asynchronous business message, based on the logical running information of the asynchronous business message, identifying the logical running smoothness of the asynchronous business message and the second system stability during the running process of the asynchronous business message, and determining that the second verification result of the asynchronous business message meets the system stable operation conditions if the logical running smoothness is greater than a preset smoothness threshold and the second system stability is greater than a preset stability threshold.

[0082] In this embodiment, for each synchronized service message, the terminal identifies the first system stability during the operation of the synchronized service message based on its running status information. If the first system stability is greater than a preset stability threshold, the terminal determines that the first verification result of the synchronized service message meets the system stability operation conditions. The preset stability threshold and preset smoothness threshold are preset stability thresholds and smoothness thresholds on the terminal. This stability threshold represents the running status fluctuation range. Then, the terminal identifies the actual fluctuation range corresponding to the system running fluctuation degree for each synchronized service message's running status information. If this fluctuation range is lower than the running status fluctuation range, the terminal determines that the first system stability is greater than the preset stability threshold.

[0083] For each asynchronous service message, the terminal identifies its logical operation smoothness and the second system stability during operation based on the message's logical operation information. If both the logical operation smoothness and the second system stability exceed a preset smoothness threshold, the terminal determines that the second verification result of the asynchronous service message meets the system stability operation conditions. The smoothness threshold includes the number of stutters and the total stutter duration. Then, based on the logical operation information of each asynchronous service message, the terminal identifies the actual number of stutters for each message and the sum of the actual stutter durations. If the actual number of stutters is lower than a preset number of stutters and the sum of the actual stutter durations is lower than the total stutter duration, the terminal determines that the logical operation smoothness of that asynchronous service message is greater than the preset smoothness threshold.

[0084] Based on the above scheme, by identifying the system stability corresponding to synchronous business messages and asynchronous business messages respectively, it is possible to determine whether synchronous business messages and asynchronous business messages meet the conditions for stable system operation, thereby improving the accuracy of determining whether different business messages meet the conditions for stable system operation.

[0085] This application also provides an example of application service deployment, such as... Figure 2 As shown, the specific processing procedure includes the following steps:

[0086] Step S201: Obtain the changes to the application service deployment and identify the change type of each change.

[0087] Step S202: If there is a change type of consumption logic change, obtain the gray application stack based on the change type of consumption logic change, and obtain the blue-green application stack based on each change type other than consumption logic change.

[0088] Step S203: In response to the user's message production operation, obtain the message content corresponding to each change type and the consumption rule information corresponding to each message content, and use each message content and the consumption rule information corresponding to each message content as each business message.

[0089] Step S204: Based on the business type of each business message, divide each business message into multiple message partitions.

[0090] Step S205: For each message partition, identify the consumption rule information of each business message in the message partition, and obtain the keyword corresponding to asynchronous business consumption.

[0091] Step S206: The business messages corresponding to the consumption rule information containing keywords in each consumption rule information are treated as asynchronous business messages, and the business messages corresponding to the consumption rule information not containing keywords in each consumption rule information are treated as synchronous business messages.

[0092] Step S207: Identify the target message partition pulled by the asynchronous consumer.

[0093] Step S208: Based on the message content in each synchronous business message, identify the consumption logic corresponding to all synchronous business messages, and based on the consumption logic, simulate the consumption process of each synchronous business message to obtain the consumption log information of each synchronous business message.

[0094] Step S209: Based on the blue-green application stack, identify the running status information of each consumer log information, and use the running status information of each synchronized business message as the first verification result of each synchronized business message.

[0095] Step S210: Identify the consumption logic corresponding to the consumption content of each asynchronous business message, and for each asynchronous business message, simulate the consumption of the asynchronous business consumption content based on the consumption logic of asynchronous business consumption to obtain the consumption log information corresponding to asynchronous business consumption.

[0096] Step S211: Identify the logic operation information corresponding to the consumption logic of asynchronous business consumption in the consumption log information, and use the logic operation information of each asynchronous business consumption as the second verification result of each asynchronous business consumption.

[0097] Step S212: For each synchronous business message, based on the running status information of the synchronous business message, identify the first system stability during the running process of the synchronous business message, and if the first system stability is greater than the preset stability threshold, determine that the first verification result of the synchronous business message meets the system stable operation conditions.

[0098] Step S213: For each asynchronous business message, based on the logical operation information of the asynchronous business message, identify the logical operation smoothness of the asynchronous business message and the second system stability of the supplementary business message during operation. If the logical operation smoothness is greater than a preset smoothness threshold and the second system stability is greater than a preset stability threshold, determine that the second verification result of the asynchronous business message meets the system stable operation conditions.

[0099] Step S214: If both the first verification result and the second verification result meet the conditions for stable system operation, the consumption code logic of each business message in the target message partition is deployed to the blue-green application stack to complete the application service deployment task.

[0100] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0101] Based on the same inventive concept, this application also provides an application service deployment apparatus for implementing the application service deployment method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more application service deployment apparatus embodiments provided below can be found in the limitations of the application service deployment method described above, and will not be repeated here.

[0102] In one embodiment, such as Figure 3 As shown, an application service deployment apparatus is provided, including: an acquisition module 310, an identification module 320, a verification module 330, and a deployment module 340, wherein:

[0103] The acquisition module 310 is used to acquire multiple business messages, blue-green application stacks, and gray-scale application stacks, and divide each business message into multiple message partitions based on the business type of each business message.

[0104] The identification module 320 is used to identify asynchronous business consumption in each business message of each message partition, and to identify the target message partition pulled by the asynchronous consumer.

[0105] The verification module 330 is used to perform consumption verification processing on each synchronous business message in the target message partition based on the blue-green application stack to obtain a first verification result for each synchronous business message, and to perform consumption verification processing on each asynchronous business message in the target message partition based on the gray application stack to obtain a second verification result for each asynchronous business message.

[0106] The deployment module 340 is used to deploy the consumption code logic of each business message in the target message partition to the blue-green application stack, and complete the application service deployment task, when both the first verification result and the second verification result meet the system stable operation conditions.

[0107] Optionally, the acquisition module 310 is specifically used for:

[0108] Obtain changes to the application service deployment and identify the type of change for each change;

[0109] In the case of a change type of consumption logic change, a grayscale application stack is obtained based on the change type of the consumption logic change, and a blue-green application stack is obtained based on each change type other than the change type of the consumption logic change.

[0110] In response to the user's message production operation, obtain the message content corresponding to each change type and the consumption rule information corresponding to each message content, and use each message content and the consumption rule information corresponding to each message content as each business message.

[0111] Optionally, the identification module 320 is specifically used for:

[0112] For each message partition, identify the consumption rule information of each business message in the message partition, and obtain the keywords corresponding to asynchronous business consumption;

[0113] The business messages corresponding to the consumption rule information that contains the keyword are treated as asynchronous business messages, while the business messages corresponding to the consumption rule information that does not contain the keyword are treated as synchronous business messages.

[0114] Optionally, the verification module 330 is specifically used for:

[0115] Based on the message content in each synchronous business message, identify the consumption logic corresponding to all synchronous business messages, and based on the consumption logic, simulate the consumption process of each synchronous business message to obtain the consumption log information of each synchronous business message.

[0116] Based on the blue-green application stack, the running status information of each of the consumption log information is identified, and the running status information of each of the synchronization business messages is used as the first verification result of each of the synchronization business messages.

[0117] Optionally, the verification module 330 is specifically used for:

[0118] The consumption logic corresponding to the consumption content of each asynchronous business message is identified, and for each asynchronous business message, based on the consumption logic of the asynchronous business consumption, the consumption content of the asynchronous business consumption is simulated and processed to obtain the consumption log information corresponding to the asynchronous business consumption.

[0119] Identify the logic execution information corresponding to the consumption logic of the asynchronous business consumption in the consumption log information, and use the logic execution information of each asynchronous business consumption as the second verification result of each asynchronous business consumption.

[0120] Optionally, the device further includes:

[0121] The first determining module is used to identify the first system stability during the operation of each synchronous service message based on the running status information of the synchronous service message, and determine that the first verification result of the synchronous service message meets the system stable operation conditions if the first system stability is greater than a preset stability threshold.

[0122] The second determining module is used to identify the logical operation smoothness of the asynchronous business message and the second system stability of the asynchronous business message during operation, based on the logical operation information of the asynchronous business message, for each asynchronous business message, and determine that the second verification result of the asynchronous business message meets the system stable operation conditions when the logical operation smoothness is greater than a preset smoothness threshold and the second system stability is greater than a preset stability threshold.

[0123] Each module in the aforementioned application service deployment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0124] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an application service deployment method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0125] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0126] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any one of the first aspects.

[0127] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0128] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects.

[0129] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0130] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0131] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0132] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An application service deployment method, characterized in that, The method includes: Obtain changes to the application service deployment and identify the type of change for each change; In the case of a change type of consumption logic change, a grayscale application stack is obtained based on the change type of the consumption logic change, and a blue-green application stack is obtained based on each change type other than the change type of the consumption logic change. In response to the user's message production operation, obtain the message content corresponding to each change type and the consumption rule information corresponding to each message content, and use each message content and the consumption rule information corresponding to each message content as each business message; Based on the business type of each business message, each business message is divided into multiple message partitions; For each message partition, identify the consumption rule information of each business message in the message partition, and obtain the keywords corresponding to asynchronous business consumption; The business messages corresponding to the consumption rule information that contains the keyword are treated as asynchronous business messages, and the business messages corresponding to the consumption rule information that does not contain the keyword are treated as synchronous business messages. Identify the target message partition retrieved by the asynchronous consumer; Based on the blue-green application stack, each synchronous business message in the target message partition is consumed and verified to obtain a first verification result for each synchronous business message. Based on the gray application stack, each asynchronous business message in the target message partition is consumed and verified to obtain a second verification result for each asynchronous business message. If both the first verification result and the second verification result meet the conditions for stable system operation, the consumption code logic of each business message in the target message partition is deployed to the blue-green application stack to complete the application service deployment task.

2. The method according to claim 1, characterized in that, The consumption and verification process for each synchronous business message in the target message partition based on the blue-green application stack, to obtain the first verification result for each synchronous business message, includes: Based on the message content in each synchronous business message, identify the consumption logic corresponding to all synchronous business messages, and based on the consumption logic, simulate the consumption process of each synchronous business message to obtain the consumption log information of each synchronous business message. Based on the blue-green application stack, the running status information of each of the consumption log information is identified, and the running status information of each of the synchronization business messages is used as the first verification result of each of the synchronization business messages.

3. The method according to claim 1, characterized in that, The consumption and verification process for each asynchronous business message in the target message partition based on the grayscale application stack, to obtain a second verification result for each asynchronous business message, includes: The consumption logic corresponding to the consumption content of each asynchronous business message is identified, and for each asynchronous business message, based on the consumption logic of the asynchronous business consumption, the consumption content of the asynchronous business consumption is simulated and processed to obtain the consumption log information corresponding to the asynchronous business consumption. Identify the logic execution information corresponding to the consumption logic of the asynchronous business consumption in the consumption log information, and use the logic execution information of each asynchronous business consumption as the second verification result of each asynchronous business consumption.

4. The method according to claim 1, characterized in that, Before deploying the consumption code logic for each business message in the target message partition to the blue-green application stack to complete the application service deployment task, the following steps are also included: For each synchronous service message, based on the running status information of the synchronous service message, the first system stability during the running process of the synchronous service message is identified, and if the first system stability is greater than a preset stability threshold, the first verification result of the synchronous service message is determined to meet the system stable operation conditions. For each asynchronous business message, based on the logical operation information of the asynchronous business message, the logical operation smoothness of the asynchronous business message and the second system stability of the asynchronous business message during operation are identified. If the logical operation smoothness is greater than a preset smoothness threshold and the second system stability is greater than a preset stability threshold, the second verification result of the asynchronous business message is determined to meet the system stable operation conditions.

5. An application service deployment device, characterized in that, The device includes: The acquisition module is used to acquire changes to the application service deployment and identify the change type of each change. When a change type is a consumption logic change, it acquires a grayscale application stack based on the consumption logic change type, and acquires a blue-green application stack based on all other change types. In response to a user's message production operation, it acquires the message content corresponding to each change type and the consumption rule information corresponding to each message content, and uses each message content and its corresponding consumption rule information as a business message. Based on the business type of each business message, it divides each business message into multiple message partitions. The identification module is used to identify the consumption rule information of each business message in each message partition and obtain the keyword corresponding to asynchronous business consumption; to take the business messages corresponding to the consumption rule information containing the keyword as asynchronous business messages, and to take the business messages corresponding to the consumption rule information not containing the keyword as synchronous business messages; and to identify the target message partition pulled by the asynchronous consumer. The verification module is used to perform consumption verification processing on each synchronous business message in the target message partition based on the blue-green application stack to obtain a first verification result for each synchronous business message, and to perform consumption verification processing on each asynchronous business message in the target message partition based on the gray application stack to obtain a second verification result for each asynchronous business message. The deployment module is used to deploy the consumption code logic of each business message in the target message partition to the blue-green application stack, and complete the application service deployment task, provided that both the first verification result and the second verification result meet the conditions for stable system operation.

6. The apparatus according to claim 5, characterized in that, The verification module is specifically used for: Based on the message content in each synchronous business message, identify the consumption logic corresponding to all synchronous business messages, and based on the consumption logic, simulate the consumption process of each synchronous business message to obtain the consumption log information of each synchronous business message. Based on the blue-green application stack, the running status information of each of the consumption log information is identified, and the running status information of each of the synchronization business messages is used as the first verification result of each of the synchronization business messages.

7. The apparatus according to claim 5, characterized in that, The verification module is specifically used for: The consumption logic corresponding to the consumption content of each asynchronous business message is identified, and for each asynchronous business message, based on the consumption logic of the asynchronous business consumption, the consumption content of the asynchronous business consumption is simulated and processed to obtain the consumption log information corresponding to the asynchronous business consumption. Identify the logic execution information corresponding to the consumption logic of the asynchronous business consumption in the consumption log information, and use the logic execution information of each asynchronous business consumption as the second verification result of each asynchronous business consumption.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Cloud computing operation and maintenance management method and device based on micro-service architecture and terminal equipment

    CN110995511A

  • Full-link gray release method and device based on distributed gateway, electronic equipment and computer medium

    CN116594648A