Service message processing method, electronic equipment, storage medium and program product

By classifying business messages on the cloud computing platform and dynamically adjusting the number of service nodes, the problem of low processing efficiency on the cloud computing platform is solved, and efficient business message processing and system expansion are achieved.

CN121151331APending Publication Date: 2025-12-16CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511316333.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

The low processing efficiency of cloud computing platforms when processing business messages is mainly due to the use of a single-service distributed architecture in existing technologies, which results in a variety of business message types to be consumed in the message queue, leading to low processing efficiency.

Method used

By classifying business messages, identifying target business service modules and message queues, and dynamically adjusting the number of service nodes, the allocation of data processing resources is optimized based on message traffic and business priority, thereby achieving efficient processing of business messages.

Benefits of technology

It improves the efficiency of cloud computing platforms in processing business messages, ensures the continuity and stability of message flow, adapts to dynamic changes in cloud pools, reduces coupling, and improves system expansion efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121151331A_ABST
    Figure CN121151331A_ABST
Patent Text Reader

Abstract

The invention provides a service message processing method, electronic equipment, a storage medium and a program product. Service messages sent by the bottom cloud pool and message flow values are obtained, the service messages are classified, and the classified service messages and corresponding service type identifiers are obtained; determining a target business service module and a target message queue according to the business type identifier, and determining business priorities corresponding to the classified business messages; and determining a target node number of the service nodes in the target business service module according to the message traffic value and the business priority. Sending the classified service messages to a target message queue; sending the classified business messages to a target business service module through the target message queue; calling a service node through a target business service module, processing the classified business message, and generating a message processing result; sending the message processing result to the target service application; the problem that the processing efficiency is low when the service message is processed is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a business message processing method, electronic device, storage medium, and program product. Background Technology

[0002] With the development of cloud computing technology, a large number of underlying cloud pools have been deployed for data processing and business support. Message queues serve as the data transmission mechanism between the cloud computing platform and the underlying cloud pools.

[0003] In existing technologies, cloud computing platforms typically adopt a single-service distributed architecture, which uses message queues to distribute business messages from various underlying cloud pools, and then each node in the cloud computing platform uniformly processes the business messages of the underlying cloud pool corresponding to the message queue.

[0004] However, existing technologies result in low processing efficiency for cloud computing platforms when handling business messages. Summary of the Invention

[0005] The business message processing method, electronic device, storage medium, and program product provided in this application are intended to solve the problem of low processing efficiency in cloud computing platforms when processing business messages.

[0006] In a first aspect, embodiments of this application provide a business message processing method, comprising: obtaining a business message sent by an underlying cloud pool and a message traffic value; classifying the business message according to its type to obtain a classified business message and a corresponding business type identifier; determining a target business service module from multiple business service modules based on the business type identifier, and determining the business priority corresponding to the classified business message; determining the target number of service nodes in the target business service module based on the message traffic value and the business priority; determining a target message queue from multiple message queues based on the business type identifier; sending the classified business message to the target message queue; sending the classified business message to the target business service module through the target message queue; calling the target number of service nodes through the target business service module to process the classified business message and generate a message processing result; and sending the message processing result to a target business application.

[0007] In one possible implementation, determining the target number of service nodes in the target business service module based on the message traffic value and the business priority includes: determining the initial number of service nodes in each business service module based on the message traffic value; determining node number allocation information based on the business priority; and changing the initial number of service nodes in each business service module based on the node number allocation information to determine the target number of service nodes in the target business service module.

[0008] In one possible implementation, each business service module includes a first business service module, a second business service module, and a third business service module; the business message types include a first business message type, a second business message type, and a third business message type; the first business service module is used to process business messages of the first business message type; the second business service module is used to process business messages of the second business message type; the third business service module is used to process business messages of the third business message type; correspondingly, determining the target business service module from multiple business service modules according to the business type identifier includes: determining the third business service module as the target business service module according to the business type identifier; correspondingly, the... Based on the node allocation information, the initial number of service nodes in each business service module is changed to determine the target number of service nodes in the target business service module. This includes: obtaining a node reduction number and a node increase number based on the node allocation information; wherein the value of the node reduction number is equal to the value of the node increase number; reducing the initial number of service nodes in the first business service module to the first node number based on the node reduction number; keeping the initial number of service nodes in the second business service module unchanged based on the node reduction number and the node increase number; and increasing the initial number of service nodes in the third business service module to the target node number based on the node increase number.

[0009] In one possible implementation, the process of sending the categorized business messages to the target business service module via the target message queue further includes: obtaining the message backlog value of the business messages in the target message queue according to a preset time interval; determining the relationship between the message backlog value and a message backlog threshold; if the message backlog value is less than or equal to the message backlog threshold, then continuing to execute the step of sending the categorized business messages to the target business service module via the target message queue, and subsequent steps; if the message backlog value is greater than the message backlog threshold, then performing a disconnection detection on the target message queue to determine whether the target message queue is in a connected state or a disconnected state; if the target message queue is in a connected state, then continuing to execute the step of sending the categorized business messages to the target business service module via the target message queue, and subsequent steps; if the target message queue is in a disconnected state, then executing a message queue reconnection command to make the target message queue reconnected, so as to continue executing the step of sending the categorized business messages to the target business service module via the target message queue, and subsequent steps.

[0010] In one possible implementation, the method further includes: obtaining a cloud pool configuration file; determining, based on the cloud pool configuration file, whether a new underlying cloud pool exists; and if a new underlying cloud pool exists, establishing message listening for the new underlying cloud pool through the multiple message queues.

[0011] In one possible implementation, the method further includes: obtaining a message queue configuration file; determining whether there is a change to the message queue based on the message queue configuration file; if there is a change to the message queue, determining the message queue before the change and the message queue after the change; receiving and consuming business messages sent by the underlying cloud pool through the message queue after the change; obtaining the message consumption value of the business messages in the message queue before the change; determining whether the message consumption value is 0; if the message consumption value is not 0, causing the message queue before the change to consume the business messages in the message queue before the change, and returning to the step of obtaining the message consumption value of the business messages in the message queue before the change; if the message consumption value is 0, executing a message queue disconnection command to put the message queue before the change in a disconnected state.

[0012] Secondly, embodiments of this application provide a business message processing apparatus, including:

[0013] The acquisition module is used to acquire business messages sent by the underlying cloud pool, as well as message traffic values;

[0014] The processing module is configured to: classify the business messages according to their types to obtain classified business messages and corresponding business type identifiers; determine a target business service module from multiple business service modules based on the business type identifiers, and determine the business priority corresponding to the classified business messages; determine the target number of service nodes in the target business service module based on the message traffic value and the business priority; determine a target message queue from multiple message queues based on the business type identifiers; send the classified business messages to the target message queue; send the classified business messages to the target business service module through the target message queue; and call the target number of service nodes through the target business service module to process the classified business messages and generate message processing results.

[0015] The sending module is used to send the message processing result to the target business application.

[0016] In one possible implementation, when the processing module determines the target number of service nodes in the target business service module based on the message traffic value and the business priority, it is specifically configured to: determine the initial number of service nodes in each business service module based on the message traffic value; determine node number allocation information based on the business priority; change the initial number of service nodes in each business service module based on the node number allocation information, and determine the target number of service nodes in the target business service module.

[0017] In one possible implementation, each business service module includes a first business service module, a second business service module, and a third business service module; the business message types include a first business message type, a second business message type, and a third business message type; the first business service module is used to process business messages of the first business message type; the second business service module is used to process business messages of the second business message type; the third business service module is used to process business messages of the third business message type; correspondingly, when the processing module determines the target business service module from multiple business service modules according to the business type identifier, it is specifically used to: determine the third business service module as the target business service module according to the business type identifier; correspondingly, the When the processing module changes the initial number of service nodes in each business service module according to the node quantity allocation information and determines the target number of service nodes in the target business service module, it specifically performs the following steps: Based on the node quantity allocation information, it obtains the number of nodes to be reduced and the number of nodes to be increased; wherein the value of the number of nodes to be reduced is equal to the value of the number of nodes to be increased; based on the number of nodes to be reduced, it reduces the initial number of service nodes in the first business service module to the first number of nodes; based on the number of nodes to be reduced and the number of nodes to be increased, it keeps the initial number of service nodes in the second business service module unchanged; based on the number of nodes to be increased, it increases the initial number of service nodes in the third business service module to the target number of nodes.

[0018] In one possible implementation, during the process of sending the categorized business messages to the target business service module via the target message queue, the business message processing device is further configured to: obtain the message backlog value of the business messages in the target message queue according to a preset time interval; determine the relationship between the message backlog value and the message backlog threshold; if the message backlog value is less than or equal to the message backlog threshold, then continue to execute the step of sending the categorized business messages to the target business service module via the target message queue, and subsequent steps; if the message backlog value is greater than the message backlog threshold, then perform a disconnection detection on the target message queue to determine whether the target message queue is in a connected state or a disconnected state; if the target message queue is in a connected state, then continue to execute the step of sending the categorized business messages to the target business service module via the target message queue, and subsequent steps; if the target message queue is in a disconnected state, then execute a message queue reconnection instruction to make the target message queue reconnected, so as to continue to execute the step of sending the categorized business messages to the target business service module via the target message queue, and subsequent steps.

[0019] In one possible implementation, the business message processing device is further configured to: obtain a cloud pool configuration file; determine, based on the cloud pool configuration file, whether a new underlying cloud pool exists; and if a new underlying cloud pool exists, establish message listening for the new underlying cloud pool through the multiple message queues.

[0020] In one possible implementation, the business message processing device is further configured to: obtain a message queue configuration file; determine whether there is a change to the message queue based on the message queue configuration file; if there is a change to the message queue, determine the message queue before the change and the message queue after the change; receive and consume business messages sent by the underlying cloud pool through the message queue after the change; obtain the message consumption value of the business messages in the message queue before the change; determine whether the message consumption value is 0; if the message consumption value is not 0, cause the message queue before the change to consume the business messages in the message queue before the change, and return to the step of obtaining the message consumption value of the business messages in the message queue before the change; if the message consumption value is 0, execute a message queue disconnection command to put the message queue before the change in a disconnected state.

[0021] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0022] The memory stores computer-executed instructions;

[0023] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0024] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0025] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0026] The business message processing method, electronic device, storage medium, and program product provided in this application, based on obtaining business messages sent by the underlying cloud pool and message traffic values, classifies the business messages to obtain classified business messages and corresponding business type identifiers. Then, based on the business type identifiers, it determines the target business service module and the target message queue, and determines the business priority corresponding to the classified business messages. Based on the message traffic values ​​and business priorities, it determines the target number of service nodes in the target business service module, i.e., dynamically adjusts the data processing resources of the target business service module. Then, it sends the classified business messages to the target message queue; through the target message queue, it sends the classified business messages to the target business service module; the target business service module calls the target number of service nodes to process the classified business messages and generate message processing results; and the message processing results are sent to the target business application. This solves the problem of low processing efficiency in cloud computing platforms when processing business messages. Attached Figure Description

[0027] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0028] Figure 1 A flowchart illustrating a business message processing method provided in one embodiment of this application;

[0029] Figure 2 A schematic diagram illustrating the implementation process of step S104 provided in the embodiments of this application;

[0030] Figure 3 A schematic diagram illustrating the implementation process of step S1043 provided in the embodiments of this application;

[0031] Figure 4 A flowchart for detecting the connection status of a message queue, provided as an embodiment of this application;

[0032] Figure 5 A flowchart for monitoring and message listening of a newly added underlying cloud pool is provided as an embodiment of this application;

[0033] Figure 6 A flowchart for message queue modification is provided as an embodiment of this application;

[0034] Figure 7 This is a schematic diagram of the structure of a business message processing apparatus provided in one embodiment of this application;

[0035] Figure 8 A schematic diagram of the structure of the electronic device provided in this application.

[0036] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0038] The technical solution of this application involves the collection, storage, use, processing, transmission, provision and disclosure of user personal information and data, which comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0039] 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. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0040] With the development of cloud computing technology, a large number of underlying cloud pools have been deployed for data processing and business support. Message queues serve as the data transmission channel between the cloud computing platform and the underlying cloud pools. In existing technologies, cloud computing platforms typically adopt a single-service distributed architecture, using message queues to distribute business messages from various underlying cloud pools. Then, each service node in the cloud computing platform uniformly processes the business messages corresponding to the underlying cloud pool for its respective message queue. However, in existing solutions, one message queue corresponds to one underlying cloud pool. When the service nodes of the cloud computing platform process the business messages to be consumed in the message queue, these messages include network resource messages, computing resource processing messages, monitoring messages, exception messages, and irrelevant messages. This leads to low processing efficiency for the cloud computing platform when processing business messages.

[0041] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0042] Figure 1 A flowchart of a business message processing method provided in one embodiment of this application is shown below. Figure 1 As shown, the execution subject of the business message processing method provided in this embodiment can be any form of electronic device. The business message processing method provided in this embodiment includes the following steps:

[0043] Step S101: Obtain the business message sent by the underlying cloud pool, as well as the message traffic value.

[0044] For example, the service messages sent by the underlying cloud pool include network resource messages, computing resource processing messages, monitoring messages, exception messages, and irrelevant messages; the number of underlying cloud pools can be one or more. Based on obtaining the service messages sent by the underlying cloud pools, the message flow value can be further determined, whereby the message flow value is used to indicate the message volume of the service messages sent by the one or more underlying cloud pools.

[0045] Step S102: Classify the business messages according to their types to obtain the classified business messages and their corresponding business type identifiers.

[0046] For example, business messages include network resource messages, computing resource processing messages, monitoring messages, exception messages, and irrelevant messages. Business message types include network resource message type, computing resource processing message type, monitoring message type, exception message type, and irrelevant message type. Furthermore, based on the business message type, the business messages are classified to obtain classified business messages and corresponding business type identifiers. Specifically, for example, if the business messages include business message msg_1, business message msg_2, and business message msg_3, they are classified according to their business message types to obtain classified business messages. The classified business message types of msg_1 and msg_2 are network resource message types, with a corresponding business type identifier of label_1. The classified business message type of msg_3 is a monitoring message type, with a corresponding business type identifier of label_2.

[0047] Step S103: Based on the business type identifier, determine the target business service module from multiple business service modules, and determine the business priority corresponding to the categorized business message.

[0048] For example, the business service module is deployed in a cloud computing platform; the business service module includes a network resource message processing service module, a computing resource message processing service module, a monitoring message processing service module, an exception message processing service module, and an irrelevant message processing service module. Taking the categorized business message msg_1, the categorized business message msg_2, and the business type identifier label_1 as an example, the business message type corresponding to the business type identifier label_1 is a network resource message type, thus the network resource message processing service module in the business service module is determined as the target business service module; furthermore, based on the business message type corresponding to the business type identifier label_1 being a network resource message type, the business priority for processing the categorized business message msg_1 and the categorized business message msg_2 is determined.

[0049] Step S104: Determine the target number of service nodes in the target business service module based on message traffic value and business priority.

[0050] For example, different message traffic values ​​and different business priorities require different data processing resources when processing categorized business messages. Therefore, based on the message traffic value and business priority, the target number of service nodes in the target business service module can be determined. The more service nodes there are, the more data processing resources are available, and consequently, the faster the business messages can be processed per unit of time.

[0051] In one possible implementation, Figure 2 A schematic diagram illustrating the implementation process of step S104 provided in the embodiments of this application is shown below. Figure 2 As shown, the specific implementation steps of step S104 include:

[0052] Step S104a: Determine the initial number of service nodes in each business service module based on the message traffic value.

[0053] For example, the total number of service nodes is num_0; different message traffic values ​​correspond to different initial node numbers; then, based on the message traffic values, the initial number of service nodes in each business service module is determined, wherein the initial number of service nodes in each business service module is the same; further, after determining the initial number of service nodes in each business service module, the remaining number of service nodes is num_1.

[0054] Step S104b: Determine the node allocation information based on business priority.

[0055] For example, based on business priorities, the number of remaining service nodes to be allocated to each business service module is determined, thus obtaining node allocation information. Specifically, for example, business priorities include first priority, second priority, and third priority; first priority is higher than second priority, and second priority is higher than third priority; then, based on different business priorities, the corresponding node allocation information is determined.

[0056] Step S104c: Based on the node quantity allocation information, change the initial number of service nodes in each business service module to determine the target number of service nodes in the target business service module.

[0057] For example, based on the node quantity allocation information, the remaining service nodes are allocated to each business service module, which means changing the initial number of service nodes in each business service module, or determining the target number of service nodes in the target business service module.

[0058] In another possible implementation, each business service module includes a first business service module, a second business service module, and a third business service module; the business message types include a first business message type, a second business message type, and a third business message type; the first business service module is used to process business messages of the first business message type; the second business service module is used to process business messages of the second business message type; the third business service module is used to process business messages of the third business message type; based on the business type identifier, the third business service module is determined as the target business service module; the specific implementation steps of step S104 include:

[0059] Step S1041: Determine the initial number of service nodes in each business service module based on the message traffic value.

[0060] For example, each business service module is pre-configured with an initial number of service nodes; then, based on the message traffic value, the service nodes to be allocated are evenly distributed to each business service module, thus determining the initial number of service nodes in each business service module.

