CN107783845B - Message transmission system, method and device - Google Patents
Message transmission system, method and device Download PDFInfo
- Publication number
- CN107783845B CN107783845B CN201610726969.6A CN201610726969A CN107783845B CN 107783845 B CN107783845 B CN 107783845B CN 201610726969 A CN201610726969 A CN 201610726969A CN 107783845 B CN107783845 B CN 107783845B
- Authority
- CN
- China
- Prior art keywords
- unit
- message
- thread
- time period
- encapsulation packet
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application provides a message transmission system, a message transmission method and a message transmission device, wherein the message transmission is realized, the utilization rate of network resources is improved and the transmission efficiency is improved by sending the frequency of a message unit to a sending queue of a source process unit according to a thread unit of the source process unit in a first historical time period, determining the scale of a process encapsulation packet corresponding to a first current time period of the source process unit, encapsulating the message unit in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period, generating the process encapsulation packet, and sending the process encapsulation packet.
Description
Technical Field
The present application relates to computer technologies, and in particular, to a message transmission system, method, and apparatus.
Background
In a real-time computing system, a process unit may include one or more thread units, and a large amount of message transmission may be involved between process units and between thread units within a process unit.
In the prior art, in order to improve the performance of message transmission, messages generated by thread units in the same process unit are usually sent to a sending queue of the process unit, the process unit encapsulates (Batch) the messages in the sending queue according to a fixed scale of a process encapsulation packet (the scale refers to the number of the messages included in the process encapsulation packet), the process encapsulation packet generated after encapsulation is transmitted from one process unit to another process unit through a network channel, the process unit receiving the process encapsulation packet performs corresponding message decapsulation processing, and the messages obtained after decapsulation processing are sent to the corresponding thread units. For example: the process unit A comprises a thread unit A1, a thread unit A2 and a thread unit A3, the process unit B comprises a thread unit B1, a thread unit B2 and a thread unit B3, message transmission exists between the thread unit of the process unit A and the thread unit of the process unit B, then messages generated by the thread unit A1, the thread unit A2 and the thread unit A3 are sent to a sending queue of the process unit A, the messages in the sending queue of the process unit A are packaged according to the fixed scale of a process package, the package generated after the packaging processing is sent to the process unit B through a network channel between the process unit A and the process unit B, the process unit B receives the process package and then carries out corresponding message decapsulation processing, and the messages obtained after the decapsulation processing are sent to the corresponding thread unit.
However, with the method of the prior art, the utilization rate of network resources is not high when message transmission is performed.
Disclosure of Invention
The application provides a message transmission system, a message transmission method and a message transmission device, which aim to solve the problem that the utilization rate of network resources in the prior art is not high.
In one aspect, the present application provides a message transmission system, comprising:
the system comprises a source process unit and a target process unit, wherein the source process unit comprises at least one thread unit, and the source process unit is connected with the target process unit;
the source process unit is configured to determine, according to a frequency that the at least one thread unit sends a message unit to a sending queue of the source process unit in a first historical time period, a size of a process encapsulation packet corresponding to a first current time period of the source process unit, where the message unit includes at least one message;
the source process unit is further configured to perform encapsulation processing on the message units in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period, so as to generate a process encapsulation packet;
the source process unit is further configured to send the process encapsulation packet to the destination process unit.
As an implementation manner, the source process unit is specifically configured to, if the number of message units, of which destination process units are the same process unit, in a sending queue of the source process unit is greater than or equal to the size of the process encapsulation packet corresponding to the first current time period, perform encapsulation processing on the message units, of which destination process units are the same process unit, according to the size of the process encapsulation packet corresponding to the first current time period, and generate a first process encapsulation packet, where the number of message units included in the first process encapsulation packet is the same as the size of the process encapsulation packet corresponding to the first current time period.
As an implementation manner, the source process unit is further specifically configured to determine whether a first waiting time of a message unit that enters the transmission queue earliest in the message units of the target process unit that are the same process unit is greater than or equal to a first preset time if the number of the message units of the target process unit that are the same process unit in the transmission queue of the source process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, and perform encapsulation processing on the message unit of the target process unit that is the same process unit to generate a second process encapsulation packet if the first waiting time is greater than or equal to the first preset time, where the second process encapsulation packet includes all the message units of the target process unit that are the same process unit in the transmission queue.
As an implementation manner, the source process unit is specifically configured to obtain a first number of message units sent through the first process encapsulation packet and the second process encapsulation packet in the first historical time period; acquiring a second number of message units sent by the second process encapsulation packet in the first historical time period; and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
In another aspect, the present application provides a message transmission method, including:
determining the scale of a process encapsulation packet corresponding to a first current time period of a source process unit according to the frequency of sending a message unit to a sending queue of the source process unit by a thread unit of the source process unit in a first historical time period, wherein the message unit comprises at least one message;
according to the scale of the process encapsulation packet corresponding to the first current time period, encapsulating the message units in the sending queue of the source process unit to generate a process encapsulation packet;
and sending the process encapsulation packet.
As one implementation manner, the process encapsulation package includes: a first process encapsulates the packet;
the encapsulating the message unit in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period to generate the process encapsulation packet includes:
if the number of the message units of which the destination process units in the sending queue of the source process unit are the same process unit is larger than or equal to the scale of the process encapsulation packet corresponding to the first current time period, performing encapsulation processing on the message units of which the destination process units are the same process unit according to the scale of the process encapsulation packet corresponding to the first current time period to generate a first process encapsulation packet, wherein the number of the message units contained in the first process encapsulation packet is the same as the scale of the process encapsulation packet corresponding to the first current time period.
As an implementation manner, the process encapsulation package further includes: packaging the packet by the second process;
the method further comprises the following steps:
if the number of the message units of which the destination process units in the sending queue of the source process unit are the same process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, determining whether the first waiting time of the message unit which enters the sending queue earliest in the message units of which the destination process unit is the same process unit is greater than or equal to a first preset time period, if the first waiting time is greater than or equal to the first preset time period, encapsulating the message units of which the destination process units are the same process unit to generate a second process encapsulation packet, wherein the second process encapsulation packet comprises all the message units of which the destination process units in the sending queue are the same process unit.
As an implementation manner, the determining, according to the frequency of sending the message unit to the sending queue of the source process unit by the thread unit of the source process unit in the first historical time period, the size of the process encapsulation packet corresponding to the first current time period of the source process unit includes:
acquiring a first number of message units sent by the first process encapsulation packet and the second process encapsulation packet in the first historical time period; and the number of the first and second groups,
acquiring a second number of message units sent by the second process encapsulation packet in the first historical time period;
and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
As an implementation manner, the determining, according to the ratio of the second number to the first number and the scale of the process encapsulation packet corresponding to the first historical time period, the scale of the process encapsulation packet corresponding to the first current time period includes:
if the ratio is greater than a first preset threshold, determining that the scale of the process encapsulation packet corresponding to the first current time period is the product of the scale of the process encapsulation packet corresponding to the first historical time period and a first coefficient, wherein the first coefficient is less than 1.
As an implementation manner, the method further comprises the following steps:
if the ratio is smaller than or equal to the first preset threshold, determining that the scale of the process encapsulation packet corresponding to the first current time period is the product of the scale of the process encapsulation packet corresponding to the first historical time period and a second coefficient, wherein the second coefficient is larger than 1.
As an implementation manner, the method further comprises the following steps:
determining that a ratio of the first quantity to a third quantity is the second coefficient, where the third quantity is a quantity of message units sent by the first process encapsulation packet and the second process encapsulation packet in a previous time period of the first historical time period.
As an implementation manner, the first preset threshold is 0.5.
In another aspect, the present application provides a message transmission apparatus, including:
the processing module is used for determining the scale of a process encapsulation packet corresponding to a first current time period of a source process unit according to the frequency of sending a message unit to a sending queue of the source process unit by a thread unit of the source process unit in a first historical time period, wherein the message unit comprises at least one message;
the encapsulation module is used for encapsulating the message units in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period to generate a process encapsulation packet;
and the sending module is used for sending the process encapsulation packet.
As one implementation manner, the process encapsulation package includes: a first process encapsulates the packet;
the encapsulation module is specifically configured to, if the number of message units of which destination process units in the transmission queue of the source process unit are the same process unit is greater than or equal to the size of the process encapsulation packet corresponding to the first current time period, encapsulate the message units of which destination process units are the same process unit according to the size of the process encapsulation packet corresponding to the first current time period, and generate a first process encapsulation packet, where the number of message units included in the first process encapsulation packet is the same as the size of the process encapsulation packet corresponding to the first current time period.
As an implementation manner, the process encapsulation package further includes: packaging the packet by the second process;
the encapsulation module is further specifically configured to determine whether a first waiting time of a message unit, which enters the transmission queue earliest, in the message units of the same process unit as the destination process unit is greater than or equal to a first preset time if the number of the message units of the same process unit as the destination process unit in the transmission queue of the source process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, and perform encapsulation processing on the message unit of the same process unit as the destination process unit to generate a second process encapsulation packet if the first waiting time is greater than or equal to the first preset time, where the second process encapsulation packet includes all the message units of the same process unit as the destination process unit in the transmission queue.
As an implementation manner, the processing module is specifically configured to obtain a first number of message units sent by the first process encapsulation packet and the second process encapsulation packet in the first historical time period; acquiring a second number of message units sent by the second process encapsulation packet in the first historical time period; and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
As an implementation manner, the processing module is specifically configured to determine, if the ratio is greater than a first preset threshold, that the scale of the process encapsulation packet corresponding to the first current time period is a product of the scale of the process encapsulation packet corresponding to the first historical time period and a first coefficient, where the first coefficient is smaller than 1.
As an implementation manner, the processing module is further specifically configured to determine, if the ratio is smaller than or equal to the first preset threshold, that the scale of the process encapsulation packet corresponding to the first current time period is a product of the scale of the process encapsulation packet corresponding to the first historical time period and a second coefficient, where the second coefficient is greater than 1.
As an implementation manner, the processing module is further configured to determine that a ratio of the first quantity to a third quantity is the second coefficient, where the third quantity is a quantity of message units sent by the first process encapsulation packet and the second process encapsulation packet in a previous time period of the first historical time period.
As an implementation manner, the first preset threshold is 0.5.
In another aspect, the present application provides a message transmission apparatus, including:
the processor is used for determining the scale of a process encapsulation packet corresponding to a first current time period of a source process unit according to the frequency of sending a message unit to a sending queue of the source process unit by a thread unit of the source process unit in a first historical time period, wherein the message unit comprises at least one message;
the processor is further configured to perform encapsulation processing on the message units in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period, and generate a process encapsulation packet;
a transmitter coupled to the processor, the transmitter to transmit the process encapsulation packet.
As one implementation manner, the process encapsulation package includes: a first process encapsulates the packet;
the processor is specifically configured to, if the number of message units of which destination process units in the transmission queue of the source process unit are the same process unit is greater than or equal to the size of the process encapsulation packet corresponding to the first current time period, perform encapsulation processing on the message units of which destination process units are the same process unit according to the size of the process encapsulation packet corresponding to the first current time period, and generate a first process encapsulation packet, where the number of message units included in the first process encapsulation packet is the same as the size of the process encapsulation packet corresponding to the first current time period.
As an implementation manner, the process encapsulation package further includes: packaging the packet by the second process;
the processor is further specifically configured to determine whether a first waiting time of a message unit, which enters the transmission queue earliest, in the message units of the same process unit as the destination process unit is greater than or equal to a first preset time if the number of the message units of the same process unit as the destination process unit in the transmission queue of the source process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, and perform encapsulation processing on the message unit of the same process unit as the destination process unit to generate a second process encapsulation packet if the first waiting time is greater than or equal to the first preset time, where the second process encapsulation packet includes all the message units of the same process unit as the destination process unit in the transmission queue.
As an implementation manner, the processor is specifically configured to obtain a first number of message units sent through the first process encapsulation packet and the second process encapsulation packet in the first historical time period; acquiring a second number of message units sent by the second process encapsulation packet in the first historical time period; and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
As an implementation manner, the processor is specifically configured to determine, if the ratio is greater than a first preset threshold, that the scale of the process encapsulation packet corresponding to the first current time period is a product of the scale of the process encapsulation packet corresponding to the first historical time period and a first coefficient, where the first coefficient is smaller than 1.
As an implementation manner, the processor is further specifically configured to determine, if the ratio is smaller than or equal to the first preset threshold, that the scale of the process encapsulation packet corresponding to the first current time period is a product of the scale of the process encapsulation packet corresponding to the first historical time period and a second coefficient, where the second coefficient is greater than 1.
As an implementation manner, the processor is further configured to determine that a ratio of the first number to a third number is the second coefficient, where the third number is the number of message units sent by the first process encapsulation packet and the second process encapsulation packet in a previous time period of the first historical time period.
As an implementation manner, the first preset threshold is 0.5.
In yet another aspect, the present application provides a message transmission system, including:
a source process unit comprising at least one thread unit;
the thread unit is used for encapsulating the messages generated by the thread unit and generating a message unit, and the message unit comprises at least two messages;
the thread unit is also used for sending the message unit to the sending queue of the source process unit.
As an implementation manner, the thread unit is specifically configured to perform encapsulation processing on the message generated by the thread unit according to a scale of a thread encapsulation packet corresponding to a second current time period, so as to generate the message unit;
as an implementation manner, the thread unit is further configured to determine, according to the number of messages generated by the thread unit in a second historical time period, a size of a thread encapsulation packet corresponding to the second current time period.
As an implementation manner, the thread unit is specifically configured to, if the number of messages of which the destination thread units generated by the thread unit are the same thread unit is greater than or equal to the size of the thread encapsulation packet corresponding to the second current time period, perform encapsulation processing on the messages of which the destination thread units are the same thread unit according to the size of the thread encapsulation packet, and generate a first message unit, where the number of messages included in the first message unit is the same as the size of the thread encapsulation packet.
As an implementation manner, the thread unit is further specifically configured to determine, if the number of messages of which the destination thread units generated by the thread unit are the same thread unit is smaller than the size of the thread encapsulation packet corresponding to the second current time period, whether a second waiting time of an earliest message generated in the messages of which the destination thread unit is the same thread unit is greater than or equal to a second preset time, and if the second waiting time is greater than or equal to the second preset time, perform encapsulation processing on the messages of which the destination thread units are the same thread unit to generate a second message unit, where the second message unit includes all the messages of which the destination thread units generated by the thread unit are the same thread unit.
As an implementation manner, the thread unit is specifically configured to obtain a third number of messages sent by the first message unit and the second message unit in the second historical time period; and acquiring a fourth number of messages sent by the second message unit in the second historical time period; and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
In another aspect, the present application provides a message transmission method, including:
packaging the messages generated by the thread unit to generate a message unit, wherein the message unit comprises at least two messages;
and sending the message unit to the sending queue of the source process unit.
As an implementation manner, the encapsulating the message generated by the thread unit includes:
and according to the scale of the thread encapsulation packet corresponding to the second current time period, carrying out encapsulation processing on the message generated by the thread unit to generate the message unit.
As an implementation manner, before the encapsulating the message generated by the thread unit according to the size of the thread encapsulation packet corresponding to the second current time period and generating the message unit, the method further includes:
and determining the dimension of the thread encapsulation packet corresponding to the second current time period according to the number of the messages generated by the thread unit in the second historical time period.
As one implementation, the message unit includes a first message unit;
the generating the message unit by encapsulating the message generated by the thread unit according to the dimension of the thread encapsulation packet corresponding to the second current time period comprises:
and if the number of the messages of the same thread unit, which are generated by the thread unit, of the target thread unit is greater than or equal to the scale of the thread encapsulation packet corresponding to the second current time period, encapsulating the messages of the same thread unit, which are generated by the thread unit, according to the scale of the thread encapsulation packet, and generating a first message unit, wherein the number of the messages contained in the first message unit is the same as the scale of the thread encapsulation packet.
As an implementation manner, the message unit further includes a second message unit;
the method further comprises the following steps:
if the number of messages of which the target thread units generated by the thread units are the same thread unit is smaller than the scale of the thread encapsulation packet corresponding to the second current time period, determining whether the second waiting time of the earliest generated message in the messages of which the target thread units are the same thread unit is greater than or equal to a second preset time period, and if the second waiting time is greater than or equal to the second preset time period, performing encapsulation processing on the messages of which the target thread units are the same thread unit to generate a second message unit, wherein the second message unit comprises all the messages of which the target thread units generated by the thread units are the same thread unit.
As an implementation manner, the determining, according to the number of messages generated by the thread unit in the second historical time period, a size of a thread encapsulation packet corresponding to the second current time period includes:
acquiring a third number of messages sent by the first message unit and the second message unit in the second historical time period; and the number of the first and second groups,
acquiring a fourth number of messages sent by the second message unit in the second historical time period;
and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
As an implementation manner, the determining, according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period, the scale of the thread encapsulation packet corresponding to the second current time period includes:
and if the ratio is larger than a second preset threshold value, determining that the scale of the thread encapsulation packet corresponding to the second current time period is the product of the scale of the thread encapsulation packet corresponding to the second historical time period and a third coefficient, wherein the third coefficient is smaller than 1.
As an implementation manner, the method further comprises the following steps:
and if the ratio is smaller than or equal to the second preset threshold, determining that the scale of the thread encapsulation packet corresponding to the second current time period is the product of the scale of the thread encapsulation packet corresponding to the second historical time period and a fourth coefficient, wherein the fourth coefficient is larger than 1.
As an implementation manner, the second preset threshold is 0.5.
As an implementation manner, before the encapsulating the message generated by the thread unit according to the size of the thread encapsulation packet corresponding to the second current time period and generating the message unit, the method further includes:
determining that a destination thread unit of a message generated by the thread unit does not belong to the source process unit.
In another aspect, the present application provides a message transmission apparatus, including:
the packaging module is used for packaging the messages generated by the thread unit to generate a message unit, and the message unit comprises at least two messages;
and the sending module is used for sending the message unit to the sending queue of the source process unit.
As an implementation manner, the encapsulation module is specifically configured to encapsulate, according to a scale of a thread encapsulation packet corresponding to the second current time period, a message generated by a thread unit, and generate the message unit.
As an implementation manner, the method further comprises the following steps:
and the processing module is used for determining the scale of the thread encapsulation packet corresponding to the second current time period according to the number of the messages generated by the thread unit in the second historical time period.
As one implementation, the message unit includes a first message unit;
the encapsulation module is specifically configured to, if the number of messages of which the destination thread units generated by the thread units are the same thread unit is greater than or equal to the size of the thread encapsulation packet corresponding to the second current time period, encapsulate the messages of which the destination thread units are the same thread unit according to the size of the thread encapsulation packet, and generate a first message unit, where the number of messages included in the first message unit is the same as the size of the thread encapsulation packet.
As an implementation manner, the message unit further includes a second message unit;
the encapsulating module is further specifically configured to determine whether a second waiting time of an earliest message generated by the destination thread unit is greater than or equal to a second preset time period if the number of messages generated by the thread unit and generated by the destination thread unit is smaller than the size of the thread encapsulating packet corresponding to the second current time period, and perform encapsulation processing on the messages generated by the destination thread unit and generated by the same thread unit if the second waiting time is greater than or equal to the second preset time period, where the second message unit includes all the messages generated by the thread unit and generated by the same thread unit.
As an implementation manner, the processing module is specifically configured to obtain a third number of messages sent in the second historical time period through the first message unit and the second message unit; and acquiring a fourth number of messages sent by the second message unit in the second historical time period; and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
As an implementation manner, the processing module is specifically configured to determine, if the ratio is greater than a second preset threshold, that the scale of the thread encapsulation packet corresponding to the second current time period is a product of the scale of the thread encapsulation packet corresponding to the second historical time period and a third coefficient, where the third coefficient is smaller than 1.
As an implementation manner, the processing module is further specifically configured to determine, if the ratio is less than or equal to the second preset threshold, that the scale of the thread encapsulation packet corresponding to the second current time period is a product of the scale of the thread encapsulation packet corresponding to the second historical time period and a fourth coefficient, where the fourth coefficient is greater than 1.
As an implementation manner, the second preset threshold is 0.5.
As an implementation manner, the processing module is further specifically configured to determine that a destination thread unit of a message generated by the thread unit does not belong to the source process unit.
In another aspect, the present application provides a message transmission apparatus, including:
the processor is used for encapsulating the messages generated by the thread unit and generating a message unit, and the message unit comprises at least two messages;
a transmitter coupled to the processor, the transmitter to transmit the message unit to a transmit queue of the source process unit.
As an implementation manner, the processor is specifically configured to perform encapsulation processing on a message generated by a thread unit according to a size of a thread encapsulation packet corresponding to a second current time period, so as to generate the message unit.
As an implementation manner, the processor is further configured to determine, according to the number of messages generated by the thread unit in a second historical time period, a size of a thread encapsulation packet corresponding to the second current time period.
As one implementation, the message unit includes a first message unit;
the processor is specifically configured to, if the number of messages of which the destination thread units generated by the thread units are the same thread unit is greater than or equal to the size of the thread encapsulation packet corresponding to the second current time period, perform encapsulation processing on the messages of which the destination thread units are the same thread unit according to the size of the thread encapsulation packet, and generate a first message unit, where the number of messages included in the first message unit is the same as the size of the thread encapsulation packet.
As an implementation manner, the message unit further includes a second message unit;
the processor is further specifically configured to determine whether a second waiting time of an earliest message generated by the destination thread unit is greater than or equal to a second preset time period if the number of messages generated by the thread unit and generated by the destination thread unit is smaller than the size of the thread encapsulation packet corresponding to the second current time period, and perform encapsulation processing on the messages generated by the destination thread unit and generated by the same thread unit if the second waiting time is greater than or equal to the second preset time period, where the second message unit includes all the messages generated by the thread unit and generated by the same thread unit.
As an implementation manner, the processor is specifically configured to obtain a third number of messages sent in the second historical time period through the first message unit and the second message unit; and acquiring a fourth number of messages sent by the second message unit in the second historical time period; and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
As an implementation manner, the processor is specifically configured to determine, if the ratio is greater than a second preset threshold, that the scale of the thread encapsulation packet corresponding to the second current time period is a product of the scale of the thread encapsulation packet corresponding to the second historical time period and a third coefficient, where the third coefficient is smaller than 1.
As an implementation manner, the processor is further specifically configured to determine, if the ratio is less than or equal to the second preset threshold, that the scale of the thread encapsulation packet corresponding to the second current time period is a product of the scale of the thread encapsulation packet corresponding to the second historical time period and a fourth coefficient, where the fourth coefficient is greater than 1.
As an implementation manner, the second preset threshold is 0.5.
As one implementation, the processor is further specifically configured to determine that a destination thread unit of a message generated by the thread unit does not belong to the source process unit.
In yet another aspect, the present application provides a message transmission system, including:
the process unit comprises a source thread unit and a target thread unit;
the source thread unit is used for determining whether a target thread unit of the message generated by the source thread unit belongs to the same process unit;
and the source thread unit is also used for sending the message to a receiving queue of the destination thread unit if the destination thread unit of the message belongs to the same process unit.
In another aspect, the present application provides a message transmission method, including:
determining whether a destination thread unit of the generated message and a source thread unit belong to the same process unit;
and if the target thread unit and the source thread unit of the message belong to the same process unit, sending the message to a receiving queue of the target thread unit.
In another aspect, the present application provides a message transmission apparatus, including:
the processing module is used for determining whether a destination thread unit of the generated message and a source thread unit belong to the same process unit;
and the sending module is used for sending the message to a receiving queue of the destination thread unit if the destination thread unit and the source thread unit of the message belong to the same process unit.
In another aspect, the present application provides a message transmission apparatus, including:
a processor and a transmitter, the processor for determining whether a destination thread unit of a generated message belongs to the same process unit as a source thread unit;
the sender is coupled to the processor and is used for sending the message to a receiving queue of the destination thread unit if the destination thread unit and the source thread unit of the message belong to the same process unit.
According to the message transmission system, the message transmission method and the message transmission device, the frequency of sending the message unit to the sending queue of the source process unit according to the thread unit of the source process unit in the first historical time period is used for determining the scale of the process encapsulation packet corresponding to the first current time period of the source process unit, and the message unit in the sending queue of the source process unit is encapsulated according to the scale of the process encapsulation packet corresponding to the first current time period to generate the process encapsulation packet and send the process encapsulation packet, so that the message transmission is realized, the utilization rate of network resources is improved, and the transmission efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of the present application;
fig. 2 is a schematic structural diagram of a first embodiment of a message transmission system according to the present application;
fig. 3 is a flowchart illustrating a first embodiment of a message transmission method according to the present application;
fig. 4 is a flowchart illustrating a second message transmission method according to the present application;
fig. 5 is a flowchart illustrating a third embodiment of a message transmission method according to the present application;
fig. 6 is a schematic structural diagram of a first embodiment of a message transmission apparatus according to the present application;
fig. 7 is a schematic structural diagram of a second message transmission apparatus according to the present application;
fig. 8 is a schematic structural diagram of a second embodiment of the message transmission system of the present application;
fig. 9 is a flowchart illustrating a fourth message transmission method according to the present application;
fig. 10 is a schematic flowchart of a fifth embodiment of a message transmission method according to the present application;
fig. 11 is a flowchart illustrating a sixth embodiment of a message transmission method according to the present application;
fig. 12 is a flowchart illustrating a seventh embodiment of a message transmission method according to the present application;
fig. 13 is a schematic structural diagram of a third embodiment of a message transmission apparatus according to the present application;
fig. 14 is a schematic structural diagram of a fourth message transmission apparatus according to the present application;
fig. 15 is a schematic structural diagram of a third embodiment of the message transmission system of the present application;
fig. 16 is a schematic flowchart of an eighth message transmission method according to the present application;
fig. 17 is a schematic structural diagram of a fifth embodiment of a message transmission apparatus according to the present application;
fig. 18 is a schematic structural diagram of a sixth embodiment of a message transmission apparatus according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe XXX in embodiments of the present invention, these XXX should not be limited to these terms. These terms are only used to distinguish XXX from each other. For example, a first XXX may also be referred to as a second XXX, and similarly, a second XXX may also be referred to as a first XXX, without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The present application is applied to a scenario of performing message transmission between different thread units, where the scenario includes performing message transmission between different thread units of the same process unit, and performing message transmission between thread units of different process units, fig. 1 is a schematic diagram of an application scenario of the present application, and the application scenario includes a process unit a and a process unit B, where the process unit a includes a thread unit a1, a thread unit a2, and a thread unit A3, and the process unit B includes a thread unit B1, a thread unit B2, and a thread unit B3, and message transmission may be performed between each thread unit, for example: one situation is: and the other condition is that the message transmission is carried out between the thread unit A1 of the process unit A and the thread unit A2 of the process unit A.
The message unit described in this application may include one message or multiple messages, depending on whether the thread unit encapsulates a message before sending the message to the source process unit, and if the thread unit encapsulates a message before sending the message, the message unit generally includes two or more messages, and if the thread unit does not encapsulate a message before sending the message, the message unit refers to one message.
The process encapsulation packet described in the present application refers to an encapsulation packet generated after the process unit performs encapsulation processing.
For convenience of description, in the present application, parameters used in the encapsulation processing of the source process unit of the sending end and parameters used in the encapsulation processing of the thread unit of the source process unit are distinguished by the first and second methods.
For example: the parameters used in the encapsulation process of the source process unit include:
a first historical time period, a first current time period, a first waiting time, a first preset timing time, and/or the like.
The parameters used in the process of encapsulating the thread unit include:
a second historical time period, a second current time period, a second wait time, a second pre-set timing time, and/or the like.
This application includes but is not limited to the following major improvements:
1. when the source process unit packages the message in the sending queue, the dimension of the adopted process package is not fixed, but is determined according to the frequency of the message unit sent by the thread unit of the source process unit to the sending queue of the source process unit in the first historical time period, thereby the dimension of the process package is more reasonable, the idle time of a network channel is long when the dimension of the process package is excessively set, the bandwidth waste of the network channel is avoided when the dimension of the process package is excessively set, and the time of packaging processing is more, and a certain time delay is caused, therefore, the method determines the dimension of the process package more reasonable according to the frequency of the message unit sent by the thread unit of the source process unit to the sending queue of the source process unit in the historical time period, and can improve the utilization rate of network resources, and to improve transmission efficiency.
2. When the source process unit packages the messages in the sending queue, besides the packaging according to the scale of the process packaging packets, a first preset time is set, if the first waiting time of the message unit which enters the sending queue earliest in the message units of the same process unit in the sending queue of the source process unit is greater than or equal to the first preset time, the message unit of which the target process unit is the same process unit is packaged, and therefore the problem that the message sending time delay is long because the frequency of the message unit sent by the thread unit of the source process unit is unstable and the packaging cannot be carried out due to the fact that the number of the message units cannot meet the scale of the process packaging packets for a long time is solved.
3. Before the thread unit of the source process unit sends the message unit to the sending queue of the source process unit, the message can be encapsulated. When performing encapsulation processing, the size of the thread encapsulation packet may be fixed, or may be determined according to the number of messages generated in the second historical time period, which is not limited in the present invention.
4. When the thread unit of the source process unit encapsulates the generated message, besides the encapsulation according to the scale of the thread encapsulation packet, a second preset time is also set, and when the waiting time of the message generated earliest in the messages of which the target thread unit is the same thread unit is greater than or equal to the second preset time, the message of which the target thread unit is the same thread unit is encapsulated.
5. Before a thread unit of a source process unit packages and processes a generated message, whether a target thread unit of the message belongs to the source process unit is determined, if the target process unit of the message does not belong to the source process unit, the message is packaged and processed, a sending queue of the message unit sent to the source process unit is generated, and if the target process unit of the message belongs to the source process unit, the message is directly sent to a receiving queue of the target thread unit, namely, the message is not required to be sent to the sending queue of the process unit firstly, then sent to the receiving queue of the process unit through a network channel and then sent to the target thread unit, so that the message sending time delay is shortened, and the message transmission efficiency is improved.
The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a schematic structural diagram of a first embodiment of a message transmission system according to the present application, and as shown in fig. 2, the system according to the present embodiment includes a meta process unit and a destination process unit, where the source process unit includes at least one thread unit, and the source process unit is connected to the destination process unit; in fig. 2, the source process unit is illustrated as process a, the destination process unit is illustrated as process B, the source process unit includes at least one thread unit, illustrated as 3 thread units, which are respectively thread unit a1, thread unit a2, and thread unit A3; thread B may also include at least one thread unit, illustrated as thread unit B1, thread unit B2, and thread unit B3.
The method comprises the steps that a source process unit determines the scale of a process encapsulation packet corresponding to a first current time period of the source process unit according to the frequency of at least one thread unit sending a message unit to a sending queue of the source process unit in a first historical time period, wherein the message unit comprises at least one message; according to the scale of the process encapsulation packet corresponding to the first current time period, encapsulating the message units in the sending queue of the source process unit to generate a process encapsulation packet; and after the process encapsulation packet is generated, the process encapsulation packet is sent to a target process unit.
In the above embodiment, when the source process unit sends, according to the first historical time period, the frequency of the message unit to the sending queue of the source process unit by the at least one thread unit, specifically: if the number of the message units of which the destination process units in the sending queue of the source process unit are the destination process units is larger than or equal to the scale of the process encapsulation packet corresponding to the first current time period, the source process unit encapsulates the message units of which the destination process units are the destination process units according to the scale of the process encapsulation packet corresponding to the first current time period to generate a first process encapsulation packet, wherein the number of the message units contained in the first process encapsulation packet is the same as the scale of the process encapsulation packet corresponding to the first current time period.
In the above embodiment, when the source process unit sends, according to the first historical time period, the frequency of the message unit to the send queue of the source process unit by the at least one thread unit, the method further includes: if the number of the message units of which the destination process units in the sending queue of the source process unit are the destination process units is smaller than the scale of the process encapsulation packet corresponding to the first current time period, the source process unit determines whether the first waiting time of the message unit which enters the sending queue earliest in the message units of which the destination process units are the destination process units is greater than or equal to a first preset time period, if the first waiting time is greater than or equal to the first preset time period, the message units of which the destination process units are encapsulated, and a second process encapsulation packet is generated, wherein the second process encapsulation packet comprises all the message units of which the destination process units in the sending queue are the destination process units.
In the above embodiment, when the source process unit determines, according to the frequency of sending the message unit to the sending queue of the source process unit by the at least one thread unit in the first historical time period, the scale of the process encapsulation packet corresponding to the first current time period of the source process unit, specifically: the method comprises the steps that a source process unit obtains a first number of message units sent by a first process encapsulation packet and a second process encapsulation packet in a first historical time period; acquiring a second number of message units sent by a second process encapsulation packet in the first historical time period; and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
The source process unit in the message transmission system embodiment shown in fig. 2 may be specifically configured to execute the technical solution of the method embodiment shown in fig. 3 to 5, and the implementation principle and the technical effect thereof refer to the detailed description in the method embodiment shown in fig. 3 to 5, which is not described herein again.
Fig. 3 is a flowchart illustrating a first embodiment of a message transmission method according to the present application, as shown in fig. 2, the present embodiment is executed by a sending end, specifically, S301-303 are executed by a source process unit of the sending end, and the method according to the present embodiment is as follows:
s301: and determining the scale of the process encapsulation packet corresponding to the first current time period of the source process unit according to the frequency of sending the message unit to the sending queue of the source process unit by the thread unit of the source process unit in the first historical time period.
Wherein, the message unit comprises at least one message.
The first current time period refers to that the message units in the sending queue of the source process unit are packaged; the first historical time period refers to a time period prior to the first current time period.
Namely: according to the frequency of sending the message unit to the sending queue of the source process unit by the thread unit of the source process unit in the previous time period, the frequency of sending the message unit to the sending queue of the source process unit by the thread unit of the source process unit in the current time period can be estimated more reasonably, so that the scale of the process encapsulation packet corresponding to the first current time period of the source process unit is determined based on the frequency of sending the message unit to the sending queue of the source process unit by the thread unit of the source process unit in the first historical time period, and the determined scale of the process encapsulation packet is more reasonable. After the frequency of the message unit sent by the thread unit of the source process unit to the sending queue of the source process unit in the first historical time period is changed, the scale of the process encapsulation packet corresponding to the first current time period is also changed correspondingly, namely, the scale of the process encapsulation packet corresponding to the first current time period is changed along with the change of the frequency of the message unit sent by the thread unit of the source process unit to the sending queue of the source process unit in the first historical time period, so that the scale of the process encapsulation packet is set more reasonably.
S302: and according to the scale of the process encapsulation packet corresponding to the first current time period, encapsulating the message unit in the sending queue of the source process unit to generate the process encapsulation packet.
For example: and if the scale of the process encapsulation packet corresponding to the first current time period is 3 message units, acquiring 3 message units of which the target process units in the sending queue of the source process unit are the same process unit, and encapsulating to generate a process unit packet.
S303: and sending the process encapsulation packet.
And sending the encapsulation packet to a target process unit through a network channel between the process units so that the target process unit carries out corresponding decapsulation processing and sends the decapsulation packet to a corresponding target thread unit to complete message transmission.
In this embodiment, the method determines the scale of a process encapsulation packet corresponding to a first current time period of a source process unit according to the frequency of sending a message unit to a sending queue of the source process unit by a thread unit of the source process unit in the first historical time period, performs encapsulation processing on the message unit in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period to generate a process encapsulation packet, and sends the process encapsulation packet to implement message transmission, because the scale of the process encapsulation packet is determined according to the frequency of sending the message unit to the sending queue of the source process unit by the thread unit of the source process unit in the first historical time period, the setting of the scale of the process encapsulation packet is more reasonable, the idle time of a network channel is long when the scale of the process encapsulation packet is set to be too large, and the size of the process encapsulation packet is set to be too small, therefore, the method and the device determine the scale of the process encapsulation packet more reasonably according to the frequency of sending the message unit to the sending queue of the source process unit by the thread unit of the source process unit in the historical time period, can improve the utilization rate of network resources, and improve the transmission efficiency.
Fig. 4 is a flowchart of a second embodiment of the message transmission method of the present application, and this embodiment is a description of a possible implementation manner of S302 based on the embodiment shown in fig. 3, where the process unit may be triggered to perform encapsulation processing in two ways, where the first way is that the number of message units, in which a destination process unit in a sending queue of a source process unit is the same process unit, is greater than or equal to a scale of a process encapsulation packet corresponding to a first current time period, and the process unit is triggered to perform encapsulation processing. The second way is: and if the number of the message units of which the destination process units are the same process unit in the sending queue of the source process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, but the first waiting time of the message unit which enters the sending queue earliest in the message units of the same process unit is greater than or equal to the first preset time, triggering the process units to carry out message encapsulation processing. For convenience of description, a process encapsulation packet generated by performing encapsulation processing in a first manner is described as a "first process encapsulation packet", and a process encapsulation packet generated by performing encapsulation processing in a second manner is described as a "second process encapsulation packet", as shown in fig. 4, this embodiment is as follows:
s401: and judging whether the number of the message units of which the target process units are the same process unit in the sending queue of the source process unit is larger than or equal to the scale of the process encapsulation packet corresponding to the first current time period or not.
If the number of the message units of which the destination process units are the same process unit in the sending queue of the source process unit is greater than or equal to the scale of the process encapsulation packet corresponding to the first current time period, S402 is executed.
If the number of the message units of which the destination process units are the same process unit in the sending queue of the source process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, S403 is executed.
S402: and according to the scale of the process encapsulation packet corresponding to the first current time period, encapsulating the message units of which the target process units are the same process unit to generate a first process encapsulation packet.
And the number of the message units contained in the first process encapsulation packet is the same as the scale of the process encapsulation packet corresponding to the first current time period.
Namely: and triggering the process unit to carry out encapsulation processing through a first mode.
S403: and determining whether the first waiting time of the message unit which enters the sending queue earliest in the message units of the same process unit is greater than or equal to a first preset time or not.
If the first waiting time is greater than or equal to the first preset timing time, S404 is executed.
And if the first waiting time is less than the first preset timing time, returning to execute the step S401.
The first preset time may be set according to an empirical value. The first waiting time is monitored by a special thread unit (described as a timing thread unit), and when the first waiting time is greater than or equal to a first preset timing time, the timing thread unit sends an indication message to the source process unit to trigger the source process unit to perform encapsulation processing.
S404: and encapsulating the message unit of which the target process unit is the same process unit to generate a second process encapsulation packet.
And the second process encapsulation packet comprises all the message units of which the target process units in the sending queue are the same process unit.
Namely: the encapsulation process is triggered by the second way.
In this embodiment, two ways are used to trigger the process units to perform encapsulation processing, and when the number of message units of which the destination process units are the same process unit in the sending queue of the source process unit is greater than or equal to the size of the process encapsulation packet corresponding to the first current time period, the message units of which the destination process units are the same process unit are triggered to perform encapsulation processing according to the size of the process encapsulation packet corresponding to the first current time period; and when the number of the message units of which the destination process units are the same process unit in the sending queue of the source process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, but the first waiting time of the message unit of which the destination process unit is the earliest entering the sending queue in the message units of the same process unit is greater than or equal to the first preset time, triggering to carry out message encapsulation processing. Therefore, the problem that when the frequency of sending the message unit by the thread unit of the source process unit is unstable, the message unit cannot be packaged due to the fact that the number of the message units cannot meet the scale of the process package packet for a long time, and the message sending time delay is long is solved.
Fig. 5 is a flowchart illustrating a third embodiment of the message transmission method of the present application, where this embodiment is a description of a possible implementation manner of S301 based on the second embodiment, as shown in fig. 5:
s501: a first number of message units sent by a first process encapsulation packet and a second process encapsulation packet in a first historical time period is obtained.
S502: and acquiring a second number of message units sent by a second process encapsulation packet in the first historical time period.
The execution order of S501 and S502 is not limited.
S503: and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
Through the ratio of the second quantity to the first quantity, the variation trend of the frequency of the message unit sent by the thread unit of the source process unit to the sending queue of the source process unit in the first historical time period can be known, the first preset threshold is usually set to 0.5, if the ratio is greater than the first preset threshold, the frequency of the message unit sent by the thread unit to the sending queue of the source process unit is reduced, most of messages are triggered to be packaged through the second mode, and therefore the size of the process packaging packet needs to be reduced. If the ratio is greater than 0.5, it means that the frequency of sending the message unit to the sending queue of the source process unit by the thread unit becomes fast, and most messages are triggered to be encapsulated in the first way, so the size of the process encapsulation packet needs to be increased.
When the size of the process encapsulation packet is to be reduced, the size of the process encapsulation packet corresponding to the first historical time period is ensured to be larger than 1.
Specifically, two possible implementations are included, but not limited to:
one possible implementation:
and if the ratio is larger than a first preset threshold value, determining that the scale of the process encapsulation packet corresponding to the first current time period is the product of the scale of the process encapsulation packet corresponding to the first historical time period and a first coefficient, wherein the first coefficient is smaller than 1. Even if the scale of the process encapsulation packet corresponding to the first current time period is smaller than the scale of the process encapsulation packet corresponding to the first historical time period.
Another possible implementation:
and if the ratio is smaller than or equal to a first preset threshold value, determining that the scale of the process encapsulation packet corresponding to the first current time period is the product of the scale of the process encapsulation packet corresponding to the first historical time period and a second coefficient, wherein the second coefficient is larger than 1. Even if the size of the process encapsulation packet corresponding to the first current time period is smaller than the size of the process encapsulation packet corresponding to the first historical time period.
One possible obtaining manner of the second coefficient is as follows:
and determining that the ratio of the first quantity to a third quantity is a second coefficient, wherein the third quantity is the quantity of the message units sent by the first process encapsulation packet and the second process encapsulation packet in the previous time period of the first historical time period.
In this embodiment, the scale of the process encapsulation packet corresponding to the first current time period is determined by obtaining the first number of the message units sent by the first process encapsulation packet and the second process encapsulation packet in the first historical time period, obtaining the second number of the message units sent by the second process encapsulation packet in the first historical time period, and according to the ratio of the second number to the first number and the scale of the process encapsulation packet corresponding to the first historical time period. Therefore, the dimension setting of the process encapsulation package is more reasonable.
Fig. 6 is a schematic structural diagram of a first embodiment of a message transmission apparatus according to the present application, where the apparatus according to this embodiment includes a processing module 601, an encapsulating module 602, and a sending module 603, where the processing module 601 is configured to determine a scale of a process encapsulation packet corresponding to a first current time period of a source process unit according to a frequency that a thread unit of the source process unit sends a message unit to a sending queue of the source process unit in a first historical time period, where the message unit includes at least one message; the encapsulating module 602 is configured to encapsulate, according to a scale of a process encapsulation packet corresponding to a first current time period, a message unit in a transmission queue of a source process unit, and generate a process encapsulation packet; the sending module 603 is configured to send a process encapsulation packet.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the first embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 6, the process encapsulation packet includes: a first process encapsulates the packet;
the encapsulating module 602 is specifically configured to, if the number of the message units of which the destination process units in the sending queue of the source process unit are the same process unit is greater than or equal to the size of the process encapsulation packet corresponding to the first current time period, perform encapsulation processing on the message units of which the destination process units are the same process unit according to the size of the process encapsulation packet corresponding to the first current time period, and generate a first process encapsulation packet, where the number of the message units included in the first process encapsulation packet is the same as the size of the process encapsulation packet corresponding to the first current time period.
In fig. 6, the process encapsulation package further includes: packaging the packet by the second process;
the encapsulating module 602 is further specifically configured to determine whether a first waiting time of a message unit, which enters the sending queue earliest, in the message units of the same process unit as the destination process unit is greater than or equal to a first preset time if the number of the message units of the same process unit as the destination process unit in the sending queue of the source process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, and if the first waiting time is greater than or equal to the first preset time, perform encapsulation processing on the message unit of the same process unit as the destination process unit to generate a second process encapsulation packet, where the second process encapsulation packet includes all the message units of the same process unit as the destination process unit in the sending queue.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the second embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 6, a processing module 601 is specifically configured to obtain a first number of message units sent by a first process encapsulation packet and a second process encapsulation packet in a first history time period; acquiring a second number of message units sent by a second process encapsulation packet in the first historical time period; and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
The processing module 601 is specifically configured to determine that the scale of the process encapsulation packet corresponding to the first current time period is a product of the scale of the process encapsulation packet corresponding to the first historical time period and a first coefficient if the ratio is greater than a first preset threshold, where the first coefficient is smaller than 1.
The processing module 601 is further specifically configured to determine that the scale of the process encapsulation packet corresponding to the first current time period is a product of the scale of the process encapsulation packet corresponding to the first historical time period and a second coefficient if the ratio is smaller than or equal to a first preset threshold, where the second coefficient is greater than 1.
The processing module 601 is further configured to determine that a ratio of the first number to a third number is a second coefficient, where the third number is the number of the message units sent by the first process encapsulation packet and the second process encapsulation packet in a previous time period of the first historical time period.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the third embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
Fig. 7 is a schematic structural diagram of a second embodiment of a message transmission apparatus according to the present application, where the apparatus includes a processor 701 and a transmitter 702, where the processor 701 is configured to determine a size of a process encapsulation packet corresponding to a first current time period of a source process unit according to a frequency that a thread unit of the source process unit sends a message unit to a transmission queue of the source process unit in a first historical time period, where the message unit includes at least one message; the processor 701 is further configured to perform encapsulation processing on the message units in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period, and generate a process encapsulation packet; a transmitter 702 is coupled to the processor for transmitting the process encapsulation packet.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the first embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 7, the process encapsulation packet includes: a first process encapsulates the packet;
the processor 701 is specifically configured to, if the number of message units of which the destination process units in the sending queue of the source process unit are the same process unit is greater than or equal to the size of the process encapsulation packet corresponding to the first current time period, perform encapsulation processing on the message units of which the destination process units are the same process unit according to the size of the process encapsulation packet corresponding to the first current time period, and generate a first process encapsulation packet, where the number of message units included in the first process encapsulation packet is the same as the size of the process encapsulation packet corresponding to the first current time period.
In fig. 7, the process encapsulation package further includes: packaging the packet by the second process;
the processor 701 is further specifically configured to determine whether a first waiting time of a message unit, which enters the transmission queue earliest, in the message units of the same process unit as the destination process unit is greater than or equal to a first preset time if the number of the message units of the same process unit as the destination process unit in the transmission queue of the source process unit is smaller than a scale of a process encapsulation packet corresponding to the first current time period, and perform encapsulation processing on the message unit of the same process unit as the destination process unit to generate a second process encapsulation packet if the first waiting time is greater than or equal to the first preset time, where the second process encapsulation packet includes all the message units of the same process unit as the destination process unit in the transmission queue.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the second embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 7, a processor 701 is specifically configured to obtain a first number of message units sent by a first process encapsulation packet and a second process encapsulation packet in a first historical time period; acquiring a second number of message units sent by a second process encapsulation packet in the first historical time period; and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
The processor 701 is specifically configured to determine, if the ratio is greater than a first preset threshold, that the scale of the process encapsulation packet corresponding to the first current time period is a product of the scale of the process encapsulation packet corresponding to the first historical time period and a first coefficient, where the first coefficient is smaller than 1.
The processor 701 is further specifically configured to determine that the scale of the process encapsulation packet corresponding to the first current time period is a product of the scale of the process encapsulation packet corresponding to the first historical time period and a second coefficient if the ratio is smaller than or equal to a first preset threshold, where the second coefficient is greater than 1.
The processor 701 is further configured to determine that a ratio of the first number to a third number is a second coefficient, where the third number is the number of the message units sent by the first process encapsulation packet and the second process encapsulation packet in a previous time period of the first historical time period.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the third embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
Fig. 8 is a schematic structural diagram of a second embodiment of a message transmission system according to the present application, where the system includes a source process unit, where the source process unit includes at least one thread unit, as shown in fig. 8, where the source process unit is shown as a process unit a in fig. 8, and at least one thread unit is shown as a thread unit a1, a thread unit a2, and a thread unit A3, where the thread unit encapsulates messages generated by the thread unit to generate a message unit, and the message unit includes at least two messages; and the thread unit sends the message unit to the sending queue of the source process unit.
In the above embodiment, the thread unit encapsulates the message generated by the thread unit to generate the message unit, which specifically includes: the thread unit encapsulates the message generated by the thread unit according to the scale of the thread encapsulation packet corresponding to the second current time period to generate a message unit;
in the above embodiment, the thread unit performs encapsulation processing on the message generated by the thread unit, and before the message unit is generated, the thread unit determines the size of the thread encapsulation packet corresponding to the second current time period according to the number of the messages generated by the thread unit in the second historical time period.
In the above embodiment, the thread unit performs encapsulation processing on the message generated by the thread unit according to the size of the thread encapsulation packet corresponding to the second current time period, and when the message unit is generated, the specific steps are as follows:
the thread unit is specifically configured to, if the number of messages of which the destination thread units are the same thread unit and which are generated by the thread unit is greater than or equal to the size of the thread encapsulation packet corresponding to the second current time period, perform encapsulation processing on the messages of which the destination thread units are the same thread unit according to the size of the thread encapsulation packet to generate a first message unit, where the number of messages included in the first message unit is the same as the size of the thread encapsulation packet.
In the above embodiment, the thread unit performs encapsulation processing on the message generated by the thread unit according to the size of the thread encapsulation packet corresponding to the second current time period, and when the message unit is generated, the specific steps are as follows:
the thread unit is further specifically configured to determine whether a second waiting time of an earliest message generated by the destination thread unit in the messages of the same thread unit is greater than or equal to a second preset time if the number of the messages of the same thread unit generated by the thread unit is smaller than a scale of a thread encapsulation packet corresponding to a second current time period, and perform encapsulation processing on the messages of the same thread unit generated by the destination thread unit if the second waiting time is greater than or equal to the second preset time to generate a second message unit, where the second message unit includes all the messages of the same thread unit generated by the thread unit.
In the above embodiment, when the thread unit determines the scale of the thread encapsulation packet corresponding to the second current time period according to the number of messages generated by the thread unit in the second historical time period, the specific steps are as follows:
the thread unit is specifically configured to obtain a third number of messages sent by the first message unit and the second message unit in a second historical time period; and acquiring a fourth number of messages sent by the second message unit in a second historical time period; and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
The source process unit in the message transmission system embodiment shown in fig. 8 may be specifically configured to execute the technical solution of the method embodiment shown in fig. 9 to 12, and the implementation principle and the technical effect thereof refer to the detailed description in the method embodiment shown in fig. 9 to 12, which is not described herein again.
Fig. 9 is a flowchart illustrating a fourth embodiment of the message transmission method according to the present application, where the embodiment is executed by a thread unit at a sending end, and a technical solution corresponding to the embodiment may be executed independently, or may be executed on the basis of the foregoing embodiments in combination with the foregoing embodiments: as follows:
s901: and encapsulating the message generated by the thread unit to generate a message unit.
Wherein the message unit comprises at least two messages.
The size of the thread encapsulation packet used for encapsulating the message generated by the thread unit may be fixed or dynamically determined according to the number of the messages generated by the thread unit in the second historical time period, which is not limited in the present application.
S902: and sending the message unit to a sending queue of the source process unit.
In this embodiment, the message generated by the thread unit is encapsulated by the thread unit to generate a message unit, and the message unit is sent to the sending queue of the source process unit.
EXAMPLE five
Fig. 10 is a schematic flowchart of a fifth embodiment of a message transmission method in the present application, where on the basis of the embodiment shown in fig. 9, further before executing S901, the present embodiment further includes:
s1000: and determining the dimension of the thread encapsulation packet corresponding to the second current time period according to the number of the messages generated by the thread unit in the second historical time period.
In this embodiment, the scale of the thread encapsulation packet corresponding to the second current time period is determined according to the number of messages generated by the thread unit in the second historical time period, so that the scale of the thread encapsulation packet is more reasonable.
EXAMPLE six
Fig. 11 is a schematic flow chart of a sixth embodiment of the message transmission method of the present application, and this embodiment is a description of a possible implementation manner of S901 further on the basis of the fifth embodiment or the sixth embodiment, where,
the first mode is that the number of messages of which the target thread units are the same thread unit and generated by the thread unit is greater than or equal to the scale of thread encapsulation packets corresponding to the second current time period, the thread unit is triggered to carry out encapsulation processing. The second way is: and if the number of the messages of the same thread unit, which are generated by the thread unit, is less than the scale of the thread encapsulation packet corresponding to the second current time period, but the second waiting time of the earliest generated message in the messages of the same thread unit, which are generated by the target thread unit, is greater than or equal to the second preset time period, the thread unit is triggered to carry out message encapsulation processing. For convenience of description, a message unit generated by triggering the thread unit to perform the encapsulation processing in the first manner is described as a "first message unit", and a message unit generated by triggering the thread unit to perform the encapsulation processing in the second manner is described as a "second message unit", as shown in fig. 11, the present embodiment is as follows:
s1101: and judging whether the number of the messages of the same thread unit, which are generated by the thread unit and are of the target thread unit, is larger than or equal to the scale of the thread encapsulation packet corresponding to the second current time period.
If the number of the messages of the same thread unit, which is the destination thread unit generated by the thread unit, is greater than or equal to the size of the thread encapsulation packet corresponding to the second current time period, S1102 is executed.
If the number of messages of which the destination thread unit generated by the thread unit is the same thread unit is smaller than the size of the thread encapsulation packet corresponding to the second current time period, S1103 is executed.
S1102: and according to the scale of the thread encapsulation packet, carrying out encapsulation processing on the messages of which the target thread units are the same thread unit to generate a first message unit.
And the number of the messages contained in the first message unit is the same as the scale of the thread encapsulation packet.
Namely: and triggering the thread unit to carry out encapsulation processing in a first mode.
S1103: and determining whether the second waiting time of the earliest generated message in the messages of which the destination thread unit is the same thread unit is greater than or equal to a second preset time.
If the second waiting time is greater than or equal to the second preset timing time, S1104 is executed.
And if the second waiting time is less than the second preset timing time, returning to execute the step S1101.
Wherein the second preset time may be set according to an empirical value. The second waiting time is monitored by a special thread unit (described as a timing thread unit), and when the second waiting time is greater than or equal to a second preset timing time, the timing thread unit sends an indication message to the thread unit generating the message, and triggers the thread unit generating the message to perform encapsulation processing.
S1104: and encapsulating the message of which the target thread unit is the same thread unit to generate a second message unit.
The second message unit comprises all messages of which the destination thread units generated by the thread units are the same thread unit.
Namely: and triggering the thread unit to carry out encapsulation processing through a second mode.
In this embodiment: triggering the thread units to perform encapsulation processing in two ways, and triggering the message of which the target thread unit is the same thread unit according to the scale of the thread encapsulation packet when the number of the messages of which the target thread unit is the same thread unit generated by the thread units is larger than or equal to the scale of the thread encapsulation packet corresponding to the second current time period, so as to generate a first message unit; when the number of messages of which the target thread units are the same thread unit and which are generated by the thread unit is smaller than the scale of the thread encapsulation packet corresponding to the second current time period, but whether the second waiting time of the earliest generated message in the messages of which the target thread units are the same thread unit is larger than or equal to the second preset time period or not, the thread unit is triggered to encapsulate the messages of which the target thread units are the same thread unit to generate a second message unit, so that the problem that the message sending time delay is long because the message number cannot meet the scale of the thread encapsulation packet for a long time and the encapsulation processing cannot be performed when the frequency of the messages generated by the thread units is unstable is solved.
EXAMPLE seven
Fig. 12 is a flowchart of a seventh embodiment of the message transmission method of the present application, where this embodiment is based on the sixth embodiment, and further describes a possible implementation manner of S1000, as shown in fig. 12:
s1201: a third number of messages sent in a second historical time period by the first message unit and the second message unit is obtained.
S1202: a fourth number of messages sent by the second message unit in the second historical time period is obtained.
The execution order of S1201 and S1202 is not limited.
S1203: and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
The change trend of the frequency of the messages generated by the thread unit in the second historical time period can be obtained through the ratio of the fourth quantity to the third quantity, the second preset threshold is usually set to be 0.5, if the ratio is greater than the second preset threshold, the frequency of the messages generated by the thread unit is slow, most of the messages are triggered to be packaged by the thread unit through the second mode, and therefore the size of the thread packaging packet needs to be reduced. If the ratio is greater than 0.5, it means that the frequency of generating messages by the thread unit is fast, and most of the messages are triggered by the thread unit to be encapsulated in the first way, so the size of the thread encapsulation packet is increased.
When the size of the thread encapsulation packet is to be reduced, the size of the thread encapsulation packet corresponding to the second historical time period is ensured to be larger than 1.
Specifically, two possible implementations are included, but not limited to:
one possible implementation:
and if the ratio is larger than a second preset threshold value, determining that the scale of the thread encapsulation packet corresponding to the second current time period is the product of the scale of the thread encapsulation packet corresponding to the second historical time period and a third coefficient, wherein the third coefficient is smaller than 1. Even if the dimension of the thread encapsulation packet corresponding to the second current time period is smaller than the dimension of the process encapsulation packet corresponding to the second historical time period.
Another possible implementation:
and if the ratio is smaller than or equal to a second preset threshold, determining that the scale of the thread encapsulation packet corresponding to the second current time period is the product of the scale of the thread encapsulation packet corresponding to the second historical time period and a fourth coefficient, wherein the fourth coefficient is larger than 1. Even if the size of the process encapsulation packet corresponding to the second current time period is smaller than the size of the process encapsulation packet corresponding to the second historical time period.
In this embodiment, by obtaining the third number of messages sent by the first message unit and the second message unit in the second historical time period, and obtaining the fourth number of messages sent by the second message unit in the second historical time period, and according to the ratio of the fourth number to the third number and the scale of the thread encapsulation packet corresponding to the second historical time period, the scale of the thread encapsulation packet corresponding to the second current time period is determined, so that the scale of the thread encapsulation packet is set more reasonably.
Fig. 13 is a schematic structural diagram of a third embodiment of a message transmission apparatus in the present application, where the apparatus in this embodiment includes an encapsulation module 1301 and a sending module 1302, where the encapsulation module 1301 is configured to perform encapsulation processing on a message generated by a thread unit to generate a message unit, where the message unit includes at least two messages; the sending module 1302 is configured to send the message unit to a sending queue of the source process unit.
The apparatus of this embodiment may be correspondingly configured to implement the technical solution shown in the fourth embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 13, an encapsulating module 1301 is specifically configured to encapsulate, according to a scale of a thread encapsulation packet corresponding to the second current time period, a message generated by a thread unit, and generate a message unit. Further comprising: the processing module 1303 is configured to determine, according to the number of messages generated by the thread unit in the second historical time period, a size of a thread encapsulation packet corresponding to the second current time period.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the fifth embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 13, the message unit includes a first message unit;
the encapsulating module 1301 is specifically configured to, if the number of the messages of the same destination thread unit generated by the thread unit is greater than or equal to the size of the thread encapsulation packet corresponding to the second current time period, encapsulate the messages of the same destination thread unit according to the size of the thread encapsulation packet, and generate a first message unit, where the number of the messages included in the first message unit is the same as the size of the thread encapsulation packet.
In fig. 13, the message unit further includes a second message unit;
the encapsulating module 1301 is further specifically configured to determine whether a second waiting time of a message, which is earliest generated in the messages of the same thread unit, of the destination thread unit is greater than or equal to a second preset time if the number of the messages of the same thread unit, generated by the thread unit, of the destination thread unit is smaller than a scale of a thread encapsulating packet corresponding to a second current time period, and perform encapsulation processing on the messages of the same thread unit of the destination thread unit to generate a second message unit if the second waiting time is greater than or equal to the second preset time, where the second message unit includes all the messages of the same thread unit, generated by the thread unit, of the destination thread unit.
The apparatus of this embodiment may be correspondingly configured to implement the technical solution shown in the sixth embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 13, the processing module 1303 is specifically configured to obtain a third number of messages sent in the second history time period through the first message unit and the second message unit; and acquiring a fourth number of messages sent by the second message unit in a second historical time period; and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
The processing module 1303 is specifically configured to determine that the scale of the thread encapsulation packet corresponding to the second current time period is a product of the scale of the thread encapsulation packet corresponding to the second historical time period and a third coefficient if the ratio is greater than a second preset threshold, where the third coefficient is smaller than 1.
The processing module 1303 is further specifically configured to determine that the scale of the thread encapsulation packet corresponding to the second current time period is a product of the scale of the thread encapsulation packet corresponding to the second historical time period and a fourth coefficient if the ratio is smaller than or equal to a second preset threshold, where the fourth coefficient is greater than 1.
The apparatus of this embodiment may be correspondingly configured to implement the technical solution shown in the seventh embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
Fig. 14 is a schematic structural diagram of a fourth embodiment of a message transmission apparatus according to the present application, where the apparatus according to the present embodiment includes a processor 1401 and a transmitter 1402, where the processor 1401 is configured to perform encapsulation processing on a message generated by a thread unit to generate a message unit, where the message unit includes at least two messages; coupled to the processor is a sender 1402 for sending a message unit to a send queue of a source process unit.
The apparatus of this embodiment may be correspondingly configured to implement the technical solution shown in the fourth embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 14, a processor 1401 is specifically configured to perform encapsulation processing on a message generated by a thread unit according to a size of a thread encapsulation packet corresponding to a second current time period, so as to generate a message unit.
In fig. 14, the processor 1401 is further configured to determine, according to the number of messages generated by the thread unit in the second historical time period, a size of the thread encapsulation packet corresponding to the second current time period.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the fifth embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 14, the message unit includes a first message unit;
the processor 1401 is specifically configured to, if the number of messages of which the destination thread units are the same thread unit and which are generated by the thread unit is greater than or equal to the size of the thread encapsulation packet corresponding to the second current time period, perform encapsulation processing on the messages of which the destination thread units are the same thread unit according to the size of the thread encapsulation packet, and generate a first message unit, where the number of messages included in the first message unit is the same as the size of the thread encapsulation packet.
In fig. 14, the message unit further includes a second message unit;
the processor 1401 is further specifically configured to, if the number of messages of which the destination thread units generated by the thread units are the same thread unit is smaller than the size of the thread encapsulation packet corresponding to the second current time period, determine whether a second waiting time of a message, which is earliest generated in the messages of which the destination thread units are the same thread unit, is greater than or equal to a second preset time period, and if the second waiting time is greater than or equal to the second preset time period, perform encapsulation processing on the messages of which the destination thread units are the same thread unit to generate a second message unit, where the second message unit includes all the messages of which the destination thread units generated by the thread units are the same thread unit.
The apparatus of this embodiment may be correspondingly configured to implement the technical solution shown in the sixth embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
In fig. 14, a processor 1401 is specifically configured to obtain a third number of messages sent in a second history time period through a first message unit and a second message unit; and acquiring a fourth number of messages sent by the second message unit in a second historical time period; and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
In fig. 14, the processor 1401 is specifically configured to determine, if the ratio is greater than a second preset threshold, that the scale of the thread encapsulation packet corresponding to the second current time period is a product of the scale of the thread encapsulation packet corresponding to the second historical time period and a third coefficient, where the third coefficient is smaller than 1.
In fig. 14, the processor 1401 is further specifically configured to determine, if the ratio is smaller than or equal to a second preset threshold, that the scale of the thread encapsulation packet corresponding to the second current time period is a product of the scale of the thread encapsulation packet corresponding to the second historical time period and a fourth coefficient, where the fourth coefficient is greater than 1.
The apparatus of this embodiment may be correspondingly configured to implement the technical solution shown in the seventh embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
Fig. 15 is a schematic structural diagram of a third embodiment of a message transmission system according to the present application, and as shown in fig. 15, the system includes a process unit, where the process unit includes a source thread unit and a destination thread unit; in FIG. 15, the process cell is shown as process cell A, the source thread cell is shown as thread cell A1, and the destination thread cell is shown as thread cell A2; the source thread unit determines whether a target thread unit of the message generated by the source thread unit belongs to the same process unit; and if the target thread unit of the message belongs to the same process unit, the source thread unit sends the message to the receiving queue of the target thread unit.
The source process unit in the message transmission system embodiment shown in fig. 15 may be specifically configured to execute the technical solution of the method embodiment shown in fig. 16, and its implementation principle and technical effect refer to the detailed description in the method embodiment shown in fig. 16, which are not described herein again.
Fig. 16 is a schematic flow chart of an eighth embodiment of the message transmission method of the present application, where the technical solution corresponding to this embodiment may be executed independently, or may be executed on the basis of the foregoing embodiments in combination with the foregoing embodiments, specifically as follows:
and S1601, the source thread unit determines whether a destination thread unit of the generated message and the source thread unit belong to the same process unit.
In connection with fig. 1, for example: the source thread unit is thread unit A1, the destination thread unit of the generated message is thread unit A2 or thread unit A3, and the destination thread unit of the generated message and the source thread unit belong to the same process unit.
For another example: the source thread unit is thread unit A1, the destination thread unit of the generated message is thread unit B1, thread unit B2 or thread unit B3, and the destination thread unit of the generated message and the source thread unit are not considered to belong to the same process unit.
If the destination thread unit of the message generated by the thread unit belongs to the source thread unit, S1602 is executed.
S1602: the source thread unit sends a message to the receive queue of the destination thread unit.
Namely: the message is transmitted from one thread unit to another thread unit directly inside the process unit without being transmitted to the transmitting queue of the process unit and then transmitted to the receiving queue of the process unit through a network channel and then transmitted to the target thread unit, thereby shortening the time delay of message transmission.
For example: the destination thread unit for the message generated by thread unit A1 in FIG. 1 is thread unit A2, and the message is sent from thread unit A1 to the receive queue of thread unit A2 directly within process unit A.
In this embodiment, by determining whether the destination thread unit of the message generated by the thread unit belongs to the source thread unit, and when the destination thread unit of the message generated by the thread unit belongs to the source thread unit, the message is directly sent to the receive queue of the destination thread unit, so that the message sending delay is shortened, and the message transmission efficiency is improved.
Fig. 17 is a schematic structural diagram of a fifth embodiment of the message transmission apparatus according to the present application, where the apparatus according to the present embodiment includes a processing module 1701 and a sending module 1702, where the processing module 1701 is configured to determine whether a destination thread unit of a generated message belongs to the same process unit as a source thread unit; the sending module 1702 is configured to send the message to a receive queue of the destination thread unit if the destination thread unit and the source thread unit of the message belong to the same process unit.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the eighth embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
Fig. 18 is a schematic structural diagram of a sixth embodiment of a message transmission apparatus according to the present application, where the apparatus according to the present embodiment includes a processor 1801 and a transmitter 1802, where the processor 1801 is configured to determine whether a destination thread unit of a generated message and a source thread unit belong to the same process unit; a transmitter 1802 is coupled to the processor 1801, the transmitter 1802 configured to transmit a message to a receive queue of a destination thread unit if the destination thread unit and the source thread unit of the message belong to the same process unit.
The apparatus of this embodiment may be correspondingly used to implement the technical solution shown in the eighth embodiment of the message transmission method, which has similar implementation principles and technical effects and is not described herein again.
The present application may also provide a processor-readable storage medium, in which program instructions are stored, and the program instructions are configured to enable a processor to execute all or part of the steps in the first to eighth embodiments of the message transmission method. The readable storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk, or any combination thereof
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.
Claims (30)
1. A message transmission system, comprising:
the system comprises a source process unit and a target process unit, wherein the source process unit comprises at least one thread unit, and the source process unit is connected with the target process unit;
the source process unit is configured to determine, according to a frequency that the at least one thread unit sends a message unit to a sending queue of the source process unit in a first historical time period, a size of a process encapsulation packet corresponding to a first current time period of the source process unit, where the message unit includes at least one message;
the source process unit is further configured to perform encapsulation processing on the message units in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period, so as to generate a process encapsulation packet;
the source process unit is further configured to send the process encapsulation packet to the destination process unit.
2. The system according to claim 1, wherein the source process unit is specifically configured to, if the number of message units, of which destination process units in the transmission queue of the source process unit are the same process unit, is greater than or equal to the size of the process encapsulation packet corresponding to the first current time period, perform encapsulation processing on the message units, of which destination process units are the same process unit, according to the size of the process encapsulation packet corresponding to the first current time period, and generate a first process encapsulation packet, where the number of message units included in the first process encapsulation packet is the same as the size of the process encapsulation packet corresponding to the first current time period.
3. The system according to claim 2, wherein the source process unit is further specifically configured to determine whether a first waiting time of a message unit that enters the transmission queue earliest in the message units that are the same process unit is greater than or equal to a first preset time if the number of the message units that are the same process unit in the transmission queue of the source process unit is smaller than the size of the process encapsulation packet corresponding to the first current time period, and perform encapsulation processing on the message unit that is the same process unit that is the destination process unit if the first waiting time is greater than or equal to the first preset time to generate a second process encapsulation packet, where the second process encapsulation packet includes all the message units that are the same process unit in the transmission queue.
4. The system of claim 3, wherein the source process unit is specifically configured to obtain a first number of message units sent via the first process encapsulation packet and the second process encapsulation packet within the first historical time period; acquiring a second number of message units sent by the second process encapsulation packet in the first historical time period; and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
5. A method for message transmission, comprising:
determining the scale of a process encapsulation packet corresponding to a first current time period of a source process unit according to the frequency of sending a message unit to a sending queue of the source process unit by a thread unit of the source process unit in a first historical time period, wherein the message unit comprises at least one message;
according to the scale of the process encapsulation packet corresponding to the first current time period, encapsulating the message units in the sending queue of the source process unit to generate a process encapsulation packet;
and sending the process encapsulation packet.
6. The method of claim 5, wherein encapsulating the packet with the process comprises: a first process encapsulates the packet;
the encapsulating the message unit in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period to generate the process encapsulation packet includes:
if the number of the message units of which the destination process units in the sending queue of the source process unit are the same process unit is larger than or equal to the scale of the process encapsulation packet corresponding to the first current time period, performing encapsulation processing on the message units of which the destination process units are the same process unit according to the scale of the process encapsulation packet corresponding to the first current time period to generate a first process encapsulation packet, wherein the number of the message units contained in the first process encapsulation packet is the same as the scale of the process encapsulation packet corresponding to the first current time period.
7. The method of claim 6, wherein encapsulating the packet with the process further comprises: packaging the packet by the second process;
the method further comprises the following steps:
if the number of the message units of which the destination process units in the sending queue of the source process unit are the same process unit is smaller than the scale of the process encapsulation packet corresponding to the first current time period, determining whether the first waiting time of the message unit which enters the sending queue earliest in the message units of which the destination process unit is the same process unit is greater than or equal to a first preset time period, if the first waiting time is greater than or equal to the first preset time period, encapsulating the message units of which the destination process units are the same process unit to generate a second process encapsulation packet, wherein the second process encapsulation packet comprises all the message units of which the destination process units in the sending queue are the same process unit.
8. The method according to claim 7, wherein the determining, according to the frequency with which the thread unit of the source process unit sends the message unit to the sending queue of the source process unit in the first historical time period, the size of the process encapsulation packet corresponding to the first current time period of the source process unit includes:
acquiring a first number of message units sent by the first process encapsulation packet and the second process encapsulation packet in the first historical time period; and the number of the first and second groups,
acquiring a second number of message units sent by the second process encapsulation packet in the first historical time period;
and determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second quantity to the first quantity and the scale of the process encapsulation packet corresponding to the first historical time period.
9. The method according to claim 8, wherein the determining the scale of the process encapsulation packet corresponding to the first current time period according to the ratio of the second number to the first number and the scale of the process encapsulation packet corresponding to the first historical time period comprises:
if the ratio is greater than a first preset threshold, determining that the scale of the process encapsulation packet corresponding to the first current time period is the product of the scale of the process encapsulation packet corresponding to the first historical time period and a first coefficient, wherein the first coefficient is less than 1.
10. The method of claim 9, further comprising:
if the ratio is smaller than or equal to the first preset threshold, determining that the scale of the process encapsulation packet corresponding to the first current time period is the product of the scale of the process encapsulation packet corresponding to the first historical time period and a second coefficient, wherein the second coefficient is larger than 1.
11. The method of claim 10, further comprising:
determining that a ratio of the first quantity to a third quantity is the second coefficient, where the third quantity is a quantity of message units sent by the first process encapsulation packet and the second process encapsulation packet in a previous time period of the first historical time period.
12. The method according to any of claims 9-11, wherein the first preset threshold is 0.5.
13. A message transmission apparatus, comprising:
the processing module is used for determining the scale of a process encapsulation packet corresponding to a first current time period of a source process unit according to the frequency of sending a message unit to a sending queue of the source process unit by a thread unit of the source process unit in a first historical time period, wherein the message unit comprises at least one message;
the encapsulation module is used for encapsulating the message units in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period to generate a process encapsulation packet;
and the sending module is used for sending the process encapsulation packet.
14. A message transmission apparatus, comprising:
a processor, a transmitter and a memory storing program instructions,
the processor is configured to determine, according to a frequency at which a thread unit of a source process unit sends a message unit to a sending queue of the source process unit in a first historical time period, a size of a process encapsulation packet corresponding to a first current time period of the source process unit, where the message unit includes at least one message;
the processor is further configured to perform encapsulation processing on the message units in the sending queue of the source process unit according to the scale of the process encapsulation packet corresponding to the first current time period, and generate a process encapsulation packet;
the transmitter is coupled to the processor and is used for transmitting the process encapsulation packet;
the memory is configured to store program instructions for causing the processor to perform the message transmission method of any of the preceding claims 1-12.
15. A message transmission system, comprising:
a source process unit comprising at least one thread unit;
the thread unit is used for encapsulating the messages generated by the thread unit and generating a message unit, and the message unit comprises at least two messages;
the thread unit is also used for sending the message unit to the sending queue of the source process unit;
the thread unit is specifically configured to perform encapsulation processing on the message generated by the thread unit according to the size of the thread encapsulation packet corresponding to the second current time period, so as to generate the message unit.
16. The system according to claim 15, wherein the thread unit is further configured to determine a size of the thread encapsulation packet corresponding to the second current time period according to a number of messages generated by the thread unit in a second historical time period.
17. The system according to claim 16, wherein the thread unit is specifically configured to, if the number of messages of a destination thread unit that is a same thread unit and is generated by the thread unit is greater than or equal to the size of the thread encapsulation packet corresponding to the second current time period, perform encapsulation processing on the messages of the destination thread unit that is a same thread unit according to the size of the thread encapsulation packet, and generate the first message unit, where the number of messages included in the first message unit is the same as the size of the thread encapsulation packet.
18. The system according to claim 17, wherein the thread unit is further specifically configured to determine whether a second waiting time of an earliest message generated by the destination thread unit as the same thread unit is greater than or equal to a second preset time if the number of messages generated by the destination thread unit as the same thread unit is smaller than the size of the thread encapsulation packet corresponding to the second current time period, and perform encapsulation processing on the messages generated by the destination thread unit as the same thread unit to generate a second message unit if the second waiting time is greater than or equal to the second preset time, where the second message unit includes all the messages generated by the thread unit that the destination thread unit is the same thread unit.
19. The system according to claim 18, wherein the thread unit is specifically configured to obtain a third number of messages sent in the second historical time period via the first message unit and the second message unit; and acquiring a fourth number of messages sent by the second message unit in the second historical time period; and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
20. A method for message transmission, comprising:
packaging the messages generated by the thread unit to generate a message unit, wherein the message unit comprises at least two messages;
sending the message unit to a sending queue of a source process unit;
the encapsulating process of the message generated by the thread unit comprises the following steps:
and according to the scale of the thread encapsulation packet corresponding to the second current time period, carrying out encapsulation processing on the message generated by the thread unit to generate the message unit.
21. The method according to claim 20, wherein before encapsulating the message generated by the thread unit according to the size of the thread encapsulation packet corresponding to the second current time period and generating the message unit, the method further comprises:
and determining the dimension of the thread encapsulation packet corresponding to the second current time period according to the number of the messages generated by the thread unit in the second historical time period.
22. The method of claim 21, wherein the message element comprises a first message element;
the generating the message unit by encapsulating the message generated by the thread unit according to the dimension of the thread encapsulation packet corresponding to the second current time period comprises:
and if the number of the messages of the same thread unit, which are generated by the thread unit, of the target thread unit is greater than or equal to the scale of the thread encapsulation packet corresponding to the second current time period, encapsulating the messages of the same thread unit, which are generated by the thread unit, according to the scale of the thread encapsulation packet, and generating a first message unit, wherein the number of the messages contained in the first message unit is the same as the scale of the thread encapsulation packet.
23. The method of claim 22, wherein the message unit further comprises a second message unit;
the method further comprises the following steps:
if the number of messages of which the target thread units generated by the thread units are the same thread unit is smaller than the scale of the thread encapsulation packet corresponding to the second current time period, determining whether the second waiting time of the earliest generated message in the messages of which the target thread units are the same thread unit is greater than or equal to a second preset time period, and if the second waiting time is greater than or equal to the second preset time period, performing encapsulation processing on the messages of which the target thread units are the same thread unit to generate a second message unit, wherein the second message unit comprises all the messages of which the target thread units generated by the thread units are the same thread unit.
24. The method of claim 23, wherein determining the size of the thread encapsulation packet corresponding to the second current time period according to the number of messages generated by the thread unit in the second historical time period comprises:
acquiring a third number of messages sent by the first message unit and the second message unit in the second historical time period; and the number of the first and second groups,
acquiring a fourth number of messages sent by the second message unit in the second historical time period;
and determining the scale of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth quantity to the third quantity and the scale of the thread encapsulation packet corresponding to the second historical time period.
25. The method according to claim 24, wherein the determining the size of the thread encapsulation packet corresponding to the second current time period according to the ratio of the fourth number to the third number and the size of the thread encapsulation packet corresponding to the second historical time period comprises:
and if the ratio is larger than a second preset threshold value, determining that the scale of the thread encapsulation packet corresponding to the second current time period is the product of the scale of the thread encapsulation packet corresponding to the second historical time period and a third coefficient, wherein the third coefficient is smaller than 1.
26. The method of claim 25, further comprising:
and if the ratio is smaller than or equal to the second preset threshold, determining that the scale of the thread encapsulation packet corresponding to the second current time period is the product of the scale of the thread encapsulation packet corresponding to the second historical time period and a fourth coefficient, wherein the fourth coefficient is larger than 1.
27. The method according to claim 25 or 26, wherein the second preset threshold is 0.5.
28. The method according to claim 22 or 23, wherein before encapsulating the message generated by the thread unit according to the size of the thread encapsulation packet corresponding to the second current time period and generating the message unit, the method further comprises:
determining that a destination thread unit of a message generated by the thread unit does not belong to the source process unit.
29. A message transmission apparatus, comprising:
the packaging module is used for packaging the messages generated by the thread unit to generate a message unit, and the message unit comprises at least two messages;
the sending module is used for sending the message unit to a sending queue of a source process unit;
the encapsulation module is specifically configured to: and according to the scale of the thread encapsulation packet corresponding to the second current time period, carrying out encapsulation processing on the message generated by the thread unit to generate the message unit.
30. A message transmission apparatus, comprising:
a processor transmitter and a memory storing program instructions,
the processor is used for encapsulating the messages generated by the thread unit and generating a message unit, and the message unit comprises at least two messages;
the sender is coupled to the processor and is used for sending the message unit to a sending queue of a source process unit;
the memory is for storing program instructions for causing the processor to perform the message transmission method of any of the preceding claims 20-28.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610726969.6A CN107783845B (en) | 2016-08-25 | 2016-08-25 | Message transmission system, method and device |
TW106119852A TWI752967B (en) | 2016-08-25 | 2017-06-14 | Message transmission system, method and device |
PCT/CN2017/097492 WO2018036406A1 (en) | 2016-08-25 | 2017-08-15 | Message transmission system, method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610726969.6A CN107783845B (en) | 2016-08-25 | 2016-08-25 | Message transmission system, method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107783845A CN107783845A (en) | 2018-03-09 |
CN107783845B true CN107783845B (en) | 2021-04-13 |
Family
ID=61245472
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610726969.6A Active CN107783845B (en) | 2016-08-25 | 2016-08-25 | Message transmission system, method and device |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN107783845B (en) |
TW (1) | TWI752967B (en) |
WO (1) | WO2018036406A1 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0689139A2 (en) * | 1994-06-22 | 1995-12-27 | International Business Machines Corporation | Anonymous reply port method and apparatus for a microkernel data processing system |
US6744765B1 (en) * | 2000-08-24 | 2004-06-01 | Sun Microsystems, Inc. | Mechanism for completing messages in memory |
CN1975680A (en) * | 2006-11-27 | 2007-06-06 | 浙江大学 | Method for realizing interprocess asynchronous communication based on Java |
CN101127685A (en) * | 2007-09-20 | 2008-02-20 | 中兴通讯股份有限公司 | An inter-process communication device and inter-process communication method |
CN103164267A (en) * | 2013-03-29 | 2013-06-19 | 汉柏科技有限公司 | Lock-free message queue implementation method |
CN103853621A (en) * | 2012-12-05 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Inter-process interactive method and relevant terminal equipment |
CN104159129A (en) * | 2014-08-08 | 2014-11-19 | 北京大学 | Method for progressively transmitting partial splitting blocks under remote sensing data limited bandwidth |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6385658B2 (en) * | 1997-06-27 | 2002-05-07 | Compaq Information Technologies Group, L.P. | Method and apparatus for synchronized message passing using shared resources |
US8401952B1 (en) * | 2009-03-24 | 2013-03-19 | Trading Technologies International, Inc. | Trade order submission for electronic trading |
CN102377631B (en) * | 2010-08-06 | 2015-08-05 | 北京乾唐视联网络科技有限公司 | A kind of data transmission method based on flow control and communication system |
EP2798881B1 (en) * | 2011-12-29 | 2018-11-21 | Intel Corporation | Shaping data packet traffic |
CN103207806B (en) * | 2012-01-12 | 2016-05-04 | 阿里巴巴集团控股有限公司 | A kind of method and system thereof that sends message |
US9680742B2 (en) * | 2014-02-28 | 2017-06-13 | Cavium, Inc. | Packet output processing |
US20150295841A1 (en) * | 2014-04-14 | 2015-10-15 | Qualcomm Incorporated | Efficient packet aggregation using dynamic wait time |
-
2016
- 2016-08-25 CN CN201610726969.6A patent/CN107783845B/en active Active
-
2017
- 2017-06-14 TW TW106119852A patent/TWI752967B/en active
- 2017-08-15 WO PCT/CN2017/097492 patent/WO2018036406A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0689139A2 (en) * | 1994-06-22 | 1995-12-27 | International Business Machines Corporation | Anonymous reply port method and apparatus for a microkernel data processing system |
US6744765B1 (en) * | 2000-08-24 | 2004-06-01 | Sun Microsystems, Inc. | Mechanism for completing messages in memory |
CN1975680A (en) * | 2006-11-27 | 2007-06-06 | 浙江大学 | Method for realizing interprocess asynchronous communication based on Java |
CN101127685A (en) * | 2007-09-20 | 2008-02-20 | 中兴通讯股份有限公司 | An inter-process communication device and inter-process communication method |
CN103853621A (en) * | 2012-12-05 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Inter-process interactive method and relevant terminal equipment |
CN103164267A (en) * | 2013-03-29 | 2013-06-19 | 汉柏科技有限公司 | Lock-free message queue implementation method |
CN104159129A (en) * | 2014-08-08 | 2014-11-19 | 北京大学 | Method for progressively transmitting partial splitting blocks under remote sensing data limited bandwidth |
Non-Patent Citations (2)
Title |
---|
Embedded Systems with Improved Interprocess Communication Design;Marzi, H,et al.,;《2009 7TH IEEE INTERNATIONAL CONFERENCE ON INDUSTRIAL INFORMATICS》;20090623;200-203 * |
基于LCM与ZeroMQ的进程间通信研究;刘号,等;;《电子科学技术》;20160731;第3卷(第4期);480-483 * |
Also Published As
Publication number | Publication date |
---|---|
TWI752967B (en) | 2022-01-21 |
WO2018036406A1 (en) | 2018-03-01 |
CN107783845A (en) | 2018-03-09 |
TW201807585A (en) | 2018-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020052605A1 (en) | Network slice selection method and device | |
CN109039936B (en) | Transmission rate control method, device, sending equipment and receiving equipment | |
KR102408176B1 (en) | Client service transmission method and device | |
US10306641B2 (en) | Resource allocation in a wireless network | |
CN110312147A (en) | Method, system and the storage medium of business data transmission | |
CN114390000A (en) | TSN traffic scheduling method based on enqueue shaping and related equipment | |
CN112448992B (en) | Edge computing task scheduling method and device | |
CN110019386A (en) | A kind of stream data processing method and equipment | |
US20170338998A1 (en) | Message Attack Defense Method and Apparatus | |
CN104052676B (en) | A kind of data processing method of transmission path device and transmission path | |
CN109286584B (en) | Fragmentation recombination method, device and equipment in multi-core system | |
CN104580008A (en) | Method and device for improving multi-queue random message discarding accuracy based on hardware | |
CN107783845B (en) | Message transmission system, method and device | |
US11146494B2 (en) | Scheduling prioritized traffic in a scrambled coded multiple access (SCMA) system | |
CN109861916B (en) | Data processing method and related equipment | |
CN109150760B (en) | Network resource reservation method and device | |
CN112260962B (en) | Bandwidth control method and device | |
CN114095397A (en) | Method, device and equipment for transmitting message and readable storage medium | |
CN109558442B (en) | Real-time data aggregation method and system | |
Bae et al. | Performance analysis of delay-constrained traffic in a cognitive radio network with RF energy harvesting | |
CN113453285B (en) | Resource adjusting method, device and storage medium | |
CN108271212B (en) | Resource selection mechanism determination method and device | |
CN109361953B (en) | Dynamic distribution method, device, equipment and storage medium of barrage message | |
CN112311678B (en) | Method and device for realizing message distribution | |
CN115086247A (en) | Frame preemption method, device, equipment and storage 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |