Message processing method, device, system and server

By performing message interaction protocol conversion and interface adaptation in the message queue proxy service, the flexibility and compatibility problems of client request processing of different protocols in the prior art are solved, cross-protocol message queue processing is realized, and message queue is improved Flexibility and compatibility of processing.

CN115039392BActive Publication Date: 2024-11-08SHENZHEN HEYTAP TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080094695.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-10
Publication Date
2024-11-08
Estimated Expiration
2040-03-10

AI Technical Summary

Technical Problem

Existing message queue proxy services lack flexibility and compatibility when handling client requests for different message interaction protocols, resulting in unrecognized requests that are not native protocols and the need to arrange proxy services separately increases costs.

Method used

By receiving the client's message queue call request, it is converted into a message queue call request adapted to a specified calling interface, and generate adaptation data based on the interface to execute the target message queue engine request, realizing cross-protocol message queue processing.

Benefits of technology

Improves flexibility and compatibility of message queue processing, allows identification of client requests of different protocols, and executes message queue call requests through common interfaces, reducing overall cost and complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115039392B_ABST
    Figure CN115039392B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a message processing method, device, system and server. The method includes: if a first message queue call request sent by a client is received, the first message queue call request is converted into a second message queue call request, based on the second message queue call request and a specified call interface, message queue call data adapted to the specified call interface is generated, and according to the specified call interface and the message queue call data, the target message queue engine is called to execute the second message queue call request. Thus, by means of protocol conversion, when the business party sends a message queue call request based on a client with a different protocol, the message queue call request of the business party can still be adapted, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a message processing method, device, system and server. Background Art

[0002] A message can be understood as a unit of data transmitted between two computers, and a message queue can be understood as a container for storing messages during the transmission process. In the related devices that provide message queue proxy services, all of them provide services for a single message queue, resulting in a lack of flexibility and compatibility in the processing of messages transmitted by the message queue. Summary of the invention

[0003] In view of the above problems, the present application proposes a message processing method, device, system and server to improve the above problems.

[0004] In a first aspect, the present application provides a message processing method, the method comprising: if a first message queue call request sent by a client is received, converting the first message queue call request into a second message queue call request, the second message queue call request and the first message queue call request corresponding to a different message interaction protocol; based on the second message queue call request and a specified call interface, generating message queue call data adapted to the specified call interface; according to the specified call interface and the message queue call data, calling the target message queue engine to execute the second message queue call request.

[0005] In the second aspect, the present application provides a message processing method, which is applied to a message processing system, wherein the message processing system includes a protocol processing device, a message logic implementation device and a message queue engine carrier device, and the method includes: if the protocol processing device receives a first message queue call request sent by a client, the first message queue call request is converted into a second message queue call request, and the second message queue call request has a different message interaction protocol corresponding to the first message queue call request; the message logic implementation device generates message queue call data adapted to the specified call interface based on the second message queue call request and the specified call interface; the message queue engine carrier device calls the target message queue engine to execute the second message queue call request according to the specified call interface and the message queue call data.

[0006] In the third aspect, the present application provides a message processing device, which includes: a protocol parsing unit, which is used to convert a first message queue call request sent by a client into a second message queue call request if the first message queue call request is received, and the message interaction protocol corresponding to the second message queue call request is different from that corresponding to the first message queue call request; a calling logic implementation unit, which is used to generate message queue call data adapted to the specified calling interface based on the second message queue call request and the specified calling interface; and a message processing execution unit, which is used to call the target message queue engine to execute the second message queue call request according to the specified calling interface and the message queue call data.

[0007] In a fourth aspect, the present application provides a message processing system, which includes a protocol processing device, a message logic implementation device and a message queue engine carrying device, the system including: the protocol processing device, which is used to convert a first message queue call request sent by a client into a second message queue call request if the first message queue call request is received, and the message interaction protocol corresponding to the second message queue call request is different from that corresponding to the first message queue call request; the message logic implementation device, which is used to generate message queue call data adapted to the specified call interface based on the second message queue call request and the specified call interface; the message queue engine carrying device, which is used to call the target message queue engine to execute the second message queue call request according to the specified call interface and the message queue call data.

[0008] In a fifth aspect, the present application provides a server comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.

[0009] In a sixth aspect, the present application provides a computer-readable storage medium having a program code executable by a processor, wherein the program code enables the processor to execute the above method.

[0010] The present application provides a message processing method, device, system and server. If a first message queue call request sent by a client is received, a message interaction protocol conversion can be performed first to convert the first message queue call request into a second message queue call request with a different message interaction protocol, and then based on the second message queue call request and a specified call interface, message queue call data adapted to the specified call interface is generated, and then according to the specified call interface and the message queue call data, the target message queue engine is called to execute the second message queue call request. In this way, through protocol conversion, when a business party sends a message queue call request based on a client with a different message interaction protocol, the business party's message queue call request can still be identified, and message queue call data can be generated based on a common specified call interface, and then the second message queue call request is executed through the specified call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0012] Figure 1 A schematic diagram of an application scenario of a message processing method proposed in this application is shown;

[0013] Figure 2 A schematic diagram of the application architecture of a message processing method proposed in this application is shown;

[0014] Figure 3 A schematic diagram of the application architecture of another message processing method proposed in the present application is shown;

[0015] Figure 4 A flow chart of a message processing method proposed in this application is shown;

[0016] Figure 5 A flowchart of another message processing method proposed in the present application is shown;

[0017] Figure 6 A flowchart of another message processing method proposed in the present application is shown;

[0018] Figure 7 A flowchart of another message processing method proposed in the present application is shown;

[0019] Figure 8A flowchart of another message processing method proposed in the present application is shown;

[0020] Fig. 9 A structural block diagram of a message processing method and device proposed in this application is shown;

[0021] Fig.10 A structural block diagram of another message processing method device proposed in the present application is shown;

[0022] Fig.11 A structural block diagram of another message processing method device proposed in the present application is shown;

[0023] Fig.12 A structural block diagram of another message processing method device proposed in the present application is shown;

[0024] Fig.13 A structural block diagram of an electronic device proposed in this application is shown.

[0025] Fig.14 It is a storage unit of an embodiment of the present application for storing or carrying program codes for implementing the message processing method according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. Messages can be regarded as a reflection of objective material movement or subjective thinking activities, as well as the state of event occurrence. It is specifically described in different forms such as language, text, images and data. Messages can also be understood as a way for software objects to interact and communicate with each other.

[0027] Messages can be processed based on message queues. The message queue can be compared to a container for storing messages. When you need to use a message, you can take it out of the message queue for your own use. The message queue is a typical representative of the consumer-producer model. One end continuously writes messages to the message queue, while the other end can read the messages in the queue. The message publisher only publishes the message to the message queue without worrying about who takes it, and the message user only takes the message from the message queue without worrying about who publishes it.

[0028] In addition, message queues are important components in distributed systems. Using message queues can improve system performance and peak load shaving and reduce system coupling through asynchronous processing. Message queues can be of types such as ActiveMQ, RabbitMQ, Kafka, and RocketMQ, and different message queues use different message interaction protocols. Among them, the message interaction protocol can be understood as the protocol for message interaction between the message queue client and the message queue proxy server.

[0029] The inventors have found in their research on the processing of messages in related message queues that in the related devices providing message queue proxy services, the services are provided for a single message queue, resulting in a lack of flexibility and compatibility in the processing of messages transmitted by the message queue. For example, in the related message processing method, the server of the message queue can usually only recognize message queue call requests sent by a message queue client that adopts an inherent message interaction protocol, while the message queue call requests sent by clients that adopt other message interaction protocols cannot be properly recognized, resulting in poor versatility and compatibility of the message queue proxy server. Moreover, in this case, in order to adapt to the client that adopts the inherent message interaction protocol, it may be necessary to separately and completely deploy a set of message queue proxy servers, which will increase the overall cost.

[0030] Therefore, in order to improve the above problems, the inventors proposed the message processing method, device, system and server in the present application. The method provided by the present application can at least convert the message interaction protocol after receiving the first message queue call request sent by the client, so as to convert the first message queue call request into a second message queue call request with a different message interaction protocol, and then generate message queue call data adapted to the specified call interface based on the second message queue call request and the specified call interface, and then call the target message queue engine to execute the second message queue call request according to the specified call interface and the message queue call data, so that through the protocol conversion, when the business party sends a message queue call request based on a client with a different message interaction protocol, the business party's message queue call request can still be identified, and the message queue call data is generated based on the common specified call interface, and then the second message queue call request is executed through the specified call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue. The following first introduces the environment of a message processing system in which the message processing method and device provided by the present application run.

[0031] like Figure 1 As shown, Figure 1The message processing system 100 shown includes a protocol parsing unit, a call logic implementation unit, and a message processing execution unit.

[0032] The protocol parsing unit is used to perform protocol identification and conversion on the message queue request sent by the message queue client, so as to identify the purpose of the message queue client calling the message queue. For example, if a first message queue call request sent by the client is received, the first message queue call request can be converted into a second message queue call request in the present application.

[0033] The calling logic implementation unit is used to generate message queue calling data adapted to the designated calling interface according to the public designated calling interface and the second queue calling request obtained by conversion. Among them, after the protocol conversion, the protocol parsing unit can obtain at least one actual logic calling data of metadata viewing, metadata creation, message sending, and message consumption, and the calling logic implementation unit will generate message queue calling data adapted to the designated calling interface according to the public designated calling interface and the actual calling data obtained by the conversion. It should be noted that the public designated calling interface means that no matter what message interaction protocol the message queue client adopts to generate the message queue calling request, and no matter what message queue engine is actually used to execute the message queue calling request, it is all based on the designated calling interface.

[0034] The message processing execution unit is used to call the target message queue engine to execute the second message queue call request according to the specified call interface and the message queue call data. It should be noted that multiple message queue engines can be encapsulated in the message processing execution unit, and the target message queue engine refers to the message queue engine currently responsible for executing the message queue call request among the multiple message queue engines.

[0035] In one embodiment, the protocol parsing unit, the call logic implementation unit, and the message processing execution unit can be deployed in the same hardware device (such as a server). In addition, they can also be deployed in different hardware devices. Optionally, the protocol parsing unit is deployed in a first hardware device, the call logic implementation unit is deployed in a second hardware device, and the message processing execution unit is deployed in a third hardware device. In this case, the first hardware device can be regarded as a protocol processing device, the second hardware device can be regarded as a message logic implementation device, and the third hardware device can be understood as a message queue engine carrier device.

[0036] In another way, the protocol parsing unit and the call logic implementation unit can be deployed in the same hardware device, and the message processing execution unit can be separately installed in a hardware device. Furthermore, the multiple message queue engines encapsulated in the message processing execution unit can be separately installed in a hardware device.

[0037] For example, Figure 2 As shown, the hardware device 121 carries the message proxy service, and the hardware devices 131, 132, and 133 respectively carry a message queue engine. In this case, the hardware device 121 runs the aforementioned protocol parsing unit and the call logic implementation unit, and the hardware devices 131, 132, and 133 respectively carry a message processing execution unit. In this case, the hardware device 121 carrying the message proxy service can call any one of the hardware devices 131, 132, and 133 as needed based on the network address of the message queue to execute the message queue call request sent by the client 10. Furthermore, as another way, in order to increase the reliability of the message queue proxy service, the message queue proxy service can be a service cluster, such as Figure 3 As shown, multiple message queue proxy services can be configured, for example, Figure 3 In this case, the message queue proxy service 121 and the message queue proxy service 122 in the same client 10 can be processed by one of the message queue proxy service 121 and the message queue proxy service 122 in different situations. For example, when the message queue proxy service 121 is unavailable, the message queue proxy service 122 can process the message queue call request of the client 10. Correspondingly, when the hardware device 132 is unavailable, the message queue proxy service 122 in the hardware device 131 or the hardware device 133 can be switched to execute the message queue request. The embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.

[0038] See also Figure 4 , the present application provides a message processing method, the method comprising:

[0039] S110: If a first message queue call request sent by a client is received, the first message queue call request is converted into a second message queue call request, wherein the second message queue call request corresponds to a different message interaction protocol than the first message queue call request. In this embodiment, the client can be understood as a client running a message queue SDK, and the client running the message queue SDK can be deployed on the business side.

[0040] It should be noted that in this embodiment, when the message queue call data is subsequently generated, it is generated based on the message queue call request of the same protocol. In this case, if the message interaction protocol based on the first message queue call request sent by the client is different from the same protocol, the message interaction protocol conversion will be performed first to convert the first message queue call request originally sent by the client into a second message queue call request based on the same protocol. Exemplarily, if the message queue proxy service provided by this embodiment is executed, the subsequent message queue call data generation is based on the message interaction protocol A. Then, when it is identified that the first message queue call request sent by the client is based on the message interaction protocol B, the first message queue call request based on the message interaction protocol B will be converted through protocol conversion and converted to a first message queue call request based on the message interaction protocol A. For another example, when it is identified that the first message queue call request sent by the client is based on the message interaction protocol C, the first message queue call request based on the message interaction protocol C will also be converted through protocol conversion and converted to a first message queue call request based on the message interaction protocol A.

[0041] S120: Based on the second message queue calling request and the designated calling interface, generate message queue calling data adapted to the designated calling interface.

[0042] It should be noted that in this embodiment, the message queue engine that actually executes the message queue call request will be encapsulated, and after the encapsulation is completed, the data interface will be configured so that the message queue engine can be actually called through the data interface. Furthermore, in this embodiment, in order to complete the actual message queue call, it is necessary to generate message queue call data in the form of a data interface, and the data interface can be understood as the aforementioned designated call interface.

[0043] S130: According to the designated calling interface and the message queue calling data, calling a target message queue engine to execute the second message queue calling request.

[0044] In this embodiment, after the message queue call data is generated, the message queue call data can be input into a designated call interface, and then the target message queue engine is called through the designated call interface to execute the second message queue call request. It should be noted that when the client sends the message queue call request, it is actually preparing to process the message through the message queue. The processing of the message can be understood as sending the information to other clients or extracting the information sent by other clients. In this case, calling the target message queue engine through the designated call interface to execute the second message queue call request can be understood as calling the target message queue engine through the designated call interface to execute the sending of information or the extraction of information.

[0045] For example, if the first message queue call request sent by the client represents sending information A to other clients through the message queue, and the corresponding second message queue request after protocol conversion also represents sending information A to other clients, then when the target message queue engine executes the second message queue call request, it represents the actual process of sending information A.

[0046] A message processing method provided by an embodiment of the present application can first perform a message interaction protocol conversion after receiving a first message queue call request sent by a client, so as to convert the first message queue call request into a second message queue call request with a different message interaction protocol, and then generate message queue call data adapted to the specified call interface based on the second message queue call request and a specified call interface, and then call the target message queue engine to execute the second message queue call request according to the specified call interface and the message queue call data, so that through the protocol conversion, when the business party sends a message queue call request based on a client with a different message interaction protocol, the message queue call request of the business party can still be identified, and the message queue call data can be generated based on the common specified call interface, and then the second message queue call request is executed through the specified call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue.

[0047] See also Figure 5 , the present application provides a message processing method, the method comprising:

[0048] S210: If a first message queue call request sent by the client is received, the protocol used by the first message queue call request is obtained. It can be understood that the protocol used by the first message queue call request refers to the message interaction protocol used, and in this embodiment, there can be multiple ways to obtain the protocol used by the first message queue call request.

