CN115827280A - Message processing method and device, electronic equipment and storage medium - Google Patents

Message processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115827280A
CN115827280A CN202211688796.5A CN202211688796A CN115827280A CN 115827280 A CN115827280 A CN 115827280A CN 202211688796 A CN202211688796 A CN 202211688796A CN 115827280 A CN115827280 A CN 115827280A
Authority
CN
China
Prior art keywords
node
message
service
target
searching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211688796.5A
Other languages
Chinese (zh)
Inventor
吴彦婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202211688796.5A priority Critical patent/CN115827280A/en
Publication of CN115827280A publication Critical patent/CN115827280A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a message processing method, a message processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring messages to be processed in a message queue, and determining a node searching configuration map, wherein the node searching configuration map is generated based on a business process; according to the message to be processed, searching a target node searching configuration in a node searching configuration map, wherein the node searching configuration in the node searching configuration map corresponds to a service node in a service flow; determining a target node to search and configure a target service node in a corresponding service flow, and calling the target service node to process a message to be processed; and acquiring a response message generated by the target service node processing the message to be processed, and sending the response message as the message to be processed to the message queue. Therefore, the problem of bottleneck in writing the relational database in the traditional process engine can be solved through the process engine of the message, and the process engine can be used for dealing with scenes with higher concurrency.

Description

Message processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a message processing method and apparatus, an electronic device, and a storage medium.
Background
The process engine is the automation of part or whole of the business process in the computer application environment, and mainly solves the problem of automatically carrying out the process of transferring documents, information or tasks among a plurality of participants according to some predefined rules, thereby realizing a certain expected business goal or promoting the realization of the goal. In popular terms, a process is a step of a plurality of business objects cooperating together to complete a certain thing, and a process engine is a form of changing the step into a computer comprehensible form.
In the related art, a traditional process engine is based on a relational database, task operation and process flow are completed through a node operation state table, and the concurrency is limited by the writing speed of the relational database and cannot be very high generally. However, as the concurrency increases, the QPS peak can reach a higher step instantaneously, and in such a scenario with a higher concurrency, the conventional process engine is not sufficient, so a new process engine is urgently needed to cope with the scenario with a higher concurrency.
Disclosure of Invention
In order to solve the problem that the conventional process engine is based on a relational database, task operation and process circulation are completed through a node operation state table, and the concurrency is limited by the writing speed of the relational database and cannot be very high generally. However, as the concurrency amount is gradually increased, the QPS peak can reach a higher step instantaneously, and in such a scenario with a higher concurrency amount, the conventional flow engine is overwhelmed, so that a new flow engine is urgently needed to solve the technical problem of the scenario with a higher concurrency amount. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, a method for processing a message is provided first, where the method includes:
acquiring messages to be processed in a message queue, and determining a node searching configuration map, wherein the node searching configuration map is generated based on a business process;
searching a target node searching configuration in the node searching configuration map according to the message to be processed, wherein the node searching configuration in the node searching configuration map corresponds to a service node in a service process;
determining the target node to search and configure a corresponding target service node in the service flow, and calling the target service node to process the message to be processed;
and acquiring a response message generated by the target service node when processing the message to be processed, and sending the response message as the message to be processed to the message queue.
In an optional embodiment, the determining node finds a configuration map, including:
and determining a business process corresponding to the message to be processed, and searching a node corresponding to the business process for a configuration map.
In an optional embodiment, the message to be processed carries a first key, and the node search configuration in the node search configuration map includes a second key;
the searching for the target node searching configuration in the node searching configuration map according to the message to be processed includes:
analyzing the first key carried in the message to be processed, and searching a target node searching configuration from the node searching configuration map;
wherein the second key included in the target node searching configuration is consistent with the first key.
In an optional embodiment, the node searching configuration in the node searching configuration map includes a value, where the value corresponds to a service node in a service flow;
the determining that the target node searches for and configures a target service node in the service process corresponding to the target node includes:
analyzing the value contained in the target node searching configuration, and searching the target service node in the service flow corresponding to the value.
In an optional embodiment, before performing the method, the method further comprises:
acquiring a service flow and extracting a parent-child relationship between service nodes in the service flow;
and generating a node searching configuration map corresponding to the business process through the parent-child relationship.
In an optional embodiment, the generating, through the parent-child relationship, a node search configuration map corresponding to the business process includes:
searching a parent-child service node of the service node through the parent-child relationship aiming at any service node in the service process;
generating node searching configuration corresponding to the service node according to the parent-child service node and the service node;
and the node searching configuration corresponding to any service node in the service process forms a node searching configuration map corresponding to the service process.
In an optional embodiment, the generating, according to the parent and child service nodes and the service node, a node search configuration corresponding to the service node includes:
determining the branch condition of the parent-child service node, and determining a target identifier according to the branch condition;
acquiring the node identification of the parent-child service node, and forming a second key by the node identification of the parent-child service node and the target identification;
and acquiring the node identification of the service node, and forming node searching configuration corresponding to the service node by using the node identification of the service node as value and the second key.
In an optional embodiment, the determining a target identifier according to the branch condition includes:
determining the branch identifier of the service node as a target identifier under the condition that the branch condition represents that the parent-child service node comprises a plurality of branches;
and determining a preset first character string as a target identifier under the condition that the branch condition represents that the parent-child service node comprises a single branch.
In an optional embodiment, the generating, according to the parent and child service nodes and the service node, a node search configuration corresponding to the service node includes:
under the condition that the service node is a root service node, acquiring a preset second character string, and determining the preset second character string as a second key;
and acquiring the node identification of the service node, and forming node searching configuration corresponding to the service node by using the node identification of the service node as value and the second key.
In a second aspect of the embodiments of the present invention, there is also provided a message processing apparatus, including:
the message acquisition module is used for acquiring the messages to be processed in the message queue;
the map determining module is used for determining a node searching configuration map, wherein the node searching configuration map is generated based on a business process;
the configuration searching module is used for searching a target node searching configuration in the node searching configuration map according to the message to be processed, wherein the node searching configuration in the node searching configuration map corresponds to a service node in a service process;
the node determining module is used for determining that the target node searches for and configures a corresponding target service node in the service flow;
the message processing module is used for calling the target service node to process the message to be processed;
and the message sending module is used for acquiring a response message generated by the target service node processing the message to be processed, and sending the response message as the message to be processed to the message queue.
In a third aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor configured to implement the message processing method according to any one of the first aspect described above when executing a program stored in a memory.
In a fourth aspect of the embodiments of the present invention, there is also provided a storage medium, in which instructions are stored, and when the storage medium is run on a computer, the storage medium causes the computer to execute the message processing method according to any one of the first aspect.
In a fifth aspect of the embodiments of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the message processing methods described above.
According to the technical scheme provided by the embodiment of the invention, the to-be-processed message in the message queue is obtained, the node searching configuration map is determined, wherein the node searching configuration map is generated based on the service flow, the node searching configuration map is searched for the target node searching configuration in the node searching configuration map, the node searching configuration in the node searching configuration map corresponds to the service node in the service flow, the target node searching configuration is determined to search for the target service node in the service flow corresponding to the target node searching configuration, the target service node is called to process the to-be-processed message, the response message generated when the target service node processes the to-be-processed message is obtained, and the response message is sent to the message queue as the to-be-processed message. The method comprises the steps of acquiring a message to be processed in a message queue, determining a target service node in a service flow, processing the message to be processed by the target service node in the service flow, acquiring a response message generated by the target service node in the service flow when the message to be processed is processed, and sending the response message to the message queue as the message to be processed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is an architecture diagram of a message-based flow engine shown in an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation of a message processing method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating another message processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a business process shown in an embodiment of the present invention;
fig. 5 is a schematic flow chart of an implementation of a method for generating a node searching configuration map according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a message processing apparatus shown in an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device shown in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, for an architecture diagram of a message-based process engine provided by an embodiment of the present invention, for each server, a node finding configuration Map (i.e., a node Map) is locally stored, and the node finding configuration Map serves as a dual role of a sender and a consumer of a message to be processed, and a business process sends a process start message through a process start service.
For the server, the message to be processed in the message queue is acquired, the target service node in the service flow is determined, the message to be processed is processed by the target service node in the service flow, the response message generated when the target service node in the service flow processes the message to be processed is acquired, and the response message is sent to the message queue as the message to be processed.
As shown in fig. 2, an implementation flow diagram of a message processing method provided in an embodiment of the present invention is shown, where the method is applied to a server, and specifically includes the following steps:
s201, obtaining the message to be processed in the message queue, and determining a node searching configuration map, wherein the node searching configuration map is generated based on the business process.
In an embodiment of the invention, for a message queue, pending messages are stored therein. The message to be processed may be various types of messages in various formats, where the message refers to a message in a business process flow circulation process, and this is not limited in this embodiment of the present invention.
For the server, on one hand, to-be-processed messages in the message queue may be acquired, and on the other hand, it may be determined that a node finds a configuration Map (which may be alternatively referred to as a node Map), where the node finds the configuration Map generated based on the business process.
It should be noted that, for a business process, any type of business process may be used, for example, a task approval process, a user trip process, or a financial approval process, which is not limited in the embodiments of the present invention.
S202, according to the message to be processed, searching nodes for target nodes in a configuration map for searching configuration, wherein the nodes in the configuration map for searching configuration correspond to the service nodes in the service process.
In the embodiment of the invention, for the message to be processed, the node searching configuration in the node searching configuration map can be searched according to the message to be processed, wherein the node searching configuration in the node searching configuration map corresponds to the service node in the service flow.
It should be noted that, a service flow generally has a plurality of service nodes, for example, a start (1951) node, an attribute condition (1952) node, an intra-site active node, and the like, and for each service node, one node search configuration in the node search configuration map corresponds to the node search configuration, which is not limited in the embodiment of the present invention.
S203, determining the target node to search and configure the target service node in the corresponding service flow, and calling the target service node to process the message to be processed.
In the embodiment of the invention, the node searching configuration in the node searching configuration map corresponds to the service nodes in the service flow one by one, so that the target service node in the service flow corresponding to the target node searching configuration can be determined.
And for the target service node, the message to be processed is processed, so that the target service node can be called to process the message to be processed. After the target service node processes the message to be processed, a corresponding response message can be generated for operating the sub-service nodes behind the target service node.
For example, it is determined that a target node searches for a target service node in a service flow corresponding to configuration, that is, a "start" node, and invokes the "start" node to process the start message, and after the "start" node finishes processing the start message, a start node message is generated for running a subsequent child service node.
S204, acquiring a response message generated by the target service node processing the message to be processed, and sending the response message as the message to be processed to a message queue.
In the embodiment of the invention, the response message generated by the target service node processing the message to be processed can be obtained, and the response message is sent to the message queue as the message to be processed, so that the business process can be circulated through the message.
For example, the target service node is a "start" node, whereby a start node message generated by the "start" node processing the start message can be acquired, and a response message generated by the start node message can be transmitted, and the response message can be transmitted.
Through the above description of the technical solution provided by the embodiment of the present invention, a to-be-processed message in a message queue is obtained, and a node search configuration map is determined, where the node search configuration map is generated based on a service flow, a target node search configuration in the node search configuration map is searched according to the to-be-processed message, the node search configuration in the node search configuration map corresponds to the service node in the service flow, the target node search configuration corresponding to the target service node in the service flow is determined, the target service node is called to process the to-be-processed message, a response message generated when the target service node processes the to-be-processed message is obtained, and the response message is sent to the message queue as the to-be-processed message.
The method comprises the steps of acquiring a message to be processed in a message queue, determining a target service node in a service flow, processing the message to be processed by the target service node in the service flow, acquiring a response message generated by the target service node in the service flow when the message to be processed is processed, and sending the response message to the message queue as the message to be processed.
As shown in fig. 3, an implementation flow diagram of another message processing method provided in the embodiment of the present invention is shown, where the method is applied to a server, and specifically includes the following steps:
s301, obtaining the message to be processed in the message queue, and determining the business process corresponding to the message to be processed.
In the embodiment of the invention, for the server, the message to be processed in the message queue can be obtained, and the business process corresponding to the message to be processed is determined.
For example, as shown in fig. 1, the server a obtains a to-be-processed message in a message queue, and determines a task approval process corresponding to the to-be-processed message.
S302, searching a node searching configuration map corresponding to the business process, wherein the node searching configuration map is generated based on the business process.
In the embodiment of the invention, for the server, a node searching configuration map corresponding to the business process can be searched, wherein the node searching configuration map is generated based on the business process.
For example, as shown in table 1 below, node search configuration maps corresponding to different business processes are different, and for a task approval process, a node search configuration map 1 corresponding to the task approval process may be searched.
Figure BDA0004020412220000081
Figure BDA0004020412220000091
TABLE 1
S303, analyzing the first key carried in the message to be processed, and searching the target node searching configuration from the node searching configuration map.
In the embodiment of the invention, the message to be processed carries the first key, and the node searching configuration in the node searching configuration map comprises the second key. For example, the pending message is a start node message, as shown below, wherein 1951 is the first key.
{
tag:1951,
The messageTime, the current time,
flowParams: the specific service parameters are set to be specific,
}
in addition, as shown below, each node search configuration in the node search configuration map includes a second key, which is the second key of 0, 1951, 1952_ branch 1, 1952_ branch 2, 1952_ branch 3, 1952_ other, 1953, etc. described below.
0- > begin (1951) node;
1951- > Attribute Condition (1952) node;
1952_ branch 1- > Activity in station (1953) node;
1952_ branch 2- > end (1954) node;
1952_ branch 3- > end (1955) node;
1952_ other- > end (1956) node;
1953- > end (1957) node.
Based on this, in the embodiment of the present invention, the first key carried in the message to be processed may be analyzed, and the target node search configuration may be searched from the node search configuration map, where the second key included in the target node search configuration is consistent with the first key, and the node search configuration in the node search configuration map corresponds to the service node in the service flow.
For example, as shown in fig. 1, the server a parses the first key, i.e., 1951, carried in the message to be processed, i.e., the start node message, and finds the target node finding configuration, i.e., 1951- > attribute condition (1952) node, including the second key, i.e., 1951, from the above point finding configuration map, so that it can be seen that the second key included in the target node finding configuration is consistent with the first key.
S304, analyzing the value contained in the target node searching configuration, and searching the target service node in the service flow corresponding to the value.
In the embodiment of the present invention, the node search configuration in the node search configuration map includes value, and the value corresponds to a service node in a service flow. Based on this, the value contained in the target node searching configuration can be analyzed, and the target service node in the service flow corresponding to the value can be searched.
For example, as shown in the node finding configuration map, for the target node finding configuration, i.e., 1951- > attribute condition (1952) node, the value, i.e., attribute condition (1952) node, is included in the service node corresponding to the attribute condition (1952) in the service flow, so that the value included in the target node finding configuration can be resolved, and the target service node in the service flow corresponding to the value, i.e., attribute condition (1952) node, can be found.
S305, calling the target service node to process the message to be processed.
In the embodiment of the present invention, this step is similar to the step S103, and details of the embodiment of the present invention are not repeated herein.
S306, acquiring a response message generated by the target service node processing the message to be processed, and sending the response message as the message to be processed to a message queue.
In the embodiment of the present invention, this step is similar to the step S104, and the details of the embodiment of the present invention are not repeated herein.
Through the above description of the technical solution provided by the embodiment of the present invention, a to-be-processed message in a message queue is obtained, a service flow corresponding to the to-be-processed message is determined, a node search configuration map corresponding to the service flow is searched for, a first key carried in the to-be-processed message is analyzed, a target node search configuration is searched for from the node search configuration map, wherein a second key included in the target node search configuration is consistent with the first key, a value included in the target node search configuration is analyzed, a target service node in the service flow corresponding to the value is searched for, the target service node is called to process the to-be-processed message, a response message generated by the target service node processing the to-be-processed message is obtained, and the response message is sent to the message queue as the to-be-processed message.
The method comprises the steps of acquiring a message to be processed in a message queue, determining a target service node in a service flow, processing the message to be processed by the target service node in the service flow, acquiring a response message generated by the target service node in the service flow when the message to be processed is processed, and sending the response message to the message queue as the message to be processed.
In addition, in the embodiment of the present invention, the service party may configure the service flow shown in fig. 4, and the system may generate the node search configuration map according to the service flow. Wherein, the node searches for the configuration map design: searching configured key generation rules by the nodes: the key may be, for example, 0 in the first half if the parent service node is a root service node, a parent service node ID in the case of a non-root service node, an empty string in the second half if the parent service node is a single branch, or a branch name in the case of a multi-branch parent service node. The key in the overall node finding configuration is: first half + "_" + second half, the value in the node-finding configuration is: a current service node object.
And (3) message body structure design:
Figure BDA0004020412220000111
message flow design:
after the business process is started, an initial message is generated, and the message structure is as follows:
{
tag:0,
the messageTime, the current time,
flowParams: the specific service parameters are set to be specific,
}
according to the initial message, searching nodes to search a configuration map, finding a starting node to process the message, and after the service logic processing of the starting node is finished, generating a starting node message for operating the subsequent sub-service nodes, wherein the starting node message has the following structure:
{
tag:1951,
the messageTime, the current time,
flowParams: the specific service parameters are set to be specific,
}
according to the message of the starting node, searching the node for searching the configuration map, finding the node with the attribute condition (1952) to process the message, and after the service logic processing of the node is finished, generating the node message of the attribute condition (1952) to run the subsequent sub service node, and assuming that the service logic judges to go to branch 1, the message structure of the node of the attribute condition (1952) is as follows:
{
tag: 1952-Branch 1,
the messageTime, the current time,
flowParams: the specific service parameters are set to be specific,
}
according to the attribute condition (1952) node message, searching the node for finding a configuration map, finding an active node (1953) in the station to process the message, and after the processing of the node service logic is finished, generating the node message for triggering the processing logic of the subsequent sub service node.
Based on the above, as shown in fig. 5, an implementation flow diagram of the method for generating a node searching configuration map provided in the embodiment of the present invention is shown, where the method is applied to a server, and specifically includes the following steps:
s501, acquiring a business process, and extracting a parent-child relationship between business nodes in the business process.
In the embodiment of the present invention, a service party may configure a service flow as shown in fig. 4, so that a server may obtain the service flow and extract a parent-child relationship between service nodes in the service flow.
For example, as shown in fig. 4, for the parent-child relationship between the start (1951) node and the attribute condition (1952) node, the start (1951) node can be considered a parent service node and the attribute condition (1952) node can be considered a child service node.
S502, generating nodes corresponding to the business process through the parent-child relationship to search for the configuration map.
In the embodiment of the invention, for the parent-child relationship among the service nodes in the service process, the nodes corresponding to the service process can be generated through the parent-child relationship to search the configuration map.
Aiming at any service node in the service process, searching a parent-child service node of the service node through a parent-child relationship; generating a node searching configuration corresponding to the service node according to the parent-child service node and the service node; and a node searching configuration map corresponding to the service process is formed by searching and configuring nodes corresponding to any service node in the service process.
Specifically, the node search configuration mode corresponding to the service node is generated as follows: determining the branch condition of the parent-child service node, and determining a target identifier according to the branch condition; acquiring the node identification of the parent-child service node, and forming a second key by the node identification of the parent-child service node and the target identification; and acquiring the node identification of the service node, and using the node identification of the service node as a value to form node searching configuration corresponding to the service node with the second key.
The way of determining the target identity is as follows: determining the branch identifier of the service node as a target identifier under the condition that the branch condition represents that the parent-child service node comprises a plurality of branches; and under the condition that the branch condition indicates that the parent-child service node comprises a single branch, determining a preset first character string as a target identifier.
The root service node is specially processed, so that a preset second character string is obtained under the condition that the service node is the root service node, and the preset second character string is determined as a second key; and acquiring the node identification of the service node, and using the node identification of the service node as a value to form node searching configuration corresponding to the service node with the second key.
Through the above description of the technical solution provided by the embodiment of the present invention, a service flow is obtained, a parent-child relationship between service nodes in the service flow is extracted, a node search configuration map corresponding to the service flow is generated through the parent-child relationship, a to-be-processed message in a message queue is subsequently obtained, and a node search configuration map is determined, where the node search configuration map is generated based on the service flow, according to the to-be-processed message, a target node search configuration in the node search configuration map is searched, the node search configuration in the node search configuration map corresponds to the service node in the service flow, the target node search configuration is determined to search a target service node in the service flow corresponding to the target node, the target service node is invoked to process the to-be-processed message, a response message generated by the target service node processing the to-be-processed message is obtained, and the response message is sent to the message queue as the to-be-processed message.
The method comprises the steps of acquiring a message to be processed in a message queue, determining a target service node in a service flow, processing the message to be processed by the target service node in the service flow, acquiring a response message generated by the target service node in the service flow when the message to be processed is processed, and sending the response message to the message queue as the message to be processed.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a message processing apparatus, and as shown in fig. 6, the apparatus may include: the map information processing system comprises a message acquisition module 610, a map determination module 620, a configuration search module 630, a node determination module 640, a message processing module 650 and a message sending module 660.
A message acquiring module 610, configured to acquire a message to be processed in a message queue;
a map determining module 620, configured to determine a node-finding configuration map, where the node-finding configuration map is generated based on a business process;
a configuration searching module 630, configured to search, according to the to-be-processed message, a target node searching configuration in the node searching configuration map, where the node searching configuration in the node searching configuration map corresponds to a service node in a service flow;
a node determining module 640, configured to determine that the target node searches for a target service node in the service flow corresponding to the configuration;
the message processing module 650 is configured to invoke the target service node to process the message to be processed;
a message sending module 660, configured to obtain a response message generated by the target service node processing the message to be processed, and send the response message as the message to be processed to the message queue.
The embodiment of the present invention further provides an electronic device, as shown in fig. 7, which includes a processor 71, a communication interface 72, a memory 73 and a communication bus 74, where the processor 71, the communication interface 72, and the memory 73 complete mutual communication through the communication bus 74,
a memory 73 for storing a computer program;
the processor 71, when executing the program stored in the memory 73, implements the following steps:
acquiring messages to be processed in a message queue, and determining a node searching configuration map, wherein the node searching configuration map is generated based on a business process; searching a target node searching configuration in the node searching configuration map according to the message to be processed, wherein the node searching configuration in the node searching configuration map corresponds to a service node in a service process; determining the target node to search and configure a corresponding target service node in the service flow, and calling the target service node to process the message to be processed; and acquiring a response message generated by the target service node when the target service node processes the message to be processed, and sending the response message as the message to be processed to the message queue.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a storage medium is further provided, where instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the message processing method in any one of the above embodiments.
In yet another embodiment, the present invention further provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the message processing method described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A method of message processing, the method comprising:
acquiring messages to be processed in a message queue, and determining a node searching configuration map, wherein the node searching configuration map is generated based on a business process;
searching a target node searching configuration in the node searching configuration map according to the message to be processed, wherein the node searching configuration in the node searching configuration map corresponds to a service node in a service process;
determining the target node to search and configure a corresponding target service node in the service flow, and calling the target service node to process the message to be processed;
and acquiring a response message generated by the target service node when the target service node processes the message to be processed, and sending the response message as the message to be processed to the message queue.
2. The method of claim 1, wherein determining the node to find the configuration map comprises:
and determining a business process corresponding to the message to be processed, and searching a node corresponding to the business process for a configuration map.
3. The method according to claim 1, wherein the message to be processed carries a first key, and the node search configuration in the node search configuration map comprises a second key;
the searching for the target node searching configuration in the node searching configuration map according to the message to be processed includes:
analyzing the first key carried in the message to be processed, and searching a target node searching configuration from the node searching configuration map;
wherein the second key included in the target node searching configuration is consistent with the first key.
4. The method of claim 1, wherein the node-finding configuration in the node-finding configuration map comprises a value, wherein the value corresponds to a service node in a service flow;
the determining that the target node searches for and configures a target service node in the service process corresponding to the target node includes:
analyzing the value contained in the target node searching configuration, and searching the target service node in the service flow corresponding to the value.
5. The method of claim 1, further comprising, prior to performing the method:
acquiring a service flow and extracting a parent-child relationship between service nodes in the service flow;
and generating a node searching configuration map corresponding to the business process through the parent-child relationship.
6. The method of claim 5, wherein generating the node-finding configuration map corresponding to the business process through the parent-child relationship comprises:
searching a parent-child service node of the service node through the parent-child relationship aiming at any service node in the service process;
generating node searching configuration corresponding to the service node according to the parent-child service node and the service node;
and the node searching configuration corresponding to any service node in the service process forms a node searching configuration map corresponding to the service process.
7. The method of claim 6, wherein the generating a node finding configuration corresponding to the service node according to the parent service node and the child service node comprises:
determining the branch condition of the parent-child service node, and determining a target identifier according to the branch condition;
acquiring the node identification of the parent-child service node, and forming a second key by the node identification of the parent-child service node and the target identification;
and acquiring the node identification of the service node, and forming node searching configuration corresponding to the service node by using the node identification of the service node as value and the second key.
8. The method of claim 7, wherein determining a target identifier based on the branch condition comprises:
determining the branch identifier of the service node as a target identifier under the condition that the branch condition represents that the parent-child service node comprises a plurality of branches;
and determining a preset first character string as a target identifier under the condition that the branch condition represents that the parent-child service node comprises a single branch.
9. The method of claim 6, wherein the generating a node finding configuration corresponding to the service node according to the parent service node and the child service node comprises:
under the condition that the service node is a root service node, acquiring a preset second character string, and determining the preset second character string as a second key;
and acquiring the node identification of the service node, and forming node searching configuration corresponding to the service node by using the node identification of the service node as value and the second key.
10. A message processing apparatus, characterized in that the apparatus comprises:
the message acquisition module is used for acquiring the messages to be processed in the message queue;
the map determining module is used for determining a node searching configuration map, wherein the node searching configuration map is generated based on a business process;
the configuration searching module is used for searching a target node searching configuration in the node searching configuration map according to the message to be processed, wherein the node searching configuration in the node searching configuration map corresponds to a service node in a service process;
the node determining module is used for determining that the target node searches for and configures a target service node in the corresponding service process;
the message processing module is used for calling the target service node to process the message to be processed;
and the message sending module is used for acquiring a response message generated by the target service node processing the message to be processed, and sending the response message as the message to be processed to the message queue.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 9 when executing a program stored in a memory.
12. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202211688796.5A 2022-12-27 2022-12-27 Message processing method and device, electronic equipment and storage medium Pending CN115827280A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211688796.5A CN115827280A (en) 2022-12-27 2022-12-27 Message processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211688796.5A CN115827280A (en) 2022-12-27 2022-12-27 Message processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115827280A true CN115827280A (en) 2023-03-21

Family

ID=85518672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211688796.5A Pending CN115827280A (en) 2022-12-27 2022-12-27 Message processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115827280A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118012917A (en) * 2024-04-09 2024-05-10 无码科技(杭州)有限公司 Data stream processing method, scheduling controller and distributed data stream processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118012917A (en) * 2024-04-09 2024-05-10 无码科技(杭州)有限公司 Data stream processing method, scheduling controller and distributed data stream processing system
CN118012917B (en) * 2024-04-09 2024-06-11 无码科技(杭州)有限公司 Data stream processing method, scheduling controller and distributed data stream processing system

Similar Documents

Publication Publication Date Title
CN112868004B (en) Resource recommendation method and device, electronic equipment and storage medium
US20180365254A1 (en) Method and apparatus for processing information flow data
JP2012137908A (en) Clustering device and clustering method
EP3974960A1 (en) Method and system for automated testing of web service apis
CN115023697A (en) Data query method and device and server
CN115470318A (en) Customer service problem processing method and device
CN111026765A (en) Dynamic processing method, equipment, storage medium and device for strictly balanced binary tree
CN115827280A (en) Message processing method and device, electronic equipment and storage medium
CN110888672B (en) Expression engine implementation method and system based on metadata architecture
CN110929173A (en) Method, device, equipment and medium for identifying same person
CN109213972B (en) Method, device, equipment and computer storage medium for determining document similarity
CN113761565B (en) Data desensitization method and device
CN108287859B (en) Multimedia information retrieval method and device
CN106202456B (en) Send the method and device of picture
CN111191103B (en) Method, device and storage medium for identifying and analyzing enterprise subject information from internet
CN110336731B (en) User matching method and device in group
CN114449031B (en) Information acquisition method, device, equipment and storage medium
CN103856535B (en) A kind of method and apparatus obtaining user data
CN107016296B (en) Data index construction method, data index reading method, data index construction device, data reading device and electronic equipment
CN113220949B (en) Construction method and device of private data identification system
CN111460088A (en) Similar text retrieval method, device and system
CN109977176B (en) Data processing method and device
JP6333306B2 (en) SEARCH DATA MANAGEMENT DEVICE, SEARCH DATA MANAGEMENT METHOD, AND SEARCH DATA MANAGEMENT PROGRAM
CN114490095B (en) Request result determination method and device, storage medium and electronic device
CN116166685A (en) Method, device, computer equipment and storage medium for matching offer object information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination