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

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

Info

Publication number
CN116980839A
CN116980839A CN202210460508.4A CN202210460508A CN116980839A CN 116980839 A CN116980839 A CN 116980839A CN 202210460508 A CN202210460508 A CN 202210460508A CN 116980839 A CN116980839 A CN 116980839A
Authority
CN
China
Prior art keywords
message
application program
middleware
communication protocol
message middleware
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
CN202210460508.4A
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.)
Jingdong Allianz Property Insurance Co ltd
Original Assignee
Jingdong Allianz Property Insurance 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 Jingdong Allianz Property Insurance Co ltd filed Critical Jingdong Allianz Property Insurance Co ltd
Priority to CN202210460508.4A priority Critical patent/CN116980839A/en
Publication of CN116980839A publication Critical patent/CN116980839A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services

Abstract

The disclosure provides a message processing method and device, a message processing system, a storage medium and electronic equipment, and relates to the technical field of wireless communication. The method comprises the steps of obtaining a message sent by a first message middleware and an entry parameter of the message based on a first communication protocol of the first message middleware; determining a first application program for generating the message in the first message middleware and a second application program set for processing the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program; constructing a message transmission channel between the first application program and each second application program in the second application program set; and sending the message to the second message middleware based on the message passing channel and through a second communication protocol of the second message middleware so that each application program in the second application program set processes the message. The present disclosure enables message transmission between message middleware of different communication protocols.

Description

Message processing method, device, system, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of wireless communication technologies, and in particular, to a message processing method, a message processing apparatus, a message processing system, a storage medium, and an electronic device.
Background
With the rapid development of computer technology, the functions and structures of each system are more and more complex, so that higher requirements are placed on the message passing between functions. In order to ensure that the messages are transferred between the systems quickly and stably, the message middleware is adopted to realize asynchronous communication, namely, a message producer and a consumer do not need to wait on line at the same time, the producer does not need to wait for the response of the message consumer after sending the message, but directly processes other tasks, and the consumer of the message does not need to process the received message immediately.
Currently, in implementing message transmission using message middleware among a plurality of applications, it is generally required that the application that produces the message use the same message middleware as the application that consumes the message.
However, the above-described existing message processing method cannot realize message transmission when a message-producing application and a message-consuming application use different message middleware.
Disclosure of Invention
An object of the present disclosure is to provide a message processing method, a message processing apparatus, a message processing system, a storage medium, and an electronic device, so as to overcome at least to some extent the problem that message transmission cannot be performed between message middleware of different communication protocols due to limitations and drawbacks of the related art.
According to a first aspect of the present disclosure, there is provided a message processing method, including acquiring a message sent by a first message middleware and an entry parameter of the message based on a first communication protocol of the first message middleware; determining a first application program for generating the message in the first message middleware and a second application program set for processing the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program; constructing a message transmission channel between the first application program and each second application program in the second application program set; based on the message passing channel and through a second communication protocol of the second message middleware, sending the message to the second message middleware so that each application program in the second application program set processes the message; wherein the first communication protocol is different from the second communication protocol.
Optionally, constructing a message passing channel between the first application program and each second application program in the second application program set, including acquiring registration information of the first application program and registration information of each second application program in the second application program set; and establishing a mapping relation between the registration information of the first application program and the registration information of each second application program of the second application program set so as to construct a message transmission channel corresponding to the mapping relation.
Optionally, before acquiring the registration information of the first application program and the registration information of each second application program of the second application program set, the message processing method further includes receiving, in advance, the registration information of all application programs in the first message middleware and the registration information of all application programs in the second message middleware.
Optionally, after the message is sent to the second message middleware based on the message passing channel and through the second communication protocol of the second message middleware, if the mapping relationship is abnormal, determining updated registration information of the first application program and registration information of each second application program; and updating the mapping relation based on the updated registration information of the first application program and the registration information of each second application program.
Optionally, after the message is sent to the second message middleware based on the message passing channel and through the second communication protocol of the second message middleware, the message processing method further includes resending the message until a sending success notification of the message is received if a sending failure notification of the message is received.
Optionally, if a message sending failure notification is received, resending the message until a message sending success notification is received, wherein the message sending success notification includes the number of times the message has been sent and the preset retry number; and if the number of times of the sent message is not greater than the preset retry number, sending the message to the second message middleware in a first preset time period based on a second communication protocol of the second message middleware.
Optionally, the message processing method further includes sending an alarm signal and storing the message if the number of times the message has been sent is greater than a preset retry number; and based on a second communication protocol of the second message middleware, sending the message to the second message middleware in a second preset time period, wherein the second preset time period is larger than the first preset period.
According to a second aspect of the present disclosure, there is provided a message processing apparatus comprising: the acquisition module can be used for acquiring the message sent by the first message middleware and the entry parameter of the message based on the first communication protocol of the first message middleware; the determining module can be used for determining a first application program for generating the message in the first message middleware and a second application program set for processing the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program; the construction module can be used for constructing a message transmission channel between each second application program in the first application program and each second application program in the second application program set; the sending module can be used for sending the message to the second message middleware based on the message passing channel and through a second communication protocol of the second message middleware so that each application program in the second application program set can process the message; wherein the first communication protocol is different from the second communication protocol.
Optionally, the building module is specifically configured to obtain registration information of the first application program and registration information of each second application program of the second application program set; the construction module is used for establishing a mapping relation between the registration information of the first application program and the registration information of each second application program of the second application program set so as to construct a message transmission channel corresponding to the mapping relation.
Optionally, the receiving module is configured to receive, in advance, registration information of all applications in the first message middleware and registration information of all applications in the second message middleware.
Optionally, the determining module is further configured to determine the updated registration information of the first application program and the registration information of each second application program if the mapping relationship is abnormal; the updating module is used for updating the mapping relation based on the updated registration information of the first application program and the registration information of each second application program.
Optionally, the sending module may be further configured to resend the message if a sending failure notification of the message is received, until a sending success notification of the message is received.
Optionally, the sending module is specifically configured to obtain the number of times the message has been sent and the preset retry number, and send the message to the second message middleware in a first preset time period based on the second communication protocol of the second message middleware if the number of times the message has been sent is not greater than the preset retry number.
Optionally, the sending module may be further configured to send an alarm signal and store the message if the number of times the message has been sent is greater than a preset retry number; the sending module is used for sending the message to the second message middleware in a second preset time period based on a second communication protocol of the second message middleware, wherein the second preset time period is larger than the first preset period.
According to a third aspect of the present disclosure, there is provided a message processing system comprising: the first message middleware is used for sending the message to the information conversion platform; the information conversion platform is used for acquiring a message sent by the first message middleware and an entry parameter of the message based on a first communication protocol of the first message middleware, determining a first application program for generating the message in the first message middleware and a second application program set to be processed on the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program, constructing a message transmission channel between the first application program and each second application program in the second application program set, and sending the message to the second message middleware based on the message transmission channel and through a second communication protocol of the second message middleware; and the second message middleware is used for receiving the message sent by the information conversion platform so that each application program in the second application program set processes the message, wherein the first communication protocol is different from the second communication protocol.
According to a fourth aspect of the present disclosure, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements a message processing method of any of the above.
According to a fifth aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the message processing methods described above via execution of the executable instructions.
In some embodiments of the present disclosure, a message sent by a first message middleware and an entry parameter of the message are acquired through a first communication protocol based on the first message middleware; determining a first application program for generating the message in the first message middleware and a second application program set for processing the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program; constructing a message transmission channel between the first application program and each second application program in the second application program set; based on the message passing channel and through a second communication protocol of the second message middleware, sending the message to the second message middleware so that each application program in the second application program set processes the message; wherein the first communication protocol is different from the second communication protocol. In the method, an information conversion platform first application transmits a message to a first message middleware using a first communication protocol, the first message middleware broadcasting the message to the information conversion platform. After the information conversion platform receives the message in the first message middleware, a first application program for sending the message and a second application program set for receiving the message can be determined according to the entry parameter of the message. The information conversion platform can establish a mapping relation according to the registration information sent in advance by the first application program and each second application program of the message to be received. Through the established mapping relation, a message transmission channel corresponding to the mapping relation is established, and then the information conversion platform can transmit the message to the second message middleware by using the message transmission channel and the second communication protocol, so that the message in the first message middleware is transmitted to the second message middleware. The method solves the problem that message transmission cannot be carried out due to different communication protocols between the first message middleware and the second message middleware in the prior art, and realizes message transmission among the message middleware with different communication protocols.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
fig. 1 schematically illustrates a system architecture diagram of a message processing method according to an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a message processing method according to an exemplary embodiment of the present disclosure;
fig. 3 illustrates a flow chart of a message retransmission according to an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates an overall message handling process diagram according to an exemplary embodiment of the present disclosure;
fig. 5 schematically illustrates a block diagram of a message processing apparatus according to an exemplary embodiment of the present disclosure;
FIG. 6 shows a schematic diagram of another message processing apparatus according to an exemplary embodiment of the present disclosure; and
fig. 7 shows a schematic diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. However, those skilled in the art will recognize that the aspects of the present disclosure may be practiced with one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only and not necessarily all steps are included. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
The message processing method provided by the exemplary embodiment of the disclosure can be applied to an application scenario in which an application program for producing a message and an application program for consuming the message use different message middleware to realize message transmission. For example: JMQ message middleware used for message transmission among application programs in the group, and other open source message middleware used for message transmission among application programs in the non-group, wherein the other open source message middleware can be RocketMQ, rabbitMQ, kafka message middleware. Wherein the group may be a company, a hospital, an individual, or the like.
Currently, in implementing message transmission using message middleware among a plurality of applications, it is generally required that the application that produces the message use the same message middleware as the application that consumes the message. However, when the application that produces the message uses different message middleware than the application that consumes the message, the message transmission cannot be performed due to the different communication protocols of the different message middleware.
In view of the foregoing, in an exemplary embodiment of the present disclosure, a message processing method is provided, which may receive a message sent by a first message middleware based on a first communication protocol in an information conversion platform, and may determine a first application program for sending the message and a second application program set for receiving and processing the message according to an entry parameter of the message. And then constructing a message passing channel between the first application program and each second application program in the second application program set. And finally, transmitting the message to a second message middleware by using the constructed message transmission channel and a second communication protocol, thereby realizing message transmission among different message middleware.
Fig. 1 schematically illustrates a system architecture diagram of a message processing method of an exemplary embodiment of the present disclosure. As shown in fig. 1, the system includes a first terminal device 102, a first message middleware server 104, an information conversion platform 106, a second terminal device 108, and a second middleware server 110. Wherein, based on the first communication protocol, the user may send a message using the first terminal device 102, and the first message middleware server 104 receives the message sent by the first terminal device 102 and broadcasts the message. After receiving the message broadcast by the first message middleware, the information conversion platform 106 first obtains the entry parameter of the message, and further determines a first application program for sending the message in the first message middleware and a second application program set for receiving the message by the second message middleware. Information conversion platform 106 then constructs a messaging channel between the first application and each of the second applications in the second application set, respectively. Finally, information conversion platform 106 broadcasts the message to the second message middleware using the constructed messaging channel and the second communication protocol, thereby enabling messaging between first message middleware server 104 and second middleware server 110.
It should be noted that, the first message middleware server 104 and the second middleware server 110 may be one server, and may be a server cluster formed by a plurality of servers.
It should be understood that the number of first terminal device 102, first message middleware server 104, information conversion platform 106, second terminal device 108, and second middleware server 110 in the system architecture shown in fig. 1 is merely exemplary, and that a greater or lesser number is within the scope of the present application. Also, in the example operational scenario described above, the first terminal device 102, the second terminal device 108 may be, for example, a personal computer, a server, a palm top (Personal Digital Assistant, PDA), a notebook, or any other computing device having networking functionality. The network of communications between first terminal device 102, first message middleware server 104, information conversion platform 106, second terminal device 108, and second middleware server 110 may include various types of wired and wireless networks, such as, but not limited to: internet, local area network, wireless fidelity (Wireless Fidelity, WIFI), wireless local area network (Wireless Local Area Networks, WLAN), cellular communication network (general packet radio service technology (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), 2G/3G/4G/5G cellular network), satellite communication network, and the like.
Having knowledge of the system architecture provided by an exemplary embodiment of the present disclosure, a detailed description will be given of a scheme of the message processing method of the present disclosure with reference to fig. 2.
Fig. 2 is a flow chart of a message processing method according to an embodiment of the present disclosure, where the method may be performed by any device that performs the message processing method, and the device may be implemented by using software and/or hardware. In this embodiment, the apparatus may be integrated in the information conversion platform 106 shown in fig. 1. As shown in fig. 2, the message processing method provided by the embodiment of the present disclosure may include the following steps:
s20, acquiring a message sent by the first message middleware and an entry parameter of the message based on a first communication protocol of the first message middleware.
The first communication protocol realizes message transmission between the information conversion platform and the first message middleware, and the entry parameter of the message comprises a message source and a message sending destination.
Specifically, a message mainly includes a message header, and a message body, where the message header includes information such as a source of the message, a destination of the message, a time of the message, whether the message is repeatedly sent, and the message body includes specific content to be transmitted, and an entry parameter of the message includes information included in the message header.
S22, determining a first application program for generating the message in the first message middleware and a second application program set for processing the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program.
Wherein the user may send a message through the first application and communicate the message to the first message middleware.
In one embodiment of the present disclosure, the user information registration may be implemented by using an asynchronous registration method before the user sends the message through the first application program based on the user side. For example: in the registration process, the user needs to fill in information such as account number, password and mobile phone number, and the steps of filling in account number, password and mobile phone number are mutually independent, and whether the user accords with the set filling rule is verified in real time when the user fills in the information. Meanwhile, after the user registration is successful or failed, the application program can return a notification message of the registration success or failure. The asynchronous registration mode can improve the efficiency of user registration and improve the user experience.
When the user registers and logs in the first application program, a connection can be established with the first message middleware, so that the message is sent to the first message middleware. The first message middleware receives the message and broadcasts the message to send to the information conversion platform. After the information conversion platform acquires the message, the source of the message and the destination of the message transmission can be determined according to the entry parameter of the message, namely, a first application program for generating the message and a second application program set for receiving the message. For example: after the user a1 registers and logs in the application program a, the user a1 will send a message x to the user B1 in the application program B1 and the user B2 in the application program B2 through the application program a, the message x is firstly transmitted to a first message middleware, and after the first message middleware sends the message x to the information conversion platform, the information conversion platform can determine that the source of the message is the application program a and the user a1, and the application program B1, the user B1, the application program B2 and the user B2 which receive the message according to the message x.
It should be appreciated that the first message middleware and the second message middleware each include at least one application information.
S24, constructing a message transmission channel between the first application program and each second application program in the second application program set.
According to an embodiment provided by the present disclosure, the information conversion platform may receive registration information of all applications in the first message middleware in advance, and registration information of all applications in the second message middleware.
Specifically, the first message middleware and the second message middleware register the internal application program in the information conversion platform in advance so as to establish the connection relationship between the first message middleware and the information conversion platform as well as between the second message middleware and the information conversion platform. The registration process can adopt an asynchronous registration mode, namely, the registration processes of all application programs in the first message middleware and the second message middleware are independent. And after the registration is successful or failed, the information conversion platform returns a notification message of the registration success or failure. For example: the first message middleware is provided with application programs A1 and A2, the second message middleware is provided with application programs B1 and B2, and the application programs A1, A2, B1 and B2 are respectively registered in the information conversion platform, and the registration processes are not mutually interfered.
In one embodiment provided by the disclosure, the information conversion platform is convenient to acquire the registration information of all application programs by receiving the registration information of all application programs in the first message middleware and the second message middleware in advance, so that the registration information of the application program related to the message is acquired quickly after the message is received, and message transmission among message middleware with different communication protocols is further realized.
Further, after determining the first application program generating the message in the first message middle part and the second application program set to be processed on the message in the second message middle part, the information conversion platform may acquire the registration information of the first application program and the registration information of each second application program in the second application program set, and establish a mapping relationship between the registration information of the first application program and the registration information of each second application program in the second application program set, so as to construct a message transmission channel corresponding to the mapping relationship.
Specifically, after the information conversion platform determines the first application program and the second application program set according to the message, the registration information of the first application program and each second application program can be determined from the registration information of all the application programs. And then establishing a mapping relation between the registration information, and constructing a message transfer channel corresponding to the mapping relation in the information conversion platform.
For example, the first message middle part has application programs A1 and A2, the second message middle part has application programs B1, B2 and B3, and when the user wants to use the application program A1 to send a message a to the application programs B1 and B3, the information conversion platform receives registration information IDA1 and IDA2 of the application programs A1 and A2 in the first message middle part and registration information IDB1, IDB2 and IDB3 of the application programs B1, B2 and B3 in the second message middle part in advance. When the information conversion platform receives the message a, it can determine that the registration information of the first application program sending the message is IDA1, and the registration information of the second application program receiving the message is IDB1 and IDB3, and then respectively establish mapping relations of IDA 1-IDB 1 and IDA 1-IDB 3, thereby constructing a message transfer channel between the application program A1 and the application program B1, and between the application program A1 and the application program B3.
It should be appreciated that in one system, the message may be sent by an application in the first message middleware or by an application in the first message middleware. The application program that simultaneously transmits and receives the message may be one or more, and the specific number is not particularly limited.
In the steps of one embodiment provided by the present disclosure, by acquiring registration information of a first application program and registration information of each second application program of a second application program set, and then establishing a mapping relationship between the registration information, a connection can be established between a message from the first application program and each corresponding second application program, so that the message is sent to a designated second application program, and message transmission between message middleware of different communication protocols is realized.
S26, based on the message passing channel and through a second communication protocol of the second message middleware, sending the message to the second message middleware so that each second application program in the second application program set can process the message.
The information conversion platform, the second message middleware and the second application programs realize message transmission through a second communication protocol.
Specifically, the information conversion platform transmits the information to the second message middleware through the constructed information transmission channel, each second application program can acquire and process the information from the second message middleware, and the application program in the second message middleware, which does not establish a mapping relation with the first application program, can not receive the information.
In some embodiments of the present disclosure, a message sent by a first message middleware and an entry parameter of the message are acquired through a first communication protocol based on the first message middleware; determining a first application program for generating the message in the first message middleware and a second application program set for processing the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program; constructing a message transmission channel between the first application program and each second application program in the second application program set; based on the message passing channel and through a second communication protocol of the second message middleware, sending the message to the second message middleware so that each application program in the second application program set processes the message; wherein the first communication protocol is different from the second communication protocol. In the method, an information conversion platform first application transmits a message to a first message middleware using a first communication protocol, the first message middleware broadcasting the message to the information conversion platform. After the information conversion platform receives the message in the first message middleware, a first application program for sending the message and a second application program set for receiving the message can be determined according to the entry parameter of the message. The information conversion platform can establish a mapping relation according to the registration information sent in advance by the first application program and each second application program of the message to be received. Through the established mapping relation, a message transmission channel corresponding to the mapping relation is established, and the information conversion platform can transmit the message to the second message middleware by using the second communication protocol, so that the message in the first message middleware is transmitted to the second message middleware. The method solves the problem that message transmission cannot be carried out due to different communication protocols between the first message middleware and the second message middleware in the prior art, and realizes message transmission among the message middleware with different communication protocols.
In one possible implementation manner, after the message is successfully transmitted based on the mapping relation established by the first application program and each second application program, the information conversion platform stores the generated mapping relation in the database, and detects whether the generated mapping relation is abnormal in real time.
If the mapping relation is abnormal, determining updated registration information of the first application program and registration information of each second application program, and updating the mapping relation based on the updated registration information of the first application program and the registration information of each second application program.
Specifically, when the mapping relation generated by the information conversion platform detection can construct a normal message transmission channel, the message transmission can be realized by directly using the existing message transmission channel. When the existing mapping relation is detected to be abnormal, the updated first application program and each second application program corresponding to the received message are determined. The abnormal mapping relation may be that the registration information of a certain application program is deleted and modified.
For example: the existing mapping relations in the information conversion platform are IDA 1-IDB 1, IDA 1-IDB 2 and IDA 2-IDB 2. When the registration information IDB2 of the application B2 is removed in the information conversion platform, the mapping relationship of IDA 1-IDB 2, IDA 2-IDB 2 is uninstalled. When the registration information of the application A1 is modified to IDa1, the mapping relationship of IDa 1-IDB 1 and IDa 1-IDB 2 is re-established after the IDA 1-IDB 1 and IDA 1-IDB 2 are uninstalled.
In one embodiment provided by the disclosure, the information conversion platform detects whether the existing mapping relationship is abnormal in real time and updates the abnormal mapping relationship, so that useless mapping relationship can be unloaded in time, and the utilization rate of memory resources is improved. Meanwhile, the condition of message transmission failure caused by useless mapping relation is reduced, and message transmission among message middleware of different communication protocols is further realized.
In another possible implementation manner, after the information conversion platform transmits the message to the second message middleware based on the mapping relationship established by the first application program and each second application program, if the second message middleware receives the message sent by the information conversion platform, a notification that the message is successfully sent is sent to the information conversion platform. Otherwise, a message sending failure notice is sent to the information conversion platform.
According to one embodiment provided by the present disclosure, if the information conversion platform receives a transmission failure notification of a message, the message is retransmitted until a transmission success notification of the message is received.
Next, a process of retransmitting a message when the information conversion platform receives a message transmission failure notification will be described in detail with reference to fig. 3. As shown in fig. 3, fig. 3 is a flow chart of a message retransmission of an exemplary embodiment of the present disclosure.
According to some embodiments of the present disclosure, when the second message middleware does not receive the message transmitted by the information conversion platform, the information conversion platform receives a transmission failure notification of the message in step S301.
First, in step S303, the information conversion platform may acquire the number of times the message has been sent and the preset number of retries. The preset retry number can be set according to the requirement, and is not limited.
Then, in step S305, the information conversion platform determines whether the number of times the message has been transmitted is not greater than a preset retry number.
In step S307, when the number of times the message has been sent is not greater than the preset number of retries, the message is sent to the second message middleware in the first preset time period based on the second communication protocol of the second message middleware, until step S313 is executed, and the message sending success notification sent by the second message middleware is received, so that the message sending is stopped.
The first preset time period is that the time interval is smaller, namely when the number of times of message sent is not larger than the preset retry number, the message is immediately sent to the second message middleware.
According to the embodiment provided by the disclosure, when the number of times that the message is sent is not more than the preset retry number, the message is immediately sent to the second message middleware, so that the condition of message sending failure caused by accidental factors such as network fluctuation, service downtime, program abnormality and the like can be avoided, the condition of message loss is avoided, and message transmission among message middleware of different communication protocols is further realized.
In step S309, when the number of times the message has been transmitted is greater than the preset number of retries, an alarm signal is transmitted and the message is stored. And executing step S311, based on the second communication protocol of the second message middleware, sending the message to the second message middleware for a second preset time period, and stopping sending the message until step S313 is executed, and receiving a message sending success notification sent by the second message middleware.
Specifically, sending the alarm signal may use sending mail, short message, etc. to alarm or use prompting voice, etc., and at the same time, the message is stored in the database, and then the message is called from the database for retransmission in a second preset time period. The second preset time period is greater than the first preset time period. For example: and the retransmission is performed every 5 seconds, and the message transmission is stopped until the notification of successful message transmission sent by the second message middleware is received. Message retransmission may also be performed periodically at multiples of a preset time, for example: the first retransmission of the message at 5 second intervals, the second retransmission of the message at 10 second intervals, the third retransmission of the message at 15 second intervals, etc., and so on, until the message was sent successfully.
In one embodiment provided in the present disclosure, when the number of times the message has been sent is greater than the preset number of retries, the information conversion platform may temporarily discard the message, send an alert signal, and store the message in the database. And then resending the message in a second preset time period. Therefore, not only can the occupation of system resources be reduced, but also the problem of message loss can be avoided, and the message transmission among message middleware with different communication protocols is further realized.
It will be appreciated that the application in the first message middleware may generate the message or may receive and process the message. As shown in fig. 4 on the basis of any of the above embodiments, taking the generation of a message by an application program in the first message middleware as an example, fig. 4 is a schematic diagram of the whole message processing procedure according to an exemplary embodiment of the present disclosure.
It should be noted that, in implementing message transmission between the first message middleware and the second message middleware, network connection is required to be implemented in advance. When the first message middleware provides a message transmission service for the application program in the group and the second message middleware provides a message transmission service for the application program in the non-group, the message transmission between the application program in the group and the first message middleware generally uses an internal network, and the message transmission between the application program in the non-group and the second message middleware uses an external network. Therefore, when the application program inside the non-group transmits a message with the application program inside the group, the application program inside the non-group needs to be subjected to network authorization in advance inside the group.
First, the information conversion platform may perform step S401 and step S403, and in step S401, receive registration information of an application program in the first message middleware in advance; in step S403, registration information of the application in the second message middleware is received in advance. Specifically, the information conversion platform receives the registration information of all the application programs in the first message middleware in advance, and simultaneously, the information conversion platform also receives the registration information of all the application programs in the second message middleware in advance so as to acquire the information of the existing application programs in the system.
In step S405, the first terminal device receives registration information. The user can register the first application program in the first message middleware in advance, and then uses the generated registration information to register the user, so as to establish the connection relationship among the user, the first application program and the first message middleware. The user registration can adopt an asynchronous registration mode, namely the steps of filling registration information among users are independent, and the registration process among a plurality of users is independent.
Based on the established connection, the first message middleware receives the transmitted message in step S407. The user may send a message using a front-end page of the first application. When the message transmission is successful, the first message middleware may return a notification of the successful message transmission to the first application program, and otherwise return a notification of the failed message transmission.
When the first message middleware receives the message, the message is broadcast in step S409. Specifically, the first message middleware broadcasts the message to the confidence conversion platform.
In step S411, a message and an entry parameter of the message are acquired. The information conversion platform obtains the message from the first message middleware and obtains the entry parameter according to the message, so as to determine the registration information of the first application program sending the message and the registration information of the second application program set in the second message middleware in step S413, wherein each application program in the second application program set can receive the message sent by the first application program, and the second application program set contains at least one second application program.
In step S415, message channels of the first application program and the second application program are constructed. And respectively establishing mapping relations between the registration information of the determined first application program and the registration information of at least one second application program, and further generating a message transmission channel corresponding to the mapping relations.
Based on the generated transmission channel, in step S417, a message is transmitted. Specifically, the information conversion platform uses a second communication protocol to send the message to the second message middleware.
If the second message middleware successfully receives the message, a message sending success notification is returned to the information conversion platform according to step S425. And may be message broadcast according to step S421. I.e. broadcast the message to the corresponding second terminal device. And displaying the front-end page of the second application program in the second terminal equipment.
In step S419, registration information of the second application is received. The user of the second application may register in advance and establish a connection relationship with the second message middleware using the registered information. Further, in step S423, the second application performs message processing. Specifically, the second terminal device receives and processes the message by using the second application program.
If the second message middleware does not receive the message, in step S427, a notification of message transmission failure is returned to the information conversion platform. Upon receiving the notification of the failure of the transmission of the information, the information conversion platform retransmits the message in step S429 until receiving the notification of the success of the transmission of the message in step S425.
According to an embodiment provided by the disclosure, the information conversion platform may establish a mapping relationship according to registration information sent in advance by the first application program and each second application program to receive the message. Through the established mapping relation, a message transmission channel corresponding to the mapping relation is established, and the information conversion platform can transmit the message to the second message middleware by using the second communication protocol, so that the message in the first message middleware is transmitted to the second message middleware. The method solves the problem that message transmission cannot be carried out due to different communication protocols between the first message middleware and the second message middleware in the prior art, and further realizes message transmission among the message middleware with different communication protocols.
Further, in this example embodiment, a message processing apparatus is also provided.
Fig. 5 schematically shows a block diagram of a message processing apparatus of an exemplary embodiment of the present disclosure. Referring to fig. 5, a message processing apparatus 5 according to an exemplary embodiment of the present disclosure may include an acquisition module 50, a determination module 52, a construction module 54, and a transmission module 56, wherein:
the obtaining module 50 may be configured to obtain, based on a first communication protocol of the first message middleware, a message sent by the first message middleware and an entry parameter of the message; the determining module 52 may be configured to determine, according to the entry parameter of the message, a first application program in the first message middleware that generates the message and a second application program set to process the message in the second message middleware, where the second application program set includes at least one second application program; the construction module 54 may be configured to construct a messaging channel between the first application and each of the second applications in the second application set; and a sending module 56 may be configured to send the message to the second message middleware based on the messaging channel and via a second communication protocol of the second message middleware, so that each application in the second application set processes the message; wherein the first communication protocol is different from the second communication protocol.
Further, another message processing apparatus is provided in this example embodiment.
Fig. 6 schematically illustrates a block diagram of another message processing apparatus of an exemplary embodiment of the present disclosure. Referring to fig. 6, a message processing apparatus 6 according to an exemplary embodiment of the present disclosure may include a construction module 60, a reception module 62, a determination module 64, an update module 66, and a transmission module 68, wherein:
in an exemplary embodiment of the present disclosure, the building module 60 may be configured to obtain registration information of a first application and registration information of each second application of the second application set; the construction module 60 may be configured to establish a mapping relationship between the registration information of the first application program and the registration information of each second application program of the second application program set, so as to construct a message passing channel corresponding to the mapping relationship.
In an exemplary embodiment of the present disclosure, the receiving module 62 may be configured to receive, in advance, registration information of all applications in the first message middleware and registration information of all applications in the second message middleware.
In the technical solutions provided in some embodiments of the present disclosure, the determining module 64 may be configured to determine the updated registration information of the first application program and the registration information of each second application program if the mapping relationship is abnormal; the updating module 66 may be configured to update the mapping relationship based on the updated registration information of the first application program and the registration information of each second application program.
In an exemplary embodiment of the present disclosure, the sending module 68 may be configured to send the message to the receiving module if a sending failure notification of the message is received.
In an exemplary embodiment of the present disclosure, the sending module 68 is configured to obtain the number of times the message has been sent and the preset number of retries, and send the message to the second message middleware in the first preset time period based on the second communication protocol of the second message middleware if the number of times the message has been sent is not greater than the preset number of retries.
In an exemplary embodiment of the present disclosure, the sending module 68 is configured to send an alarm signal and store a message if the number of times the message has been sent is greater than a preset retry number; the sending module is used for sending the message to the second message middleware in a second preset time period based on a second communication protocol of the second message middleware, wherein the second preset time period is larger than the first preset period.
The implementation principle and the beneficial effects of the message processing method in any embodiment may be similar to those of the message processing method, and may be referred to herein, and since each functional module of the program running performance analysis device in the embodiment of the present invention is the same as that in the embodiment of the present invention, the description thereof is omitted herein.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary method" section of this specification, when the program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present invention may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above-described message processing method is also provided.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 700 according to this embodiment of the invention is described below with reference to fig. 7. The electronic device 700 shown in fig. 7 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 7, the electronic device 700 is embodied in the form of a general purpose computing device. Components of electronic device 700 may include, but are not limited to: the at least one processing unit 710, the at least one storage unit 720, a bus 730 connecting the different system components (including the storage unit 720 and the processing unit 710), and a display unit 740.
Wherein the storage unit stores program code that is executable by the processing unit 710 such that the processing unit 710 performs steps according to various exemplary embodiments of the present invention described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 710 may perform steps S20 to S26 as shown in fig. 2.
The memory unit 720 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 7201 and/or cache memory 7202, and may further include Read Only Memory (ROM) 7203.
The storage unit 720 may also include a program/utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 730 may be a bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 700 may also communicate with one or more external devices 800 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 700, and/or any device (e.g., router, modem, etc.) that enables the electronic device 700 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 750. Also, electronic device 700 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 760. As shown, network adapter 760 communicates with other modules of electronic device 700 over bus 730. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 700, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A method of message processing comprising:
acquiring a message sent by a first message middleware and an entry parameter of the message based on a first communication protocol of the first message middleware;
determining a first application program for generating the message in the first message middleware and a second application program set for processing the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program;
Constructing a message passing channel between the first application program and each second application program in the second application program set;
sending the message to the second message middleware based on the message passing channel and through a second communication protocol of the second message middleware so that each second application program in the second application program set processes the message;
wherein the first communication protocol is different from the second communication protocol.
2. The message processing method according to claim 1, wherein constructing a message passing channel between the first application program and each of the second application programs in the second application program set includes:
acquiring registration information of the first application program and registration information of each second application program of the second application program set;
and establishing a mapping relation between the registration information of the first application program and the registration information of each second application program of the second application program set so as to construct a message transmission channel corresponding to the mapping relation.
3. The message processing method according to claim 2, wherein before acquiring the registration information of the first application program and the registration information of each of the second application programs of the second application program set, the message processing method further comprises:
And receiving the registration information of all the application programs in the first message middleware and the registration information of all the application programs in the second message middleware in advance.
4. The message processing method of claim 1, wherein after sending the message to the second message middleware based on the messaging channel and via a second communication protocol of the second message middleware, the message processing method further comprises:
if the mapping relation is abnormal, determining updated registration information of the first application program and registration information of each second application program;
and updating the mapping relation based on the updated registration information of the first application program and the registration information of each second application program.
5. The message processing method of claim 1, wherein after sending the message to the second message middleware based on the messaging channel and via a second communication protocol of the second message middleware, the message processing method further comprises:
and if the message sending failure notification is received, retransmitting the message until the message sending success notification is received.
6. The message processing method according to claim 5, wherein if a transmission failure notification of the message is received, retransmitting the message until the message transmission is successful, comprising:
acquiring the number of times the message is sent and the preset retry number;
and if the number of times that the message is sent is not greater than the preset retry number, sending the message to the second message middleware in a first preset time period based on a second communication protocol of the second message middleware.
7. The message processing method according to claim 5, characterized in that the message processing method further comprises:
if the sent times of the message is larger than the preset retry times, sending an alarm signal and storing the message;
and based on a second communication protocol of the second message middleware, sending the message to the second message middleware in a second preset time period, wherein the second preset time period is larger than the first preset time period.
8. A message processing system, comprising:
the first message middleware is used for sending the message to the information conversion platform;
the information conversion platform is configured to obtain, based on a first communication protocol of the first message middleware, a message sent by the first message middleware and an entry parameter of the message, determine, according to the entry parameter of the message, a first application program in the first message middleware that generates the message and a second application program set to be processed in the second message middleware, where the second application program set includes at least one second application program, construct a message passing channel between each second application program in the first application program and the second application program set, and send the message to the second message middleware based on the message passing channel and through a second communication protocol of the second message middleware;
The second message middleware is configured to receive a message sent by the information conversion platform, where each second application in the second application set processes the message, and the first communication protocol is different from the second communication protocol.
9. A message processing apparatus, comprising:
the acquisition module is used for acquiring a message sent by the first message middleware and an entry parameter of the message based on a first communication protocol of the first message middleware;
the determining module is used for determining a first application program for generating the message in the first message middleware and a second application program set for processing the message in the second message middleware according to the entry parameter of the message, wherein the second application program set comprises at least one second application program;
a construction module, configured to construct a message passing channel between the first application program and each of the second application programs in the second application program set;
the sending module is used for sending the message to the second message middleware based on the message passing channel and through a second communication protocol of the second message middleware so that each application program in the second application program set can process the message;
Wherein the first communication protocol is different from the second communication protocol.
10. A storage medium having stored thereon a computer program, which when executed by a processor implements the message processing method of any of claims 1 to 7.
11. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the message processing method of any of claims 1 to 7 via execution of the executable instructions.
CN202210460508.4A 2022-04-24 2022-04-24 Message processing method, device, system, storage medium and electronic equipment Pending CN116980839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210460508.4A CN116980839A (en) 2022-04-24 2022-04-24 Message processing method, device, system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210460508.4A CN116980839A (en) 2022-04-24 2022-04-24 Message processing method, device, system, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116980839A true CN116980839A (en) 2023-10-31

