Media packet processing method and apparatus
By receiving the packet group information in the network device and determining the packet processing strategy of the media packet, the problem that the existing technology cannot distinguish and process media packets of different importance is solved, and the service quality of the media stream is improved.
Patent Information
- Application Number
- PCT/CN2024/077367
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-27
- Filing Date
- 2024-02-18
- Publication Date
- 2024-10-03
AI Technical Summary
When ensuring business service quality, the existing technology cannot effectively distinguish and process media messages of different importance, resulting in service quality that cannot meet the needs of media streams.
By receiving packet group information in network devices, the packet processing strategy for media packets is determined, and priorities are assigned based on packet group types and identifiers to achieve differentiated processing of different packet groups and improve service quality.
It improves the service quality of media streams, ensures that packet group messages of different importance are properly processed, and improves the traffic management and congestion avoidance capabilities of network equipment.
Smart Images

Figure CN2024077367_03102024_PF_FP_ABST
Abstract
Description
A media message processing method and device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 27, 2023, with application number 202310340559.8 and invention name “A Method and Device for Processing Media Messages”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communications, and in particular to a method and device for processing media messages. Background Art
[0003] Currently, to ensure the quality of service (QoS) provided to services, network devices can determine the type of packet flow when receiving it and then perform corresponding packet processing measures based on the packet flow type. This approach can provide the same quality of service for packet flows of the same type.
[0004] However, this approach cannot effectively guarantee the quality of service provided to the business.
[0005] Therefore, a solution is urgently needed to solve the above problems.
[0006] Summary of the Invention
[0007] An embodiment of the present application provides a method for processing media messages, which can improve the service quality provided for media messages.
[0008] In a first aspect, an embodiment of the present application provides a media message processing method, which can be applied to a first network device. The first network device can receive a first media message sent by a second network device. The first media message includes packet group information, which indicates attribute information of a packet group to which the first media message belongs, and the packet group to which the first media message belongs includes multiple media messages. The first network device can determine a message processing policy for the first media message based on the packet group information, and further process the first media message based on the message processing policy of the first media message. It can be seen that by utilizing the solution of the embodiment of the present application, the message processing strategy of the first media message can be determined based on the attribute information of the packet group to which the first media message belongs, instead of using the media stream as the processing unit, and all messages belonging to the same media stream adopt the same message processing strategy. In other words, for a media stream including multiple packet groups, this solution can determine the message processing strategy corresponding to the packet group information based on the packet group information carried by the first media message, thereby making the determination granularity of the message processing strategy finer. Accordingly, processing the first media message based on the message processing strategy can effectively improve the service quality provided for the first media message.
[0009] In one possible implementation, the attribute information of the packet group to which the first media packet belongs may include a packet group type. In this case, the packet group information may include the packet group type. In other words, the packet group information may indicate the type of packet group to which the second media packet belongs. In one example, the packet group type may be used to indicate the importance of the packet group.
[0010] In one possible implementation, packet group types may be divided according to network layers. In one example, when packet group types are divided according to relevant information of the service layer of the second media message, the packet group type may be a service layer type. In this case, the packet group to which the aforementioned second media message belongs may be, for example, a picture group. In another example, when packet group types are divided according to relevant information of the transport layer of the second media message, the packet group type may be a transport layer type. In another example, when packet group types are divided according to relevant information of the application layer of the second media message, the packet group type may be an application layer type. In another example, when packet group types are divided according to relevant information of the coding layer of the second media message, the packet group type may be a coding layer type. In this case, the packet group to which the aforementioned second media message belongs may be, for example, a video frame.
[0011] In one possible implementation, the attribute information of the packet group to which the first media packet belongs may include a packet group identifier and / or the number of packet groups. In this case, the packet group information may include a packet group identifier and / or the number of packet groups. The packet group identifier is used to indicate the packet group to which the second media packet belongs, and the packet group number is used to indicate the total number of media packets included in the packet group to which the second media packet belongs.
[0012] In one possible implementation, when the packet group information includes a packet group type, the first network device may determine the message processing strategy of the first media message based on the packet group type. In a specific example, the first network device may determine the message cache queue corresponding to the first media message based on the packet group type. Accordingly, the message processing strategy of the determined first media message may be to cache the first media message using the first message cache queue. The priority corresponding to the first message cache queue is the first priority, and the packet group type matches the first priority. In an example, the packet group type matches the first priority, which can be understood as the importance of the packet group to which the first media message belongs matches the first priority. The higher the importance of the packet group to which the first media message belongs, the higher the first priority. In this way, the message processing strategy determined for the first media message matches the importance of the packet group to which the first media message belongs. In other words, for the multiple packet groups included in the media stream, the message processing strategy corresponding to the messages in each packet group matches the importance of the packet group, so that the messages in packet groups of different importance are processed differently, thereby improving the service quality provided for the media stream.
[0013] In a possible implementation, when the packet group information also includes a packet group identifier, the first network device can also determine the first message cache queue in combination with the packet group identifier. In this case, for the first priority, the first network device can maintain multiple message cache queues corresponding to the first priority, and one message cache queue corresponding to the first priority corresponds to one packet group. The message cache queue corresponding to the first priority can be used to cache messages in its corresponding packet group. In a specific example, the first network device can first determine the first priority based on the packet group type, and then, based on the packet group identifier, determine the first message cache queue corresponding to the packet group identifier from the multiple message cache queues corresponding to the first priority. In this way, even if the packet group type is the same, media messages in different packet groups can be cached in different message cache queues, so that the first network device can perform corresponding traffic management measures to further improve the quality of service provided for the media stream.
[0014] In one possible implementation, the first network device maintains multiple message cache queues corresponding to the first priority, which may include a first message cache queue and a second message cache queue. When some messages in the first message cache queue have been forwarded, and none of the messages in the second message cache queue have been forwarded, the first network device may prioritize forwarding other messages in the first message cache queue. This allows the first media message to be forwarded to the downstream device as much as possible within the packet group to which it belongs, enabling the downstream device to correctly parse the complete packet group, thereby improving the quality of service provided for the media stream.
[0015] In one possible implementation, if the first network device maintains multiple message cache queues corresponding to the first priority and multiple message cache queues corresponding to the second priority, and the first priority is lower than the second priority. If the cache utilization of the first network device is higher than the preset utilization threshold, then in order to avoid aggravating congestion, the first network device may discard some messages in the message cache queues. As an example, in order to ensure the quality of service provided to the media stream as much as possible, the first network device may discard some or all messages in the message cache queues corresponding to the first priority. That is to say, when the cache utilization of the first network device is higher than the preset utilization threshold, the messages cached in the message cache queues with relatively low priorities may be discarded, that is, messages with relatively low importance may be discarded, thereby reducing the impact of discarded messages on the business.
[0016] In one possible implementation, considering that for a packet group, if the packet loss rate of the media messages in the packet group is higher than a certain threshold, then it is impossible to parse and obtain valid media data based on the media messages in the packet group that have not been lost. Therefore, in one example, when discarding the messages in the message cache queue corresponding to the first priority, some messages can be selectively discarded. In a specific example, the multiple message cache queues corresponding to the first priority include a third message cache queue. If the packet loss rate corresponding to the third message cache queue is higher than the preset packet loss rate, all messages in the third cache queue can be discarded. In this way, it can be avoided that the messages in the third cache queue continue to occupy the cache, thereby causing increased congestion. The cache released after deleting all messages in the third cache queue can also be used to cache other messages.
[0017] In one possible implementation, the third message cache queue and the first message cache queue may be the same message cache queue. In this case, the packet group information carried in the first media message may further include a packet group number, where the packet group number indicates the total number of media messages included in the packet group to which the first media message belongs. Accordingly, the first network device may determine the packet loss rate of the third message cache queue based on the packet group number and the number of media messages that have experienced packet loss in the packet group to which the first media message belongs.
[0018] In one possible implementation, when the packet group information includes a packet group type, the first network device may determine a packet processing policy for the first media message based on the bandwidth usage corresponding to the first media stream and the packet group type. In a specific example, if the available bandwidth corresponding to the first media stream is insufficient and the packet group type is a first preset packet group type, the packet processing policy may be determined to be discarding the first media message. The first preset packet group type may be a packet group type to which a less important packet group belongs. In this case, using this solution, when the available bandwidth for the first media stream is insufficient, messages in the less important packet group may be discarded, thereby ensuring that bandwidth is used to transmit messages in the more important packet group, thereby improving the quality of service provided for the first media stream. In another possible implementation, if the available bandwidth corresponding to the first media stream is insufficient and the packet group type is a second preset packet group type, the packet processing policy may be determined to be caching the first media message. The first importance corresponding to the first preset packet group type is lower than the second importance corresponding to the second preset packet group type. In this case, this solution can cache messages in packet groups with higher importance when the available bandwidth of the first media stream is insufficient, thereby ensuring that the bandwidth is used to transmit messages in packet groups with higher importance, thereby improving the service quality provided for the first media stream.
[0019] In one possible implementation, when the packet group information includes a packet group identifier, the first network device can determine a message processing strategy for the first media message based on the packet group identifier and the bandwidth usage of the media stream to which the first media message belongs. In a specific example, if the first network device does not find a flow table corresponding to the packet group identifier, it can be determined that the first media message is the first media message received by the first network device in the packet group to which the first media message belongs. In this case, the first network device can determine that the message processing strategy is to discard the first media message. In this way, when the available bandwidth is insufficient, the first network device can prioritize processing media messages in other packet groups that have already been received, and discard messages in newly received packet groups, thereby improving the integrity of the media stream received by the downstream device and, accordingly, improving the quality of service provided for the media stream. Better integrity of the media stream can be understood as being able to receive all messages in more packet groups.
[0020] In one possible implementation, when discarding a first media message, the packet group type of the packet group to which the first media message belongs may also be considered. That is, the importance of the packet group to which the first media message belongs may also be considered. If the packet group type of the packet group to which the first media message belongs is a third preset packet group type, this indicates that the importance of the packet group to which the first media message belongs is relatively low, and therefore the message processing strategy is determined to discard the first media message. This approach prevents media messages in packet groups of higher importance from being discarded, thereby ensuring the quality of service provided for the media stream.
[0021] In the second aspect, an embodiment of the present application provides a message processing method, which can be applied to a second network device. The second network device can receive a second media message and determine packet group information based on the second media message, where the packet group information indicates attribute information of the packet group to which the second media message belongs, and the packet group includes multiple media messages. After the second network device determines the packet group information, it can obtain a first media message including the packet group information based on the packet group information and the second media message, wherein the packet group information can also be used to indicate attribute information of the packet group to which the first media message belongs. After obtaining the first media message, the first media message can be sent to the first network device, so that the first network device determines a message processing strategy for the first media message based on the packet group information. Using this solution, the message processing strategy of the first media message is determined based on the aforementioned packet group information, rather than using the media stream as the processing unit. All messages belonging to the same media stream adopt the same message processing strategy. In other words, for a media stream including multiple packet groups, this solution can determine the message processing strategy corresponding to the packet group information based on the packet group information carried by the first media message, thereby making the determination of the message processing strategy more granular. Accordingly, processing the first media message based on the message processing strategy can effectively improve the service quality provided for the first media message.
[0022] In a possible implementation, the packet group information includes a packet group type, where the packet group type indicates a type of the packet group to which the second media packet belongs.
[0023] In a possible implementation, the type of the packet group to which the second media message belongs includes any one of the following: a service layer type, a transport layer type, an application layer type, or a coding layer type.
[0024] In a possible implementation, if the type of the packet group to which the second media message belongs is a coding layer type, the packet group to which the second media message belongs includes: a video frame.
[0025] In one possible implementation, the packet group information includes: a packet group identifier and / or a packet group quantity, wherein the packet group identifier indicates the packet group to which the first media packet belongs, and the packet group quantity indicates the total number of media packets included in the packet group to which the first media packet belongs.
[0026] In a third aspect, an embodiment of the present application provides a media message processing device, which is applied to a first network device, and the device includes: a receiving unit, which is used to receive a first media message sent by a second network device, the first media message including packet group information, the packet group information indicating attribute information of the packet group to which the first media message belongs, and the packet group including multiple media messages; a processing unit, which is used to determine a message processing strategy of the first media message according to the packet group information, and to process the first media message based on the message processing strategy of the first media message.
[0027] In one possible implementation, the packet group information includes a packet group type, and the packet group type indicates the type of packet group to which the first media message belongs. The processing unit is used to: determine the first message cache queue corresponding to the first media message based on the packet group type, and determine the message processing strategy to use the first message cache queue to cache the first media message, and the first priority of the first message cache queue matches the packet group type.
[0028] In one possible implementation, the packet group information also includes a packet group identifier, which indicates the packet group to which the first media message belongs. The processing unit is used to: determine the first message cache queue corresponding to the first media message based on the packet group type and the packet group identifier, and the first message cache queue is used to cache messages in the packet group to which the first media message belongs.
[0029] In one possible implementation, the first network device maintains multiple message cache queues corresponding to the first priority, one message cache queue corresponding to the first priority corresponds to one packet group, and the multiple message cache queues corresponding to the first priority include: the first message cache queue and the second message cache queue. The device also includes: a sending unit, which is used to give priority to forwarding other messages in the first message cache queue when some messages in the first message cache queue have been forwarded and all messages in the second message cache queue have not been forwarded.
[0030] In one possible implementation, the first network device maintains multiple message cache queues corresponding to the first priority and multiple message cache queues corresponding to the second priority, the first priority being lower than the second priority, and the processing unit is further used to: when the cache utilization of the first network device is higher than a preset utilization, discard some or all messages in the message cache queue corresponding to the first priority.
[0031] In a possible implementation, the processing unit is configured to discard all messages in the third message cache queue corresponding to the first priority when a packet loss rate corresponding to the third message cache queue is higher than a preset packet loss rate.
[0032] In one possible implementation, the third message cache queue is the first message cache queue, and the packet group information also includes the number of packet groups, which indicates the total number of media messages included in the packet group to which the first media message belongs. The packet loss rate corresponding to the third message cache queue is determined based on the number of packet groups and the number of media messages that have been lost in the packet group to which the first media message belongs.
[0033] In one possible implementation, the packet group information includes a packet group type, where the packet group type indicates the type of packet group to which the first media message belongs, and the first media message belongs to a first media stream. The processing unit is used to: if the available bandwidth corresponding to the first media stream is insufficient and the packet group type is a first preset packet group type, determine that the message processing strategy is to discard the first media message; or, if the available bandwidth corresponding to the first media stream is insufficient and the first packet group type is a second preset packet group type, determine that the message processing strategy is to cache the first media message, the first preset packet group type corresponds to a first importance level, the second preset packet group type corresponds to a second importance level, and the first importance level is lower than the second importance level.
[0034] In one possible implementation, the packet group information includes a packet group identifier, which indicates the packet group to which the first media message belongs. The processing unit is configured to: if the available bandwidth corresponding to the media stream to which the first media message belongs is insufficient and the flow table corresponding to the packet group identifier is not found, determine that the message processing strategy is to discard the first media message.
[0035] In one possible implementation, the processing unit is used to: if the available bandwidth corresponding to the media stream to which the first media message belongs is insufficient, and the packet group type is a third preset packet group type, and the flow table corresponding to the packet group identifier is not found, determine that the message processing strategy is to discard the first media message.
[0036] In a possible implementation, the type of the packet group to which the first media message belongs includes any one of the following: a service layer type, a transport layer type, an application layer type, or a coding layer type.
[0037] In a possible implementation, if the type of the packet group to which the first media message belongs is a coding layer type, the packet group to which the first media message belongs includes: a video frame.
[0038] In a fourth aspect, an embodiment of the present application provides a media message processing device, which is applied to a second network device, and the device includes: a receiving unit for receiving a second media message; a processing unit for determining packet group information based on the second media message, wherein the packet group information indicates attribute information of the packet group to which the second media message belongs, and the packet group includes multiple media messages, and based on the second media message and the packet group information, a first media message including the packet group information is obtained; and a sending unit for sending the first media message to the first network device.
[0039] In a possible implementation, the packet group information includes a packet group type, where the packet group type indicates a type of the packet group to which the second media packet belongs.
[0040] In a possible implementation, the type of the packet group to which the second media message belongs includes any one of the following: a service layer type, a transport layer type, an application layer type, or a coding layer type.
[0041] In a possible implementation, if the type of the packet group to which the second media message belongs is a coding layer type, the packet group to which the second media message belongs includes: a video frame.
[0042] In one possible implementation, the packet group information includes: a packet group identifier and / or a packet group quantity, wherein the packet group identifier indicates the packet group to which the first media packet belongs, and the packet group quantity indicates the total number of media packets included in the packet group to which the first media packet belongs.
[0043] In a fifth aspect, an embodiment of the present application provides a device. The device includes a processor and a memory. The memory is configured to store instructions or computer programs. The processor is configured to execute the instructions or computer programs in the memory, and perform any of the methods described in the first aspect or any of the methods described in the second aspect.
[0044] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions or a computer program, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above, or to execute any of the methods described in the second aspect above.
[0045] In the seventh aspect, an embodiment of the present application provides a computer program product comprising instructions or a computer program, which, when executed on a computer, enables the computer to execute any one of the methods described in the first aspect above, or to execute any one of the methods described in the second aspect above.
[0046] In an eighth aspect, an embodiment of the present application provides a communication system, comprising: a first network device that executes the method described in the first aspect and any one of the first aspects above, and a second network device that executes the method described in the second aspect and any one of the second aspects above. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] FIG1 is a schematic diagram of a network device running a DiffServ model provided in an embodiment of the present application;
[0049] FIG2 is a signaling interaction diagram of a media message processing method provided in an embodiment of the present application;
[0050] FIG3a is a schematic diagram of a message buffer queue provided in an embodiment of the present application;
[0051] FIG3b is a schematic diagram of another message buffer queue provided in an embodiment of the present application;
[0052] FIG4 is a schematic structural diagram of a media message processing device provided in an embodiment of the present application;
[0053] FIG5 is a schematic structural diagram of another media message processing device provided in an embodiment of the present application;
[0054] FIG6 is a schematic structural diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] An embodiment of the present application provides a method for processing media messages, which can improve the service quality provided for media messages.
[0056] Currently, to ensure the quality of service provided to services, differentiated services (DiffServ) can be used to process service flows transmitted within the network. In one example, DiffServ can be used to classify incoming service flows into different types at the network edge, and to combine flows of the same type for unified management. This ensures the quality of service provided to the services, for example, by providing stable service quality parameters such as transmission rate, delay, and jitter.
[0057] In one example, a DiffServ model can be run on a network device to process service flows using the DiffServ model. In a specific example, the DiffServ model can include four components: flow classification and marking, traffic management and shaping, congestion management, and congestion avoidance.
[0058] Traffic classification and marking components are used to classify data packets into different priorities and reflect the priorities in the packet encapsulation;
[0059] Traffic management and shaping components are used to limit service traffic to a specific bandwidth. When service traffic exceeds the rated bandwidth, the excess traffic will be discarded or cached;
[0060] The congestion management component is used to cache packets in a queue when network congestion occurs and to use a scheduling algorithm to determine the order in which packets are forwarded.
[0061] The congestion avoidance component monitors network resource usage and proactively discards packets when it detects increasing network congestion, thereby preventing further congestion.
[0062] Please refer to Figure 1 for understanding. Figure 1 is a schematic diagram of a network device running a DiffServ model provided in an embodiment of the present application.
[0063] As shown in Figure 1, the network device 100 includes a flow classification module 110, a policy processing module 120 and a queue scheduling module 130. The flow classification module 110 can implement the functions of the aforementioned flow classification and marking components, the policy processing module 120 can implement the functions of the aforementioned traffic management and shaping components, and the queue scheduling module 130 can implement the functions of the aforementioned congestion management component and congestion avoidance component. In an example, the flow classification module 110 and the policy processing module 120 can run on the network processor (NP) of the network device 100, and the queue scheduling module 130 can be a submodule of the traffic engineering (TM) module included in the network device 100. The relationship between the flow classification module 110, the policy processing module 120 and the queue scheduling module 130 is not described in detail here.
[0064] In the traditional DiffServ model, network devices process service traffic at the granularity of service flows, applying the same message processing strategy to all messages in the same service flow. However, this method of message processing cannot meet the quality of service requirements of media flows.
[0065] Next, the media stream is video and the video stream is taken as an example for explanation.
[0066] Currently, video encoding generally follows the H.264 encoding standard, which has four basic concepts: frame, macroblock, keyframe, and group of pictures (GOP).
[0067] After being encoded by the H264 coding standard, the data after a video image is encoded is called a frame. A frame is composed of a slice or multiple slices, a slice is composed of one or more macroblocks, and a macroblock is composed of 4x4-16x16 color coding data. The H264 coding standard defines three types of frames, namely I-frame, B-frame and P-frame. An I-frame is a complete image frame, while a B-frame and a P-frame are not a complete image frame. A P-frame is generated with reference to the I-frame before it, and a B-frame is generated with reference to the image frame before it and the image frame after it. In the embodiment of the present application, a "frame" may also be referred to as a "video frame", and the two may be used interchangeably.
[0068] Macroblock is the basic unit of H264 encoding. The H264 encoding standard uses a 16×16 (pixel) area as a macroblock by default, which can also be divided into 8X8 size.
[0069] For convenience during encoding and decoding, the first I-frame in a GOP is distinguished from other I-frames and is called a key frame. This helps control the encoding and decoding process. The key frame is used to immediately refresh the image, preventing errors from propagating further. Encoding then begins again from the key frame.
[0070] A group of pictures (GOP) is a collection of images that barely change over time. A GOP can include multiple frames, or in other words, a collection of multiple frames. The first frame in a GOP is an I-frame. When decoding video frames, the decoding of an I-frame within a GOP is independent of other frames. The decoding of a P-frame depends on the I-frame or P-frame preceding it. The decoding of a B-frame depends on the first P-frame following it and the I-frame or P-frame preceding it that is closest to it.
[0071] As can be seen from the above description, a video stream includes multiple information units, for example, a series of frames. There are differences in importance between information units. When a video stream is transmitted in a network, an information unit can be split into multiple media packets. When processing a media packet, the network device cannot determine the information of the information unit to which the media packet belongs, and thus cannot process the media packet based on the information of the information unit to which the media packet belongs. Instead, the network device treats each packet in the video stream indiscriminately, resulting in the quality of service provided for the video stream not meeting the requirements.
[0072] In order to solve the above problems, an embodiment of the present application provides a media message processing method and device. Next, the media message processing method and device provided in the embodiment of the present application are introduced in conjunction with the accompanying drawings.
[0073] In an embodiment of the present application, the media message may be a Real-time Transport Protocol (RTP) message. The payload portion of the media message may include a network abstract layer unit (NALU), which is a transmission unit in a bitstream structure formed after encoding media information, such as video. The NALU may include a NALU header and NALU data. Generally, encoding and encapsulating the media information may be performed by the terminal device.
[0074] In the following description of the embodiments of the present application, "message" refers to "media message", and the two can be used interchangeably.
[0075] Referring to Figure 2, which is a signaling interaction diagram of a media message processing method provided by an embodiment of the present application, the media message processing method shown in Figure 2 may include, for example, the following steps S101-S106.
[0076] S101: A second network device receives a second media message and determines packet group information according to the second media message, where the packet group information indicates attribute information of a packet group to which the second media message belongs, and the packet group includes multiple media messages.
[0077] In one example, the second network device may be a user-side device, such as a customer provider edge (CPE). In another example, the second network device may be a network-side device. In a specific example, the second network device may be an ingress device of the network, such as an ingress provider edge (IPE). In another example, the second network device may be an intermediate device of the network, such as a provider backbone device (P). In another example, the second network device may also be a classifier for classifying media packets.
[0078] In one example, a second network device may receive a second media message sent by an upstream device. The second media message may belong to a first media stream. For example, when the second network device is a user-side device, the second network device may receive a second media message sent by a terminal device. For another example, when the second network device is a network ingress device, the second network device may receive the second media message sent by a CPE. For another example, when the second network device is an intermediate device in the network, the second network device may receive the second media message sent by a network ingress device.
[0079] In an embodiment of the present application, a media stream may include multiple packet groups, and a packet group may include multiple media messages. In a video stream, the messages in a packet group constitute a media frame. For a media stream, a packet group may correspond to an information unit, or in other words, for a certain packet group, the multiple media messages included in the packet group may constitute an information unit. The information unit mentioned here may be a video frame, an audio clip, or a picture group. In one example, when the media stream is a video stream, the packet group may be a picture group or a video frame. In another example, when the media stream is an audio stream, the packet group may be an audio clip.
[0080] After receiving the second media message, the second network device may further determine attribute information of the packet group to which the second media message belongs, thereby obtaining packet group information. In one example, the attribute information of the packet group to which the second media message belongs may indicate at least one attribute of the packet group to which the second media message belongs.
[0081] In one example, the at least one attribute may include a packet group type. In this case, the packet group information may include the packet group type. In other words, the packet group information may indicate the type of packet group to which the second media message belongs. In one example, the packet group type may be used to indicate the importance of the packet group. For example, when the packet group is a video frame, the packet group type may include I-frames, P-frames, and B-frames, where the importance of I-frames is higher than that of P-frames, and the importance of P-frames is higher than that of B-frames.
[0082] In an embodiment of the present application, packet group types can be divided according to network layers. In one example, when the packet group types are divided according to the relevant information of the business layer of the second media message, the packet group type can be a business layer type. For this case, the packet group to which the aforementioned second media message belongs can be, for example, a picture group. In another example, when the packet group types are divided according to the relevant information of the transport layer of the second media message, the packet group type can be a transport layer type. In another example, when the packet group types are divided according to the relevant information of the application layer of the second media message, the packet group type can be an application layer type. In another example, when the packet group types are divided according to the relevant information of the coding layer of the second media message, the packet group type can be a coding layer type. For this case, the packet group to which the aforementioned second media message belongs can be, for example, a video frame.
[0083] The second network device may parse the second media message to determine the type of the packet group to which the second media message belongs, thereby obtaining the packet group type. Taking the packet group to which the second media message belongs as a video frame as an example, the second network device may determine the frame type to which the second media message belongs based on information in the RTP message header and its extension field, or the second network device may use a deep packet inspection (DPI) method to determine the frame type to which the second media message belongs based on information in a NALU header in the payload of the second media message.
[0084] In another example, the at least one attribute may include a packet group identifier and / or a number of packet groups. In this case, the packet group information may include a packet group identifier and / or a number of packet groups. The packet group identifier indicates the packet group to which the second media packet belongs, and the number of packet groups indicates the total number of media packets included in the packet group to which the second media packet belongs.
[0085] After receiving the second media message, the second network device can determine whether the second media message is the first message in the packet group to which the second media message belongs. If so, the second network device can assign a packet group identifier to the packet group to which the second media message belongs. If not, the second network device can obtain the already assigned packet group identifier. In addition, the second network device can also parse a specific field in the second media message to determine the total number of media messages included in the packet group to which the second media message belongs, thereby obtaining the packet group number.
[0086] In the following description of the embodiment of the present application, an example is given in which the packet group to which the first media message belongs is a video frame.
[0087] S102: The second network device obtains a first media packet including the packet group information according to the second media packet and the packet group information, where the packet group information indicates attribute information of the packet group to which the first media packet belongs.
[0088] After the second network device determines the packet group information, it can use the packet group information to encapsulate the second media message, thereby obtaining a first media message including the packet group information. For example, the packet group information can be added to the second media message to obtain the first media message. The packet group information included in the first media message can be used to indicate the attribute information of the packet group to which the first media message belongs. The packet group to which the first media message belongs and the packet group to which the second media message belongs are the same packet group. Therefore, regarding the attribute information of the packet group to which the first media message belongs, you can refer to the above description of the attribute information of the packet group to which the second media message belongs, and no repeated description will be made here.
[0089] S103: The second network device sends the first media message to the first network device.
[0090] S104: The first network device receives a first media message sent by the second network device.
[0091] After receiving the first media message, the second network device can send the first media message to the first network device. Correspondingly, the first network device can receive the first media message sent by the second network device. The first network device can be a network-side device. In a specific example, the first network device can be an ingress device of the network, an egress device of the network, such as an egress provider edge (EPE), or an intermediate device of the network.
[0092] S105: The first network device determines a message processing strategy for the first media message according to the packet group information included in the first media message.
[0093] S106: The first network device processes the first media message based on the message processing policy of the first media message.
[0094] After the first network device receives the first media message, it can parse the first media message to obtain the packet group information included in the first media message, and determine the message processing strategy of the first media message based on the packet group information, and further process the first media message based on the determined message processing strategy. It can be seen that, using the solution of the embodiment of the present application, the message processing strategy of the first media message can be determined according to the attribute information of the packet group to which the first media message belongs, instead of using the media stream as the processing unit, all messages belonging to the same media stream adopt the same message processing strategy. In other words, for a media stream including multiple packet groups, this solution can determine the message processing strategy corresponding to the packet group information based on the packet group information carried by the first media message, thereby making the determination granularity of the message processing strategy finer. Accordingly, processing the first media message based on the message processing strategy can effectively improve the service quality provided for the first media message.
[0095] Next, various implementations of S105 are introduced.
[0096] As previously mentioned, the packet group information may include a packet group type. In this case, in one implementation, S105 may determine a message processing strategy for the first media message based on the packet group type. In one specific example, the message cache queue corresponding to the first media message may be determined based on the packet group type. Accordingly, the message processing strategy determined for the first media message may be to cache the first media message using the first message cache queue. The priority corresponding to the first message cache queue is a first priority, and the packet group type matches the first priority. In one example, the packet group type matches the first priority, which can be understood as meaning that the importance of the packet group to which the first media message belongs matches the first priority. The higher the importance of the packet group to which the first media message belongs, the higher the first priority. This can be understood with reference to Figure 3a, which is a schematic diagram of a message cache queue provided in an embodiment of the present application. As shown in Figure 3a, the first network device maintains three message cache queues: a message cache queue 310 corresponding to a high priority, a message cache queue 320 corresponding to a medium priority, and a message cache queue 330 corresponding to a low priority. If the packet group type is an I frame, the first priority is a high priority, meaning that the messages included in the I frame can be cached in message cache queue 310. If the packet group type is a P frame, the first priority is a medium priority, meaning that the messages included in the P frame can be cached in message cache queue 320. If the packet group type is a B frame, the first priority is a low priority, meaning that the messages included in the B frame can be cached in message cache queue 330. In this manner, the message processing policy determined for the first media message matches the importance of the packet group to which the first media message belongs. In other words, for multiple packet groups included in a media stream, the message processing policy corresponding to the messages in each packet group matches the importance of the packet group, thereby enabling differentiated processing of messages within packet groups of different importance, thereby improving the quality of service provided for the media stream.
[0097] In one example, the first network device can receive multiple P frames, multiple I frames, and multiple B frames. The media messages included in the multiple I frames can all be cached in the message cache queue 310, the media messages included in the multiple P frames can all be cached in the message cache queue 320, and the media messages included in the multiple B frames can all be cached in the message cache queue 330.
[0098] In a specific example, the first network device may pre-store a correspondence between multiple packet group types and the queue priorities corresponding to each of the multiple packet group types. Accordingly, when determining the first message cache queue, the queue priority for caching the first media message may be obtained as the first priority based on the packet group type of the packet group to which the first media message belongs and the aforementioned correspondence. Further, the message cache queue corresponding to the first priority is determined as the first message cache queue.
[0099] As previously mentioned, the packet group information may also include a packet group identifier. In this case, the first network device may also consider the packet group identifier when determining the first message cache queue. In this case, the message cache queues maintained by the first network device may be multi-level queues. For the first priority level, the first network device may maintain multiple message cache queues corresponding to the first priority level, and each message cache queue corresponding to the first priority level corresponds to a packet group. The message cache queue corresponding to the first priority level may be used to cache messages within the corresponding packet group. In this case, in the specific implementation of S105, the first network device may first determine the first priority level based on the packet group type, and then, based on the packet group identifier, determine the first message cache queue corresponding to the packet group from the multiple message cache queues corresponding to the first priority level. In a specific example, if the first network device caches other media messages within the packet group to which the first media message belongs, the first network device may use the packet group identifier as an index to determine the message cache queue that caches the other media messages as the first message cache queue. If the first network device has not yet cached other media messages in the packet group to which the first media message belongs, the first network device can select one of the idle message cache queues from the multiple message cache queues corresponding to the first priority as the first message cache queue. The idle message cache queue mentioned here can be understood as a message cache queue that has not yet cached a media message. In this way, even if the packet group type is the same, media messages in different packet groups can be cached in different message cache queues, so that the first network device can execute corresponding traffic management measures to further improve the service quality provided for the media stream.
[0100] For further understanding, please refer to Figure 3b, which is a schematic diagram of another message cache queue provided in an embodiment of the present application. As shown in Figure 3b, the first network device maintains message cache queues corresponding to three priorities, namely, a message cache queue 340 corresponding to a high priority, a message cache queue 350 corresponding to a medium priority, and a message cache queue 360 corresponding to a low priority. The message cache queue 340 corresponding to the high priority may include multiple message cache queues, with three being used as an example in Figure 3b. Similarly, the message cache queue 350 corresponding to the medium priority may include multiple message cache queues, with three being used as an example in Figure 3b. The message cache queue 360 corresponding to the low priority may include multiple message cache queues, with three being used as an example in Figure 3b.
[0101] If the packet group type is an I frame, the first priority is a high priority. As an example, the first media message can be cached in the message cache queue 341, which is used to cache messages in the packet group to which the first media message belongs, and is not used to cache messages in other packet groups. In Figure 3b, the packet group to which the first media message belongs corresponds to I frame 1. Accordingly, the message cache queue 342 can be used to cache media messages in I frame 2, and the message cache queue 343 can be used to cache media messages in I frame 3. If the packet group type is a P frame, the first priority is a medium priority. As an example, the first media message can be cached in the message cache queue 351, which is used to cache messages in the packet group to which the first media message belongs, and is not used to cache messages in other packet groups. Cache messages in other packet groups. In Figure 3b, the packet group to which the first media message belongs corresponds to P frame 1. Accordingly, the message cache queue 352 can be used to cache media messages in P frame 2, and the message cache queue 353 can be used to cache media messages in P frame 3. If the packet group type is B frame, the first priority is a low priority. As an example, the first media message can be cached in the message cache queue 361, which is used to cache messages in the packet group to which the first media message belongs, and is not used to cache messages in other packet groups. In Figure 3b, the packet group to which the first media message belongs corresponds to B frame 1. Accordingly, the message cache queue 362 can be used to cache media messages in B frame 2, and the message cache queue 363 can be used to cache media messages in B frame 3.
[0102] In one example, the first network device maintains multiple message cache queues corresponding to the first priority, which may include a first message cache queue and a second message cache queue. In one example, if some messages in the first message cache queue have been forwarded and none of the messages in the second message cache queue have been forwarded, the first network device may give priority to forwarding other messages in the first message cache queue. For example, the first network device schedules the messages cached in the message cache queue corresponding to the first priority according to a certain queue scheduling algorithm. When processing the messages cached in the message cache queue corresponding to the first priority, some of the messages in the first message cache queue have been scheduled. In this case, the first network device may give priority to forwarding other messages in the first message cache queue, so that as much as possible, all media messages in the packet group to which the first media message belongs can be forwarded to the downstream device, so that the downstream device can correctly parse the complete packet group, thereby improving the quality of service provided for the media stream.
[0103] In an embodiment of the present application, priority is given to forwarding other messages in the first message cache queue. This can be achieved by forwarding all other messages in the first message cache queue to the downstream node before forwarding the messages in the second message cache queue. It can also be achieved by increasing the scheduling frequency of the first message cache queue. This embodiment of the present application does not make specific limitations.
[0104] In another example, if the first network device maintains multiple message cache queues corresponding to the first priority and multiple message cache queues corresponding to the second priority, and the first priority is lower than the second priority. For example, the first priority is medium priority and the second priority is high priority; for another example, the first priority is low priority and the second priority is medium priority or high priority. If the cache utilization of the first network device is higher than the preset utilization threshold, then in order to avoid increased congestion, the first network device can discard some messages in the message cache queue. As an example, in order to ensure the quality of service provided to the media stream as much as possible, the first network device can discard some or all messages in the message cache queue corresponding to the first priority. That is, when the cache utilization of the first network device is higher than the preset utilization threshold, it can discard messages cached in the message cache queue with relatively low priority, that is, discard messages with relatively low importance, thereby reducing the impact of discarded messages on the business.
[0105] The embodiment of the present application does not specifically limit the preset utilization threshold. The preset utilization threshold can be determined according to actual conditions. For example, the preset utilization threshold can be 60%.
[0106] In the embodiment of the present application, the cache utilization of the first network device can be understood as the queue cache utilization of the first network device, that is, the ratio of the cache occupied by the messages cached in the message cache queue to the total cache of the queue.
[0107] As mentioned above, for the multiple message cache queues corresponding to the first priority, one message cache queue corresponding to the first priority corresponds to a packet group. For a packet group, if the packet loss rate of the media messages in the packet group is higher than a certain threshold, then it is impossible to parse and obtain valid media data based on the media messages in the packet group that have not been lost. Therefore, in one example, when discarding the messages in the message cache queue corresponding to the first priority, some messages can be selectively discarded. In a specific example, the multiple message cache queues corresponding to the first priority include a third message cache queue. If the packet loss rate corresponding to the third message cache queue is higher than the preset packet loss rate, all messages in the third cache queue can be discarded. In this way, it can be avoided that the messages in the third cache queue continue to occupy the cache, thereby causing increased congestion. The cache released after deleting all messages in the third cache queue can also be used to cache other messages.
[0108] In an embodiment of the present application, the packet loss rate of the third message cache queue may be determined by the first network device based on the total number of media messages included in the packet group corresponding to the third message cache queue and the number of media messages that have already been lost in the packet group corresponding to the third message cache queue. In one example, the packet loss rate of the third message cache queue may be the ratio of the number of media messages that have already been lost in the packet group corresponding to the third message cache queue to the total number of media messages included in the packet group corresponding to the third message cache queue. For example, if the total number of media messages included in the packet group corresponding to the third message cache queue is A, and the number of media messages that have already been lost in the packet group corresponding to the third message cache queue is B, then the packet loss rate of the third message cache queue may be B / A.
[0109] Among them, the total number of media messages included in the packet group corresponding to the third message cache queue can carry the media messages included in the packet group corresponding to the third message cache queue, and the number of media messages that have been lost in the packet group corresponding to the third message cache queue can be the total number minus the number of media messages received by the first network device that belong to the packet group corresponding to the third message cache queue.
[0110] In one example, the third message cache queue and the first message cache queue can be the same message cache queue. In this case, the packet group information carried in the first media message can also include a packet group number, where the packet group number indicates the total number of media messages included in the packet group to which the first media message belongs. Accordingly, the first network device can determine the packet loss rate of the third message cache queue based on the packet group number and the number of media messages that have experienced packet loss in the packet group to which the first media message belongs.
[0111] In one implementation, when the packet group information includes a packet group type, S105 may be implemented to determine a packet processing strategy for the first media packet according to bandwidth usage corresponding to the first media stream and the packet group type.
[0112] In a specific example, if the available bandwidth corresponding to the first media stream is insufficient and the packet group type is a first preset packet group type, it can be determined that the message processing strategy is to discard the first media message. The first preset packet group type can be a packet group type to which a packet group with a lower degree of importance belongs. For example, the first preset packet group type can be a B frame. In this case, the present solution can preferentially discard messages in packet groups with a lower degree of importance when the available bandwidth of the first media stream is insufficient, thereby ensuring that the bandwidth is used to transmit messages in packet groups with a higher degree of importance, thereby improving the quality of service provided to the first media stream.
[0113] In another possible implementation, if the available bandwidth corresponding to the first media stream is insufficient, and the packet group type is the second preset packet group type, it can be determined that the message processing strategy is to cache the first media message. The first importance corresponding to the first preset packet group type is lower than the second importance corresponding to the second preset packet group type. For example, the first preset packet group type can be a B frame, and the second preset packet group type can be a P frame. In this case, this solution can be used to cache messages in packet groups with higher importance when the available bandwidth of the first media stream is insufficient, thereby ensuring that the bandwidth is used to transmit messages in packet groups with higher importance, thereby improving the quality of service provided to the first media stream.
[0114] In another implementation, when the packet group information includes a packet group identifier, S105 may, in a specific implementation, determine a message processing policy for the first media message based on the packet group identifier and the bandwidth usage of the media stream to which the first media message belongs. In a specific example, if the available bandwidth corresponding to the media stream to which the first media message belongs is insufficient, and the first media message is the first media message in the packet group to which the first media message belongs, received by the first network device, then the first network device may determine that the message processing policy for the first media message is to discard the first media message. In a specific example, if the first network device does not find a flow table corresponding to the packet group identifier, then it may be determined that the first media message is the first media message in the packet group to which the first media message belongs, received by the first network device. Therefore, if the available bandwidth corresponding to the first media stream to which the first media message belongs is insufficient and the flow table corresponding to the packet group identifier is not found, then the first network device may determine that the message processing policy is to discard the first media message.
[0115] In this manner, when available bandwidth is insufficient, the first network device can prioritize processing already received media packets from other packet groups and discard packets from newly received packet groups, thereby improving the integrity of the media stream received by the downstream device and, accordingly, enhancing the quality of service provided for the media stream. Improved media stream integrity can be understood as being able to receive all packets from more packet groups.
[0116] As an example, when discarding the first media message, the packet group type of the packet group to which the first media message belongs may also be considered, that is, the importance of the packet group to which the first media message belongs may also be considered. For packet groups with higher importance, even if the aforementioned available bandwidth is insufficient, the media messages in the packet group cannot be discarded. Therefore, in one example, even if the available bandwidth corresponding to the first media stream to which the first media message belongs is insufficient, and the flow table corresponding to the packet group identifier is not found, the first network device may further determine whether the packet group type is a third preset packet group type, wherein the third preset packet group type may be a packet group type to which a packet group with lower importance belongs, for example, the third preset packet group type may be a B frame. If it is determined that the packet group type is the third preset packet group type, it may be determined that the message processing strategy is to discard the first media message. In this way, media messages in packet groups with higher importance may be avoided from being discarded, thereby ensuring the quality of service provided to the media stream.
[0117] The available bandwidth of the media stream to which the first media message belongs can be determined based on the remaining tokens in a token bucket corresponding to the media stream, where the committed information rate (CIR) of the token bucket is the bandwidth value subscribed by the media stream. The token bucket is not described in detail here.
[0118] The present application also provides a media message processing device, as shown in Figure 4, which is a schematic diagram of the structure of a media message processing device provided in the present application. The media message processing device 400 shown in Figure 4 can be applied to a first network device to execute the steps performed by the first network device in the above method embodiment.
[0119] In an example, the apparatus 400 includes: a receiving unit 401 and a processing unit 402 .
[0120] The receiving unit 401 is configured to receive a first media message sent by a second network device, where the first media message includes packet group information, where the packet group information indicates attribute information of a packet group to which the first media message belongs, and the packet group includes multiple media messages.
[0121] The processing unit 402 is configured to determine a message processing strategy for the first media message according to the packet group information, and process the first media message based on the message processing strategy for the first media message.
[0122] In one possible implementation, the packet group information includes a packet group type, and the packet group type indicates the type of the packet group to which the first media message belongs. The processing unit 402 is used to: determine the first message cache queue corresponding to the first media message based on the packet group type, and determine the message processing strategy to use the first message cache queue to cache the first media message, and the first priority of the first message cache queue matches the packet group type.
[0123] In one possible implementation, the packet group information also includes a packet group identifier, which indicates the packet group to which the first media message belongs. The processing unit 402 is used to: determine the first message cache queue corresponding to the first media message based on the packet group type and the packet group identifier, and the first message cache queue is used to cache messages in the packet group to which the first media message belongs.
[0124] In one possible implementation, the first network device maintains multiple message cache queues corresponding to the first priority, one message cache queue corresponding to the first priority corresponds to one packet group, and the multiple message cache queues corresponding to the first priority include: the first message cache queue and the second message cache queue. The device also includes: a sending unit, which is used to give priority to forwarding other messages in the first message cache queue when some messages in the first message cache queue have been forwarded and all messages in the second message cache queue have not been forwarded.
[0125] In one possible implementation, the first network device maintains multiple message cache queues corresponding to the first priority and multiple message cache queues corresponding to the second priority, the first priority being lower than the second priority, and the processing unit 402 is further used to: when the cache utilization of the first network device is higher than a preset utilization, discard part or all of the messages in the message cache queue corresponding to the first priority.
[0126] In a possible implementation, the processing unit 402 is configured to discard all messages in the third message cache queue corresponding to the first priority when a packet loss rate corresponding to the third message cache queue is higher than a preset packet loss rate.
[0127] In one possible implementation, the third message cache queue is the first message cache queue, and the packet group information also includes the number of packet groups, which indicates the total number of media messages included in the packet group to which the first media message belongs. The packet loss rate corresponding to the third message cache queue is determined based on the number of packet groups and the number of media messages that have been lost in the packet group to which the first media message belongs.
[0128] In one possible implementation, the packet group information includes a packet group type, and the packet group type indicates the type of packet group to which the first media packet belongs, and the first media packet belongs to a first media stream. The processing unit 402 is used to: if the available bandwidth corresponding to the first media stream is insufficient and the packet group type is a first preset packet group type, determine that the packet processing strategy is to discard the first media packet; or, if the available bandwidth corresponding to the first media stream is insufficient and the first packet group type is a second preset packet group type, determine that the packet processing strategy is to cache the first media packet, the first preset packet group type corresponds to a first importance level, the second preset packet group type corresponds to a second importance level, and the first importance level is lower than the second importance level.
[0129] In one possible implementation, the packet group information includes a packet group identifier, which indicates the packet group to which the first media message belongs. The processing unit 402 is used to: if the available bandwidth corresponding to the media stream to which the first media message belongs is insufficient and the flow table corresponding to the packet group identifier is not found, determine that the message processing strategy is to discard the first media message.
[0130] In one possible implementation, the processing unit 402 is used to: if the available bandwidth corresponding to the media stream to which the first media message belongs is insufficient, and the packet group type is a third preset packet group type, and the flow table corresponding to the packet group identifier is not found, then determine that the message processing strategy is to discard the first media message.
[0131] In a possible implementation, the type of the packet group to which the first media message belongs includes any one of the following: a service layer type, a transport layer type, an application layer type, or a coding layer type.
[0132] In a possible implementation, if the type of the packet group to which the first media message belongs is a coding layer type, the packet group to which the first media message belongs includes: a video frame.
[0133] Regarding the specific implementation of each unit of the apparatus 400, reference may be made to the above description of the steps performed by the first communication apparatus, which will not be repeated here.
[0134] The present application also provides a media message processing device, as shown in Figure 5, which is a schematic diagram of the structure of another media message processing device provided in the present application. The media message processing device 500 shown in Figure 5 can be applied to a second network device to execute the steps performed by the second network device in the above method embodiment.
[0135] In an example, the apparatus 500 includes: a receiving unit 501 , a processing unit 502 , and a sending unit 503 .
[0136] The receiving unit 501 is configured to receive a second media message;
[0137] The processing unit 502 is configured to determine packet group information based on the second media packet, the packet group information indicating attribute information of a packet group to which the second media packet belongs, the packet group including a plurality of media packets, and obtain, based on the second media packet and the packet group information, a first media packet including the packet group information;
[0138] The sending unit 503 is configured to send the first media message to the first network device.
[0139] In a possible implementation, the packet group information includes a packet group type, where the packet group type indicates a type of the packet group to which the second media packet belongs.
[0140] In a possible implementation, the type of the packet group to which the second media message belongs includes any one of the following: a service layer type, a transport layer type, an application layer type, or a coding layer type.
[0141] In a possible implementation, if the type of the packet group to which the second media message belongs is a coding layer type, the packet group to which the second media message belongs includes: a video frame.
[0142] In one possible implementation, the packet group information includes: a packet group identifier and / or a packet group quantity, wherein the packet group identifier indicates the packet group to which the first media packet belongs, and the packet group quantity indicates the total number of media packets included in the packet group to which the first media packet belongs.
[0143] For the specific implementation of each unit of the apparatus 500, reference may be made to the above description of the steps performed by the second communication apparatus, which will not be repeated here.
[0144] It should be noted that the hardware structure of the aforementioned media message processing devices 400 and 500 may be the structure shown in FIG6 , which is a schematic structural diagram of a device provided in an embodiment of the present application.
[0145] As shown in Figure 6 , device 600 includes a processor 610, a communication interface 620, and a memory 630. While the number of processors 610 in device 600 may be one or more, Figure 6 illustrates a single processor. In this embodiment of the present application, processor 610, communication interface 620, and memory 630 may be connected via a bus system or other means, with Figure 6 illustrating a connection via bus system 640 as an example.
[0146] Processor 610 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. Processor 610 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0147] Memory 630 may include volatile memory, such as random-access memory (RAM); non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or a combination of these types of memory. When device 600 corresponds to the aforementioned media message processing apparatus 400, memory 630 may, for example, store a first media message; when device 600 corresponds to the media message processing apparatus 500 shown in FIG. 5 , memory 630 may, for example, store a second media message.
[0148] Optionally, the memory 630 stores an operating system and programs, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the programs may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks. The processor 610 can read the programs in the memory 630 to implement the media message processing method provided in the embodiment of the present application.
[0149] Bus system 640 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Bus system 640 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG6 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0150] An embodiment of the present application further provides a computer-readable storage medium, including instructions or a computer program, which, when executed on a computer, enables the computer to execute the media message processing method provided in the above embodiment.
[0151] The embodiments of the present application also provide a computer program product comprising instructions or a computer program, which, when executed on a computer, enables the computer to execute the media message processing method provided in the above embodiments.
[0152] An embodiment of the present application further provides a communication system, which includes: a first network device and a second network device that execute the media message processing method provided by the above method embodiment.
[0153] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0154] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0155] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical business division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0156] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0157] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or software business units.
[0158] If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0159] Those skilled in the art will appreciate that, in one or more of the above examples, the services described herein can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these services can be stored on a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, including any medium that facilitates the transmission of computer programs from one location to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0160] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention.
[0161] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing media messages, It is characterized in that Applied to a first network device, the method comprises: receiving a first media message sent by a second network device, wherein the first media message includes packet group information, wherein the packet group information indicates attribute information of a packet group to which the first media message belongs, and the packet group includes a plurality of media messages; Determining a message processing strategy for the first media message according to the packet group information; The first media message is processed based on the message processing strategy of the first media message.
2. The method according to claim 1, It is characterized in that The packet group information includes a packet group type, where the packet group type indicates a type of a packet group to which the first media packet belongs, and determining a packet processing strategy for the first media packet according to the packet group information includes: According to the packet group type, a first message cache queue corresponding to the first media message is determined, and the message processing strategy is determined to use the first message cache queue to cache the first media message, and a first priority of the first message cache queue matches the packet group type.
3. The method according to claim 2, It is characterized in that The packet group information further includes a packet group identifier, where the packet group identifier indicates a packet group to which the first media packet belongs. Determining a first packet cache queue corresponding to the first media packet according to the packet group type includes: A first message cache queue corresponding to the first media message is determined according to the packet group type and the packet group identifier, where the first message cache queue is used to cache messages in the packet group to which the first media message belongs.
4. The method according to claim 3, It is characterized in that The first network device maintains a plurality of message cache queues corresponding to the first priority, one message cache queue corresponding to the first priority corresponds to one packet group, the plurality of message cache queues corresponding to the first priority include: the first message cache queue and a second message cache queue, and the method further includes: When some messages in the first message buffer queue have been forwarded and all messages in the second message buffer queue have not been forwarded, other messages in the first message buffer queue are forwarded preferentially.
5. The method according to claim 3, It is characterized in that The first network device maintains a plurality of message cache queues corresponding to the first priority and a plurality of message cache queues corresponding to a second priority, the first priority being lower than the second priority, and the method further comprising: When the cache utilization rate of the first network device is higher than a preset utilization rate, some or all of the messages in the message cache queue corresponding to the first priority are discarded.
6. The method according to claim 5, It is characterized in that The discarding of part or all of the messages in the message cache queue corresponding to the first priority includes: When the packet loss rate corresponding to the third message cache queue corresponding to the first priority is higher than the preset packet loss rate, all messages in the third message cache queue are discarded.
7. The method according to claim 6, It is characterized in that The third message cache queue is the first message cache queue, and the packet group information also includes the number of packet groups, which indicates the total number of media messages included in the packet group to which the first media message belongs. The packet loss rate corresponding to the third message cache queue is determined based on the number of packet groups and the number of media messages that have already been lost in the packet group to which the first media message belongs.
8. The method according to claim 1, It is characterized in that The packet group information includes a packet group type, the packet group type indicates a type of a packet group to which the first media packet belongs, the first media packet belongs to a first media stream, and determining a packet processing strategy for the first media packet according to the packet group information includes: If the available bandwidth corresponding to the first media stream is insufficient and the packet group type is a first preset packet group type, determining that the message processing strategy is to discard the first media message; or, If the available bandwidth corresponding to the first media stream is insufficient and the first packet group type is a second preset packet group type, the message processing strategy is determined to cache the first media message, the first preset packet group type corresponds to a first importance level, the second preset packet group type corresponds to a second importance level, and the first importance level is lower than the second importance level.
9. The method according to claim 1, It is characterized in that The packet group information includes a packet group identifier, where the packet group identifier indicates a packet group to which the first media packet belongs, and determining a packet processing strategy for the first media packet according to the packet group information includes: If the available bandwidth corresponding to the media flow to which the first media message belongs is insufficient and the flow table corresponding to the packet group identifier is not found, the message processing strategy is determined to discard the first media message.
10. The method according to claim 9, It is characterized in that If the available bandwidth corresponding to the first media flow is insufficient and the flow table corresponding to the packet group identifier is not found, determining that the message processing strategy is to discard the first media message includes: If the available bandwidth corresponding to the media flow to which the first media message belongs is insufficient, and the packet group type is a third preset packet group type, and the flow table corresponding to the packet group identifier is not found, the message processing strategy is determined to discard the first media message.
11. The method according to any one of claims 1 to 10, It is characterized in that The type of the packet group to which the first media message belongs includes any one of the following: Service layer type, transport layer type, application layer type, or coding layer type.
12. The method according to claim 11, It is characterized in that The type of the packet group to which the first media message belongs is a coding layer type, and the packet group to which the first media message belongs includes: Video frame.
13. A method for processing media messages, It is characterized in that Applied to the second network device, the method comprises: receiving a second media message; Determine packet group information according to the second media packet, the packet group information indicating attribute information of a packet group to which the second media packet belongs, the packet group including a plurality of media packets; Obtaining, according to the second media message and the packet group information, a first media message including the packet group information; Send the first media message to the first network device.
14. The method according to claim 13, It is characterized in that The packet group information includes a packet group type, and the packet group type indicates a type of the packet group to which the second media packet belongs.
15. The method according to claim 14, It is characterized in that The type of the packet group to which the second media message belongs includes any one of the following: Service layer type, transport layer type, application layer type, or coding layer type.
16. The method according to claim 15, It is characterized in that The type of the packet group to which the second media message belongs is a coding layer type, and the packet group to which the second media message belongs includes: Video frame.
17. The method according to any one of claims 13 to 16, It is characterized in that The package group information includes: A packet group identifier and / or a packet group quantity, wherein the packet group identifier indicates the packet group to which the first media packet belongs, and the packet group quantity indicates the total quantity of media packets included in the packet group to which the first media packet belongs.
18. A media message processing device, It is characterized in that Applied to a first network device, the apparatus comprises: A receiving unit, configured to receive a first media message sent by a second network device, wherein the first media message includes packet group information, wherein the packet group information indicates attribute information of a packet group to which the first media message belongs, and the packet group includes a plurality of media messages; A processing unit is used to determine a message processing strategy for the first media message according to the packet group information, and process the first media message based on the message processing strategy for the first media message.
19. A media message processing device, It is characterized in that Applied to a second network device, the apparatus comprises: A receiving unit, configured to receive a second media message; a processing unit, configured to determine packet group information according to the second media message, the packet group information indicating attribute information of a packet group to which the second media message belongs, the packet group including a plurality of media messages, and obtain a first media message including the packet group information according to the second media message and the packet group information; A sending unit is used to send the first media message to the first network device.
20. A device, It is characterized in that include: Processor and memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs to perform the method according to any one of claims 1 to 17.
21. A computer-readable storage medium, It is characterized in that The method comprises instructions or computer programs, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 17.
22. A communication system, It is characterized in that The communication system comprises: A first network device that executes the method described in any one of claims 1 to 12, and a second network device that executes the method described in any one of claims 13 to 17.
23. A computer program product, It is characterized in that The invention comprises a computer program which, when executed on a processor, executes the method according to any one of claims 1 to 17.
Citation Information
Patent Citations
Method and device for sending and receiving media and system
CN101651826A
Video transmission method and device
CN108174239A
Live broadcast service processing method and device
CN111866526A
Media message transmission method, device and system
CN113543216A
Data transmission method, device and equipment and computer readable storage medium
CN115209231A
Cited By
Packet forwarding method and apparatus, device, and computer-readable storage medium
WO2026076935A1
