CN113138862A - Message processing method, server, device, system and storage medium - Google Patents

Message processing method, server, device, system and storage medium Download PDF

Info

Publication number
CN113138862A
CN113138862A CN202010056378.9A CN202010056378A CN113138862A CN 113138862 A CN113138862 A CN 113138862A CN 202010056378 A CN202010056378 A CN 202010056378A CN 113138862 A CN113138862 A CN 113138862A
Authority
CN
China
Prior art keywords
message
request
response
server
processing
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
CN202010056378.9A
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.)
Foshan Viomi Electrical Technology Co Ltd
Original Assignee
Foshan Viomi Electrical Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Foshan Viomi Electrical Technology Co Ltd filed Critical Foshan Viomi Electrical Technology Co Ltd
Priority to CN202010056378.9A priority Critical patent/CN113138862A/en
Publication of CN113138862A publication Critical patent/CN113138862A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application discloses a message processing method, a server, a device, a system and a storage medium, wherein the method comprises the following steps: sending a first request message to a message queue, so that equipment can acquire the first request message by monitoring the message queue, perform logic processing on the first request message, acquire a corresponding first response message, and send the first response message to the message queue; monitoring the message queue to obtain the first response message; if the issue scene of the first request message is that the server issues according to a call request initiated by a client, the first response message is written into a cache for the client to poll the cache to obtain the first response message, so that the message security is improved.

Description

Message processing method, server, device, system and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a message processing method, a server, a device, a system, and a storage medium.
Background
Currently, when an APP (Application) client communicates with a corresponding server, a message processing method is to use a message queue, a message sender sends a message to the message queue, and a message receiver obtains the message sent by the message sender from the message queue. However, because the server is a multi-node architecture, messages sent by the server to the message queue may be heard by uncertain other client instances, and thus, there is a security risk to the messages.
Therefore, how to improve the security of the message becomes an urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides a message processing method, a server, equipment, a system and a storage medium, which can improve the safety of messages.
In a first aspect, an embodiment of the present application provides a message processing method, applied to a server, including:
sending a first request message to a message queue, so that equipment can acquire the first request message by monitoring the message queue, perform logic processing on the first request message, acquire a corresponding first response message, and send the first response message to the message queue;
monitoring the message queue to obtain the first response message;
and if the issuing scene of the first request message is that the server issues according to a call request initiated by a client, writing the first response message into a cache so that the client can poll the cache to obtain the first response message.
In a second aspect, an embodiment of the present application provides a server, which includes a processor and a memory, where the memory stores a computer program, and the processor executes the message processing method applied to the server when calling the computer program in the memory.
In a third aspect, an embodiment of the present application provides a message processing method, which is applied to a device, and includes:
monitoring a message queue, and acquiring a first request message sent to the message queue by a server;
the first request message is subjected to logic processing, a corresponding first response message is obtained, the first response message is sent to the message queue so that the server can monitor the message queue to obtain the first response message, if the issuing scene of the first request message is that the server issues according to a call request initiated by a client, the first response message is written into a cache, and the client polls the cache to obtain the first response message.
In a fourth aspect, an embodiment of the present application provides an apparatus, including a processor and a memory, where the memory stores a computer program, and the processor executes the message processing method applied to the apparatus when calling the computer program in the memory.
In a fifth aspect, an embodiment of the present application provides a message processing system, which includes the server and the device described above.
In a sixth aspect, the present application further provides a computer-readable storage medium for storing a computer program, where the computer program, when executed by a processor, causes the processor to implement the above-mentioned message processing method.
The embodiment of the application provides a message processing method, a server, equipment, a system and a storage medium, wherein the server issues a first request message to a message queue according to a call request initiated by a client, the equipment acquires the first request message by monitoring the message queue, performs logic processing on the first request message, acquires a corresponding first response message, and sends the first response message to the message queue; the server monitors the message queue to obtain the first response message, the first response message is written into the cache, the client polls the cache to obtain the first response message, and the first response message is not sent to the message queue, so that monitoring by other examples is avoided, and the message safety is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic block diagram of a message processing system provided by an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of a message processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a message downlink flow according to an embodiment of the present application;
fig. 4 is a schematic flow chart of message uplink according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating steps of another message processing method according to an embodiment of the present application;
FIG. 6 is a schematic block diagram of a server provided by an embodiment of the present application;
fig. 7 is a schematic block diagram of an apparatus provided by an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The flow diagrams depicted in the figures are merely illustrative and do not necessarily include all of the elements and operations/steps, nor do they necessarily have to be performed in the order depicted. For example, some operations/steps may be decomposed, combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It is to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
When the APP client communicates with the corresponding server, a message processing mode is that a message queue is adopted, a message sending party sends a message to the message queue, and a message receiving party obtains the message sent by the message sending party from the message queue. However, because the server is a multi-node architecture, messages sent by the server to the message queue may be heard by uncertain other client instances, and thus, there is a security risk to the messages.
In order to solve the above problem, embodiments of the present application provide a message processing method, a server, a device, a system, and a storage medium, which are used to improve the security of a message.
Referring to fig. 1, fig. 1 is a schematic block diagram of a message processing system according to an embodiment of the present application. As shown in fig. 1, the message processing system 1000 may include a device 100 and a server 200, the device 100 and the server 200 being communicatively coupled, optionally, the device 100 being communicatively coupled to the server 200 based on a Wi-Fi Mesh wireless Mesh network. It should be noted that the device 100 and the server 200 may also be communicatively connected in other manners, such as Zigbee, bluetooth, and the like, so as to implement data interaction between the device 100 and the server.
Illustratively, the message processing system 1000 also includes a client 300. The device 100 is controlled and managed by the client 300.
The device 100 comprises a communication module 110 and a control device 120, wherein the communication module 110 is used for the communication connection between the device 100 and the server 200.
The control device 120 includes a Processor, which may be a Central Processing Unit (CPU), or other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The server 200 may be an independent server, or a server cluster, or a system formed by a plurality of servers according to a certain logic. In practical applications, the server 200 may be an IOT (Internet of things) cloud server.
It will be appreciated that the above-described nomenclature for the components of the message processing system is for identification purposes only, and does not limit the embodiments of the present application accordingly.
The message processing method provided by the embodiment of the present application will be described in detail below based on a message processing system, a device in the message processing system, and a server in the message processing system.
Referring to fig. 2, fig. 2 is a flowchart illustrating steps of a message processing method according to an embodiment of the present application. The message processing method is specifically applied to the server provided by the embodiment to improve the security of the message.
As shown in fig. 2, the message processing method specifically includes steps S101 to S103.
S101, sending a first request message to a message queue, so that a device can acquire the first request message by monitoring the message queue, perform logic processing on the first request message, acquire a corresponding first response message, and send the first response message to the message queue.
Generally, in the message downlink, two issuing scenarios for issuing a request message by a server include that the server issues a call request initiated by an APP, and the server actively issues the call request. In any issue scenario, the server issues the request Message to the Message queue, for example, the server issues the request Message to an MQTT (Message Queuing telemetry transport) Message queue. For the convenience of differentiated description, the request message issued by the server is hereinafter referred to as a first request message.
In some embodiments, when receiving a call request initiated by an APP, a server first queries whether a response value corresponding to the call request exists in a cache. For example, if the APP initiates a call request for querying the device attribute and the cache stores the relevant attribute information of the device, the server queries that a response value corresponding to the call request exists in the cache.
And when the server inquires that the corresponding response value exists in the cache, the server directly returns the response value to the APP. Otherwise, when the corresponding response value does not exist in the cache, the server sends the corresponding first request message to the message queue according to the call request.
The equipment monitors the message queue, acquires a first request message sent to the message queue by the server, performs logic processing on the first request message, acquires a corresponding first response message, and sends the response message to the message queue.
In some embodiments, the message and processing logic relationship routing table is preset by the following specific process: (1) establishing a Handler processing template of the message; (2) defining a Handler implementation for different request/response messages; (3) loading all handlers when the application is started; (4) and establishing a routing table of the relation between the request/response message and the Handler.
The device acquires the message processing logic corresponding to the first request message according to a preset message and processing logic relation routing table, and performs logic processing on the first request message according to the message processing logic to acquire a corresponding first response message.
S102, monitoring the message queue and acquiring the first response message.
S103, if the issue scene of the first request message is that the server issues according to a call request initiated by a client, writing the first response message into a cache for the client to poll the cache to obtain the first response message.
The server acquires a first response message sent by the equipment by monitoring the message queue, and then carries out corresponding processing operation on the first response message according to the issuing scene of the first request message. And if the issuing scene of the first request message is actively issued by the server, the server records the first response message and finishes the message acquisition operation.
If the issue scenario of the first request message is that the server issues the first request message according to the call request initiated by the APP, after obtaining the first response message, the server writes the first response message into a cache, where the cache may include but is not limited to a public cache. And the APP polling cache acquires the first response message, namely acquires a response result corresponding to the call request initiated by the APP polling cache. Optionally, the APP acquires a first response message of the device response processing by polling the cache through a processing thread initiating the call request, and the processing thread synchronously returns the first response message to the APP.
Illustratively, the cache Key format is preset, for example, the Key format is set as follows: device unique ID + message ID. And the APP acquires a first response message of equipment response processing from the cache according to a preset cache Key format.
In some embodiments, after the APP initiates the call request, the cache is polled, and the result of the current polling may be that the first response message is acquired or that the first response message is not acquired. If the current polling does not acquire the first response message, judging whether the polling time reaches the preset time length, if not, continuing polling caching, and circulating the operation. And if the polling time reaches the preset time length, that is, the polling does not acquire the first response message within the preset time length, sending out overtime prompt information. Optionally, the APP polls the cache through a processing thread initiating the call request, and if the first response message is not obtained by polling within a preset time length, the processing thread returns timeout indication information to the APP.
Next, a message processing procedure is introduced by using an example of a behavior under a message in which an APP actively initiates a call request, for example, as shown in fig. 3, a message downlink flow is as follows:
(1) initiating an HTTP calling request by the APP;
(2) the server polls the public cache and judges whether the calling hits a cache rule, namely whether a response value corresponding to the calling request is stored in the public cache, if so, the cache value is returned; if not, continuing the following process;
(3) the server sends a Method message to an MQTT message queue;
(4) the device monitors a Method message from an MQTT message queue;
(5) the equipment processes the Method message and returns a Reply response message to the MQTT message queue;
(6) the server monitors Reply response messages from the MQTT message queue and writes the Reply response messages into a public cache;
(7) and the processing thread of the calling request initiated by the APP acquires Reply response messages of asynchronous response of the equipment by polling the public cache, and synchronously returns the Reply response messages to the APP.
For message uplink, the device sends a request message to the message queue, and for convenience of description, the request message is hereinafter referred to as a second request message. And the server acquires a second request message sent to the message queue by the equipment by monitoring the message queue. After the second request message is obtained, the server performs logic processing on the second request message according to the message processing logic corresponding to the second request message, and obtains a corresponding second response message. Optionally, the server queries a preset message and processing logic relationship routing table, acquires a message processing logic corresponding to the second request message, and performs logic processing on the second request message according to the message processing logic to acquire a corresponding second response message.
In some embodiments, after acquiring the second request message, the server performs preprocessing on the second request message, where the preprocessing includes at least one of decryption processing and signature verification processing. For example, the device is a gateway device, and the gateway device performs AES encryption on the second request message, and the server performs AES decryption on the encrypted second request message after obtaining the encrypted second request message, to obtain the original second request message.
After the second request message is preprocessed, the server processes the preprocessed second request message logically according to the message processing logic corresponding to the second request message, and obtains a corresponding second response message.
And then, the server sends the second response message to the message queue, and the equipment monitors the message queue to acquire the second response message.
For example, as shown in fig. 4, the message uplink flow is as follows:
(1) the equipment sends a Method message to an MQTT message queue;
(2) the server monitors a Method message from the MQTT message queue;
(3) the server decrypts and checks the signature of the Method message through public message processing logic;
(4) the server executes processing logic corresponding to the Method message to acquire Reply response message;
(5) the server encapsulates the Reply response message and delivers the Reply response message to the MQTT message queue;
(6) and the equipment monitors Reply response messages from the MQTT message queue.
Referring to fig. 5, fig. 5 is a flowchart illustrating steps of a message processing method according to an embodiment of the present application. The message processing method is particularly applied to equipment to improve the safety of the message.
As shown in fig. 5, the message processing method specifically includes steps S201 to S202.
S201, monitoring a message queue, and acquiring a first request message sent to the message queue by a server.
Generally, in the message downlink, two issuing scenarios for issuing a request message by a server include that the server issues a call request initiated by an APP, and the server actively issues the call request. In any issue scenario, the server issues the request Message to the Message queue, for example, the server issues the request Message to an MQTT (Message Queuing telemetry transport) Message queue. For the convenience of differentiated description, the request message issued by the server is hereinafter referred to as a first request message. The equipment monitors the message queue and acquires a first request message sent to the message queue by the server.
S202, carrying out logic processing on the first request message to obtain a corresponding first response message, sending the first response message to the message queue so that the server monitors the message queue to obtain the first response message, writing the first response message into a cache if the issuing scene of the first request message is that the server issues according to a call request initiated by a client, and polling the cache by the client to obtain the first response message.
After the first request message sent to the message queue by the server is acquired, the device performs logic processing on the first request message, acquires a corresponding first response message, and sends the response message to the message queue.
The server acquires a first response message sent by the equipment by monitoring the message queue, and then carries out corresponding processing operation on the first response message according to the issuing scene of the first request message. And if the issuing scene of the first request message is actively issued by the server, the server records the first response message and finishes the message acquisition operation.
If the issue scenario of the first request message is that the server issues the first request message according to the call request initiated by the APP, after obtaining the first response message, the server writes the first response message into a cache, where the cache may include but is not limited to a public cache. And the APP polling cache acquires the first response message, namely acquires a response result corresponding to the call request initiated by the APP polling cache. Optionally, the APP acquires a first response message of the device response processing by polling the cache through a processing thread initiating the call request, and the processing thread synchronously returns the first response message to the APP.
In the message uplink embodiment, the device sends a request message to the message queue, and for convenience of description, the request message is referred to as a second request message hereinafter. And the server acquires a second request message sent to the message queue by the equipment by monitoring the message queue. After the second request message is obtained, the server performs logic processing on the second request message according to the message processing logic corresponding to the second request message, and obtains a corresponding second response message. Optionally, the server queries a preset message and processing logic relationship routing table, acquires a message processing logic corresponding to the second request message, and performs logic processing on the second request message according to the message processing logic to acquire a corresponding second response message.
In some embodiments, after acquiring the second request message, the server performs preprocessing on the second request message, where the preprocessing includes at least one of decryption processing and signature verification processing. For example, the device is a gateway device, and the gateway device performs AES encryption on the second request message, and the server performs AES decryption on the encrypted second request message after obtaining the encrypted second request message, to obtain the original second request message.
After the second request message is preprocessed, the server processes the preprocessed second request message logically according to the message processing logic corresponding to the second request message, and obtains a corresponding second response message.
And then, the server sends the second response message to the message queue, and the equipment monitors the message queue to acquire the second response message. Further, the device may perform a corresponding processing operation according to the second response message.
In the embodiment, the server issues the first request message to the message queue according to the call request initiated by the client, the device acquires the first request message through monitoring the message queue, performs logic processing on the first request message, acquires the corresponding first response message, and sends the first response message to the message queue; the server monitors the message queue to obtain the first response message, the first response message is written into the cache, the client polls the cache to obtain the first response message, and the first response message is not sent to the message queue, so that monitoring by other examples is avoided, and the message safety is improved.
Referring to fig. 6, fig. 6 is a schematic block diagram of a server according to an embodiment of the present application. The server 600 includes a processor 610 and a memory 620, and the processor 610 and the memory 620 are connected by a bus, such as an I2C (Inter-integrated Circuit) bus.
Specifically, the Processor 610 may be a Micro-controller Unit (MCU), a Central Processing Unit (CPU), a Digital Signal Processor (DSP), or the like.
Specifically, the Memory 620 may be a Flash chip, a Read-Only Memory (ROM) magnetic disk, an optical disk, a usb disk, or a removable hard disk.
Wherein the processor is configured to run a computer program stored in the memory and to implement the following steps when executing the computer program:
sending a first request message to a message queue, so that equipment can acquire the first request message by monitoring the message queue, perform logic processing on the first request message, acquire a corresponding first response message, and send the first response message to the message queue;
monitoring the message queue to obtain the first response message;
and if the issuing scene of the first request message is that the server issues according to a call request initiated by a client, writing the first response message into a cache so that the client can poll the cache to obtain the first response message.
In some embodiments, the processor, prior to implementing the sending the first request message to the message queue, further implements:
when a call request initiated by the client is received, inquiring whether a response value corresponding to the call request exists in a cache;
if the response value exists, returning the response value to the client;
and if the response value does not exist, executing the step of sending the first request message to the message queue.
In some embodiments, the processor, when executing the computer program, further implements:
monitoring the message queue, and acquiring a second request message sent to the message queue by equipment;
and performing logic processing on the second request message according to the message processing logic corresponding to the second request message to obtain a corresponding second response message, and sending the second response message to the message queue so that the equipment monitors the message queue to obtain the second response message.
In some embodiments, before implementing the message processing logic corresponding to the second request message and performing logic processing on the second request message, the processor further implements:
preprocessing the second request message, wherein the preprocessing comprises at least one of decryption processing and signature verification processing;
when the processor implements the message processing logic corresponding to the second request message, performs logic processing on the second request message, and obtains a corresponding second response message, the following is specifically implemented:
and performing logic processing on the preprocessed second request message according to the message processing logic corresponding to the second request message to obtain the second response message.
In some embodiments, before implementing the message processing logic corresponding to the second request message and performing logic processing on the second request message, the processor further implements:
and inquiring a preset message and processing logic relation routing table to acquire the message processing logic corresponding to the second request message.
In some embodiments, the processor, after implementing the listening to the message queue and obtaining the first response message, further implements:
and if the issuing scene of the first request message is the active issuing of the server, recording the first response message.
Referring to fig. 7, fig. 7 is a schematic block diagram of an apparatus according to an embodiment of the present application. The device 700 includes a processor 710 and a memory 720, the processor 710 and the memory 720 being connected by a bus, such as an I2C (Inter-integrated Circuit) bus.
Specifically, the Processor 710 may be a Micro-controller Unit (MCU), a Central Processing Unit (CPU), a Digital Signal Processor (DSP), or the like.
Specifically, the Memory 720 may be a Flash chip, a Read-Only Memory (ROM) magnetic disk, an optical disk, a usb disk, or a removable hard disk.
Wherein the processor is configured to run a computer program stored in the memory and to implement the following steps when executing the computer program:
monitoring a message queue, and acquiring a first request message sent to the message queue by a server;
the first request message is subjected to logic processing, a corresponding first response message is obtained, the first response message is sent to the message queue so that the server can monitor the message queue to obtain the first response message, if the issuing scene of the first request message is that the server issues according to a call request initiated by a client, the first response message is written into a cache, and the client polls the cache to obtain the first response message.
In some embodiments, the processor, when executing the computer program, further implements:
sending a second request message to the message queue, so that the server acquires the second request message by monitoring the message queue, performs logic processing on the second request message to acquire a corresponding second response message, and sends the second response message to the message queue;
and monitoring the message queue to acquire the second response message.
Embodiments of the present application also provide a message processing system, which may be, for example, the message processing system shown in fig. 1, and the message processing system includes a device and a server. It should be noted that the server may be the server illustrated in fig. 6, and the device may be the device illustrated in fig. 7.
For the specific operation of linkage between the device and the server in the message processing system, reference may be made to the foregoing embodiments, which are not described herein again.
In an embodiment of the present application, a computer-readable storage medium is further provided, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and the processor executes the program instructions to implement the steps of the message processing method provided in the foregoing embodiment.
The computer readable storage medium may be an internal storage unit of the device or the server of the foregoing embodiment, for example, a hard disk or a memory of the device or the server. The computer readable storage medium may also be an external storage device of the device or server, such as a plug-in hard disk provided on the device or server, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like.
Since the computer program stored in the computer-readable storage medium can execute any message processing method provided in the embodiments of the present application, beneficial effects that can be achieved by any message processing method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. A message processing method applied to a server is characterized by comprising the following steps:
sending a first request message to a message queue, so that equipment can acquire the first request message by monitoring the message queue, perform logic processing on the first request message, acquire a corresponding first response message, and send the first response message to the message queue;
monitoring the message queue to obtain the first response message;
and if the issuing scene of the first request message is that the server issues according to a call request initiated by a client, writing the first response message into a cache so that the client can poll the cache to obtain the first response message.
2. The message processing method of claim 1, wherein before sending the first request message to the message queue, further comprising:
when a call request initiated by the client is received, inquiring whether a response value corresponding to the call request exists in a cache;
if the response value exists, returning the response value to the client;
and if the response value does not exist, executing the step of sending the first request message to the message queue.
3. The message processing method according to claim 1, wherein the client polls the cache after initiating the call request, and sends out a timeout indication message if the first response message is not acquired within a preset time period.
4. A message processing method according to any of claims 1 to 3, characterized in that the method further comprises:
monitoring the message queue, and acquiring a second request message sent to the message queue by equipment;
and performing logic processing on the second request message according to the message processing logic corresponding to the second request message to obtain a corresponding second response message, and sending the second response message to the message queue so that the equipment monitors the message queue to obtain the second response message.
5. The message processing method according to claim 4, wherein before performing logic processing on the second request message according to the message processing logic corresponding to the second request message, the method further comprises:
preprocessing the second request message, wherein the preprocessing comprises at least one of decryption processing and signature verification processing;
the performing logic processing on the second request message according to the message processing logic corresponding to the second request message to obtain a corresponding second response message includes:
and performing logic processing on the preprocessed second request message according to the message processing logic corresponding to the second request message to obtain the second response message.
6. The message processing method according to claim 4, wherein before performing logic processing on the second request message according to the message processing logic corresponding to the second request message, the method further comprises:
and inquiring a preset message and processing logic relation routing table to acquire the message processing logic corresponding to the second request message.
7. The message processing method according to claim 1, wherein the monitoring the message queue, after acquiring the first response message, further comprises:
and if the issuing scene of the first request message is the active issuing of the server, recording the first response message.
8. A message processing method is applied to equipment and is characterized by comprising the following steps:
monitoring a message queue, and acquiring a first request message sent to the message queue by a server;
the first request message is subjected to logic processing, a corresponding first response message is obtained, the first response message is sent to the message queue so that the server can monitor the message queue to obtain the first response message, if the issuing scene of the first request message is that the server issues according to a call request initiated by a client, the first response message is written into a cache, and the client polls the cache to obtain the first response message.
9. The message processing method of claim 8, wherein the method further comprises:
sending a second request message to the message queue, so that the server acquires the second request message by monitoring the message queue, performs logic processing on the second request message to acquire a corresponding second response message, and sends the second response message to the message queue;
and monitoring the message queue to acquire the second response message.
10. A server, characterized by comprising a processor and a memory, in which a computer program is stored, the processor executing the message processing method according to any one of claims 1 to 7 when calling the computer program in the memory.
11. An apparatus comprising a processor and a memory, the memory having stored therein a computer program, the processor when calling the computer program in the memory performing the message processing method of claim 8 or 9.
12. A message processing system comprising a server according to claim 10 and a device according to claim 11.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to implement the message processing method according to any one of claims 1 to 7; or to implement a message processing method according to claim 8 or 9.
CN202010056378.9A 2020-01-18 2020-01-18 Message processing method, server, device, system and storage medium Pending CN113138862A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010056378.9A CN113138862A (en) 2020-01-18 2020-01-18 Message processing method, server, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010056378.9A CN113138862A (en) 2020-01-18 2020-01-18 Message processing method, server, device, system and storage medium

Publications (1)

Publication Number Publication Date
CN113138862A true CN113138862A (en) 2021-07-20

Family

ID=76808559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010056378.9A Pending CN113138862A (en) 2020-01-18 2020-01-18 Message processing method, server, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN113138862A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221885A (en) * 2021-12-07 2022-03-22 深圳市链融科技股份有限公司 Message asynchronous processing method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378221A (en) * 2013-08-14 2015-02-25 沈阳中科博微自动化技术有限公司 Asynchronous calling method applied to integrated circuit production line monitoring system
CN108449410A (en) * 2018-03-19 2018-08-24 深信服科技股份有限公司 Information management method, system and relevant apparatus in a kind of cloud platform
CN109995865A (en) * 2019-04-03 2019-07-09 广东工业大学 A kind of request responding method and device of the data information based on mobile edge calculations

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378221A (en) * 2013-08-14 2015-02-25 沈阳中科博微自动化技术有限公司 Asynchronous calling method applied to integrated circuit production line monitoring system
CN108449410A (en) * 2018-03-19 2018-08-24 深信服科技股份有限公司 Information management method, system and relevant apparatus in a kind of cloud platform
CN109995865A (en) * 2019-04-03 2019-07-09 广东工业大学 A kind of request responding method and device of the data information based on mobile edge calculations

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221885A (en) * 2021-12-07 2022-03-22 深圳市链融科技股份有限公司 Message asynchronous processing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10965772B2 (en) Interface invocation method and apparatus for hybrid cloud
CN110601952A (en) Multi-channel message notification sending method and device
EP3489825A1 (en) Method, apparatus and computer readable storage medium for processing service
CN113141383B (en) Device information subscription method, client, server, system and storage medium
CN110784450A (en) Single sign-on method and device based on browser
CN110471749B (en) Task processing method, device, computer readable storage medium and computer equipment
CN111045807B (en) Method, device, computer equipment and storage medium for processing task based on zookeeper
CN109348434B (en) Scene information sending method, sending device and terminal equipment
CN113220435A (en) Task processing method and related product
CN114598749A (en) Service access method and device
CN109389306B (en) User order synchronization method and device
CN113726743B (en) Method, device, equipment and medium for detecting network replay attack
CN113452770B (en) Data synchronization method, device, computer equipment and storage medium
US10268532B2 (en) Application message processing system, method, and application device
CN113138862A (en) Message processing method, server, device, system and storage medium
US20160112525A1 (en) Distribution control device and method for same, push distribution system, and storage medium
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN114138371B (en) Configuration dynamic loading method and device, computer equipment and storage medium
CN113076380B (en) Data synchronization method, device, system, equipment and storage medium
CN111277557B (en) Real-time communication method, equipment and storage medium
CN109034768B (en) Financial reconciliation method, apparatus, computer device and storage medium
US20150281343A1 (en) Information processing device, information processing system, and processing method
WO2024067165A1 (en) Method for processing authentication capability, and terminal, system and storage medium
CN114374545B (en) Method, server, device and electronic equipment for preventing message leakage
CN113362175B (en) Interface display method and device, storage medium and terminal equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210720

RJ01 Rejection of invention patent application after publication