[0061] Step S1042: Determine the node quantity allocation information based on business priority.

[0062] For example, each business priority corresponds to a corresponding business service module, and then the node allocation information of each business service module is determined according to the business priority.

[0063] Step S1043: Based on the node quantity allocation information, change the initial number of service nodes in each business service module to determine the target number of service nodes in the target business service module.

[0064] Specifically, Figure 3 This is a schematic diagram illustrating the implementation process of step S1043 provided in the embodiments of this application, as shown below. Figure 3 As shown, the specific implementation steps of step S1043 include:

[0065] Step S10431: Based on the node number allocation information, obtain the number of nodes to be reduced and the number of nodes to be increased; wherein, the value of the number of nodes to be reduced is equal to the value of the number of nodes to be increased.

[0066] Step S10432: Based on the reduction of the number of nodes, reduce the initial number of service nodes in the first business service module to the first number of nodes.

[0067] Step S10433: Based on the decrease in the number of nodes and the increase in the number of nodes, keep the initial number of service nodes in the second business service module unchanged.

[0068] Step S10434: Based on the number of nodes to be added, increase the initial number of service nodes in the third business service module to the target number of nodes.

[0069] Step S105: Determine the target message queue from multiple message queues based on the business type identifier.

[0070] For example, the message queue includes message queues for network resource messages, computing resource processing messages, monitoring messages, exception messages, and irrelevant messages. Taking the categorized business messages msg_1 and msg_2, and the business type identifier label_1 as an example, the business message type corresponding to the business type identifier label_1 is the network resource message type, and thus the message queue for network resource messages in the message queue is determined as the target message queue.

[0071] Step S106: Send the categorized business messages to the target message queue.

[0072] Step S107: Send the categorized business messages to the target business service module through the target message queue.

[0073] For example, after the target message queue is determined, the classified business messages can be sent to the target message queue, so as to send the classified business messages to the target business service module through the target message queue.

[0074] Step S108: The target number of service nodes are called through the target business service module to process the classified business messages and generate message processing results.

[0075] For example, after the categorized business message is sent to the target business service module, the target business service module can call the target number of service nodes to process the categorized business message and generate a message processing result. Specifically, taking the categorized business message msg_1 as an example, the target business service module is the network resource message processing service module, and the target message queue is the network resource message queue. Then, the categorized business message msg_1 is sent to the network resource message queue. Then, the network resource message queue sends the categorized business message msg_1 to the network resource message processing service module, so that the network resource message processing service module can call the target number of service nodes to process the categorized business message msg_1 and generate a message processing result.

[0076] Step S109: Send the message processing result to the target business application.

[0077] In this embodiment, based on the business messages sent by the underlying cloud pool and the message traffic value, the business messages are classified to obtain classified business messages and corresponding business type identifiers. Then, based on the business type identifiers, the target business service module and target message queue are determined, and the business priority corresponding to the classified business messages is determined. Based on the message traffic value and business priority, the target number of service nodes in the target business service module is determined, i.e., the data processing resources of the target business service module are dynamically adjusted. Then, the classified business messages are sent to the target message queue; through the target message queue, the classified business messages are sent to the target business service module; the target business service module calls the target number of service nodes to process the classified business messages and generate message processing results; the message processing results are sent to the target business application. This solves the problem of low processing efficiency in cloud computing platforms when processing business messages.

[0078] Furthermore, in the process of sending the categorized business messages to the target business service module through the target message queue, the method provided in this application embodiment also includes detecting the connection status of the message queue. Figure 4 A flowchart for detecting the connection status of a message queue is provided in one embodiment of this application, such as... Figure 4 As shown:

[0079] Step 401: Obtain the message backlog value of business messages in the target message queue according to a preset time interval.

[0080] Step 402: Determine the relationship between the message backlog value and the message backlog threshold.

[0081] Step 403: If the message backlog value is less than or equal to the message backlog threshold, continue to execute the step of sending the classified business messages to the target business service module through the target message queue, and subsequent steps.

[0082] Step 404: If the message backlog value is greater than the message backlog threshold, then perform a disconnection detection on the target message queue to determine whether the target message queue is in a connected state or a disconnected state.

[0083] Step 405: If the target message queue is in a connected state, continue to execute the step of sending the classified business messages to the target business service module through the target message queue, and subsequent steps.

[0084] Step 406: If the target message queue is in a disconnected state, execute the message queue reconnection command to make the target message queue reconnected so that the step of sending the classified business messages to the target business service module through the target message queue, as well as subsequent steps, can continue.

[0085] For example, based on a preset time interval, the message backlog value of business messages in the target message queue is periodically acquired. Then, by judging the relationship between the message backlog value and a message backlog threshold, it is determined whether the target message queue is in a connected or disconnected state. If the message backlog value is less than or equal to the message backlog threshold, the target message queue is determined to be in a connected state. Alternatively, if the message backlog value is greater than the message backlog threshold and the target message queue is determined to be in a connected state, the process continues with the step of sending the categorized business messages to the target business service module through the target message queue, and subsequent steps. If the message backlog value is greater than the message backlog threshold and the target message queue is determined to be in a disconnected state, a message queue reconnection command is executed to reconnect the target message queue, allowing the process to continue with the step of sending the categorized business messages to the target business service module through the target message queue, and subsequent steps.

[0086] In this embodiment, by periodically obtaining the message backlog value of business messages in the target message queue, message queues with message backlog exceeding the threshold can be detected in a timely manner and disconnection detection and reconnection can be performed. This can effectively avoid message processing stagnation caused by message queue disconnection and ensure the continuity and stability of business message flow.

[0087] Furthermore, the method provided in this application embodiment also includes monitoring and message listening for newly added underlying cloud pools. Figure 5 A flowchart for monitoring and message listening of a newly added underlying cloud pool is provided as an embodiment of this application, such as... Figure 5 As shown:

[0088] S501, retrieve the cloud pool configuration file.

[0089] S502 determines whether a new underlying cloud pool exists based on the cloud pool configuration file.

[0090] S503: If a new underlying cloud pool is added, message listening for the new underlying cloud pool will be established through multiple message queues.

[0091] In this embodiment, by acquiring and parsing the cloud pool configuration file, the newly added underlying cloud pool is automatically identified, and message listening for the newly added underlying cloud pool is established based on multiple message queues. This achieves real-time response and automated access to dynamic changes in the cloud pool, which not only improves the system expansion efficiency and reduces coupling, but also ensures the reliability of message interaction through the multi-queue mechanism.

[0092] Furthermore, the method provided in this application embodiment also includes modifying the message queue. Figure 6 A flowchart for message queue modification is provided in one embodiment of this application, such as... Figure 6 As shown:

[0093] S601, retrieve message queue configuration file.

[0094] S602, based on the message queue configuration file, determines whether there have been any changes to the message queue.

[0095] S603, if there is a change to the message queue, then determine the message queue before the change and the message queue after the change.

[0096] S604 receives and consumes business messages sent by the underlying cloud pool through the modified message queue.

[0097] S605, retrieve the message consumption value of the business messages in the message queue before the change.

[0098] S606, determine if the message consumption value is 0.

[0099] S607, if the message consumption value is not 0, then the message queue before the change consumes the business messages in the message queue before the change, and return to step S605.

[0100] S608 If the message pending consumption value is 0, execute the message queue disconnection command to put the message queue before the change into a disconnected state.

[0101] In this embodiment, the changes to the message queue configuration file are identified by obtaining the configuration file, and the message queues before and after the change are determined. The changed message queue receives and consumes business messages. At the same time, the message consumption value of the message queue before the change is monitored. If it is not 0, consumption continues until it becomes 0, at which point a disconnection command is executed. This ensures that business messages are not lost and consumption is uninterrupted when the message queue changes, achieving a smooth transition between the queues before and after the change, and guaranteeing the integrity and continuity of business message processing.

[0102] Figure 7 This is a schematic diagram of the structure of a business message processing apparatus provided in one embodiment of this application, as shown below. Figure 7 As shown, the business message processing device 70 provided in this embodiment includes:

[0103] The acquisition module 701 is used to acquire the business messages sent by the underlying cloud pool, as well as the message traffic value;

[0104] Processing module 702 is used to classify business messages according to their types, obtaining classified business messages and corresponding business type identifiers; determine the target business service module from multiple business service modules based on the business type identifiers, and determine the business priority corresponding to the classified business messages; determine the target number of service nodes in the target business service module based on message traffic value and business priority; determine the target message queue from multiple message queues based on the business type identifiers; send the classified business messages to the target message queue; send the classified business messages to the target business service module through the target message queue; and call the target number of service nodes through the target business service module to process the classified business messages and generate message processing results.

