CN114828098A - Data transmission method and electronic equipment - Google Patents

Data transmission method and electronic equipment Download PDF

Info

Publication number
CN114828098A
CN114828098A CN202210258157.9A CN202210258157A CN114828098A CN 114828098 A CN114828098 A CN 114828098A CN 202210258157 A CN202210258157 A CN 202210258157A CN 114828098 A CN114828098 A CN 114828098A
Authority
CN
China
Prior art keywords
data
transmitted
flow control
electronic device
configuration information
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
CN202210258157.9A
Other languages
Chinese (zh)
Other versions
CN114828098B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210258157.9A priority Critical patent/CN114828098B/en
Publication of CN114828098A publication Critical patent/CN114828098A/en
Application granted granted Critical
Publication of CN114828098B publication Critical patent/CN114828098B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/56Allocation or scheduling criteria for wireless resources based on priority criteria
    • H04W72/566Allocation or scheduling criteria for wireless resources based on priority criteria of the information or information source or recipient
    • H04W72/569Allocation or scheduling criteria for wireless resources based on priority criteria of the information or information source or recipient of the traffic information
    • 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 embodiment of the application provides a data transmission method and electronic equipment, wherein the method comprises the following steps: acquiring first configuration information; the first configuration information is used for representing flow control operation needed by the electronic equipment when data is transmitted; if the first configuration information carries the identifier of the first flow control operation, the electronic equipment executes the first flow control operation on data to be transmitted when the data are transmitted; or, if the first configuration information carries the identifier of the second flow control operation, the electronic device executes the second flow control operation on the data to be transmitted when transmitting the data. The method can select different flow control operations through function interfaces corresponding to different flow control operations, namely, a unified flow control configuration method is provided, research personnel only need to select different flow control operations according to needs to further form first configuration information, and the electronic equipment executes different flow control operations according to the first configuration information; the method provides great convenience for the development process of the WLAN chip driver of research personnel, and simultaneously facilitates the integration of the WLAN chip driver.

Description

