CN116709432A - Cache queue adjusting method and electronic equipment - Google Patents

Cache queue adjusting method and electronic equipment Download PDF

Info

Publication number
CN116709432A
CN116709432A CN202211468931.5A CN202211468931A CN116709432A CN 116709432 A CN116709432 A CN 116709432A CN 202211468931 A CN202211468931 A CN 202211468931A CN 116709432 A CN116709432 A CN 116709432A
Authority
CN
China
Prior art keywords
buffer queue
delay
receiving end
data packet
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211468931.5A
Other languages
Chinese (zh)
Other versions
CN116709432B (en
Inventor
庄凌凡
张梦龙
陈英涛
欧阳森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211468931.5A priority Critical patent/CN116709432B/en
Publication of CN116709432A publication Critical patent/CN116709432A/en
Application granted granted Critical
Publication of CN116709432B publication Critical patent/CN116709432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • H04W28/22Negotiating communication rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0231Traffic management, e.g. flow control or congestion control based on communication conditions
    • H04W28/0236Traffic management, e.g. flow control or congestion control based on communication conditions radio quality, e.g. interference, losses or delay
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application provides a buffer queue adjusting method and electronic equipment, which are applied to a receiving end, wherein the method comprises the following steps: responding to the initiating operation of the first service, and acquiring the service type of the first service; acquiring the current wireless negotiation rate of a receiving end and a transmitting end, and determining the service type of a first service and the user expected time delay corresponding to the current wireless negotiation rate; the user expected time delay is the time spent by the user for the user to expect to process a corresponding data packet from a sending end to a receiving end; acquiring the current transmission time delay of a receiving end and a transmitting end; based on the expected time delay of the user, the transmission time delay and the packet sending interval of the data packet sent by the sending end, the length K of the buffer queue is adjusted; the buffer queue is used for buffering the data packets of the first service, and the length K of the buffer queue is equal to the number of the data packets which can be buffered in the buffer queue. The scheme can dynamically adjust the length of the cache queue.

Description

Cache queue adjusting method and electronic equipment
Technical Field
The present application relates to the field of network transmission technologies, and in particular, to a method for adjusting a buffer queue and an electronic device.
Background
During data transmission, delay jitter may occur. At present, a buffer queue mechanism is generally adopted to smooth delay jitter, and in the buffer queue mechanism, a packet delivery period is maintained by pre-storing a data packet into a buffer queue.
However, in this scheme, the length of the buffer queue is relatively fixed. If the network environment and the service type change, delay jitter cannot be smoothed due to too short cache queue, or performance waste is caused due to too long cache queue.
Disclosure of Invention
The embodiment of the application provides a buffer queue adjusting method and electronic equipment, which can dynamically adjust the length of a buffer queue when the network environment and service types change, and can not cause performance waste while smoothing delay jitter.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, a method for adjusting a buffer queue is provided, where the method may be applied to a receiving end. The receiving end establishes wireless connection with the transmitting end, and the receiving end is used for receiving and caching the data packet post-processing data packet of the first service from the transmitting end so as to execute the first service, and the method comprises the following steps: responding to the initiating operation of the first service, and acquiring the service type of the first service; acquiring the current wireless negotiation rate of a receiving end and a transmitting end, and determining the service type of a first service and the user expected time delay corresponding to the current wireless negotiation rate; the user expected time delay is the time spent by the user for the user to expect to process a corresponding data packet from a sending end to a receiving end; acquiring the current transmission time delay of a receiving end and a transmitting end; the transmission delay is used for indicating the time spent for transmitting one data packet of the first service from the transmitting end to the receiving end and receiving the corresponding data packet; based on the expected time delay of the user, the transmission time delay and the packet sending interval of the data packet sent by the sending end, the length K of the buffer queue is adjusted; the buffer queue is used for buffering the data packets of the first service, and the length K of the buffer queue is equal to the number of the data packets which can be buffered in the buffer queue.
By adopting the technical scheme, when the network environment and the service type are changed, the expected time delay of the user can be determined by sensing the wireless negotiation rate and the service type, and the expected buffer queue length can be determined by dynamically detecting the network transmission time delay according to the change of the network condition. And finally, determining a packet delivery strategy through the expected buffer queue length, so that better dynamic balance is achieved between the user experience time delay and the performance, and the performance waste is avoided while the time delay jitter is smoothed.
In one possible implementation, after adjusting the length K of the buffer queue based on the user desired delay and the transmission delay, the method further includes: the method comprises the steps of obtaining the actual number K of data packets currently cached in a cache queue, and adjusting the processing strategy of the cached data packets in the cache queue based on the actual number K and the length K of the cache queue until the data packets cached in the cache queue are cached, and then processing the cached data packets in the cache queue according to a packet sending interval. The processing strategy of the data packet is adjusted according to the actual number and the length of the buffer queue, so that the speed of processing the data packet can be kept when the delay is jittered.
In one possible implementation manner, the receiving end pre-stores delay information of multiple service types, where the delay information of each service type includes: the service types expect time delay for the corresponding users in different wireless negotiation rate intervals. The determining the expected time delay of the user corresponding to the service type and the current wireless negotiation rate includes: and inquiring the user expected time delay corresponding to the wireless negotiation rate interval in which the current wireless negotiation rate is located from the time delay information of the service type of the first service.
In one possible implementation manner, the obtaining the current transmission delay between the receiving end and the transmitting end includes: when the current wireless negotiation rate changes across intervals, the current transmission delay between the receiving end and the transmitting end is acquired. The embodiment of the application does not detect the network time delay in real time, but senses whether the network condition changes based on the wireless negotiation rate and then decides whether to detect the time delay, thereby saving resources.
In one possible implementation manner, the obtaining the current transmission delay between the receiving end and the transmitting end includes: receiving a time delay detection request from a transmitting end; the delay detection request is sent by a sending end when the current wireless negotiation rate changes across areas or responds to the initiating operation of the first service; responding to the time delay detection request, and sending a time delay detection confirmation frame to a sending end; receiving a time delay notification frame from a transmitting end; the delay notification frame includes round trip delay RTT, and transmission delay ts=rtt/2.
In one possible implementation manner, the obtaining the current transmission delay between the receiving end and the transmitting end includes: sending a time delay detection request to a sending end; receiving a time delay detection acknowledgement frame from a transmitting end; calculating round trip time RTT based on the sending time of the time delay detection request and the receiving time of the time delay detection acknowledgement frame to obtain transmission time delay; where transmission delay ts=rtt/2.
In one possible implementation manner, the adjusting the processing policy of the buffered data packet in the buffer queue based on the actual number and the length K of the buffer queue includes: if the actual number K is smaller than the length K of the buffer queue, processing the data packets buffered in the buffer queue according to packet sending intervals, recording the lost data packets in the buffer queue, and retransmitting the lost data packets; if the actual number K is greater than the length K of the buffer queue, processing the data packets buffered in the buffer queue according to the target interval or carrying out packet loss processing on the data packets in the buffer queue; wherein the target interval is smaller than the packet sending interval; if the actual number k is 0, the corresponding data packet is processed immediately after the buffer queue buffers one data packet.
In one possible implementation manner, the recording the lost data packet in the buffer queue, retransmitting the lost data packet includes: transmitting the lost data packet to a retransmission queue; if the sequence number of the data packet retransmitted in the retransmission queue is smaller than the sequence number of the data packet processed currently, the corresponding data packet is not retransmitted; if the sequence number of the data packet retransmitted in the retransmission queue is larger than the sequence number of the data packet processed currently, retransmitting the corresponding data packet. The embodiment of the application does not retransmit all lost data packets, and only retransmits the data packets with the sequence numbers larger than the sequence numbers of the data packets currently processed, thereby saving resources.
In one possible implementation, the smaller the user desired delay, the smaller the length of the cache queue; the larger the user expects the time delay, the larger the length of the buffer queue; the smaller the transmission delay, the larger the length of the buffer queue; the larger the transmission delay, the smaller the length of the buffer queue.
In one possible implementation manner, the adjusting the length of the buffer queue based on the expected time delay of the user, the transmission time delay and the packet interval of the data packet sent by the sending end includes: based on the user desired time delay T u Transmission delay T s And a packet sending interval S for sending the data packet by the sending end, wherein the following formula is adopted: k= (T u -T s ) S; and calculating the length K of the cache queue. The embodiment of the application can dynamically adjust the length of the buffer queue according to the wireless negotiation rate and the service type, and can not smooth delay jitter caused by too short buffer queue or waste of performance caused by too long buffer queue.
In one possible implementation, obtaining a current wireless negotiation rate between a receiving end and a transmitting end includes: and periodically acquiring the current wireless negotiation rate of the receiving end and the transmitting end. The embodiment of the application can more accurately acquire the current transmission delay and the corresponding user expected delay by acquiring the current wireless negotiation rate in real time.
In a second aspect, there is provided an electronic device comprising: a communication module, a display screen, a memory, and one or more processors; the communication module, the display screen, the memory and the processor are coupled; the memory is configured to store computer program code, the computer program code comprising computer instructions that, when executed by the electronic device, cause the electronic device to perform the cache queue adjustment method described above.
In a third aspect, there is provided a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the cache queue adjustment method of any one of the first aspects above.
In a fourth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the cache queue adjustment method of any one of the first aspects above.
In a fifth aspect, there is provided an apparatus (e.g. the apparatus may be a system-on-a-chip) comprising a processor for supporting a first device to implement the functionality referred to in the first aspect above. In one possible design, the apparatus further includes a memory for holding program instructions and data necessary for the first device. When the device is a chip system, the device can be formed by a chip, and can also comprise the chip and other discrete devices.
The technical effects of any one of the design manners of the second aspect to the fifth aspect may be referred to the technical effects of the different design manners of the first aspect, and will not be repeated here.
Drawings
FIG. 1 is a schematic diagram of a prior art cache queue solution;
fig. 2 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for adjusting a buffer queue according to an embodiment of the present application;
fig. 4 is a schematic software structure diagram of acquiring a service type of a first service currently performed according to an embodiment of the present application;
fig. 5 is a schematic diagram of a perception flow of user expected time delay according to an embodiment of the present application;
fig. 6A is a schematic flow chart of a delay detection according to an embodiment of the present application;
fig. 6B is a schematic flow chart of another delay detection according to an embodiment of the present application;
FIG. 7 is a schematic diagram of determining an expected cache queue according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a buffer queue packet adjustment strategy according to an embodiment of the present application;
fig. 9 is a schematic diagram of an overall implementation of another buffer queue adjustment method according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
The user may use different stream type services in near field conditions. The streaming type service is real-time service such as audio and video playing performed in a streaming media mode. Streaming media refers to streaming media format, in which the entire file is not downloaded before playing, and media data is correctly output by downloading, buffering and playing. The stream type service is unidirectionally transmitted and comprises a transmitting end and a receiving end. The sending end transmits the data packet of the service to the receiving end, and the receiving end processes the received data packet, namely submits the data packet to the upper layer so as to execute the service.
Different streaming services (e.g. super mouse, super call, heterogeneous screen-drop, etc.) have different practical requirements when in use, such as: when the super mouse is used, a user expects to obtain a low-delay and high-accuracy mouse experience; when the super call is used, the user is less sensitive to time delay, but has higher requirement on the real-time packet loss rate; when using heterogeneous screen casting, the user expects to obtain a low-delay and high-reliability screen casting experience.
Delay jitter is an important indicator affecting the quality of service (QoS) of a stream type service. Wherein delay jitter refers to delay variation. The packets leave the sender uniformly at regular intervals, but as they pass through the network, the uniform intervals are destroyed by the different delays experienced by the packets, thereby creating jitter. At present, a buffer queue mechanism is generally used to smooth out the empty delay jitter, please refer to fig. 1, fig. 1 is a schematic diagram of a conventional buffer queue solution.
As shown in fig. 1, a transmitting end transmits a data packet to a receiving end, and the receiving end is provided with a buffer queue for buffering the received data packet. Delay jitter can cause a receiving end to have a non-packet-receiving window period and a large number of packet-receiving window periods. And in a non-packet receiving window period caused by the empty time delay jitter, the receiving end sequentially submits the data packets in the buffer queue to the upper layer according to the packet sending interval. As shown in fig. 1, the receiving end starts to enter a no-packet window period when receiving the fourth data packet, and at this time, the receiving end starts to submit the first data packet in the buffer queue. The time from the receiving end to the time when the first data packet is submitted to the buffer queue is called the first packet buffer delay. Therefore, in the non-packet-receiving window period, although the receiving end does not receive the data packet, the receiving end sequentially submits the cached data packet in the cache queue, and the service execution is not affected. As shown in fig. 1, after the packet-free window period is over, the receiving end starts to enter a large number of packet-free window periods, and the receiving end pre-stores the received data packets into a buffer queue. At this time, the receiving end buffers the data packets in the buffer queue before delivering according to the packet sending interval, and the receiving end receives a large amount of packets without influencing the delivery of the receiving end to the data packets in the buffer queue, so that the packet delivering period can be kept. The packet delivery period refers to a time interval during which the receiving end delivers the data packet. Therefore, in the abnormal period of receiving packets of the receiving end caused by the delay jitter, the buffer queue of the receiving end can buffer the data packets, so that the delay jitter can not influence the delivery of the data packets by the receiving end.
In the above scheme, it can be known that the larger the buffer queue length is, the stronger the capability of the receiving end for smoothing the air interface delay jitter is, and the larger the user expected delay is. The user expected time delay is the time required for the user to expect to process a corresponding data packet from a data packet of a service sent from a sending end to a receiving end. The user expected delay is obtained by adding the transmission delay and the first packet buffer delay. The first packet buffer delay is related to the length of the buffer queue, and the larger the first packet buffer delay is, the larger the buffer queue length is. However, since the first packet buffer delay is generally set to a fixed value. When the fluctuation of the network environment is large, the buffer delay of the first packet is too small, that is, the buffer queue length is too small, so that the air interface delay jitter cannot be smoothed, the delay change of the user experience is caused, and the user experience is poor. Meanwhile, when the terminal faces different types of stream type services, the length of the buffer queue cannot be dynamically adjusted, so that performance waste is caused.
Therefore, the length of the buffer queue in the scheme is relatively fixed, so that the air interface time delay and the service type cannot be perceived dynamically, and when the network environment and the service type change, the better balance between the time delay and the performance expected by the user cannot be obtained.
In order to solve the above problems, the embodiments of the present application provide a method for adjusting a buffer queue, which can determine a user expected delay by sensing a wireless negotiation rate and a service type, dynamically detect a network transmission delay according to a change of a network condition, thereby adjusting a buffer queue length, and finally determine a packet delivery policy by the adjusted buffer queue length, thereby obtaining a better dynamic balance between the user expected delay and performance.
The following describes in detail the implementation of the embodiment of the present application with reference to the drawings. The buffer queue adjusting method provided by the embodiment of the application is applied to a receiving end (also called electronic equipment). In the embodiment of the present application, taking the example that the receiving end (i.e. the electronic device) is a mobile phone, a hardware structure of the receiving end is introduced.
As shown in fig. 2, the electronic device 200 may include: processor 210, external memory interface 220, internal memory 221, universal serial bus (un iversa l ser ia l bus, USB) interface 230, charge management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, headset interface 270D, sensor module 280, keys 290, motor 291, indicator 292, camera 293, display 294, and subscriber identity module (subscr iber ident ificat ion modu le, SIM) card interface 295, among others.
The sensor module 280 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, and the like.
It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic apparatus 200. In other embodiments, the electronic device 200 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 210 may include one or more processing units such as, for example: the processor 210 may include an application processor (app l icat ion processor, AP), a modem processor, a graphics processor (graph ics process ing un it, GPU), an image signal processor (image s igna l processor, ISP), a controller, a memory, a video codec, a digital signal processor (d igita l s igna l processor, DSP), a baseband processor, and/or a neural network processor (neuro-network process ing un it, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and command center of the electronic device 200. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 210 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 210 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated ci rcu it, I2C) interface, an integrated circuit built-in audio (inter-integrated ci rcu it sound, I2S) interface, a pulse code modulation (pu l se code modu l at ion, PCM) interface, a universal asynchronous receiver transmitter (un iversa l asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobi le industry processor interface, MI PI), a general purpose input/output (GPIO) interface, a subscriber identity module (subscr iber ident ity modu le, SIM) interface, and/or a universal serial bus (un iversa l ser ia l bus, USB) interface, among others.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device 200. In other embodiments, the electronic device 200 may also employ different interfaces in the above embodiments, or a combination of interfaces.
The charge management module 240 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 240 may receive a charging input of a wired charger through the USB interface 230. In some wireless charging embodiments, the charge management module 240 may receive wireless charging input through a wireless charging coil of the electronic device 200. The charging management module 240 may also provide power to the electronic device through the power management module 241 while charging the battery 242.
The power management module 241 is used for connecting the battery 242, and the charge management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and/or the charge management module 240 and provides power to the processor 210, the internal memory 221, the external memory, the display 294, the camera 293, the wireless communication module 260, and the like. The power management module 241 may also be configured to monitor battery capacity, battery cycle times, battery health (leakage, impedance), and other parameters. In other embodiments, the power management module 241 may also be disposed in the processor 210. In other embodiments, the power management module 241 and the charge management module 240 may be disposed in the same device.
The wireless communication function of the electronic device 200 can be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 200 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 250 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied on the electronic device 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (low noi se amp l ifier, LNA), etc. The mobile communication module 250 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation.
The mobile communication module 250 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be disposed in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be provided in the same device as at least some of the modules of the processor 210.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 270A, receiver 270B, etc.), or displays images or video through display screen 294. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 250 or other functional module, independent of the processor 210.
The wireless communication module 260 may provide solutions for wireless communication including wireless local area network (Wi re less loca larea networks, WLAN) (e.g., wireless fidelity (Wi re less fide l ity, wi-Fi) network), bluetooth (BT), global navigation satellite system (globa l navigat ion sate l l ite system, GNSS), frequency modulation (frequency modu l at ion, FM), near field wireless communication technology (near fie ld commun ication, NFC), infrared technology (I R), etc., as applied on the electronic device 300.
The wireless communication module 260 may be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 260 may also receive a signal to be transmitted from the processor 210, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 250 of electronic device 200 are coupled, and antenna 2 and wireless communication module 260 are coupled, such that electronic device 200 may communicate with a network and other devices via wireless communication techniques. The wireless communication techniques may include global system for mobile communications (globa l system for mobi le commun icat ions, GSM), general packet radio service (genera l packet rad io service, GPRS), code division multiple access (code d ivi s ion mu lt ip le access, CDMA), wideband code division multiple access (wideband code d ivi s ion mu lt ip le access, WCDMA), time division code division multiple access (t ime-d ivi s ion code d ivi s ion mu lt ip le access, TD-SCDMA), long term evolution (long term evo l ut ion, LTE), BT, GNSS, WLAN, NFC, FM, and/or I R techniques, among others. The GNSS may include a global satellite positioning system (globa l pos it ion ing system, GPS), a global navigation satellite system (globa lnavigat ion sate l l ite system, GLONASS), a beidou satellite navigation system (beidou navigat ion sate l l ite system, BDS), a quasi zenith satellite system (quas i-zen ith sate l l ite system, QZSS) and/or a satellite based augmentation system (sate l l ite based augmentat ion systems, SBAS).
The electronic device 200 implements display functions through a GPU, a display screen 294, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
The display 294 is used to display images, videos, and the like. The display 294 includes a display panel. The display panel may employ a liquid crystal display (l iqu id crysta l d i sp l ay, LCD), an Organic Light Emitting Diode (OLED), an active-matr ix organ ic l ight emitt ing d iode or active-matrix OLED (AMOLED), a Flexible Light Emitting Diode (FLED), a mini led, micro-OLED, a quantum dot light emitting diode (quantum dot l ight emitt ing d iodes, QLED), or the like.
The electronic device 200 may implement a photographing function through an ISP, a camera 293, a video codec, a GPU, a display 294, an application processor, and the like.
The ISP is used to process the data fed back by the camera 293. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 293.
The camera 293 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coup led device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 200 may include 1 or N cameras 293, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 200 is selecting a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 200 may support one or more video codecs. In this way, the electronic device 200 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a Neural Network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of the electronic device 200 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 220 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 200. The external memory card communicates with the processor 210 through an external memory interface 220 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
Internal memory 221 may be used to store computer executable program code that includes instructions. The processor 210 executes various functional applications of the electronic device 200 and data processing by executing instructions stored in the internal memory 221. For example, in an embodiment of the present application, the processor 210 may include a memory program area and a memory data area by executing instructions stored in the internal memory 221.
The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 200 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (un iversa l f l ash storage, UFS), and the like.
The electronic device 200 may implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an ear-headphone interface 270D, an application processor, and the like. Such as music playing, recording, etc.
Touch sensors, also known as "touch panels". The touch sensor may be disposed on the display screen 294, and the touch sensor and the display screen 294 form a touch screen, which is also called a "touch screen". The touch sensor is used to detect a touch operation acting on or near it. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 294. In other embodiments, the touch sensor may also be disposed on a surface of the electronic device 200 at a different location than the display 294.
In the embodiment of the present application, the electronic device 200 may detect a touch operation input by a user on the touch screen through the touch sensor, and collect one or more of a touch position, a touch area, a touch direction, a touch time and the like of the touch operation on the touch screen. In some embodiments, the electronic device 200 may determine the touch location of a touch operation on the touch screen by combining a touch sensor and a pressure sensor.
Keys 290 include a power on key, a volume key, etc. The keys 290 may be mechanical keys. Or may be a touch key. The electronic device 200 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 200.
The motor 291 may generate a vibration alert. The motor 291 may be used for incoming call vibration alerting or for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 291 may also correspond to different vibration feedback effects by touch operations applied to different areas of the display 294. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 292 may be an indicator light, which may be used to indicate a state of charge, a change in power, a message indicating a missed call, a notification, etc. The SIM card interface 295 is for interfacing with a SIM card. The SIM card may be inserted into the SIM card interface 295 or removed from the SIM card interface 295 to enable contact and separation from the electronic device 200. The electronic device 200 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 295 may support Nano SIM cards, micro SIM cards, and the like.
The methods in the following embodiments may be implemented in the electronic device 200 having the above-described hardware structure.
The buffer queue adjusting method provided by the embodiment of the application is applied to the receiving end. The receiving end establishes wireless connection with the transmitting end, and the receiving end is used for receiving and caching the data packet of the first service from the transmitting end and then processing the data packet so as to execute the first service. Wherein the first traffic may be a streaming type traffic, e.g. a heterogeneous drop. In the heterogeneous screen projection, the screen projection device (transmitting end) transmits the data (data packet) to be projected to the screen projection device (receiving end), and the screen projection device processes the received data (data packet) to be projected. Referring to fig. 3, fig. 3 is a flowchart illustrating an implementation of a method for adjusting a buffer queue according to an embodiment of the present application. As shown in fig. 3, the buffer queue adjustment method may include S301-S310.
S301, responding to the initiating operation of the first service, and acquiring the service type of the first service currently performed by the receiving end.
For example, an interface of the receiving end is provided with service buttons of each service, and the receiving end responds to touch operation of a user on the service buttons to acquire service types of the corresponding services of the service buttons. The first service may also be initiated by the transmitting end. Whether the sending end or the receiving end initiates the first service, the receiving end can start to execute the method of the embodiment of the application after the first service is initiated, and the service type of the first service is obtained.
Referring to fig. 4, fig. 4 is a schematic diagram of a software structure for acquiring a service type of a currently performed first service according to an embodiment of the present application. As shown in fig. 4, an upper layer (such as an application layer) of the receiving end acquires a service type of a first service currently performed, and transmits the service type to a communication module of the receiving end, and the communication module transmits the service type to a protocol stack service layer where the receiving end is located. Therefore, the receiving end determines the service type of the first service currently performed according to the information transferred by the upper layer.
The upper layer of the receiving end can transmit the identification information to the communication module by determining the identification information corresponding to the service type. The communication module may be, for example, a MAGICLINK module, a MAGICLINK module including a SENDSTREAM module, a SENDVI DEO module, and the like. After receiving the identification information, the module corresponding to the service type in the MAGICLINK module transmits the identification information to the protocol stack service layer where the receiving end is located. For example, the upper layer determines that the first service currently performed is a super mouse service, and obtains identification information (e.g. 001) corresponding to the super mouse service. The upper layer transmits the identification information (001) to the communication module, and the communication module transmits the identification information (001) to the protocol stack service layer where the receiving end is located. And the protocol stack service layer where the receiving end is positioned determines the corresponding service type according to the identification information (001). The identification information corresponding to the service type is pre-stored in the receiving end, and the identification information can be set in other forms.
The receiving end responds to the initiation operation of the first service, and can also acquire the current wireless negotiation rate of the receiving end and the transmitting end. The current wireless negotiation rate of the receiving end and the transmitting end is used together with the service type of the first service to determine the expected time delay of the user. For example, the receiving end may periodically obtain the current wireless negotiation rate between the receiving end and the transmitting end in response to the initiation operation of the first service. For example, after S301, the method of the embodiment of the present application may include S202:
s302, the receiving end obtains the current wireless negotiation rate 1 between the receiving end and the transmitting end.
In the embodiment of the application, the receiving end can periodically acquire the current wireless negotiation rate of the receiving end and the transmitting end. The period of the wireless negotiation rate acquired by the receiving end can be preconfigured in the receiving end or set by a user at the receiving end. Alternatively, different periods may be set for different services.
S303, the receiving end determines the service type of the first service and the user expected time delay 1 corresponding to the current wireless negotiation rate 1.
In S303, the wireless negotiation rate 1 acquired by the receiving end may be the wireless negotiation rate 1 acquired by the receiving end for the first time in response to the initiation operation of the first service. Or, the wireless negotiation rate 1 may also be an average value of wireless negotiation rates acquired by the receiving end in the previous P times in response to the initiation operation of the first service. In this scenario, the receiving end may use the average value of the wireless negotiation rate acquired every P times to determine the expected delay of the user. Of course, the receiving end may also use the average value of the wireless negotiation rate obtained every P times as a judging condition for the current transmission delay between the receiving end and the transmitting end obtained by the receiving end. P is more than or equal to 2, and P is a positive integer. For related technical solutions, reference may be made to the following detailed descriptions in the embodiments, which are not repeated here.
In the embodiment of the application, the receiving end pre-stores time delay information of various service types. The delay information for each service type includes: the service types expect time delay for the corresponding users in different wireless negotiation rate intervals. For example, the wireless negotiation rate may be a WI FI negotiation rate.
Take the wireless negotiation rate as the WI FI negotiation rate as an example. The receiving end can save the time delay information of the multiple service types in a table mode. Specifically, the mapping relationship between the expected time delay of the user and the service type and the WI FI negotiation rate may be as shown in table 1:
TABLE 1
service/WIFI negotiation rate 433~1200Mbps 100~433Mbps 0~100Mbps
Super mouse A 0 ms A 1 ms A 2 ms
Super-call B 0 ms B 1 ms B 2 ms
Heterogeneous screen of throwing C 0 ms C 1 ms C 2 ms
In the mapping relation table, WI FI negotiation rate is divided into three negotiation rate intervals of 0-100 Mbps, 100-433 Mbps and 433-1200 Mbps.
The WI FI negotiation rate may represent a network condition, and the larger the WI FI negotiation rate, the better the network condition. The embodiment of the application can define the negotiation rate intervals to be respectively 3 intervals of good (433-1200 Mbps), medium (100-433 Mbps) and bad (0-100 Mbps) of the network condition.
It should be noted that the user expected delay for the same traffic type at the same negotiated rate interval is the same. Taking the service type as the super mouse service as an example, if the WI FI negotiation rate at this time is 700Mbps, the corresponding user expected time delay is A 0 ms. If the WI FI negotiation rate is 800Mbps, the corresponding user expected delay is A 0 ms. Although the WI FI negotiation rate changes, it is still within the same negotiation rate interval, so the corresponding user expected delay does not change.
The expected time delay of users of different service types in the same negotiation rate interval is different. For example, when the super mouse service negotiates a rate of 100-433 Mbps with WI FI, the corresponding user expected delay is A 1 ms; when the WI FI negotiation rate of the super call service is 100-433 Mbps, the corresponding user expected time delay is B 1 ms; when the WI FI negotiation rate of the heterogeneous screen-throwing service is in the range of 100-433 Mbps, the corresponding user expected time delay is C 1 ms。
It will be appreciated that the better the network conditions, the less delay the user expects; the worse the network conditions, the greater the user's expected delay. Thus, in the above-mentioned map, A 2 >A 1 >A 0 ,B 2 >B 1 >B 0 ,C 2 >C 1 >C 0
After the receiving end obtains the wireless negotiation rate (such as wireless negotiation rate 1), the receiving end can query the user expected time delay corresponding to the wireless negotiation rate interval where the current wireless negotiation rate is located from the pre-stored time delay information of the service type of the first service. The receiving end periodically obtains the current wireless negotiation rate, which can also be considered as obtaining the current wireless negotiation rate in real time.
Referring to fig. 5, fig. 5 is a schematic diagram of a perception flow of user expected time delay according to an embodiment of the present application. As shown in fig. 5, the upper layer initiates a stream type service, and sends the service type corresponding to the service to the protocol stack service layer where the receiving end is located. The protocol stack service layer where the receiving end is located perceives the wireless negotiation rate in real time, and then determines the corresponding user expected time delay according to the service type and the current wireless negotiation rate.
S304, the receiving end obtains the current transmission delay 1 of the receiving end and the transmitting end.
The receiving end can obtain the current transmission delay 1 of the receiving end and the transmitting end in response to the initiation operation of the first service. The transmission delay 1 is used for indicating the time taken for transmitting a data packet of the first service from the transmitting end to the receiving end and receiving the corresponding data packet. The transmission delay 1 is used to adjust the length K of the buffer queue.
In the embodiment of the application, taking the current transmission delay 1 of the receiving end and the transmitting end obtained by the receiving end as an example, a specific method for obtaining the current transmission delay of the receiving end and the transmitting end by the receiving end is introduced.
In one implementation manner, the transmitting end may actively trigger the receiving end to acquire the current flow of the transmission delay 1 between the receiving end and the transmitting end in response to the initiation operation of the first service.
Specifically, the sending end may actively send a delay probe request (i.e., a delay probe frame) to the receiving end in response to the initiation operation of the first service as shown in fig. 6A. The time delay detection frame sent by the sending end carries time stamp information. The receiving end is connected withAfter receiving the time delay detection frame, a time delay detection Acknowledgement (ACK) frame can be immediately sent back to the sending end. The sending end records the time when the time delay detection confirmation frame is received, and the difference between the time when the time delay detection frame is sent is Round Trip Time (RTT). And finally, the sending end transmits the delay notification frame carrying the RTT to the receiving end. At this time, the current transmission delay T s Namely RTT/2.
In another implementation manner, the receiving end may actively trigger the receiving end to acquire the current flow of the transmission delay 1 between the receiving end and the transmitting end in response to the initiation operation of the first service.
Specifically, the receiving end may actively send a delay probe request (i.e., a delay probe frame) to the sending end in response to the initiation operation of the first service as shown in fig. 6B. The time stamp information is carried in the time delay detection frame sent by the receiving end. After receiving the time delay detection frame, the transmitting end can immediately send back a time delay detection Acknowledgement (ACK) frame to the receiving end. The receiving end can record the time of sending the time delay detection frame. And the receiving end records the time when the time delay detection confirmation frame is received, and the difference between the time when the time delay detection frame is transmitted is Round Trip Time (RTT). Finally, the receiving end can obtain the current transmission delay T s Namely RTT/2. Wherein the transmission delay T s May be 20ms as illustrated in fig. 7.
In the following embodiments, a flow in which a sending end actively triggers a receiving end to obtain a current transmission delay between the receiving end and the sending end is taken as an example, and the method in the embodiments of the present application is described.
S305, the receiving end adjusts the length K of the buffer queue based on the user expected time delay 1, the transmission time delay 1 and the packet interval S of the data packet sent by the sending end 1
Referring to fig. 7, fig. 7 is a schematic diagram illustrating determining a desired cache queue according to an embodiment of the application. As shown in fig. 7, the user expects a time delay T u (i.e., the user minimum experienced delay of FIG. 7) is equal to the transmission delay T s Adding a first packet buffer delay, wherein the first packet buffer delay is the length K of a buffer queue 1 And the packet interval S. That is, the following equation holds: t (T) u =K 1 ×S+T s . From this calculation, it is known that the length K of the cache queue 1 =(T u -T s )/S。
In the above relation, the smaller the user expected time delay, the smaller the length of the buffer queue; the greater the user desired delay, the greater the length of the cache queue. The smaller the transmission delay, the larger the length of the buffer queue; the larger the transmission delay, the smaller the length of the buffer queue.
The packet interval of the sending end sending the data packet may refer to an average value of each packet interval of the sending end sending each data packet. As shown in fig. 7, the packet interval S may be S 1 And S is 2 Average value of (2).
In the embodiment of the application, the length of the buffer queue can be adjusted at the beginning of service instead of being based on the fixed buffer queue length, so that a better delay jitter resisting effect can be achieved.
After S305, the length of the buffer queue in the receiving end has been adjusted based on the user desired delay and the transmission delay. However, the actual number of packets currently buffered in the buffer queue is not necessarily the same as the number of packets that can be buffered in the buffer queue. Based on the method, the receiving end can also adjust the processing strategy of the data packet according to the actual number and the length of the buffer queue so as to ensure that the receiving end can keep the speed of processing the data packet when the delay is jittered. Specifically, after S305, the method of the embodiment of the present application may further include S306.
S306, the receiving end acquires the actual number k of the data packets currently cached in the cache queue 1 Based on the actual number k 1 Length K of buffer queue 1 Adjusting the processing strategy of the cached data packet in the cache queue until K is cached in the cache queue 1 And processing the data packets cached in the cache queue according to the packet sending interval after the data packets are received.
In the embodiment of the application, different data packet processing strategies are stored in the receiving end, and according to the actual number k of the data packets cached currently 1 Length K of buffer queue to be adjusted 1 To determine. Exemplary, S306 may include S306a-S306c:
S306a, if the actual number k 1 Less than the length K of the cache queue 1 And the receiving end processes the data packets cached in the cache queue according to the packet sending interval, records the lost data packets in the cache queue and retransmits the lost data packets.
S306b, if the actual number k 1 Is greater than the length K of the buffer queue 1 The receiving end processes the data packets cached in the cache queue according to the target interval or performs packet loss processing on the data packets in the cache queue; wherein the target interval is smaller than the packet sending interval;
s306c, if the actual number k 1 And if the data packet is 0, the receiving end immediately processes the corresponding data packet after caching the data packet in the cache queue.
For example, referring to fig. 8, fig. 8 is a schematic diagram of a buffer queue packet adjustment strategy according to an embodiment of the present application. As shown in fig. 8, if the actual number k of data packets currently buffered in the buffer queue 1 Less than the length K of the cache queue 1 And processing the data packets cached in the cache queue according to the packet sending interval, recording the lost data packets in the cache queue, and retransmitting the lost data packets (i.e. executing S306 a).
The receiving end sends the lost data packet to the retransmission queue, but not all the data packets in the retransmission queue need to be retransmitted. If the sequence number of the data packet retransmitted in the retransmission queue is smaller than the sequence number of the data packet currently processed, the corresponding data packet is not retransmitted any more, so that resource waste is avoided. If the sequence number of the data packet retransmitted in the retransmission queue is larger than the sequence number of the data packet processed currently, retransmitting the corresponding data packet.
For example, if the length K of the cache queue 1 For 6, the actual number k of currently buffered packets 1 And 4, recording the data packets lost in the buffer queue as the data packet 2 and the data packet 4 when the data packet currently buffered is the data packet 1, the data packet 3, the data packet 5 and the data packet 6. Transmitting the data packet 2 and the data packet 4 into a retransmission queue, if the serial number of the data packet currently processed is 3, retransmitting the data packet 2 and only dataPacket 4 is retransmitted.
As shown in fig. 8, if the actual number k of data packets currently buffered in the buffer queue 1 Is greater than the length K of the buffer queue 1 The receiving end processes the data packet buffered in the buffer queue according to the target interval or performs packet loss processing on the data packet in the buffer queue (i.e. executing S306 b). Wherein the target interval is smaller than the packet sending interval, i.e. the data packets in the buffer queue are accelerated until the actual number k of the data packets currently buffered 1 Equal to the length K of the cache queue 1
For example, if the length K of the cache queue 1 For 6, the actual number k of currently buffered packets 1 If the current packet transmission interval is 4ms, the target interval for processing the data packet may be set to 3ms. Or, carrying out packet loss processing on two data packets in the current cached data packets so as to ensure that the actual number k of the current cached data packets 1 Equal to the length K of the cache queue 1
As shown in fig. 8, if the actual number k of data packets currently buffered in the buffer queue 1 If it is 0, the receiving end immediately processes the corresponding data packet after buffering one data packet in the buffer queue (i.e. executing S306 c). That is, the data packet previously buffered in the buffer queue has been processed, and at this time, the receiving end immediately processes the corresponding data packet as long as a new data packet is added to the buffer queue.
In the embodiment of the application, the expected time delay of the user is determined by sensing the wireless negotiation rate and the service type, and the network transmission time delay is dynamically detected according to the change of the network condition, so that the length of the expected cache queue is determined. And finally, determining a packet delivery strategy through the expected buffer queue length, so that better dynamic balance is achieved between the user experience time delay and the performance, and the performance waste is avoided while the time delay jitter is smoothed.
It will be appreciated that the wireless negotiation rate between the receiving end and the transmitting end may vary for various reasons, such as network conditions. If the wireless negotiation rate between the receiving end and the transmitting end is greatly changed, the service type of the first service and the expected time delay of the user corresponding to the current wireless negotiation rate should be correspondingly adjusted. And the current transmission delay between the receiving end and the transmitting end can also change. Thus, the length of the cache queue should also be adjusted accordingly. As shown in fig. 7, when the wireless negotiation rate changes across regions, the transmitting end may send the delay detection frame to the receiving end again, so that the receiving end obtains the current transmission delay, so as to adjust the length of the buffer queue correspondingly. Based on this, the method of the embodiment of the application may further include:
s307, when the current wireless negotiation rate changes across areas, the receiving end determines the service type of the first service and the user expected time delay 2 corresponding to the current wireless negotiation rate 2.
For example, referring to table 1, when the current wireless negotiation rate is changed from 500Mbps to 300Mbps, that is, the rate interval in which the wireless negotiation rate is located is changed from the good interval to the middle interval, if the receiving end determines that the service type of the first service is the super-call service. The receiving end determines that the corresponding user expected time delay of the super call service is B when the wireless negotiation rate is 300Mbps 1 ms. That is, when the wireless negotiation rate of the super-call service is changed from 500Mbps to 300Mbps, the corresponding user expected time delay is changed from B 0 ms becomes B 1 ms。
The method of "the receiving end determining the service type of the first service and the user expected time delay 2 corresponding to the current wireless negotiation rate 2" in S307 may refer to the method of "the receiving end determining the service type of the first service and the user expected time delay 1 corresponding to the current wireless negotiation rate 1" in S303, and the embodiment of the present application will not be described in detail here.
S308, the receiving end acquires the current transmission delay 2 of the receiving end and the transmitting end.
In the embodiment of the application, the transmitting end and the receiving end can monitor the change of the current wireless negotiation rate. In one implementation, when the current wireless negotiation rate changes across intervals, the transmitting end actively triggers the receiving end to acquire the current transmission delay 1 flow of the receiving end and the transmitting end.
Specifically, the transmitting end detects the current wireless negotiation rateWhen the inter-interval change occurs, as shown in fig. 6A, a delay probe request (i.e., a delay probe frame) may be actively sent to the receiving end. The time delay detection frame sent by the sending end carries time stamp information. After receiving the time delay detection frame, the receiving end can immediately reply a time delay detection Acknowledgement (ACK) frame to the transmitting end. The sending end records the time when the time delay detection confirmation frame is received, and the difference between the time when the time delay detection frame is sent is Round Trip Time (RTT). And finally, the sending end transmits the delay notification frame carrying the RTT to the receiving end. At this time, the current transmission delay T s Namely RTT/2.
In another implementation manner, when the current wireless negotiation rate changes across intervals, the receiving end can be actively triggered to acquire the current transmission delay 1 flow of the receiving end and the transmitting end.
Specifically, when the receiving end monitors that the current wireless negotiation rate changes across intervals, as shown in fig. 6B, a delay detection request (i.e., a delay detection frame) may be actively sent to the sending end. After receiving the time delay detection frame, the transmitting end can immediately reply a time delay detection Acknowledgement (ACK) frame to the receiving end. The receiving end can record the time of sending the time delay detection frame. And the receiving end records the time when the time delay detection confirmation frame is received, and the difference between the time when the time delay detection frame is transmitted is Round Trip Time (RTT). Finally, the receiving end can obtain the current transmission delay T s Namely RTT/2.
S309, the receiving end adjusts the length K of the buffer queue based on the user expected time delay 2, the transmission time delay 2 and the packet interval S of the data packet sent by the sending end 2
In S309, "the receiving end adjusts the length K of the buffer queue based on the user expected delay 2, the transmission delay 2, and the packet interval S of the data packet sent by the transmitting end 2 The method of "may refer to" the receiving end adjusts the length K of the buffer queue based on the user expected delay 1, the transmission delay 1 and the packet interval S of the data packet sent by the sending end "in S305 1 "method of the following. Embodiments of the present application will not be described in detail herein.
S310, the receiving end obtains the current buffer in the buffer queueActual number of stored data packets k 2 Based on the actual number k 2 Length K of buffer queue 2 Adjusting the processing strategy of the cached data packet in the cache queue until K is cached in the cache queue 2 And processing the data packets cached in the cache queue according to the packet sending interval after the data packets are received.
Wherein "the receiving end group is based on the actual number k" in S310 2 Length K of buffer queue 2 Adjusting the processing strategy of the cached data packet in the cache queue until K is cached in the cache queue 2 The method of processing the data packets buffered in the buffer queue at the packet transmission interval after the data packets can refer to "the receiving end is based on the actual number k" in S306 1 Length K of buffer queue 1 Adjusting the processing strategy of the cached data packet in the cache queue until K is cached in the cache queue 1 And processing the data packets cached in the cache queue according to the packet sending interval after the data packets are received. Embodiments of the present application will not be described in detail herein.
It should be noted that in the embodiment of the present application, the network delay is not detected in real time. In addition to performing delay detection in response to the initiation of the first service, it is only determined whether to detect the delay after sensing whether the network condition changes based on the wireless negotiation rate, so as to save resources.
It should be noted that, in the process of executing S303-S306 at the receiving end, the wireless negotiation rate between the receiving end and the transmitting end may change between the cells at any time. Therefore, in the embodiment of the present application, the receiving end may execute the S307 and the subsequent method flows at any time in the process of executing S303-S306. In fig. 3, only after S306, the receiving end executes S307 and the subsequent method flows as examples, and a method flow diagram of the embodiment of the present application is shown. However, the timing of execution of S307 and the subsequent method flows is not limited by fig. 3.
In addition, in the process of executing the S307 and the subsequent method flows, the wireless negotiation rate between the receiving end and the transmitting end may also change across areas at any time. When the current wireless negotiation rate changes across intervals, the receiving end can redetermine the service type of the first service and the user expected time delay corresponding to the current wireless negotiation rate, and reacquire the current transmission time delay so as to adjust the length of the buffer queue. For specific methods, reference may be made to the detailed descriptions of S307-S310, and the embodiments of the present application are not described herein.
In the embodiment of the application, after the wireless negotiation rate changes across areas, the expected time delay of the user corresponding to the current service type under the changed wireless negotiation rate is redetermined, and the current transmission time delay is detected again, so that the updated buffer queue length is determined. And finally, determining the strategy for processing the data packet in the buffer queue again through the updated buffer queue length, thereby obtaining better dynamic balance between the time delay expected by the user and the performance, and not causing the performance waste while smoothing the time delay jitter.
Referring to fig. 9, fig. 9 is a schematic diagram illustrating an overall implementation of another buffer queue adjustment method according to an embodiment of the present application. As shown in fig. 9, the embodiment of the present application may be subdivided into the following 4 parts according to functions: user expects delay perception, delay detection, buffer queue determining strategy and buffer queue adjusting strategy.
In a user expected time delay sensing part, a receiving end responds to the initiating operation of a first service and acquires the service type of the first service. And the receiving end acquires the current wireless negotiation rate of the receiving end and the transmitting end. Then, the receiving end inquires the user expected time delay T corresponding to the wireless negotiation rate interval where the current wireless negotiation rate is located from the pre-stored time delay information of the service type of the first service u
In the delay detection part, when the receiving end or the transmitting end responds to the initiating operation of the first service or the current wireless negotiation rate generates inter-interval change, a delay detection request is sent to acquire the round trip time RTT, so that the current transmission delay T of the receiving end and the transmitting end is obtained s
In the cache queue determination policy section, the formula k= (T u -T s ) and/S, calculating to obtain the length K of the cache queue. S is a packet sending interval for sending data packets by a sending end.
In the buffer queue adjustment strategy part, the actual number K of the data packets currently buffered in the buffer queue is obtained, and the processing strategy of the data packets buffered in the buffer queue is adjusted based on the actual number K and the length K of the buffer queue until the data packets buffered in the buffer queue have K data packets, and then the data packets buffered in the buffer queue are processed according to the packet transmission interval.
Specifically, as shown in fig. 9, it is determined whether the actual number K is greater than the length K of the cache queue. If the actual number K is greater than the length K of the buffer queue, the receiving end performs acceleration processing on the data packets buffered in the buffer queue or performs packet loss processing orderly until the actual number K is equal to the length K of the buffer queue. If the actual number K is smaller than the length K of the buffer queue, the receiving end searches the sequence number of the lost data packet in the buffer queue and retransmits the lost data packet. The receiving end sends the lost data packet to the retransmission queue, but not all the data packets in the retransmission queue need to be retransmitted. If the sequence number of the data packet retransmitted in the retransmission queue is smaller than the sequence number of the data packet currently processed, the corresponding data packet is not retransmitted any more, so that resource waste is avoided. If the sequence number of the data packet retransmitted in the retransmission queue is larger than the sequence number of the data packet processed currently, retransmitting the corresponding data packet. Until the actual number K is equal to the length K of the cache queue.
If the actual number K is equal to the length K of the buffer queue, the receiving end performs mathematical processing on the data packets in the buffer queue according to the packet sending interval. The receiving end perceives whether the wireless negotiation rate changes in real time, if perceives that the infinite negotiation rate changes across areas, the time delay detection frame is sent again to detect the transmission time delay, and the buffer queue length K is recalculated. And then, further adjusting the strategy for processing the data packet according to the updated buffer queue length K.
The buffer queue adjusting method provided by the embodiment of the application can dynamically adjust the length of the buffer queue according to the service type and the wireless negotiation rate, thereby determining the strategy for processing the data packet in the buffer queue through the length of the buffer queue. The method can obtain better dynamic balance between the expected time delay and the performance of the user, and can not cause the performance waste while smoothing the time delay jitter.
The embodiment of the application also provides a chip system which comprises at least one processor and at least one interface circuit. The processors and interface circuits may be interconnected by wires. For example, the interface circuit may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, the interface circuit may be used to send signals to other devices (e.g., processors). The interface circuit may, for example, read instructions stored in the memory and send the instructions to the processor. The instructions, when executed by a processor, may cause an electronic device to perform the various steps of the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
Embodiments of the present application also provide a computer-readable storage medium including computer instructions which, when executed on an electronic device as described above, cause the electronic device to perform the functions or steps performed in the method embodiments described above.
Embodiments of the present application also provide a computer program product which, when run on a computer, causes the computer to perform the functions or steps performed in the method embodiments described above.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a read-only memory (read on ly memory, ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or the like, which can store program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. The method for adjusting the buffer queue is characterized by being applied to a receiving end, wherein the receiving end establishes wireless connection with a sending end, and the receiving end is used for receiving and buffering a data packet of a first service from the sending end and then processing the data packet so as to execute the first service, and the method comprises the following steps:
responding to the initiating operation of the first service, and acquiring the service type of the first service;
acquiring the current wireless negotiation rate of the receiving end and the transmitting end, and determining the service type of the first service and the user expected time delay corresponding to the current wireless negotiation rate; the user expected time delay is the time required for the user to expect to send one data packet of the first service from the sending end to the receiving end to start processing the corresponding data packet;
acquiring the current transmission time delay of the receiving end and the transmitting end; the transmission delay is used for indicating the time spent for sending one data packet of the first service from the sending end to the receiving end and receiving the corresponding data packet;
Based on the user expected time delay, the transmission time delay and the packet sending interval of the data packet sent by the sending end, adjusting the length K of a cache queue; the buffer queue is used for buffering the data packets of the first service, and the length K of the buffer queue is equal to the number of the data packets which can be buffered in the buffer queue.
2. The buffer queue adjustment method according to claim 1, characterized in that after said adjusting the length K of the buffer queue based on the user desired delay and the transmission delay, the method further comprises:
and acquiring the actual number K of the data packets currently cached in the cache queue, and adjusting the processing strategy of the cached data packets in the cache queue based on the actual number K and the length K of the cache queue until the cache queue caches K data packets, and processing the cached data packets in the cache queue according to the packet sending interval.
3. The method for adjusting a buffer queue according to claim 1 or 2, wherein delay information of a plurality of service types is pre-stored in the receiving end, and the delay information of each service type includes: the service types are corresponding to the user expected time delay in different wireless negotiation rate intervals;
The determining the expected time delay of the user corresponding to the service type and the current wireless negotiation rate comprises the following steps:
and inquiring the user expected time delay corresponding to the wireless negotiation rate interval in which the current wireless negotiation rate is located from the time delay information of the service type of the first service.
4. The method for adjusting a buffer queue according to claim 3, wherein the obtaining the current transmission delay between the receiving end and the transmitting end includes:
and when the current wireless negotiation rate changes across areas, acquiring the current transmission delay of the receiving end and the transmitting end.
5. The method for adjusting a buffer queue according to any one of claims 1 to 4, wherein the obtaining the current transmission delay between the receiving end and the transmitting end includes:
receiving a time delay detection request from the transmitting end; the delay detection request is sent by the sending end when the current wireless negotiation rate changes across areas or responds to the initiating operation of the first service;
responding to the time delay detection request, and sending a time delay detection confirmation frame to the sending end;
receiving a time delay notification frame from the transmitting end; wherein the delay notification frame comprises round trip delay RTT, The transmission delay T s =RTT/2。
6. The method for adjusting a buffer queue according to any one of claims 1 to 4, wherein the obtaining the current transmission delay between the receiving end and the transmitting end includes:
sending a time delay detection request to the sending end;
receiving a time delay detection confirmation frame from the transmitting end;
calculating Round Trip Time (RTT) based on the sending time of the delay detection request and the receiving time of the delay detection acknowledgement frame to obtain the transmission delay; wherein the transmission delay T s =RTT/2。
7. The method for adjusting a buffer queue according to claim 2, wherein adjusting the processing policy of the buffered data packet in the buffer queue based on the actual number K and the length K of the buffer queue comprises:
if the actual number K is smaller than the length K of the buffer queue, processing the data packets buffered in the buffer queue according to the packet sending interval, recording the lost data packets in the buffer queue, and retransmitting the lost data packets;
if the actual number K is greater than the length K of the buffer queue, processing the data packets buffered in the buffer queue according to a target interval or performing packet loss processing on the data packets in the buffer queue; wherein the target interval is less than the packet interval;
And if the actual number k is 0, immediately processing the corresponding data packet after the buffer queue buffers one data packet.
8. The method for adjusting a buffer queue according to claim 7, wherein recording the lost data packet in the buffer queue, and retransmitting the lost data packet, comprises:
transmitting the lost data packet to a retransmission queue;
if the sequence number of the data packet retransmitted in the retransmission queue is smaller than the sequence number of the data packet processed currently, the corresponding data packet is not retransmitted;
and if the sequence number of the data packet retransmitted in the retransmission queue is larger than the sequence number of the data packet currently processed, retransmitting the corresponding data packet.
9. The method for adjusting a buffer queue according to any one of claims 1 to 8, wherein the smaller the user expected delay, the smaller the length of the buffer queue; the larger the user expected time delay is, the larger the length of the buffer queue is;
the smaller the transmission delay is, the larger the length of the buffer queue is; the larger the transmission delay is, the smaller the length of the buffer queue is.
10. The method for adjusting a buffer queue according to any one of claims 1 to 9, wherein adjusting the length of the buffer queue based on the expected delay of the user, the transmission delay, and a packet interval of the data packet sent by the sender includes:
Based on the user desired time delay T u Said transmission delay T s And a packet sending interval S for sending the data packet by the sending end, wherein the following formula is adopted:
K=(T u -T s )/S
and calculating the length K of the cache queue.
11. The method for adjusting a buffer queue according to any one of claims 1 to 10, wherein the obtaining the current wireless negotiation rate between the receiving end and the transmitting end includes:
and periodically acquiring the current wireless negotiation rate of the receiving end and the transmitting end.
12. An electronic device, the electronic device comprising: a communication module, a display screen, a memory, and one or more processors; the communication module, the display screen, the memory and the processor are coupled; the memory is for storing computer program code comprising computer instructions which, when executed by the electronic device, cause the electronic device to perform the method of any of claims 1-11.
13. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein instructions, which when run in a mobile terminal, cause the mobile terminal to perform the method of any of claims 1 to 11.
CN202211468931.5A 2022-11-22 2022-11-22 Cache queue adjusting method and electronic equipment Active CN116709432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211468931.5A CN116709432B (en) 2022-11-22 2022-11-22 Cache queue adjusting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211468931.5A CN116709432B (en) 2022-11-22 2022-11-22 Cache queue adjusting method and electronic equipment

Publications (2)

Publication Number Publication Date
CN116709432A true CN116709432A (en) 2023-09-05
CN116709432B CN116709432B (en) 2024-04-16

Family

ID=87836265

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211468931.5A Active CN116709432B (en) 2022-11-22 2022-11-22 Cache queue adjusting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN116709432B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110109A1 (en) * 2010-11-01 2012-05-03 Michael Luna Caching adapted for mobile application behavior and network conditions
CN102790998A (en) * 2012-06-19 2012-11-21 大唐移动通信设备有限公司 Network side device and AM (amplitude modulation) service data buffer method of network side device
WO2016124130A1 (en) * 2015-02-06 2016-08-11 上海交通大学 Dynamic time window and buffer mechanism in heterogeneous network transmission
CN110062425A (en) * 2019-04-08 2019-07-26 京信通信系统(中国)有限公司 Control method, device, computer equipment and the storage medium of network transmission speed
CN113328958A (en) * 2021-05-06 2021-08-31 北京连山科技股份有限公司 Multi-link mass transmission method and system based on UDP (user Datagram protocol) cache optimization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110109A1 (en) * 2010-11-01 2012-05-03 Michael Luna Caching adapted for mobile application behavior and network conditions
CN102790998A (en) * 2012-06-19 2012-11-21 大唐移动通信设备有限公司 Network side device and AM (amplitude modulation) service data buffer method of network side device
WO2016124130A1 (en) * 2015-02-06 2016-08-11 上海交通大学 Dynamic time window and buffer mechanism in heterogeneous network transmission
CN110062425A (en) * 2019-04-08 2019-07-26 京信通信系统(中国)有限公司 Control method, device, computer equipment and the storage medium of network transmission speed
CN113328958A (en) * 2021-05-06 2021-08-31 北京连山科技股份有限公司 Multi-link mass transmission method and system based on UDP (user Datagram protocol) cache optimization

Also Published As

Publication number Publication date
CN116709432B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
WO2020244623A1 (en) Air-mouse mode implementation method and related device
CN111132234B (en) Data transmission method and corresponding terminal
EP4135405A1 (en) Channel switching method, and electronic device and storage medium
EP4236434A1 (en) Channel switching method, electronic device, and storage medium
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
CN110913424B (en) Network connection control method and device, terminal and computer storage medium
CN114172791B (en) Channel switching method, electronic device and storage medium
WO2021190314A1 (en) Sliding response control method and apparatus of touch screen, and electronic device
US11412437B2 (en) Data transmission method and electronic device
US20230027525A1 (en) Http request transmission method and device
CN114422340A (en) Log reporting method, electronic device and storage medium
EP4132202A1 (en) Data downloading method and apparatus, and terminal device
US20220094748A1 (en) Connection establishment method and terminal device
WO2021043250A1 (en) Bluetooth communication method, and related device
CN113596919A (en) Data downloading method and device and terminal equipment
CN114710812B (en) Communication method and communication device
CN116709432B (en) Cache queue adjusting method and electronic equipment
CN113810965B (en) Channel switching method, electronic device and storage medium
WO2021197115A1 (en) Antenna tuning method and apparatus, and electronic device and network device
CN117729588A (en) Cache queue adjusting method and electronic equipment
CN116708317B (en) Data packet MTU adjustment method and device and terminal equipment
CN116709368B (en) Network acceleration method and device
RU2802678C1 (en) Channel switching method, electronic device and storage medium
CN116405960B (en) Network quality detection method and related electronic equipment
RU2811567C1 (en) Channel switching method, electronic device and data media

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant