WO2023273464A1 - 一种数据传输方法和电子设备 - Google Patents
一种数据传输方法和电子设备 Download PDFInfo
- Publication number
- WO2023273464A1 WO2023273464A1 PCT/CN2022/084318 CN2022084318W WO2023273464A1 WO 2023273464 A1 WO2023273464 A1 WO 2023273464A1 CN 2022084318 W CN2022084318 W CN 2022084318W WO 2023273464 A1 WO2023273464 A1 WO 2023273464A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- electronic device
- mobile phone
- data
- identification information
- Prior art date
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 132
- 238000000034 method Methods 0.000 title claims abstract description 99
- 238000012545 processing Methods 0.000 claims description 41
- 230000015654 memory Effects 0.000 claims description 33
- 230000008569 process Effects 0.000 claims description 29
- 238000004590 computer program Methods 0.000 claims description 15
- 238000012546 transfer Methods 0.000 claims description 10
- 238000004891 communication Methods 0.000 description 28
- 230000006870 function Effects 0.000 description 24
- 230000004044 response Effects 0.000 description 22
- 238000010586 diagram Methods 0.000 description 17
- 238000013461 design Methods 0.000 description 14
- 238000005516 engineering process Methods 0.000 description 12
- 229920001621 AMOLED Polymers 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000005266 casting Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010295 mobile communication Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 239000003999 initiator Substances 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 101150053844 APP1 gene Proteins 0.000 description 1
- 101100055496 Arabidopsis thaliana APP2 gene Proteins 0.000 description 1
- 101100189105 Homo sapiens PABPC4 gene Proteins 0.000 description 1
- 101001094649 Homo sapiens Popeye domain-containing protein 3 Proteins 0.000 description 1
- 101000608234 Homo sapiens Pyrin domain-containing protein 5 Proteins 0.000 description 1
- 101000578693 Homo sapiens Target of rapamycin complex subunit LST8 Proteins 0.000 description 1
- 102100039424 Polyadenylate-binding protein 4 Human genes 0.000 description 1
- 101100016250 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) GYL1 gene Proteins 0.000 description 1
- 102100027802 Target of rapamycin complex subunit LST8 Human genes 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000010348 incorporation Methods 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4812—Task transfer initiation or dispatching by interrupt, e.g. masked
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0807—Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Definitions
- the embodiments of the present application relate to the field of electronic technologies, and in particular, to a data transmission method and electronic equipment.
- the electronic device at the receiving end receives the file data in the kernel, and needs to copy the file data multiple times when passing it to the application, which has performance problems.
- Embodiments of the present application provide a data transmission method and an electronic device.
- the electronic device at the receiving end can transparently transmit data from a driver program to a corresponding application for processing, thereby reducing the number of data copies and increasing the rate of data transmission.
- the embodiment of the present application provides a data transmission method applied to a first electronic device, the first electronic device includes a driver program and an application, and the method includes: receiving a request message from the second electronic device, the request message It is used to request to establish a data transmission connection, the request message includes the connection information of the second electronic device, and the data transmission connection is used to transmit the business data of the application; according to the connection information of the second electronic device, the connection information of the first electronic device and the application information to generate a table item; wherein, the table item includes connection identification information and application identification information, the connection identification information indicates the data transmission connection, and the application identification information indicates the application; receiving service data from the second electronic device, the service data carries the data transmission connection Identification information; if the connection identification information for data transmission is consistent with the connection identification information in the entry, copy the service data from the driver program to the application indicated by the application identification information.
- an entry can be generated, and the first electronic device can connect the connection identification information of the data transmission corresponding to the business data from the second electronic device to the entry.
- the identification information is consistent, the business data is copied from the driver to the corresponding application for processing, thereby reducing the number of times the business data is copied when the kernel receives the business data and transmits it to the application, and improves the efficiency of data transmission.
- first electronic device here may be the second mobile phone in the following embodiments
- second electronic device may be the first mobile phone in the following embodiments.
- the method further includes: copying service data from the driver program to the application indication indicated by the application identification information, and transparently transmitting the service data from the driver program to the application indicated by the application identification information.
- the service data does not need to be processed through the kernel protocol stack when copying the service data from the driver program to the application indicated by the application identification information, it can also be considered that the first electronic device transparently transmits the service data from the driver program to the application indicated by the application identification information. in application.
- connection information of the second electronic device includes one or more of the address, port number, protocol number or interface identifier of the second electronic device;
- the connection information includes one or more items of address, port number or interface identifier of the first electronic device.
- connection identification information in the entry includes any one of five-tuple information, three-tuple information, seven-tuple information, or interface identification.
- the first electronic device may generate an entry according to the connection information of the second electronic device, the connection information of the first electronic device, and the application information.
- the connection identification information in the entry generated by the first electronic device may be five-tuple information, three-tuple information, seven-tuple information, or seven-tuple information. Any one of group information or interface identification information, and the connection identification information may indicate a data transmission connection.
- the entry further includes a TTL minimum value and a TTL maximum value of the lifetime.
- the path of data transmission can be traced through the TTL minimum value and TTL maximum value, so as to ensure the security of data transmission.
- the method further includes: processing the service data by the application indicated by the application identification information, and the processing includes Decapsulates standard transport layer and IP layer headers.
- the application decapsulates the standard transport layer and IP layer headers and other processing on the service data.
- the method further includes: deleting the entry.
- the first electronic device deletes the entry after data transmission to save storage space.
- deleting the entry includes: deleting the entry after the data transmission connection is disconnected.
- the first electronic device After the data transmission connection is disconnected, the first electronic device deletes the entry to avoid repeatedly establishing a connection during subsequent data transmission.
- the method further includes: periodically deleting expired entries.
- expired entries can be regarded as useless entries, such as entries not deleted in time when the application exits abnormally, which can save storage space and save query time.
- the application is an application with a large data throughput, or an application with a high usage frequency, or a real-time application.
- the embodiment of the present application regards applications with high data throughput, high frequency of use, or real-time applications as applications with higher priority, and transparently transmits the business data corresponding to these applications from the driver program to the corresponding application for processing , so that the processing speed of the service data corresponding to the higher priority application can be improved.
- the application includes a first module, and the driver includes a second module; copying business data from the driver to the application indicated by the application identification information includes: copying the business data from the driver The second module of is copied to the first module in the application indicated by the application identification information.
- the first module is set in the application
- the second module is set in the driver program
- the second module in the driver program sends service data to the first module in the corresponding application.
- an embodiment of the present application provides an electronic device, including: one or more processors and one or more memories; one or more memories are coupled to the one or more processors, and one or more
- the memory is used to store computer program codes, and the computer program codes include computer instructions.
- the electronic device executes the method described in the first aspect and any possible design manner thereof.
- the embodiment of the present application provides a computer storage medium, including computer instructions, and when the computer instructions are run on the electronic device, the electronic device executes the method described in the first aspect and any possible design mode thereof .
- an embodiment of the present application provides a computer program product, which, when running on a computer, causes the computer to execute the method described in the first aspect and any possible design manner thereof.
- any device or computer storage medium or computer program product or chip or communication system provided above is used to execute the corresponding method provided above. Therefore, the beneficial effects that it can achieve can refer to the corresponding method provided above. The beneficial effects of the corresponding solution in the method will not be repeated here.
- FIG. 1 is a schematic diagram of a basic structure of a network stack
- FIG. 2 is a schematic diagram of an operating system architecture
- FIG. 3A is a schematic diagram of a data transmission process
- FIG. 3B is another schematic diagram of a data transmission process
- FIG. 4 is a schematic diagram of a data transmission scenario provided by an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
- FIG. 6 is a schematic diagram of a system architecture provided by an embodiment of the present application.
- FIG. 7A is a flow chart of a data transmission method provided by an embodiment of the present application.
- FIG. 7B is a flowchart of another data transmission method provided by the embodiment of the present application.
- Fig. 8 is a schematic diagram of an interface provided by the embodiment of the present application.
- Fig. 9 is a schematic diagram of another interface provided by the embodiment of the present application.
- Fig. 10 is a schematic diagram of another interface provided by the embodiment of the present application.
- Fig. 11 is a schematic diagram of another interface provided by the embodiment of the present application.
- Fig. 12 is a schematic diagram of another interface provided by the embodiment of the present application.
- FIG. 13 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- the network stack can define the structural system of a network and the division of functions of each layer.
- Figure 1 is a schematic diagram of the basic structure of the network stack.
- the network stack may generally include a physical layer, a link layer, a network layer, a transport layer, an application layer, and a user layer.
- the physical layer can be various media, such as wireless Wi-Fi network, serial link or Ethernet equipment, etc., through which the bit stream is transmitted through the physical medium, and finally the signal transmission is realized.
- the link layer is a device driver that provides access to the physical layer.
- the link layer can include a logical link control sublayer and a media access control sublayer. The link layer combines bits into bytes, and then combines bytes into frames.
- Use link layer addresses for example, Ethernet uses MAC addresses
- the network layer is responsible for guiding data packets to their destinations, that is, establishing a connection between two nodes through IP addressing, selecting appropriate routing and switching nodes for packets from sending electronic devices, and transmitting packets according to IP addresses to the receiving electronic device.
- the network layer is also the IP protocol layer, and the IP protocol is the foundation of the Internet.
- the transport layer is responsible for point-to-point communication between electronic devices, such as managing communication between endpoints on electronic devices, that is, port number-to-port communication between hosts, such as ssh 127.0.0.1 in the host.
- the transport layer is used to provide point-to-point reliable and transparent data transmission services for upper-layer protocols, including dealing with issues such as error control and flow control.
- the transport layer shields the details of the data communication of the lower layer from the upper layer, so that what the upper layer user sees is only a host-to-host, user-controlled and configurable, reliable data path between two transport entities. Protocols like TCP and UDP are usually at the transport layer.
- the application layer can be understood as the semantic layer of the transmitted data. Common application layer network service protocols include: HTTP, HTTPS, FTP, POP3, etc.
- the application layer is the layer closest to the user, which can provide the user with an application interface, and can also directly provide various network services for the user.
- An operating system is a collection of system software that manages computer hardware resources, controls the operation of other programs, and provides users with an interactive operating interface.
- Fig. 2 is a schematic diagram of an operating system architecture.
- the operating system may be a Linux system, an Android system, or a UNIX system.
- the system architecture generally includes user space, kernel space, and hardware.
- the application program runs in the user space, and usually the user space is processed with a lower CPU permission level.
- the user space may include the above-mentioned application layer, and the application layer may include multiple application programs.
- Drivers run in kernel space, and usually kernel space is processed at a higher CPU privilege level. Distinguishing between kernel space and user space can isolate operating system code and application code. Even if a single application fails, it will not affect the stability of the operating system. That is to say, distinguishing between kernel space and user space can improve the stability of the operating system. and availability.
- kernel space may include system call interfaces, protocol independent interfaces, network protocols, device independent interfaces, device drivers, and the like.
- the protocol-independent interface may be a socket layer, which is used to provide a set of common functions to support various protocols, such as TCP protocol, UDP protocol, or IP protocol.
- a network protocol defines the specific network protocol available, such as TCP or UDP, etc.
- the device-independent protocol can connect the network protocol to the drivers of various hardware devices with different functions, and is used to provide a common set of functions, which are used by the lower-level network device drivers, so that the drivers of the network devices can use lower High-level protocol stack to operate.
- the device driver is used to manage network devices.
- the device driver may include a SLIP driver on a serial interface or an Ethernet driver on an Ethernet device.
- first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, “plurality” means two or more.
- the electronic device at the receiving end needs to copy the file data multiple times when receiving the file data in the kernel and passing it to the application, which may have performance problems.
- Figure 3A and Figure 3B taking the Linux system as an example, in the process of electronic equipment transmitting files, when the electronic equipment at the receiving end receives file data, first, the network card receives the file data from the external network, and then, the network card uses DMA The file data is written into the memory by the method, and then a hard interrupt is initiated to the CPU to notify the CPU that data has arrived. Furthermore, the CPU can respond to the hard interrupt, call the interrupt processing function registered by the network card driver and issue a soft interrupt after simple processing.
- the ksoftirqd process After the ksoftirqd process detects the soft interrupt, it can call the poll function to start receiving packets, and hand over the received file data to the kernel protocol stack for processing.
- the electronic device at the receiving end receives the file data in the kernel and needs to copy the file data multiple times when passing it to the application.
- the file data can be copied from the ring buffer (ringbuf) to the skb buffer (skbbuf), and then the file data is handed over from the skbbuf to the kernel protocol stack for processing.
- the kernel protocol stack After the kernel protocol stack processes the file data, it wakes up the user-mode process, allowing The user mode process receives the file data from the kernel mode process, that is, the file data is copied from the kernel space to the application space, so that the application layer receives the file data.
- the file data In the process of receiving the file data by the electronic device at the receiving end, the file data needs to be copied multiple times.
- the multiple copies of the above file data require high CPU computing power and IO capabilities. In the case of high-throughput data reception, it is necessary to The CPU computing power and IO capability of the computer are stronger, and the electronic device at the receiving end may have performance problems when receiving files.
- the business data corresponding to the important application (APP) and the business data of the ordinary APP are received into the kernel protocol stack for processing, that is, the multiple data received by the electronic device at the receiving end
- Business data is polled and scheduled between the same cores. Therefore, it is impossible to quickly distinguish and process business data of important APPs, that is, high-priority business, through the above method.
- the embodiment of the present application provides a data transmission method, the electronic device at the receiving end can transparently transmit the data from the driver program to the corresponding APP for processing, thereby reducing the number of data copies and increasing the data transmission rate.
- the business data of important APPs (that is, high-priority business) can be directly transparently transmitted from the driver to the corresponding APP, and the business data of ordinary APPs can be transmitted through the kernel according to related technologies. protocol stack for processing. In this way, high-priority services can be quickly distinguished, and the high-priority services are processed first, thereby reducing the response delay of the high-priority services.
- the data transmission method provided by the embodiment of this application can be applied to file transfer between distributed systems (such as transferring images, audio or video, etc.), mirroring screen projection (such as casting a mobile phone to a computer or TV, etc.), multi-screen collaboration ( For example, a multi-screen system between a mobile phone screen and a computer screen) or in various scenarios such as control information transmission to increase the rate of data transmission.
- distributed systems such as transferring images, audio or video, etc.
- mirroring screen projection such as casting a mobile phone to a computer or TV, etc.
- multi-screen collaboration For example, a multi-screen system between a mobile phone screen and a computer screen
- control information transmission to increase the rate of data transmission.
- the data transmission method may be applied in a file transmission scenario.
- the file transfer scenario may include the first electronic device 11 and the second electronic device 12 and so on.
- the first electronic device 11 is the sending end electronic device, and is the sender of the file transmission.
- the second electronic device 12 is the receiving end electronic device, and is the recipient of the file transmission.
- the first electronic device 11 can pass 2G/3G/4G/5G, wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation Satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC) or infrared technology (infrared, IR) and other communication methods
- WLAN wireless local area networks
- WLAN wireless local area networks
- wireless fidelity wireless fidelity, Wi-Fi
- bluetooth blue, BT
- global navigation Satellite system global navigation satellite system
- frequency modulation frequency modulation
- FM near field communication technology
- NFC near field communication
- infrared technology infrared, IR
- the data transmission method may be applied in a screen projection scenario.
- the screen projection scene may include the third electronic device 21 and the fourth electronic device 22 .
- the third electronic device 21 may be an initiator of screen projection
- the fourth electronic device 22 may be a recipient of screen projection. That is to say, the third electronic device 21 projects the content displayed on the screen to the screen of the fourth electronic device 22 .
- the third electronic device 21 can pass 2G/3G/4G/5G, wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation Satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC) or infrared technology (infrared, IR) and other communication methods
- WLAN wireless local area networks
- WLAN wireless local area networks
- wireless fidelity wireless fidelity, Wi-Fi
- bluetooth blue, BT
- global navigation Satellite system global navigation satellite system
- frequency modulation frequency modulation, FM
- near field communication technology near field communication
- NFC near field communication
- infrared technology infrared, IR
- the above-mentioned first electronic device, second electronic device, third electronic device and fourth electronic device may be respectively a mobile phone, a tablet computer, a wearable device (such as a smart watch), a vehicle-mounted device, an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) equipment, notebook computer, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA) and other electronic devices capable of data transmission any kind of electronic device.
- augmented reality augmented reality, AR
- virtual reality virtual reality
- notebook computer notebook computer
- ultra-mobile personal computer ultra-mobile personal computer
- UMPC ultra-mobile personal computer
- netbook or personal digital assistant personal digital assistant
- FIG. 5 shows a schematic structural diagram of the electronic device 100 .
- the electronic device 100 may be the above-mentioned receiving-end electronic device or sending-end electronic device, or may be the above-mentioned screen-casting initiator or screen-casting receiver.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , display screen 194 and so on.
- a processor 110 an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , display
- 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, bone conduction sensor 180M, etc.
- the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a central processing unit (central processing unit, CPU) modem processor, a graphics processing unit (graphics processing unit, GPU), image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processing device (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- application processor application processor
- CPU central processing unit
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller memory
- video codec digital signal processor
- DSP digital signal processor
- baseband processor baseband processor
- neural network processing device neural-network processing unit
- the controller may be the nerve center and command center of the electronic device 100 .
- the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory in processor 110 is a cache memory.
- the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
- processor 110 may include one or more interfaces.
- the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input and output
- subscriber identity module subscriber identity module
- SIM subscriber identity module
- USB universal serial bus
- the wireless communication function of the electronic device 100 can be realized 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 mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
- the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
- System global navigation satellite system, GNSS
- frequency modulation frequency modulation, FM
- near field communication technology near field communication, NFC
- infrared technology infrared, IR
- 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 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
- the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
- the electronic device 100 realizes the display function through 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 the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos and the like.
- the display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
- the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
- the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
- the internal memory 121 may be used to store computer-executable program codes including instructions.
- the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 .
- the internal memory 121 may include an area for storing programs and an area for storing data.
- the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
- the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
- the processor 110 can complete data transmission by executing instructions stored in the internal memory 121 .
- the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
- pressure sensor 180A may be disposed on display screen 194 .
- pressure sensors 180A such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
- a capacitive pressure sensor may be comprised of at least two parallel plates with conductive material.
- the fingerprint sensor 180H is used to collect fingerprints.
- the electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
- Touch sensor 180K also known as "touch panel”.
- the touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a touch screen.
- the touch sensor 180K is used to detect a touch operation on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- Visual output related to the touch operation can be provided through the display screen 194 .
- the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
- the keys 190 include a power key, a volume key and the like.
- the key 190 may be a mechanical key. It can also be a touch button.
- the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
- the motor 191 can generate a vibrating reminder.
- the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
- touch operations applied to different applications may correspond to different vibration feedback effects.
- the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
- Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
- the touch vibration feedback effect can also support customization.
- the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
- the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
- the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
- the illustrated components can be realized in hardware, software or a combination of software and hardware.
- the above-mentioned first electronic device may also be a device such as a server.
- the server corresponding to the browser can send the data corresponding to the search content to the second electronic device according to the search content . That is, the server corresponding to the browser sends data to the second electronic device.
- FIG. 6 shows a schematic diagram of an operating system architecture provided by an embodiment of the present application.
- the operating system is generally used in electronic equipment.
- the user space may include at least one first APP (for example, APP1 ) and at least one second APP (for example, APP2 ).
- the first APP may be regarded as an important APP, that is, an APP with a higher priority.
- An APP with a higher priority may be an APP with a higher requirement on real-time performance, an APP with a larger data throughput, or an APP with a higher degree of use, and the like.
- technicians can pre-set the level of live broadcast apps to a higher priority.
- the second APP can be regarded as a common APP, that is, an APP with a lower priority.
- the first APP and the second APP can be preset by technicians.
- the technician may pre-set the above-mentioned first module in the first APP, and set the second module in the driver program.
- the first module can directly receive the service data transparently transmitted from the second module.
- the first module may also be called a specific receiving module or a distributed receiving module, and the second module may also be called a distribution module or a distributed local distribution module.
- the names of the first module and the second module are not limited in this embodiment of the present application. In this way, after the driver program receives the service data, it can directly copy the service data meeting the preset conditions from the second module to the corresponding first module, thereby reducing the number of times of copying the service data.
- this solution can reduce CPU and IO consumption by setting the first module and the second module, improve the performance of the electronic device when receiving data, and increase the data transmission rate.
- a corresponding first module may be set for each first APP, or a "common" first module may be set for all first APPs.
- each first APP in the electronic device at the receiving end may be provided with a first module as shown in FIG. 6 .
- only one "common" first module can be set in the electronic device at the receiving end, and each first APP can call the interface to receive corresponding service data from the first module, without setting the first module in each first APP. a module.
- the second APP may not be provided with the first module. In this way, the business data corresponding to the second APP may be transmitted to the corresponding second APP via the kernel protocol stack for processing according to related technologies.
- the electronic device at the receiving end when the electronic device at the receiving end receives data from different APPs, it can directly transparently transmit the data of the first APP from the driver program to the corresponding APP for processing, while the second APP is still not equipped with the above-mentioned first module.
- the data is transmitted to the corresponding APP for processing via the kernel protocol stack, so that the data of the first APP, that is, the APP with higher priority can be processed quickly.
- the electronic device at the receiving end receives data through the antenna 1 or the antenna 2, and then temporarily stores the data in a memory. If the processor 110 determines that the data satisfies the preset condition, the processor 110 may directly transfer the data from the second module set in the driver program to the first module set in the corresponding APP to perform subsequent processing on the data.
- the electronic device at the sending end is a mobile phone with the structure shown in FIG. 5
- the electronic device at the receiving end is a mobile phone with the structure shown in FIG.
- the mobile phone with the operating system architecture shown in 6 is taken as an example, and the data transmission method provided by the embodiment of the present application is described in detail with reference to the accompanying drawings.
- the data transmission method provided in the embodiment of the present application may include an entry generation process and a data transmission process.
- the electronic device at the receiving end can transparently transmit qualified data from the driver to the corresponding application during the data transmission process based on the entries saved in the entry generation process, wherein, as shown in Figure 7A, the entry generation process can be include:
- the first mobile phone establishes a connection with the second mobile phone.
- the first mobile phone is an electronic device at a sending end, that is, a source device
- the second mobile phone is an electronic device at a receiving end, that is, a destination device.
- a connection can be established between the first mobile phone and the second mobile phone by sending a request message.
- the request message may be sent from the first mobile phone to the second mobile phone, or may be sent from the second mobile phone to the first mobile phone.
- the request message may include information about the sender of the request message, such as the sender's identifier, IP address, and port number. For example, if the request message is sent to the second mobile phone by the first mobile phone, the request message can include information such as the identification, IP address and port number of the first mobile phone; if the request message is sent to the first mobile phone by the second mobile phone, then The request message may include information such as the identifier, IP address, and port number of the second mobile phone.
- the process of establishing a connection through a request message usually includes processes such as discovery of surrounding electronic devices, plaintext connection, authentication (by PIN code, or scanning, etc.), encrypted connection, and the like.
- the request message can be sent by any communication method in 2G/3G/4G/5G, WLAN, Wi-Fi, Bluetooth, GNSS, FM, NFC or IR. That is to say, when the distance between the first mobile phone and the second mobile phone is relatively close or far, the connection can be established by sending a request message for communication.
- the first mobile phone may send the request message to the second mobile phone through different trigger conditions.
- the user can configure the system so that the first mobile phone sends a request message to the second mobile phone.
- the first mobile phone can respond to the user's operation to open the "settings" in the system, and in the setting interface shown in (b) in Figure 8, the user can select "Bluetooth” , and then turn on Bluetooth in the interface shown in (c) in FIG. 8 , and select the identity of the second mobile phone.
- the first mobile phone may send a request message to the second mobile phone.
- the user can also enable other connection modes such as "WLAN" in the setting interface, so that the first mobile phone sends a request message to the second mobile phone, which is not limited in this embodiment of the present application.
- the user may also start the first application in the first mobile phone, so that the first mobile phone sends a request message to the second mobile phone.
- the first application may be a third-party application or system application capable of transferring files, which is not limited in this embodiment of the present application. The following describes in detail taking the first application as a shared application as an example.
- the first mobile phone can start the sharing application in response to the operation of the user opening the sharing application, as shown in (a) in FIG. 9 , the user can click the icon of the sharing application, so that the first mobile phone starts the sharing application, Furthermore, a selection interface as shown in (b) in FIG. 9 is displayed, and the selection interface may include identifications of multiple electronic devices. The user can select the identifier of the second mobile phone in the selection interface, and then the first mobile phone can send a request message to the second mobile phone in response to the user's selection operation.
- the user's operation of opening the sharing application may also be a double-tap operation, voice operation, or gesture operation, etc.
- the user's selection operation may be a click operation, voice operation, or gesture operation, etc., which is not limited in this embodiment of the present application.
- the control of "select target file" can be displayed first, and after the user selects this control, the first mobile phone can display 9, the file list shown in (d), from which the user can select the target file that the user wishes to transmit to the second mobile phone through the first mobile phone. Furthermore, the first mobile phone may display a selection interface as shown in (b) in FIG. 9 , and send a request message to the second mobile phone in response to the user's selection operation on the identifier of the second mobile phone. At this time, the request message may also carry the information of the target file.
- the first mobile phone may trigger the first mobile phone to start the sharing application, so that the first mobile phone sends a request message to the second mobile phone.
- the first mobile phone can display the sharing icon after opening the target picture in the gallery, and then display the icons of multiple sharing applications as shown in (c) in Figure 10 .
- the user may select a sharing application to start the sharing application.
- the first mobile phone After the first mobile phone starts the sharing application, it can display a selection interface as shown in (d) in Figure 10, which is the same as the selection interface shown in (b) in Figure 9, and can include identifications of multiple electronic devices .
- the user can select the identifier of the second mobile phone, and the first mobile phone can send a request message to the second mobile phone in response to the user's selection operation.
- the request message may also carry the target file, that is, the information of the above-mentioned target picture.
- the second mobile phone After receiving the request message, the second mobile phone can directly establish a connection with the first mobile phone. Alternatively, after receiving the request message, the second mobile phone may establish a connection with the first mobile phone according to the user's instruction.
- the second mobile phone may display the first bullet box as shown in (a) in Figure 11, asking the user whether to agree to establish a connection with the first mobile phone.
- the first The mobile phone establishes a connection with the second mobile phone.
- the second mobile phone can also display a second bullet box as shown in (b) in Figure 11, and the second bullet box can display the information included in the request message. Information about the target file for users to view.
- the receiving of the request message by the second mobile phone may be regarded as the reception of the request message by the sharing APP in the second mobile phone.
- the sharing APP in the second mobile phone is an APP that can subsequently receive data from the first mobile phone. That is to say, establishing a connection between the first mobile phone and the second mobile phone can be regarded as establishing a data transmission connection between the first mobile phone and the sharing APP in the second mobile phone, and the data transmission connection is used to transmit service data of the sharing APP.
- the second mobile phone may also prompt the user that the connection between the first mobile phone and the second mobile phone has been established through a pop-up window or voice. This embodiment of the present application does not limit it.
- the corresponding APP in the second mobile phone may send a response message to the first mobile phone, instructing the second mobile phone to establish a connection with the first mobile phone.
- the first mobile phone when the second mobile phone sends a request message to the first mobile phone, the first mobile phone can send a response message to the second mobile phone after receiving the request message from the second mobile phone, so that the first mobile phone can establish a connection with the second mobile phone .
- the second mobile phone generally sends a request message to the first mobile phone after opening the sharing APP, so establishing a connection between the first mobile phone and the second mobile phone can also be regarded as establishing a connection between the first mobile phone and the sharing APP of the second mobile phone.
- the response message may include the information of the first mobile phone, so that the second mobile phone can obtain the information of the first mobile phone through the response message.
- the second mobile phone can also obtain information about the server through a response message from the server.
- the second mobile phone when the second mobile phone opens the browser, the second mobile phone can send a request message to the server corresponding to the browser, and the server can send a response message to the second mobile phone, and the response message includes information such as the IP address and port number of the server, Make the second mobile phone establish a connection with the server.
- the second mobile phone when the second mobile phone establishes a connection with the specific server, once the connection is established, the data sent by the specific server to the second mobile phone is received by the application corresponding to the specific server. It can also be considered that the specific server establishes a connection with the corresponding application on the second mobile phone. For example, after the second mobile phone establishes a connection with the server corresponding to the browser, the data sent by the server corresponding to the browser to the second mobile phone is directly received by the browser APP in the second mobile phone.
- the application of the second mobile phone generates connection information for data transmission based on the connection information of the first mobile phone and the connection information of the second mobile phone.
- the first module that is, the distributed receiving module set in the application of the second mobile phone can be based on the connection information of the first mobile phone and the information of the second mobile phone.
- Connection information Generate connection information for data transfer.
- the sharing APP in the second mobile phone after the sharing APP in the second mobile phone receives the request message or the response message from the first mobile phone, it can obtain the connection information of the first mobile phone from the request message or the response message, for example, the IP address of the first mobile phone, Information such as port number, protocol number, and interface ID.
- the protocol number generally indicates the transport layer protocol. For example, a protocol number of 6 indicates the TCP protocol, a protocol number of 17 indicates the UDP protocol, and so on. In some other embodiments, the protocol number may also indicate a network layer protocol and an application layer protocol.
- the second mobile phone can also obtain its own connection information, for example, the second mobile phone can obtain information such as the IP address, port number, or interface identifier of the second mobile phone from storage.
- the first module set in the sharing APP of the second mobile phone can generate connection information for data transmission based on the connection information of the first mobile phone and the connection information of the second mobile phone.
- the connection information of the data transmission is used to generate an entry, and in some embodiments, the connection information of the data transmission may be regarded as connection identification information in the entry.
- the connection information for data transmission may include the IP address of the first mobile phone, the port number of the first mobile phone, the IP address of the second mobile phone, the port number and protocol number of the second mobile phone, and the like.
- the IP address of the first mobile phone can be called the source address
- the port number of the first mobile phone can be called the source port number
- the IP address of the second mobile phone can be called the destination address
- the port number of the second mobile phone can be called the destination port No.
- the connection information for data transmission is a set of five-tuple information.
- the driver program of the second mobile phone generates an entry based on the connection information of the data transmission and saves the entry.
- the driver program of the second mobile phone can generate an entry based on the connection information for data transmission, and save the generated entry in the driver program.
- the first module (that is, the distributed receiving module) in the APP that receives the request message or the response message in the second mobile phone can add the APP identification information of the APP to the connection information of the data transmission, which will add
- the connection information of the data transmission of the APP identification information is issued to the second module (ie, the distributed local distribution module) set in the driver program of the second mobile phone.
- the second module of the second mobile phone generates an entry based on the connection information of the data transmission with the APP identification information added, and saves the entry in the driver program of the second mobile phone.
- the APP identification information can indicate which APP this data transmission belongs to.
- the module transmits data to the first module in the corresponding APP.
- the first module in the APP of the second mobile phone can add the APP identification information when generating the connection information for data transmission. That is to say, the connection information generated by the first module in the APP of the second mobile phone includes APP identification information, and the second module in the driver program of the second mobile phone can directly generate an entry based on the connection information, and save the entry in the driver.
- the APP identification information may include an APP identification number (ID) or an APP package name and the like.
- the second mobile phone can generate an entry.
- the entry may at least include connection identification information and APP identification information.
- the connection identification information indicates the data transmission connection established between the first mobile phone and an APP in the second mobile phone.
- the connection identification information may include a source address, a destination address, a source port number, a destination port number, a protocol number, and the like.
- Explanation source address Indicates the source address of the datagram Destination address Indicates the destination address of the datagram source port number Indicates the source port number of the data packet destination port number Indicates the destination port number of the datagram agreement number Indicates the protocol number adopted by the data packet, such as TCP, UDP, etc.
- APP identification number Indicate which APP the data transmission belongs to, such as Huawei sharing, screencasting, etc.
- the entry includes at least connection identification information and APP identification information.
- the above entry may further include more information.
- a specified interface identifier can also be added to the above table items including source address, destination address, source port number, destination port number, protocol number, and APP ID.
- a certain interface corresponds to a specific service, so that it can quickly Process the business.
- the rate of data transmission can be further improved by adding the interface identifier in the entry.
- the entry may also include a minimum value of time to live (TTL) and a maximum value of TTL.
- TTL minimum value represents the expected minimum value of the TTL
- TTL maximum value represents the expected maximum value of the TTL.
- the TTL minimum value is the same as the TTL maximum value; in the data transmission scenario through routers, the difference between the TTL maximum value and the TTL minimum value is the number of routers passed.
- connection identification information in the entry may also be other forms of identification information such as a specified interface identification, triplet information, or seven-tuple information. That is to say, the above five-tuple information (namely source address, destination address, source port number, destination port number, protocol number) can be replaced by other forms of information such as specified interface identifier, triplet information or seven-tuple information .
- the first mobile phone may also send a message requesting to start data transmission to the second mobile phone. It should be noted that, after establishing a connection with the second mobile phone, the first mobile phone may also send a message requesting to start data transmission to the second mobile phone.
- the second mobile phone may directly start receiving data without user instruction, or may start receiving data in response to user instruction.
- the data is generally the business data of the above-mentioned sharing APP.
- a third pop-up box may be displayed on the second mobile phone, asking whether the user agrees to receive the message from the first mobile phone. phone data. If the user selects the "agree" control, the first mobile phone starts to transmit data to the second mobile phone, that is, the second mobile phone starts to receive data in response to the user's instruction.
- a "receive" control can also be displayed and the Deny control. If the user selects the "receive" control, after the first mobile phone establishes a connection with the second mobile phone, the first mobile phone can directly start to transmit data to the second mobile phone, that is, the second mobile phone starts to receive data in response to the user's instruction.
- the second mobile phone may also send a message requesting data transmission to the first mobile phone.
- the message may carry the identifier of the data content that the user of the second mobile phone wishes to acquire. For example, filename, etc.
- the first mobile phone can transmit relevant data to the second mobile phone based on the file name.
- the above entry generation process may not be required.
- the above table items may be preset in the second mobile phone. That is to say, the technician can store the above entry information in the second mobile phone in advance. In this way, the first mobile phone can directly send a message requesting to start data transmission to the second mobile phone, or the second mobile phone can directly send a message requesting data transmission to the first mobile phone, or the first mobile phone can directly send a message to be transmitted to the second mobile phone. data, without the above table item generation process.
- the first mobile phone can transmit data to the second mobile phone.
- the first mobile phone may transmit data to the second mobile phone when the entry is pre-stored in the second mobile phone.
- the data transmission process in the embodiment of the present application will be described in detail below with reference to FIG. 7B .
- the data transmission process may include:
- the driver program of the second mobile phone receives data, and acquires connection identification information of data transmission corresponding to the data.
- connection identification information for data transmission may be any identification information among five-tuple information, seven-tuple information, designated interface identification or triple information corresponding to the data.
- the second mobile phone can receive data from the first mobile phone.
- the first mobile phone may transmit service data to the second mobile phone.
- the second mobile phone can receive service data from the first mobile phone.
- the data can be transmitted in the form of a data message, etc.
- the data message can include information such as connection identification information and data content of the data transmission.
- the identification information of the data transmission can be five-tuple information (that is, the source address, destination address, source port number, destination port number, protocol number).
- the network card of the second mobile phone can transmit the data to the driver program.
- the driver can analyze the data to obtain the connection identification information of the data transmission in the data, for example, to obtain information such as source address, destination address, source port number, destination port number and protocol number, that is, the driver can obtain The five-tuple information of the data.
- the driver program of the second mobile phone may also obtain the specified interface identifier in the data. This embodiment of the present application does not limit it.
- the driver program of the second mobile phone queries whether an entry consistent with the connection identification information of the data transmission is stored.
- the entry may be stored in the driver program of the second mobile phone.
- the second mobile phone can store one or more entries. For example, if multiple data transmission connections have been established between the second mobile phone and other electronic devices, the second mobile phone may store multiple entries related to the multiple connections.
- the driver program of the second mobile phone can query whether an entry consistent with the connection identification information of the data transmission is stored. That is to say, the driver program of the second mobile phone can compare the connection identification information of the data transmission with the stored entries one by one. Exemplarily, the driver program of the second mobile phone can compare the five-tuple information of the obtained data with the five-tuple information in the table item one by one, and determine whether there is a source address, destination address, source Port number, destination port number, protocol number and other information are consistent with the entry.
- the second module in the driver program of the second mobile phone inquires whether an entry consistent with the quintuple information is stored, that is, the second mobile phone compares the stored entry with the obtained data through the second module. Five-tuple information.
- the quintuple information in the data packet is: 11.11.11.11, 10000, 6, 22.22.22.22, 80
- the quintuple information indicates that the data packet is sent from an IP address of 11.11.11.11
- the device on port 10000 uses TCP protocol to send to the device with IP address 22.22.22.22 and port 80.
- the second mobile phone stores an entry whose source address is 11.11.11.11, source port number is 10000, protocol number is 6, destination address is 22.22.22.22, and source port number is 80, it means that the second mobile phone stores data related to An entry that matches the quintuple information of the packet.
- the second mobile phone can transmit the data to the corresponding APP for processing after multiple copies according to related technologies.
- the driver program of the second mobile phone transparently transmits the data to the corresponding application.
- the second Module that is, the distributed local distribution module can transparently transmit data to the corresponding APP according to the APP ID in the entry, and the data does not need to be processed by the kernel protocol stack. That is to say, the second mobile phone can directly copy the data from the second module to the APP corresponding to the APP ID.
- the second module in the second mobile phone can send a message to the first module in the corresponding APP, that is, the distributed receiving module Transparently transmit data.
- the first module in the corresponding APP can directly receive data from the second module in the driver, and the data does not need to be processed through the kernel protocol stack, thereby increasing the data transmission rate.
- the second module in the driver program of the second mobile phone can send the corresponding APP ID to the corresponding APP ID according to the entry.
- the first module in the APP distributes data, and then processes the data quickly.
- an entry that is consistent with the identification information of the data transmission in the data it means that the data received by the second mobile phone is consistent with the application corresponding to the entry, and then the second mobile phone can use the APP ID in the entry.
- the data is directly transparently transmitted from the driver to the corresponding APP.
- the second mobile phone may, according to related technologies, transfer the data to the corresponding APP for processing after multiple copies of the kernel protocol stack.
- the service corresponding to the data transmission may be regarded as a high-priority service.
- the second module in the driver program can directly transparently transmit the data corresponding to the high-priority service to the first module in the corresponding APP based on the APP ID, that is, the data corresponding to the high-priority service is copied from the driver program to the corresponding APP , the APP processes the data, which can reduce packet loss and improve the transmission throughput of data packets, thereby reducing the delay of data transmission and increasing the rate of data transmission.
- the application of the second mobile phone processes data.
- the first module in the APP of the second mobile phone may sequentially perform decapsulation and other processing on the data message or the information including the data message, thereby extracting The data content in the data message, and the extracted data content is sent to the corresponding APP for data processing. That is to say, the second mobile phone can quickly process the protocol stack in the APP, decapsulate the header of the standard transport layer and the IP layer, and complete the processing of the data.
- the second mobile phone can delete the corresponding entry stored in the driver program to save storage space. It can be understood that the second mobile phone may also delete the corresponding entry after the driver transparently transmits data to the corresponding application. Since the information in the entry is no longer needed in subsequent processing, deleting the entry at this time will not affect the data transmission process. In some other embodiments, after the current data transmission connection is disconnected, the second mobile phone can delete the corresponding entry, which can avoid the need to repeatedly establish a connection for subsequent data transmission.
- the second mobile phone may also periodically update the entries.
- the second mobile phone may periodically delete expired entries.
- an expired entry represents an useless entry. For example, entries that are not deleted in time when the APP exits abnormally.
- the second mobile phone periodically deletes expired entries, which can save storage space and save query time.
- a cache queue can be set in the second mobile phone to cache the multiple data packets, and sequentially Perform data processing.
- the second mobile phone can directly copy the data from the driver program to the corresponding APP, reducing the process of the kernel receiving data and passing it to the application The number of copies of the data in. It can also be said that the second mobile phone can directly transparently transmit the data from the driver program to the corresponding APP, and the corresponding APP processes the data without going through the kernel protocol stack to process the data. Therefore, the data transmission method provided by the embodiment of the present application can reduce the number of data copies and increase the data transmission rate. Since the data transmission method provided by the embodiment of the present application does not need to go through the kernel protocol stack, the number of data packets sent and received by the kernel can be significantly reduced.
- important APP data can be directly transparently transmitted to the corresponding APP by the driver, and does not need to be polled and scheduled in the kernel protocol stack together with ordinary APP data, so that high-priority services can be quickly distinguished and processed, and high-priority services can be reduced Service response delay.
- an APP can also be independently bound to a CPU, thereby further increasing the rate of data transmission.
- the data transmission method provided by the embodiment of the present application does not need to go through the kernel protocol stack, when optimizing for a specific application, there is no need to invasively modify the kernel protocol stack, thereby improving the flexibility and convenience of modifying the data transmission method .
- the above-mentioned embodiment is distributed deployment in the second mobile phone (receiving terminal electronic device), so that the data received by the second mobile phone can be directly transparently transmitted from the driver program to the corresponding APP, and the corresponding APP To process the data, thereby increasing the rate at which the electronic device at the receiving end receives data.
- data can be exchanged between the first mobile phone and the second mobile phone, that is, the first mobile phone can send data to the second mobile phone, and the second mobile phone can also send data to the first mobile phone.
- both the first mobile phone and the second mobile phone may have the operating system architecture as shown in FIG. 6 .
- the first mobile phone can also generate an entry. It can be understood that the first mobile phone may generate an entry based on its own information and the information of the second mobile phone, in which the source device is the second mobile phone and the destination device is the first mobile phone. In another case, the first mobile phone may also acquire the entry generated by the second mobile phone and save the entry.
- the source device in the entry generated by the first mobile phone to obtain the second mobile phone is the first mobile phone
- the destination device is the second mobile phone. Therefore, when the first mobile phone receives data from the second mobile phone and compares the data
- the identification information for example, quintuple information
- the quintuple information for example, quintuple information
- the entry generated in the second mobile phone may be obtained and saved.
- the second mobile phone may send a response message to the first mobile phone, and the response message may carry information of the second mobile phone, such as the IP address and port number of the second mobile phone.
- the distributed local distribution module of the first mobile phone can also generate an entry based on the information of the first mobile phone and the information of the second mobile phone. It should be noted that, in the entry stored in the first mobile phone, the first mobile phone is the source device, and the second mobile phone is the destination device.
- the second mobile phone sends data to the first mobile phone, that is, when the first mobile phone is the receiver, if the first mobile phone inquires whether there is an entry consistent with the quintuple information of the data message, the first mobile phone needs to Flip the stored entries. That is to say, use the source address in the entry as the destination address, use the source port number in the entry as the destination port number, use the destination address in the entry as the source address, and use the destination port number in the entry as the source port No. Furthermore, the first mobile phone can directly transparently transmit the data from the driver program to the corresponding APP under the condition that the quintuple information of the data is consistent with the reversed entry, thereby increasing the data transmission rate.
- the electronic device includes hardware and/or software modules corresponding to each function.
- the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
- the functional modules of the electronic device may be divided according to the above method example.
- each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
- the above integrated modules may be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
- the embodiment of the present application also provides an electronic device, including one or more processors and one or more memories.
- the one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs The above related method steps implement the data transmission method in the above embodiment.
- the embodiment of the present application also provides an electronic device, as shown in Figure 13, including: one or more processors 1301, memory 1302, and one or more computer programs 1303, each of the above devices can be connected through one or more communication buses 1304 connection.
- the one or more computer programs 1303 are stored in the above-mentioned memory 1302 and configured to be executed by the one or more processors 1301, the one or more computer programs 1303 include instructions, and the above-mentioned instructions can be used to perform the above-mentioned implementation steps in the example.
- all relevant content of each step involved in the above method embodiment can be referred to the functional description of the corresponding physical device, and will not be repeated here.
- the foregoing processor 1301 may specifically be the processor 110 shown in FIG. 5
- the foregoing memory 1302 may specifically be the internal memory 121 shown in FIG. 5 .
- Embodiments of the present application also provide a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are run on the electronic device, the electronic device executes the above-mentioned relevant method steps to realize the above-mentioned embodiment The data transfer method in .
- Embodiments of the present application also provide a computer program product, which, when running on a computer, causes the computer to execute the above-mentioned related steps, so as to implement the data transmission method performed by the electronic device in the above-mentioned embodiments.
- an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the data transmission method executed by the electronic device in the above method embodiments.
- the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the above-mentioned The beneficial effects of the corresponding method will not be repeated here.
- the disclosed devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
- the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
- the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
表项 | 解释 |
源地址 | 指示数据报文的源地址 |
目的地址 | 指示数据报文的目的地址 |
源端口号 | 指示数据报文的源端口号 |
目的端口号 | 指示数据报文的目的端口号 |
协议号 | 指示数据报文采用的协议号,例如TCP、UDP等 |
APP识别号(APP ID) | 指示数据传输属于哪个APP,例如华为分享、投屏等 |
Claims (14)
- 一种数据传输方法,其特征在于,应用于第一电子设备,所述第一电子设备包括驱动程序和应用,所述方法包括:接收来自第二电子设备的请求消息,所述请求消息用于请求建立数据传输连接,所述请求消息包括所述第二电子设备的连接信息,所述数据传输连接用于传输所述应用的业务数据;根据所述第二电子设备的连接信息、所述第一电子设备的连接信息以及所述应用的信息,生成所述表项;其中,所述表项包括连接标识信息和应用标识信息,所述连接标识信息指示所述数据传输连接,所述应用标识信息指示所述应用;接收来自所述第二电子设备的业务数据,所述业务数据携带数据传输的连接标识信息;若所述数据传输的连接标识信息与所述表项中的连接标识信息一致,则将所述业务数据从所述驱动程序拷贝至所述应用标识信息指示的应用。
- 根据权利要求1所述的方法,其特征在于,所述将所述业务数据从所述驱动程序拷贝至所述应用标识信息指示的应用指示,从所述驱动程序向所述应用标识信息指示的应用透传所述业务数据。
- 根据权利要求1或2所述的方法,其特征在于,所述第二电子设备的连接信息包括所述第二电子设备的地址、端口号、协议号或接口标识中的一项或多项;所述第一电子设备的连接信息包括所述第一电子设备的地址、端口号或接口标识中的一项或多项。
- 根据权利要求1-3中任一项所述的方法,其特征在于,所述表项中的连接标识信息包括五元组信息、三元组信息、七元组信息或接口标识中的任一种信息。
- 根据权利要求1-4中任一项所述的方法,其特征在于,所述表项还包括生存时间TTL最小值和TTL最大值。
- 根据权利要求1-5中任一项所述的方法,其特征在于,所述将所述业务数据从所述驱动程序拷贝至所述应用标识信息指示的应用之后,所述方法还包括:所述应用标识信息指示的应用对所述业务数据进行处理,所述处理包括解封装标准传输层和IP层头部。
- 根据权利要求1-6中任一项所述的方法,其特征在于,所述将所述业务数据从所述驱动程序拷贝至所述应用标识信息指示的应用之后,所述方法还包括:删除所述表项。
- 根据权利要求7所述的方法,其特征在于,所述删除所述表项包括:在所述数据传输连接断开之后删除所述表项。
- 根据权利要求1-6中任一项所述的方法,其特征在于,所述方法还包括:定期删除过期表项。
- 根据权利要求1-9中任一项所述的方法,其特征在于,所述应用为数据吞吐量大的应用,或者所述应用为使用频率高的应用,或者所述应用为实时性应用。
- 根据权利要求1-10中任一项所述的方法,其特征在于,所述应用包括第一模块,所述驱动程序包括第二模块;所述将所述业务数据从所述驱动程序拷贝至所述应用标识信息指示的应用包括:将所述业务数据从所述驱动程序中的第二模块拷贝至所述应用标识信息指示的应用中的第一模块。
- 一种电子设备,其特征在于,包括:一个或多个处理器和一个或多个存储器;所述一个或多个存储器与所述一个或多个处理器耦合,所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述一个或多个处理器执行所述计算机指令时,所述电子设备执行如权利要求1-11中任一项所述第一电子设备执行的数据传输方法。
- 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-11中任一项所述第一电子设备执行的数据传输方法。
- 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-11中任一项所述第一电子设备执行的数据传输方法。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP22831295.5A EP4351107A1 (en) | 2021-06-30 | 2022-03-31 | Data transmission method and electronic device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110733685.0 | 2021-06-30 | ||
CN202110733685.0A CN115550340A (zh) | 2021-06-30 | 2021-06-30 | 一种数据传输方法和电子设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023273464A1 true WO2023273464A1 (zh) | 2023-01-05 |
Family
ID=84691137
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/084318 WO2023273464A1 (zh) | 2021-06-30 | 2022-03-31 | 一种数据传输方法和电子设备 |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP4351107A1 (zh) |
CN (1) | CN115550340A (zh) |
WO (1) | WO2023273464A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103782292A (zh) * | 2011-09-07 | 2014-05-07 | 诺基亚公司 | 在设备之间执行数据的无线内部拷贝的方法、装置和计算机程序产品 |
US20170032138A1 (en) * | 2015-07-27 | 2017-02-02 | Microsoft Technology Licensing, Llc | Automated data transfer from mobile application silos to authorized third-party applications |
CN109857545A (zh) * | 2018-12-29 | 2019-06-07 | 华为技术有限公司 | 一种数据传输方法及装置 |
CN110855610A (zh) * | 2019-09-30 | 2020-02-28 | 视联动力信息技术股份有限公司 | 一种数据包的处理方法、装置及存储介质 |
CN112416863A (zh) * | 2020-10-19 | 2021-02-26 | 网宿科技股份有限公司 | 数据存储方法及缓存服务器 |
-
2021
- 2021-06-30 CN CN202110733685.0A patent/CN115550340A/zh active Pending
-
2022
- 2022-03-31 WO PCT/CN2022/084318 patent/WO2023273464A1/zh active Application Filing
- 2022-03-31 EP EP22831295.5A patent/EP4351107A1/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103782292A (zh) * | 2011-09-07 | 2014-05-07 | 诺基亚公司 | 在设备之间执行数据的无线内部拷贝的方法、装置和计算机程序产品 |
US20170032138A1 (en) * | 2015-07-27 | 2017-02-02 | Microsoft Technology Licensing, Llc | Automated data transfer from mobile application silos to authorized third-party applications |
CN109857545A (zh) * | 2018-12-29 | 2019-06-07 | 华为技术有限公司 | 一种数据传输方法及装置 |
CN110855610A (zh) * | 2019-09-30 | 2020-02-28 | 视联动力信息技术股份有限公司 | 一种数据包的处理方法、装置及存储介质 |
CN112416863A (zh) * | 2020-10-19 | 2021-02-26 | 网宿科技股份有限公司 | 数据存储方法及缓存服务器 |
Also Published As
Publication number | Publication date |
---|---|
CN115550340A (zh) | 2022-12-30 |
EP4351107A1 (en) | 2024-04-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021052178A1 (zh) | 一种Wi-Fi连接方法及设备 | |
CN111225042B (zh) | 数据传输的方法、装置、计算机设备以及存储介质 | |
WO2021175214A1 (zh) | 一种投屏连接控制方法及电子设备 | |
US20230422154A1 (en) | Method for using cellular communication function, and related apparatus and system | |
WO2016112728A1 (zh) | 一种数据传输的方法、网络服务器、用户终端及系统 | |
WO2021098533A1 (zh) | 一种连接建立方法及终端设备 | |
WO2022068513A1 (zh) | 无线通信方法和终端设备 | |
WO2021093855A1 (zh) | 一种移动设备管理方法及设备 | |
WO2021147660A1 (zh) | 一种数据传输方法及设备 | |
WO2022228011A1 (zh) | Quic数据传输方法、装置、客户端及服务端 | |
WO2022048500A1 (zh) | 一种显示方法及设备 | |
CN110602733B (zh) | 应用提速、带宽管理方法、装置、终端及存储介质 | |
WO2023065931A1 (zh) | 一种电子设备的充电方法及电子设备 | |
WO2022143508A1 (zh) | 一种近场中传输数据的方法、设备及系统 | |
WO2021179990A1 (zh) | 一种应用服务器的访问方法及终端 | |
WO2024087900A1 (zh) | 一种摄像头切换方法及相关电子设备 | |
WO2021227942A1 (zh) | 一种分享信息的方法、电子设备和系统 | |
US20230269791A1 (en) | Networking Method, Networking System, and Electronic Device | |
WO2023273464A1 (zh) | 一种数据传输方法和电子设备 | |
WO2021218544A1 (zh) | 一种提供无线上网的系统、方法及电子设备 | |
WO2022001192A1 (zh) | 应用数据的传输方法、终端及系统 | |
WO2024088173A1 (zh) | 组播通信方法及相关装置 | |
WO2023051204A1 (zh) | 跨设备连接方法、电子设备及存储介质 | |
WO2023051229A1 (zh) | 用于标识设备的方法、装置、电子设备和介质 | |
WO2022267739A1 (zh) | 一种连接探测方法、客户端与服务器 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22831295 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2022831295 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2022831295 Country of ref document: EP Effective date: 20231215 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 18575603 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |