Data transmission method for electronic device, and electronic device and storage medium
By creating virtual bridge network cards in electronic devices and configuring network information for wireless terminal devices, the problems of complex data transmission connections and interference in the prior art are solved, and the effects of simplifying connection operations, reducing hardware costs and improving data transmission stability are achieved.
Patent Information
- Application Number
- PCT/CN2023/135660
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-06-05
AI Technical Summary
In the prior art, when electronic devices transmit data during multi-person communication activities, the connection operation is complicated, the continuity of data transmission during data transmission is interfered with, and the hardware cost is high.
By creating a virtual bridged network card in the electronic device, taking over the point-to-point group main network card and the connection network card, and configuring the network information of the wireless terminal device to make it in the same network segment as the bridged network card, it realizes rapid data transmission between the wireless terminal device and any system module.
It simplifies the operation of device connection during data transmission, reduces hardware costs, improves the continuity and connection stability of data transmission, and reduces the user's operating needs for network configuration.
Smart Images

Figure CN2023135660_05062025_PF_FP_ABST
Abstract
Description
Data transmission method for electronic device, electronic device and storage medium Technical Field
[0001] The embodiments of the present application relate to the field of communication technologies, and in particular to a data transmission method of an electronic device, an electronic device, and a storage medium. Background Art
[0002] With the continuous development of electronic technology, various forms of electronic devices continue to emerge and are applied to various fields of social production activities. For example, in scenarios used for multi-person communication, such as electronic classrooms, a larger all-in-one machine is usually set up to present the focus information for multi-person communication. An all-in-one machine is usually equipped with multiple system modules. Multiple system modules using the same or different operating systems are highly independent and coordinated, allowing users to use the all-in-one machine to realize various file display, handwriting input, on-site data collection and other functions required for multi-person communication. Participants in multi-person communication can realize the digital presentation, digital recording and digital transmission of various information in the multi-person communication process, effectively improving the efficiency of multi-person communication.
[0003] The inventor used the existing all-in-one machine in the process of multi-person communication activities. When connecting the wireless terminal device and the all-in-one machine for data transmission, he found that under the external form of the all-in-one machine as a whole device, there are multiple independent system modules inside it. The wireless terminal device needs to establish a connection with the actual working system module to complete the data transmission. The actual working system module of the all-in-one machine often switches. In order to ensure that multiple system modules can transmit data with the wireless terminal device, a high hardware cost is required, and multiple switching operations are required. The connection operation during the data transmission process is complicated, and the continuity of the transmitted data during the data transmission process is greatly disturbed.
[0004] Summary of the Invention
[0005] The present application provides a data transmission method for an electronic device, an electronic device, and a storage medium to solve the technical problems in the existing data transmission process, such as the complex connection operation and the large interference to the continuity of the transmitted data during the data transmission process.
[0006] In a first aspect, an embodiment of the present application provides a data transmission method for an electronic device. The data transmission method is applied to a first system module, the first system module including a first physical wireless network card and a first connection network card, including:
[0007] Enumerate the first physical wireless network card as a point-to-point group master network card and a wireless terminal network card;
[0008] When the second system module is detected to be connected, a virtual bridge network card is created, and the point-to-point group master network card and the first connection network card are added to the bridge network card;
[0009] Configuring the network information of the bridge network card and the network information of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment, and the gateway address and DNS address of the bridge network card are the same as the IP address of the second system module; wherein the network information includes the IP address, DNS address, and gateway address;
[0010] When establishing a wireless connection link with a wireless terminal device through a point-to-point group master network card, configure the network information of the wireless terminal device so that the IP address of the wireless terminal device and the IP address of the bridge network card are in the same network segment, and the gateway address of the wireless terminal device is the same as the IP address of the second system module;
[0011] When the first system module operates on the first display channel, it receives a first network data packet with a destination address being the first destination address from the wireless terminal device via the wireless connection link, and responds to and processes the first network data packet; wherein the first system module supports the first display channel and the second display channel, the first display channel is used for displaying the first system module, and the second display channel is used for displaying the second system module; and the first destination address is the IP address of the bridged network card;
[0012] When the first system module operates in the second display channel, it receives a second network data packet with a destination address of a second destination address from the wireless terminal device via the wireless connection link, and forwards the second network data packet to the second system module via the first connection network card for response processing; wherein the second destination address is the IP address of the second system module;
[0013] When the first system module operates on the first display channel or the second display channel, it receives a third network data packet with a target address of a third target address from the wireless terminal device through the wireless connection link, and forwards the third network data packet to the second system module through the first connection network card for processing, so that the second system module sends the third network data packet to the Internet to realize communication between the wireless terminal device and the Internet; wherein, the third target address is used to access the Internet.
[0014] The network data packet processing process based on the display channel can enable users to perform screen projection or Internet access according to their own needs without making any adjustments in the operation link when the display channel is switched. The first system module can perform P2P screen projection or accurate response to accessing the Internet through a PC based on the processing process in the embodiment of the present application, reducing the user's operations on network configuration during use and improving the convenience of users using wireless terminal devices in an interactive tablet environment.
[0015] As described above, the network data packet processing process based on the display channel can enable users to perform screen projection or Internet access operations according to their own needs without making any adjustments in the operation link when the display channel is switched. The first system module can perform P2P screen projection or access the Internet through a PC based on the processing process in the embodiment of the present application, thereby reducing the user's operations on network configuration during use and improving the convenience of users in using wireless terminal devices in an interactive tablet environment.
[0016] The data transmission method further includes:
[0017] When the first system module switches between the first display channel and the second display channel, a notification message is sent to the wireless terminal device through the wireless connection link, so that the wireless terminal device changes the target address of the network data packet it sends for screen projection.
[0018] The above ensures the correspondence between the network data packet and the current display channel, and the switching of the display channel does not affect the normal transmission of the network data packet used for screen projection, the response processing in the corresponding system module, and the normal display on the display screen.
[0019] When the first system module operates in the first display channel and receives first network data with a target address being a first target address from a wireless terminal device through a wireless connection link, responding to the network data packet includes:
[0020] When a first network data packet with a target address being a first target address is received from a wireless terminal device through a wireless connection link, a screen projection display process is started;
[0021] The projection screen is obtained by parsing the first network data packet, and the projection screen is displayed through the projection screen display process.
[0022] The above makes it easy to utilize the rich application ecosystem based on touch screens and obtain a richer secondary operation experience based on the projection display.
[0023] The step of forwarding the second network data packet to the second system module through the first connection network card for response processing includes:
[0024] The second network data packet is forwarded to the second system module through the first connection network card, so that the second system module displays the corresponding projection screen according to the second network data packet.
[0025] Among them, the wireless terminal network card is configured to STA working mode;
[0026] Correspondingly, after enumerating the first physical wireless network card as the point-to-point group master network card and the wireless terminal network card, the method further includes:
[0027] When the access of the second system module is not detected, the network information of the primary network card of the point-to-point group is configured;
[0028] Establish a NAT connection between the primary network card of the point-to-point group and the network card of the wireless terminal.
[0029] After establishing a NAT connection between the point-to-point group master network card and the wireless terminal network card, the following steps are also included:
[0030] When establishing a wireless connection link with a wireless terminal device through the peer-to-peer group master network card, configure the network information of the wireless terminal device so that the IP address of the wireless terminal device and the IP address of the peer-to-peer group master network card are in the same network segment;
[0031] Accordingly, the data transmission method further includes:
[0032] When a network data packet with the target address being the IP address of the wireless terminal network card is received from the wireless terminal device via the wireless connection link, the network data packet is sent to the wireless terminal network card via the NAT connection, so that the wireless terminal device can access the Internet through the wireless terminal network card.
[0033] As described above, based on establishing a NAT connection between the point-to-point group master network card and the wireless terminal network card, the wireless terminal device can freely project the screen with the first system module and access the external network.
[0034] Configuring the network information of the bridge network card and the network information of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment, and the gateway address and DNS address of the bridge network card are the same as the IP address of the second system module includes:
[0035] Configure the IP address of the bridge network card;
[0036] According to the IP address of the bridge network card, configure the IP address of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment;
[0037] The IP address of the bridge network card of the second system module is set to the gateway address and DNS address of the bridge network card.
[0038] As described above, when the second system module has the ability to access the Internet, the second system module can serve as a gateway for the wireless terminal device, allowing the wireless terminal device to access the Internet through the link between the bridge network card and the network card of the second system module.
[0039] The first system module is arranged on an integrated circuit board, and the second system module is a pluggable module.
[0040] In the above, the integrated first system module supports the electronic device to implement basic device functions, and the pluggable second system module implements flexible expansion of the electronic device functions.
[0041] Among them, the first system module is an Android system module, and the second system module is a Windows system module.
[0042] The two different system modules mentioned above can comprehensively utilize their respective application advantages to meet users' needs in various scenarios.
[0043] The network information of the bridge network card and the second system module is configured each time according to the pre-stored record information.
[0044] As described above, the wireless terminal device only needs to send data according to the same pre-stored address after confirming the connected all-in-one machine, and does not need to receive network information of other nodes during the process of accessing the network.
[0045] In a second aspect, an embodiment of the present application provides a data transmission method for an electronic device, the data transmission method being applied to a first system module, the first system module including a first physical wireless network card and a first connection network card, the first system module being connected to a second system module via the first connection network card, including:
[0046] Enumerate the first physical wireless network card as a point-to-point group master network card and a wireless terminal network card;
[0047] When the second system module is detected to be connected, a virtual bridge network card is created, and the point-to-point group master network card and the first connection network card are added to the bridge network card;
[0048] Configure the network information of the bridge network card and the network information of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment, and the gateway address and DNS address of the bridge network card are the same as the IP address of the second system module;
[0049] When establishing a wireless connection link with a wireless terminal device through a point-to-point group master network card, configure the network information of the wireless terminal device so that the IP address of the wireless terminal device and the IP address of the bridge network card are in the same network segment, and the gateway address of the wireless terminal device is the same as the IP address of the second system module;
[0050] When a network data packet with a destination address being the IP address of the bridge network card is received from the wireless terminal device via the wireless connection link, the network data packet is parsed and processed;
[0051] When a network data packet whose destination address is not the IP address of the bridge network card is received from the wireless terminal device via the wireless connection link, the network data packet is forwarded to the second system module via the first connection network card for processing;
[0052] The network information includes IP address, DNS address and gateway address.
[0053] In the above, by interrupting the independent network configuration processes of the two system modules at power-on, the virtual bridge network card in the first system module takes over the point-to-point group master network card enumerated by the first system module and the first connection network card connected to the second system module, and configures the IP address of the second system module to be the same as the gateway address of the bridge network card. When a wireless connection link is established with a wireless terminal device through the point-to-point group master network card, the wireless terminal device is configured to the same network segment, and the gateway address is configured to be the same as the IP address of the second system module. When the wireless terminal device sends a network data packet, the user can directly select the sending target. When the bridge network card receives a network data packet with the target address being the IP address of the bridge network card, the first system module directly performs parsing and processing. Its network data packets are directly forwarded to the second system module for processing based on the general forwarding process of the gateway according to the gateway configuration. The network settings and management of the first system module and the second system module are based on the virtual bridge network card. After the wireless terminal device establishes a wireless connection link with the first system module, it can quickly send network data packets to any system module. This solution only needs to set up a wireless network card in the electronic device to meet the needs of the wireless terminal device to switch the LAN transmission between any system module at any time, and at the same time meet the needs of the wireless terminal device to access the Internet through the electronic device, simplifying the connection operation of repeated device connection during data transmission, with low hardware cost, simple and convenient operation, and improved data continuity during data transmission, with high connection stability.
[0054] When a network data packet whose destination address is not the IP address of the bridge network card is received from the wireless terminal device through the wireless connection link, the network data packet is forwarded to the second system module through the first connection network card for processing, including:
[0055] When a network data packet with a destination address being the IP address of the second system module is received from the wireless terminal device via the wireless connection link, the network data packet is forwarded to the second system module via the first connection network card for processing, so that the second system module displays the corresponding projection screen according to the network data packet;
[0056] When a network data packet whose target address is not the IP address of the second system module is received from the wireless terminal device through the wireless connection link, the network data packet is forwarded to the second system module through the first connection network card for processing, so that the second system module sends the network data packet to the external network to realize communication between the wireless terminal device and the Internet.
[0057] As described above, by processing different network data packets in the second system module, screen projection from the wireless terminal device can be realized in the second system module, and the wireless terminal device can be supported to access the Internet.
[0058] When network data with a target address being the IP address of the bridge network card is received from the wireless terminal device via the wireless connection link, the network data packet is parsed and processed, including:
[0059] When a network data packet with the target address being the IP address of the bridge network card is received from the wireless terminal device via the wireless connection link, the screen projection display process is started;
[0060] The projection screen is obtained from the network data packet analysis, and the projection screen is displayed through the projection screen display process.
[0061] The above makes it easy to utilize the rich application ecosystem based on touch screens and obtain a richer secondary operation experience based on the projection display.
[0062] Among them, the wireless terminal network card is configured to STA working mode;
[0063] Correspondingly, after enumerating the first physical wireless network card as the point-to-point group master network card and the wireless terminal network card, the method further includes:
[0064] When no access to the second system module is detected, configuring network information of the primary network card of the point-to-point group;
[0065] Establish a NAT connection between the primary network card of the point-to-point group and the network card of the wireless terminal.
[0066] After establishing a NAT connection between the point-to-point group master network card and the wireless terminal network card, the following steps are also included:
[0067] When establishing a wireless connection link with a wireless terminal device through the peer-to-peer group master network card, configure the network information of the wireless terminal device so that the IP address of the wireless terminal device and the IP address of the peer-to-peer group master network card are in the same network segment;
[0068] Accordingly, the data transmission method further includes:
[0069] When a network data packet with the target address being the IP address of the wireless terminal network card is received from the wireless terminal device via the wireless connection link, the network data packet is sent to the wireless terminal network card via the NAT connection, so that the wireless terminal device can access the Internet through the wireless terminal network card.
[0070] As described above, based on establishing a NAT connection between the point-to-point group master network card and the wireless terminal network card, the wireless terminal device can freely project the screen with the first system module and access the external network.
[0071] Configuring the network information of the bridge network card and the network information of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment, and the gateway address and DNS address of the bridge network card are the same as the IP address of the second system module includes:
[0072] Configure the IP address of the bridge network card;
[0073] According to the IP address of the bridge network card, configure the IP address of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment;
[0074] The IP address of the bridge network card of the second system module is set to the gateway address and DNS address of the bridge network card.
[0075] As described above, when the second system module has the ability to access the Internet, the second system module can serve as a gateway for the wireless terminal device, allowing the wireless terminal device to access the Internet through the link between the bridge network card and the network card of the second system module.
[0076] Among them, the first system module is an Android system module, and the second system module is a Windows system module.
[0077] The two different system modules can comprehensively utilize their respective application advantages to meet the needs of users in various scenarios. Among them, the network information of the bridge network card and the second system module is configured each time according to the pre-stored record information.
[0078] As described above, the wireless terminal device only needs to send data according to the same pre-stored address after confirming the connected all-in-one machine, and does not need to receive network information of other nodes during the process of accessing the network.
[0079] In a third aspect, an embodiment of the present application provides a data transmission method for an electronic device. The data transmission method is applied to a wireless terminal device. The wireless terminal device is wirelessly connected to an electronic device. The electronic device includes a first system module and a second system module. The data transmission method includes:
[0080] When establishing a wireless connection link with the electronic device, obtaining configuration network information provided by a virtual bridge network card created by a first system module in the electronic device, wherein the IP address in the configuration network information and the IP address of the bridge network card are in the same network segment, and the gateway address in the configuration network information is the same as the gateway address of the bridge network card and the IP address of the second system module in the electronic device;
[0081] Receiving a target selection operation on a projection target selection window, where the projection target selection window displays a first selection control corresponding to the first system module and a second selection control corresponding to the second system module;
[0082] According to the target selection operation, the current display screen is obtained as the projection screen, and a network data packet with the IP address of the first system module or the second system module as the target address is generated;
[0083] Send network data packets to the bridge network card through the wireless connection link.
[0084] The data transmission method further includes:
[0085] receiving a network access instruction for accessing the Internet;
[0086] Get the target IP address of the network access instruction;
[0087] According to the network access instruction, a network data packet is generated with the target IP address as the target address for requesting access to the Internet.
[0088] The IP addresses of the first system module and the second system module are obtained from the first system module.
[0089] The IP addresses of the first system module and the second system module are pre-recorded.
[0090] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising:
[0091] one or more processors;
[0092] a memory for storing one or more computer programs;
[0093] When one or more computer programs are executed by one or more processors, the electronic device implements the data transmission method of the first aspect, the second aspect, or the third aspect.
[0094] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data transmission method of the first aspect, the second aspect, or the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0096] FIG1 is a flow chart of a data transmission method provided by an embodiment of the present application;
[0097] FIG2 is a schematic diagram of the overall effect of an all-in-one machine provided by an embodiment of the present application;
[0098] FIG3 is a schematic diagram of a network architecture when an all-in-one machine and a wireless terminal device are connected in the related art;
[0099] FIG4 is a schematic diagram of a network architecture when an all-in-one machine and a wireless terminal device are connected in a data transmission method provided in an embodiment of the present application;
[0100] FIG5 is a flow chart of another data transmission method provided by an embodiment of the present application;
[0101] FIG6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0102] To make the objectives, technical solutions, and advantages of this application more apparent, embodiments of the present application will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are intended to explain this application, not to limit it. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions of the structure relevant to this application, not all of it.
[0103] It should be noted that due to space limitations, this application specification does not enumerate all optional implementation methods. After reading this application specification, those skilled in the art should be able to understand that as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method.
[0104] Each embodiment is described in detail below.
[0105] In an electronic multi-person communication scenario, a relatively large all-in-one machine 10 as shown in FIG2 is usually provided to present focus information for multi-person communication. The all-in-one machine 10 is equipped with multiple microphones, speakers, cameras and other equipment to assist in information collection and output. The all-in-one machine 10 is also usually configured with multiple system modules. Multiple system modules using the same or different operating systems are highly independent and coordinated to operate, so that users can implement various functions required for multi-person communication in the all-in-one machine, effectively improving the efficiency of multi-person communication. It should be understood that the all-in-one machine 10 is only a naming definition for such a device, which is used to carry the system modules provided in the embodiments of the present application. Such a device can also be named an interactive tablet, a conference tablet, an interactive smart tablet, a conference board, an electronic device, etc.
[0106] In existing all-in-one computers, a common data transmission method during multi-person communication activities is to connect a wireless terminal device and the all-in-one computer for data transmission. However, under the external form of an all-in-one computer as a whole device, multiple independent system modules are set up inside. The actual data transmission requires establishing a connection with the corresponding system module. When the data transmission target changes, it is necessary to switch the connected system module on the wireless terminal device. For example, when the all-in-one computer starts working, it runs the first system module for data interaction, and receives the data transmitted by the wireless terminal device through the first system module and then displays it. However, due to the different applications installed in different system modules of the all-in-one computer or the different built-in file resources, the all-in-one computer needs to frequently switch the system module according to the user's operation before displaying it during use. When the all-in-one computer switches to the second system module for data interaction, at this time, if the wireless terminal device retransmits data to the all-in-one computer, the second system module receives the relevant data and then displays it. In the existing solution, the wireless terminal device needs to switch the connected system module to perform data transmission normally. Data transmission between wireless terminal devices (such as mobile phones, laptops, tablets, etc.) and system modules in all-in-one computers is mostly based on local area network transmission, that is, the WiFi of the wireless terminal device and the all-in-one computer must be connected to the same WiFi hotspot, or the all-in-one computer itself can be used as a WiFi hotspot for the wireless terminal device to connect. In this way, when the wireless terminal device is accessing the Internet and performing local area network data transmission, it is necessary to switch the WiFi working mode, and it is impossible to achieve both Internet access and local area network data transmission functions at the same time.
[0107] Alternatively, wireless terminal devices can establish a point-to-point connection with the all-in-one device via WiFi Direct or AWDL (Apple Wireless Direct Link) without disconnecting from the existing WiFi hotspot, allowing them to simultaneously access the Internet and transmit data to and from the all-in-one device. However, this point-to-point connection method can only connect to the wireless network card corresponding to one system module. Multiple system modules require multiple wireless network cards to achieve point-to-point direct connections between each device and the wireless terminal device.
[0108] The point-to-point direct connection process can be seen in Figure 3. In Figure 3, using WiFi Direct point-to-point direct connection as an example, all-in-one device 10 is provided with a first system module 11 and a second system module 12, which use different operating systems. First system module 11 is exemplarily an Android module, and second system module 12 is exemplarily a Windows module. The first system module is provided on an integrated circuit board, while second system module 12 is an OPS (Open Pluggable Specification) system module, which is a pluggable module. The integrated first system module supports the electronic device to implement basic device functions, while the pluggable second system module enables flexible expansion of the electronic device's functions. The all-in-one device 10 is configured with a first network card 111 and a first WiFi module 112 for the first system module 11, and a second network card 121 and a second WiFi module 122 for the second system module 12. The first network card 111 and the second network card 121 are used to establish a communication link dedicated to the first system module 11 and the second system module 12, achieving overall coordinated control of the two system modules within the all-in-one device 10 and presenting an integrated interactive effect of a set of operating systems to the outside. The communication link between the first system module 11 and the second system module 12 and the communication link between the all-in-one device and the wireless terminal device 20 belong to different network segments, such as the 192.168.153.xx and 192.168.154.xx segments shown in Figure 3. The first WiFi module 112 is used for Internet communication between the first system module 11 and devices outside the all-in-one device. The second WiFi module 122 and other physical network cards (such as the Internet network card shown in Figure 3) are used for Internet communication between the second system module 12 and devices outside the all-in-one device. The wireless terminal device 20 (such as various smart phones) can establish a communication connection with the all-in-one machine 10 through various wireless methods, but the all-in-one machine 10 is an overall device form. It is the system module that actually controls the connection process and the data processing process based on the connection. The wireless terminal device 20 can directly connect to the WiFi hotspot provided by the system module.
[0109] For example, in Figure 3, the first WiFi module 112 in the first system module 11 provides a WiFi hotspot. The wireless terminal device 20 can establish a connection with the first system module 11 via the third WiFi module 21, forming the communication link shown in Figure 1, thereby accessing the internet via communication link 1. The wireless terminal device 20 can also establish WiFi Direct point-to-point connections with the first system module 11 and the second system module 12 via WiFi-Direct 22, forming communication links shown in Figures 2 and 3. Local area network data transmission can be performed with the two system modules in the all-in-one device 10 via the WiFi Direct point-to-point connections. Therefore, this approach can meet the requirements of the wireless terminal device 20 for simultaneous internet access and local area network data transmission. However, the above communication links 2 and 3 cannot be maintained simultaneously. When the main operating system module of the all-in-one device 10 switches between the first system module 11 and the second system module 12, the wireless terminal device 20 needs to disconnect the WiFi Direct point-to-point connection with the system module before the switch and re-establish the WiFi Direct point-to-point connection with the system module after the switch. In the solution shown in Figure 3, when there are multiple system modules, a corresponding wireless network card must be set up for each system module. This not only increases the hardware cost but also requires the development of each wireless network card, which is a huge development workload. Furthermore, it is difficult to fully synchronize information between the two wireless network cards, which may lead to connection stability issues.
[0110] Another solution is to configure the all-in-one device 10 with a wireless network card that supports point-to-point direct connections. This wireless network card switches between active system modules as needed. For example, in FIG3 , when switching between the first system module 11 and the second system module 12, the wireless network card also switches to the second system module 12. While this approach can save hardware costs, the wireless network card requires a period of waiting after the switch, reinitialization, and connection to the switched system module. This period of time, as the wireless network card needs to restart and become ready, can affect the user's connection experience. Furthermore, external devices that were previously connected to the all-in-one device may be disconnected due to the wireless network card being swapped in and out, making them unusable. This means that when the all-in-one device 10 switches system modules, the user needs to reconnect the external device to the switched system module. This means that the all-in-one device 10 is repeatedly having to connect to external devices, which is complex and inefficient.
[0111] Generally speaking, in the existing process of connecting wireless terminal devices and all-in-one machines for data transmission, when the data transmission target changes, it is necessary to operate the wireless terminal device to switch the connected system module. The connection operation during the data transmission process is complicated and the continuity of the transmitted data is greatly disturbed.
[0112] Based on the technical problems existing in the prior art, the solution of the embodiment of the present application is proposed. During the network configuration process, the virtual bridge network card in the first system module takes over the point-to-point group master network card enumerated by the first system module and the first connection network card connected to the second system module, and configures the IP address of the second system module to be the same as the gateway address of the bridge network card. When a wireless connection link is established with the wireless terminal device through the point-to-point group master network card, the wireless terminal device is configured to the same network segment, and the gateway address is configured to be the same as the IP address of the second system module. When the wireless terminal device sends a network data packet, the user can directly select the sending target. When the bridge network card receives a network data packet with the target address being the IP address of the bridge network card, it is directly parsed and processed by the first system module. Other network data packets are based on According to the gateway configuration, the data is directly forwarded to the second system module for processing according to the general forwarding process of the gateway. The network settings and management of the first system module and the second system module are based on the virtual bridge network card. After the wireless terminal device establishes a wireless connection link with the first system module, it can quickly send network data packets to any system module. This solution only requires setting up a wireless network card in the electronic device to meet the needs of the wireless terminal device to switch the LAN transmission between any system module at any time, and at the same time meet the needs of the wireless terminal device to access the Internet through the electronic device, simplifying the connection operation of repeatedly connecting the device during the data transmission process, with low hardware cost, simple and convenient operation, and improved data continuity during the data transmission process, with high connection stability.
[0113] FIG1 is a flowchart of a data transmission method provided by an embodiment of the present application. As shown in FIG1 , the data transmission method includes, but is not limited to, steps S110 to S160. While describing the data transmission method from the perspective of the first system module, for greater clarity, the corresponding implementation process performed by the second system module and the wireless terminal device will be described.
[0114] Step S110: enumerate the first physical wireless network card as a point-to-point group master network card and a wireless terminal network card.
[0115] The first system module includes a first physical wireless network card and a first connection network card, and the first system module is connected to the second system module via the first connection network card. The first physical wireless network card in the first system module is enumerated as a point-to-point group master network card and a wireless terminal network card, that is, one physical wireless network card implements wireless transmission requirements in two modes. The network node identity of the first physical wireless network card when implementing wireless transmission requirements in two modes is virtualized as a point-to-point group master network card and a wireless terminal network card at the data level, wherein the point-to-point group master network card is used to establish a wireless connection link with other wireless terminal devices, and the wireless terminal network card operates in STA working mode and is used to enable the first system module to connect to an external WiFi hotspot. It should be understood that the point-to-point group master network card and the wireless terminal network card are used to implement P2P communication and STA communication, respectively, based on the definitions of the working mode and working state configuration of the physical wireless network card in the relevant technology. When the specific corresponding working modes and working states are the same, other definitions such as point-to-point group master port and wireless terminal port have the same meaning.
[0116] Point-to-point direct connection refers to the point-to-point connection between devices in a WiFi wireless network based on the Wi-Fi Direct standard without the need for a wireless router. In a point-to-point direct connection based on the Wi-Fi Direct standard, the two devices are not completely equal node roles, but one is the P2P Group Owner, that is, the point-to-point group owner (also known as GO). In the embodiment of the present application, the wireless network card in the device that serves as the point-to-point group owner is called the point-to-point group owner network card, also known as the P2P-GO network card, which works in the P2P group owner mode and can support wireless terminal devices to connect via Wi-Fi Direct. It can also be used as a hotspot module to support wireless terminal devices to connect via the station mode; the other is a P2P Group Client, that is, a point-to-point client (also known as GC) relative to the point-to-point group owner network card. The solution for achieving point-to-point direct connection in the related art may be that multiple devices negotiate and confirm the point-to-point group owner. In the embodiment of the present application, the management of the local area network is realized based on the bridge network card, which simplifies the development and design of the wireless terminal device, and the first physical wireless network card in the first system module is directly enumerated as the point-to-point group owner network card.
[0117] Communication between the first system module and the second system module can be achieved through wired or wireless communication. Wired communication can be achieved through a physical wired network card interface or a bus-based virtual network card interface. A bus-based virtual network card interface can be, for example, a USB (Universal Serial Bus)-based virtual network card interface. A wireless communication interface can be, for example, a second physical wireless network card interface. The second physical wireless network card interface is derived from a second physical wireless network card. The second physical wireless network card can be identical to the first physical wireless network card. The two differ primarily in their connection objects and operational links.
[0118] Step S120: When it is detected that the second system module is connected, a virtual bridge network card is created, and the point-to-point group master network card and the first connection network card are added to the bridge network card.
[0119] An all-in-one computer typically has two system modules. The system module can be an OPS microcomputer, an open, pluggable computer module that connects to the entire system via a plug-in interface. The power supply can be an external power source or the power provided by the all-in-one system. The operating systems corresponding to the system modules can be the same or different. In specific implementations, to provide more comprehensive functionality and integrate the advantages of various operating systems, system modules with different operating systems are often selected. The exemplary network architecture shown in Figure 4 employs different operating systems.
[0120] In the exemplary network architecture shown in FIG4 , the first system module 11 is an Android system module and the second system module 12 is a Windows system module. It should be understood that when two different system modules are used, any one of the two system modules can be used as the first system module 11 and the other as the second system module 12. It should be understood that the hardware configuration of the all-in-one machine 10 and the first system module 11 and the second system module 12 are combined to meet various hardware conditions for the normal operation of the first system module 11 and the second system module 12, especially the necessary wired and wireless network hardware. The hardware used by the system modules in the all-in-one machine 10 also provides corresponding interfaces. After the first system module 11 and the second system module 12 are inserted into the all-in-one machine 10, they can establish a connection through the interface and normally drive the corresponding hardware to implement the corresponding functions. The hardware layout and connection of various devices provided by the design concept of the system module can adopt the implementation methods in the relevant technology to realize the electrical signal communication between the first system module and the second system module, such as USB interface or serial port for basic data communication, etc., and the specific hardware configuration, connection interface and other details are not limited here. In addition, in the embodiment of the present application, the port in the first system module used to realize network communication with the second system module is defined as the first connection network card. The first system module only needs to continue establishing the local area network based on the bridge network card if it detects the connection of the second system module through the electrical signal interface. Therefore, the virtual bridge network card is created only when the connection of the second system module is detected. Specifically, the detection of the connection of the second system module can be through the electrical signal interface between the first and second system modules, such as a USB interface or serial port, or a specific pin in the electrical signal interface, which is not limited in this application.
[0121] During the construction process,
[0122] When the all-in-one device is powered on, the first system module creates a virtual bridged network card. This is equivalent to creating a virtual independent host within the host, with the first system module acting as the host. The first system module configures the network information for this independent host (i.e., the bridged network card). The network information configured in the bridged network card is the network information of the first system module, which is equivalent to the first system module communicating with other network nodes through the bridged network card. Correspondingly, after configuring the gateway and DNS (Domain Name System) in the network information, the bridged network card can manage the local area network and route access to the internet.
[0123] For the bridge network card, it only has a logical interface. The interfaces of the first connection network card and the point-to-point group master network card are equivalent to physical interfaces. After adding the interfaces of the first connection network card and the point-to-point group master network card to the bridge network card, it is equivalent to the first connection network card and the point-to-point group master network card becoming part of the bridge network card, that is, the first connection network card, the point-to-point group master network card and the bridge network card are called a complete bridge device, and the first connection network card and the point-to-point group master network card no longer need IP addresses.
[0124] During the specific implementation process, it is also possible that only one system module is installed inside the all-in-one machine. In this case, it is impossible to detect the second system module through the first connection network card. The subsequent processing process can be terminated accordingly, the virtual bridge network card can be deleted, and the network initialization process of the system module in the all-in-one machine in the relevant technology can be followed.
[0125] In the case where the second system module is not detected, the enumeration of the first physical wireless network card in step S110 can also be maintained, and the wireless terminal network card can be configured to STA working mode; after the first physical wireless network card is enumerated as the point-to-point group master network card and the wireless terminal network card, the network information of the point-to-point group master network card can also be configured; and a NAT (Network Address Translation) connection is established between the point-to-point group master network card and the wireless terminal network card. This is equivalent to achieving network connection of the all-in-one machine through the first system module on the basis of continuing to maintain the initialization state in step S110. This avoids the rollback of the initialization process and improves the speed of establishing the network connection.
[0126] After establishing a NAT connection between the point-to-point group main network card and the wireless terminal network card, when establishing a wireless connection link with the wireless terminal device through the point-to-point group main network card, the network information of the wireless terminal device is configured so that the IP address of the wireless terminal device and the IP address of the point-to-point group main network card are in the same network segment, and a network data packet with a target address of the IP address of the wireless terminal network card is received from the wireless terminal device through the wireless connection link, and the network data packet is sent to the wireless terminal network card through the NAT connection, so that the wireless terminal device can access the Internet through the wireless terminal network card. On the basis of establishing a NAT connection between the point-to-point group main network card and the wireless terminal network card, the wireless terminal device can freely project the screen with the first system module and access the external network. The basic routing strategy of the wireless terminal device for sending network data packets based on network information is generally the same as the routing strategy for sending network data packets when the second system module is detected. The main difference is that all network data packets are processed by the first system module, which will not be repeated here.
[0127] Step S130: Configure the network information of the bridge network card and the network information of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment, and the gateway address and DNS address of the bridge network card are the same as the IP address of the second system module.
[0128] To ensure normal data transmission within the local area network (LAN) built using the bridged network card and to ensure communication with the external network via a fixed link, the network information of the bridged network card and the second system module is configured so that the IP address of the second system module and the IP address of the bridged network card are in the same network segment. Therefore, the bridged network card can achieve LAN communication with the second system module. Furthermore, the gateway address and DNS address of the bridged network card are the same as the IP address of the second system module. Therefore, when the second system module has the ability to access the Internet, the second system module can serve as a gateway for wireless terminal devices, allowing wireless terminal devices to access the Internet through the link between the bridged network card and the network card of the second system module. During specific configuration, the network information of the bridged network card and the second system module is configured each time according to pre-stored record information. That is, all LANs built using the bridged network card within the integrated device independently use the same network segment, and the same network information corresponding to the same network node is configured identically. In this way, wireless terminal devices only need to send data according to the same pre-stored address after confirming the connected integrated device, without having to receive network information from other nodes during the network access process. Alternatively, the network information of the bridge network card and the second system module may be randomly configured each time, and the configuration process may follow the configuration requirements described above, and the wireless terminal device may obtain the corresponding target address during the access process. The specific configuration process may also include: configuring the IP address of the bridge network card. Specifically, the IP address of the bridge network card may be configured as the IP address of the primary network card of the point-to-point group when the first system module is not connected to the second system module; then, based on the IP address of the bridge network card, configuring the IP address of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment; and setting the IP address of the bridge network card of the second system module to the gateway address and DNS address of the bridge network card.
[0129] The network information configured for the bridge network card, the second system module, and subsequent access to the wireless terminal device all include IP addresses, DNS addresses, and gateway addresses. When implementing the embodiments of the present application, there are strictly limited configuration principles for the configuration of the network information of the network nodes. The network connection established based on the configuration principles is used for the subsequent sending of network data packets, which is the basis for achieving the established design effect of this solution.
[0130] Step S140: When establishing a wireless connection link with the wireless terminal device through the point-to-point group master network card, configure the network information of the wireless terminal device so that the IP address of the wireless terminal device and the IP address of the bridge network card are in the same network segment, and the gateway address of the wireless terminal device is the same as the IP address of the second system module.
[0131] In the embodiment of the present application, role negotiation is not performed during the point-to-point direct connection process. Instead, the wireless terminal device is directly used as a point-to-point client to establish a connection. The configuration process in the specific connection is basically the same as the configuration principles in the relevant access local area network. Only under this configuration principle can the subsequent data transmission process be realized, and the specific explanation will not be given.
[0132] Step S150: When a network data packet with a target address being the IP address of the bridge network card is received from the wireless terminal device via the wireless connection link, the network data packet is parsed and processed.
[0133] Step S160: When a network data packet whose destination address is not the IP address of the bridge network card is received from the wireless terminal device via the wireless connection link, the network data packet is forwarded to the second system module via the first connection network card for processing.
[0134] Both step S150 and step S160 belong to the process of transmitting network data packets based on the network connection established through steps S110 to S140, wherein step S150 and step S160 describe the processes of two different types of network data packets.
[0135] After the network connection is established, the network management of the local area network is realized based on the network information configured in the previous text, and the relationship between the first system module and other network nodes is communicated through the bridge network card. For the network data packets received from the wireless terminal device, the bridge network card can directly process them according to the target address carried in the network data packet. Within the local area network built based on the bridge network card, the network data packets sent by the wireless terminal device can be divided into two types. The first type is the network data packets whose target address is the first system module and need to be processed by the first system module. This type can be directly parsed and processed by the first system module. The second type is the network data packet whose target address is not the first system module. At this time, the bridge network card directly handles the relevant network data transmission process and sends it to the gateway for processing, that is, forwarding it to the second system module for processing through the first connection network card. Specifically, the projection screen display process of the second system module is started, and then the projection screen is displayed. For the first system module, the projection screen displayed by the second system module is displayed on the display screen through the second display channel. With the above processing strategy, the user only needs to select the all-in-one device to be connected on the wireless terminal device, and then select the target system module when data transmission is required. In this way, data can be sent to any specified system module without switching the connection target.
[0136] In the specific implementation process, considering that the Android operating system has a more complete application ecosystem based on the touch screen compared to the Windows operating system, it is possible to set the wireless terminal device to only send screen projection data to the first system module when the first system module is the Android system module and the second system module is also provided (the second system module is the Windows system module). Accordingly, when a network data packet with a target address being the IP address of the bridge network card is received from the wireless terminal device through the wireless connection link, the screen projection display process can be directly started; the screen projection is obtained from the network data packet parsing, and the screen projection is displayed through the screen projection display process, so as to facilitate the use of the rich application ecosystem based on the touch screen and obtain a richer secondary operation experience on the basis of screen projection display, such as annotations, meeting record preservation, etc. Of course, in the specific implementation, the type of data to be sent (such as files that need to be shared during multi-person communication, data that need to be projected and displayed) and the target system module to be sent (which can be the first system module and the second system module) can be freely selected on the wireless terminal device to meet the needs of users in various scenarios.
[0137] In the specific implementation process, based on the network connection established in step S110-step S140, another method different from step S150 and step S160 can also be adopted. Specifically, the first system module supports a first display channel and a second display channel, wherein the first display channel is used for the display of the first system module, that is, the first display channel is used to display the screen when the first system module is working, including the homepage of the first system module, the interface of the application, etc., and can also display information of the peripherals connected to the first system module, such as information of the connected computer, audio and video terminal, etc. The second display channel is used for the display of the second system module, that is, the second display channel is used to display the screen when the second system module is working, including the homepage of the second system module, the interface of the application, the connected peripherals, etc. In the specific implementation process, the first system module is connected to a display screen, and the screen of the first system module when working is displayed through the display screen. The second system module displays the screen data by sending it to the first system module, which then sends it to the display screen for display. Specifically, the first system module is equipped with an application for displaying the screen of the second system module. The second system module sends the screen data to the first system module via HDMI or other means. After receiving the screen data, the application in the first system module processes the screen data and displays it on the display screen. In other words, the display process of the screen of the second system module is reflected as the display process of an application on the first system module. In this embodiment, the situation where the application displays the screen of the second system module is referred to as the second display channel of the first system module. When the first display channel and the second display channel are switched, the switching can be performed by clicking a control on the display screen or by setting a signal source option and selecting a specific signal source to switch to the second display channel. It is understood that the signal source option can also enable the first system module to connect to an external signal source such as HDMI or Type-C. In this case, the situation where different external signal sources are connected is referred to as different display channels of the first system module.
[0138] Based on the first system module's support for two display channels, during a specific display process, when the first system module operates on the first display channel, it receives a first network data packet with a first target address from a wireless terminal device via a wireless connection link, and responds to and processes the first network data packet. The first system module supports the first display channel and the second display channel, with the first display channel used for displaying the first system module and the second display channel used for displaying the second system module. The first target address is the IP address of the bridged network card. That is, when the screen displayed by the first system module while supporting its own operation is displayed on the display screen, the corresponding first network data packet used for screen projection is the network data packet generated after the user selects the first system module as the screen projection target.
[0139] When the first system module operates in the second display channel, it receives a second network data packet with a second destination address from the wireless terminal device via the wireless connection link, and forwards the second network data packet to the second system module via the first connection network card for response processing; wherein the second destination address is the IP address of the second system module. In other words, when the first system module displays the screen when supporting the operation of the second system module on the display screen, the corresponding second network data packet used for screen projection is the network data packet generated after the user selects the second system module as the screen projection target.
[0140] The first network data packet and the second network data packet are distinguished by the target address in the network data packet. The target address in the first network data packet is the IP address of the first system module (that is, the IP address of the bridge network card described above), and the target address in the second network data packet is the IP address of the second system module. For the first system module, when the received network data packet switches between the first network data packet and the second network data packet, the display channel also switches between the first display channel and the second display channel accordingly. The first way to trigger the switch is that the user actively changes the projection target. The target address in the network data packet received by the first system module changes, and the corresponding display channel is switched to adapt to the needs of the first system module or the second system module to respond to and process the network data packet, and finally the projection screen is displayed on the display screen. The second way to trigger the switch is that the first system module actively switches the current display channel. In order to ensure the normal display of the projection screen after switching the display channel, when the first system module switches between the first display channel and the second display channel, a notification message is sent to the wireless terminal device through the wireless connection link, so that the wireless terminal device changes the target address of the network data packet it sends for projection, thereby ensuring that the network data packet sent from the data source end of the projection is the network data packet that the current display channel can respond to and process. The above two switching methods can both ensure the correspondence between network data packets and the current display channel. Switching caused by any reason will not affect the normal transmission of network data packets used for screen projection, the response processing in the corresponding system module, and the normal display on the display screen.
[0141] When the first system module is working on the first display channel or the second display channel, it receives a third network data packet with a target address of the third target address from the wireless terminal device through the wireless connection link, and forwards the third network data packet to the second system module through the first connection network card for processing, so that the second system module sends the third network data packet to the Internet to realize communication between the wireless terminal device and the Internet; wherein the third target address is used to access the Internet. That is, regardless of whether it is currently working on the first display channel or the second display channel, the first system module not only receives the first network data packet and the second network data packet for screen projection, but also receives the third network data packet for accessing the Internet. When the second system module is connected, all third network data packets are forwarded to the second system module for processing without distinguishing the currently used display channel. This processing process is the same as the processing process of the same network data packet in the first display process with steps S150 and S160 as the core, and can be implemented by reference.
[0142] The network data packet processing process based on the display channel can enable users to perform screen projection or Internet access according to their own needs without making any adjustments in the operation link when the display channel is switched. The first system module can perform P2P screen projection or accurate response to accessing the Internet through a PC based on the processing process in the embodiment of the present application, reducing the user's operations on network configuration during use and improving the convenience of users using wireless terminal devices in an interactive tablet environment.
[0143] It should be understood that the first display process based on step S150 and step S160 mainly describes the distribution processing process of projection data from the dimension of data transmission, and the second display process based on the display channel mainly describes the switching of the display channel from the dimension of the source of the picture when the first system module realizes picture display on the display screen. The first display process and the second display process do not conflict, and both can be implemented based on the hardware architecture and network configuration described above, that is, the connection basis for implementing the first display process and the second display process is the same. The corresponding specific implementation methods of the hardware architecture, network configuration and the data transmission process based on the network configuration can be combined with the two display processes. Not all possible combinations are listed one by one in the specific implementation method, and changes that do not affect the various combinations are optional implementation methods in the embodiments of this application.
[0144] The network architecture established between the wireless terminal device 20 and the all-in-one machine 10 implemented based on the embodiment of the present application is shown in Figure 4. The all-in-one machine 10 is equipped with two system modules and corresponding hardware configurations that fully implement the embodiment of the present application. Among them, the first system module 11 based on the Android operating system includes at least one physical wireless network card (not marked in the figure, named as the first physical wireless network card) and a physical wired network card (i.e., the first network card 111), and the second system module 12 based on the Windows operating system includes at least one physical wired network card (i.e., the second network card 121). The first network card 111 and the second network card 121 are used to realize the intranet connection between the first system module 11 and the second system module 12. The first network card 111 is the first connection network card corresponding to the first system module 11. Of course, the first system module 11 and the second system module 12 can also be configured with other hardware to realize various required communication connections. For example, the second system module 12 can also include a second WiFi module 122 and other physical wired network cards for accessing external networks.
[0145] Based on the above hardware configuration, when the all-in-one machine 10 is powered on, the first system module 11 creates a virtual bridge network card br0 through bridging technology, for example, through the tool brctl, and configures a fixed IP address (i.e., IP: 192.168.153.253) for br0. If it is further monitored that the first network card 111 is connected to the second network card 121, the first physical wireless network card is enumerated as the point-to-point group master network card P2P-GO and the wireless terminal network card wlan0, and the first network card 11 and the point-to-point group master network card P2P-GO are loaded into the logical interface of the bridge network card. At this time, there is no need to configure network information for the first network card 11 and the point-to-point group master network card P2P-GO. During the native initialization process of the Android operating system, if the second network card 121 is monitored, the network information of each network card will be configured. Based on this solution, the native configuration method is directly intercepted and replaced by the configuration method in the embodiment of the present application. When the wpa_supplicant process for realizing wireless communication is specifically started, the bridge interface br0 is specified to enable wpa_supplicant to support bridged network cards.
[0146] On the basis of the above hardware configuration, when the all-in-one machine 10 is powered on, the first system module 11 first enumerates the first physical wireless network card as the point-to-point group master network card P2P-GO and the wireless terminal network card wlan0. If the second system module 12 is further detected to be connected, that is, the connection between the first network card 111 and the second network card 121 is monitored, a virtual bridge network card br0 is created through bridging technology, for example, through the tool brctl, and a fixed IP address (i.e., IP: 192.168.153.253) is configured for br0, and the first network card 11 and the point-to-point group master network card P2P-GO are loaded into the logical interface of the bridge network card. At this time, there is no need to configure network information for the first network card 11 and the point-to-point group master network card P2P-GO. Based on this solution, the native configuration method is directly interrupted and replaced by the configuration method in the embodiment of the present application. When the wpa_supplicant process for realizing wireless communication is started, the bridge interface br0 is specified to enable wpa_supplicant to support the bridge network card.
[0147] For the second system module 12 (connected at startup) and the wireless terminal device 20 (connected during use of the all-in-one machine 10) that are directly connected to the logical interface outside the bridge network card, the second network card 121 in the second system module 12 is configured as a gateway, and the wireless terminal device 20 is configured to be in the same network segment, such as 192.168.153.253, 192.168.153.254, and 192.168.153.xx (xx is not 253 or 254) as shown in Figure 4. For the point-to-point group master network card P2P-GO loaded into the bridge network card br0, wireless terminal devices can connect via WiFi Direct or WiFi and will be assigned an IP address in the 192.168.153 network segment.
[0148] With the above configuration, the wireless terminal device 20, the first system module 11, and the second system module 12 are in the same network segment. The wireless terminal device 20 can freely choose to send network data packets to the first system module 11 or the second system module 12 within the local area network, because the bridge network card br0 can accurately process or forward the data packets according to the target address sent.
[0149] When a user sends a network packet through the wireless terminal device 20, they can choose not to select a destination. For example, they can directly access an external website or send a shared file for multi-person communication. The bridged network card br0 will directly send the packet to the gateway, which will then be sent to the external network by the second system module 12 as a gateway. Alternatively, the second system module 12 may recognize the packet as a shared file transfer during multi-person communication and directly receive and store it. Based on the destination of the network packets received by the bridge device from the wireless terminal device 20, the first system module 11 can roughly classify them into network packets that need to be processed by the first system module 11 and network packets that do not need to be processed by the first system module 11. This refers to network packets whose destination address is the IP address of the bridged network card in step S150, and network packets whose destination address is not the IP address of the bridged network card in step S160. Network packets whose destination address is not the IP address of the bridged network card can be further classified into network packets that need to be processed by the second system module 12 and network packets that do not need to be processed by the second system module 12, based on the possible user needs described above. This refers to network packets whose destination address is the IP address of the second system module and network packets whose destination address is not the IP address of the second system module.
[0150] When a network data packet whose target address is the IP address of the second system module is received from a wireless terminal device through a wireless connection link, the network data packet is forwarded to the second system module through the first connection network card for processing, so that the second system module displays the corresponding projection screen according to the network data packet; when a network data packet whose target address is not the IP address of the second system module is received from a wireless terminal device through a wireless connection link, the network data packet is forwarded to the second system module through the first connection network card for processing, so that the second system module sends the network data packet to the external network to realize communication between the wireless terminal device and the Internet. For network data packets whose transmission target is clearly the second system module, the bridge device can confirm that the target is directly connected to itself and directly forward it to the second system module for processing. For network data whose transmission target is clearly not the second system module (and not the first system module), the bridge device should send it to the gateway, that is, to the second system module, according to the conventional routing strategy of the network data packet. After the second system module receives this type of network data packet, it is equivalent to performing the function of a gateway and forwarding it according to its target address using the data link between itself and the external network. This approach ensures that, in addition to freely projecting screens based on the convenient network connection with the first system module, the wireless terminal device can also freely meet other network access requirements. Specifically, the second system module can access the Internet via a wired network by connecting to a network cable, or via a wireless network by connecting to a Wi-Fi module operating in STA mode, thereby implementing this solution. The specific details are not limited here.
[0151] The user can send network data packets through the wireless terminal device 20, or select a destination by triggering a selection control pop-up menu. For example, before the screen projection process, if the projection target is selected as the first system module 11, the wireless terminal device 20 will add the IP address of the first system module 11 as the destination address when generating the network data packet, so that the first system module 11 can realize the projection screen display. Each system module may have a more intuitive representation in the menu, such as "Android system" or "Windows system".
[0152] In the network architecture shown in Figure 4, there are other network hardware that are not connected to the bridge network card br0 (for example, the third WiFi module 21 and the mobile communication module in the wireless terminal device 20, the second WiFi module 122 and the Internet network card in the second system module 12) or virtual network nodes (for example, the wireless terminal network card wlan0). It should be understood that in addition to implementing the data transmission in the embodiment of the present application based on the bridge network card br0, the above network hardware and virtual network nodes can implement corresponding functions according to the data transmission design in the relevant technology. For example, the first system module 11 can be connected to the WiFi hotspot in the environment through the wireless terminal network card wlan0.
[0153] The above-mentioned data transmission method is applied to a first system module, the first system module includes a first physical wireless network card and a first connection network card, the first system module is connected to the second system module through the first connection network card, and the data transmission method applied to the first system module includes: enumerating the first physical wireless network card as a point-to-point group master network card and a wireless terminal network card; when detecting that the second system module is connected, creating a virtual bridge network card, and adding the point-to-point group master network card and the first connection network card to the bridge network card; configuring the network information of the bridge network card and the network information of the second system module so that the IP address of the second system module and the IP address of the bridge network card are in the same network segment, and the gateway address and DNS address of the bridge network card are consistent with the IP address of the second system module. Same; when establishing a wireless connection link with the wireless terminal device through the point-to-point group master network card, configure the network information of the wireless terminal device so that the IP address of the wireless terminal device and the IP address of the bridge network card are in the same network segment, and the gateway address of the wireless terminal device is the same as the IP address of the second system module; when a network data packet with a target address being the IP address of the bridge network card is received from the wireless terminal device through the wireless connection link, parse and process the network data packet; when a network data packet with a target address not being the IP address of the bridge network card is received from the wireless terminal device through the wireless connection link, forward the network data packet to the second system module through the first connection network card for processing; wherein the network information includes the IP address, DNS address and gateway address. By interrupting the independent network configuration process of the two system modules at power-on, the virtual bridge network card in the first system module takes over the point-to-point group master network card enumerated by the first system module and the first connection network card connected to the second system module, and configures the IP address of the second system module to be the same as the gateway address of the bridge network card. When establishing a wireless connection link with the wireless terminal device through the point-to-point group master network card, the wireless terminal device is configured to the same network segment, and the gateway address is configured to be the same as the IP address of the second system module. When the wireless terminal device sends a network data packet, the user can directly select the sending target. When the bridge network card receives a network data packet with the target address being the IP address of the bridge network card, the first system module directly performs parsing and processing. The network data packets are directly forwarded to the second system module for processing based on the general forwarding process of the gateway according to the gateway configuration. The network settings and management of the first system module and the second system module are based on the virtual bridge network card. After the wireless terminal device establishes a wireless connection link with the first system module, it can quickly send network data packets to any system module. This solution only requires setting up a wireless network card in the electronic device to meet the needs of the wireless terminal device to switch the LAN transmission between any system module at any time, and at the same time meet the needs of the wireless terminal device to access the Internet through the electronic device, simplifying the connection operation of repeated device connection during data transmission, with low hardware cost, simple and convenient operation, and improved data continuity during data transmission, with high connection stability.
[0154] The present application also provides a data transmission method for a wireless terminal device. Specifically, the process of implementing the data transmission method from the perspective of the wireless terminal device is described. The detailed description of the data processing and data transmission between the wireless terminal device and the first system module is omitted here. The overall implementation process of the data transmission method for the wireless terminal device is described. The wireless terminal device is wirelessly connected to an electronic device, and the electronic device includes a first system module and a second system module. As shown in FIG5 , the data transmission method for the wireless terminal device includes:
[0155] Step S210: When establishing a wireless connection link with the electronic device, obtain the configuration network information provided by the bridge network card virtualized by the first system module in the electronic device, the IP address in the configuration network information and the IP address of the bridge network card are in the same network segment, and the gateway address in the configuration network information is the same as the gateway address of the bridge network card and the IP address of the second system module in the electronic device.
[0156] Step S220: receiving a target selection operation acting on a projection target selection window, where the projection target selection window displays a first selection control corresponding to the first system module and a second selection control corresponding to the second system module.
[0157] Step S230: According to the target selection operation, the current display screen is obtained as the projection screen, and a network data packet with the IP address of the first system module or the second system module as the target address is generated according to the projection screen.
[0158] Specifically, the projection screen is used as the projection data, and the IP address of the first system module or the second system module is used as the target address of the projection, and a network data packet for the projection is generated.
[0159] Step S240: Send the network data packet to the bridge network card via the wireless connection link.
[0160] Based on the above embodiment, the IP addresses of the first system module and the second system module are obtained from the first system module.
[0161] Based on the above embodiment, the IP addresses of the first system module and the second system module are pre-recorded.
[0162] By interrupting the independent network configuration process of the two system modules at power-on, the virtual bridge network card in the first system module takes over the point-to-point group master network card enumerated by the first system module and the first connection network card connected to the second system module, and configures the IP address of the second system module to be the same as the gateway address of the bridge network card. When establishing a wireless connection link with the wireless terminal device through the point-to-point group master network card, the wireless terminal device is configured to the same network segment, and the gateway address is configured to be the same as the IP address of the second system module. When the wireless terminal device sends a network data packet, the user can directly select the sending target. When the bridge network card receives a network data packet with the target address being the IP address of the bridge network card, the first system module directly performs parsing and processing. The network data packets are directly forwarded to the second system module for processing based on the general forwarding process of the gateway according to the gateway configuration. The network settings and management of the first system module and the second system module are based on the virtual bridge network card. After the wireless terminal device establishes a wireless connection link with the first system module, it can quickly send network data packets to any system module. This solution only requires setting up a wireless network card in the electronic device to meet the needs of the wireless terminal device to switch the LAN transmission between any system module at any time, and at the same time meet the needs of the wireless terminal device to access the Internet through the electronic device, simplifying the connection operation of repeated device connection during data transmission, with low hardware cost, simple and convenient operation, and improved data continuity during data transmission, with high connection stability.
[0163] Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in Figure 6, the electronic device includes a processor 310 and a memory 320. The device can be a system module or a wireless terminal device. If it is a wireless terminal device, it can also include an input device 330, an output device 340 and a communication device 350. The number of processors 310 in the electronic device can be one or more. Figure 6 takes one processor 310 as an example. The processor 310, memory 320, input device 330, output device 340 and communication device 350 in the electronic device can be connected through a bus or other means. Figure 6 takes the connection through a bus as an example. In addition, if it is a system module, there can be an external input device 330, output device 340 and communication device 350. The overall product form can be composed of, for example, an all-in-one machine, an interactive tablet, etc.
[0164] Memory 320, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the strength training data auxiliary processing method in the embodiments of the present application. Processor 310 executes the software programs, instructions, and modules stored in memory 320 to execute various functional applications and data processing of the electronic device, thereby implementing the aforementioned data transmission method.
[0165] The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the electronic device, etc. In addition, the memory 320 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely located relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0166] The input device 330 may be used to receive network configuration information. The output device 340 may include a display device such as a display screen.
[0167] The above electronic device can be used to execute any data transmission method and has corresponding functions and beneficial effects.
[0168] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the relevant operations in the data transmission method provided in any embodiment of the present application and has corresponding functions and beneficial effects.
[0169] Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products.
[0170] Therefore, the application can adopt the form of complete hardware embodiment, complete software embodiment, or the embodiment in combination with software and hardware. Moreover, the application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The application is described with reference to the flow chart and / or block diagram of the method, equipment (system) and computer program product according to the embodiment of the application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow chart and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instruction executed by the processor of the computer or other programmable data processing device produces a device for realizing the function specified in one flow chart flow chart or multiple flow processes and / or one block or multiple blocks of the block diagram. These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device that implements the functions specified in one or more processes of the flowchart and / or one or more blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes of the flowchart and / or one or more blocks of the block diagram.
[0171] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-permanent storage in a computer-readable medium, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0172] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0173] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0174] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the appended claims.
Claims
1. A data transmission method for an electronic device, the data transmission method being applied to a first system module, the first system module including a first physical wireless network card and a first connection network card, wherein, including: Enumerate the first physical wireless network card as a point-to-point group master network card and a wireless terminal network card; When detecting the access of a second system module, create a virtual bridging network card, and add the point-to-point group master network card and the first connection network card into the bridging network card; Configure the network information of the bridging network card and the network information of the second system module, so that the IP address of the second system module and the IP address of the bridging network card are in the same network segment, and the gateway address and DNS address of the bridging network card are the same as the IP address of the second system module; wherein, the network information includes an IP address, a DNS address, and a gateway address; When establishing a wireless connection link with a wireless terminal device through the point-to-point group master network card, configure the network information of the wireless terminal device, so that the IP address of the wireless terminal device and the IP address of the bridging network card are in the same network segment, and the gateway address of the wireless terminal device is the same as the IP address of the second system module; When the first system module works on a first display channel and receives a first network packet with a target address of a first target address from the wireless terminal device through the wireless connection link, perform response processing on the first network packet; wherein, the first system module supports a first display channel and a second display channel, the first display channel is used for the display of the first system module, and the second display channel is used for the display of the second system module; the first target address is the IP address of the bridging network card; When the first system module works on a second display channel and receives a second network packet with a target address of a second target address from the wireless terminal device through the wireless connection link, forward the second network packet to the second system module through the first connection network card for response processing; wherein, the second target address is the IP address of the second system module; When the first system module works on the first display channel or the second display channel and receives a third network packet with a target address of a third target address from the wireless terminal device through the wireless connection link, forward the third network packet to the second system module through the first connection network card for processing, so that the second system module sends the third network packet to the Internet to realize the communication between the wireless terminal device and the Internet; wherein, the third target address is used to access the Internet.
2. The data transmission method according to claim 1, wherein, the method further includes: When the first system module switches between the first display channel and the second display channel, send a notification message to the wireless terminal device through the wireless connection link, so that the wireless terminal device changes the target address of the network packet it sends for screen mirroring.
3. The data transmission method according to claim 1, wherein, When the first system module operates in the first display channel and receives the first network data with the target address being the first target address from the wireless terminal device through the wireless connection link, the response processing of the network data packet includes: When the first system module operates in the first display channel and receives the first network data packet with the target address being the first target address from the wireless terminal device through the wireless connection link, start the screen mirroring display process; Parse the screen mirroring image from the first network data packet and display the screen mirroring image through the screen mirroring display process.
4. The data transmission method according to claim 1, wherein, The forwarding of the second network data packet to the second system module through the first connection network card for response processing includes: Forward the second network data packet to the second system module through the first connection network card, so that the second system module displays the corresponding screen mirroring image according to the second network data packet.
5. The data transmission method according to claim 1, wherein, The wireless terminal network card is configured to work in the STA mode; Correspondingly, after enumerating the first physical wireless network card as the point-to-point group master network card and the wireless terminal network card, it further includes: When the access of the second system module is not detected, configure the network information of the point-to-point group master network card; Establish a NAT connection between the point-to-point group master network card and the wireless terminal network card.
6. The data transmission method according to claim 5, wherein, After establishing the NAT connection between the point-to-point group master network card and the wireless terminal network card, it further includes: When establishing a wireless connection link with the wireless terminal device through the point-to-point group master network card, configure the network information of the wireless terminal device so that the IP address of the wireless terminal device and the IP address of the point-to-point group master network card are in the same network segment; Correspondingly, the data transmission method further includes: When receiving a network data packet with the target address being the IP address of the wireless terminal network card from the wireless terminal device through the wireless connection link, send the network data packet to the wireless terminal network card through the NAT connection, so that the wireless terminal device accesses the Internet through the wireless terminal network card.
7. According to the data transmission method of claim 1, configure the network information of the bridging network card and the network information of the second system module so that the IP address of the second system module is in the same network segment as the IP address of the bridging network card, and the gateway address and DNS address of the bridging network card are the same as the IP address of the second system module, including: Configure the IP address of the bridging network card; According to the IP address of the bridging network card, configure the IP address of the second system module so that the IP address of the second system module is in the same network segment as the IP address of the bridging network card; Set the IP address of the bridging network card of the second system module as the gateway address and DNS address of the bridging network card.
8. The data transmission method according to claim 1, wherein, The first system module is disposed on an integrated circuit board, and the second system module is a pluggable module.
9. The data transmission method according to claim 1, wherein, the first system module is an Android system module, and the second system module is a Windows system module.
10. The data transmission method according to claim 1, wherein, the first connection network card is a physical wired network card, a bus-based virtual network card, or a second physical wireless network card.
11. The data transmission method according to claim 1, wherein, the network information of the bridging network card and the second system module is configured according to the pre-stored record information each time.
12. A data transmission method for an electronic device, the data transmission method is applied to a first system module, and the first system module includes a first physical wireless network card and a first connection network card, wherein, comprising: enumerating the first physical wireless network card as a point-to-point group master network card and a wireless terminal network card; when detecting the access of a second system module, creating a virtual bridging network card, and adding the point-to-point group master network card and the first connection network card to the bridging network card; configuring the network information of the bridging network card and the network information of the second system module, so that the IP address of the second system module and the IP address of the bridging network card are in the same network segment, and the gateway address and DNS address of the bridging network card are the same as the IP address of the second system module; wherein, the network information includes an IP address, a DNS address, and a gateway address; when establishing a wireless connection link with a wireless terminal device through the point-to-point group master network card, configuring the network information of the wireless terminal device, so that the IP address of the wireless terminal device and the IP address of the bridging network card are in the same network segment, and the gateway address of the wireless terminal device is the same as the IP address of the second system module; when receiving a network data packet with a destination address being the IP address of the bridging network card from the wireless terminal device through the wireless connection link, performing response processing on the network data packet; when receiving a network data packet with a destination address not being the IP address of the bridging network card from the wireless terminal device through the wireless connection link, forwarding the network data packet to the second system module through the first connection network card for processing.
13. The data transmission method according to claim 12, wherein, the step of when receiving a network data packet with a destination address not being the IP address of the bridging network card from the wireless terminal device through the wireless connection link, and forwarding the network data packet to the second system module through the first connection network card for processing, includes: when receiving a network data packet with a destination address being the IP address of the second system module from the wireless terminal device through the wireless connection link, forwarding the network data packet to the second system module through the first connection network card for response processing, so that the second system module displays a corresponding screen mirroring image according to the network data packet; When a network data packet whose destination address is not the IP address of the second system module is received from the wireless terminal device through the wireless connection link, forward the network data packet to the second system module through the first connection network card for processing, so that the second system module sends the network data packet to the Internet to realize the communication between the wireless terminal device and the Internet.
14. The data transmission method according to claim 12, wherein, when network data whose destination address is the IP address of the bridging network card is received from the wireless terminal device through the wireless connection link, the response processing of the network data packet includes: when a network data packet whose destination address is the IP address of the bridging network card is received from the wireless terminal device through the wireless connection link, start the screen mirroring display process; parse the screen mirroring image from the network data packet and display the screen mirroring image through the screen mirroring display process.
15. The data transmission method according to claim 12, wherein, the wireless terminal network card is configured in the STA working mode; correspondingly, after enumerating the first physical wireless network card as the point-to-point group master network card and the wireless terminal network card, it further includes: when the access of the second system module is not detected, configure the network information of the point-to-point group master network card; establish a NAT connection between the point-to-point group master network card and the wireless terminal network card.
16. The data transmission method according to claim 15, wherein, after establishing the NAT connection between the point-to-point group master network card and the wireless terminal network card, it further includes: when establishing a wireless connection link with the wireless terminal device through the point-to-point group master network card, configure the network information of the wireless terminal device so that the IP address of the wireless terminal device and the IP address of the point-to-point group master network card are in the same network segment; correspondingly, the data transmission method further includes: when a network data packet whose destination address is the IP address of the wireless terminal network card is received from the wireless terminal device through the wireless connection link, send the network data packet to the wireless terminal network card through the NAT connection so that the wireless terminal device accesses the Internet through the wireless terminal network card.
17. The data transmission method according to claim 12, wherein, the first system module is arranged on an integrated circuit board, and the second system module is a pluggable module.
18. A data transmission method, applied to a wireless terminal device, the wireless terminal device is wirelessly connected to an electronic device, the electronic device includes a first system module and a second system module, wherein, the data transmission method includes: when establishing a wireless connection link with the electronic device, obtain the configured network information provided by the bridging network card virtualized by the first system module in the electronic device, the IP address in the configured network information and the IP address of the bridging network card are in the same network segment, and the gateway address in the configured network information is the same as the gateway address of the bridging network card and the IP address of the second system module in the electronic device; Receive a target selection operation acting on the screen mirroring target selection window, where the first selection control corresponding to the first system module and the second selection control corresponding to the second system module are displayed in the screen mirroring target selection window; Obtain the current display screen as the screen mirroring screen according to the target selection operation, and generate a network data packet with the IP address of the first system module or the second system module as the target address according to the screen mirroring screen; Send the network data packet to the bridging network card through the wireless connection link.
19. The data transmission method according to claim 18, wherein, the data transmission method further includes: Receive a network access instruction for accessing the Internet; Obtain the target IP address of the network access instruction; Generate a network data packet for requesting access to the Internet with the target IP address as the target address according to the network access instruction.
20. The data transmission method according to claim 18, wherein, the IP addresses of the first system module and the second system module are obtained from the first system module.
21. The data transmission method according to claim 18, wherein, the IP addresses of the first system module and the second system module are pre-recorded.
22. An electronic device, wherein, includes: One or more processors; A memory for storing one or more computer programs; When the one or more computer programs are executed by the one or more processors, the system module implements the data transmission method according to any one of claims 1-21.
23. A computer-readable storage medium, on which a computer program is stored, wherein, When the computer program is executed by a processor, it implements the data transmission method according to any one of claims 1-21.
Citation Information
Patent Citations
Networking method of multi-system all-in-one machine and multi-system all-in-one machine
CN103888337A
Method for realizing common networking among multiple devices, storage medium and integrated machine with multiple devices
CN109039849A
Network connection establishment method and electronic equipment
CN112333733A
Network equipment virtualization implementation method and device in multiple systems, electronic equipment and storage medium
CN114338408A
Data transmission method based on Wi-Fi P2P and electronic equipment
CN116367123A