Method, device, equipment and computer-readable storage medium for message flow control

By carrying indication information in the message and controlling the flow according to the message type, the problem of insufficient flexibility and accuracy of message traffic control in the existing technology is solved, and fine management of different types of messages is realized, and control is improved. Effect.

CN115150338BActive Publication Date: 2024-12-20HUAWEI TECH CO LTD
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202110336578.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-29
Publication Date
2024-12-20
Estimated Expiration
2041-03-29

AI Technical Summary

Technical Problem

In the prior art, the packet traffic is controlled by setting the Internet time, which has poor flexibility and accuracy, making it difficult to meet the fine flow control needs of different application types.

Method used

By carrying indicator information in the message, directly determine and control the traffic according to the message type, and use different processing methods to manage the traffic of different types of messages, including discarding or adjusting the transmission rate.

Benefits of technology

It improves the flexibility and accuracy of message traffic control, and can adopt corresponding processing methods according to different types of messages to achieve more detailed traffic management and improve control effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115150338B_ABST
    Figure CN115150338B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, device and computer-readable storage medium for message flow control. The method includes: a first device obtains a first message, and the first message carries indication information that can indicate the type of the first message; in response to the type of the first message being a type that requires flow control, the first device performs flow control on the first message according to the processing method corresponding to the type of the first message. The method is more efficient in determining the type of the first message based on the indication information that can indicate the type of the first message. Secondly, the method can implement flow control by adopting corresponding processing methods for different types of messages, with higher flexibility, higher accuracy of flow control and finer control granularity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a method, apparatus, device and computer-readable storage medium for message flow control. Background Art

[0002] With the development of communication technology, there are more and more types of applications relying on communication technology, such as online learning applications, game applications, and video applications. For any type of application, the corresponding functions of the application can be realized by transmitting the message of the application, thus generating corresponding message traffic.

[0003] In the related art, the message flow is controlled by setting the Internet access time for the device. Within the set Internet access time, the device can normally transmit messages of various applications. When the set Internet access time is exceeded, the device stops transmitting messages of various applications. It is not difficult to see that the message flow control achieved by setting the Internet access time is aimed at the overall message flow of the device, so the flexibility is poor and the control accuracy is not high. Summary of the invention

[0004] The present application proposes a method, apparatus, device and computer-readable storage medium for message flow control, which are used to control message flow, improve the flexibility and accuracy of message flow control, and have a finer control granularity.

[0005] In a first aspect, a method for message flow control is provided, and the method is introduced by taking a first device executing the method as an example. The first device obtains a first message, for example, the first message is an Internet protocol (IP) message; the first message carries indication information for indicating the type of the first message. In response to the type of the first message being a type that requires flow control, the first device performs flow control on the first message according to a processing method corresponding to the type of the first message. For example, the type of the identified first message is a game type, and the game type is a type that requires flow control, and the first device controls the message flow of the first message according to the processing method corresponding to the game type.

[0006] In the method of message flow control provided by the technical solution, the first device can directly determine the type of the first message based on the indication information carried by the first message that can indicate the type of the first message, without comparing other contents of the first message. The solution is highly efficient in determining the type of the first message. Secondly, in the case where the type of the first message is a type that requires flow control, it is possible to implement flow control by adopting corresponding processing methods for different types of messages. Since the solution adopts a corresponding processing method for the message according to the type of the message, the solution is highly flexible, the flow control is highly accurate, and the control granularity is fine.

[0007] In one possible implementation, the types that require flow control include game types, and the first device performs flow control on the first message according to a processing method corresponding to the type of the first message, including: the first device performs flow control on the first message according to a processing method corresponding to the game type.

[0008] In a possible implementation, the game type is a first type of game or a second type of game, the first type of game is a game type with a real-time index higher than an index threshold, and the second type of game is a game type with a real-time index lower than an index threshold; the first device controls the flow of the first message according to the processing method corresponding to the game type, including: in response to the first type of game being the first type of game, the first device determines whether to discard the first message according to a reference ratio, the reference ratio being a specified ratio of discarding messages of the first type of game; or in response to the first type of game being the second type of game, the first device transmits the first message at a first rate, and the real-time index corresponding to the first rate is lower than the real-time index of the second type of game. This solution can adopt corresponding processing methods for different game types of the first message, and has high flexibility.

[0009] In one possible implementation, the types that require flow control include video types, and the first device performs flow control on the first message according to the processing method corresponding to the type of the first message, including: the first device identifies the encoding type of the first message; based on the encoding type, identifies the forward prediction encoding frame in the first message, and discards the forward prediction encoding frame.

[0010] In one possible implementation, the types that require flow control include education types, and the first device performs flow control on the first message according to the processing method corresponding to the type of the first message, including: the first device transmits the first message at a second rate, and the second rate is higher than the initial transmission rate of the first message.

[0011] In one possible implementation, before responding to the type of the first message being a type that requires flow control, the method also includes: the first device obtains a flow control switch state; in response to the flow control switch state being an on state, the first device determines whether the type of the first message is a type that requires flow control.

[0012] In a second aspect, a method for message flow control is provided, and the method is introduced by taking a second device executing the method as an example. The second device receives a second message; the second device identifies the type of the second message; the second device adds indication information to the second message to generate a first message, and the indication information is used to indicate the type of the first message; the second device sends the first message to the first device.

[0013] In the method for message flow control provided by the technical solution, a first message carrying indication information for indicating the type of a first message is generated by a second device, and then the first message is sent to a first device. Since the first device can directly identify the type of the first message according to the indication information, the efficiency of identifying the type of the first message is improved.

[0014] In a possible implementation, the second device identifies the type of the second message, including: the second device obtains the first information of the second message, matches the first information with the second information in the model library, the model library includes multiple second information, each second information corresponds to a message type; in response to the first information successfully matching any second information in the multiple second information, the type of the message corresponding to any second information is determined as the type of the second message. This solution matches the first information of the second message with the second information of the corresponding message type, thereby identifying the type of the second message according to the second information that successfully matches.

[0015] In a possible implementation, the method further includes: the second device receives a third message, the type of the third message is different from the types of messages corresponding to the multiple second information in the model library, and the second information corresponding to the type of the third message is added to the model library. By adding the second information corresponding to the type of the third message to the model library, the model library can be made more complete, that is, the second information in the model library is more comprehensive, so that more types can be identified when the model library is used subsequently.

[0016] In a possible implementation, the first information includes at least one of quintuple information and priority information. According to different situations of the first information, the solution is more flexible in identifying the type of the second message according to the first information.

