CN113535428A - Method, device, equipment and medium for processing request message and response message - Google Patents

Method, device, equipment and medium for processing request message and response message Download PDF

Info

Publication number
CN113535428A
CN113535428A CN202110779813.5A CN202110779813A CN113535428A CN 113535428 A CN113535428 A CN 113535428A CN 202110779813 A CN202110779813 A CN 202110779813A CN 113535428 A CN113535428 A CN 113535428A
Authority
CN
China
Prior art keywords
message
queue
request
message queue
head
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.)
Granted
Application number
CN202110779813.5A
Other languages
Chinese (zh)
Other versions
CN113535428B (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.)
Zhongxing Micro Technology Co ltd
Vimicro Corp
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CN202110779813.5A priority Critical patent/CN113535428B/en
Publication of CN113535428A publication Critical patent/CN113535428A/en
Application granted granted Critical
Publication of CN113535428B publication Critical patent/CN113535428B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/548Queue

Abstract

The embodiment of the disclosure discloses a method, a device, equipment and a medium for processing a request message and a response message. One embodiment of the method comprises: receiving a request message set; storing the request message set into a message queue; determining whether the message queue and a flag bit corresponding to the request message in the head of the message queue meet a preset condition, and executing the following message removing steps in response to the message queue and the flag bit meeting the preset condition: generating a message queue after the message is removed based on the message queue; determining whether the number of the request messages in the message queue after the messages are removed reaches a preset threshold value; and when the preset threshold value is not reached, determining the new message queue and the request message in the new queue head, determining whether the flag bits corresponding to the request message in the newly determined message queue and the new queue head meet the preset condition, and executing the message removing step again. The embodiment improves the processing efficiency of the request message and the response message.

Description

Method, device, equipment and medium for processing request message and response message
Technical Field
Embodiments of the present disclosure relate to the field of data processing technologies, and in particular, to a method and an apparatus for processing a request message and a response message, an electronic device, and a computer-readable medium.
Background
The processing technology of the request message and the response message is an important technology in data processing. In the processing of the request message and the response message, generally, one module receives the request message, forwards the request message to the other module after processing, and waits for the response message after forwarding.
However, there are often technical problems when the above-described method is adopted:
in the process of the request message and the response message, because the network has time delay, the problem of smooth and disordered message sending and receiving is easy to occur, so that the request message cannot be responded, and further, the processing efficiency of the request message and the response message is reduced.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose a method, an apparatus, an electronic device, and a computer-readable medium for processing a request message and a response message to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a method for processing a request message and a response message, where the method includes: receiving a request message set sent by a sender module; sequentially storing each request message in the request message set into a message queue; determining whether flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet preset conditions, and executing the following message elimination steps in response to the fact that the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet the preset conditions: generating a message queue with the removed messages based on the message queue; determining whether the number of the request messages in the message queue after the message is removed reaches a preset threshold value; and determining the request messages in the message queue after the message is removed and the queue head of the message queue after the message is removed as the request messages in the new message queue and the new queue head of the message queue, determining whether the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition, and executing the message removing step again in response to the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition.
In a second aspect, some embodiments of the present disclosure provide an apparatus for processing a request message and a response message, the apparatus comprising: a receiving unit configured to receive a request message set sent by a sender module; the storage unit is configured to store each request message in the request message set into a message queue in sequence; a determining and message removing unit configured to determine whether flag bits corresponding to the request messages in the message queue and the head of the message queue satisfy a preset condition, and execute the following message removing steps in response to the flag bits corresponding to the request messages in the message queue and the head of the message queue satisfying the preset condition: generating a message queue with the removed messages based on the message queue; determining whether the number of the request messages in the message queue after the message is removed reaches a preset threshold value; and determining the request messages in the message queue after the message is removed and the queue head of the message queue after the message is removed as the request messages in the new message queue and the new queue head of the message queue, determining whether the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition, and executing the message removing step again in response to the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following advantages: the processing method of the request message and the response message of some embodiments of the disclosure processes the request message and the response message, and improves the processing efficiency of the request message and the response message. Specifically, the reason why the processing efficiency of the request message and the response message is low is that: in the processing of the request message and the response message, the network has time delay, so that the problem of smooth and disordered message transmission and reception is easy to occur, and the request message cannot be responded. Based on this, in the processing method of the request message and the response message of some embodiments of the present disclosure, first, a request message set sent by a sender module may be received, and each request message in the request message set may be sequentially stored in a message queue. Therefore, a data basis is provided for subsequently determining whether the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet the preset condition. Then, it may be determined whether flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet a preset condition, and in response to that the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet the preset condition, the following message elimination steps are performed: generating a message queue with the removed messages based on the message queue; determining whether the number of the request messages in the message queue after the message is removed reaches a preset threshold value; and determining the request messages in the message queue after the message is removed and the queue head of the message queue after the message is removed as the request messages in the new message queue and the new queue head of the message queue, determining whether the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition, and executing the message removing step again in response to the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition. And eliminating the responded request messages in the message queue in sequence, so that each request message can be responded, and the processing efficiency of the request messages and the response messages is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of one application scenario of a method of processing request and response messages in accordance with some embodiments of the present disclosure;
FIG. 2 is a flow diagram of some embodiments of a method of processing request and response messages according to the present disclosure;
FIG. 3 is a block diagram of some embodiments of a processing device for request and response messages according to the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to a processing method of a request message and a response message of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram 100 of one application scenario of a method of processing request and response messages according to some embodiments of the present disclosure.
In the application scenario of fig. 1, first, the computing device 101 may receive a set of request messages 102 sent by a sender module. Computing device 101 may then save each request message in the set of request messages 102 described above in turn to message queue 103. Then, the computing device 101 may determine whether the flag bits corresponding to the request messages in the message queue 103 and the head of the message queue 103 satisfy a preset condition, and in response to that the flag bits corresponding to the request messages in the message queue 103 and the head of the message queue satisfy the preset condition, execute the following message elimination step 104: generating a message queue 105 after the message is removed based on the message queue 103; determining whether the number of the request messages in the message queue 105 after the message is removed reaches a predetermined threshold; in response to the number of the request messages in the message queue 105 after the message removal not reaching the predetermined threshold, determining the request messages in the queue heads of the message queue 105 after the message removal and the message queue 105 after the message removal as the request messages 107 in the new message queue 106 and the new message queue, determining whether the flag bits corresponding to the request messages in the queue heads of the re-determined message queue 106 and the message queue meet the preset condition, and in response to the flag bits corresponding to the request messages 106 in the queue heads of the re-determined message queue 106 and the message queue meeting the preset condition, executing the message removal step 105 again.
The computing device 101 may be hardware or software. When the computing device is hardware, it may be implemented as a distributed cluster composed of multiple servers or terminal devices, or may be implemented as a single server or a single terminal device. When the computing device is embodied as software, it may be installed in the hardware devices enumerated above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of computing devices in FIG. 1 is merely illustrative. There may be any number of computing devices, as implementation needs dictate.
With continued reference to fig. 2, a flow 200 of some embodiments of a method of processing request and response messages in accordance with the present disclosure is shown. The processing method of the request message and the response message comprises the following steps:
step 201, receiving a request message set sent by a sender module.
In some embodiments, an execution subject of the processing method of the request message and the response message (for example, the computing device 101 shown in fig. 1) may receive the request message set sent by the sender module through a wired connection manner or a wireless connection manner. The sender module may be a computer, a chip, or the like having information sending and information receiving functions. The request message may be a message including a request line, a request header, a null line, and request data. The request message in the request message set may include at least one of: 6CE8 registration request message, connection request message, heartbeat request message, and setup request message.
Step 202, storing each request message in the request message set in a message queue in sequence.
In some embodiments, the execution agent may store each request message in the request message set in a message queue in sequence.
As an example, the set of request messages may be { registration request message, connection request message, heartbeat request message, setup request message }. The above message queue may be { (registration request message), (connection request message), (heartbeat request message), (setup request message) }. And sequencing the request messages in the request message set according to the sequence of the request time. And sequencing the request messages in the message queue according to the sequence of the request time.
Step 203, determining whether the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet a preset condition, and executing the following message elimination steps in response to that the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet the preset condition:
step 2031, based on the message queue, generating a message queue with the removed message. The preset condition may be that a flag bit corresponding to the request message in the head of the message queue is true. The flag bit really represents that the request message in the head of the message queue is responded.
As an example, the message queue after the message culling may be { (), (connection request message), (heartbeat request message), (set request message) }.
In some optional implementations of some embodiments, the message queue after the message culling may be generated based on the message queue by:
and removing the request message in the head of the message queue from the message queue to obtain the message queue with the removed message.
As an example, the registration request message in the head of the message queue is culled. The message queue after the message culling may be { (), (connection request message), (heartbeat request message), (setup request message) }.
Step 2032, determining whether the number of request messages in the message queue after the message is removed reaches a predetermined threshold. Wherein the predetermined threshold may be 0.
As an example, the message queue after the message culling may be { (), (connection request message), (heartbeat request message), (set request message) }, and then the number of request messages in the message queue after the message culling is 3.
Step 2033, in response to the number of the request messages in the message queue after the message removal not reaching the predetermined threshold, determining the request messages in the message queue after the message removal and the queue head of the message queue after the message removal as the request messages in the new message queue and the queue head of the new message queue, determining whether the flag bits corresponding to the request messages in the queue head of the re-determined message queue and the message queue meet the preset condition, and in response to the flag bits corresponding to the request messages in the queue head of the re-determined message queue and the message queue meeting the preset condition, executing the message removal step again.
As an example, the new message queue may be { (connection request message), (heartbeat request message), (set request message), () }. The request message in the head of line of the new message queue may be a connection request message.
In some optional implementation manners of some embodiments, the determining whether flag bits corresponding to the request messages in the message queue and the head of the message queue satisfy a preset condition may include:
first, it is determined whether a set of request messages is stored in a message queue.
As an example, the execution body may determine whether there is a request message in the message queue.
And secondly, determining whether the flag bit corresponding to the request message in the head of the message queue is true. And the flag bit represents that the request message in the head of the message queue is responded.
Optionally, determining whether a flag bit corresponding to the request message in the head of the message queue meets a preset condition; and determining whether the request message is responded or not in response to that the flag bit corresponding to the request message in the head of the message queue meets the preset condition. The preset condition is that a flag bit corresponding to the request message in the head of the message queue is true.
Optionally, a response is obtained in response to the request message, and a response message sent by the receiver module is received; and sending the response message to the sender module. The response message may be a message including a status line, a message header, and a message body.
Optionally, in response to not receiving the response message sent by the receiver module, an error message is generated; and sending the error message to the sender module so that the sender module can display the error message. The receiver module may be a computer, a chip, or the like having information sending and receiving functions.
The above embodiments of the present disclosure have the following advantages: the processing method of the request message and the response message of some embodiments of the disclosure processes the request message and the response message, and improves the processing efficiency of the request message and the response message. Specifically, the reason why the processing efficiency of the request message and the response message is low is that: in the processing of the request message and the response message, the network has time delay, so that the problem of smooth and disordered message transmission and reception is easy to occur, and the request message cannot be responded. Based on this, in the processing method of the request message and the response message of some embodiments of the present disclosure, first, a request message set sent by a sender module may be received, and each request message in the request message set may be sequentially stored in a message queue. Therefore, a data basis is provided for subsequently determining whether the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet the preset condition. Then, it may be determined whether flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet a preset condition, and in response to that the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet the preset condition, the following message elimination steps are performed: generating a message queue with the removed messages based on the message queue; determining whether the number of the request messages in the message queue after the message is removed reaches a preset threshold value; and determining the request messages in the message queue after the message is removed and the queue head of the message queue after the message is removed as the request messages in the new message queue and the new queue head of the message queue, determining whether the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition, and executing the message removing step again in response to the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition. And eliminating the responded request messages in the message queue in sequence, so that each request message can be responded, and the processing efficiency of the request messages and the response messages is improved.
With further reference to fig. 3, as an implementation of the above-described method for the above-described figures, the present disclosure provides some embodiments of a device for processing a request message and a response message, which correspond to those of the method embodiments described above for fig. 2, and which may be applied in various electronic devices in particular.
As shown in fig. 3, the processing device 300 for request messages and response messages of some embodiments includes: a receiving unit 301, a saving unit 302 and a determining and message rejecting unit 303. Wherein, the receiving unit 301 is configured to receive a request message set sent by a sender module; a saving unit 302 configured to save each request message in the request message set into a message queue in sequence; a determining and message removing unit 303, configured to determine whether flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet a preset condition, and in response to the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meeting the preset condition, perform the following message removing steps: generating a message queue with the removed messages based on the message queue; determining whether the number of the request messages in the message queue after the message is removed reaches a preset threshold value; and determining the request messages in the message queue after the message is removed and the queue head of the message queue after the message is removed as the request messages in the new message queue and the new queue head of the message queue, determining whether the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition, and executing the message removing step again in response to the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition.
It will be understood that the units described in the apparatus 300 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 300 and the units included therein, and are not described herein again.
Referring now to FIG. 4, a block diagram of an electronic device (e.g., computing device 101 of FIG. 1)400 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM403 are connected to each other via a bus 404. An input/output (I/O) interface 404 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 404: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 4 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 409, or from the storage device 408, or from the ROM 402. The computer program, when executed by the processing apparatus 401, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the apparatus; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a request message set sent by a sender module; sequentially storing each request message in the request message set into a message queue; determining whether flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet preset conditions, and executing the following message elimination steps in response to the fact that the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet the preset conditions: generating a message queue with the removed messages based on the message queue; determining whether the number of the request messages in the message queue after the message is removed reaches a preset threshold value; and determining the request messages in the message queue after the message is removed and the queue head of the message queue after the message is removed as the request messages in the new message queue and the new queue head of the message queue, determining whether the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition, and executing the message removing step again in response to the flag bits corresponding to the request messages in the message queue re-determined and the queue head of the message queue meet the preset condition.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, a saving unit, and a determining and message culling unit. The names of these units do not in some cases form a limitation on the units themselves, and for example, the acquiring unit may also be described as a "unit that receives a set of request messages sent by a sender module".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A processing method of a request message and a response message comprises the following steps:
receiving a request message set sent by a sender module;
sequentially storing each request message in the request message set into a message queue;
determining whether flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet preset conditions, and executing the following message elimination steps in response to the fact that the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet the preset conditions:
generating a message queue after the message is removed based on the message queue;
determining whether the number of the request messages in the message queue after the message is removed reaches a preset threshold value;
and determining the request messages in the message queue after the message is removed and the queue head of the message queue after the message is removed as the request messages in the new message queue and the queue head of the new message queue in response to the number of the request messages in the message queue after the message is removed not reaching a preset threshold value, determining whether flag bits corresponding to the request messages in the queue head of the re-determined message queue and the message queue meet preset conditions or not, and executing the message removing step again in response to the flag bits corresponding to the request messages in the queue head of the re-determined message queue and the message queue meeting the preset conditions.
2. The method of claim 1, wherein the method further comprises:
determining whether a flag bit corresponding to a request message in the head of the message queue meets a preset condition;
and determining whether the request message is responded or not in response to that the flag bit corresponding to the request message in the head of the message queue meets the preset condition.
3. The method of claim 2, wherein the method further comprises:
responding to the request message to obtain a response, and receiving a response message sent by the receiver module;
and sending the response message to the sender module.
4. The method of claim 3, wherein the method further comprises:
generating an error message in response to not receiving a response message sent by the receiver module;
and sending the error message to the sender module so that the sender module can display the error message.
5. The method of claim 4, wherein a request message of the set of request messages comprises at least one of: a registration request message, a connection request message, a heartbeat request message, and a setup request message.
6. The method of claim 5, wherein the determining whether flag bits corresponding to the request messages in the message queue and the head of the message queue meet a preset condition comprises:
determining whether the set of request messages is held in the message queue;
and determining whether a flag bit corresponding to the request message in the head of the message queue is true, wherein the flag bit represents that the request message in the head of the message queue is true and the request message is responded.
7. The method of claim 6, wherein the generating a message queue with culled messages based on the message queue comprises:
and removing the request message in the head of the message queue from the message queue to obtain the message queue with the removed message.
8. A request message and response message processing apparatus, comprising:
a receiving unit configured to receive a request message set sent by a sender module;
the storage unit is configured to store each request message in the request message set into a message queue in sequence;
the determining and message removing unit is configured to determine whether the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meet preset conditions, and in response to the flag bits corresponding to the request messages in the message queue and the queue head of the message queue meeting the preset conditions, execute the following message removing steps:
generating a message queue after the message is removed based on the message queue;
determining whether the number of the request messages in the message queue after the message is removed reaches a preset threshold value;
and determining the request messages in the message queue after the message is removed and the queue head of the message queue after the message is removed as the request messages in the new message queue and the queue head of the new message queue in response to the number of the request messages in the message queue after the message is removed not reaching a preset threshold value, determining whether flag bits corresponding to the request messages in the queue head of the re-determined message queue and the message queue meet preset conditions or not, and executing the message removing step again in response to the flag bits corresponding to the request messages in the queue head of the re-determined message queue and the message queue meeting the preset conditions.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-7.
CN202110779813.5A 2021-07-09 2021-07-09 Method, device, equipment and medium for processing request message and response message Active CN113535428B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110779813.5A CN113535428B (en) 2021-07-09 2021-07-09 Method, device, equipment and medium for processing request message and response message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110779813.5A CN113535428B (en) 2021-07-09 2021-07-09 Method, device, equipment and medium for processing request message and response message