[0049] As a method, the protocol used by the message queue request sent by the device can be identified by the identifier of the client itself. In this method, a mapping table of the identifier of the client and the protocol used by the corresponding message queue request can be established in advance, and then when the first message queue request sent by the client is obtained, the identifier of the client is directly identified, and then the protocol used by the corresponding message queue request is searched in the mapping table by the identifier of the client. Among them, the identifier of the client can be a network address. As another method, the data format of the message queue request itself sent by the client can be analyzed to identify the corresponding protocol used.

[0050] S220: Based on the adopted protocol, convert the first message queue call request into a second message queue call request based on a target protocol, wherein the second message queue call request corresponds to a different message interaction protocol than the first message queue call request.

[0051] As a method, based on the adopted protocol, converting the first message queue call request into a second message queue call request based on the target protocol includes: based on the adopted protocol, calling a conversion plug-in adapted to the first message queue call request to convert the first message queue call request into a second message queue call request based on the target protocol.

[0052] It should be noted that, as a way, a plurality of conversion plug-ins can be configured in the message queue proxy service running the message processing method provided in this embodiment, and then a conversion plug-in is configured corresponding to each message interaction protocol that may be adopted by the client, and the plurality of conversion plug-ins can convert the message queue call request based on different message interaction protocols into the message queue call request based on which the message queue call data is subsequently generated. Exemplarily, a conversion plug-in A, a conversion plug-in B, a conversion plug-in C, and a conversion plug-in D can be configured in the message queue proxy service. In one case, the message processing method provided in this embodiment generates message queue call data based on a message queue call request using protocol F (i.e., the aforementioned target protocol). In this case, the conversion plug-in A can be configured to convert a first message queue call request based on protocol A into a second message queue call request based on protocol F, the conversion plug-in B can be configured to convert a first message queue call request based on protocol B into a second message queue call request based on protocol F, the conversion plug-in C can be configured to convert a first message queue call request based on protocol C into a second message queue call request based on protocol F, and the conversion plug-in D can be configured to convert a first message queue call request based on protocol D into a second message queue call request based on protocol F.

[0053] Therefore, through the plug-in method, when a new message interaction protocol is launched, it is only necessary to configure the corresponding conversion plug-in for the newly launched message interaction protocol, without the need to transform the message queue proxy service as a whole, thereby improving the efficiency of the message queue proxy service upgrade.

[0054] As a method, before calling a conversion plug-in adapted to the first message queue call request based on the adopted protocol to convert the first message queue call request into a second message queue call request based on the target protocol, it also includes: detecting whether the conversion plug-in adapted to the first message queue call request has been loaded; if the conversion plug-in adapted to the first message queue call request has been loaded, executing the calling of the conversion plug-in adapted to the first message queue call request based on the adopted protocol to convert the first message queue call request into a second message queue call request based on the target protocol.

[0055] If the conversion plug-in adapted for the first message queue call request is not loaded, the conversion plug-in adapted for the first message queue call request is searched for in the plug-in storage area through the plug-in manager; if the conversion plug-in adapted for the first message queue call request is found, the conversion plug-in adapted for the first message queue call request is dynamically loaded, and after the dynamic loading is completed, the conversion plug-in adapted for the first message queue call request is called to convert the first message queue call request into a second message queue call request based on the target protocol.

[0056] As a method, a storage area may be configured to store the identifiers of the loaded conversion plug-ins. In this method, the currently loaded conversion plug-ins may be obtained by traversing the storage area storing the identifiers of the loaded conversion plug-ins.

[0057] S230: Based on the second message queue call request and the designated call interface, generate message queue call data adapted to the designated call interface. The message queue call data includes a variety of parameters required for the subsequent actual call of the message queue through the designated call interface, and the format and composition of the multiple parameters are adapted to the designated call interface. Optionally, the multiple parameters may include the request purpose (e.g., information sending or information reading) of the second message queue request obtained by the conversion protocol, the message processing object (e.g., information to be sent or information to be read), etc.

[0058] S240: According to the specified call interface and the message queue call data, call the target message queue engine to execute the second message queue call request. As a mode, the method provided in this embodiment also includes: obtaining the conversion plug-in stored in the plug-in storage area at the time of initialization. It should be noted that the initialization can be understood as the initialization of the message queue proxy service provided in this embodiment at startup. Optionally, the updating of the conversion plug-in stored in the plug-in storage area at the time of initialization includes: obtaining the conversion plug-in stored in the plug-in storage area at the time of initialization, comparing the conversion plug-in stored in the plug-in storage area with the conversion plug-in stored in the management end, if an inconsistent conversion plug-in is compared, obtaining the inconsistent conversion plug-in and registering it, and storing the registered conversion plug-in in the plug-in storage area. It should be noted that the plug-in storage area here is different from the storage area for storing the identifier of the loaded conversion plug-in mentioned above, and the plug-in storage area here can be understood as a pooled plug-in storage area.

[0059] A message processing method provided by an embodiment of the present application can still identify the business party's message queue call request by means of protocol conversion when the business party sends a message queue call request based on a client with a different message interaction protocol, and then generate message queue call data based on a common designated call interface, and then execute the second message queue call request through the designated call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue. Moreover, in the present embodiment, during the process of protocol conversion, a conversion plug-in corresponding to the message queue adopted by the client is called to perform the conversion of the call request, so that when a client supporting a new message interaction protocol is online, only the corresponding conversion plug-in needs to be developed for the newly online client without updating the overall architecture, further improving the flexibility of message queue proxy service upgrades.

[0060] See also Figure 6, the present application provides a message processing method, the method comprising: S310: if a first message queue call request sent by a client is received, obtain the byte stream corresponding to the first message queue call request. S320: identify the protocol adopted by the first message queue call request based on the byte stream. As a method, the identification of the protocol adopted by the first message queue call request based on the byte stream comprises: obtaining the byte stream format of the byte stream corresponding to the first message queue call request; matching the byte stream format with multiple reference byte stream formats; and using the protocol corresponding to the reference byte stream format that matches the byte stream format as the protocol adopted by the first message queue call request. As a method, after the client establishes communication with the message queue proxy service that executes the message processing method through a long connection, the message queue proxy service can start to obtain the byte stream corresponding to the first message queue call request when receiving the first message queue call request sent by the client, and simultaneously identify the byte stream format of the byte stream corresponding to the first message queue call request, and then send the obtained byte stream format of the byte stream corresponding to the first message queue call request to multiple conversion plug-ins, so that the multiple conversion plug-ins perform reference byte stream format matching internally. If it is detected that a conversion plug-in returns a successful match, the reference byte stream format corresponding to the conversion plug-in that represents the feedback successful match information is matched with the byte stream format of the byte stream corresponding to the first message queue call request, and then the protocol corresponding to the reference byte stream format corresponding to the conversion plug-in is used as the protocol adopted by the first message queue call request.

[0061] It should be noted that the reference byte stream format corresponding to the conversion plug-in can be understood as the byte stream format corresponding to the protocol it can convert. Exemplarily, the conversion plug-in B can be configured to convert a first message queue call request based on protocol B into a second message queue call request based on protocol F, then the reference byte stream format corresponding to the conversion plug-in B is the byte stream format corresponding to protocol B. The byte stream format corresponding to the protocol can be understood as the format of the byte stream of the message queue call request generated based on the protocol during the transmission process.

[0062] As a method, after identifying the byte stream format of the byte stream corresponding to the first message queue call request, it can be directly cached in the corresponding long connection, so that subsequent message queue call requests under the same long connection can obtain the actual protocol used without going through the aforementioned protocol identification, thereby improving the efficiency of the message queue call.

[0063] S330: Based on the adopted protocol, convert the first message queue call request into a second message queue call request based on a target protocol, wherein the second message queue call request corresponds to a different message interaction protocol than the first message queue call request.

[0064] S340: Based on the second message queue call request and the designated call interface, generate message queue call data adapted to the designated call interface.

[0065] S350: According to the designated calling interface and the message queue calling data, calling the target message queue engine to execute the second message queue calling request.

[0066] A message processing method provided in an embodiment of the present application can determine the message interaction protocol adopted by the first message queue call request based on the byte stream corresponding to the first message queue call request, so that through protocol conversion, when the business party sends a message queue call request based on a client with different message interaction protocols, the message queue call request of the business party can still be identified, and message queue call data can be generated based on a public designated call interface, and then the second message queue call request is executed through the designated call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue.

[0067] See also Figure 7 The present application provides a message processing method, the method comprising: S410: selecting a first message queue engine as a target message queue engine from a plurality of candidate message queue engines. S420: if a first message queue call request sent by a client is received, converting the first message queue call request into a second message queue call request, wherein the second message queue call request has a different message interaction protocol from the first message queue call request.

[0068] S430: Based on the second message queue calling request and the designated calling interface, generate message queue calling data adapted to the designated calling interface.

[0069] S440: According to the designated calling interface and the message queue calling data, calling the target message queue engine to execute the second message queue calling request.

[0070] Optionally, the method provided in this embodiment further includes: if it is detected that the first message queue engine is in a specified state, using a second message queue engine among the multiple candidate message queue engines as the target message queue engine.

[0071] As one way, the specified state includes when the first message queue engine is in a state to be upgraded; if it is detected that the first message queue engine is in the specified state, the second message queue engine among the multiple candidate message queue engines is used as the target message queue engine, including:

[0072] If it is detected that the first message queue engine is in a state to be upgraded, a second message queue engine among the multiple candidate message queue engines is used as the target message queue engine.

[0073] Furthermore, as another way, the specified state includes when the first message queue engine is in a message sending blocking state; if it is detected that the first message queue engine is in the specified state, the second message queue engine among the multiple message queue engines to be selected is used as the target message queue engine, including: if it is detected that the first message queue engine is in a message sending blocking state, the second message queue engine among the multiple message queue engines to be selected is used as the target message queue engine.

[0074] Thus, the entire message queue proxy service is in a highly available state through the aforementioned switching method of the target message queue engine.

[0075] Optionally, the multiple message queue engines to be selected are all plug-in message queue engines.

[0076] A message processing method provided in an embodiment of the present application can determine the message interaction protocol adopted by the first message queue call request based on the byte stream corresponding to the first message queue call request, so that through protocol conversion, when the business party sends a message queue call request based on a client with a different message interaction protocol, the message queue call request of the business party can still be identified, and then the message queue call data is generated based on the public designated call interface, and then the second message queue call request is executed through the designated call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue. Moreover, in this embodiment, the target message queue engine can flexibly select from multiple candidate message queue engines, which improves the stability of message queue call request processing.

[0077] See also Figure 8 , the present application provides a message processing method, the method comprising:

[0078] S510: Perform security verification on the client that sends the first message queue call request.

[0079] S520: If the security verification succeeds, upon receiving the first message queue call request sent by the client, convert the first message queue call request into a second message queue call request, wherein the second message queue call request corresponds to a different message interaction protocol than the first message queue call request.

[0080] S530: Based on the second message queue calling request and the designated calling interface, generate message queue calling data adapted to the designated calling interface.

[0081] S540: According to the designated calling interface and the message queue calling data, calling the target message queue engine to execute the second message queue calling request.

[0082] A message processing method provided in an embodiment of the present application can still identify the business party's message queue call request when the business party sends a message queue call request based on a client with a different message interaction protocol, and then generate message queue call data based on a common designated call interface, and then execute the second message queue call request through the designated call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue. Moreover, in this embodiment, the target message queue engine can flexibly select from multiple candidate message queue engines, thereby improving the stability of message queue call request processing. Moreover, in this embodiment, the client that sends the first message queue call request will first be subject to security verification, thereby improving the security of the message queue proxy service.

[0083] See also Fig. 9 , a message processing device 600 provided in the present application, the device 600 includes: a protocol parsing unit 610, which is used to convert the first message queue call request sent by the client into a second message queue call request if the first message queue call request is received, and the second message queue call request corresponds to a different message interaction protocol from the first message queue call request. A call logic implementation unit 620, which is used to generate message queue call data adapted to the specified call interface based on the second message queue call request and the specified call interface. A message processing execution unit 630, which is used to call the target message queue engine to execute the second message queue call request according to the specified call interface and the message queue call data. As a mode, the protocol parsing unit 610 is specifically used to obtain the protocol adopted by the first message queue call request if the first message queue call request sent by the client is received; based on the adopted protocol, the first message queue call request is converted into a second message queue call request based on the target protocol. In this mode, optionally, the protocol parsing unit 610 is specifically used to call a conversion plug-in adapted to the first message queue call request based on the adopted protocol to convert the first message queue call request into a second message queue call request based on the target protocol.

[0084] In this way, the protocol parsing unit 610 is also specifically used to detect whether the conversion plug-in adapted to the first message queue call request has been loaded; if the conversion plug-in adapted to the first message queue call request has been loaded, execute the conversion plug-in adapted to the first message queue call request based on the adopted protocol, and call the conversion plug-in adapted to the first message queue call request to convert the first message queue call request into a second message queue call request based on the target protocol. And it is also specifically used to search for the conversion plug-in adapted to the first message queue call request in the plug-in storage area through the plug-in manager if the conversion plug-in adapted to the first message queue call request has not been loaded; if the conversion plug-in adapted to the first message queue call request is found, dynamically load the conversion plug-in adapted to the first message queue call request, and after the dynamic loading is completed, call the conversion plug-in adapted to the first message queue call request to convert the first message queue call request into a second message queue call request based on the target protocol. Correspondingly, Fig.10 As shown, the device 600 further includes: a conversion plug-in management unit 640, which is used to update the conversion plug-in stored in the plug-in storage area during initialization. As a method, the conversion plug-in management unit 640 is specifically used to obtain the conversion plug-in stored in the plug-in storage area during initialization; compare the conversion plug-in stored in the plug-in storage area with the conversion plug-in stored in the management end; if an inconsistent conversion plug-in is found during the comparison, obtain the inconsistent conversion plug-in and register it; and store the registered conversion plug-in in the plug-in storage area.

[0085] As a method, the protocol parsing unit 610 is specifically used to obtain the byte stream corresponding to the first message queue call request; and identify the protocol adopted by the first message queue call request based on the byte stream. In this method, the protocol parsing unit 610 is specifically used to obtain the byte stream format of the byte stream corresponding to the first message queue call request; match the byte stream format with multiple reference byte stream formats; and use the protocol corresponding to the reference byte stream format that matches the byte stream format as the protocol adopted by the first message queue call request.

[0086] As a way, Fig.11 As shown, the device 600 further includes: a message queue engine management unit 650, which is used to select a first message queue engine from a plurality of candidate message queue engines as the target message queue engine. Optionally, the message queue engine management unit 650 is specifically used to select a second message queue engine from the plurality of candidate message queue engines as the target message queue engine if it is detected that the first message queue engine is in a specified state.

[0087] Optionally, the specified state includes when the first message queue engine is in a state to be upgraded. In this case, the message queue engine management unit 650 is specifically used to use the second message queue engine among the multiple message queue engines to be selected as the target message queue engine if it is detected that the first message queue engine is in a state to be upgraded. Furthermore, optionally, the specified state includes when the first message queue engine is in a message sending blocking state. In this case, the message queue engine management unit 650 is specifically used to use the second message queue engine among the multiple message queue engines to be selected as the target message queue engine if it is detected that the first message queue engine is in a message sending blocking state.

[0088] Optionally, the multiple candidate message queue engines are all plug-in message queue engines. Fig.12 As shown, the device 600 further includes: a security verification unit 660, which is used to perform security verification on the client that sends the first message queue call request. In this way, the protocol parsing unit 610 is used to execute the first message queue call request sent by the client if the security verification is successful, and convert the first message queue call request into a second message queue call request.

[0089] A message processing device provided by the present application can first perform a message interaction protocol conversion after receiving a first message queue call request sent by a client, so as to convert the first message queue call request into a second message queue call request with a different message interaction protocol, and then generate message queue call data adapted to the specified call interface based on the second message queue call request and a specified call interface, and then call the target message queue engine to execute the second message queue call request according to the specified call interface and the message queue call data. In this way, through the protocol conversion, when the business party sends a message queue call request based on a client with a different message interaction protocol, the message queue call request of the business party can still be identified, and the message queue call data can be generated based on the common specified call interface, and then the second message queue call request can be executed through the specified call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue.

[0090] The following will be combined Fig.13 An electronic device provided by the present application is described.

[0091] See also Fig.10Based on the above SMS push method, the embodiment of the present application also provides another electronic device 200 including a processor 102 that can execute the above SMS push method. The electronic device 200 also includes a memory 104 and a network module 106. The memory 104 stores a program that can execute the content of the above embodiment, and the processor 102 can execute the program stored in the memory 104.

[0092] Among them, the processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 200, and executes various functions and processes data of the electronic device 200 by running or executing instructions, programs, code sets or instruction sets stored in the memory 104, and calling data stored in the memory 104. Optionally, the processor 102 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 102 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 102, but implemented separately through a communication chip.

[0093] The memory 104 may include a random access memory (RAM) or a read-only memory (ROM). The memory 104 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the terminal 100 during use.

[0094] The network module 106 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, such as communicating with an audio playback device. The network module 106 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM) cards, memories, etc. The network module 106 may communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices via wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. For example, the network module 106 may exchange information with a base station.

[0095] Optionally, the electronic device 200 may be a server for executing the aforementioned method embodiment.

[0096] Please refer to Fig.14 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 1100 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0097] The computer readable storage medium 1100 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer readable storage medium 1100 has storage space for program code 810 that performs any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 1110 can be compressed, for example, in an appropriate form.

[0098] To summarize, the message processing method, device, system and server provided by the present application can first perform a message interaction protocol conversion after receiving a first message queue call request sent by a client, so as to convert the first message queue call request into a second message queue call request with a different message interaction protocol, and then generate message queue call data adapted to the specified call interface based on the second message queue call request and the specified call interface, and then call the target message queue engine to execute the second message queue call request according to the specified call interface and the message queue call data, so that through the protocol conversion, when the business party sends a message queue call request based on a client with a different message interaction protocol, the message queue call request of the business party can still be identified, and the message queue call data can be generated based on the public specified call interface, and then the second message queue call request is executed through the specified call interface, thereby improving the flexibility and compatibility in the processing of messages transmitted by the message queue.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A message processing method, characterized in that: Applied to a server, the method comprises: If a first message queue call request sent by the client is received, converting the first message queue call request into a second message queue call request, wherein the second message queue call request corresponds to a different message interaction protocol than the first message queue call request; Based on the second message queue call request and the specified call interface, generate message queue call data adapted to the specified call interface, wherein the specified call interface is a call interface configured for the encapsulated multiple message queue engines after encapsulating the multiple message queue engines, and the multiple message queue engines are of different types; According to the designated calling interface and the message queue calling data, a target message queue engine is called to execute the second message queue calling request to send or extract information, wherein the target message queue engine is determined from the multiple message queue engines.

2. The method according to claim 1, characterized in that If a first message queue call request sent by the client is received, converting the first message queue call request into a second message queue call request includes: If a first message queue calling request sent by the client is received, obtaining a protocol adopted by the first message queue calling request; Based on the adopted protocol, the first message queue call request is converted into a second message queue call request based on a target protocol.

3. The method according to claim 2, characterized in that The converting, based on the adopted protocol, the first message queue call request into a second message queue call request based on a target protocol comprises: Based on the adopted protocol, a conversion plug-in adapted to the first message queue call request is called to convert the first message queue call request into a second message queue call request based on a target protocol.

4. The method according to claim 3, characterized in that Before calling the conversion plug-in adapted to the first message queue call request to convert the first message queue call request into a second message queue call request based on the target protocol based on the adopted protocol, the method further includes: Detecting whether the conversion plug-in adapted for the first message queue call request has been loaded; If the conversion plug-in adapted to the first message queue call request has been loaded, the conversion plug-in adapted to the first message queue call request is executed based on the adopted protocol, and the conversion plug-in adapted to the first message queue call request is called to convert the first message queue call request into a second message queue call request based on the target protocol.

5. The method according to claim 4, characterized in that The method further comprises: If the conversion plug-in adapted for the first message queue call request is not loaded, searching the conversion plug-in adapted for the first message queue call request in the plug-in storage area through the plug-in manager; If a conversion plug-in adapted to the first message queue call request is found, the conversion plug-in adapted to the first message queue call request is dynamically loaded, and after the dynamic loading is completed, the conversion plug-in adapted to the first message queue call request is called to convert the first message queue call request into a second message queue call request based on the target protocol.

6. The method according to claim 5, characterized in that The method further comprises: During initialization, the conversion plug-in stored in the plug-in storage area is updated.

7. The method according to claim 6, characterized in that The updating of the conversion plug-in stored in the plug-in storage area during initialization includes: During initialization, obtaining the conversion plug-in stored in the plug-in storage area; Comparing the conversion plug-in stored in the plug-in storage area with the conversion plug-in stored in the management end; If an inconsistent conversion plug-in is found during the comparison, the inconsistent conversion plug-in is obtained and registered; The registered conversion plug-in is stored in the plug-in storage area.

8. The method according to any one of claims 2 to 7, characterized in that: The obtaining of the protocol adopted by the first message queue calling request includes: Obtaining a byte stream corresponding to the first message queue call request; A protocol adopted by the first message queue call request is identified based on the byte stream.

9. The method according to claim 8, characterized in that The identifying, based on the byte stream, a protocol adopted by the first message queue call request, comprises: Obtaining the byte stream format of the byte stream corresponding to the first message queue call request; matching the byte stream format with a plurality of reference byte stream formats; A protocol corresponding to a reference byte stream format matching the byte stream format is used as the protocol adopted by the first message queue call request.

10. The method according to claim 1, characterized in that The method further comprises: If it is detected that the first message queue engine is in a specified state, a second message queue engine among the multiple candidate message queue engines is used as the target message queue engine.

11. The method according to claim 10, characterized in that The specified state includes when the first message queue engine is in a state to be upgraded; if it is detected that the first message queue engine is in the specified state, the second message queue engine among the multiple candidate message queue engines is used as the target message queue engine, including: If it is detected that the first message queue engine is in a state to be upgraded, a second message queue engine among the multiple candidate message queue engines is used as the target message queue engine.

12. The method according to claim 10, characterized in that The specified state includes when the first message queue engine is in a message sending blocking state; if it is detected that the first message queue engine is in the specified state, the second message queue engine among the multiple candidate message queue engines is used as the target message queue engine, including: If it is detected that the first message queue engine is in a message sending blocking state, a second message queue engine among a plurality of candidate message queue engines is used as the target message queue engine.

13. The method according to any one of claims 10 to 12, characterized in that: The multiple message queue engines to be selected are all plug-in message queue engines.

14. The method according to claim 1, characterized in that If a first message queue call request sent by the client is received, before converting the first message queue call request into a second message queue call request, the method further includes: Performing security verification on the client that sends the first message queue call request; If the security verification succeeds, the step of receiving a first message queue calling request sent by the client is executed to convert the first message queue calling request into a second message queue calling request.

15. A message processing method, characterized in that: Applied to a message processing system, the message processing system includes a protocol processing device, a message logic implementation device, and a message queue engine carrying device, the method includes: If the protocol processing device receives a first message queue call request sent by the client, the protocol processing device converts the first message queue call request into a second message queue call request, where the second message queue call request corresponds to a different message interaction protocol than the first message queue call request; The message logic implementation device generates message queue call data adapted to the specified call interface based on the second message queue call request and the specified call interface, wherein the specified call interface is a call interface configured for the encapsulated multiple message queue engines after encapsulating the multiple message queue engines, and the multiple message queue engines are of different types; The message queue engine carrier device calls the target message queue engine to execute the second message queue call request according to the specified calling interface and the message queue calling data, so as to send or extract information, wherein the target message queue engine is determined from the multiple message queue engines.

16. A message processing device, characterized in that: Running on a server, the device comprises: a protocol parsing unit, configured to convert a first message queue calling request sent by a client into a second message queue calling request upon receiving the first message queue calling request, wherein the second message queue calling request corresponds to a different message interaction protocol from the first message queue calling request; a calling logic implementation unit, configured to generate message queue calling data adapted to the specified calling interface based on the second message queue calling request and the specified calling interface, wherein the specified calling interface is a calling interface configured for the encapsulated multiple message queue engines after encapsulating the multiple message queue engines, and the multiple message queue engines are of different types; A message processing execution unit is used to call a target message queue engine to execute the second message queue call request according to the specified calling interface and the message queue calling data, so as to send information or extract information, wherein the target message queue engine is determined from the multiple message queue engines.

17. A message processing system, characterized in that: The message processing system includes a protocol processing device, a message logic implementation device and a message queue engine bearing device, and the system includes: The protocol processing device is configured to convert a first message queue call request sent by a client into a second message queue call request upon receiving the first message queue call request, wherein the second message queue call request corresponds to a different message interaction protocol than the first message queue call request; The message logic implementation device is used to generate message queue call data adapted to the specified call interface based on the second message queue call request and the specified call interface, wherein the specified call interface is a call interface configured for the encapsulated multiple message queue engines after encapsulating the multiple message queue engines, and the multiple message queue engines are of different types; A message queue engine carrier device is used to call a target message queue engine to execute the second message queue call request according to the specified calling interface and the message queue calling data, so as to send information or extract information, wherein the target message queue engine is determined from the multiple message queue engines.

18. A server, characterized in that: including one or more processors and memory; One or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 15.

19. A computer-readable storage medium having a program code executable by a processor, characterized in that: The program code enables the processor to execute the method according to any one of claims 1-15.