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

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

Info

Publication number
CN113079110B
CN113079110B CN202110444457.1A CN202110444457A CN113079110B CN 113079110 B CN113079110 B CN 113079110B CN 202110444457 A CN202110444457 A CN 202110444457A CN 113079110 B CN113079110 B CN 113079110B
Authority
CN
China
Prior art keywords
request message
message
request
feedback
processing module
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.)
Active
Application number
CN202110444457.1A
Other languages
Chinese (zh)
Other versions
CN113079110A (en
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.)
Shengli Anyuan Technology Hangzhou Co ltd
Original Assignee
Shengli Anyuan Technology Hangzhou 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 Shengli Anyuan Technology Hangzhou Co ltd filed Critical Shengli Anyuan Technology Hangzhou Co ltd
Priority to CN202110444457.1A priority Critical patent/CN113079110B/en
Publication of CN113079110A publication Critical patent/CN113079110A/en
Application granted granted Critical
Publication of CN113079110B publication Critical patent/CN113079110B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2416Real-time traffic

Abstract

The embodiment of the invention provides a message processing method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving a request message sent by a client; dividing the request message into a first request message or a second request message according to the response speed requirement; processing the first request message by adopting a first heterogeneous processing module to obtain a first request message processing result, or processing the second request message by adopting a second heterogeneous processing module to obtain a second request message processing result; and sending the corresponding message to the receiving object according to the processing result of the first request message or the processing result of the second request message. The request messages with different response speed requirements can be processed by different heterogeneous processing modules respectively, so that the request message with high response speed requirement is prevented from being congested by the request message with low response speed requirement, and the request message with high response speed requirement can be processed in time.

Description

Message processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a message processing method, apparatus, device, and storage medium.
Background
With the rapid development of economic markets, in the financial fields such as securities and futures, the requirements on the message processing efficiency of the whole link from the client to the transit terminal and then to the exchange server terminal are higher and higher.
In the prior art, the received request messages of the client are generally processed according to the receiving sequence, but actually, the response speed requirements of the request messages may be different.
Therefore, the conventional message processing method may cause the request message with high response speed requirement to be congested by the request message with low response speed requirement, so that the request message with high response speed requirement cannot be processed in time.
Disclosure of Invention
Embodiments of the present invention provide a message processing method, an apparatus, a device, and a storage medium, to solve the technical problem in the prior art that a request message with a high response speed requirement may be congested by a request message with a low response speed requirement due to the need to sequentially process various received request messages, so that the request message with the high response speed requirement cannot be processed in time.
In a first aspect, an embodiment of the present invention provides a message processing method, where the message processing method is applied to a message processing apparatus, and the message processing apparatus includes: a first heterogeneous processing module and a second heterogeneous processing module, the method comprising:
receiving a request message sent by a client;
dividing the request message according to the response speed requirement so as to divide the request message into a first request message or a second request message, wherein the response speed requirement of the first request message is higher than that of the second request message;
processing the first request message by adopting a first heterogeneous processing module to obtain a first request message processing result, or processing the second request message by adopting a second heterogeneous processing module to obtain a second request message processing result;
and sending the corresponding message to a receiving object according to the processing result of the first request message or the processing result of the second request message.
In a possible implementation, the dividing the request message according to the response speed requirement to divide the request message into a first request message or a second request message includes:
analyzing the request message by adopting the first heterogeneous processing module to acquire the type of the request message;
determining a corresponding response speed requirement according to the type of the request message;
and dividing the request message into a first request message or a second request message according to the response speed requirement.
In a possible implementation manner, the first heterogeneous processing module is an FPGA processing module, and the second heterogeneous processing module is a software processing module;
the processing the first request message by using the first heterogeneous processing module to obtain a first request message processing result includes:
judging whether the first request message is legal or not by adopting an FPGA processing module;
if the first request message is determined to be legal, obtaining a first request message processing result that the first request message is legal;
if the first request message is determined to be illegal, obtaining a first request message processing result that the first request message is illegal;
or, the processing the second request message by using the second heterogeneous processing module to obtain a second request message processing result includes:
judging whether a receiving object corresponding to the second request message is a server side or not by adopting a software processing module;
if the receiving object corresponding to the second request message is determined not to be the server, obtaining a second request response message according to the second request message, and determining the second request response message as a second request message processing result;
if the receiving object corresponding to the second request message is determined to be the server, judging whether the second request message is legal or not; if the second request message is determined to be legal, obtaining a second request message processing result of the second request message which is legal; and if the second request message is determined to be illegal, obtaining a second request message processing result that the second request message is illegal.
In a possible implementation manner, the sending a corresponding message to a receiving object according to the first request message processing result or the second request message processing result includes:
if the processing result of the first request message or the processing result of the second request message is determined to be a legal processing result, determining that the corresponding message is a first legal message or a second legal message, and sending the first legal message or the second legal message to a server through the FPGA processing module;
if the first request message processing result or the second request message processing result is determined to be an illegal processing result, determining that the corresponding message is a refusal response message, and sending the refusal response message to the client through the FPGA processing module;
or if the processing result of the second request message is determined to be the second request response message, determining that the corresponding message is the second request response message, and sending the second request response message to the client through the FPGA processing module.
In a possible implementation manner, the message processing method further includes:
receiving a feedback message sent by a server;
dividing the feedback message according to a feedback speed requirement so as to divide the feedback message into a first feedback message or a second feedback message, wherein the feedback speed requirement of the first feedback message is higher than that of the second feedback message;
receiving the first feedback message by adopting a first heterogeneous processing module, or receiving a second feedback message by adopting a second heterogeneous processing module;
and sending the first feedback message or the second feedback message to a client.
In a possible implementation manner, the dividing the feedback message according to the feedback speed requirement to divide the feedback message into a first feedback message or a second feedback message includes:
analyzing the feedback message by adopting the first heterogeneous processing module to acquire the type of the feedback message;
determining a corresponding feedback speed requirement according to the type of the feedback message;
and dividing the feedback message into a first feedback message or a second feedback message according to the feedback speed requirement.
In a possible implementation, the sending the first feedback message or the second feedback message to a client includes:
and sending the first feedback message or the second feedback message to a client through a first heterogeneous processing module.
In a second aspect, an embodiment of the present invention provides a message processing apparatus, where the message processing apparatus includes: a first heterogeneous processing module and a second heterogeneous processing module, the apparatus further comprising:
the receiving module is used for receiving a request message sent by a client;
the device comprises a dividing module, a processing module and a processing module, wherein the dividing module is used for dividing a request message according to a response speed requirement so as to divide the request message into a first request message or a second request message, and the response speed requirement of the first request message is higher than that of the second request message;
the processing module is used for processing the first request message by adopting a first heterogeneous processing module to obtain a first request message processing result, or processing the second request message by adopting a second heterogeneous processing module to obtain a second request message processing result;
and the sending module is used for sending the corresponding message to a receiving object according to the first request message processing result or the second request message processing result.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory and at least one processor; the at least one processor comprises: the system comprises a first heterogeneous processing module and a second heterogeneous processing module;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the message processing method of any of the first aspects.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method according to any one of the first aspect is implemented.
The message processing method, the message processing device, the message processing apparatus, and the storage medium provided in the embodiments of the present invention divide a received request message into a first request message or a second request message according to a response speed requirement, respectively process the first request message and the second request message using different heterogeneous processing modules to obtain a first request message processing result or a second request message processing result, and send a corresponding message to a receiving object according to the first request message processing result or the second request message processing result, and divide the request message according to the response speed requirement and respectively process using different heterogeneous processing modules, so that a request message with a high response speed requirement can be prevented from being congested by a request message with a low response speed requirement, and a request message with a high response speed requirement can be processed in time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present invention;
fig. 2 is a schematic flowchart of a message processing method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another message processing method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart illustrating a process of sending a corresponding message to a receiving object according to a request message processing result in a message processing method according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a further message processing method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be 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 invention.
In the financial field of securities, futures and the like, the message processing efficiency on the whole link from the client to the transit terminal and then to the exchange server will seriously affect the processing efficiency of the business.
In the existing method, the processing of the request messages is generally performed based on the order of reception of the request messages. For the transit terminal, when it receives a plurality of request messages from the client, it will preferentially process the first received request message. Meanwhile, the relay terminal will process the received request message after the processing of the previously received request message is completed.
However, in actual services, because the response speed requirements of each request message are different, such a processing manner easily causes the request message with high response speed requirement to be congested by the request message with low response speed requirement, and further causes the request message with high response speed requirement to be delayed, so that the request message with high response speed requirement cannot be processed in time.
In order to solve the above problem, the inventors have found through research that after receiving a request message from a client at a relay terminal, the relay terminal can divide the request message according to a response speed requirement of the request message and process the request message in a manner corresponding to the response speed requirement, so that the request message with a high response speed requirement can be processed in time.
That is, by dividing the received request message into a first request message or a second request message, processing the first request message by using a first heterogeneous processing module, processing the second request message by using a second heterogeneous processing module, respectively obtaining a corresponding first request message processing result and a corresponding second request message processing result, and respectively sending the corresponding messages to a receiving object according to the request message processing results, the request messages with different response speed requirements can be respectively processed by using different heterogeneous processing modules, so that the request message with high response speed requirement is prevented from being congested by the request message with low response speed requirement, and the request message with high response speed requirement can be processed in time.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present invention. As shown in fig. 1, the message processing apparatus receives a related message sent by a client, analyzes and processes the related message to obtain a processing result, and sends a corresponding message to the client or a server according to the processing result.
Fig. 2 is a flowchart illustrating a message processing method according to an embodiment of the present invention. The execution subject of the method in the embodiment of the invention can be a message processing device. As shown in fig. 2, the method in this embodiment may include:
step 201, receiving a request message sent by a client.
In this embodiment, the first heterogeneous processing module is used to receive a request message sent by a client, where the request message may include a transaction request message, an inquiry request message, or other request messages, for example, the transaction request message may be a message requesting ordering, the inquiry request message may be a message requesting to inquire market data, and the other request messages may be messages requesting to modify a user password.
Step 202, dividing the request message according to the response speed requirement, so as to divide the request message into a first request message or a second request message.
In particular, the first request message has a higher response speed requirement than the second request message.
In this embodiment, the first request message includes a transaction request message, the second request message includes a query request message and other request messages, a high response speed requirement of the request message indicates that the request message needs to be processed and give a response in time, and a higher response speed requirement of the first request message than that of the second request message indicates that the response speed requirement of the transaction request message is higher than that of the query request message and other request messages.
Step 203, the first request message is processed by the first heterogeneous processing module to obtain a first request message processing result, or the second request message is processed by the second heterogeneous processing module to obtain a second request message processing result.
In this embodiment, the processing speed of the first heterogeneous processing module is higher than that of the second heterogeneous processing module, the first heterogeneous processing module is used to process the first request message with high response speed requirement, and the second heterogeneous processing module is used to process the second request message with lower response speed requirement than that of the first request message, so that the processing of the first request message and the processing of the second request message can be performed simultaneously.
The processing of the request message by the heterogeneous processing module may include processing for determining whether the request message is legal, and the like.
And step 204, sending the corresponding message to the receiving object according to the processing result of the first request message or the processing result of the second request message.
In this embodiment, the receiving object may be a client or a server, the message corresponding to the processing result of the request message may be the request message itself, or a response rejection message, or a request response message, and the corresponding message is determined to be sent to the client or the server according to the processing result of the first request message or the processing result of the second request message.
In the message processing method provided in this embodiment, the received request message is divided into the first request message or the second request message according to the response speed requirement, different heterogeneous processing modules are respectively used to process the first request message and the second request message to obtain a first request message processing result or a second request message processing result, and the corresponding message is sent to the receiving object according to the first request message processing result or the second request message processing result.
In order to process the received request message more accurately and timely, in the embodiment of the present invention, an FPGA (Field Programmable Gate Array) processing module is used as a first heterogeneous processing module, and a software processing module is used as a second heterogeneous processing module, so as to process the first request message or the second request message accurately and in detail.
Fig. 3 is a flowchart illustrating another message processing method according to an embodiment of the present invention. As shown in fig. 3, this embodiment is a detailed description that, on the basis of the technical solutions provided in the foregoing embodiments, an FPGA processing module is used as a first heterogeneous processing module to process a first request message, or a software processing module is used as a second heterogeneous processing module to process a second request message. The method in this embodiment may include:
step 301, receiving a request message sent by a client.
For a specific implementation process and principle of step 301 in this embodiment, reference may be made to the foregoing embodiments, and details are not described herein.
And step 302, analyzing the request message by adopting an FPGA processing module to acquire the type of the request message.
In this embodiment, the type of the request message may include a transaction request message, an inquiry request message, other request messages, and the like, where different types of request messages correspond to different message numbers, for example, the message number of the transaction request message may be 1 to 100, the message number of the inquiry request message may be 101 to 200, and the message numbers of other request messages may be 201 to 300, and the FPGA processing module may obtain the type of the request message according to the message number of the request message, for example, when the FPGA processing module analyzes the request message, and obtains that the message number corresponding to the request message is 50, it may be determined that the type of the request message is the transaction request message.
And step 303, determining a corresponding response speed requirement according to the type of the request message.
In this embodiment, the different types of the request messages correspond to different response speed requirements, for example, the response speed requirement corresponding to the transaction request message is high, the response speed requirement corresponding to the query request message is low, and the response speed requirements corresponding to other request messages are low.
Step 304, dividing the request message into a first request message or a second request message according to the response speed requirement.
In this embodiment, the request message with high response speed requirement is divided into the first request message, and the request message with low response speed requirement is divided into the second request message, that is, the transaction request message is the first request message, and the query request message and other request messages are the second request messages.
And 305, judging whether the first request message is legal or not by adopting the FPGA processing module.
Step 306, if it is determined that the first request message is legal, a first request message processing result that the first request message is legal is obtained.
Step 307, if it is determined that the first request message is illegal, obtaining a processing result of the first request message that the first request message is illegal.
Step 305 and step 307 define a process of processing the first request message by using the FPGA processing module to obtain a processing result of the first request message.
In this embodiment, determining whether the first request message is legal, that is, determining whether the transaction request message is legal may include determining whether funds of the corresponding user account are sufficient, whether the corresponding transaction object allows a transaction, and whether the number of transactions of the corresponding user account in unit time is not exceeded, and the like.
And step 308, judging whether the receiving object corresponding to the second request message is a server side by using a software processing module.
Step 309, if it is determined that the receiving object corresponding to the second request message is not the server, obtaining a second request response message according to the second request message, and determining the second request response message as a second request message processing result.
Step 310, if it is determined that the receiving object corresponding to the second request message is the server, determining whether the second request message is legal; if the second request message is determined to be legal, a second request message processing result of the second request message which is legal is obtained; and if the second request message is determined to be illegal, obtaining a second request message processing result that the second request message is illegal.
Step 308-310 define the process of processing the second request message by using the software processing module to obtain the processing result of the second request message.
In this embodiment, it may be determined whether a receiving object corresponding to the second request message is a server according to the message number of the second request message, where if it is determined that the second request message is the query request message according to the message number, the corresponding receiving object is a client, and if the second request message is another request message, the corresponding receiving object is the server, for example, if the message number of the second request message is 250, the second request message is another request message, and the corresponding receiving object is the server.
Specifically, if it is determined that the receiving object corresponding to the second request message is not the server, the second request message is an inquiry request message, and a second request response message is obtained according to the inquiry request message, for example, if the inquiry request message is a message requesting to inquire market data, the corresponding second request response message is a market data message.
Further, if it is determined that the receiving object corresponding to the second request message is the server, the second request message is another request message, and whether the second request message is legal is determined, that is, whether the another request message is legal is determined.
It is understood that the order of the above steps can be adjusted by those skilled in the art according to actual needs, for example, the steps 308 and 310 can be performed before the steps 305 and 307, or performed simultaneously.
And 311, sending the corresponding message to the receiving object according to the processing result of the first request message or the processing result of the second request message.
Finally, the message processing apparatus further sends the corresponding message to the receiving object according to the processing result of the first request message or the processing result of the second request message, and for the specific implementation process and principle, reference may be made to the foregoing embodiment, which is not described herein again.
The message processing method provided by this embodiment determines the type of the request message and the corresponding response speed requirement by analyzing the received request message, further divides the request message into a first request message or a second request message, and uses the FPGA processing module to determine whether the first request message is legal or not, to obtain the processing result of the first request message, or uses the software processing module to determine whether the receiving object of the second request message is a server or whether the receiving object is legal or not, to obtain the processing result of the second request message, and further sends different corresponding messages to different receiving objects according to different request processing results, and can use different heterogeneous processing modules to perform different processing on the request messages with different response speed requirements, and send the messages corresponding to the request processing results to different receiving objects, the congestion of the request message with high response speed requirement by the request message with low response speed requirement is avoided, and the request message with high response speed requirement can be processed in time.
Fig. 4 is a schematic flowchart illustrating a process of sending a corresponding message to a receiving object according to a request message processing result in a message processing method according to an embodiment of the present invention. Based on the technical solutions provided in the foregoing embodiments, the present embodiment can implement sending the corresponding message to the receiving object according to the legal processing result, the illegal processing result, and the second request response message. As shown in fig. 4, in this embodiment, sending a corresponding message to a receiving object according to a processing result of a first request message or a processing result of a second request message may include:
step 401, if it is determined that the processing result of the first request message or the processing result of the second request message is a legal processing result, determining that the corresponding message is the first legal message or the second legal message, and sending the first legal message or the second legal message to the server through the FPGA processing module.
In this embodiment, the first legal message is a first request message, and the second legal message is a second request message.
Illustratively, if the first request message is a message requesting ordering, and it is determined that funds of the corresponding user account are sufficient, the corresponding transaction object allows transaction, and the number of times of transaction of the corresponding user account in unit time is not exceeded, it is determined that a processing result of the first request message is a legal processing result, and further it is determined that the corresponding message is a message requesting ordering, and the message requesting ordering is sent to the server.
Step 402, if the first request message processing result or the second request message processing result is determined to be an illegal processing result, determining that the corresponding message is a response rejection message, and sending the response rejection message to the client through the FPGA processing module.
Illustratively, if the first request message is a message requesting ordering and the fund of the corresponding user account is judged to be insufficient, the processing result of the first request message is determined to be an illegal processing result, and then the corresponding message is determined to be a response refusing message and the response refusing message is sent to the client.
Step 403, if it is determined that the second request message processing result is the second request response message, determining that the corresponding message is the second request response message, and sending the second request response message to the client through the FPGA processing module.
For example, if the second request message is a message requesting to query the market data, the second request response message is a market data message, and the market data message is sent to the client.
In the message processing method provided by this embodiment, when the processing result of the request message is a legal processing result, the request message is sent to the server as a corresponding message, when the processing result of the request message is an illegal processing result, the response rejection message is sent to the client, and when the processing result of the request message is a second request response message, the second request response message is sent to the client.
In addition, the first heterogeneous processing module, namely the FPGA processing module, is used for processing request messages with low changeability, such as transaction request messages, and the second heterogeneous processing module, namely the software processing module, is used for processing request messages with high changeability, such as query request messages, so that the software processing module is used for processing the request messages with high changeability, high development cost and long development period of the FPGA processing module when the FPGA processing module is used for processing the request messages with high changeability can be avoided, and further development cost and development period of the message processing device are reduced.
Furthermore, when the number of the second request messages is large, part of the second request messages can be sent to the software processing modules of other servers through the FPGA module, so that the software processing modules of a plurality of servers can simultaneously process the plurality of second request messages in parallel and process the second request messages in time.
Fig. 5 is a flowchart illustrating another message processing method according to an embodiment of the present invention. As shown in fig. 5, the method in this embodiment may include:
and step 501, receiving a feedback message sent by a server.
In this embodiment, the first heterogeneous processing module is used to receive a feedback message sent by the server, where the feedback message may include a feedback message for the first request message or the second request message, and other feedback messages, and the other feedback messages may be messages of a market state change, such as a temporary shutdown message.
Step 502, dividing the feedback message according to the feedback speed requirement, so as to divide the feedback message into a first feedback message or a second feedback message.
Optionally, the step of dividing the feedback message according to the feedback speed requirement to divide the feedback message into a first feedback message or a second feedback message is performed, and specifically may include: analyzing the feedback message by adopting a first heterogeneous processing module to acquire the type of the feedback message; determining a corresponding feedback speed requirement according to the type of the feedback message; and dividing the feedback message into a first feedback message or a second feedback message according to the feedback speed requirement.
In this embodiment, different feedback messages correspond to different message numbers, for example, the message number of the feedback message for the first request message may be 501 to 600, the message number of the feedback message for the second request message may be 601 to 700, the message numbers corresponding to other feedback messages may be 701 to 800, and the first heterogeneous processing module may obtain the type of the feedback message according to the message number of the feedback message.
Specifically, the different types of the feedback messages correspond to different feedback speed requirements, for example, the feedback speed requirement corresponding to the feedback message of the first request message is high, the feedback speed requirement corresponding to the feedback message of the second request message is low, and the feedback speed requirements corresponding to other feedback messages are low.
Further, the feedback message with high feedback speed requirement is divided into a first feedback message, and the feedback message with low feedback speed requirement is divided into a second feedback message, that is, the feedback message for the first request message is the first feedback message, and the feedback message for the second request message and other feedback messages are the second feedback messages.
Step 503, receiving the first feedback message by using the first heterogeneous processing module, or receiving the second feedback message by using the second heterogeneous processing module.
Specifically, the FPGA processing module is used to receive the first feedback message, or the software processing module is used to receive the second feedback message.
And step 504, sending the first feedback message or the second feedback message to the client.
Optionally, the step of sending the first feedback message or the second feedback message to the client is executed, which may specifically include: and sending the first feedback message or the second feedback message to the client through the first heterogeneous processing module.
In the message processing method provided by this embodiment, the type of the feedback message and the corresponding feedback speed requirement are determined by analyzing the received feedback message, and then the feedback message is divided into a first feedback message or a second feedback message, and the first feedback message is received by using the FPGA processing module, or the second feedback message is received by using the software processing module, and finally the first feedback message or the second feedback message is sent to the client.
Fig. 6 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention. As shown in fig. 6, the message processing apparatus provided in this embodiment may include: a receiving module 61, a dividing module 62, a processing module 63 and a transmitting module 64.
A receiving module 61, configured to receive a request message sent by a client;
a dividing module 62, configured to divide the request message according to the response speed requirement, so as to divide the request message into a first request message or a second request message, where the response speed requirement of the first request message is higher than that of the second request message;
a processing module 63, configured to process the first request message by using a first heterogeneous processing module to obtain a first request message processing result, or process the second request message by using a second heterogeneous processing module to obtain a second request message processing result;
and a sending module 64, configured to send a corresponding message to a receiving object according to the processing result of the first request message or the processing result of the second request message.
In an optional implementation manner, the dividing module 62 is specifically configured to:
analyzing the request message by adopting the first heterogeneous processing module to acquire the type of the request message;
determining a corresponding response speed requirement according to the type of the request message;
and dividing the request message into a first request message or a second request message according to the response speed requirement.
In an alternative implementation manner, the processing module 63 is specifically configured to:
judging whether the first request message is legal or not by adopting an FPGA processing module;
if the first request message is determined to be legal, obtaining a first request message processing result that the first request message is legal;
if the first request message is determined to be illegal, obtaining a first request message processing result that the first request message is illegal;
or, the processing the second request message by using the second heterogeneous processing module to obtain a second request message processing result includes:
judging whether a receiving object corresponding to the second request message is a server side by adopting a software processing module;
if the receiving object corresponding to the second request message is determined not to be the server side, obtaining a second request response message according to the second request message, and determining the second request response message as a second request message processing result;
if the receiving object corresponding to the second request message is determined to be the server, judging whether the second request message is legal or not; if the second request message is determined to be legal, obtaining a second request message processing result of the second request message which is legal; and if the second request message is determined to be illegal, obtaining a second request message processing result that the second request message is illegal.
In an optional implementation manner, the sending module 64 is specifically configured to:
if the processing result of the first request message or the processing result of the second request message is determined to be a legal processing result, determining that the corresponding message is a first legal message or a second legal message, and sending the first legal message or the second legal message to a server through the FPGA processing module;
if the first request message processing result or the second request message processing result is determined to be an illegal processing result, determining that the corresponding message is a response refusing message, and sending the response refusing message to the client through the FPGA processing module;
or if the processing result of the second request message is determined to be the second request response message, determining that the corresponding message is the second request response message, and sending the second request response message to the client through the FPGA processing module.
In an optional implementation manner, the receiving module 61 is further specifically configured to:
receiving a feedback message sent by a server;
dividing the feedback message according to a feedback speed requirement so as to divide the feedback message into a first feedback message or a second feedback message, wherein the feedback speed requirement of the first feedback message is higher than that of the second feedback message;
receiving the first feedback message by adopting a first heterogeneous processing module, or receiving a second feedback message by adopting a second heterogeneous processing module;
and sending the first feedback message or the second feedback message to a client.
In an optional implementation manner, when the receiving module 61 divides the feedback message according to a feedback speed requirement to divide the feedback message into a first feedback message or a second feedback message, the receiving module is specifically configured to:
analyzing the feedback message by adopting the first heterogeneous processing module to acquire the type of the feedback message;
determining a corresponding feedback speed requirement according to the type of the feedback message;
and dividing the feedback message into a first feedback message or a second feedback message according to the feedback speed requirement.
In an optional implementation manner, when sending the first feedback message or the second feedback message to the client, the receiving module 61 is specifically configured to:
and sending the first feedback message or the second feedback message to a client through a first heterogeneous processing module.
The message processing apparatus provided in this embodiment may execute the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and are not described herein again.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 7, the electronic device provided in this embodiment may include: a memory 71 and at least one processor 72;
the memory 71 stores computer-executable instructions;
the at least one processor 72 executes computer-executable instructions stored in the memory 71, so that the at least one processor 72 executes the message processing method according to any of the above embodiments.
Wherein the memory 71 and the processor 72 may be connected by a bus 73.
For specific implementation principles and effects of the electronic device provided in this embodiment, reference may be made to relevant descriptions and effects corresponding to the embodiments shown in fig. 1 to fig. 5, which are not described herein in detail.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer executing instruction is stored in the computer-readable storage medium, and when a processor executes the computer executing instruction, the method according to any of the above embodiments is implemented.
The computer readable storage medium may be, among others, ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
An embodiment of the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the method according to any of the above embodiments.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a logical division, and other divisions may be realized in practice, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute some steps of the methods described in the embodiments of the present application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read messages from, and write messages to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (9)

1. A message processing method is applied to a message processing device, and the message processing device comprises: a first heterogeneous processing module and a second heterogeneous processing module, the method comprising:
receiving a request message sent by a client;
dividing the request message according to the response speed requirement so as to divide the request message into a first request message or a second request message, wherein the response speed requirement of the first request message is higher than that of the second request message;
processing the first request message by adopting a first heterogeneous processing module to obtain a first request message processing result, or processing the second request message by adopting a second heterogeneous processing module to obtain a second request message processing result;
according to the first request message processing result or the second request message processing result, sending a corresponding message to a receiving object;
the first heterogeneous processing module is an FPGA processing module, and the second heterogeneous processing module is a software processing module;
the processing the first request message by using the first heterogeneous processing module to obtain a first request message processing result includes:
judging whether the first request message is legal or not by adopting an FPGA processing module;
if the first request message is determined to be legal, obtaining a first request message processing result that the first request message is legal;
if the first request message is determined to be illegal, obtaining a first request message processing result that the first request message is illegal;
or, the processing the second request message by using the second heterogeneous processing module to obtain a second request message processing result includes:
judging whether a receiving object corresponding to the second request message is a server side by adopting a software processing module;
if the receiving object corresponding to the second request message is determined not to be the server side, obtaining a second request response message according to the second request message, and determining the second request response message as a second request message processing result;
if the receiving object corresponding to the second request message is determined to be the server, judging whether the second request message is legal or not; if the second request message is determined to be legal, obtaining a second request message processing result of the second request message which is legal; and if the second request message is determined to be illegal, obtaining a second request message processing result that the second request message is illegal.
2. The method of claim 1, wherein the dividing the request message according to response speed requirements to divide the request message into a first request message or a second request message comprises:
analyzing the request message by adopting the first heterogeneous processing module to acquire the type of the request message;
determining a corresponding response speed requirement according to the type of the request message;
and dividing the request message into a first request message or a second request message according to the response speed requirement.
3. The method according to claim 1, wherein the sending a corresponding message to a receiving object according to the first request message processing result or the second request message processing result comprises:
if the processing result of the first request message or the processing result of the second request message is determined to be a legal processing result, determining that the corresponding message is a first legal message or a second legal message, and sending the first legal message or the second legal message to a server through the FPGA processing module;
if the first request message processing result or the second request message processing result is determined to be an illegal processing result, determining that the corresponding message is a response refusing message, and sending the response refusing message to the client through the FPGA processing module;
or if the processing result of the second request message is determined to be the second request response message, determining that the corresponding message is the second request response message, and sending the second request response message to the client through the FPGA processing module.
4. The method according to any one of claims 1-3, further comprising:
receiving a feedback message sent by a server;
dividing the feedback message according to a feedback speed requirement so as to divide the feedback message into a first feedback message or a second feedback message, wherein the feedback speed requirement of the first feedback message is higher than that of the second feedback message;
receiving the first feedback message by adopting a first heterogeneous processing module, or receiving a second feedback message by adopting a second heterogeneous processing module;
and sending the first feedback message or the second feedback message to a client.
5. The method of claim 4, wherein the dividing the feedback message according to feedback speed requirements to divide the feedback message into a first feedback message or a second feedback message comprises:
analyzing the feedback message by adopting the first heterogeneous processing module to acquire the type of the feedback message;
determining a corresponding feedback speed requirement according to the type of the feedback message;
and dividing the feedback message into a first feedback message or a second feedback message according to the feedback speed requirement.
6. The method of claim 4, wherein sending the first feedback message or the second feedback message to a client comprises:
and sending the first feedback message or the second feedback message to a client through a first heterogeneous processing module.
7. A message processing apparatus, characterized in that the message processing apparatus comprises: a first heterogeneous processing module and a second heterogeneous processing module, the apparatus further comprising:
the receiving module is used for receiving a request message sent by a client;
the device comprises a dividing module, a processing module and a processing module, wherein the dividing module is used for dividing a request message according to a response speed requirement so as to divide the request message into a first request message or a second request message, and the response speed requirement of the first request message is higher than that of the second request message;
the processing module is used for processing the first request message by adopting a first heterogeneous processing module to obtain a first request message processing result, or processing the second request message by adopting a second heterogeneous processing module to obtain a second request message processing result;
a sending module, configured to send a corresponding message to a receiving object according to the first request message processing result or the second request message processing result;
the first heterogeneous processing module is an FPGA processing module, and the second heterogeneous processing module is a software processing module;
the processing module is specifically configured to determine whether the first request message is legal by using the FPGA processing module;
if the first request message is determined to be legal, obtaining a first request message processing result of the first request message;
if the first request message is determined to be illegal, obtaining a first request message processing result that the first request message is illegal;
alternatively, the first and second electrodes may be,
judging whether a receiving object corresponding to the second request message is a server side by adopting a software processing module;
if the receiving object corresponding to the second request message is determined not to be the server side, obtaining a second request response message according to the second request message, and determining the second request response message as a second request message processing result;
if the receiving object corresponding to the second request message is determined to be the server, judging whether the second request message is legal or not; if the second request message is determined to be legal, obtaining a second request message processing result of the second request message which is legal; and if the second request message is determined to be illegal, obtaining a second request message processing result that the second request message is illegal.
8. An electronic device, comprising: a memory and at least one processor; the at least one processor comprises: the system comprises a first heterogeneous processing module and a second heterogeneous processing module;
the memory stores computer execution instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the message processing method of any of claims 1-6.
9. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1-6.
CN202110444457.1A 2021-04-23 2021-04-23 Message processing method, device, equipment and storage medium Active CN113079110B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110444457.1A CN113079110B (en) 2021-04-23 2021-04-23 Message processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110444457.1A CN113079110B (en) 2021-04-23 2021-04-23 Message processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113079110A CN113079110A (en) 2021-07-06
CN113079110B true CN113079110B (en) 2022-08-30

Family

ID=76618469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110444457.1A Active CN113079110B (en) 2021-04-23 2021-04-23 Message processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113079110B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101360025A (en) * 2007-07-31 2009-02-04 华为技术有限公司 Uplink system resource allocation method, system and apparatus
CN104065568A (en) * 2014-07-07 2014-09-24 电子科技大学 Web server cluster routing method
CN105553870A (en) * 2015-12-11 2016-05-04 小米科技有限责任公司 Method and device for allocating service request
CN111309466A (en) * 2020-02-22 2020-06-19 苏州浪潮智能科技有限公司 Multithreading scheduling method, system, equipment and medium based on cloud platform
CN112019870A (en) * 2020-08-27 2020-12-01 北京一起教育信息咨询有限责任公司 Message classification processing method and device and electronic equipment
CN112121413A (en) * 2020-09-30 2020-12-25 腾讯科技(深圳)有限公司 Response method, system, device, terminal and medium of function service

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196379B (en) * 2010-03-09 2014-02-19 华为技术有限公司 Information inquiry method, system and equipment
CN103237300B (en) * 2013-04-28 2015-09-09 小米科技有限责任公司 A kind of method of file download, Apparatus and system
GB2530533A (en) * 2014-09-25 2016-03-30 Ibm A method of processing a message received by a message server, and a message server
US10715448B2 (en) * 2018-05-25 2020-07-14 Software Ag System and/or method for predictive resource management in file transfer servers

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101360025A (en) * 2007-07-31 2009-02-04 华为技术有限公司 Uplink system resource allocation method, system and apparatus
CN104065568A (en) * 2014-07-07 2014-09-24 电子科技大学 Web server cluster routing method
CN105553870A (en) * 2015-12-11 2016-05-04 小米科技有限责任公司 Method and device for allocating service request
CN111309466A (en) * 2020-02-22 2020-06-19 苏州浪潮智能科技有限公司 Multithreading scheduling method, system, equipment and medium based on cloud platform
CN112019870A (en) * 2020-08-27 2020-12-01 北京一起教育信息咨询有限责任公司 Message classification processing method and device and electronic equipment
CN112121413A (en) * 2020-09-30 2020-12-25 腾讯科技(深圳)有限公司 Response method, system, device, terminal and medium of function service

Also Published As

Publication number Publication date
CN113079110A (en) 2021-07-06

Similar Documents

Publication Publication Date Title
WO2020259003A1 (en) Link tracking method and apparatus
CN107920094B (en) Data acquisition method and device, server and network equipment
JP2012533824A (en) Systems and methods for real-time batch account processing
WO2020000720A1 (en) Server, packet processing method, program, and computer-readable storage medium
CN107038645B (en) Service processing method, device and system and server
TWI771616B (en) Payment anti-shake method and device
CN112000675A (en) Market data updating method and device, terminal equipment and storage medium
CN113034274A (en) Supply chain financial service system and method based on block chain and terminal equipment
WO2019174185A1 (en) Electronic device, dynamic code request processing method and storage medium
CN114257551A (en) Distributed current limiting method and system and storage medium
CN113079110B (en) Message processing method, device, equipment and storage medium
CN110278241B (en) Registration request processing method and device
CN111092814B (en) Service handling request message distribution method and equipment
CN110889073A (en) Page request response method, server and computer storage medium
CN111177099A (en) Data processing method and device of business system, electronic equipment and storage medium
CN111767481A (en) Access processing method, device, equipment and storage medium
US11520802B2 (en) Systems and methods for data format conversion
US20210383469A1 (en) Currency trading method based on blockchain and electronic device
CN113132400B (en) Business processing method, device, computer system and storage medium
CN115421922A (en) Current limiting method, device, equipment, medium and product of distributed system
CN112988812A (en) Inventory data processing method, device, equipment and storage medium
CN110610365A (en) Method and device for identifying transaction request
CN111144977A (en) Stock order processing method and device
US20230051532A1 (en) Pipelined credit checking
CN111639085B (en) Data asynchronous checking method and device

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
GR01 Patent grant
GR01 Patent grant