Message processing method, device and storage medium based on message middleware

By introducing a decentralized structure into the message middleware and directly processing or forwarding messages using the message bus process module, the problem of message service nodes becoming bottlenecks and reliability risks under the centralized structure is solved, and high-performance and low-latency messages are achieved deal with.

CN114385374BActive Publication Date: 2024-12-10SHENZHEN KANGBIDA CONTROL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111296732.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-03
Publication Date
2024-12-10
Estimated Expiration
2041-11-03

AI Technical Summary

Technical Problem

The existing message processing methods are based on a centralized structure, which leads to message service nodes becoming performance bottlenecks and reliability risk points, and excessive network traffic leads to low reliability.

Method used

Adopting a decentralized message middleware structure, each network node contains a message bus process module and a user process module, which is connected to each other through a message bus process module. The message to be sent carries relevant information about the target network node and user process, and is directly on this network. Processing or forwarding within the node to avoid passing through the message service node.

Benefits of technology

It realizes high performance, high reliability, low network traffic and low latency message processing, which is suitable for application in industrial field monitoring systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114385374B_ABST
    Figure CN114385374B_ABST
Patent Text Reader

Abstract

The present invention provides a message processing method, device and storage medium based on message middleware, wherein the message middleware includes a plurality of network nodes, each of which includes a message bus process module and a plurality of user process modules connected to the message bus process module, and the message bus process modules of each network node are connected to each other to form a message middleware with a decentralized deployment structure. Thus, when performing the message processing process, the present invention determines which network node in the message middleware is the target network node through the relevant information of the target network node and the target user process carried by the message to be sent, and transmits only through the message bus process module and the plurality of user process modules during the entire message sending and receiving process, without passing through the message service node, thereby overcoming the above-mentioned problems of the centralized structure, having the advantages of high performance, high reliability, low network traffic and low latency, and being suitable for application in industrial field monitoring systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of message processing, and in particular to a message processing method, device and storage medium. Background Art

[0002] At present, message middleware systems mainly adopt centralized deployment structures, such as Kafka, RabbitMQ, etc. Figure 1 As shown in the figure. The network nodes in the system are divided into user nodes (processes that run and receive messages using message middleware, called user processes) and message service nodes (nodes that provide message transfer services and run message service programs). The so-called network nodes refer to networked devices that run these programs, such as computers, embedded devices, etc. Each user process of the user node is connected to the message service node, and there is no mutual connection between the user nodes and processes. The user process sends the message to the message service node, and the message service node then forwards the message to the user process that needs the message.

[0003] The above message transmission structure is a centralized structure, which is heavily dependent on the message service node. The message service node is likely to become the performance bottleneck of the entire system and the reliability risk point. If the message service node fails, the entire system will be paralyzed.

[0004] In addition, the centralized structure needs to be transferred through the message service node, which amplifies the network traffic and increases the message delay. For example, when user node 1 sends a message to user node 2, it must first be sent to the message service node, and then forwarded by the message service node. This forwarding process greatly accumulates network traffic on the message service node. As a result, the existing message processing method has a technical problem of low reliability due to excessive network traffic.

[0005] Therefore, the prior art needs to be improved. Summary of the invention

[0006] The main purpose of the present invention is to propose a message processing method, device and storage medium based on message middleware, so as to at least solve the technical problem of low reliability caused by excessive network traffic in the existing message processing method.

[0007] In a first aspect of the present invention, a message processing method based on a message middleware is provided, wherein the message middleware comprises a plurality of network nodes, each of which comprises a message bus process module and a plurality of user process modules connected to the message bus process module; the message bus process modules of each network node are connected to each other; the method is applied to each of the network nodes, comprising:

[0008] The user process module obtains the message to be sent and sends the message to be sent to the message bus process module of the network node; wherein the message to be sent carries relevant information of the target network node and the target user process;

[0009] When receiving the message to be sent from the network node, the message bus process module determines whether the relevant information of the target network node belongs to the message to be received by the network node; when the judgment result is yes, the message bus process module sends the message to be sent to the user process module corresponding to the relevant information of the target user process in the network node; when the judgment result is no, the message to be sent is sent to the message bus process module of the corresponding network node;

