CN112888049B - Data transmission control method, function machine and related product - Google Patents

Data transmission control method, function machine and related product Download PDF

Info

Publication number
CN112888049B
CN112888049B CN202110105745.4A CN202110105745A CN112888049B CN 112888049 B CN112888049 B CN 112888049B CN 202110105745 A CN202110105745 A CN 202110105745A CN 112888049 B CN112888049 B CN 112888049B
Authority
CN
China
Prior art keywords
data transmission
data
function machine
network
electronic equipment
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.)
Active
Application number
CN202110105745.4A
Other languages
Chinese (zh)
Other versions
CN112888049A (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.)
Spreadtrum Semiconductor Chengdu Co Ltd
Original Assignee
Spreadtrum Semiconductor Chengdu 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 Spreadtrum Semiconductor Chengdu Co Ltd filed Critical Spreadtrum Semiconductor Chengdu Co Ltd
Priority to CN202110105745.4A priority Critical patent/CN112888049B/en
Publication of CN112888049A publication Critical patent/CN112888049A/en
Application granted granted Critical
Publication of CN112888049B publication Critical patent/CN112888049B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application discloses a data transmission control method, a function machine and related products, which are applied to the function machine, wherein the method comprises the following steps: after the function machine is connected with the electronic equipment through the USB interface, uplink network data transmission is carried out on the function machine and the electronic equipment by adopting a mechanism of receiving P IP packets at a time, wherein P is an integer less than or equal to 3; and performing downlink network data transmission with the electronic equipment in a mode of chain transmission of IP packet data. By adopting the embodiment of the application, the network speed of the function machine can be improved.

Description

Data transmission control method, function machine and related product
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a data transmission control method, a function machine, and a related product.
Background
In the prior art, a mobile phone in the market can use a Remote Network Driver Interface Specification (RNDIS) function to perform Personal Computer (PC) shared internet access, most of which are intelligent machines, and for a functional machine, PC shared internet access for the functional machine is also internet access through Point-to-Point Protocol (PPP) dialing, and the speed also tightly supports CAT1 (uplink 5M, downlink 10M), so the problem of how to improve the shared internet access speed of the functional machine needs to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a data transmission control method, a function machine and a related product, and the internet access speed of the function machine can be improved.
In a first aspect, an embodiment of the present application provides a data transmission control method, which is applied to an electronic device, and the method includes:
after the function machine is connected with the electronic equipment through the USB interface, uplink network data transmission is carried out on the function machine and the electronic equipment by adopting a mechanism of receiving P IP packets at a time, wherein P is an integer less than or equal to 3;
and performing downlink network data transmission with the electronic equipment in a mode of chain transmission of IP packet data.
In a second aspect, an embodiment of the present application provides a data transmission control apparatus, which is applied to a function machine, where the apparatus includes: a first data communication unit and a second data communication unit, wherein,
the first data communication unit is used for performing uplink network data transmission with the electronic equipment by adopting a mechanism of receiving P IP packets once after the function machine is connected with the electronic equipment through the USB interface, wherein P is an integer less than or equal to 3;
and the second data communication unit is used for performing downlink network data transmission with the electronic equipment in a mode of chain transmission of IP packet data.
In a third aspect, embodiments of the present application provide a functional machine, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for performing the steps in the first aspect of the embodiments of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that the data transmission control method, the function machine and the related product described in the embodiments of the present application are applied to a function machine, after the function machine is connected to an electronic device through a USB interface, the function machine performs uplink network data transmission with the electronic device by using a mechanism for receiving P IP packets at a time, where P is an integer less than or equal to 3, and performs downlink network data transmission with the electronic device by using a manner of chain transmission of IP packet data.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a data transmission control method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another data transmission control method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a function machine according to an embodiment of the present disclosure;
fig. 4 is a block diagram of functional units of a data transmission control device according to an embodiment of the present application.
Detailed Description
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may include other steps or elements not listed or inherent to such process, method, article, or apparatus in one possible example.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the embodiment of the present application, the Feature phone can be understood as a Feature phone, and a Feature phone (Feature phone) is a main category of mobile phones. The functional mobile phone can meet the requirements of consumers of many groups, and the application of some functional mobile phones is also more than that of a common mobile phone which can only be used for making a call and receiving and sending short messages, such as the functions of taking pictures, playing music files, surfing the internet and using maps. Like smart phones, some applications can run on a feature phone, but most are JAVA language programs, which are mostly based on JAVA ME or BREW, which is related to JAVA cross-platform capability. The function machine may be a single core device.
The electronic device according to the embodiments of the present application may be a handheld device, a smart robot, a vehicle-mounted device, a wearable device, a desktop device, a Personal Computer (PC), a computing device or other processing device connected to a wireless modem, and various forms of User Equipment (UE), a Mobile Station (MS), a terminal device (terminal device), and the like, and the electronic device may also be a server or a smart home device.
In the embodiment of the application, the smart home device may be at least one of the following: refrigerator, washing machine, electricity rice cooker, intelligent (window) curtain, intelligent lamp, intelligent bed, intelligent garbage bin, microwave oven, steam ager, air conditioner, lampblack absorber, server, intelligent door, smart window, door wardrobe, intelligent audio amplifier, intelligent house, intelligent chair, intelligent clothes hanger, intelligent shower, water dispenser, water purifier, air purifier, doorbell, monitored control system, intelligent garage, TV set, projecting apparatus, intelligent dining table, intelligent sofa, massage armchair, treadmill etc. of course, can also include other equipment.
Referring to fig. 1, fig. 1 is a schematic flow chart of a data transmission control method according to an embodiment of the present application, and as shown in the drawing, the data transmission control method is applied to a function machine, and includes:
101. after the function machine is connected with the electronic equipment through the USB interface, uplink network data transmission is carried out on the function machine and the electronic equipment by adopting a mechanism of receiving P IP packets at a time, wherein P is an integer less than or equal to 3.
In the embodiment of the application, the function machine can establish connection with the electronic device through the USB interface, that is, the USB data line, and the connection can be used for realizing charging or data transmission. In specific implementation, after the functional machine is connected to the electronic device through the USB interface, the functional machine may perform uplink network data transmission with the electronic device through the USB interface or the USB data line by using a mechanism that receives P IP packets at a time, where P is an integer less than or equal to 3, and P may be, for example, 2 or 3. The electronic equipment can be used as a network card, and the network of the electronic equipment is utilized to make up for the network deficiency of the function machine, so that network sharing is realized, and the network rate of the function machine is improved.
Optionally, in step 101, performing uplink network data transmission with the electronic device by using a mechanism that receives P IP packets at a time may include the following steps:
performing uplink network data transmission with the electronic device by adopting a mechanism of receiving P IP packets at a time through a first data transmission path, where the first data transmission path is: the data passes through the USB driver, the RNDIS driver, the DAPS and the DSM in sequence.
In a specific implementation, the first data transmission path: USB- > RNDIS- > DAPS- > DSM, namely: the data passes through the USB driver, the RNDIS driver, the DAPS and the DSM in sequence. Through the first data transmission path, uplink network data transmission is performed between the electronic equipment and a mechanism for receiving P IP packets at a time, namely, the mechanism for receiving a plurality of IP packets at a time can be realized, so that the interruption frequency of the USB can be reduced, further, the consumption of the MIPS is reduced, the byte alignment problem is also considered, a 44-byte RNDIS header needs to be copied after a plurality of packets of data are received in uplink, and then, the data length and the address are given to the DAPS. MIPS is the average execution speed of single-length fixed-point Instructions (MIPS), which is the number of millions of machine language Instructions processed Per Second.
102. And performing downlink network data transmission with the electronic equipment in a mode of chain transmission of IP packet data.
In specific implementation, the function machine may adopt a USB interface, and adopt a mode of chain transmission of IP packet data to perform downlink network data transmission with the electronic device.
Optionally, in the step 102, downlink network data transmission is performed with the electronic device by using a manner of chain transmission of IP packet data, which may be implemented as follows:
through a second data transmission path, performing downlink network data transmission with the electronic device in a manner of chain-type transmission of IP packet data, where the second data transmission path is: data sequentially passes through DSM, DAPS, RNDIS drive and USB drive.
In a specific implementation, the second data transmission path: DSM- > DAPS- > RNDIS- > USB, i.e.: data sequentially passes through a Data Service Manager (DSM) DSM, a Data Application Protocol Stack (DAPS), an RNDIS driver, and a USB driver. The chain transmission is adopted, the RNDIS uses the ring buffer for cyclic reception, although the transmission of the background USB is transmitted based on the protocol 2.0, and the DMA channel is designed in the hardware to achieve rapid carrying, the speed of 150Mbps is a certain distance away from the downlink, so the chain transmission is the best solution. In addition, due to the limitation of the ARM architecture, when data transmitted by the DAPS is 2-byte aligned, if the RNDIS is directly receiving the data and performing an operation of adding an RNDIS header, the problem of byte misalignment occurs, so to solve the problem and measure the transmission efficiency, the content of the RNDIS header is copied first and then padded, and the purpose of padding is to enable the PC to recognize the RNDIS protocol, because only 44-byte copies are made for the RNDIS header, the influence on the rate can be almost ignored. And DMA transmission in the bottom USB drive is also chain transmission, so that the hardware speed is also improved.
Optionally, in the step 102, performing downlink network data transmission with the electronic device in a manner of chain transmission of the IP packet data may include the following steps:
21. storing cache data issued by a cache network through a preset cache pool;
22. and generating chain type IP packet data from the cache data and transmitting the chain type IP packet data to the electronic equipment.
The preset cache pool can be preset or default to the system. In specific implementation, the function machine can store the cache data issued by the cache network through the preset cache pool, generate the chain type IP packet data from the cache data and transmit the chain type IP packet data so as to relieve the condition that the USB bottom layer hardware does not send the data out in time, and the data transmission efficiency is favorably improved.
For example, taking the case that the function machine is connected to the PC through the USB interface as an example, the mobile phone in the market can use the RNDIS function to perform PC shared internet access, most of the mobile phones are smart phones, the PC shared internet access for the function machine is also internet access through PPP dialing, and the speed also supports CAT1 (uplink 5M, downlink 10M), whereas the speed supports the PC shared internet access for the RNDIS protocol at T117, and the speed can support CAT4 (uplink 50M, downlink 150M). In the concrete implementation: t117, because both AP and CP run on a CPU, MIPS is relatively expensive, and needs to balance the operation relationship between DSM/DAPS/RNDIS, the consumption of USB uplink and downlink interrupts and RNDIS task execution is about 50%, the task on modem side is about 50%, in order to optimize network rate:
1. descending: DSM- > DAPS- > RNDIS- > USB, the chain transmission that adopts, RNDIS uses ring buffer to carry on the cycle reception on this side, because the data that DAPS passed over are 2 byte alignment, and RNDIS needs 4 byte alignment after finishing adding RNDIS head on this side, so, copy once in this middle, but only make 44 byte copies to RNDIS head, the influence on the speed can be ignored almost. And DMA transmission in the bottom USB drive is also chain transmission, so that the hardware speed is also improved.
2. Ascending: USB- > RNDIS- > DAPS- > DSM adopts a mechanism that a line receives a plurality of packets once, so that the interruption frequency of USB can be reduced, further, the consumption of MIPS is reduced, the byte alignment problem is considered, an uplink also needs to copy 44 bytes of RNDIS heads after receiving a plurality of packets of data, and then the data length and the address are given to DAPS;
3. the problem of rate drop may often be encountered in optimizing network rate, which involves the USB driver receiving the EP0 endpoint, and in order to be compatible with the behavior of the PC, the USB driver receives control information sent by the PC in a chained manner, and then parses the control information back to the PC one by one, so as to reduce the risk of rate drop.
Optionally, after the function machine establishes a connection with the electronic device through the USB interface, the method may further include the following steps:
a1, acquiring the current network rate;
a2, acquiring the required network rate of foreground application;
a3, when the current network rate is less than the required network rate, executing the step of performing uplink network data transmission with the electronic device by adopting a mechanism of receiving P IP packets at one time;
a4, when the current network rate is larger than or equal to the required network rate, adopting a preset data transmission channel of the function machine to carry out communication.
In the embodiment of the present application, for different applications, network rates required by foreground applications are different, and a mapping relationship between the application and a required network rate may be stored in the function machine in advance, so that the required network rate of the foreground application may be determined according to the mapping relationship. The preset data transmission channel can be a data transmission channel of the function machine for surfing the internet, the function machine can obtain the current network rate, then obtain the required network rate of the foreground application according to the mapping relation, when the current network rate is less than the required network rate, the step of performing uplink network data transmission with the electronic equipment by adopting the mechanism for receiving P IP packets at one time is executed, otherwise, when the current network rate is greater than or equal to the required network rate, the preset data transmission channel of the function machine can be adopted for communication, and therefore, the corresponding network channel or the network processing strategy can be reasonably selected according to the network requirement of the foreground application.
In one possible example, before the step 101 performs uplink network data transmission with the electronic device by using a mechanism that receives P IP packets at a time, the method may further include the following steps:
b1, acquiring a target face image sent by the electronic equipment;
b2, carrying out image quality evaluation on the target face image to obtain a face image quality evaluation value;
b3, matching the target face image with a preset face image when the face image quality evaluation value is larger than a preset image quality evaluation value;
and B4, when the target face image is successfully matched with the preset face image, executing the step of performing uplink network data transmission with the electronic equipment by adopting a mechanism for receiving P IP packets once.
In the embodiment of the application, the preset image quality evaluation value and the preset face image may be pre-stored in the function machine, and may be set by a user or default by a system.
In specific implementation, the function machine may perform image quality evaluation on the target face image by using at least one image quality evaluation index to obtain a face image quality evaluation value, where the image quality evaluation index may be at least one of the following: face deviation degree, face integrity degree, definition degree, feature point distribution density, average gradient, information entropy, signal-to-noise ratio and the like, which are not limited herein. The human face deviation degree is the deviation degree between the human face angle in the image and the human face angle of the front face, and the human face integrity degree is the ratio of the area of the human face in the image to the area of the complete human face. And then, matching the target face image with the preset face image, and executing subsequent uplink data transmission operation when the target face image is successfully matched with the preset face image, otherwise, not executing the subsequent operation, and improving the data transmission safety.
In one possible example, the step B2, performing image quality evaluation on the target face image to obtain a face image quality evaluation value, may include the following steps:
b21, acquiring a target face deviation degree of a target face image, a target face integrity degree of the target face image, a target feature point distribution density of the target face image and a target information entropy;
b22, when the target face deviation degree is greater than a preset deviation degree and the target face integrity degree is greater than a preset integrity degree, determining a target first reference evaluation value corresponding to the target face deviation degree according to a mapping relation between the preset face deviation degree and the first reference evaluation value;
b23, determining a target second reference evaluation value corresponding to the target face integrity according to a preset mapping relation between the face integrity and the second reference evaluation value;
b24, determining a target weight pair corresponding to the target feature point distribution density according to a preset mapping relation between the feature point distribution density and the weight pair, wherein the target weight pair comprises a target first weight and a target second weight, the target first weight is a weight corresponding to the first reference evaluation value, and the target second weight is a weight corresponding to the second reference evaluation value;
b25, performing weighted operation according to the target first weight, the target second weight, the target first reference evaluation value and the target second reference evaluation value to obtain a first reference evaluation value;
b26, determining a first image quality evaluation value corresponding to the target feature point distribution density according to a preset mapping relation between the feature point distribution density and the image quality evaluation value;
b27, determining a target image quality deviation value corresponding to the target information entropy according to a mapping relation between a preset information entropy and an image quality deviation value;
b28, acquiring a first shooting parameter of the target face image;
b29, determining a target optimization coefficient corresponding to the first shooting parameter according to a preset mapping relation between the shooting parameter and the optimization coefficient;
b30, adjusting the first image quality evaluation value according to the target optimization coefficient and the target image quality deviation value to obtain a second reference evaluation value;
b31, acquiring target environment parameters corresponding to the target face image;
b32, determining a target weight coefficient pair corresponding to the target environment parameter according to a mapping relation between preset environment parameters and the weight coefficient pair, wherein the target weight coefficient pair comprises a target first weight coefficient and a target second weight coefficient, the target first weight coefficient is a weight coefficient corresponding to the first reference evaluation value, and the target second weight coefficient is a weight coefficient corresponding to the second reference evaluation value;
b33, performing weighting operation according to the target first weight coefficient, the target second weight coefficient, the first reference evaluation value and the second reference evaluation value, and obtaining a face image quality evaluation value of the target face image.
In the embodiment of the application, the preset deviation degree and the preset integrity degree can be set by a user or defaulted by a system, and the preset deviation degree and the preset integrity degree can be successfully recognized by the human face only if the preset deviation degree and the preset integrity degree are within a certain range. The function machine may pre-store a mapping relationship between a preset face deviation degree and a first reference evaluation value, a mapping relationship between a preset face integrity degree and a second reference evaluation value, and a mapping relationship between a preset feature point distribution density and a weight pair, where the weight pair may include a first weight and a second weight, a sum of the first weight and the second weight is 1, the first weight is a weight corresponding to the first reference evaluation value, and the second weight is a weight corresponding to the second reference evaluation value. The function machine may further store a mapping relationship between a preset feature point distribution density and an image quality evaluation value, a mapping relationship between a preset information entropy and an image quality deviation value, a mapping relationship between a preset shooting parameter and an optimization coefficient, and a mapping relationship between a preset environment parameter and a weight coefficient pair in advance. The weight coefficient pair may include a first weight coefficient and a second weight coefficient, the first weight coefficient is a weight coefficient corresponding to the first reference evaluation value, the second weight coefficient is a weight coefficient corresponding to the second reference evaluation value, and a sum of the first weight coefficient and the second weight coefficient is 1.
The value range of the image quality evaluation value can be 0-1, or 0-100. The image quality deviation value may be a positive real number, for example, 0 to 1, or may be greater than 1. The value range of the optimization coefficient can be-1 to 1, for example, the optimization coefficient can be-0.1 to 0.1. In the embodiment of the present application, the shooting parameter may be at least one of the following: exposure time, shooting mode, sensitivity ISO, white balance parameters, focal length, focus, region of interest, etc., without limitation. The environmental parameter may be at least one of: ambient brightness, ambient temperature, ambient humidity, weather, atmospheric pressure, magnetic field interference strength, etc., and are not limited thereto.
In specific implementation, the function machine may obtain a target face deviation degree of a target face image, a target face integrity degree of the target face image, a target feature point distribution density of the target face image, and a target information entropy, where the target feature point distribution density may be a ratio between a total number of feature points of the target face image and an area of the target face image.
Furthermore, when the target face deviation degree is greater than the preset deviation degree and the target face integrity degree is greater than the preset integrity degree, the functional machine may determine a target first reference evaluation value corresponding to the target face deviation degree according to a mapping relationship between the preset face deviation degree and the first reference evaluation value, may also determine a target second reference evaluation value corresponding to the target face integrity degree according to a mapping relationship between the preset face integrity degree and the second reference evaluation value, and determine a target weight pair corresponding to the target feature point distribution density according to a mapping relationship between the preset feature point distribution density and the weight pair, where the target weight pair includes a target first weight and a target second weight, the target first weight is a weight corresponding to the first reference evaluation value, the target second weight is a weight corresponding to the second reference evaluation value, and then, the functional machine may perform the following steps according to the target first weight, the target first reference evaluation value, the target second weight, and the target integrity degree, And performing weighted operation on the target second weight, the target first reference evaluation value and the target second reference evaluation value to obtain a first reference evaluation value, wherein a specific calculation formula is as follows:
the first reference evaluation value is a target first reference evaluation value and a target first weight and the target second reference evaluation value is a target second weight
Furthermore, the quality of the image can be evaluated in terms of the human face angle and the human face integrity.
Further, the function machine may determine a first image quality evaluation value corresponding to the target feature point distribution density according to a mapping relationship between a preset feature point distribution density and an image quality evaluation value, and determine a target image quality deviation value corresponding to the target information entropy according to a mapping relationship between a preset information entropy and an image quality deviation value. The functional machine can determine a target image quality deviation value corresponding to the target information entropy according to a mapping relation between a preset information entropy and the image quality deviation value, and because some noises are generated due to external (weather, light, angle, jitter and the like) or internal (system, GPU) reasons when an image is generated, the noises can bring some influences on the image quality, therefore, the image quality can be regulated to a certain degree to ensure that the image quality is objectively evaluated.
Further, the function machine may further obtain a first shooting parameter of the target face image, determine a target optimization coefficient corresponding to the first shooting parameter according to a mapping relationship between preset shooting parameters and optimization coefficients, where the shooting parameter setting may also bring a certain influence on image quality evaluation, and therefore, it is necessary to determine an influence component of the shooting parameter on the image quality, and finally, adjust the first image quality evaluation value according to the target optimization coefficient and the target image quality deviation value to obtain a second reference evaluation value, where the second reference evaluation value may be obtained according to the following formula:
when the image quality evaluation value is a percentile system, the specific calculation formula is as follows:
second reference evaluation value ═ (first image quality evaluation value + target image quality deviation value) (1+ target optimization coefficient)
In the case where the image quality evaluation value is a percentage, the specific calculation formula is as follows:
the second reference evaluation value (first image quality evaluation value (1+ target image quality deviation value) (1+ target optimization coefficient))
Further, the function machine may obtain a target environment parameter corresponding to the target face image, and determine a target weight coefficient pair corresponding to the target environment parameter according to a mapping relationship between a preset environment parameter and the weight coefficient pair, where the target weight coefficient pair includes a target first weight coefficient and a target second weight coefficient, the target first weight coefficient is a weight coefficient corresponding to the first reference evaluation value, and the target second weight coefficient is a weight coefficient corresponding to the second reference evaluation value, and further, may perform a weighting operation according to the target first weight coefficient, the target second weight coefficient, the first reference evaluation value, and the second reference evaluation value to obtain a face image quality evaluation value of the target face image, and the specific calculation formula is as follows:
the face image quality evaluation value of the target face image is first reference evaluation value, target first weight coefficient + second reference evaluation value, target second weight coefficient
Therefore, the image quality can be objectively evaluated by combining the influences of internal and external environment factors, shooting setting factors, human face angles, integrity and the like, and the evaluation accuracy of the human face image quality is improved.
It can be seen that the data transmission control method described in the embodiment of the present application is applied to a function machine, after the function machine is connected to an electronic device through a USB interface, the function machine performs uplink network data transmission with the electronic device by using a mechanism for receiving P IP packets at a time, where P is an integer less than or equal to 3, and performs downlink network data transmission with the electronic device by using a manner of chain transmission of IP packet data.
In accordance with the embodiment shown in fig. 1, please refer to fig. 2, fig. 2 is a schematic flowchart of a data transmission control method provided in the embodiment of the present application, and the method is applied to the functional machine shown in fig. 1, and the data transmission control method includes:
201. and after the function machine is connected with the electronic equipment through the USB interface, acquiring the current network rate.
202. And acquiring the required network rate of the foreground application.
203. And when the current network rate is less than the required network rate, performing uplink network data transmission with the electronic equipment by adopting a mechanism of receiving P IP packets at one time, wherein P is an integer less than or equal to 3.
204. And performing downlink network data transmission with the electronic equipment in a mode of chain transmission of IP packet data.
The detailed description of the steps 201 to 204 may refer to the corresponding steps of the data transmission control method described in fig. 1, and will not be repeated herein.
It can be seen that the data transmission control method, the function machine and the related product described in the embodiments of the present application are applied to a function machine, after the function machine is connected to an electronic device through a USB interface, the function machine performs uplink network data transmission with the electronic device by using a mechanism for receiving P IP packets at a time, where P is an integer less than or equal to 3, and performs downlink network data transmission with the electronic device by using a manner of chain transmission of IP packet data.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and in an embodiment of the present application, the programs include instructions for performing the following steps:
after the function machine is connected with the electronic equipment through the USB interface, uplink network data transmission is carried out on the function machine and the electronic equipment by adopting a mechanism of receiving P IP packets at a time, wherein P is an integer less than or equal to 3;
and performing downlink network data transmission with the electronic equipment in a mode of chain transmission of IP packet data.
It can be seen that, the functional machine described in the embodiment of the present application acquires the current network rate and the required network rate of the foreground application after the functional machine establishes a connection with the electronic device through the USB interface, when the current network rate is less than the required network rate, the uplink network data transmission is carried out with the electronic equipment by adopting a mechanism of receiving P IP packets at one time, wherein P is an integer less than or equal to 3, the downlink network data transmission is carried out with the electronic equipment by adopting a mode of chain transmission of IP packet data, because the uplink data transmission of the USB sharing internet function adopts a mechanism of receiving a plurality of IP packets at one time, the interruption number of the USB is reduced, the consumption of MIPS is saved, in addition, for downlink data transmission, the IP packet data is transmitted in a chain manner, so that the condition that the data is not sent out in time by the bottom hardware of the USB can be relieved, and further, the improvement of the internet speed of the function machine is facilitated.
Optionally, in terms of performing uplink network data transmission with the electronic device by using the mechanism for receiving P IP packets at a time, the program includes instructions for executing the following steps:
performing uplink network data transmission with the electronic device by adopting a mechanism of receiving P IP packets at a time through a first data transmission path, where the first data transmission path is: the data passes through the USB driver, the RNDIS driver, the DAPS and the DSM in sequence.
Optionally, in the aspect of performing downlink network data transmission with the electronic device by using the IP packet data chain transmission manner, the program includes instructions for executing the following steps:
through a second data transmission path, performing downlink network data transmission with the electronic device in a manner of chain-type transmission of IP packet data, where the second data transmission path is: data sequentially passes through DSM, DAPS, RNDIS drive and USB drive.
Optionally, in the aspect of performing downlink network data transmission with the electronic device by using the IP packet data chain transmission manner, the program includes instructions for executing the following steps:
storing cache data issued by a cache network through a preset cache pool;
and generating chain type IP packet data from the cache data and transmitting the chain type IP packet data to the electronic equipment.
Optionally, the program further comprises instructions for performing the steps of:
acquiring the current network rate;
acquiring a required network rate of foreground application;
when the current network rate is less than the required network rate, executing the step of performing uplink network data transmission with the electronic equipment by adopting a mechanism for receiving P IP packets at one time;
and when the current network rate is greater than or equal to the required network rate, communicating with the electronic equipment by adopting a preset data transmission channel of the function machine.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that in order to implement the above functions, it includes corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. 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, 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 functional machine may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing 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. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 4 is a block diagram of functional units of a data transmission control apparatus 400 according to an embodiment of the present application, where the apparatus 400 is applied to a function machine, and the apparatus 400 includes: a first data communication unit 401 and a second data communication unit 402, wherein,
the first data communication unit 401 is configured to perform uplink network data transmission with the electronic device by using a mechanism of receiving P IP packets at a time after the function machine establishes a connection with the electronic device through the USB interface, where P is an integer less than or equal to 3;
the second data communication unit 402 is configured to perform downlink network data transmission with the electronic device in a manner of chain transmission of IP packet data.
It can be seen that the data transmission control device described in the embodiment of the present application is applied to a function machine, after the function machine is connected to an electronic device through a USB interface, the function machine performs uplink network data transmission with the electronic device by using a mechanism for receiving P IP packets at a time, where P is an integer less than or equal to 3, and performs downlink network data transmission with the electronic device by using a manner of chain transmission of IP packet data.
Optionally, in the aspect of performing uplink network data transmission with the electronic device by using the mechanism that receives P IP packets at a time, the first data communication unit 401 is specifically configured to:
through a first data transmission path, performing uplink network data transmission with the electronic device by adopting a mechanism of receiving P IP packets at a time, where the first data transmission path is: the data sequentially passes through a USB driver, an RNDIS driver, a DAPS and a DSM.
Optionally, in the aspect of performing downlink network data transmission with the electronic device by using the IP packet data in a chain transmission manner, the second data communication unit 402 is specifically configured to:
through a second data transmission path, performing downlink network data transmission with the electronic device in a manner of chain-type transmission of IP packet data, where the second data transmission path is: data sequentially passes through DSM, DAPS, RNDIS drive and USB drive.
Optionally, in the aspect of performing downlink network data transmission with the electronic device by using the IP packet data in a chain transmission manner, the second data communication unit 402 is specifically configured to:
storing cache data issued by a cache network through a preset cache pool;
and generating chain type IP packet data from the cache data and transmitting the chain type IP packet data to the electronic equipment.
Optionally, the apparatus 400 is further specifically configured to:
acquiring the current network rate;
acquiring a required network rate of foreground application;
when the current network rate is less than the required network rate, executing the step of performing uplink network data transmission with the electronic equipment by adopting a mechanism for receiving P IP packets at one time;
and when the current network rate is greater than or equal to the required network rate, communicating with the electronic equipment by adopting a preset data transmission channel of the function machine.
It can be understood that the functions of each program module of the data transmission control device in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program enables a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes a functional computer.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising a feature machine.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will recognize that the embodiments described in this specification are preferred embodiments and that acts or modules referred to are not necessarily required for this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the above-described units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, 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 of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. 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 may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps of the methods of the above embodiments may be implemented by a program, which is stored in a computer-readable memory, the memory including: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (7)