[0105] The sending module 703 is used to send the message processing results to the target business application.

[0106] In one possible implementation, when the processing module 702 determines the target number of service nodes in the target business service module based on message traffic value and business priority, it is specifically used to: determine the initial number of service nodes in each business service module based on message traffic value; determine node number allocation information based on business priority; change the initial number of service nodes in each business service module based on node number allocation information, and determine the target number of service nodes in the target business service module.

[0107] In one possible implementation, each business service module includes a first business service module, a second business service module, and a third business service module; the business message types include a first business message type, a second business message type, and a third business message type; the first business service module is used to process business messages of the first business message type; the second business service module is used to process business messages of the second business message type; and the third business service module is used to process business messages of the third business message type. Accordingly, when the processing module 702 determines the target business service module from multiple business service modules based on the business type identifier, it is specifically used to: determine the third business service module as the target business service module based on the business type identifier; accordingly, the processing module 702... When the management module 702 changes the initial number of service nodes in each business service module according to the node number allocation information and determines the target number of service nodes in the target business service module, it is specifically used for: obtaining the number of nodes to be reduced and the number of nodes to be increased according to the node number allocation information; wherein the value of the number of nodes to be reduced is equal to the value of the number of nodes to be increased; reducing the initial number of service nodes in the first business service module to the first number of nodes according to the number of nodes to be reduced; keeping the initial number of service nodes in the second business service module unchanged according to the number of nodes to be reduced and the number of nodes to be increased; and increasing the initial number of service nodes in the third business service module to the target number of nodes according to the number of nodes to be increased.

[0108] In one possible implementation, during the process of sending categorized business messages to the target business service module via the target message queue, the business message processing device 70 is further configured to: obtain the message backlog value of business messages in the target message queue according to a preset time interval; determine the relationship between the message backlog value and the message backlog threshold; if the message backlog value is less than or equal to the message backlog threshold, continue executing the step of sending categorized business messages to the target business service module via the target message queue, and subsequent steps; if the message backlog value is greater than the message backlog threshold, perform a disconnection detection on the target message queue to determine whether the target message queue is in a connected state or a disconnected state; if the target message queue is in a connected state, continue executing the step of sending categorized business messages to the target business service module via the target message queue, and subsequent steps; if the target message queue is in a disconnected state, execute a message queue reconnection command to make the target message queue reconnected, so as to continue executing the step of sending categorized business messages to the target business service module via the target message queue, and subsequent steps.

[0109] In one possible implementation, the business message processing device 70 is further configured to: obtain a cloud pool configuration file; determine, based on the cloud pool configuration file, whether a new underlying cloud pool exists; and if a new underlying cloud pool exists, establish message listening for the new underlying cloud pool through multiple message queues.

[0110] In one possible implementation, the business message processing device 70 is further configured to: obtain a message queue configuration file; determine whether there is a change to the message queue based on the message queue configuration file; if there is a change to the message queue, determine the message queue before the change and the message queue after the change; receive and consume business messages sent by the underlying cloud pool through the message queue after the change; obtain the message consumption value of the business messages in the message queue before the change; determine whether the message consumption value is 0; if the message consumption value is not 0, enable the message queue before the change to consume the business messages in the message queue before the change, and return to the step of obtaining the message consumption value of the business messages in the message queue before the change; if the message consumption value is 0, execute a message queue disconnection command to put the message queue before the change in a disconnected state.

[0111] The business message processing device 70 provided in this embodiment can perform the following: Figures 1-6 The technical solutions of any of the method embodiments shown are similar in implementation principle and technical effect, and will not be described again here.

[0112] Figure 8 A schematic diagram of the structure of the electronic device provided in this application. Figure 8 As shown, the electronic device 80 provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the device 80 further includes a communication component 803. The processor 801, memory 802, and communication component 803 are connected via a bus.

[0113] In a specific implementation, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to perform the above-described method.

[0114] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0115] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0116] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0117] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0118] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0119] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0120] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0121] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0122] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0123] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0124] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0125] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0126] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0127] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A business message processing method, characterized in that, The method includes: Obtain the business messages sent by the underlying cloud pool, as well as the message traffic value; The business messages are classified according to their types to obtain the classified business messages and their corresponding business type identifiers. Based on the business type identifier, the target business service module is determined from multiple business service modules, and the business priority corresponding to the categorized business message is determined. Based on the message traffic value and the service priority, determine the target number of service nodes in the target service module; Based on the business type identifier, determine the target message queue from multiple message queues; The categorized business messages are sent to the target message queue; The categorized business messages are sent to the target business service module through the target message queue. The target business service module calls the target number of service nodes to process the categorized business messages and generate message processing results. The message processing result is sent to the target business application.