[0017] In a third aspect, a device for message flow control is provided, which is applied to a first device, and includes: a first acquisition module and a control module. The first acquisition module is used to acquire a first message, the first message carries indication information, and the indication information is used to indicate the type of the first message; the control module is used to respond to the type of the first message being a type that requires flow control, and to control the flow of the first message according to a processing method corresponding to the type of the first message.

[0018] In a possible implementation, the types that require flow control include game types, and the control module is used to perform flow control on the first message according to a processing method corresponding to the game type.

[0019] In a possible implementation, the game type is a first type of game type or a second type of game type, the first type of game type is a game type whose real-time index is higher than an index threshold, and the second type of game type is a game type whose real-time index is lower than an index threshold; the control module is used to determine whether to discard the first message according to a reference ratio in response to the type of the first message being the first type of game type, and the reference ratio is a specified ratio for discarding messages of the first type of game; or to transmit the first message at a first rate in response to the type of the first message being the second type of game type, and the real-time index corresponding to the first rate is lower than the real-time index of the second type of game type.

[0020] In a possible implementation, the types requiring flow control include video types, and the control module is used to identify the coding type of the first message; based on the coding type, identify the forward prediction coding frames in the first message, and discard the forward prediction coding frames.

[0021] In a possible implementation, the type requiring flow control includes an education type, and the control module is used to transmit the first message at a second rate, where the second rate is higher than an initial transmission rate of the first message.

[0022] In a possible implementation, the device further includes: a second acquisition module and a determination module. The second acquisition module is used to acquire the flow control switch state; the determination module is used to determine whether the type of the first message is a type that requires flow control in response to the flow control switch state being on.

[0023] In a fourth aspect, a device for message flow control is provided, which is applied to a second device, and includes: a receiving module, an identifying module, a generating module, and a sending module. The receiving module is used to receive a second message; the identifying module is used to identify the type of the second message; the generating module is used to add indication information to the second message to generate a first message, wherein the indication information is used to indicate the type of the first message; and the sending module is used to send the first message to the first device.

[0024] In one possible implementation, the identification module is used to obtain first information of the second message, match the first information with second information in a model library, the model library includes multiple second information, and each second information corresponds to a type of message; in response to a successful match between the first information and any second information among the multiple second information, the type of message corresponding to any second information is determined as the type of the second message.

[0025] In a possible implementation, the receiving module is also used to receive a third message, the type of the third message is different from the types of messages corresponding to multiple second information in the model library, and the second information corresponding to the type of the third message is added to the model library.

[0026] In a possible implementation manner, the first information includes at least one of quintuple information and priority information.

[0027] In a fifth aspect, a device for message flow control is provided, the device comprising: a processor, the processor being coupled to a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor, so that the device implements a method for message flow control as described in any one of the first aspect or the second aspect.

[0028] In a sixth aspect, a system for message flow control is provided, the system comprising: a first device and a second device. The first device is used to execute the message flow control method of the first aspect or any one of the first aspects; the second device is used to execute the message flow control method of the second aspect or any one of the second aspects.

[0029] In the seventh aspect, a computer-readable storage medium is provided, in which at least one program instruction or code is stored, and the program instruction or code is loaded and executed by a processor to enable a computer to implement a method for message flow control as in the first aspect or any one of the first aspect, or to implement a method for message flow control as in the second aspect or any one of the second aspect.

[0030] In an eighth aspect, a communication device is provided, the device comprising: a communication interface, a memory, and a processor. The memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the communication interface to receive data and control the communication interface to send data, and when the processor executes the instructions stored in the memory, the processor executes the method for message flow control in the first aspect or any possible implementation of the first aspect, or executes the method for message flow control in the second aspect or any possible implementation of the second aspect.

[0031] As an exemplary embodiment, the number of the processors is one or more, and the number of the memories is one or more.

[0032] As an exemplary embodiment, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0033] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips respectively. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0034] In a ninth aspect, a computer program (product) is provided, wherein the computer program (product) includes: a computer program code, and when the computer program code is executed by a computer, the computer executes the method for message flow control in the above aspects.

[0035] In the tenth aspect, a chip is provided, comprising a processor, for calling and executing instructions stored in a memory from the memory, so that a device equipped with the chip executes the method of message flow control in the above aspects.

[0036] In the eleventh aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method of message flow control in the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a network scenario diagram of a method for message flow control provided by an embodiment of the present application;

[0038] Figure 2 This is a flow chart of a method for message flow control provided by an embodiment of the present application;

[0039] Figure 3 This is a schematic diagram of the structure of an IP message header provided in an embodiment of the present application;

[0040] Figure 4 This is a flow chart of a method for message flow control provided by an embodiment of the present application;

[0041] Figure 5 This is a schematic diagram of the structure of an RTP header provided in an embodiment of the present application;

[0042] Figure 6 This is a flow chart of a method for message flow control provided by an embodiment of the present application;

[0043] Figure 7 This is a schematic diagram of the structure of another IP message header provided in an embodiment of the present application;

[0044] Figure 8 It is a structural schematic diagram of a message flow control device provided in an embodiment of the present application;

[0045] Fig. 9 It is a structural schematic diagram of another packet flow control device provided in an embodiment of the present application;

[0046] Fig.10It is a structural diagram of a message flow control device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The terms used in the implementation mode of the present application are only used to explain the embodiments of the present application, and are not intended to limit the present application. The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0048] The present invention provides a method for controlling packet flow. Figure 1 In the network scenario shown in Figure 1 As shown, the network scenario includes a first device 101, a second device 102, and a third device 103, wherein the second device 102 is a network device in the first transmission network, and the third device 103 is a network device in the second transmission network. The first device 101 and the second device 102 can exchange information through the first transmission network, and the first device 101 and the third device 103 can exchange information through the second transmission network to achieve message transmission.

[0049] For example, in the embodiment of the present application, the first device 101 includes but is not limited to a router, a switch, a server, etc., the second device 102 includes but is not limited to a router, a switch, a server, etc., and the third device 103 includes but is not limited to electronic devices such as a terminal. Figure 1 The network scenario shown may include multiple second devices 102 and / or multiple third devices 103. Figure 1 In the description, only one second device 102 and one third device 103 are taken as examples.

[0050] Combination Figure 1 In the network scenario shown in FIG. 1 , the method for controlling message flow provided in the embodiment of the present application is as follows: Figure 2 As shown, including but not limited to step 201 and step 202.

[0051] Step 201: A first device obtains a first message, where the first message carries indication information, where the indication information is used to indicate a type of the first message.

[0052] The first device receives the first message through the first transmission network, corresponding to Figure 1 In the network scenario shown, a first device receives a first message sent by a second device through a first transmission network.