Data transmission method and electronic equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a data transmission method and an electronic device.
Background
With the rapid development of electronic devices (mobile phones, tablets, watches, car machines, large screens, Virtual Reality (VR) devices, etc.), network layer protocols, network layer interfaces, and flow control technologies adopted by different electronic devices for network data transmission are different, so that challenges are brought to Wireless Local Area Network (WLAN) driver developers.
Because the network protocol interface and the flow control technology are different, the network layer interface and the flow control technology part driven by the WLAN chip with the same model are not easy to multiplex in different operating systems; for example, for different electronic devices, the WLAN chip-driven fluidics technology in one electronic device is different from the fluidics technology driven by the WLAN chip in another electronic device. Therefore, a unified flow control mechanism is needed to facilitate the development process of the WLAN chip driver.
Disclosure of Invention
The embodiment of the application provides a data transmission method and electronic equipment, which can provide a unified flow control mechanism and provide convenience for a development process of a WLAN chip driver.
In a first aspect, an embodiment of the present application provides a data transmission method, where the method is executed by an electronic device, and includes: acquiring first configuration information; the first configuration information is used for representing flow control operation which needs to be adopted when the electronic equipment transmits data; if the first configuration information carries an identifier of a first flow control operation, the electronic equipment executes the first flow control operation on data to be transmitted when transmitting the data; or, if the first configuration information carries an identifier of a second flow control operation, the electronic device executes the second flow control operation on data to be transmitted when transmitting the data.
The electronic device can be a mobile terminal, a tablet computer, a wearable device or other types of devices; the first configuration information is formed according to flow control operation selected by research personnel in the process of developing the WLAN chip driver, and different flow control operations comprise different data processing on data to be transmitted so as to achieve different flow control effects.
According to the data transmission method, in the process of developing the WLAN chip drive by research personnel, different flow control operations can be selected through function interfaces corresponding to different flow control operations, namely, a unified flow control configuration method is provided, the research personnel only need to select different flow control operations according to the self needs to form first configuration information, and the electronic equipment can execute different flow control operations according to the first configuration information; the method provides great convenience for the development process of the WLAN chip driver of research personnel, and simultaneously facilitates the integration of the WLAN chip driver.
With reference to the first aspect, in some implementation manners of the first aspect, when the electronic device performs a first flow control operation on data to be transmitted when the data is transmitted, the performing the first flow control operation includes: storing the data to be transmitted into a corresponding scheduling queue according to the transmission priority of the data to be transmitted; the transmission priority of the data to be transmitted is determined according to the data type of the data to be transmitted; according to the preset scheduling priority of the scheduling queue, dequeuing and scheduling the data to be transmitted; and carrying out flow control on the dequeued data to be transmitted, and sending the data to be transmitted after the flow control to a target interface.
By combining the first aspect and the foregoing implementation manner, a unified flow control mechanism is formed by performing priority scheduling and flow control on data to be transmitted, so that data transmission performance can be improved, and user experience when using an electronic device can be improved.
In a possible implementation manner, before the storing the data to be transmitted into the corresponding scheduling queue according to the transmission priority of the data to be transmitted, the method further includes: and determining the transmission priority of the data to be transmitted according to the data type of the data to be transmitted and the corresponding relation between the preset data type and the transmission priority.
Optionally, the preset corresponding relationship between the data type and the transmission priority may be stored in the database in the form of a data table, and the transmission priority of the data to be transmitted may be accurately determined through the preset corresponding relationship, so as to improve the data transmission performance.
In one possible implementation, performing flow control on dequeued data to be transmitted includes: calculating the flow rate corresponding to the data to be transmitted according to the flow of the data to be transmitted; and if the flow rate corresponding to the data to be transmitted is greater than or equal to a preset flow rate threshold value, performing flow shaping on the data to be transmitted.
The flow rate of the data to be transmitted can be a data volume; optionally, the algorithm used for traffic shaping may be a leaky bucket algorithm (leaky bucket), a token bucket algorithm (token bucket), or the like, so as to limit the flow rate of the data to be transmitted, and further improve the transmission performance.
In one possible implementation manner, the flow control of dequeued data to be transmitted further includes: and if the flow of the data to be transmitted is greater than or equal to a preset flow threshold value, scheduling available hardware resources in the electronic equipment according to a preset hardware scheduling rule so as to send the data to be transmitted after the flow is controlled to a target interface.
Optionally, the preset hardware scheduling rule may include increasing a frequency of a secure digital input and output card (secure digital input and output), running a large core of a CPU, and running multiple threads. The transmission process of the data to be transmitted is assisted by scheduling available hardware resources in the electronic equipment, and the transmission efficiency is further improved.
In one possible implementation, the obtaining the first configuration information includes: and after the electronic equipment is started, acquiring first configuration information of a network chip in the electronic equipment.
Alternatively, the electronic device may include a network chip (WLAN chip) and a flow control module, where the flow control module and the chip driver are both in kernel states, and data interaction therebetween is directly isomorphically transferred through a pointer. After the electronic device is started, reading first configuration information of the WLAN chip, and then configuring the flow control module according to the first configuration information, so that the flow control module executes subsequent flow control operation.
With reference to the first aspect and the foregoing implementation manner, the flow control module performs different flow control operations according to the first configuration information; the method provides great convenience for the development process of the WLAN chip driver of research personnel, and simultaneously facilitates the integration of the WLAN chip driver.
In one possible implementation, the data to be transmitted includes at least one of a data frame, a management frame, and a chip control command.
In a possible implementation manner, the method further includes: and carrying out format conversion on the data to be transmitted according to a preset data format.
By combining the first aspect and the implementation manner, the format conversion is performed on the data to be transmitted, so that the network data format can be standardized, the data copy frequency is reduced, and the transmission efficiency is improved.
In a possible implementation, the method further includes: after the electronic equipment is started, second configuration information is obtained; the second configuration information is used for representing a network protocol which needs to be adopted when the electronic equipment transmits data; and analyzing the second configuration information, and determining a network protocol adopted by the electronic equipment for transmitting the data to be transmitted.
The second configuration information is formed according to the network protocol type selected by the research and development personnel in the process of developing the WLAN chip driver, that is, the research and development personnel can select the corresponding network protocol according to the operating system type of the electronic device to which the WLAN chip is to be applied in the process of developing the WLAN chip driver, so as to form the second configuration information. In the method, research personnel only need to select different network protocols according to actual requirements to generate second configuration information, so that convenience is further provided for the research personnel in the WLAN chip drive development process, and meanwhile, the difference of network layers among different electronic devices can be shielded, and the multiplexing on the different electronic devices is realized.
In a second aspect, an apparatus is provided in an embodiment of the present application, where the apparatus is included in an electronic device, and the apparatus has a function of implementing a behavior of the electronic device in the first aspect and possible implementations of the first aspect. The functions may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions. Such as an acquisition module or unit, a transmission module or unit, etc.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and an interface; the processor, the memory and the interface cooperate with each other to enable the electronic device to perform any one of the methods according to the first aspect.
In a fourth aspect, an embodiment of the present application provides a chip including a processor. The processor is adapted to read and execute the computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof.
Optionally, the chip further comprises a memory, and the memory is connected with the processor through a circuit or a wire.
Further optionally, the chip further comprises a communication interface.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the processor is caused to execute any one of the methods in the technical solutions of the first aspect.
In a sixth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes: computer program code which, when run on an electronic device, causes the electronic device to perform any of the methods of the first aspect.
Drawings
Fig. 1 is a system architecture diagram illustrating an example of a data transmission method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an example of an electronic device according to an embodiment of the present disclosure;
FIG. 3 is a block diagram of a software architecture of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of an example data transmission method according to an embodiment of the present application;
fig. 5 is a schematic flowchart of another data transmission method according to an embodiment of the present application;
fig. 6 is a schematic diagram of an example of a data format of data to be transmitted according to an embodiment of the present application;
fig. 7 is a schematic flowchart of another data transmission method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" and "third" are used 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, features defined as "first", "second", "third" may explicitly or implicitly include one or more of the features.
The data transmission method provided in the embodiment of the present application may be applied to an electronic device that can access a WLAN for network data transmission, such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and the like, and the embodiment of the present application does not limit the specific type of the electronic device.
The data transmission method provided by the embodiment of the application can be applied to the system architecture shown in fig. 1. As shown in fig. 1, the network device layer includes a network device module, a data transmission/reception module, a management module, and a decision module; the network equipment module can define a uniform network equipment data structure and provide the capability of managing, adding and deleting the network equipment; the management module can carry out unified management on the data transmission process; the decision module comprises configuration information, a decision module and a data transmission module, wherein the configuration information is used for determining a network protocol required to be adopted for data transmission and is formed according to a network protocol type selected by a developer in the process of developing a WLAN chip driver; the data transmitting/receiving module is used for transmitting and/or receiving data. When the electronic equipment calls the whole system architecture, the data are transmitted to the management module through the data transmitting/receiving module, the management module determines a network protocol adopted by the data transmission according to the configuration information obtained by the analysis of the decision module, and transmits the data to the corresponding network protocol stack so as to perform the subsequent data transmission process.
The WLAN chip driver comprises a flow control configuration module, a flow control module and a data sending interface; the flow control configuration is used for determining flow control operation required to be adopted when data is transmitted, and configuring the flow control module according to the flow control configuration so as to enable the flow control module to execute corresponding flow control operation, wherein the flow control configuration is formed according to flow control operation selected by research personnel in the process of developing a WLAN chip driver; the data sending interface is used for sending data to the network equipment layer so as to adopt a corresponding network protocol for transmission.
For example, fig. 2 is a schematic structural diagram of an example of the electronic device 100 according to the embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The structure of the antenna 1 and the antenna 2 in fig. 2 is only an example. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as 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 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a 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 passes the demodulated low frequency baseband signal to a 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 a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. 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 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on 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 camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor, which processes input information quickly by referring to a biological neural network structure, for example, by referring to a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 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 (UFS), and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the electronic device 100 at a different position than the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of the electronic device 100.
Fig. 3 is a block diagram of a software structure of the electronic device 100 according to the embodiment of the present application. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom. The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media libraries (media libraries), three-dimensional graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver and a WLAN driver.
For convenience of understanding, the following embodiments of the present application take an electronic device with a structure shown in fig. 2 and fig. 3 as an example, and specifically describe a data transmission method provided by the embodiments of the present application with reference to the drawings and a system architecture.
Fig. 4 is a schematic flowchart of an example of a data transmission method provided in an embodiment of the present application, where the method includes:
s101, acquiring first configuration information; the first configuration information is used for representing flow control operation required by the electronic equipment when data is transmitted.
Specifically, in the process of developing a WLAN chip driver by research personnel, different flow control operations can be selected through function interfaces corresponding to the different flow control operations, so as to form first configuration information; wherein, the different flow control operations comprise executing different data processing on the data to be transmitted so as to achieve different flow control effects. The method can be applied to the electronic equipment after the WLAN chip driver is developed, and the first configuration information can be obtained after the electronic equipment is started under normal conditions.
It should be noted that the flow control operation may include a data processing procedure provided in this embodiment, may also include a data processing procedure provided by a WLAN chip manufacturer, and may also be a combination of two (or more) data processing procedures, so long as a corresponding function interface can be provided for a developer. In the development process, research and development personnel only need to select different flow control operations according to own needs, and do not need to redevelop different flow control operation processes. It should also be noted that the above configuration process may be applicable to electronic devices of the light device or rich device class.
And S102, if the first configuration information carries the identifier of the first flow control operation, the electronic equipment executes the first flow control operation on data to be transmitted when transmitting the data.
Alternatively, the first and second electrodes may be,
s103, if the first configuration information carries the identifier of the second flow control operation, the electronic equipment executes the second flow control operation on the data to be transmitted when transmitting the data.
Specifically, the flow control operation has a corresponding identifier, and the identifier may be a function name of a function interface corresponding to the flow control operation, or other identifiers that can distinguish different flow control operations. After the electronic equipment acquires the first configuration information, the identification carried by the first configuration information can be judged by analyzing the first configuration information; if the first configuration information carries the identifier of the first flow control operation, the electronic device executes the first flow control operation on the data to be transmitted when transmitting the data, and if the first configuration information carries the identifier of the second flow control operation, the electronic device executes the second flow control operation on the data to be transmitted when transmitting the data, wherein the first flow control operation and the second flow control operation correspond to different data processing processes.
According to the data transmission method, in the process of developing the WLAN chip drive by research personnel, different flow control operations can be selected through function interfaces corresponding to different flow control operations, namely, a unified flow control configuration method is provided, the research personnel only need to select different flow control operations according to the self needs to form first configuration information, and the electronic equipment can execute different flow control operations according to the first configuration information; the method provides great convenience for the development process of the WLAN chip driver of research personnel, and simultaneously facilitates the integration of the WLAN chip driver.
As shown in fig. 5, the electronic device, when transmitting data, executes a first flow control operation on data to be transmitted, including:
s201, storing the data to be transmitted into a corresponding scheduling queue according to the transmission priority of the data to be transmitted; the transmission priority of the data to be transmitted is determined according to the data type of the data to be transmitted.
Specifically, the electronic device may determine a corresponding transmission priority according to a data type of the data to be transmitted, for example, the transmission priority of the video data is greater than the transmission priority of the voice data, and then store the data to be transmitted in a corresponding scheduling queue according to the transmission priority. Optionally, there may be only one scheduling queue, and the data to be transmitted are enqueued in sequence according to the transmission priority; the number of the scheduling queues can be multiple, each transmission priority corresponds to one scheduling queue, and the data to be transmitted is stored in the scheduling queue corresponding to the transmission priority according to the transmission priority.
Optionally, the data to be transmitted may further include at least one of a data frame, a management frame, and a chip control command, and the electronic device may further determine a transmission priority of the data frame or the management frame according to a priority in a TCP \ IP packet priority (TOS) or UDP \ TCP packet header custom field. The management frame refers to a communication management frame between the network chip driver and the network peer according to the network protocol, for example, the management frame in the 802.11 protocol includes a disassociation frame (disassociation) and a deauthentication frame (deauthentication).
Optionally, before the electronic device stores the data to be transmitted in the corresponding scheduling queue, the transmission priority of the data to be transmitted may also be determined according to the data type of the data to be transmitted and the corresponding relationship between the preset data type and the transmission priority. For example, the preset correspondence between the data types and the transmission priorities may be stored in the database in the form of a data table.
S202, according to the preset scheduling priority of the scheduling queue, dequeuing and scheduling the data to be transmitted.
Specifically, each scheduling queue may also correspond to its own scheduling priority, and when the electronic device needs to schedule data to be transmitted in the scheduling queue, the electronic device may dequeue and schedule the data to be transmitted according to the scheduling priority.
Optionally, when there is only one scheduling queue, the data to be transmitted is directly dequeued in a first-in first-out manner.
And S203, controlling the flow of the dequeued data to be transmitted, and sending the data to be transmitted after the flow is controlled to a target interface.
Specifically, after the data to be transmitted is dequeued, the electronic device may further perform flow control on the dequeued data to be transmitted, so as to avoid that the data to be transmitted greatly affects other working performances of the electronic device, and send the data to be transmitted after the flow control to the target interface, so as to perform data transmission.
Optionally, before storing the data to be transmitted in the corresponding scheduling queue, the electronic device may further perform format conversion on the data to be transmitted according to a preset data format, so as to standardize a network data format, reduce the number of data copies, and further improve transmission efficiency. The preset data format may be as shown in fig. 6, and includes a doubly linked list, a buffer segment, a memory buffer address, and a memory buffer length field, where the memory buffer address is a buffer address of each segment in the buffer segment. The specific definition mode can be as follows:
Figure BDA0003549196300000131
according to the data transmission method, the priority scheduling and the flow control are carried out on the data to be transmitted, a unified flow control mechanism is formed, the data transmission performance can be improved, and the experience degree of a user when the user uses the electronic equipment is improved.
In a possible implementation manner, the method for controlling flow of dequeued data to be transmitted in S203 may include, but is not limited to: calculating the flow rate corresponding to the data to be transmitted according to the flow of the data to be transmitted; and if the flow rate corresponding to the data to be transmitted is greater than or equal to a preset flow rate threshold value, performing flow shaping on the data to be transmitted.
Specifically, the flow rate of the data to be transmitted may be a data volume, and the electronic device may calculate a flow rate corresponding to the data to be transmitted according to the data volume and the transmission duration; if the flow rate is greater than or equal to a preset flow rate threshold (e.g., 20 ms), the electronic device needs to perform traffic shaping on the data to be transmitted. Optionally, the algorithm used for traffic shaping may be a leaky bucket algorithm, a token bucket algorithm, or the like, so as to limit the flow rate of the data to be transmitted, and further improve the transmission performance. Optionally, if the traffic of the data to be transmitted is greater than or equal to a preset traffic threshold (e.g., 200 megabytes), the electronic device may also schedule available hardware resources in the electronic device according to a preset hardware scheduling rule, so as to avoid problems of congestion, delay and the like caused when the electronic device transmits the data to be transmitted; by way of example and not limitation, this may include increasing the frequency of secure digital input and output cards (secure digital input and output), running CPU large cores, multi-threaded running, etc.
In a possible implementation manner, aiming at the currently popular electronic device operating systems, such as a Linux system, a real-time operating system RTOS and the like, a WLAN driver developed by the Linux electronic device only supports docking with a network layer on Linux, and is high in cost and incapable of being reused when being transplanted to other platforms; the WLAN driver on the RTOS directly interfaces with the protocol stack, and the modification of the protocol stack may bring about modification of the driver, increase maintenance cost, and is not easy to be transplanted to another operating system, and reusability is poor. To solve this problem, referring to fig. 1, the management module in the network device layer of this embodiment may determine a network protocol that needs to be used for transmitting data according to configuration information (referred to as second configuration information) of the decision module, where the second configuration information is formed according to a network protocol type selected by a developer in a process of developing a WLAN chip driver, that is, the developer may select a corresponding network protocol according to an operating system type of an electronic device to which the WLAN chip is to be applied in a process of developing the WLAN chip driver, so as to form the second configuration information. After the electronic device is started, the second configuration information can be obtained, the network protocol adopted by the electronic device for transmitting the data to be transmitted is determined by analyzing the second configuration information, and the data to be transmitted is transmitted by using the network protocol. In the method, research personnel only need to select different network protocols according to actual requirements to generate second configuration information, so that convenience is further provided for the research personnel in the WLAN chip drive development process, and meanwhile, the difference of network layers among different electronic devices can be shielded, and the multiplexing on the different electronic devices is realized.
In a possible implementation manner, the electronic device may include a network chip (WLAN chip) and a flow control module, where the flow control module and a chip driver are both in a kernel state, and data interaction therebetween is directly isomorphically transferred through a pointer, as shown in fig. 7, where the data transmission method may include:
s301, after the electronic device is started, reading first configuration information of the WLAN chip.
And S302, configuring the flow control module according to the first configuration information.
And S303, the WLAN chip calls an interface function of the flow control module and sends the data to be transmitted to the flow control module.
And S304, the flow control module stores the data to be transmitted into the corresponding scheduling queue according to the transmission priority of the data to be transmitted.
S305, dequeuing and scheduling the data to be transmitted according to the scheduling priority of the preset scheduling queue.
S306, calculating the flow rate corresponding to the data to be transmitted according to the flow of the data to be transmitted; and if the flow rate corresponding to the data to be transmitted is greater than or equal to the preset flow rate threshold value, performing flow shaping on the data to be transmitted.
And S307, if the flow of the data to be transmitted is greater than or equal to a preset flow threshold, scheduling available hardware resources in the electronic equipment according to a preset hardware scheduling rule.
And S308, the flow control module sends the data to be transmitted after flow control to a data sending interface of the WLAN chip.
Some interfaces when the WLAN chip calls the flow control module may be defined as follows:
Figure BDA0003549196300000141
Figure BDA0003549196300000151
for the implementation process of the remaining steps in this embodiment, reference may be made to the description of the above embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
The above details examples of the data transmission method provided by the embodiments of the present application. It will be appreciated that the electronic device, in order to implement the above-described functions, comprises corresponding hardware and/or software modules for performing the respective functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional modules according to the data transmission method example, for example, the electronic device may be divided into the functional modules corresponding to the functions, such as an obtaining module and a transmitting module, or two or more functions may be integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The electronic device provided by the embodiment is used for executing the data transmission method, so that the same effect as the implementation method can be achieved.
In case of an integrated unit, the electronic device may further comprise a processing module, a storage module and a communication module. The processing module can be used for controlling and managing the action of the electronic equipment. The memory module may be used to support the electronic device in executing stored program codes and data, etc. The communication module can be used for supporting the communication between the electronic equipment and other equipment.
The processing module may be a processor or a controller. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein. A processor may also be a combination of computing functions, e.g., a combination of one or more microprocessors, a Digital Signal Processing (DSP) and a microprocessor, or the like. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
In an embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to this embodiment may be a device having the structure shown in fig. 2.
The embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor is enabled to execute the data transmission method according to any one of the above embodiments.
The embodiment of the present application further provides a computer program product, which when running on a computer, causes the computer to execute the above related steps to implement the data transmission method in the above embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory, so that the chip can execute the data transmission method in the above-mentioned method embodiments.
The electronic device, the computer-readable storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding method provided above, so that the beneficial effects achieved by the electronic device, the computer-readable storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Through the description of the above embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and 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 to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, or portions of the technical solutions that substantially contribute to the prior art, or all or portions of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall 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 (10)