Family

ID=88481919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210460508.4A Pending CN116980839A (en) 2022-04-24 2022-04-24 Message processing method, device, system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116980839A (en)

Similar Documents

Publication Publication Date Title
CN111818136B (en) Data processing method, device, electronic equipment and computer readable medium
CN114375069B (en) Communication method and network equipment
US20110016190A1 (en) Method and apparatus for realizing message service
US9058372B2 (en) Database management in a wireless communication system
RU2758080C2 (en) Communication method, network device and terminal
CN114039703B (en) Data transmission method, device, equipment and medium
CN111752579A (en) Bluetooth terminal upgrading method and device, storage medium and electronic equipment
CN110351025A (en) Information feedback method, device and system
CN102801782B (en) A kind of synchronous updating method of data and system
CN114205866A (en) Deterministic information reporting and issuing method and device, storage medium and electronic equipment
CN116980839A (en) Message processing method, device, system, storage medium and electronic equipment
CN110620819A (en) Block chain interaction method and device, computer equipment and readable storage medium
CN114401241B (en) Vehicle early warning information processing method and device, electronic equipment and storage medium
CN112511636B (en) Data transmission system, method, device, computer equipment and storage medium
CN107306290B (en) Session sharing method and application server
CN116974655A (en) Capability scheduling method and capability scheduling functional entity
CN111225423B (en) Method and device for forwarding data
CN113727453A (en) Method, device, system and storage medium for resource scheduling
CN114827918B (en) Short message sending method, device, electronic equipment and computer readable storage medium
WO2023011225A1 (en) Method and apparatus for non-terrestrial network handover, storage medium, and electronic device
CN116634552B (en) Terminal registration method, device, electronic equipment and storage medium
CN110007894B (en) Method and device for transmitting audio information
CN115413052A (en) Uplink information scheduling method, device, electronic equipment, storage medium and base station
CN115694743A (en) Data transmission method
CN117082648A (en) Near field device communication method, device, equipment and storage medium

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