[0010] When receiving the message to be sent from other network nodes, the message bus process module forwards the message to be sent to the user process module corresponding to the relevant information of the target user process in the network node where the message bus process module is located.

[0011] A second aspect of the present invention provides an electronic device, including a memory, a processor and a bus;

[0012] The bus is used to realize the connection and communication between the memory and the processor;

[0013] The processor is used to execute the computer program stored in the memory;

[0014] When the processor executes the computer program, the steps in the message processing method provided in the first aspect are implemented.

[0015] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps in the message processing method provided in the first aspect are implemented.

[0016] The present invention provides a message processing method, device and storage medium based on message middleware, wherein the message middleware includes a plurality of network nodes, each network node includes a message bus process module and a plurality of user process modules connected to the message bus process module, and the message bus process modules of each network node are connected to each other, thereby forming a message middleware with a decentralized deployment structure. Each network node in the system has an equal identity, and establishes a network connection with each other, without a central node. Therefore, when performing the message processing process, the present invention determines which network node in the message middleware is the target network node through the relevant information of the target network node and the target user process carried by the message to be sent, and transmits only through the message bus process module and the plurality of user process modules in the entire message sending and receiving process, without passing through the message service node, thereby overcoming the above-mentioned problems of the centralized structure, having the advantages of high performance, high reliability, low network traffic and low latency, and being suitable for application in industrial field monitoring systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 The centralized deployment structure used for message transmission mentioned in the background technology;

[0019] Figure 2 A schematic diagram of the system structure of the message middleware in the present invention;

[0020] Figure 3 It is a schematic diagram of the structure of a network node in the message middleware of the present invention;

[0021] Figure 4 A schematic diagram of a flow chart of a message processing method based on message middleware provided in the first embodiment of the present invention;

[0022] Figure 5 A flow chart of a message processing method based on message middleware provided in the second embodiment of the present invention;

[0023] Figure 6 A schematic diagram of a flow chart of a message processing method based on message middleware provided in a fourth embodiment of the present invention;

[0024] Figure 7 This is a schematic diagram of module connections within an electronic device provided by a fifth embodiment of the present invention.

[0025] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0026] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0027] It should be noted that related terms such as "first", "second", etc. can be used to describe various components, but these terms do not limit the components. These terms are only used to distinguish one component from another component. For example, without departing from the scope of the present invention, a first component can be referred to as a second component, and the second component can also be referred to as a first component similarly. The term "and / or" refers to any one or more combinations of related items and description items.

[0028] The message processing method based on message middleware provided by the present invention is applicable to Figure 2 The message middleware shown has multiple network nodes with consistent structures. Each network node includes a message bus process module and several user process modules connected to the message bus process module. The message bus process modules of each network node are connected to each other, thereby forming a message middleware with a decentralized deployment structure. From the system structure of the above message middleware, it can be seen that through the two structural settings of the message bus process module and the user process module, there is no traditional message service node, which overcomes the above problems of the centralized structure, has the advantages of high performance, high reliability, low network traffic, and low latency, and is suitable for application in industrial field monitoring systems.

[0029] Figure 3 A schematic flow chart of a message processing method based on message middleware according to a first embodiment of the present invention is shown. The method includes:

[0030] Step S301, a user process module obtains a message to be sent and sends the message to be sent to a message bus process module of the network node; wherein the message to be sent carries relevant information of a target network node and a target user process;

[0031] In this embodiment, the target network node represents the network node corresponding to the message to be sent, that is, the target network node is a network node that needs to process the information to be sent, and the relevant information of the target network node can be the name, number, etc. of the target network node, and the relevant information of the target user process can be the name, number, etc. of the target user process module. The relevant information is not specifically limited here.

[0032] Step S302, when the message bus process module receives the message to be sent from the network node, it determines whether the relevant information of the target network node belongs to the message to be received by the network node; if the judgment result is yes, the message bus process module sends the message to be sent to the user process module corresponding to the relevant information of the target user process in the network node; if the judgment result is no, the message to be sent is sent to the message bus process module of the corresponding network node;

[0033] Step S303, when the message bus process module receives a message to be sent from another network node, it forwards the message to be sent to a user process module corresponding to the relevant information of the target user process in the network node where the message bus process module is located.

[0034] In this embodiment, each network node is in the same message domain, which is a pre-defined (configured) collection of network nodes. The configuration of a message domain includes the unique name of each network node (such as a host name) and the IP address of each network node. In other words, in the message domain, each network node implements data transmission based on each IP address, without relying on traditional message service nodes for forwarding.

[0035] Therefore, when each network node in the present invention is performing the message processing process, it makes a judgment based on the relevant information of the target network node and the target user process carried by the message to be sent. When it is determined that the message to be sent does not belong to the message to be received in this network node (which means that the remaining network nodes in the message domain are the target network nodes), the message bus process module of this network node sends the message to be sent to the message bus process module of the corresponding network node. In other words, if the sender and receiver of the message are both in the same node, the message is forwarded by the message bus service process in this network node, that is, the interaction is within the local machine without passing through the network. In the traditional centralized structure, it needs to be forwarded through the message service node and needs to pass through the network. Therefore, this message middleware reduces network traffic and communication delay. It has the advantages of high performance, high reliability, low network traffic and low delay, and is suitable for application in industrial field monitoring systems.

[0036] Figure 4 A flow chart of a message processing method based on a message middleware according to a second embodiment of the present invention is shown. The second embodiment limits the relevant information of the message to be sent and the target network node in the first embodiment. The message to be sent includes a point-to-point message, and the relevant information of the target network node includes the name of the target node; and the second embodiment also limits the step of determining whether the relevant information of the target network node belongs to the message to be received by the network node, which includes:

[0037] Step S401, the message bus process module identifies the target node name from the relevant information of the target network node;

[0038] Step S402, the message bus process module matches the target node name with the current network node name to obtain a matching result;

[0039] Step S403: the message bus process module determines whether the point-to-point message belongs to the message to be received by the current network node according to the matching result.

[0040] Specifically, when the message to be sent includes a point-to-point message, the local process processing module in the network node identifies the target node name from the relevant information of the target network node, and then the local process processing module in the network node matches the target node name with the network node name to obtain a matching result. The matching result obtained can be a matching result in which the target node name is equal to the network node name, or a matching result in which the target node name is not equal to the network node name, so that the local process processing module in the network node detects whether the point-to-point message belongs to the message to be received in the network node according to the matching result. In the above-mentioned point-to-point message transmission process, the attribution determination of the point-to-point message is completed accurately and quickly through the target node name.

[0041] In this embodiment, the relevant information of the target user process includes the name of the target user process, and the step of the message bus process module sending the message to be sent to the user process module corresponding to the relevant information of the target user process in the network node includes:

[0042] Step S404, the message bus process module identifies the target user process name according to the relevant information of the target user process;

[0043] Step S405: the message bus process module sends the message to be sent to the user process module corresponding to the target user process name in the network node.

[0044] Specifically, during the transmission of a point-to-point message, the relevant information in the point-to-point message may also include the target user process name. Since each network node has a unique node name in the message domain, and each user process has a unique process name in the node, a unique receiving address can be determined. In other words, the target network node is determined by the target user process name, so that the message bus process module of the network node will accurately send the message to be sent to the user process module corresponding to the target user process name in the network node.

[0045] In this embodiment, before the step of sending the message to be sent to the message bus process module of the corresponding network node, the method further includes:

[0046] Step S406, the message bus process module in the network node obtains the communication connection status of the message bus process module of the corresponding network node;

[0047] Step S407, when the communication connection state is in a disconnected state, the message bus process module in the network node deletes the point-to-point message;

[0048] Step S408, when the communication connection state is in the connected state, the message bus process module in the network node sends the point-to-point message to the message bus process module of the network node corresponding to the target node name.