2. The method according to claim 1, characterized in that, The step of determining the target number of service nodes in the target business service module based on the message traffic value and the business priority includes: Based on the message traffic value, determine the initial number of service nodes in each business service module; The node allocation information is determined based on the aforementioned business priorities; Based on the node allocation information, the initial number of service nodes in each business service module is changed, and the target number of service nodes in the target business service module is determined.

3. The method according to claim 2, characterized in that, Each of the business service modules includes a first business service module, a second business service module, and a third business service module; the business message types include a first business message type, a second business message type, and a third business message type; the first business service module is used to process business messages of the first business message type; the second business service module is used to process business messages of the second business message type; and the third business service module is used to process business messages of the third business message type. Accordingly, determining the target business service module from multiple business service modules based on the business type identifier includes: Based on the business type identifier, the third business service module is identified as the target business service module; Accordingly, the step of changing the initial number of service nodes in each business service module according to the node quantity allocation information, and determining the target number of service nodes in the target business service module, includes: Based on the node allocation information, the number of nodes to be reduced and the number of nodes to be increased are obtained; wherein, the value of the number of nodes to be reduced is equal to the value of the number of nodes to be increased. Based on the reduction in the number of nodes, the initial number of service nodes in the first business service module is reduced to the first number of nodes; Based on the decrease in the number of nodes and the increase in the number of nodes, the initial number of service nodes in the second business service module remains unchanged; Based on the number of nodes added, the initial number of service nodes in the third business service module is increased to the target number of nodes.

4. The method according to claim 1, characterized in that, The process of sending the categorized business messages to the target business service module via the target message queue also includes: According to a preset time interval, obtain the message backlog value of business messages in the target message queue; Determine the relationship between the message backlog value and the message backlog threshold; If the message backlog value is less than or equal to the message backlog threshold, then continue to execute the step of sending the classified business messages to the target business service module through the target message queue, and subsequent steps. If the message backlog value is greater than the message backlog threshold, then a disconnection detection is performed on the target message queue to determine whether the target message queue is in a connected state or a disconnected state. If the target message queue is in a connected state, the step of sending the classified business message to the target business service module through the target message queue, and subsequent steps, will continue to be executed. If the target message queue is disconnected, a message queue reconnection command is executed to reconnect the target message queue so that the step of sending the classified business message to the target business service module through the target message queue, as well as subsequent steps, can continue.

5. The method according to claim 1, characterized in that, Also includes: Obtain the cloud pool configuration file; Based on the cloud pool configuration file, determine whether a new underlying cloud pool has been added; If a new underlying cloud pool is added, message listening for the new underlying cloud pool will be established through the multiple message queues.

6. The method according to any one of claims 1-5, characterized in that, Also includes: Retrieve the message queue configuration file; Based on the message queue configuration file, determine whether there have been any changes to the message queue; If there are changes to the message queue, then determine the message queue before the change and the message queue after the change; The modified message queue is used to receive and consume business messages sent by the underlying cloud pool. Retrieve the message consumption value of the business messages in the message queue before the change; Determine whether the message pending consumption value is 0; If the message consumption value is not 0, then the message queue before the change consumes the business messages in the message queue before the change, and returns to the step of obtaining the message consumption value of the business messages in the message queue before the change. If the message pending consumption value is 0, then execute the message queue disconnection command to put the message queue before the change into a disconnected state.

7. A business message processing device, characterized in that, include: The acquisition module is used to acquire business messages sent by the underlying cloud pool, as well as message traffic values; The processing module is configured to: classify the business messages according to their types to obtain classified business messages and corresponding business type identifiers; determine a target business service module from multiple business service modules based on the business type identifiers, and determine the business priority corresponding to the classified business messages; determine the target number of service nodes in the target business service module based on the message traffic value and the business priority; determine a target message queue from multiple message queues based on the business type identifiers; send the classified business messages to the target message queue; and send the classified business messages to the target business service module through the target message queue. The target business service module calls the target number of service nodes to process the categorized business messages and generate message processing results. The sending module is used to send the message processing result to the target business application.

8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.

Citation Information

Cited By

  • Heterogeneous device data unified access, verification and routing method and system

    CN121841865A