Data Sending Method and Device
By considering factors such as packet type, user priority and downlink available bytes in real-time communication of multiple people, data packet forwarding is decided, which solves the problem of network fluctuations affecting communication experience, and realizes stable audio and video transmission in complex network environments, with a wider range of applications.
Patent Information
- Application Number
- CN202111255544.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-27
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2041-10-27
AI Technical Summary
In the real-time communication scenario of multi-person, network fluctuations are intensified, the bandwidth adaptation range of the existing technology is limited, and a complete service downgrade mechanism is lacking, which affects the communication experience.
By considering factors such as the type of data packet, the priority of the subscribed user and the available bytes on the downlink, we decide whether to forward the data packets, and adopt a reasonable service downgrade strategy to ensure the reliable transmission of data packets in complex network environments.
In low bandwidth and bandwidth fluctuation scenarios, the smoothness of audio and video streams is ensured, and the impact of network fluctuations on the overall quality of communication is reduced. It has a wider range of applications and supports non-SVC encoding solutions.
Smart Images

Figure CN113873577B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and more particularly, to a data sending method and device. Background Art
[0002] When conducting network communications, network bandwidth resources are limited, especially in the last mile where the network environment is complex, the proportion of wireless network access is high, and the signal is more susceptible to interference, which exacerbates network fluctuations. In a multi-person real-time communication scenario, network fluctuations on either side of the communication will affect the overall communication experience. Based on this, in related technologies, different downlink bandwidths are adjusted through scalable video coding technology (SVC) or large and small stream methods. However, the platform adaptability of the SVC decoding solution is limited, and the bandwidth adaptation range needs to be improved. Summary of the Invention
[0003] The present disclosure provides a data sending method and apparatus to at least solve the above-mentioned problems in the related art, but may not solve any of the above-mentioned problems.
[0004] According to a first aspect of an embodiment of the present disclosure, a data sending method is provided, comprising: receiving a data packet for sending to at least one second terminal from a first terminal; when the data packet is a video data packet and the first terminal is not a preset high-priority subscribed user of the at least one second terminal, determining the remaining downlink available bytes of the at least one second terminal in the current time period based on the downlink available bytes of the at least one second terminal in the current time period and the total bytes of the acquired video data packets; when the bytes of the data packet are less than or equal to the remaining downlink available bytes, forwarding the data packet to the at least one second terminal; and when the bytes of the data packet are greater than the remaining downlink available bytes, not forwarding the data packet to the at least one second terminal.
[0005] Optionally, the method further includes: when the data packet is an audio data packet, forwarding the data packet to the at least one second terminal.
[0006] Optionally, the method further includes: forwarding the data packet to the at least one second terminal when the data packet is a video data packet and the first terminal is a preset high-priority subscribed user of the at least one second terminal.
[0007] Optionally, determining the remaining downlink available bytes of the at least one second terminal in the current time period based on the downlink available bytes of the at least one second terminal in the current time period and the total bytes of the video data packets that have been obtained includes: taking the difference between the downlink available bytes of the at least one second terminal in the current time period and the total bytes of the video data packets that have been obtained by the at least one second terminal in the current time period, and obtaining the remaining downlink available bytes of the at least one second terminal in the current time period.
[0008] Optionally, the downlink available bytes of the at least one second terminal in the current time period are obtained by the following steps: determining the downlink available bit rate of the at least one second terminal in the current time period based on the downlink available bit rate and the downlink actual bit rate of the at least one second terminal at the initial moment of the current time period; calculating the downlink available bytes of the at least one second terminal in the current time period based on the downlink available bit rate of the at least one second terminal in the current time period and the time length of the current time period.
[0009] Optionally, the downlink available bytes of the at least one second terminal in the current time period are obtained by the following steps: taking the difference between the downlink available bit rate of the at least one second terminal at the initial moment of the current time period and the downlink actual bit rate of the at least one second terminal at the initial moment of the current time period to obtain the downlink available bit rate of the at least one second terminal in the current time period; taking the product of the downlink available bit rate of the at least one second terminal in the current time period and the time length of the current time period to obtain the downlink available bytes of the at least one second terminal in the current time period.
[0010] According to a second aspect of an embodiment of the present disclosure, a data sending device is provided, comprising: a data packet receiving unit, configured to: receive a data packet for sending to at least one second terminal from a first terminal; a remaining byte determining unit, configured to: determine the remaining downlink available bytes of the at least one second terminal in the current time period based on the downlink available bytes of the at least one second terminal in the current time period and the total bytes of the acquired video data packets, when the data packet is a video data packet and the first terminal is not a preset high-priority subscribed user of the at least one second terminal; a decision unit, configured to: forward the data packet to the at least one second terminal if the bytes of the data packet are less than or equal to the remaining downlink available bytes; and not forward the data packet to the at least one second terminal if the bytes of the data packet are greater than the remaining downlink available bytes.
[0011] Optionally, the decision unit is configured to: when the data packet is an audio data packet, forward the data packet to the at least one second terminal.
[0012] Optionally, the decision unit is configured to: forward the data packet to the at least one second terminal if the data packet is a video data packet and the first terminal is a preset high-priority subscribed user of the at least one second terminal.
[0013] Optionally, the remaining byte determination unit is configured to: calculate the difference between the downlink available bytes of the at least one second terminal in the current time period and the total bytes of the video data packets obtained by the at least one second terminal in the current time period, and obtain the remaining downlink available bytes of the at least one second terminal in the current time period.
[0014] Optionally, the remaining byte determination unit is configured to: determine the downlink available bit rate of the at least one second terminal in the current time period based on the downlink available bit rate and the downlink actual bit rate of the at least one second terminal at the initial moment of the current time period; and calculate the downlink available bytes of the at least one second terminal in the current time period based on the downlink available bit rate of the at least one second terminal in the current time period and the time length of the current time period.
[0015] Optionally, the remaining byte determination unit is configured to: calculate the difference between the downlink available bit rate of the at least one second terminal at the initial moment of the current time period and the downlink actual bit rate of the at least one second terminal at the initial moment of the current time period to obtain the downlink available bit rate of the at least one second terminal in the current time period; calculate the product of the downlink available bit rate of the at least one second terminal in the current time period and the time length of the current time period to obtain the downlink available bytes of the at least one second terminal in the current time period.
[0016] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: at least one processor; and at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, prompt the at least one processor to execute the data sending method according to the present disclosure.
[0017] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to execute the data sending method according to the present disclosure.
[0018] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer instructions, which implement the data sending method according to the present disclosure when executed by at least one processor.
[0019] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0020] According to the data sending method and device disclosed in the present invention, multiple factors such as the type of data packet, the priority of the subscribed user, and the available downlink bytes can be considered to decide whether to forward the data packet. A reasonable service degradation strategy is adopted to achieve a wide bandwidth adaptation range, which can maximize the communication experience in complex network conditions. In low bandwidth and bandwidth fluctuation scenarios, the smoothness of audio and video streams, i.e., data packet transmission, can be guaranteed, reducing the impact of network fluctuations on the overall communication quality.
[0021] In addition, the data transmission method and apparatus according to the present disclosure can be used to support non-SVC encoding schemes and have a wider range of applications.
[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0024] Figure 1 is an architectural diagram of a server and a terminal illustrating a data transmitting method according to an exemplary embodiment of the present disclosure.
[0025] Figure 2 is an overall framework diagram illustrating a data transmitting method according to an exemplary embodiment of the present disclosure.
[0026] Figure 3 is a flowchart illustrating a data transmitting method according to an exemplary embodiment of the present disclosure.
[0027] Figure 4 is a flowchart illustrating a specific implementation of a data transmitting method according to an exemplary embodiment of the present disclosure.
[0028] Figure 5 is a block diagram illustrating a data transmitting apparatus according to an exemplary embodiment of the present disclosure.
[0029] Figure 6 is a block diagram illustrating an electronic device 600 according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0031] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0032] It should be noted that the phrase "at least one of the items" in this disclosure includes three types of parallel situations: "any one of the items", "a combination of any multiple items of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. For another example, "performing at least one of step 1 and step 2" includes the following three parallel situations: (1) performing step 1; (2) performing step 2; and (3) performing steps 1 and 2.
[0033] Network bandwidth resources are limited during network communications, especially in the last mile, where the network environment is complex, the proportion of wireless network access is high, and signals are more susceptible to interference, exacerbating network fluctuations. In multi-person real-time communication scenarios, network fluctuations on any one party can impact the overall communication experience. Optimizing the communication experience in multi-person real-time communication scenarios is a complex issue.
[0034] Based on this, the P2P solution in the related art can save server resources, but the bandwidth resource requirements are relatively high, and the network connection quality is uncontrollable. The server confluence solution in the related art consumes relatively low bandwidth resources, but the server's computing resource consumption is relatively high, and transcoding delays will be introduced. In the related art, different downlink bandwidths are adjusted and processed through the SVC method or the large and small stream method. For example, WebRTC can adjust different downlink bandwidths through the SVC method or the large and small stream method, but the platform adaptability of the SVC decoding solution is limited, and there are also restrictions on application scenarios. In addition, the downlink bandwidth adaptation range is limited, and there is a lack of a complete service degradation mechanism.
[0035] In order to solve the problems existing in the above-mentioned related technologies, the present disclosure proposes a data sending method and device, which can consider multiple factors such as the type of data packet, the priority of the subscribed user and the available downlink bytes to decide whether to forward the data packet. It adopts a reasonable service degradation strategy, which makes the bandwidth adaptation range wide, can maximize the communication experience in complex network conditions, and can ensure the smoothness of audio and video streams, i.e., data packet transmission in low bandwidth and bandwidth fluctuation scenarios, thereby reducing the impact of network fluctuations on the overall communication quality.
[0036] Below, we will refer to Figures 1 to 6 The data transmission method and apparatus according to the present disclosure are described in detail.
[0037] Figure 1 is an architectural diagram illustrating a server and a terminal according to a data transmission method of an exemplary embodiment of the present disclosure, with reference to Figure 1 MCU stands for Multipoint Conferencing Unit, which consists of a server and multiple terminals in a star-shaped configuration. SFU stands for Selective Forwarding Unit, which also consists of a server and multiple terminals and is essentially an audio and video routing forwarder. A, B, C, and D can all be terminals. The terminals in the exemplary embodiments of the present disclosure may include, but are not limited to, mobile phones, tablets, laptops, and desktop computers.
[0038] The exemplary embodiments of the present disclosure can be implemented based on a server (server) and at least one terminal (client). The terminal establishes a network connection with the server, enabling the terminal to interconnect with the server through the server, generating and subscribing to audio and video media streams (data packets) from other terminals. The server can receive the audio and video media streams (data packets) and forward them to the subscribed terminals.
[0039] Figure 2 1 is an overall framework diagram illustrating a data transmission method according to an exemplary embodiment of the present disclosure. Figure 2 A, B, and C may all be terminals. The exemplary embodiments of this disclosure utilize terminals A, B, and C as an example. This disclosure also protects methods based on different numbers of terminals. S may be a server. A may include, but is not limited to, an encoder and a transmitter. B and C may include, but are not limited to, a receiver. S may include, but is not limited to, a receiver, a bandwidth allocation module, and a transmitter.
[0040] Below, based on Figure 2The various modules of the server and terminal shown in the description are used to describe the specific division of labor of the server and terminal in the exemplary embodiment of the present disclosure: the terminal may include, but is not limited to, an encoding module (encoder), a sending module (transmitter) and a receiving module (receiver). The encoding module can be used for, but is not limited to, generating a media stream, that is, generating a data packet. The sending module can be used for, but is not limited to, maintaining a connection with the server and sending data packets. The receiving module can be used for, but is not limited to, maintaining a connection with the server and receiving data packets forwarded by the server. The server may include, but is not limited to, a receiving module (receiver), a bandwidth allocation module and a sending module (transmitter). The receiving module can be used for, but is not limited to, receiving data packets sent by the terminal and controlling whether the data packets are forwarded to other terminals based on the decision of the bandwidth allocation module. The bandwidth allocation module can be used for, but is not limited to, deciding whether the data packets are forwarded to other terminals. The sending module can be used for, but is not limited to, sending data packets.
[0041] According to an exemplary embodiment of the present disclosure, the bandwidth allocation module of the server may consider multiple factors, such as the type of data packet, the priority of the subscribed user, and the available downlink bytes, to decide whether to forward the data packet. For example, if the data packet is a video data packet, terminal A is not a preset high-priority subscribed user of terminals B and C, and the bytes of the data packet are less than or equal to the downlink available byte budget, the bandwidth allocation module may decide to forward the data packet to terminals B and C; if the data packet is an audio data packet, the bandwidth allocation module may decide to forward the data packet to terminals B and C; if the data packet is a video data packet, and terminal A is a preset high-priority subscribed user of terminals B and C, the bandwidth allocation module may decide to forward the data packet to terminals B and C.
[0042] For each terminal in the exemplary embodiments of the present disclosure, one other terminal can be pre-configured as a high-priority subscribed user. For example, if terminal A is a pre-configured high-priority subscribed user of terminal B, terminal B can always receive all video packets from terminal A. In other words, the server can be configured to directly forward video packets from terminal A to terminal B.
[0043] Figure 3 is a flowchart illustrating a data transmitting method according to an exemplary embodiment of the present disclosure. Figure 3 The data sending method shown is suitable for the server, refer to Figure 3 In step 301, a data packet for transmitting to at least one second terminal may be received from a first terminal.
[0044] Here, the data packet may include, but is not limited to, an audio data packet and a video data packet. The second terminal may be a terminal that has subscribed to the audio data packet and / or video data packet of the first terminal.
[0045] In step 302, when the data packet is a video data packet and the first terminal is not a preset high-priority subscribed user of at least one second terminal, the remaining downlink available bytes of at least one second terminal in the current time period can be determined based on the downlink available bytes of at least one second terminal in the current time period and the total bytes of the acquired video data packets.
[0046] In addition, the data transmission method of the exemplary embodiment of the present disclosure may further include: forwarding the data packet to the at least one second terminal when the data packet is a video data packet and the first terminal is a preset high-priority subscribed user of the at least one second terminal.
[0047] In addition, for an audio data packet received from a first terminal and intended to be sent to at least one second terminal, the server may forward the data packet to the at least one second terminal if the data packet is an audio data packet.
[0048] According to an exemplary embodiment of the present disclosure, the step of obtaining the remaining downlink available bytes of at least one second terminal in the current time period may be: taking the difference between the downlink available bytes of at least one second terminal in the current time period and the total bytes of the video data packets already obtained by at least one second terminal in the current time period, to obtain the remaining downlink available bytes of at least one second terminal in the current time period.
[0049] Here, the downlink available bytes of at least one second terminal in the current time period may be the downlink available byte budget initially calculated in the current time period. When at least one second terminal receives a video data packet, the server may subtract the bytes of the video data packet from the downlink available bytes of the current time period. Furthermore, for a video data packet received by at least one second terminal at any moment in the current time period, the remaining downlink available bytes corresponding to that moment may be the difference between the downlink available bytes of the current time period and the total bytes of all video data packets acquired in the current time period before that moment. It should be noted that the bytes of the video data packet in the exemplary embodiments of the present disclosure may be obtained through server-side monitoring.
[0050] According to an exemplary embodiment of the present disclosure, the downlink available bytes of at least one second terminal in the current time period can be obtained by the following steps: determining the downlink available bit rate of at least one second terminal in the current time period based on the downlink available bit rate and the actual downlink bit rate of the at least one second terminal at the initial moment of the current time period; and calculating the downlink available bytes of at least one second terminal in the current time period based on the downlink available bit rate of the at least one second terminal in the current time period and the duration of the current time period. It should be noted that the downlink available bit rate and the actual downlink bit rate in the exemplary embodiment of the present disclosure can be obtained by calculation by the server.
[0051] According to an exemplary embodiment of the present disclosure, the downlink available bytes of at least one second terminal in the current time period can be obtained through the following steps: taking the difference between the downlink available code rate of at least one second terminal at the initial moment of the current time period and the downlink true code rate of at least one second terminal at the initial moment of the current time period to obtain the downlink available code rate of at least one second terminal in the current time period; taking the product of the downlink available code rate of at least one second terminal in the current time period and the time length of the current time period to obtain the downlink available bytes of at least one second terminal in the current time period.
[0052] For example, the downlink available bytes of at least one second terminal in the current period can be obtained by the following formulas (1) and (2):
[0053] budget_bw B =downlink_bw B -dst_bitrate B (1)
[0054] budget_bytes B =budget_bw B *budget_interval (2)
[0055] Among them, budget_bw B is the available downlink bit rate of at least one second terminal in the current period, downlink_bw B The available downlink bitrate of at least one second terminal at the initial moment of the current period, dst_bitrate B The actual downlink bit rate of at least one second terminal at the initial moment of the current period, budget_bytes B The budget_interval is the downlink available bytes of at least one second terminal in the current time period, and the budget_interval is the time length of the current time period.
[0056] In step 303 , if the bytes of the data packet are less than or equal to the remaining downlink available bytes, the data packet may be forwarded to at least one second terminal.
[0057] In step 304, if the bytes of the data packet are greater than the remaining downlink available bytes, the data packet may not be forwarded to the at least one second terminal.
[0058] According to an exemplary embodiment of the present disclosure, the server may discard a data packet that is not forwarded to at least one second terminal.
[0059] Figure 4 is a flowchart illustrating a specific implementation of a data transmission method according to an exemplary embodiment of the present disclosure, Figure 4The flowchart shown is applicable to the server, that is, the execution subject is the server, refer to Figure 4 First, a server may receive a data packet from a first terminal for transmission to at least one second terminal. Here, the first terminal may be the terminal transmitting the data packet, and the second terminal may be the terminal receiving the data packet. The first and second terminals may be terminals establishing real-time audio and video communication. The server may then determine whether the data packet is a video data packet. If not, the server may forward the data packet to the at least one second terminal. If the data packet is a video data packet, the server may then determine whether the first terminal is a pre-set high-priority subscriber of the at least one second terminal. If the first terminal is a pre-set high-priority subscriber of the at least one second terminal, the server may forward the data packet to the at least one second terminal. If the first terminal is not a pre-set high-priority subscriber of the at least one second terminal, the server may determine whether to forward the data packet to the at least one second terminal. Finally, if the server determines that the data packet should be forwarded to the at least one second terminal, the server may forward the data packet to the at least one second terminal. If the server determines that the data packet should not be forwarded to the at least one second terminal, the server may discard the data packet, thereby declaring the data packet a discarded packet.
[0060] Figure 5 is a block diagram illustrating a data transmitting apparatus according to an exemplary embodiment of the present disclosure. Figure 5 The data sending device shown can be configured on the server, refer to Figure 5 The data sending device 500 includes a data packet receiving unit 501, a remaining byte determining unit 502 and a decision unit 503.
[0061] The data packet receiving unit 501 may receive a data packet from a first terminal for transmission to at least one second terminal.
[0062] Here, the data packet may include, but is not limited to, an audio data packet and a video data packet. The second terminal may be a terminal that has subscribed to the audio data packet and / or video data packet of the first terminal.
[0063] The remaining byte determination unit 502 can determine the remaining downlink available bytes of at least one second terminal in the current time period based on the downlink available bytes of at least one second terminal in the current time period and the total bytes of the acquired video data packets, when the data packet is a video data packet and the first terminal is not a preset high-priority subscribed user of at least one second terminal.
[0064] According to an exemplary embodiment of the present disclosure, obtaining the remaining downlink available bytes of at least one second terminal in the current time period may be: taking the difference between the downlink available bytes of at least one second terminal in the current time period and the total bytes of the video data packets already obtained by at least one second terminal in the current time period, to obtain the remaining downlink available bytes of at least one second terminal in the current time period.
[0065] Here, the downlink available bytes of at least one second terminal in the current time period may be the downlink available byte budget initially calculated in the current time period. When at least one second terminal receives a video data packet, the server may subtract the bytes of the video data packet from the downlink available bytes of the current time period. Furthermore, for a video data packet received by at least one second terminal at any moment in the current time period, the remaining downlink available bytes corresponding to that moment may be the difference between the downlink available bytes of the current time period and the total bytes of all video data packets acquired in the current time period before that moment. It should be noted that the bytes of the video data packet in the exemplary embodiments of the present disclosure may be obtained through server-side monitoring.
[0066] According to an exemplary embodiment of the present disclosure, the remaining bytes determination unit may be configured to: determine the downlink available bit rate of at least one second terminal in the current time period based on the downlink available bit rate and the downlink actual bit rate of at least one second terminal at the initial moment of the current time period; and calculate the downlink available bytes of at least one second terminal in the current time period based on the downlink available bit rate of at least one second terminal in the current time period and the duration of the current time period. It should be noted that the downlink available bit rate and the downlink actual bit rate in the exemplary embodiment of the present disclosure may be obtained by calculation by the server.
[0067] According to an exemplary embodiment of the present disclosure, the remaining byte determination unit can be configured to: calculate the difference between the downlink available code rate of at least one second terminal at the initial moment of the current time period and the downlink actual code rate of at least one second terminal at the initial moment of the current time period to obtain the downlink available code rate of at least one second terminal in the current time period; calculate the product of the downlink available code rate of at least one second terminal in the current time period and the time length of the current time period to obtain the downlink available bytes of at least one second terminal in the current time period.
[0068] For example, the downlink available bytes of at least one second terminal in the current time period can be obtained through the above formulas (1) and (2).
[0069] The decision unit 503 may forward the data packet to at least one second terminal if the bytes of the data packet are less than or equal to the remaining downlink available bytes; and may not forward the data packet to at least one second terminal if the bytes of the data packet are greater than the remaining downlink available bytes.
[0070] According to an exemplary embodiment of the present disclosure, the server may discard a data packet that is not forwarded to at least one second terminal.
[0071] In addition, the decision unit 503 may forward the data packet to the at least one second terminal when the data packet is a video data packet and the first terminal is a preset high-priority subscribed user of the at least one second terminal.
[0072] In addition, the decision unit 503 may forward the data packet to at least one second terminal if the data packet is an audio data packet.
[0073] Figure 6 is a block diagram illustrating an electronic device 600 according to an exemplary embodiment of the present disclosure.
[0074] Reference Figure 6 The electronic device 600 includes at least one memory 601 and at least one processor 602, wherein the at least one memory 601 stores a set of computer-executable instructions. When the computer-executable instruction set is executed by the at least one processor 602, the data sending method according to the exemplary embodiment of the present disclosure is executed.
[0075] As an example, the electronic device 600 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above-mentioned instruction set. Here, the electronic device 600 is not necessarily a single electronic device, but may also be any device or circuit collection capable of executing the above-mentioned instructions (or instruction set) individually or in combination. The electronic device 600 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device interconnected with a local or remote (e.g., via wireless transmission) interface.
[0076] In electronic device 600, processor 602 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0077] The processor 602 can execute instructions or codes stored in the memory 601, wherein the memory 601 can also store data. Instructions and data can also be sent and received over the network via the network interface device, wherein the network interface device can use any known transmission protocol.
[0078] The memory 601 may be integrated with the processor 602, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. Furthermore, the memory 601 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device usable by a database system. The memory 601 and the processor 602 may be operatively coupled or may communicate with each other, for example, via an I / O port, a network connection, or the like, such that the processor 602 can access files stored in the memory.
[0079] In addition, the electronic device 600 may further include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device 600 may be connected to each other via a bus and / or a network.
[0080] According to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to perform the data transmission method according to the exemplary embodiment of the present disclosure. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or ultra-fast digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device configured to store the computer program and any associated data, data files and data structures in a non-transitory manner and provide the computer program and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0081] According to an exemplary embodiment of the present disclosure, a computer program product may also be provided. Instructions in the computer program product may be executed by a processor of a computer device to implement the data sending method according to the exemplary embodiment of the present disclosure.
[0082] According to the data sending method and device disclosed in the present invention, multiple factors such as the type of data packet, the priority of the subscribed user, and the available downlink bytes can be considered to decide whether to forward the data packet. A reasonable service degradation strategy is adopted to achieve a wide bandwidth adaptation range, which can maximize the communication experience in complex network conditions. In low bandwidth and bandwidth fluctuation scenarios, the smoothness of audio and video streams, i.e., data packet transmission, can be guaranteed, reducing the impact of network fluctuations on the overall communication quality.
[0083] In addition, the data transmission method and apparatus according to the present disclosure can be used to support non-SVC encoding schemes and have a wider range of applications.
[0084] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0085] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data sending method, characterized in that: include: receiving, from a first terminal, a data packet for transmission to at least one second terminal; When the data packet is a video data packet and the first terminal is not a preset high-priority subscribed user of the at least one second terminal, determining the remaining downlink available bytes of the at least one second terminal in the current time period according to the downlink available bytes of the at least one second terminal in the current time period and the total bytes of the acquired video data packets; If the number of bytes of the data packet is less than or equal to the remaining downlink available bytes, forwarding the data packet to the at least one second terminal; If the bytes of the data packet are greater than the remaining downlink available bytes, not forwarding the data packet to the at least one second terminal; Wherein, when the data packet is an audio data packet, forwarding the data packet to the at least one second terminal; In a case where the data packet is a video data packet and the first terminal is a preset high-priority subscribed user of the at least one second terminal, the data packet is forwarded to the at least one second terminal.
2. The data transmission method according to claim 1, wherein: The determining, based on the available downlink bytes of the at least one second terminal in the current time period and the total bytes of the acquired video data packets, remaining available downlink bytes of the at least one second terminal in the current time period includes: The remaining downlink available bytes of the at least one second terminal in the current period are obtained by calculating the difference between the downlink available bytes of the at least one second terminal in the current period and the total bytes of the video data packets acquired by the at least one second terminal in the current period.
3. The data transmission method according to claim 1, wherein: The downlink available bytes of the at least one second terminal in the current time period are obtained by the following steps: Determining a downlink available bit rate for the at least one second terminal in the current time period according to the downlink available bit rate and the downlink actual bit rate of the at least one second terminal at an initial moment in the current time period; The downlink available bytes of the at least one second terminal in the current time period are calculated according to the downlink available bit rate of the at least one second terminal in the current time period and the time length of the current time period.
4. The data transmission method according to claim 3, wherein: The downlink available bytes of the at least one second terminal in the current time period are obtained by the following steps: Calculating the difference between the downlink available bit rate of the at least one second terminal at the initial moment of the current time period and the downlink actual bit rate of the at least one second terminal at the initial moment of the current time period to obtain the downlink available bit rate of the at least one second terminal in the current time period; The downlink available bit rate of the at least one second terminal in the current time period is multiplied by the time length of the current time period to obtain the downlink available bytes of the at least one second terminal in the current time period.
5. A data sending device, characterized in that: include: A data packet receiving unit is configured to: receive a data packet from a first terminal for sending to at least one second terminal; a remaining byte determination unit, configured to: when the data packet is a video data packet and the first terminal is not a preset high-priority subscribed user of the at least one second terminal, determine the remaining downlink available bytes of the at least one second terminal in the current time period based on the downlink available bytes of the at least one second terminal in the current time period and the total bytes of the acquired video data packets; a decision unit configured to: forward the data packet to the at least one second terminal if the number of bytes of the data packet is less than or equal to the remaining downlink available bytes; and not forward the data packet to the at least one second terminal if the number of bytes of the data packet is greater than the remaining downlink available bytes; The decision unit is configured to: if the data packet is an audio data packet, forward the data packet to the at least one second terminal; The decision unit is configured to: if the data packet is a video data packet and the first terminal is a preset high-priority subscribed user of the at least one second terminal, forward the data packet to the at least one second terminal.
6. The data transmitting device according to claim 5, wherein: The remaining bytes determination unit is configured as follows: The remaining downlink available bytes of the at least one second terminal in the current period are obtained by calculating the difference between the downlink available bytes of the at least one second terminal in the current period and the total bytes of the video data packets acquired by the at least one second terminal in the current period.
7. The data transmitting device according to claim 5, wherein: The remaining bytes determination unit is configured as follows: Determining a downlink available bit rate for the at least one second terminal in the current time period according to the downlink available bit rate and the downlink actual bit rate of the at least one second terminal at an initial moment in the current time period; The downlink available bytes of the at least one second terminal in the current time period are calculated according to the downlink available bit rate of the at least one second terminal in the current time period and the time length of the current time period.
8. The data transmitting device according to claim 7, wherein: The remaining bytes determination unit is configured as follows: Calculating the difference between the downlink available bit rate of the at least one second terminal at the initial moment of the current time period and the downlink actual bit rate of the at least one second terminal at the initial moment of the current time period to obtain the downlink available bit rate of the at least one second terminal in the current time period; The downlink available bit rate of the at least one second terminal in the current time period is multiplied by the time length of the current time period to obtain the downlink available bytes of the at least one second terminal in the current time period.
9. An electronic device, characterized in that: include: at least one processor; at least one memory storing computer-executable instructions, When the computer-executable instructions are executed by the at least one processor, the computer-executable instructions cause the at least one processor to execute the data sending method according to any one of claims 1 to 4.
10. A computer-readable storage medium storing instructions, characterized in that: When the instructions are executed by at least one processor, the at least one processor is prompted to perform the data sending method according to any one of claims 1 to 4.
11. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by at least one processor, the data sending method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method and device of data packet scheduling
CN106453139A
Priority of uplink streams in video switching
US20170155870A1