[0053] In a possible implementation, the indication information is carried in the indication field, and the first message carries the indication information by carrying the indication field. Exemplarily, the type of the first message indicated by the indication information includes, but is not limited to: game type, video type, and education type. Exemplarily, the game type is a first type of game type or a second type of game type. Among them, the first type of game type is a game type whose real-time index is higher than the index threshold, for example, a multiplayer online battle arena (MOBA); the second type of game type is a game type whose real-time index is lower than the index threshold, for example, a role-playing game (RPG) or a card game. Among them, the real-time index includes an operation feedback delay, and the index threshold can be a set value based on experience. For example, if the index threshold is 50 milliseconds (ms), and the real-time index of the first type of game type is less than 50ms, then the real-time index of the first type of game type is higher than the index threshold, and the real-time index of the first type of game type is high; if the real-time index of the second type of game type is greater than 50ms, then the real-time index of the second type of game type is lower than the index threshold, and the real-time index of the second type of game type is low. Exemplarily, when the value of the indication field is 0x01, that is, the indication information is 0x01, it indicates that the type of the first message is the first category game type; when the value of the indication field is 0x02, that is, the indication information is 0x02, it indicates that the type of the first message is the second category game type; when the value of the indication field is 0x03, that is, the indication information is 0x03, it indicates that the type of the first message is the video type; when the value of the indication field is 0x04, that is, the indication information is 0x04, it indicates that the type of the first message is the education type.

[0054] Exemplarily, the first message is an IP message, and the first message includes an IP message header and an IP data portion. The structure of the IP message header is as follows: Figure 3As shown, the IP message header carries an indication field, which carries indication information, and the length of the indication field does not exceed 32 bits. When the length of the indication field is less than 32 bits, a padding value is added to the IP message header so that the sum of the length of the indication field and the length of the padding value is 32 bits. For example, the length of the indication field is 16 bits, the length of the padding value is 16 bits, and the padding value can be 0. Of course, the length of the indication field can also be 32 bits. When the length of the indication field is 32 bits, there is no need to add a padding value to the IP message header. In addition, the IP message header also includes: version, which is 4 bits long and is used to indicate the version of the IP protocol; header length, which is 4 bits long and is used to indicate the protocol header length of the message; service type, which is 8 bits long and is used to carry the priority information of the message; total length, which is 16 bits long and is used to indicate the byte length of the message; identification, which is 16 bits long and is used to identify segmented messages belonging to the same message; mark, which is 3 bits long and is used to indicate whether the message is a segmented message and whether the message can be segmented; segment offset, which is 13 bits long and is used to indicate the relative position of the segmented message in the source message; life time, which is 8 bits long and is used to control the loop process of the message; transport layer protocol, which is 8 bits long and is used to identify the transport layer protocol applied to the data part of the message; header checksum, which is 16 bits long and is used to ensure the integrity of the IP protocol header; source IP address, which is 32 bits long and is used to identify the device sending the message; destination IP address, which is 32 bits long and is used to identify the device receiving the message.

[0055] It should be noted that the type of the first message may also be other types. When the first message is an IP message, the structure of the IP message header may also be other structures carrying an indication field. Figure 3 The IP packet header structure shown is for illustration only and is not limited to this embodiment of the present application.

[0056] In a possible implementation, the first device determines the type of the first message according to the indication information. When the first message carries the indication information for indicating the type of the first message, the first device can directly determine the type of the first message through the indication information without comparing other contents of the first message, so the method of determining the type of the first message is more efficient. Exemplarily, the first device identifies the indication field carried by the first message, and the indication field carries the indication information; the first device identifies the indication information, and determines the type of the first message according to the identified indication information. For example, the identified indication information is 0x01, and according to the indication information, the type of the first message is determined to be the first type of game type; the identified indication information is 0x02, and according to the indication information, the type of the first message is determined to be the second type of game type; the identified indication information is 0x03, and according to the indication information, the type of the first message is determined to be the video type; the identified indication information is 0x04, and according to the indication information, the type of the first message is determined to be the education type. Since the indication information can directly indicate the type of the first message, the type of the message can be quickly determined through the indication information.

[0057] Step 202: In response to the type of the first message being a type that requires flow control, the first device performs flow control on the first message according to a processing method corresponding to the type of the first message.

[0058] Among them, the types that need to be flow controlled include but are not limited to game types, video types and educational types, wherein the game types are first-class game types or second-class game types. The types that need to be flow controlled can be configured in advance, for example, which types are configured in advance as types that need to be flow controlled according to different application scenarios. After configuring the types that need to be flow controlled, they can also be adjusted according to different application scenarios. The embodiment of the present application does not limit the configuration method and configuration timing of the types that need to be flow controlled.

[0059] Exemplarily, the first device matches the type of the first message with the type that needs to be flow controlled, and determines whether the type of the first message is the type that needs to be flow controlled. In response to the type of the first message successfully matching the type that needs to be flow controlled, the type of the first message is the type that needs to be flow controlled, and flow control is performed on the first message according to the processing method corresponding to the type of the first message. For example, the type of the first message is a game type, and in response to the game type being the type that needs to be flow controlled, the type of the first message successfully matches the type that needs to be flow controlled, and flow control is performed on the first message according to the processing method corresponding to the game type. Optionally, in response to the type of the first message failing to match the type that needs to be flow controlled, the type of the first message is not the type that needs to be flow controlled, and the first device does not perform flow control on the first message. Exemplarily, a successful match refers to consistent types, and a failed match refers to inconsistent types.

[0060] In one possible implementation, Figure 4 As shown, for first message types that require different flow control, the first device performs flow control on the first message according to the processing method corresponding to the type of the first message, including but not limited to the following three situations.

[0061] Case 1: The type of the first message is game type.

[0062] In the case where the type of the first message is a game type, the first device controls the flow of the first message according to the processing method corresponding to the game type. Since the game type is the first game type or the second game type, for situation one, in response to the type of the first message being the first game type, the first device determines whether to discard the first message according to the reference ratio, and the reference ratio is a specified ratio of discarding messages of the first game type. Among them, the reference ratio can be flexibly set according to experience or usage requirements, and the embodiment of the present application does not limit this. For example, if the reference ratio is 75%, then in every four first messages, the first device normally transmits three of them and discards one message. Therefore, by determining whether to discard the first message according to the reference ratio, the first device can save the processing time of the first device and improve the efficiency of message flow control while reducing the user's gaming experience. Of course, the reference ratio can also be 100%, that is, the first device discards all messages of the first game type, and the embodiment of the present application does not limit the reference ratio. By determining whether to discard the first message according to the reference ratio, the first device can reduce the message flow of transmitting the first message.