1. A data transmission control method, applied to a function machine, the method comprising:
after the function machine is connected with the electronic equipment through the USB interface, uplink network data transmission is carried out on the function machine and the electronic equipment by adopting a mechanism of receiving P IP packets at a time, wherein P is 2 or 3;
performing downlink network data transmission with the electronic equipment in a mode of chain transmission of IP packet data;
the uplink network data transmission with the electronic device by using the mechanism for receiving P IP packets at a time includes:
performing uplink network data transmission with the electronic device by adopting a mechanism of receiving P IP packets at a time through a first data transmission path, where the first data transmission path is: the data sequentially passes through a USB driver, an RNDIS driver, a DAPS and a DSM;
wherein the method further comprises:
acquiring the current network rate;
acquiring a required network rate of foreground application;
when the current network rate is less than the required network rate, executing the step of performing uplink network data transmission with the electronic equipment by adopting a mechanism for receiving P IP packets at one time;
and when the current network rate is greater than or equal to the required network rate, communicating with the electronic equipment by adopting a preset data transmission channel of the function machine.
2. The method of claim 1, wherein the performing downlink network data transmission with the electronic device by using the IP packet data chain transmission method includes:
through a second data transmission path, performing downlink network data transmission with the electronic device in a manner of chain-type transmission of IP packet data, where the second data transmission path is: data sequentially passes through DSM, DAPS, RNDIS drive and USB drive.
3. The method according to claim 1 or 2, wherein the performing downlink network data transmission with the electronic device by using the chain transmission IP packet data comprises:
storing cache data issued by a cache network through a preset cache pool;
and generating chain type IP packet data from the cache data and transmitting the chain type IP packet data to the electronic equipment.
4. A data transmission control apparatus, applied to a function machine, the apparatus comprising: a first data communication unit and a second data communication unit, wherein,
the first data communication unit is used for performing uplink network data transmission with the electronic equipment by adopting a mechanism of receiving P IP packets once after the function machine is connected with the electronic equipment through the USB interface, wherein P is 2 or 3;
the second data communication unit is used for performing downlink network data transmission with the electronic equipment in a mode of chain transmission of IP packet data;
in the aspect of performing uplink network data transmission with the electronic device by using the mechanism for receiving P IP packets at a time, the first data communication unit is specifically configured to:
through a first data transmission path, performing uplink network data transmission with the electronic device by adopting a mechanism of receiving P IP packets at a time, where the first data transmission path is: the data sequentially passes through a USB driver, an RNDIS driver, a DAPS and a DSM;
wherein the apparatus is further specifically configured to:
acquiring the current network rate;
acquiring a required network rate of foreground application;
when the current network rate is less than the required network rate, executing the step of performing uplink network data transmission with the electronic equipment by adopting a mechanism for receiving P IP packets at a time;
and when the current network rate is greater than or equal to the required network rate, communicating with the electronic equipment by adopting a preset data transmission channel of the functional machine.
5. The apparatus according to claim 4, wherein in the downlink network data transmission with the electronic device by using the IP packet data link transmission manner, the second data communication unit is specifically configured to:
through a second data transmission path, performing downlink network data transmission with the electronic device in a manner of chain-type transmission of IP packet data, where the second data transmission path is: data sequentially passes through DSM, DAPS, RNDIS drive and USB drive.
6. A function machine comprising a processor, a memory for storing one or more programs and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-3.
7. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-3.
CN202110105745.4A 2021-01-26 2021-01-26 Data transmission control method, function machine and related product Active CN112888049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110105745.4A CN112888049B (en) 2021-01-26 2021-01-26 Data transmission control method, function machine and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110105745.4A CN112888049B (en) 2021-01-26 2021-01-26 Data transmission control method, function machine and related product