[0049] Specifically, after the message bus process module of the current network node obtains the point-to-point message, the message bus process module of the current network node needs to obtain the communication connection status of the message bus process module of the corresponding network node, and the communication connection status indicates whether the message bus process module of the corresponding network node is in an online state. Obviously, when the communication connection status is an unconnected state, it indicates that the message bus process module of the corresponding network node is in an offline state. And when the communication connection status is a connected state, it indicates that the message bus process module of the corresponding network node is in an online state. Therefore, before the message bus process module of the current network node transmits the point-to-point message to the message bus process module of the corresponding network node, it determines whether the point-to-point message needs to be sent based on the communication connection status, thereby reducing the transmission power consumption to a certain extent.

[0050] like Figure 5 As shown, the message bus process module has a remote node processing module and a local process processing module, and the user process module has an in-process proxy module and a communicator. Among them, the local process processing module identifies the target node name from the relevant information of the target network node, and the local process processing module matches the target node name with the name of the network node to obtain a matching result. The local process processing module determines whether the point-to-point message belongs to the message to be received of the network node according to the matching result. The local process processing module identifies the target user process name according to the relevant information of the target user process, and the local process processing module sends the message to be sent to the user process module corresponding to the target user process name in the network node. And the in-process proxy module obtains the communication connection status of the message bus process module of the corresponding network node. When the communication connection status is in an unconnected state, the in-process proxy module in the network node deletes the point-to-point message. When the communication connection status is in a connected state, the in-process proxy module in the network node sends the point-to-point message to the message bus process module of the network node corresponding to the target node name.

[0051] Several user process modules in each network node all have a communicator, and the message to be sent also carries the name of the target communicator. The step of forwarding the message to be sent to the user process module corresponding to the relevant information of the target user process in the network node where the message is located includes: the message bus process module identifies the target communicator name according to the message to be sent, and the message bus process module forwards the message to be sent to the communicator corresponding to the target communicator name in the network node where the message is located. Specifically, when receiving the message to be sent, the network node gives the target communicator name through the message bus process module and forwards the message to be sent to the communicator corresponding to the target communicator name in the network node where the message is located, thereby realizing the transmission of the message to be sent in the network node without passing through the message service node. Among them, the communicator module, as a terminal unit of the message bus, can also be used for operations such as sending and receiving messages of user codes, adding, deleting, modifying and checking subscriptions, etc.

[0052] Figure 6 A flow chart of a message processing method based on a message middleware according to a third embodiment of the present invention is shown. In the third embodiment, the message bus process module further includes a local process subscription management module, and the message to be sent also includes a subscription message with a subject; that is, each network node is also applicable to the publish-subscribe mode. The step of determining whether the relevant information of the target network node belongs to the message to be received of the network node includes:

[0053] Step S601, the message bus process module sends the subscription message to the local process subscription management module;

[0054] Step S602, the local process subscription management module identifies the topic from the subscription message;

[0055] The local process subscription management module determines whether the message to be sent belongs to the message to be received by the network node according to the topic.

[0056] Among them, the topic can be a topic name, such as power monitoring subsystem or fire protection subsystem; the topic is an attribute of the subscription message, which is set by the user code when sending the message according to the actual meaning of the business. The user code can set any number of topics of interest to the communicator according to its business needs, which is called subscription. The communicator will subsequently receive messages that match its subscription. In short, the topic can be used to quickly and easily determine whether the information to be sent is the information to be received by the first network node.

[0057] In this embodiment, the subject may also include the subsystem name and the channel segment name. Specifically, the subject may be a multi-segment row format, such as "xxx.xxx.xxx" can be extended to any number of segments. Currently, a two-end subject is used, which is "subsystem.channel". First, each segment is matched separately. If they are equal, they are matched, and if they are not equal, they are not matched; then the logical AND of the matching results of each segment is calculated, that is, if all segments match, the whole is matched. When subscribing, you can set "all" for any segment, and the segment will match any value. Assuming that the subject of a message is "Power Monitoring Subsystem. Measurement Point Data Change Channel", the matching results of the subscription are shown in Table 1 below:

[0058] Table 1

[0059]

[0060] The communicator can subscribe to any number of topics, and as long as one subscription matches the topic of the message, the communicator will receive the message. Assuming that the topic of a message is "Video Subsystem. Alarm Channel", the subscriptions added to the communicator are as shown in the following table, whether the communicator will receive this message is shown in Table 2:

[0061] Table 2