[0063] Exemplarily, in response to the type of the first message being the first type of game, before the first device determines whether to discard the first message according to a reference ratio, the method further includes: the first device monitors whether the message flow of the first message reaches a set threshold, and in response to the message flow of the first message reaching the set threshold, the first device determines whether to discard the first message according to the reference ratio. Among them, the set threshold can be flexibly set according to experience or usage requirements, and the embodiments of the present application are not limited to this. Since the real-time index of the first type of game is high, when the user plays the game of the first type of game, the message flow of the message generated by the game is usually high; when the user only opens the game interface of the game of the first type of game, but does not play the game, the message flow of the message generated by the game is usually low; by monitoring whether the message flow of the first message reaches the set threshold, the method is more flexible in controlling the message flow.

[0064] Optionally, in response to the type of the first message being a second type of game, the first device transmits the first message at a first rate, and the real-time index corresponding to the first rate is lower than the real-time index of the second type of game. Among them, the first rate can be flexibly set according to experience or usage requirements, and the embodiments of the present application are not limited to this. For example, the real-time index of the second type of game is 100ms, and the first device transmits the first message at a first rate corresponding to a real-time index of 200ms. By transmitting the first message at a first rate corresponding to a real-time index lower than the real-time index of the second type of game, when the user is playing a game of the second type of game, an operation delay will occur, reducing the user's gaming experience.

[0065] Case 2: The type of the first message is video type.

[0066] For situation 2, the first device performs flow control on the first message according to a processing method corresponding to the video type, including but not limited to steps 2021 and 2022.

[0067] Step 2021: The first device identifies the encoding type of the first message.

[0068] Exemplarily, the first message is an IP message, the transport layer protocol is a real-time transport protocol (RTP), and the IP data portion of the first message carries an RTP header and a payload. The RTP header carries a payload type (PT), and the payload carries encoding parameters and image frames. Figure 5In the RTP header shown, the PT length is 7 bits, which is used to indicate the encoding type adopted by the payload, for example, the encoding type is moving picture experts group (MPEG) 4 algorithm encoding or H264 algorithm encoding. In addition, the RTP header also includes: version (V), 2 bits in length, used to indicate the version of RTP; padding flag (P), 1 bit in length, used to indicate whether the end of the message needs to be padded with additional octets; extension flag (X), 1 bit in length, used to indicate that there is an extension header after the RTP header; contributing source (CSRC) counter (CC), 4 bits in length, used to indicate the number of CSRC identifiers; mark (M), 1 bit in length, used to allow marking of important events; sequence number (SN), 16 bits in length, used to identify the sequence number; timestamp (timestamp), 32 bits in length; synchronization source (SSRC) identifier, 32 bits in length, used to identify the synchronization source; CSRC identifier, 32 bits in length, used to identify the contributing source.

[0069] Step 2022: Based on the coding type, the first device identifies a forward predictive coding frame (P frame) in the first message, and the first device discards the P frame.

[0070] The first device identifies the P frame in the first message by identifying the coding parameters carried by the payload. Exemplarily, if the coding type is MPEG4 algorithm coding, the coding parameters include the frame start and the frame type adjacent to the frame start. For example, the frame start is 000001b6, and when the frame type is 00, it indicates that the image frame carried by the payload is an intra-frame coded frame (I frame); when the frame type is 01, it indicates that the image frame carried by the payload is a P frame; when the frame type is 02, it indicates that the image frame carried by the payload is a bidirectional predictive coded frame (B frame).

[0071] Exemplarily, if the encoding type is H264 algorithm encoding, the encoding parameters include a group of pictures (GOP), and the GOP has a frame structure. According to the frame structure of the GOP, the first device identifies the P frame in the first message. For example, the frame structure of the GOP is IBBPBPBBPBBBB, that is, the 4th image frame, the 7th image frame, the 10th image frame and the 13th image frame in the picture group are P frames. Exemplarily, the first device can discard a target number of P frames, and the target number can be flexibly set according to experience or usage requirements, and the embodiment of the present application does not limit this. For example, the frame structure of the GOP is the above-mentioned IBBPBBPBBPBBPBB, and the target number is 1. The first device can discard any one of the 4th image frame, the 7th image frame, the 10th image frame and the 13th image frame. Of course, the first device can also discard all P frames. By discarding the target number of P frames, it is possible to save the processing time of the first device and improve the efficiency of message flow control while reducing the user viewing experience.

[0072] Case 3: The type of the first message is education type.

[0073] For situation three, the first device performs flow control on the first message according to the processing method corresponding to the education type, including: the first device transmits the first message at a second rate, and the second rate is higher than the initial transmission rate of the first message. Among them, the second rate can be flexibly set according to experience or usage requirements, and the embodiment of the present application is not limited to this. For example, the initial transmission rate of the first message is 10 megabits per second (Mbps), and the first device transmits the first message at a second rate, and the second rate is 12Mbps. By transmitting the first message at a rate higher than the initial transmission rate of the first message, the process will be smoother when the user receives online education, thereby improving the user experience.

[0074] In a possible implementation of the present application, the first device is provided with a flow control switch, and the flow control switch is used to control whether to execute the message flow control method provided in the embodiment of the present application, so that the flow control of the message is more in line with actual needs. Exemplarily, the first device can store flow control switch status information, and the flow control switch status information is used to indicate the flow control switch status. The flow control switch status includes an open state or a closed state. The open state means that the flow control is turned on, and the closed state means that the flow control is turned off. Therefore, the first device can obtain the flow control switch status by obtaining the flow control switch status information. For example, when the flow control switch status information is 0, it indicates that the flow control switch status is in the closed state; when the flow control switch status information is 1, it indicates that the flow control switch status is in the open state. Exemplarily, before step 202, the method also includes: the first device obtains the flow control switch status; in response to the flow control switch status being in the open state, the first device determines whether the type of the first message is a type that requires flow control.

[0075] In addition, the embodiment of the present application does not limit the timing of the first device acquiring the flow control switch state. For example, the flow control switch state can be periodically acquired, and the length of the cycle can be set based on the application scenario or experience. For example, the length of the cycle is one hour, and the first device acquires the flow control switch state every hour. Optionally, in addition to the method of periodically acquiring the flow control switch state, the acquisition of the flow control switch state can also be triggered according to the update of the flow control switch state. For example, when the flow control switch is updated from the closed state to the open state, the first device detects the update instruction of the flow control switch state, and the first device executes the operation of acquiring the flow control switch state. Or, after the flow control switch is turned on, if the flow control switch is turned off again, the flow control switch state is updated from the open state to the closed state, then the first device acquires the update instruction of the flow control switch state, and the first device executes the operation of acquiring the flow control switch state based on the update instruction. In addition, the first device can display a prompt message, and the prompt message is used to prompt the user whether to turn on the flow control switch. For example, the first device periodically displays the prompt message, and the prompt cycle can be set according to the use needs.

[0076] The method provided in the embodiment of the present application can directly determine the type of the first message according to the indication information carried by the first message that can indicate the type of the first message, without comparing other contents of the first message. The scheme of the present application is more efficient in determining the type of the first message. Secondly, in the case where the type of the first message is a type that requires flow control, it is possible to implement flow control by adopting corresponding processing methods for different types of messages. Since the scheme of the present application adopts a corresponding processing method for the message according to the type of the message, the scheme of the present application is more flexible, the flow control is more accurate, and the control granularity is finer.

[0077] Combination Figure 1 The network scenario shown, Figure 6 A flowchart of a method for message flow control provided by another exemplary embodiment of the present application is shown. Figure 2 In the embodiment shown, steps 203 to 206 are added before step 201 to enable the first message to carry indication information for indicating the type of the first message. Figure 6 As shown, the method for message flow control includes the following steps.

[0078] Step 203: The second device receives the second message.

[0079] Wherein, the second device receives the second message through the first transmission network. Exemplarily, the second message includes the first information, and the first information may include at least one of the five-tuple information and the priority information. Wherein, the five-tuple information includes the source IP address, the source port, the destination IP address, the destination port and the transport layer protocol. Wherein, the transport layer protocol includes but is not limited to: any one of the transmission control protocol (TCP), the user datagram protocol (UDP) and RTP. The priority information includes but is not limited to: any one of the IP priority, the type of service (TOS) priority and the differentiated services code point (DSCP) priority; wherein the types of DSCP priority include: class selector (CS), expedited forwarding (EF), assured forwarding (AF) 1 to 4 and default (BE).

[0080] Exemplarily, the second message is an IP message, and the second message includes an IP message header and an IP data portion. The IP message header carries the source IP address, the destination IP address, the transport layer protocol, and the priority information, and the IP data portion carries the source port and the destination port. The structure of the IP message header is as follows: Figure 7 As shown, the various parts of the IP packet header are Figure 3 The corresponding parts of the IP message header shown in the figure have the same principle and will not be described here. It should be noted that when the second message is an IP message, the structure of the IP message header can also be other structures including the source IP address, the destination IP address, the transport layer protocol and the priority information. In the embodiment of the present application, only the second message is an IP message, and the IP message header is Figure 7 The IP packet header structure shown is for illustration only and is not limited to this embodiment of the present application.

[0081] Taking the example that the first information includes quintuple information and priority information, the following Table 1 is a table of the first information included in the second message provided in an embodiment of the present application, and each second message includes one first information in the following Table 1.

[0082] Table 1

[0083]

[0084] In the above Table 1, when the second message includes the first information numbered 1, the five-tuple information included in the first information includes the source IP address A1, the destination IP address B1, the source port C1, the destination port D1, and the transport layer protocol UDP, and the priority information included in the first information is AF3. When the second message includes other first information in Table 1, the principle is the same as that of the second message including the above-mentioned first information numbered 1, which will not be repeated here. It should be noted that the first information included in the second message shown in the above Table 1 is only the first information illustrated in the embodiment of the present application. For any second message, the second message may include other five-tuple information and / or priority information, which is not limited to the embodiment of the present application.

[0085] Step 204: The second device identifies the type of the second message.

[0086] Exemplarily, the second device obtains the first information of the second message, matches the first information with the second information in the model library, the model library includes multiple second information, each second information corresponds to a message type; in response to the first information successfully matching any second information in the multiple second information, the type of the message corresponding to any second information is determined as the type of the second message. Exemplarily, the model library is an embedded artificial intelligence (eAI) model library. The following Table 2 shows the eAI model library.

[0087] Table 2

[0088]

[0089] In the above Table 2, the model library of the eAI includes multiple second information, and each second information includes quintuple information and priority information. The quintuple information and priority information included in the second information are respectively the same as the quintuple information and priority information included in the first information in the above Table 1, and will not be repeated here. In the above Table 2, the type of message corresponding to the second information numbered 1 is the first type of game type, and the real-time index of the first type of game type is high. It should be noted that the model library of the eAI shown in the above Table 2 can include more types of messages. For any type of message, more second information can correspond. For example, for the first type of game, three or more second information can correspond. The embodiment of the present application does not limit this.

[0090] Exemplarily, matching the first information with the second information in the model library includes but is not limited to the following three situations.

[0091] Case 1: The first information only includes quintuple information.

[0092] For situation one, the five-tuple information included in the first information is matched with the five-tuple information included in the second information; in response to the five-tuple information included in the first information and the five-tuple information included in the second information being matched successfully, the second information is used as the second information that has been matched successfully. For example, in response to the five-tuple information included in the first information being the same as the five-tuple information included in the second information, the first information is matched successfully with the second information. For example, the five-tuple information included in the first information is source IP address A1, destination IP address B1, source port C1, destination port D1, and transport layer protocol UDP; the five-tuple information included in the first information is matched with the second information in the model library, in response to the five-tuple information of the first information being matched successfully with the second information including the five-tuple information of source IP address A1, destination IP address B1, source port C1, destination port D1, and transport layer protocol UDP, the type of the message corresponding to the second information is the first type of game type, and the first type of game type is determined as the type of the second message.

[0093] Optionally, in response to any part of the five-tuple information included in the first information being different from the corresponding part of the five-tuple information included in the second information, the first information fails to match the second information. For example, the five-tuple information included in the first information is source IP address A1, destination IP address B2, source port C1, destination port D1, and transport layer protocol UDP; the five-tuple information included in the second information is source IP address A1, destination IP address B1, source port C1, destination port D1, and transport layer protocol UDP; in response to the destination IP address in the first information being different from the target IP address in the second information, the first information fails to match the second information.

[0094] Case 2: The first information only includes priority information.

[0095] For situation 2, the priority information included in the first information is matched with the priority information included in the second information; in response to the priority information included in the first information and the priority information included in the second information being successfully matched, the second information is used as the second information that has been successfully matched. For example, in response to the priority information included in the first information being the same as the priority information included in the second information, the first information is successfully matched with the second information. Optionally, in response to the priority information included in the first information being different from the priority information included in the second information, the first information fails to match with the second information.

[0096] Case 3: The first information includes quintuple information and priority information.

[0097] For situation three, the five-tuple information included in the first information is matched with the five-tuple information included in the second information; in response to the five-tuple information included in the first information and the five-tuple information included in the second information being matched successfully, the priority information included in the first information is matched with the priority information included in the second information; in response to the priority information included in the first information and the priority information included in the second information being matched successfully, the second information is used as the second information that has been successfully matched. Among them, the manner of matching the five-tuple information included in the first information with the five-tuple information included in the second information, and the manner of matching the priority information included in the first information with the priority information included in the second information are respectively the same as the manner of matching in situation one and situation two, and are not repeated here. In addition, the priority information included in the first information may also be matched with the priority information included in the second information first; in response to the priority information included in the first information and the priority information included in the second information being matched successfully, the five-tuple information included in the first information is matched with the five-tuple information included in the second information; in response to the five-tuple information included in the first information and the five-tuple information included in the second information being matched successfully, the second information is used as the second information that has been successfully matched.

[0098] Step 205: The second device adds indication information to the second message to generate a first message, where the indication information is used to indicate the type of the first message.

[0099] Exemplarily, the second message is an IP message, and the second device adds an indication field to the IP message header of the second message, and carries the indication information through the indication field; based on the IP message header with the indication field added, the second device generates the first message. Exemplarily, the structure of the IP message header with the indication field added, the way the indication field carries the indication information, and the way the indication information indicates the type of the first message are respectively the same as the structure of the IP message header, the way the indication field carries the indication information, and the way the indication information indicates the type of the first message in step 201, and are not repeated here.

[0100] It should be noted that the second message may also be other types of messages. When the second message is an IP message, the structure of the IP message header may also be other structures carrying indication fields, which is not limited in the embodiments of the present application.

[0101] Step 206: The second device sends a first message to the first device.

[0102] The second device sends the first message to the first device through the first transmission network.

[0103] In a possible implementation, the method further includes: the second device receives a third message, the type of the third message is different from the types of messages corresponding to multiple second information in the model library, and the second information corresponding to the type of the third message is added to the model library. Since the type of the third message is different from the type of the message corresponding to the second information in the model library, it means that there is no second information corresponding to the type of the third message in the model library, and thus by adding the second information corresponding to the type of the third message to the model library, the model library can be made more complete, that is, the second information in the model library is made more comprehensive, so that more types can be identified when the model library is used later.

[0104] The method provided in the embodiment of the present application generates a first message carrying indication information for indicating the type of the first message through a second device, and then sends the first message to the first device. The first device can directly determine the type of the first message based on the indication information without comparing other contents of the first message. The scheme of the present application is highly efficient in determining the type of the first message. Secondly, in the case where the type of the first message is a type that requires flow control, it is possible to implement flow control by adopting corresponding processing methods for different types of messages. Since the scheme of the present application adopts a corresponding processing method for the message according to the type of the message, the scheme of the present application is highly flexible, the flow control is highly accurate, and the control granularity is fine.

[0105] The embodiment of the present application also provides a device for message flow control. Figure 8 Schematic diagram of the structure of a packet flow control device provided in an embodiment of the present application. Figure 8 As shown in the following multiple modules, the Figure 8 The packet flow control device shown can perform all or part of the operations performed by the first device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Figure 8 As shown, the device includes: a first acquisition module 801 and a control module 802.

[0106] Optionally, the first acquisition module 801 is used to acquire a first message, the first message carries indication information, and the indication information is used to indicate the type of the first message; the control module 802 is used to respond to the type of the first message being a type that requires flow control, and perform flow control on the first message according to a processing method corresponding to the type of the first message.

[0107] Optionally, the types requiring flow control include game types, and the control module 802 is used to perform flow control on the first message according to a processing method corresponding to the game type.

[0108] Optionally, the game type is a first type of game type or a second type of game type, the first type of game type is a game type whose real-time index is higher than an index threshold, and the second type of game type is a game type whose real-time index is lower than an index threshold; the control module 802 is used to determine whether to discard the first message according to a reference ratio in response to the type of the first message being the first type of game type, and the reference ratio is a specified ratio for discarding messages of the first type of game; or to transmit the first message at a first rate in response to the type of the first message being the second type of game type, and the real-time index corresponding to the first rate is lower than the real-time index of the second type of game type.

[0109] Optionally, the type requiring flow control includes a video type, and the control module 802 is used to identify the coding type of the first message; based on the coding type, identify the forward prediction coding frame in the first message, and discard the forward prediction coding frame.

[0110] Optionally, the type requiring flow control includes an education type, and the control module 802 is used to transmit the first message at a second rate, where the second rate is higher than an initial transmission rate of the first message.

[0111] Optionally, the device further comprises: a second acquisition module and a determination module. The second acquisition module is used to acquire the flow control switch state; the determination module is used to determine whether the type of the first message is a type that requires flow control in response to the flow control switch state being on.

[0112] Fig. 9 Schematic diagram of the structure of a packet flow control device provided in an embodiment of the present application. Fig. 9 As shown in the following multiple modules, the Fig. 9 The packet flow control device shown can perform all or part of the operations performed by the second device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Fig. 9 As shown, the device includes: a receiving module 901, an identification module 902, a generating module 903 and a sending module 904.

[0113] In one possible implementation, a receiving module 901 is used to receive a second message; an identifying module 902 is used to identify the type of the second message; a generating module 903 is used to add indication information in the second message to generate a first message, wherein the indication information is used to indicate the type of the first message; and a sending module 904 is used to send the first message to the first device.

[0114] In one possible implementation, the identification module 902 is used to obtain the first information of the second message, match the first information with the second information in a model library, the model library includes multiple second information, and each second information corresponds to a type of message; in response to the first information successfully matching with any second information among the multiple second information, the type of the message corresponding to any second information is determined as the type of the second message.

[0115] In a possible implementation, the receiving module 901 is also used to receive a third message, the type of the third message is different from the types of messages corresponding to multiple second information in the model library, and the second information corresponding to the type of the third message is added to the model library.

[0116] In a possible implementation manner, the first information includes at least one of quintuple information and priority information.

[0117] It should be understood that the above Figure 8 and Fig. 9When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0118] An embodiment of the present application provides a device for message flow control, the device comprising: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, the at least one program instruction or code is loaded and executed by the processor, so that the device for message flow control implements the method in the above method embodiment.

[0119] See also Fig.10 , Fig.10 A schematic diagram of the structure of a packet flow control device 1000 provided by an exemplary embodiment of the present application is shown. Fig.10 The packet flow control device 1000 shown is used to perform the above Figure 2 , Figure 4 and Figure 6 Operations involved in the method for message flow control shown. The device 1000 for message flow control is, for example, a network device such as a switch or a router. The hardware structure of the device 1000 for message flow control includes a communication interface 1001 and a processor 1002. Optionally, the communication interface 1001 and the processor 1002 are connected via a bus 1004. Among them, the communication interface 1001 is used to transmit a first message, a second message, and a third message, and the processor may store instructions or program codes, and execute the functions performed by the above-mentioned first device or the functions performed by the second device by calling the instructions or program codes. Optionally, the device for message flow control also includes a memory 1003, in which instructions or program codes are stored, and the processor 1002 is used to call the instructions or program codes in the memory 1003 so that the device for message flow control performs the relevant processing steps of the first device in the above-mentioned method embodiment, or executes the relevant processing steps of the second device in the above-mentioned method embodiment.

[0120] Exemplarily, the processor 1002 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 1002 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0121] Optionally, bus 1004 is used to transmit information between components of the packet flow control device 1000. Bus 1004 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. Bus 1004 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus. Fig.10 In addition to being connected by the bus 1004, the components of the device 1000 for controlling message flow may also be connected by other means, and the embodiment of the present invention does not limit the connection method of the components.

[0122] The memory 1003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1003 is, for example, independent and connected to the processor 1002 via a bus. The memory 1003 can also be integrated with the processor 1002.

[0123] The communication interface 1001 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, a radio access network (RAN) or a wireless local area network (WLAN), etc. The communication interface 1001 may include a wired communication interface and may also include a wireless communication interface. Specifically, the communication interface 1001 may be an Ethernet interface, a fast Ethernet (FE) interface, a gigabit Ethernet (GE) interface, an asynchronous transfer mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 1001 may be used for the device 1000 for message flow control to communicate with other devices.

[0124] In a specific implementation, as an embodiment, the processor 1002 may include one or more CPUs. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0125] In a specific implementation, as an embodiment, the packet flow control device 1000 may include multiple processors. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0126] In a specific implementation, as an embodiment, the packet flow control device 1000 may also include an output device and an input device. The output device communicates with the processor 1002 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 1002 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0127] In some embodiments, the memory 1003 is used to store the program code for executing the solution of the present application, and the processor 1002 can execute the program code stored in the memory 1003. That is, the device 1000 for message flow control can implement the method for message flow control provided by the method embodiment through the processor 1002 and the program code in the memory 1003. The program code may include one or more software modules. Optionally, the processor 1002 itself may also store the program code or instruction for executing the solution of the present application.

[0128] In a specific embodiment, the packet flow control device 1000 of the embodiment of the present application may correspond to the first device in each of the above-mentioned method embodiments, and the processor 1002 in the packet flow control device 1000 reads the program code in the memory 1003 or the program code or instruction stored in the processor 1002 itself, so that Fig.10 The packet flow control device 1000 shown can execute all or part of the operations executed by the first device.

[0129] In a specific embodiment, the packet flow control device 1000 of the embodiment of the present application may correspond to the second device in each of the above-mentioned method embodiments, and the processor 1002 in the packet flow control device 1000 reads the program code in the memory 1003 or the program code or instruction stored in the processor 1002 itself, so that Fig.10 The packet flow control device 1000 shown can execute all or part of the operations executed by the second device.

[0130] The packet flow control device 1000 may also correspond to the above Figure 8 and Fig. 9 The device shown, Figure 8 and Fig. 9 Each functional module in the device shown is implemented using software of the packet flow control device 1000. In other words, Figure 8 and Fig. 9 The functional modules included in the device shown are generated after the processor 1002 of the packet flow control device 1000 reads the program code stored in the memory 1003.

[0131] in, Figure 2 , Figure 4 and Figure 6 Each step of the method for message flow control shown is completed by the hardware integrated logic circuit or software instructions in the processor of the message flow control device 1000. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in the processor for execution. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0132] The embodiment of the present application also provides a system for message flow control, the system comprising: a first device and a second device; the first device is used to execute Figure 2 , Figure 4 and Figure 6 The method performed by the first device shown, the second device is used to perform Figure 6 The method is performed by the second device shown.

[0133] The functions of the first device and the second device of the system can be referred to above. Figure 2 , Figure 4 and Figure 6 The relevant descriptions shown will not be repeated here one by one.

[0134] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0135] Further, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0136] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (DR RAM).

[0137] A computer-readable storage medium is also provided, wherein the storage medium stores at least one program instruction or code, and when the program instruction or code is loaded and executed by a processor, the computer implements the above Figure 2 , Figure 4 and Figure 6 The method of message flow control shown in FIG.

[0138] The present application provides a computer program. When the computer program is executed by a computer, a processor or a computer can be enabled to execute the corresponding steps and / or processes in the above method embodiments.

[0139] A chip is provided, comprising a processor, for calling and executing instructions stored in a memory from the memory, so that a device equipped with the chip executes the methods in the above aspects.

[0140] Another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, the processor is used to execute the code in the memory, and when the code is executed, the processor is used to execute the methods in the above aspects.

[0141] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state hard disk, solidstate disk), etc.

[0142] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation methods of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.

[0143] Those of ordinary skill in the art will appreciate that, in conjunction with the various method steps and modules described in the embodiments disclosed herein, they can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0144] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0145] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or divided between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.

[0146] The computer program code for realizing the method for the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.

[0147] In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, and the like.

[0148] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.

[0149] A machine-readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0151] In the several embodiments provided in the present 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 only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.

[0152] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0153] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0154] If the integrated module is implemented in the form of a software function module 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 is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0155] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is the quantity and execution order limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the various described examples, a first network device may be referred to as a second network device, and similarly, a second network device may be referred to as a first network device. Both the first network and the device and the second network device may be network devices, and in some cases, may be separate and different network devices.

[0156] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0157] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.

[0158] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0159] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0160] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0161] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.

[0162] It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

Claims

1. A method for message flow control, characterized in that: The method comprises: A first device receives a first message sent by a second device, where the first message carries indication information, where the indication information is used to indicate a type of the first message, and the indication information is added by the second device, where the first device is located in a first transmission network and a second transmission network at the same time, and where the second device is located in the first transmission network; In response to the type of the first message being a video type, and the video type being a type requiring flow control, the first device identifying a coding type of the first message, identifying a forward prediction coding frame in the first message based on the coding type, and discarding the forward prediction coding frame; In response to the type of the first message being a first type of game, the first type of game being a type that requires flow control, the first device determining whether to discard the first message according to a reference ratio, the real-time index of the first type of game being higher than an index threshold, and the reference ratio being a specified ratio for discarding messages of the first type of game; In response to the type of the first message being an education type, the education type being a type requiring flow control, the first device transmitting the first message at a second rate, the second rate being higher than an initial transmission rate of the first message; In response to the type of the first message not being a type that requires flow control, the first device does not perform flow control on the first message.

2. The method according to claim 1, characterized in that The types that need to be flow controlled also include a second type of game, and the second type of game is a game type whose real-time index is lower than the index threshold; the method also includes: In response to the type of the first message being the second game type, the first device transmits the first message at a first rate, and a real-time indicator corresponding to the first rate is lower than a real-time indicator of the second game type.

3. The method according to claim 1 or 2, characterized in that: Before responding that the type of the first message is a video type, the method further includes: The first device obtains the flow control switch state; In response to the flow control switch state being an on state, the first device determines whether the type of the first message is a type that requires flow control.

4. A method for message flow control, characterized in that: The method comprises: A second device receives a second message, where the second device is located in the first transmission network; The second device identifies a type of the second message; The second device adds indication information in the second message to generate a first message, where the indication information is used to indicate a type of the first message; The second device sends the first message to the first device, so that the first device responds to the type of the first message being a video type, which is a type that requires flow control, and the first device identifies the encoding type of the first message, identifies the forward prediction encoding frame in the first message based on the encoding type, and discards the forward prediction encoding frame; in response to the type of the first message being a first type of game, which is a type that requires flow control, the first device determines whether to discard the first message according to a reference ratio, the real-time index of the first type of game is higher than the index threshold, and the reference ratio is a specified ratio for discarding messages of the first type of game; in response to the type of the first message being an education type, which is a type that requires flow control, the first device transmits the first message at a second rate, which is higher than the initial transmission rate of the first message; in response to the type of the first message not being a type that requires flow control, flow control is not performed on the first message, and the first device is located in the first transmission network and the second transmission network at the same time.

5. The method according to claim 4, characterized in that The second device identifying the type of the second message includes: The second device obtains first information of the second message, and matches the first information with second information in a model library, where the model library includes a plurality of second information, each second information corresponding to a type of message; In response to the first information successfully matching with any second information among the multiple second information, the type of the message corresponding to the any second information is determined as the type of the second message.

6. The method according to claim 5, characterized in that The method further comprises: The second device receives a third message, the type of the third message is different from the types of messages corresponding to multiple second information in the model library, and adds the second information corresponding to the type of the third message to the model library.

7. The method according to claim 5 or 6, characterized in that: The first information includes at least one of quintuple information and priority information.

8. A device for message flow control, characterized in that: The apparatus is applied to a first device, the first device is located in a first transmission network and a second transmission network at the same time, and the apparatus includes: A first acquisition module, configured to receive a first message sent by a second device, where the first message carries indication information, where the indication information is used to indicate a type of the first message, and where the indication information is added by the second device, and the second device is located in the first transmission network; a control module, configured to, in response to the type of the first message being a video type, the video type being a type requiring flow control, identify a coding type of the first message, identify a forward prediction coding frame in the first message based on the coding type, and discard the forward prediction coding frame; The control module is further configured to determine whether to discard the first message according to a reference ratio in response to the type of the first message being a first type of game, the first type of game being a type that requires flow control, the real-time index of the first type of game being higher than an index threshold, and the reference ratio being a specified ratio for discarding messages of the first type of game; The control module is further configured to transmit the first message at a second rate in response to the type of the first message being an education type, the education type being a type requiring flow control, the second rate being higher than an initial transmission rate of the first message; The control module is further configured to, in response to the type of the first message not being a type that requires flow control, not perform flow control on the first message.

9. The device according to claim 8, characterized in that The types that need to be flow controlled also include a second type of game, where the second type of game is a game type whose real-time index is lower than the index threshold; The control module is further configured to transmit the first message at a first rate in response to the type of the first message being the second game type, wherein a real-time index corresponding to the first rate is lower than a real-time index of the second game type.

10. The device according to claim 8 or 9, characterized in that The device also includes: The second acquisition module is used to obtain the flow control switch state; A determination module is used to determine whether the type of the first message is a type that requires flow control in response to the flow control switch state being an on state.

11. A device for message flow control, characterized in that: The apparatus is applied to a second device, where the second device is located in a first transmission network, and the apparatus includes: A receiving module, used for receiving a second message; An identification module, used to identify the type of the second message; A generating module, configured to add indication information to the second message to generate a first message, wherein the indication information is used to indicate a type of the first message; A sending module, used for sending the first message to a first device, so that the first device, in response to the type of the first message being a video type, the video type being a type requiring flow control, identifies the coding type of the first message, identifies the forward prediction coding frame in the first message based on the coding type, and discards the forward prediction coding frame; in response to the type of the first message being a first type of game, the first type of game being a type requiring flow control, the first device determines whether to discard the first message according to a reference ratio, the real-time index of the first type of game is higher than an index threshold, and the reference ratio is a specified ratio for discarding messages of the first type of game; in response to the type of the first message being an education type, the education type being a type requiring flow control, the first device transmits the first message at a second rate, the second rate being higher than an initial transmission rate of the first message; in response to the type of the first message not being a type requiring flow control, does not perform flow control on the first message, and the first device is located in both the first transmission network and the second transmission network.

12. The device according to claim 11, characterized in that The identification module is used to obtain the first information of the second message, and match the first information with the second information in the model library, wherein the model library includes a plurality of second information, each second information corresponding to a type of message; In response to the first information successfully matching with any second information among the multiple second information, the type of the message corresponding to the any second information is determined as the type of the second message.

13. The device according to claim 12, characterized in that The receiving module is also used to receive a third message, the type of the third message is different from the types of messages corresponding to multiple second information in the model library, and add the second information corresponding to the type of the third message to the model library.

14. The device according to claim 12 or 13, characterized in that The first information includes at least one of quintuple information and priority information.

15. A device for message flow control, characterized in that: The device includes: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor so that the device implements the method for message flow control as described in any one of claims 1-7.

16. A system for message flow control, characterized in that: The system includes a first device and a second device, wherein the first device is used to execute the method for message flow control as described in any one of claims 1-3, and the second device is used to execute the method for message flow control as described in any one of claims 4-7.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program instruction or code, and the program instruction or code is loaded and executed by a processor to enable a computer to implement the method for message flow control as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method of implementing improvement of user service quality in IP multimedia subsystem

    CN101159675A

  • Method and device for controlling rate of multi-service wireless network

    CN101772072A

  • Systems and methods for intelligent discard in a communication network

    CN102405626A

  • Method, device and system for data transmission

    CN103814596A

  • Message speed limiting method and device

    CN106230741A