1. A data transmission method, performed by an electronic device, comprising:
after the electronic equipment is started, acquiring first configuration information of a network chip in the electronic equipment; the first configuration information is used for representing flow control operation which needs to be adopted when the electronic equipment transmits data;
if the first configuration information carries an identifier of a first flow control operation, the electronic equipment executes the first flow control operation on data to be transmitted when transmitting the data;
alternatively, the first and second electrodes may be,
and if the first configuration information carries the identifier of the second flow control operation, the electronic equipment executes the second flow control operation on the data to be transmitted when transmitting the data.
2. The method of claim 1, wherein the electronic device performs a first flow control operation on data to be transmitted when transmitting the data, and the first flow control operation comprises:
storing the data to be transmitted into a corresponding scheduling queue according to the transmission priority of the data to be transmitted; the transmission priority of the data to be transmitted is determined according to the data type of the data to be transmitted;
according to the preset scheduling priority of the scheduling queue, dequeuing and scheduling the data to be transmitted;
and carrying out flow control on the dequeued data to be transmitted, and sending the data to be transmitted after the flow control to a target interface.
3. The method according to claim 2, wherein before storing the data to be transmitted into the corresponding scheduling queue according to the transmission priority of the data to be transmitted, the method further comprises:
and determining the transmission priority of the data to be transmitted according to the data type of the data to be transmitted and the corresponding relation between the preset data type and the transmission priority.
4. The method according to claim 2 or 3, wherein the controlling the flow of the dequeued data to be transmitted comprises:
calculating the flow rate corresponding to the data to be transmitted according to the flow of the data to be transmitted;
and if the flow rate corresponding to the data to be transmitted is greater than or equal to a preset flow rate threshold value, performing flow shaping on the data to be transmitted.
5. The method of claim 4, wherein the controlling the flow of the dequeued data to be transmitted further comprises:
and if the flow of the data to be transmitted is greater than or equal to a preset flow threshold value, scheduling available hardware resources in the electronic equipment according to a preset hardware scheduling rule so as to send the data to be transmitted after the flow is controlled to a target interface.
6. The method of claim 1, wherein the data to be transmitted comprises at least one of a data frame, a management frame, and a chip control command.
7. The method of claim 6, further comprising:
and carrying out format conversion on the data to be transmitted according to a preset data format.
8. The method of claim 1, further comprising:
after the electronic equipment is started, second configuration information is obtained; the second configuration information is used for representing a network protocol which needs to be adopted when the electronic equipment transmits data;
and analyzing the second configuration information, and determining a network protocol adopted by the electronic equipment for transmitting the data to be transmitted.
9. An electronic device, comprising: a processor, a memory, and an interface;
the processor, memory and interface cooperate to cause the electronic device to perform the method of any of claims 1-8.
10. A computer-readable storage medium, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the method of any one of claims 1 to 8.
CN202210258157.9A 2020-09-10 2020-12-02 Data transmission method and electronic equipment Active CN114828098B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210258157.9A CN114828098B (en) 2020-09-10 2020-12-02 Data transmission method and electronic equipment

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN2020109489860 2020-09-10
CN202010948986 2020-09-10
CN202011388769.7A CN114173381A (en) 2020-09-10 2020-12-02 Data transmission method and electronic equipment
CN202210258157.9A CN114828098B (en) 2020-09-10 2020-12-02 Data transmission method and electronic equipment

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202011388769.7A Division CN114173381A (en) 2020-09-10 2020-12-02 Data transmission method and electronic equipment

Publications (2)

Publication Number Publication Date
CN114828098A true CN114828098A (en) 2022-07-29
CN114828098B CN114828098B (en) 2023-06-06

Family

ID=80476160

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210258157.9A Active CN114828098B (en) 2020-09-10 2020-12-02 Data transmission method and electronic equipment
CN202011388769.7A Pending CN114173381A (en) 2020-09-10 2020-12-02 Data transmission method and electronic equipment

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202011388769.7A Pending CN114173381A (en) 2020-09-10 2020-12-02 Data transmission method and electronic equipment

Country Status (1)

Country Link
CN (2) CN114828098B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093515A (en) * 2023-10-09 2023-11-21 荣耀终端有限公司 Memory, terminal equipment and memory system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101548468A (en) * 2007-06-11 2009-09-30 美国博通公司 Method and system for a configurable communication integrated circuit and/or chipset
CN101771531A (en) * 2008-12-26 2010-07-07 北京中电华大电子设计有限责任公司 Dataflow control method of WLAN (wireless local area network) card chip
US20190378407A1 (en) * 2017-02-08 2019-12-12 Audi Ag Method for informing at least one receiver vehicle about a wrong-way vehicle, and server device and motor vehicles
CN110891029A (en) * 2019-11-28 2020-03-17 南京星邺汇捷网络科技有限公司 Flow control method and device for home network and flow controller
CN111315038A (en) * 2020-02-14 2020-06-19 腾讯科技(深圳)有限公司 Data transmission method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101548468A (en) * 2007-06-11 2009-09-30 美国博通公司 Method and system for a configurable communication integrated circuit and/or chipset
CN101771531A (en) * 2008-12-26 2010-07-07 北京中电华大电子设计有限责任公司 Dataflow control method of WLAN (wireless local area network) card chip
US20190378407A1 (en) * 2017-02-08 2019-12-12 Audi Ag Method for informing at least one receiver vehicle about a wrong-way vehicle, and server device and motor vehicles
CN110891029A (en) * 2019-11-28 2020-03-17 南京星邺汇捷网络科技有限公司 Flow control method and device for home network and flow controller
CN111315038A (en) * 2020-02-14 2020-06-19 腾讯科技(深圳)有限公司 Data transmission method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093515A (en) * 2023-10-09 2023-11-21 荣耀终端有限公司 Memory, terminal equipment and memory system

Also Published As

Publication number Publication date
CN114828098B (en) 2023-06-06
CN114173381A (en) 2022-03-11

Similar Documents

Publication Publication Date Title
CN113722058B (en) Resource calling method and electronic equipment
CN113747527B (en) Network link switching method based on electronic equipment state and electronic equipment
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN114449599A (en) Network link switching method based on electronic equipment position and electronic equipment
CN111602108B (en) Application icon display method and terminal
CN110636554B (en) Data transmission method and device
CN114650363A (en) Image display method and electronic equipment
CN113254409A (en) File sharing method, system and related equipment
CN114079893A (en) Bluetooth communication method, terminal device and computer readable storage medium
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
CN113448382A (en) Multi-screen display electronic device and multi-screen display method of electronic device
CN115314591A (en) Device interaction method, electronic device and computer-readable storage medium
CN111372329A (en) Connection establishing method and terminal equipment
CN114125793A (en) Bluetooth data transmission method and related device
CN113438366A (en) Information notification interaction method, electronic device and storage medium
CN114828098B (en) Data transmission method and electronic equipment
WO2022170856A1 (en) Method for establishing connection, and electronic device
CN113380240B (en) Voice interaction method and electronic equipment
CN113407300B (en) Application false killing evaluation method and related equipment
CN114691248B (en) Method, device, equipment and readable storage medium for displaying virtual reality interface
CN111982037B (en) Height measuring method and electronic equipment
CN114003241A (en) Interface adaptation display method and system of application program, electronic device and medium
CN114006976B (en) Interface display method and terminal equipment
CN115017227A (en) Data synchronization method and related equipment
CN114490006A (en) Task determination method, device, equipment and storage medium

Legal Events

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