Publications (2)

Publication Number Publication Date
CN113535428A true CN113535428A (en) 2021-10-22
CN113535428B CN113535428B (en) 2023-05-23

Family

ID=78127317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110779813.5A Active CN113535428B (en) 2021-07-09 2021-07-09 Method, device, equipment and medium for processing request message and response message

Country Status (1)

Country Link
CN (1) CN113535428B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211275A (en) * 2007-12-25 2008-07-02 康佳集团股份有限公司 Message pumping method and system
CN109743142A (en) * 2018-09-30 2019-05-10 比亚迪股份有限公司 Information communication method and device
CN112887196A (en) * 2021-01-20 2021-06-01 远景智能国际私人投资有限公司 Message sending method, system, device, equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211275A (en) * 2007-12-25 2008-07-02 康佳集团股份有限公司 Message pumping method and system
CN109743142A (en) * 2018-09-30 2019-05-10 比亚迪股份有限公司 Information communication method and device
CN112887196A (en) * 2021-01-20 2021-06-01 远景智能国际私人投资有限公司 Message sending method, system, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN113535428B (en) 2023-05-23

Similar Documents

Publication Publication Date Title
CN112416632B (en) Event communication method and device, electronic equipment and computer readable medium
CN112311656B (en) Message aggregation and display method and device, electronic equipment and computer readable medium
CN112363879A (en) Cache server performance test method, device, equipment and medium
CN113760536A (en) Data caching method and device, electronic equipment and computer readable medium
CN112907942A (en) Vehicle scheduling method, device, equipment and medium based on edge calculation
CN113553206B (en) Data event execution method and device, electronic equipment and computer readable medium
CN112418389A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN113535428B (en) Method, device, equipment and medium for processing request message and response message
CN113094002B (en) Message processing method, device, electronic equipment and computer medium
CN114785770A (en) Mirror layer file sending method and device, electronic equipment and computer readable medium
CN112543228A (en) Data transmission method and device, electronic equipment and computer readable medium
CN112346891A (en) Message storage method, device, equipment and computer readable medium
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN112100205A (en) Data processing method, device, equipment and computer readable medium
CN112311840A (en) Multi-terminal data synchronization method, device, equipment and medium
CN113438284B (en) Request processing method and device, electronic equipment and computer readable medium
CN113364672B (en) Method, device, equipment and computer readable medium for determining media gateway information
CN115297046B (en) Gateway information sending method, device, electronic equipment, medium and product
CN112069438B (en) Message merging method, message processing method and device, equipment and medium
CN115118727B (en) Data transmission method, device, equipment and storage medium of distributed computing architecture
CN115102992B (en) Data publishing method and device, electronic equipment and computer readable medium
CN113556352B (en) Information pushing method and device, terminal equipment and storage medium
CN113472565B (en) Method, apparatus, device and computer readable medium for expanding server function
CN111314457B (en) Method and device for setting virtual private cloud
CN114116859A (en) Number source information sending method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230320

Address after: 300450 No. 31, Xinhuan South Street, Tianjin Economic and Technological Development Zone, Binhai New Area, Tianjin

Applicant after: Vimicro Co.,Ltd.

Applicant after: Zhongxing Micro Technology Co.,Ltd.

Address before: 300450 No. 31, Xinhuan South Street, Tianjin Economic and Technological Development Zone, Binhai New Area, Tianjin

Applicant before: Vimicro Co.,Ltd.

GR01 Patent grant
GR01 Patent grant