Publications (2)

Publication Number Publication Date
CN112888049A CN112888049A (en) 2021-06-01
CN112888049B true CN112888049B (en) 2022-08-26

Family

ID=76052306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110105745.4A Active CN112888049B (en) 2021-01-26 2021-01-26 Data transmission control method, function machine and related product

Country Status (1)

Country Link
CN (1) CN112888049B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101360264A (en) * 2007-07-31 2009-02-04 中兴通讯股份有限公司 Data transmission method and apparatus based on IP Abis interface
CN105389180A (en) * 2015-10-29 2016-03-09 诚迈科技(南京)股份有限公司 Android platform-based USB (Universal Serial Bus) port configurable method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7707321B2 (en) * 1999-08-04 2010-04-27 Super Talent Electronics, Inc. Chained DMA for low-power extended USB flash device without polling
US8352644B2 (en) * 2009-11-23 2013-01-08 Qualcomm Incorporated Apparatus and methods for USB connection in a multi-processor device
US9246846B2 (en) * 2011-09-02 2016-01-26 Mediatek Co. Network processor
US9325519B2 (en) * 2011-10-04 2016-04-26 Microsoft Technology Licensing, Llc Distributed proxy for bi-directional network connectivity over point-to-point connection
CN103092701B (en) * 2011-10-31 2017-02-08 联想(北京)有限公司 Communication method, communication device and electronic device
CA2773484C (en) * 2012-04-05 2017-11-07 Research In Motion Limited Method for sharing an internal storage of a portable electronic device on a host electronic device and an electronic device configured for same
CN108494639A (en) * 2018-02-09 2018-09-04 维沃移动通信有限公司 Network access method and mobile terminal
CN111328091A (en) * 2020-02-25 2020-06-23 深圳市中科联合通信技术有限公司 Wireless communication device configuration method based on RNDIS protocol
CN210986103U (en) * 2020-03-09 2020-07-10 济南慧天云海信息技术有限公司 RNDIS-based high-speed data one-way transmission device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101360264A (en) * 2007-07-31 2009-02-04 中兴通讯股份有限公司 Data transmission method and apparatus based on IP Abis interface
CN105389180A (en) * 2015-10-29 2016-03-09 诚迈科技(南京)股份有限公司 Android platform-based USB (Universal Serial Bus) port configurable method

Also Published As

Publication number Publication date
CN112888049A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
WO2020164475A1 (en) Data distribution method and apparatus, mobile terminal, and storage medium
CA2651781C (en) Systems and methods for digital data transmission rate control
US20120008642A1 (en) Systems and methods for digital data transmission rate control
CN112799981B (en) Data transmission control method, function machine and related product
CN102891890A (en) Interaction method and related equipment and system among terminals
CN105516018B (en) network data transmission method and device
KR102221021B1 (en) Electronic device and method for processing packet in internet protocol based network
CN108901077A (en) Antenna accounting setting method, device, user equipment and storage medium
Hosseini et al. Energy-budget-compliant adaptive 3D texture streaming in mobile games
CN101699839A (en) Mobile terminal figure adaptive system and method thereof
WO2020164521A1 (en) Data packet distribution method and apparatus, and mobile terminal and storage medium
CN112888049B (en) Data transmission control method, function machine and related product
WO2022134716A1 (en) Bluetooth data packet broadcasting method and apparatus, terminal, and storage medium
CN109495931B (en) Data transmission method for link aggregation and related device
CN115218270B (en) Distributed electric heating intelligent group control method and system for terminal substation level
CN110572851A (en) data uploading method, system, device and computer readable storage medium
CN114466441B (en) Method and device for adjusting transmitting power, storage medium and WiFi equipment
CN115933818A (en) Docking station integrated system and external communication method
CN103118441B (en) Termination extension device, system and method
CN110856162B (en) Network configuration method and related device
CN108112052A (en) Network share method, apparatus, air regulator and the storage medium of terminal
CN115225207B (en) Data transmission method and related device
CN112888012B (en) Method, apparatus, device and medium for determining measurement purpose
WO2022193182A1 (en) Transmission parameter adjusting method and communication device
CN111130949B (en) Testing device, and WIFI wireless router testing method and system

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