[0062]

[0063] The local process subscription management module determines whether the message to be sent belongs to the message to be received by the network node according to the topic, including:

[0064] Step S603, the local process subscription management module determines the overall subscription matching degree of the topic according to the subsystem name and the channel segment name;

[0065] Step S604: the local process subscription management module determines whether the message to be sent belongs to the message to be received by the network node according to the overall subscription matching degree.

[0066] Specifically, the local process subscription management module in the network node extracts the first subscription message and the second subscription message (the first subscription message and the second subscription message are information pre-stored in the local process subscription management module, which can feedback the subscription messages subscribed in the network node), matches the first subscription message with the subsystem name, and matches the second subscription message with the subsystem name; from Table 2 above, when the subsystem name matches correctly and the channel segment name matches correctly, the overall subscription matching degree is correct matching. When the subsystem name matches and at least one of the channel segment names matches incorrectly, the overall subscription matching degree is a matching error.

[0067] In this embodiment, the message bus process module also has a remote node subscription management module;

[0068] The step of sending the message to be sent to the message bus process module of the corresponding network node includes:

[0069] Step S605, the message bus process module sends the subscription message to the remote node processing module of the network node;

[0070] Step S606, the remote node processing module of the network node detects whether the target network node subscribes to the subscription message;

[0071] Step S607: When the target network node subscribes to the subscription message, the remote node processing module of the network node sends the subscription message to the target network node.

[0072] In this embodiment, when the local process subscription management module in the network node detects that the subscription message does not belong to the to-be-received message of the network node according to the overall subscription matching degree (indicating that the subscription message should be the to-be-received message of other network nodes), the local process processing module in the network node sends the subscription message to the remote node processing module in the network node, the local process processing module in the network node sends the subscription message to the remote node subscription management module in the network node, the remote node subscription management module in the network node detects whether the other network nodes subscribe to the subscription message (it should be noted that when there are other network nodes that subscribe to the subscription message, it indicates that the communicator in the other network nodes has a subscribed topic), if the other network nodes subscribe to the subscription message, the remote node subscription management module in the network node sends the subscription message to the target network node. In this way, the rapid transmission of subscription messages between different network nodes is completed.

[0073] In this embodiment, a communicator management subscription module is provided in the user process module. When the target network node is not subscribing to the subscription message, the following steps are performed:

[0074] Step S608, the remote node processing module of the network node sends the subscription message to the in-process proxy module of the network node;

[0075] Step S609, the in-process proxy module of the network node obtains the communicator that has subscribed to the subscription message through the communicator management subscription module;

[0076] Step S610: the in-process proxy module of the network node sends the subscription information to the communicator that has subscribed to the subscription message.

[0077] Therefore, when the target network node does not subscribe to the subscription message (indicating that the subscription message is the information to be received by this network node), based on the remote node processing module, the communicator management subscription module, and the communicator in this network node, information transmission in a network node is realized. The subscription message does not need to pass through the message service node, effectively reducing low network traffic.

[0078] It can be seen that, whether in point-to-point mode or subscription-publishing mode, if the sender and receiver of the message are in the same node, the message is forwarded by the message bus service process (local process processing module) in the node, that is, the interaction is done locally without going through the network. In a centralized structure, the message needs to be forwarded through the message service node and needs to go through the network. Therefore, this message middleware reduces network traffic and communication delay.

[0079] In addition, for the subscription and publishing mode, in cross-node communication, no matter how many processes or communicators in a node subscribe to a message, only one copy will be transmitted to the node through the network, and then distributed to each target user process by the message bus service process in the node, and then distributed to each communicator by the in-process proxy module. Therefore, this message middleware reduces network traffic and avoids network congestion.

[0080] In this embodiment, when each network node is in the subscription and publishing mode (during the transmission of subscription information), the following steps are also included: the communicator receives the user's subscription adjustment instruction, the communicator sends the subscription adjustment instruction to the in-process proxy module, the in-process proxy module controls the communicator subscription management module to modify the communicator's subscription information, and obtains a first feedback result, the in-process proxy module determines whether this modification causes a change in the overall subscription situation of this process based on the feedback result, and if so, sends the information of the overall subscription change of this process to the message bus process module of this network node, the local process processing module controls the local process subscription management module to modify the subscription information, and obtains a second feedback result, the local process processing module determines whether this modification causes a change in the overall subscription situation of this network node based on the second feedback result, and if so, sends the information of this subscription change to the remote node processing module, the remote node processing module sends the information of this subscription change to the remote node processing modules of the remaining network nodes, and the remote node processing modules of the remaining network nodes operate the remote node subscription management module to modify the subscription information.

[0081] Among them, "the overall subscription status of this process" refers to the deduplicated (removed) set of subscriptions of all communicators in this process. For example, the following table 3:

[0082] Table 3

[0083]

[0084] The same applies to the "overall subscription status of this node". In addition, the subscription change message and heartbeat message between the user process and the message service process of this node, as well as between nodes, carry the sender's subscription change version number, which increases continuously by 1 for each change. When the receiver finds that the version number is discontinuous, it means that an abnormality has occurred, and the receiver requests all its subscription information from the sender.

[0085] In this embodiment, it also includes: after the message bus service process module of the network node is started, the names and IP addresses of the remaining network nodes in the message domain are obtained from the message domain configuration, the TCP client in the remote node processing module of the network node initiates a TCP connection to the corresponding network node, and determines whether the connection is successful. If successful, the remote node processing module sends a heartbeat message (the heartbeat message contains the local name and the subscription change version number). When the remaining network nodes receive the heartbeat message, the remote node management module of the remaining network nodes records that the subscription change version number of the network node is invalid, or is not equal to that in the heartbeat message, and elaborates a message requesting all subscription information, enters the sending queue to the network node, if the TCP client of the remaining network nodes corresponding to the network node has not established a connection, then initiates a connection to the network node, if it is connected, then sends a message requesting all subscription information, the remaining network nodes receive the recovery of all subscription information of the network node, set the connection state of the network node in the management information to be connected, operate the remote node subscription management unit, record the subscription information and subscription change version number of the network node, and set the version number to be valid. The above steps are the online process of each network node.

[0086] In this embodiment, it also includes: when the message bus service process module of this network node actively exits, the remote node processing module sends the network node exit message to the remaining connected network nodes, and when the remaining network nodes receive the network node exit message or fail to receive the heartbeat message due to timeout, the remaining network nodes set the connection status of the network node in the management information to the unconnected state, operate the remote node subscription management module to delete all subscription messages of this network node, and set its subscription version number to invalid. Disconnect the connection established between the TCP server and the TCP client and the network node, and the remaining network nodes correspond to the TCP client of the network node and connect every preset time period. The above steps are the offline process of each network node.

[0087] Figure 7 The electronic device provided by the fifth embodiment of the present invention is shown, and the electronic device can be used to implement the message processing method in any of the above embodiments. The electronic device includes:

[0088] The memory 701, the processor 702, the bus 703, and the computer program stored in the memory 701 and executable on the processor 702, the memory 701 and the processor 702 are connected via the bus 703. When the processor 702 executes the computer program, the message processing method in the aforementioned embodiment is implemented. The number of processors may be one or more.

[0089] The memory 701 may be a high-speed random access memory (RAM) memory, or a non-volatile memory (non-volatile memory), such as a disk memory. The memory 701 is used to store executable program codes, and the processor 702 is coupled to the memory 701 .

[0090] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, which may be disposed in the electronic device in each of the above embodiments, and the computer-readable storage medium may be a memory.

[0091] The computer readable storage medium stores a computer program, and when the program is executed by the processor, the message processing method based on the message middleware in the above-mentioned embodiment is implemented. Furthermore, the computer storable medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a RAM, a magnetic disk or an optical disk, etc., which can store program codes.

[0092] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0093] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0094] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0095] If the integrated module is implemented in the form of a software function module 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 the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned readable storage medium includes: U disk, mobile hard disk, ROM, RAM, disk or CD-ROM and other media that can store program codes.

[0096] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0097] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0098] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A message processing method based on message middleware, characterized in that: The message middleware includes a plurality of network nodes, each of which includes a message bus process module and a plurality of user process modules connected to the message bus process module; the message bus process modules of each network node are connected to each other; The method is applied to each of the network nodes, comprising: The user process module obtains the message to be sent and sends the message to be sent to the message bus process module of the network node; wherein the message to be sent carries relevant information of the target network node and the target user process; the message to be sent includes a point-to-point message; When receiving the message to be sent from the network node, the message bus process module determines whether the relevant information of the target network node belongs to the message to be received by the network node; wherein the relevant information of the target network node includes the name of the target node; accordingly, the step of determining whether the relevant information of the target network node belongs to the message to be received by the network node comprises: the message bus process module identifies the name of the target node from the relevant information of the target network node; the message bus process module matches the name of the target node with the name of the network node to obtain a matching result; the message bus process module determines whether the point-to-point message belongs to the message to be received by the network node according to the matching result; When the judgment result is yes, the message bus process module sends the message to be sent to the user process module corresponding to the relevant information of the target user process in the network node; when the judgment result is no, the message to be sent is sent to the message bus process module of the corresponding network node; When receiving the message to be sent from other network nodes, the message bus process module forwards the message to be sent to the user process module corresponding to the relevant information of the target user process in the network node where the message bus process module is located.

2. The message processing method based on message middleware as claimed in claim 1, characterized in that: The relevant information of the target user process includes the target user process name; The step of the message bus process module sending the message to be sent to the user process module corresponding to the relevant information of the target user process in the network node includes: The message bus process module identifies the target user process name according to the relevant information of the target user process; The message bus process module sends the message to be sent to the user process module corresponding to the target user process name in the network node.

3. The message processing method based on message middleware as claimed in claim 2, characterized in that: Before the step of sending the message to be sent to the message bus process module of the corresponding network node, the method further includes: The message bus process module in the network node obtains the communication connection status of the message bus process module of the corresponding network node; When the communication connection state is in a disconnected state, the message bus process module in the network node deletes the point-to-point message; When the communication connection state is in the connected state, the message bus process module in the network node sends the point-to-point message to the message bus process module of the network node corresponding to the target node name.

4. The message processing method based on message middleware as claimed in claim 3, characterized in that: Several user process modules in each network node have a communicator, and the message to be sent also carries the name of the target communicator; The step of forwarding the message to be sent to a user process module corresponding to the relevant information of the target user process in the network node where the message is located comprises: The message bus process module identifies the name of the target communicator according to the message to be sent; The message bus process module forwards the message to be sent to the communicator corresponding to the target communicator name in the network node where the message bus process module is located.

5. The message processing method based on message middleware as claimed in claim 1, characterized in that: The message bus process module also has a local process subscription management module, and the message to be sent also includes a subscription message with a subject; The step of determining whether the relevant information of the target network node belongs to the message to be received by the network node includes: The message bus process module sends the subscription message to the local process subscription management module; The local process subscription management module identifies the subject from the subscription message; The local process subscription management module determines whether the message to be sent belongs to the message to be received by the network node according to the topic.

6. The message processing method based on message middleware as claimed in claim 5, characterized in that: The subject includes a subsystem name and a channel segment name; The step of the local process subscription management module determining whether the message to be sent belongs to a message to be received by the network node according to the topic includes: The local process subscription management module determines the overall subscription matching degree of the topic according to the subsystem name and the channel segment name; The local process subscription management module determines whether the message to be sent belongs to the message to be received by the network node according to the overall subscription matching degree.

7. The message processing method based on message middleware as claimed in claim 6, characterized in that: The message bus process module also has a remote node subscription management module; The step of sending the message to be sent to the message bus process module of the corresponding network node includes: The message bus process module sends the subscription message to the remote node processing module of the network node; The remote node processing module of the network node detects whether the target network node subscribes to the subscription message; When the target network node subscribes to the subscription message, the remote node processing module of the network node sends the subscription message to the target network node.

8. An electronic device, characterized in that: Includes memory, processor and bus; The bus is used to realize the connection and communication between the memory and the processor; The processor is used to execute the computer program stored in the memory; When the processor executes the computer program, the steps in the method according to any one of claims 1 to 7 are implemented.

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