CN114945005B - Message processing method and related equipment - Google Patents

Message processing method and related equipment Download PDF

Info

Publication number
CN114945005B
CN114945005B CN202210568044.9A CN202210568044A CN114945005B CN 114945005 B CN114945005 B CN 114945005B CN 202210568044 A CN202210568044 A CN 202210568044A CN 114945005 B CN114945005 B CN 114945005B
Authority
CN
China
Prior art keywords
message
parameter
processing
flow control
delay time
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
CN202210568044.9A
Other languages
Chinese (zh)
Other versions
CN114945005A (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.)
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Original Assignee
Hunan MgtvCom Interactive Entertainment Media 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 Hunan MgtvCom Interactive Entertainment Media Co Ltd filed Critical Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority to CN202210568044.9A priority Critical patent/CN114945005B/en
Publication of CN114945005A publication Critical patent/CN114945005A/en
Application granted granted Critical
Publication of CN114945005B publication Critical patent/CN114945005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/28Flow control; Congestion control in relation to timing considerations
    • H04L47/283Flow control; Congestion control in relation to timing considerations in response to processing delays, e.g. caused by jitter or round trip time [RTT]
    • 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/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6205Arrangements for avoiding head of line blocking

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The message processing method and the related equipment provided by the disclosure can obtain a first message, wherein the first message carries a delay time parameter, a deduplication parameter and a flow control parameter; performing delay processing on the first message by using the delay time parameter to determine the processable time of the first message; determining whether to perform de-duplication processing on the first message according to the de-duplication parameter when the processable time is reached, and if so, removing a second message which is the same as the first message and is obtained in the delay processing process; the first message is added to the target message queue according to the flow control parameter. According to the method and the device for processing the message, the message priority can be accurately distinguished through the delay time parameter, the deduplication parameter and the flow control parameter carried on the message, the messages with different priorities are guaranteed to be correspondingly processed, meanwhile, the number of the messages added to the message queue is reduced, message blocking can be effectively relieved, and the interaction efficiency of the system is improved.

Description

Message processing method and related equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a message processing method and related devices.
Background
Currently, interactions between related systems often need to be accomplished through message queues. However, as the complexity of the system increases and the number of messages increases, system interaction faces the problems of long message blocking time and untimely message processing, resulting in low system interaction efficiency and even system breakdown.
Therefore, how to reduce the message blocking and process the message in time is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a message processing method and related device for overcoming the foregoing problems or at least partially solving the foregoing problems, where the technical solutions are as follows:
a message processing method, comprising:
obtaining a first message, wherein the first message carries a delay time parameter, a deduplication parameter and a flow control parameter;
performing delay processing on the first message by using the delay time parameter, and determining the processable time of the first message;
determining whether to perform de-duplication processing on the first message according to the de-duplication parameter when the processable time is reached, and if so, removing a second message which is the same as the first message and is obtained in the delay processing process;
and adding the first message to a target message queue according to the flow control parameter.
Optionally, before the obtaining the first message, the method further includes:
generating the first message, wherein the first message comprises meta information corresponding to the first message;
determining a source scene corresponding to the first message according to the meta information;
and configuring the delay time parameter, the deduplication parameter and the flow control parameter corresponding to the source scene for the first message.
Optionally, the delay processing is performed on the first message by using the delay time parameter, and determining the processable time of the first message includes:
determining a delay time length of the first message according to the delay time parameter;
and carrying out delay processing on the first message according to the delay time length, and determining the processable time of the first message according to the acquisition time of the first message and the delay time length.
Optionally, the removing the second message that is the same as the first message and is obtained during the delay processing includes:
determining a second message identical to the first message from other messages obtained in the delay processing according to the meta information in the messages;
and removing the second message.
Optionally, the adding the first message to the target message queue according to the flow control parameter includes:
determining at least one allowable scheduling thread corresponding to the flow control parameter;
and in the case that any one of the allowed scheduling threads is idle, adding the first message into a target message queue through the idle allowed scheduling thread.
Optionally, the meta information includes a service type, a service parameter, a flow control concurrent thread number, a time when the message is processed, and a processor name when the message is processed.
Optionally, the first message is a trigger message for streaming media.
A message processing apparatus, comprising: a message obtaining unit, a first determining unit, a second determining unit, a message removing unit and a message adding unit,
the message obtaining unit is configured to obtain a first message, where the first message carries a delay time parameter, a deduplication parameter, and a flow control parameter;
the first determining unit is configured to perform delay processing on the first message by using the delay time parameter, and determine a processable time of the first message;
the second determining unit is configured to determine whether to perform deduplication processing on the first message according to the deduplication parameter when the processable time is reached, and if so, trigger the message removing unit;
the message removing unit is used for removing a second message which is obtained in the delay processing process and is identical to the first message;
the message adding unit is configured to add the first message to a target message queue according to the flow control parameter.
A computer readable storage medium having stored thereon a program which when executed by a processor implements a message processing method as claimed in any one of the preceding claims.
An electronic device comprising at least one processor, and at least one memory, bus connected to the processor; the processor and the memory complete communication with each other through the bus; the processor is configured to invoke program instructions in the memory to perform the message processing method of any of the above.
By means of the technical scheme, the message processing method and the related equipment can obtain the first message, wherein the first message carries the delay time parameter, the deduplication parameter and the flow control parameter; performing delay processing on the first message by using the delay time parameter to determine the processable time of the first message; determining whether to perform de-duplication processing on the first message according to the de-duplication parameter when the processable time is reached, and if so, removing a second message which is the same as the first message and is obtained in the delay processing process; the first message is added to the target message queue according to the flow control parameter. According to the method and the device for processing the message, the message priority can be accurately distinguished through the delay time parameter, the deduplication parameter and the flow control parameter carried on the message, the messages with different priorities are guaranteed to be correspondingly processed, meanwhile, the number of the messages added to the message queue is reduced, message blocking can be effectively relieved, and the interaction efficiency of the system is improved.
The foregoing description is merely an overview of the technical solutions of the present disclosure, and may be implemented according to the content of the specification in order to make the technical means of the present disclosure more clearly understood, and in order to make the above and other objects, features and advantages of the present disclosure more clearly understood, the following specific embodiments of the present disclosure are specifically described.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the disclosure. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 shows a flow diagram of one implementation of a message processing method provided by an embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating another implementation of a message processing method provided by an embodiment of the present disclosure;
FIG. 3 is a flow diagram illustrating another implementation of a message processing method provided by an embodiment of the present disclosure;
FIG. 4 is a flow diagram illustrating another implementation of a message processing method provided by an embodiment of the present disclosure;
FIG. 5 is a flow diagram illustrating another implementation of a message processing method provided by an embodiment of the present disclosure;
fig. 6 shows a schematic structural diagram of a message processing apparatus provided by an embodiment of the present disclosure;
fig. 7 shows a schematic structural diagram of an electronic device provided by an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, a flowchart of an implementation of a message processing method provided by an embodiment of the disclosure may include:
s100, obtaining a first message, wherein the first message carries a delay time parameter, a deduplication parameter and a flow control parameter.
Wherein the first message may be an interactive message generated by the first system for remote service invocation with the second system. Alternatively, the first message may be a trigger message for streaming media. The streaming media may include video, music, audio books, and electronic books, among others.
Wherein the delay time parameter is used to indicate a time to delay processing the first message. For example: in case the delay time parameter is 5 minutes, the first message is processed after waiting 5 minutes after being obtained. In case the delay time parameter is 0 seconds, the first message is processed immediately after the first message is obtained.
Wherein the deduplication parameter is used to indicate whether other messages that are identical to the first message are to be removed.
Wherein the flow control parameter is used to indicate the allowed dispatch threads set for the first message.
Optionally, based on the method shown in fig. 1, as shown in fig. 2, a flowchart of another implementation of the message processing method provided by the embodiment of the present disclosure may further include, before step S100:
a100, generating a first message, wherein the first message comprises meta information corresponding to the first message.
The embodiment of the disclosure may pre-configure meta information corresponding to the first message, and encapsulate the meta information to generate the first message. Optionally, the meta-information includes a service type, a service parameter, a flow control concurrent thread number, a time when the message is processed, and a processor name when the message is processed.
And A200, determining a source scene corresponding to the first message according to the meta information.
Alternatively, the source scene may include a manually orchestrated video operation trigger message and a video on-line and off-line automatic trigger message. It is understood that the source scenario may be set according to actual requirements.
A300, configuring delay time parameters, deduplication parameters and flow control parameters corresponding to the source scene for the first message.
According to the embodiment of the disclosure, the corresponding delay time parameter, the corresponding deduplication parameter and the corresponding flow control parameter can be preset for each source scene, and after the source scene corresponding to the first message is identified, the delay time parameter, the corresponding deduplication parameter and the corresponding flow control parameter corresponding to the source scene are configured for the first message. For example: in the embodiment of the disclosure, when the source scene is a manually scheduled video operation trigger message, the set delay time parameter may be 0 seconds, the deduplication parameter may be a parameter corresponding to no deduplication, and the flow control parameter may be a parameter corresponding to all allowable scheduling threads. In the embodiment of the disclosure, under the condition that the source scene is video online and offline automatic triggering fund, the set delay time parameter may be 5 minutes, the deduplication parameter may be a parameter corresponding to deduplication, and the flow control parameter may be a parameter corresponding to one allowable scheduling thread.
According to the embodiment of the disclosure, corresponding delay time parameters, deduplication parameters and flow control parameters are configured for the first message through the source scene corresponding to the first message. The priority of the first message is defined using the delay time parameter, the deduplication parameter, and the flow control parameter such that the first message can be subsequently processed according to the priority.
And S200, carrying out delay processing on the first message by utilizing the delay time parameter, and determining the processable time of the first message.
Specifically, after any message is obtained, the embodiment of the disclosure may determine the processable time of each message according to the delay time parameter carried in each message, arrange each message according to the processable time, and perform subsequent processing on the message when the processable time of any message arrives.
Optionally, based on the method shown in fig. 1, as shown in fig. 3, a flowchart of another implementation of the message processing method provided by the embodiment of the present disclosure, step S200 may include:
s210, determining the delay time length of the first message according to the delay time parameter.
S220, carrying out delay processing on the first message according to the delay time length, and determining the processable time of the first message according to the acquisition time of the first message and the delay time length.
For ease of understanding, this is illustrated by way of example: in the case that the delay time parameter is 3 minutes, it may be determined that the delay time for the first message is 3 minutes, and if the acquisition time for acquiring the first message is 13:25:00, it is determined that the processable time of the first message is 13:28:00.
And S300, determining whether to perform de-duplication processing on the first message according to the de-duplication parameter when the processable time is reached, and executing step S400 if the first message is subjected to de-duplication processing.
It may be appreciated that the embodiments of the present disclosure may preset parameters corresponding to the deduplication process and parameters corresponding to the non-deduplication process, for example: the embodiment of the disclosure can set "0" as a parameter corresponding to the non-deduplication process and "1" as a parameter corresponding to the deduplication process. And determining to perform de-duplication processing on the first message when the obtained de-duplication parameter is 1, and determining not to perform de-duplication processing on the first message when the obtained de-duplication parameter is 0.
And S400, removing the second message which is obtained in the delay processing and is identical to the first message.
Alternatively, the embodiment of the present disclosure may determine a message that is identical to part or all of the information of the meta information of the first message as the second message.
It will be appreciated that the embodiments of the present disclosure may continue to obtain other messages during the delay processing of the first message. And under the condition that the processable time of the first message is reached, detecting meta information of each other message, determining a second message identical to the first message, and deleting the second message.
Optionally, based on the method shown in fig. 2, as shown in fig. 4, a flowchart of another implementation of the message processing method provided by the embodiment of the present disclosure, step S400 may include:
s410, determining a second message which is the same as the first message in other messages obtained in the delay processing process according to meta information in the messages.
Alternatively, embodiments of the present disclosure may determine a message that is the same as the service type and service parameters of the first message as the second message.
Specifically, the embodiment of the disclosure may continue to obtain other messages during the delay processing of the first message. And under the condition that the processable time of the first message is reached, detecting the service type and the service parameter of each other message, comparing the service type and the service parameter of the other message with the service type and the service parameter of the first message, and if the service type and the service parameter of the other message are the same, determining the other message as a second message which is the same as the first message.
S420, removing the second message.
For ease of understanding, this is illustrated by way of example: in the case of a delay time parameter of 6 minutes, if the acquisition time of acquiring the first message is 15:33:00, determining that the processable time of the first message is 13:39:00. And at the time of 13:39:00, detecting the service type and the service parameters of other messages obtained in the delay processing process of 15:33:00 to 13:38:59, comparing the service type and the service parameters of each other message with the service type and the service parameters of the first message, if the service type and the service parameters of each other message are the same, determining that the other message is a second message which is the same as the first message, and deleting the second message.
According to the embodiment of the disclosure, by removing the same message, redundant messages can be reduced from entering the message queue, so that the waste of computer resources caused by occupation of the thread by the redundant messages is avoided, and the problem of message blocking is effectively solved.
S500, adding the first message into a target message queue according to the flow control parameters.
Optionally, based on the method shown in fig. 1, as shown in fig. 5, a flowchart of another implementation of the message processing method provided by the embodiment of the present disclosure, step S500 may include:
s510, determining at least one allowable dispatch thread corresponding to the flow control parameters.
S520, under the condition that any allowed scheduling thread is idle, the first message is added into the target message queue through the idle allowed scheduling thread.
Embodiments of the present disclosure may control the allowable dispatch threads to add a first message to a target message queue through flow control parameters, thereby limiting the rate at which the first message is added to the target message queue. It will be appreciated that in the event that each allowable dispatch thread of a first message is occupied, the time that the first message is added to the target message queue is delayed until the allowable dispatch thread of the first message is idle.
Under normal conditions, the more the flow control parameters configured by the messages with higher priority are, the more the scheduling threads are allowed to be scheduled, so that the probability that the messages with higher priority are blocked is smaller before the messages are added to the target message queue, the messages with higher priority can be timely processed, and the message processing efficiency is improved.
Optionally, the embodiments of the present disclosure may sequentially transfer the messages in the target message queue to the second system in a first-in first-out manner, so that the second system responds to the messages, and returns a response result to the first system.
The message processing method provided by the disclosure can obtain a first message, wherein the first message carries a delay time parameter, a deduplication parameter and a flow control parameter; performing delay processing on the first message by using the delay time parameter to determine the processable time of the first message; determining whether to perform de-duplication processing on the first message according to the de-duplication parameter when the processable time is reached, and if so, removing a second message which is the same as the first message and is obtained in the delay processing process; the first message is added to the target message queue according to the flow control parameter. According to the method and the device for processing the message, the message priority can be accurately distinguished through the delay time parameter, the deduplication parameter and the flow control parameter carried on the message, the messages with different priorities are guaranteed to be correspondingly processed, meanwhile, the number of the messages added to the message queue is reduced, message blocking can be effectively relieved, and the interaction efficiency of the system is improved.
Although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a message processing apparatus, where the structure of the message processing apparatus is shown in fig. 6, and may include: a message obtaining unit 100, a first determining unit 200, a second determining unit 300, a message removing unit 400, and a message adding unit 500.
A message obtaining unit 100, configured to obtain a first message, where the first message carries a delay time parameter, a deduplication parameter, and a flow control parameter.
The first determining unit 200 is configured to perform delay processing on the first message by using the delay time parameter, and determine a processable time of the first message.
The second determining unit 300 is configured to determine whether to perform deduplication processing on the first message according to the deduplication parameter when the processable time is reached, and if so, trigger the message removing unit 400.
The message removing unit 400 is configured to remove the second message that is the same as the first message and is obtained during the delay processing.
The message adding unit 500 is configured to add the first message to the target message queue according to the flow control parameter.
Optionally, the message processing apparatus may further include: a message generating unit, a third determining unit and a parameter configuration unit.
A message generating unit for generating a first message before the message obtaining unit 100 obtains the first message, wherein the first message includes meta information corresponding to the first message.
And the third determining unit is used for determining the source scene corresponding to the first message according to the meta information.
And the parameter configuration unit is used for configuring delay time parameters, deduplication parameters and flow control parameters corresponding to the source scene for the first message.
Optionally, the first determining unit 200 may be specifically configured to determine a delay time length for the first message according to the delay time parameter; and carrying out delay processing on the first message according to the delay time length, and determining the processable time of the first message according to the acquisition time of the first message and the delay time length.
Optionally, the message removing unit 400 may be specifically configured to determine, according to meta information in the message, a second message that is the same as the first message from other messages obtained in the delay processing procedure; the second message is removed.
Optionally, the message adding unit 500 is specifically configured to determine at least one allowable scheduling thread corresponding to the flow control parameter; in the case that any one of the allowed dispatch threads is idle, the first message is added to the target message queue by the idle allowed dispatch thread.
Optionally, the meta-information includes a service type, a service parameter, a flow control concurrent thread number, a time when the message is processed, and a processor name when the message is processed.
Optionally, the first message is a trigger message for streaming media.
The message processing device provided by the disclosure can obtain a first message, wherein the first message carries a delay time parameter, a deduplication parameter and a flow control parameter; performing delay processing on the first message by using the delay time parameter to determine the processable time of the first message; determining whether to perform de-duplication processing on the first message according to the de-duplication parameter when the processable time is reached, and if so, removing a second message which is the same as the first message and is obtained in the delay processing process; the first message is added to the target message queue according to the flow control parameter. According to the method and the device for processing the message, the message priority can be accurately distinguished through the delay time parameter, the deduplication parameter and the flow control parameter carried on the message, the messages with different priorities are guaranteed to be correspondingly processed, meanwhile, the number of the messages added to the message queue is reduced, message blocking can be effectively relieved, and the interaction efficiency of the system is improved.
The specific manner in which the individual units perform the operations in relation to the apparatus of the above embodiments has been described in detail in relation to the embodiments of the method and will not be described in detail here.
The message processing apparatus includes a processor and a memory, the above-mentioned message obtaining unit 100, the first determining unit 200, the second determining unit 300, the message removing unit 400, the message adding unit 500, and the like are stored in the memory as program units, and the above-mentioned program units stored in the memory are executed by the processor to realize the corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can set one or more than one, and the priority of the message is accurately distinguished by adjusting the kernel parameters through the delay time parameters, the deduplication parameters and the flow control parameters carried on the message, so that the messages with different priorities are ensured to be correspondingly processed, and meanwhile, the number of the messages added to the message queue is reduced, the message blocking can be effectively relieved, and the interaction efficiency of the system is improved.
The embodiment of the present disclosure provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the message processing method.
The embodiment of the disclosure provides a processor for running a program, wherein the message processing method is executed when the program runs.
As shown in fig. 7, an embodiment of the present disclosure provides an electronic device 1000, the electronic device 1000 comprising at least one processor 1001, and at least one memory 1002, bus 1003 connected to the processor 1001; wherein, the processor 1001 and the memory 1002 complete communication with each other through the bus 1003; the processor 1001 is configured to call program instructions in the memory 1002 to perform the message processing method described above. The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present disclosure also provides a computer program product adapted to perform a program initialized with the steps of the message processing method when executed on an electronic device.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, electronic devices (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, the electronic device includes one or more processors (CPUs), memory, and a bus. The electronic device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
In the description of the present disclosure, it should be understood that, if the directions or positional relationships indicated by the terms "upper", "lower", "front", "rear", "left" and "right", etc., are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the positions or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limitations of the present disclosure.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations of this disclosure will be apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present disclosure, are intended to be included within the scope of the claims of the present disclosure.

Claims (9)

1. A method of message processing comprising:
obtaining a first message, wherein the first message carries a delay time parameter, a deduplication parameter and a flow control parameter;
performing delay processing on the first message by using the delay time parameter, and determining the processable time of the first message;
determining whether to perform de-duplication processing on the first message according to the de-duplication parameter when the processable time is reached, and if so, removing a second message which is the same as the first message and is obtained in the delay processing process;
adding the first message to a target message queue according to the flow control parameter;
wherein, before the obtaining the first message, the following steps are performed:
generating the first message, wherein the first message comprises meta information corresponding to the first message;
determining a source scene corresponding to the first message according to the meta information;
and configuring the delay time parameter, the deduplication parameter and the flow control parameter corresponding to the source scene for the first message.
2. The method of claim 1, wherein said delaying the first message using the delay time parameter to determine a processable time of the first message comprises:
determining a delay time length of the first message according to the delay time parameter;
and carrying out delay processing on the first message according to the delay time length, and determining the processable time of the first message according to the acquisition time of the first message and the delay time length.
3. The method of claim 1, wherein said removing a second message, which is the same as the first message, obtained during the delay processing comprises:
determining a second message identical to the first message from other messages obtained in the delay processing according to the meta information in the messages;
and removing the second message.
4. The method of claim 1, wherein adding the first message to a target message queue according to the flow control parameter comprises:
determining at least one allowable scheduling thread corresponding to the flow control parameter;
and in the case that any one of the allowed scheduling threads is idle, adding the first message into a target message queue through the idle allowed scheduling thread.
5. The method of claim 1, wherein the meta-information includes a service type, a service parameter, a number of concurrent threads for flow control, a time when the message is processed, and a processor name when the message is processed.
6. The method according to any one of claims 1 to 5, wherein the first message is a trigger message for streaming media.
7. A message processing apparatus, comprising: a message obtaining unit, a first determining unit, a second determining unit, a message removing unit, a message adding unit, a message generating unit, a third determining unit and a parameter configuring unit,
the message obtaining unit is configured to obtain a first message, where the first message carries a delay time parameter, a deduplication parameter, and a flow control parameter;
the first determining unit is configured to perform delay processing on the first message by using the delay time parameter, and determine a processable time of the first message;
the second determining unit is configured to determine whether to perform deduplication processing on the first message according to the deduplication parameter when the processable time is reached, and if so, trigger the message removing unit;
the message removing unit is used for removing a second message which is obtained in the delay processing process and is identical to the first message;
the message adding unit is used for adding the first message to a target message queue according to the flow control parameter;
the message generating unit is used for generating a first message before the message obtaining unit obtains the first message, wherein the first message comprises meta information corresponding to the first message;
the third determining unit is configured to determine, according to the meta information, a source scene corresponding to the first message;
the parameter configuration unit is configured to configure the delay time parameter, the deduplication parameter, and the flow control parameter corresponding to the source scene for the first message.
8. A computer-readable storage medium, on which a program is stored, characterized in that the program, when executed by a processor, implements the message processing method according to any one of claims 1 to 6.
9. An electronic device comprising at least one processor, and at least one memory, bus connected to the processor; the processor and the memory complete communication with each other through the bus; the processor is configured to invoke program instructions in the memory to perform the message processing method of any of claims 1 to 6.
CN202210568044.9A 2022-05-24 2022-05-24 Message processing method and related equipment Active CN114945005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210568044.9A CN114945005B (en) 2022-05-24 2022-05-24 Message processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210568044.9A CN114945005B (en) 2022-05-24 2022-05-24 Message processing method and related equipment

Publications (2)

Publication Number Publication Date
CN114945005A CN114945005A (en) 2022-08-26
CN114945005B true CN114945005B (en) 2024-02-06

Family

ID=82908770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210568044.9A Active CN114945005B (en) 2022-05-24 2022-05-24 Message processing method and related equipment

Country Status (1)

Country Link
CN (1) CN114945005B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925661A (en) * 2021-03-09 2021-06-08 广州虎牙科技有限公司 Message processing method and device, computer equipment and storage medium
CN112925642A (en) * 2021-02-25 2021-06-08 百果园技术(新加坡)有限公司 Delayed message processing method, device, equipment and storage medium
WO2021120783A1 (en) * 2019-12-20 2021-06-24 华为技术有限公司 Message processing method and apparatus
CN113709214A (en) * 2021-08-04 2021-11-26 北京快乐茄信息技术有限公司 Message processing method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021120783A1 (en) * 2019-12-20 2021-06-24 华为技术有限公司 Message processing method and apparatus
CN112925642A (en) * 2021-02-25 2021-06-08 百果园技术(新加坡)有限公司 Delayed message processing method, device, equipment and storage medium
CN112925661A (en) * 2021-03-09 2021-06-08 广州虎牙科技有限公司 Message processing method and device, computer equipment and storage medium
CN113709214A (en) * 2021-08-04 2021-11-26 北京快乐茄信息技术有限公司 Message processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114945005A (en) 2022-08-26

Similar Documents

Publication Publication Date Title
WO2021180025A1 (en) Message processing method and apparatus, electronic device and medium
US10606653B2 (en) Efficient priority-aware thread scheduling
US9497288B2 (en) Subscriber based priority of messages in a publisher-subscriber domain
US12072828B2 (en) Article, device, and techniques for serverless message stream processing
CN110442481B (en) Service processing method, service component container and electronic equipment
CN112579263A (en) Task execution method and device, storage medium and electronic equipment
CN109391512B (en) Service publishing method and device and electronic equipment
WO2013041366A1 (en) Concurrent processing of queued messages
CN107818012B (en) Data processing method and device and electronic equipment
CN114168302A (en) Task scheduling method, device, equipment and storage medium
CN116627333A (en) Log caching method and device, electronic equipment and computer readable storage medium
CN110764930B (en) Request or response processing method and device based on message mode
CN111913807A (en) Event processing method, system and device based on multiple storage areas
CN110069217B (en) Data storage method and device
WO2023024128A1 (en) Apparatus and method for handling real-time tasks with diverse size based on message queue
CN108595315B (en) Log collection method, device and equipment
CN112114976B (en) Service processing method, device, equipment and storage medium
CN114945005B (en) Message processing method and related equipment
CN110222016B (en) File processing method and device
CN109558249B (en) Control method and device for concurrent operation
CN108628615B (en) Method, device and equipment for detecting abandoned codes
CN111159298A (en) Service request processing method and device, electronic equipment and storage medium
CN114995982A (en) Task processing method and device and storage medium
CN113347110A (en) Flow control method, flow control device, storage medium and equipment
CN110928944B (en) Data processing 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