Communication method of display device, display device, circuit board, and storage medium

By configuring independent processes and wireless network cards for client mode and peer-to-peer network mode in the display device, the data transmission latency problem when client mode and peer-to-peer network mode run in parallel is solved, achieving efficient data transmission and simplified operation process.

CN122437877APending Publication Date: 2026-07-21GUANGZHOU SHIKUN ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU SHIKUN ELECTRONICS TECH CO LTD
Filing Date
2025-01-21
Publication Date
2026-07-21

Smart Images

  • Figure CN122437877A_ABST
    Figure CN122437877A_ABST
Patent Text Reader

Abstract

The application provides a communication method of a display device, the display device, a circuit board and a storage medium. The method relates to the technical field of communication. The method comprises the following steps: receiving an opening instruction of a target network mode in the display device; if the target network mode is a peer-to-peer network mode, performing data transmission with a target device through a first process; if the target network mode is a client mode, performing data transmission with the target device through a second process; wherein the first process and the second process are independent processes. The method can avoid the delay problem existing in data transmission in the case that the client mode and the peer-to-peer network mode are parallel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and more specifically, to a communication method, display device, circuit board, and storage medium for a display device in the field of communication technology. Background Technology

[0002] Devices often communicate via wireless networks, which include various operating modes such as client mode, peer-to-peer network mode, and access point mode. Client mode is used for wireless internet access, while peer-to-peer network mode and access point mode can both be used for data transmission such as wireless screen mirroring.

[0003] In existing technologies, client mode and peer-to-peer network mode are configured on the same wireless network card, which requires Wi-Fi to be turned on when using peer-to-peer network mode, making the operation cumbersome. Furthermore, when client mode and peer-to-peer network mode are running simultaneously, if they are on different channels, they will switch channels continuously during processing, and the time spent will cause data transmission delays.

[0004] Therefore, how to avoid data transmission latency when client mode and peer-to-peer network mode are running in parallel is an urgent problem to be solved. Summary of the Invention

[0005] This application provides a communication method for a display device, a display device, a circuit board, and a storage medium. This method can avoid the latency problem in data transmission when client mode and peer-to-peer network mode are running in parallel.

[0006] Firstly, a communication method for a display device is provided, the method comprising:

[0007] Receives a command to enable the target network mode in the display device;

[0008] If the target network mode is a peer-to-peer network mode, data transmission is performed between the first process and the target device.

[0009] If the target network mode is client mode, data transmission is performed with the target device through a second process;

[0010] The first process and the second process are independent of each other.

[0011] In the above technical solution, when an instruction to enable a target network mode is received in the display device, it is determined whether the target network mode is a peer-to-peer network mode or a client mode. When the target network mode is a peer-to-peer network mode, data transmission is performed through the first process corresponding to the peer-to-peer network mode; when the target network mode is a client mode, data transmission is performed through the second process corresponding to the client mode. Compared to the prior art where data transmission in peer-to-peer network mode and client mode requires the use of some of the same processes, this solution pre-configures a first process dedicated to data transmission in peer-to-peer network mode and a second process dedicated to data transmission in client mode in the display device. The two processes are independent of each other, eliminating the dependency of peer-to-peer network mode on client mode when it is enabled, allowing peer-to-peer network mode to be enabled independently. When the two modes run in parallel, data transmission can be performed through independent processes, avoiding mutual interference between data transmission processes in different network modes and eliminating the latency problem in data transmission when client mode and peer-to-peer network mode run in parallel.

[0012] Combining the first aspect and the above implementation methods, in some possible implementation methods, data transmission between the first process and the target device includes:

[0013] Run the driver for the peer-to-peer network mode interface in the first process;

[0014] It communicates with the first wireless network card through a peer-to-peer network mode interface;

[0015] Data is transmitted to the target device via the first wireless network card.

[0016] In the above technical solution, when the target network mode is peer-to-peer network mode, the driver for the peer-to-peer network mode interface in the first process is run first. Then, a communication connection is established with the first wireless network card through the peer-to-peer network mode interface, and data transmission can then be performed between the first wireless network card and the target device. Connecting to the first wireless network card through the first process enables data transmission in client mode, avoiding sharing the same process with client mode, reducing the impact of simultaneous data transmission in client mode and peer-to-peer network mode, and improving the efficiency of data transmission by the target device in both client mode and peer-to-peer network mode.

[0017] Combining the first aspect and the above implementation methods, in some possible implementation methods, the driver for the peer-to-peer network mode interface in the first process is run, including:

[0018] The first daemon process of the local service layer runs in the first process; the first daemon process is used to monitor wireless network communication in peer-to-peer network mode;

[0019] Based on the first daemon process, the driver for the peer-to-peer network mode interface is called and the driver for the peer-to-peer network mode interface is run.

[0020] In the above technical solution, a first daemon process is added to the local service layer in the first process to monitor wireless network communication in peer-to-peer network mode. When a peer-to-peer network mode enable command is detected, the first daemon process of the local service layer is run. The driver for the peer-to-peer network mode interface is called through the first daemon process, and after the driver is called, the driver for the peer-to-peer network mode is run. In the prior art, the local service layer has only one daemon process, which is used for both peer-to-peer network mode and client mode. If there is a need to enable peer-to-peer network mode, the wireless network in client mode must first be enabled to activate the daemon process before data transmission in peer-to-peer network mode can be achieved. This means that enabling peer-to-peer network mode depends on client mode. This application adds a first daemon process specifically for monitoring the communication process in peer-to-peer network mode, allowing peer-to-peer network mode to be enabled independently. Data transmission in peer-to-peer network mode can be achieved even when the wireless network is not enabled, improving the convenience of enabling and using peer-to-peer network mode. When both modes are running simultaneously, there is no need to rely on a shared daemon process, improving data transmission efficiency.

[0021] Combining the first aspect and the above implementation methods, in some possible implementation methods, the first daemon process of the local service layer in the first process is run, including:

[0022] Run the first startup process in the hardware abstraction layer of the first process;

[0023] The first startup process calls the first daemon process and runs the first daemon process.

[0024] In the above technical solution, a first startup process is added to the hardware abstraction layer in the first process to establish a connection between the application framework layer and the local service layer. When a peer-to-peer network mode activation command is received, the first startup process in the hardware abstraction layer is run first in response to the command. Then, the first startup process can call the first daemon process of the local service layer to run the first daemon process. In peer-to-peer network mode, the independent first startup process calls the first daemon process corresponding to the peer-to-peer network mode, eliminating the shared processes between different modes and further improving the efficiency of data transmission by the display device in peer-to-peer network mode.

[0025] Combining the first aspect and the above implementation methods, in some possible implementation methods, the first startup process in the hardware abstraction layer of the first process is run, including:

[0026] The application layer in the first process sends an enable signal for the peer-to-peer network mode to the application framework layer.

[0027] The application framework layer's waiting connection process is activated by an enable signal; and the first startup process of the hardware abstraction layer is invoked and run.

[0028] In the above technical solution, after the user initiates the peer-to-peer network mode activation operation, the application layer receives the peer-to-peer network mode activation command. In response to this command, the application layer sends an enable signal for the peer-to-peer network mode to the application framework layer to establish the peer-to-peer network mode activation link. The enable signal activates the waiting connection process in the application framework layer and invokes and runs the first startup process of the hardware abstraction layer. By sending the peer-to-peer network mode enable signal to the application framework layer and activating the waiting connection process, the complex configuration and waiting time that may be required in traditional network connection modes are reduced, improving network construction efficiency. In a collaborative mode involving the application layer, application framework layer, and hardware abstraction layer, devices can autonomously activate peer-to-peer network mode without relying on a centralized network server or management device, improving the efficiency of data transmission between devices.

[0029] In conjunction with the first aspect, in some possible implementations, data transmission with the target device is performed via a second process, including:

[0030] The driver for the client-mode interface in the second process;

[0031] It communicates with the second wireless network card through the client mode interface;

[0032] Data is transmitted to the target device via a second wireless network card.

[0033] In the above technical solution, when the target network mode is client mode, the corresponding driver for the client mode interface in the second process is run. The second wireless network card is configured with a client mode interface. After the interface driver runs, a communication connection can be established between the second wireless network card corresponding to the client mode through the client mode interface. Data transmission can then occur between the second wireless network card and the target device. By connecting the second wireless network card through the second process, data transmission in client mode is achieved, avoiding the sharing of the same process with peer-to-peer network mode, reducing the impact of simultaneous data transmission in client mode and peer-to-peer network mode, and improving the efficiency of data transmission by the target device in both client mode and peer-to-peer network mode.

[0034] In combination with the first aspect and the above implementation methods, in some possible implementations, the method further includes:

[0035] If the target network mode is access point mode, run the driver for the access point mode interface in the third process;

[0036] It communicates with the first wireless network card through the access point mode interface;

[0037] Data is transmitted to the target device via the first wireless network card.

[0038] In the above technical solution, when the target network mode is access point mode, the corresponding driver for the access point mode interface in the third process is executed in response to the enable command. Then, a communication connection is established with the first wireless network card through the access point mode interface. After successful connection establishment, data transmission can be performed between the first wireless network card and the target device. This allows the first wireless network card to simultaneously meet data transmission requirements in both peer-to-peer network mode and access point mode, eliminating the need for a separate wireless network card for access point mode and reducing hardware costs. In both peer-to-peer network mode and access point mode, the display device can act as a central device to connect with other devices. During this process, data transmission can be allocated to the same channel, avoiding the switching process between two channels and eliminating data transmission delays caused by time consumption. This reduces hardware costs while improving data transmission efficiency.

[0039] In combination with the first aspect and the above implementation methods, in some possible implementations, the method further includes:

[0040] If both peer-to-peer network mode and access point mode are enabled, the display device is confirmed to be the management device in the peer-to-peer network group.

[0041] The peer-to-peer network group includes the display device and the target device.

[0042] In the above technical solution, when the device is in peer-to-peer network mode, its role can include both management device and member device. When both peer-to-peer network mode and access point mode are enabled simultaneously, the display device's role in the peer-to-peer network group is determined as a management device. This enables the display device to manage the network settings of the peer-to-peer network group. When both modes are running simultaneously, the display device, acting as a management device, can allocate data to be transmitted in peer-to-peer network mode to the same channel as in access point mode. When both are on the same channel, there is no channel switching issue, thus avoiding data transmission delays caused by channel switching and further improving data transmission efficiency.

[0043] In combination with the first aspect and the above-described implementation methods, in some possible implementation methods, data transmission between the first wireless network card and the target device includes:

[0044] The probe request signal is broadcast via the first wireless network card;

[0045] In response to a probe response signal sent by the target device, a connection is established with the target device; wherein, the probe response signal is the response signal corresponding to the probe request signal;

[0046] Receive target data sent by the target device.

[0047] In the above technical solution, after determining the first wireless network card corresponding to the peer-to-peer network mode, the first wireless network card broadcasts a probe request signal to notify other devices that they can establish a peer-to-peer network connection with the display device. When a probe response signal sent by the first target signal is detected, a connection is established with the target device, and the target data sent by the target device is received. Device connection is established by broadcasting probe request signals and responses, enabling data sharing and exchange; this facilitates data transmission between the display device and other devices, improving the convenience of establishing connections and transmitting data between multiple devices.

[0048] Combining the first aspect and the above implementation methods, in some possible implementations, the target data includes the target projection data; the method also includes:

[0049] Display the target projection data sent by the target device.

[0050] In the above technical solution, after the display device and the target device establish a connection, if the target data sent by the target device is target projection data, then the target projection data is displayed after it is received. Based on the peer-to-peer network mode implemented using the first wireless network card, when performing projection operations through the peer-to-peer network mode, a connection can be directly established with the projection sending end through the first wireless network card corresponding to the peer-to-peer network mode, thereby avoiding projection stuttering caused by channel switching; ensuring smooth data transmission during projection; and improving the user's visual experience.

[0051] In a second aspect, a communication device for a display device is provided, the communication device comprising:

[0052] The instruction receiving module is used to receive instructions to enable the target network mode in the display device;

[0053] The first transmission module is used to transmit data with the target device through the first process if the target network mode is a peer-to-peer network mode.

[0054] The second transmission module is used to transmit data with the target device through a second process if the target network mode is client mode.

[0055] The first process and the second process are independent of each other.

[0056] Thirdly, a display device is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the display device to perform the methods of the first aspect or any possible implementation thereof.

[0057] Fourthly, a display device circuit board is provided, including a circuit board body, a memory, and a processor; the memory is disposed on the circuit board body and is used to store executable program code; the processor is disposed on the circuit board body and is used to call and run the executable program code in the memory, so that the display device circuit board performs the method in the first aspect or any possible implementation of the first aspect.

[0058] Fifthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0059] In a sixth aspect, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description

[0060] Figure 1 This is a schematic diagram of the working mode of a wireless network card provided in an embodiment of this application;

[0061] Figure 2 This is a schematic diagram of another working mode of a wireless network card provided in an embodiment of this application;

[0062] Figure 3 This is a schematic flowchart illustrating a communication method for a display device provided in an embodiment of this application;

[0063] Figure 4 This is a schematic flowchart illustrating another communication method for a display device provided in an embodiment of this application.

[0064] Figure 5 This is a schematic diagram of the structure of a communication device for a display device provided in an embodiment of this application;

[0065] Figure 6 This is a schematic diagram of the structure of a display device provided in an embodiment of this application. Detailed Implementation

[0066] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0067] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0068] With the continuous development and advancement of electronic devices and network communications, wireless network technology has been gradually applied to various fields to overcome the physical connection limitations of traditional wired networks. Wireless network technologies include Wi-Fi and Bluetooth, among others. In the field of terminal technology, wireless network technology enables data transmission between multiple terminal devices.

[0069] In the implementation of Wi-Fi technology, multiple terminal devices transmit data through wireless network cards (NICs). These NICs can operate in various modes, including client mode, access point mode, and peer-to-peer network mode. The following section will introduce the various operating modes of wireless network cards.

[0070] Client mode (Station, STA), also known as site mode, refers to the working mode of a terminal device's wireless network card connecting to a wireless access point as a client. For example, when devices such as smartphones and televisions are in client mode, they can connect to the hotspot signal of a wireless router or other devices.

[0071] Access Point (AP) mode, also known as wireless access point mode, refers to a working mode in which a wireless device (such as a wireless router or a wireless network card with access point functionality) acts as a central node, providing network access services to other wireless devices. For example, when a home wireless router is enabled in access point mode, devices such as smartphones, laptops, and smart home appliances can access the internet or communicate with each other within the local area network.

[0072] When using access point mode to achieve screen mirroring between devices, a screen mirroring device can be used to establish a connection between the screen mirroring sender and the display device. Specifically, the screen mirroring device is usually a USB external device. The screen mirroring device is plugged into the USB port of the display device, and the display device stores its own network information (such as network name and password) in the screen mirroring device, completing pairing with it. Then, the screen mirroring device is plugged into the USB port of the screen mirroring sender, and the screen mirroring sender receives the network information from the screen mirroring device, establishing a pairing connection with the display device. After the display device and the screen mirroring sender successfully establish a connection, the display device can receive the screen mirroring data sent by the screen mirroring sender and display it.

[0073] When using access point mode to achieve screen mirroring between devices, screen mirroring can also be achieved via a local area network (LAN). Specifically, the display device establishes a LAN, and the screen mirroring sending end can establish a connection with the display device through the LAN and send the data to be mirrored to the display device for display.

[0074] Similar to access point mode is hotspot mode, also known as mobile hotspot or network sharing mode. Hotspot mode is a functional mode that allows devices with mobile data network access capabilities (such as smartphones, mobile hotspot devices, etc.) to wirelessly share their network connection with other devices. For example, when a mobile phone's hotspot mode is enabled, the phone acts as a mobile Wi-Fi router, and other devices (such as laptops, tablets, etc.) can access the internet by connecting to the phone's hotspot.

[0075] Peer-to-peer (P2P) networking, also known as peer-to-peer mode, allows wireless devices to communicate directly without a central access point. Each device acts as both a client and a server, with equal status, hence the name "peer-to-peer network." For example, in a conference room without network infrastructure, multiple laptops can connect directly to each other via a peer-to-peer network to share files or engage in simple collaboration.

[0076] When using a peer-to-peer network for device-to-device screen mirroring, both the sending device and the display device need to support Miracast technology. Miracast is a wireless display standard developed by the Wi-Fi Alliance. Based on Wi-Fi Direct technology, it allows devices to establish direct point-to-point wireless connections without the need for intermediate devices such as wireless routers. During the mirroring process, users can use an application on the sending device (such as a mobile phone) to search for the display device's name and pair it with it. Once the connection is successful, the sending device encodes the data to be mirrored and transmits it to the display device via the Wi-Fi Direct link. The display device then decodes the data and displays it.

[0077] Figure 1 This is a schematic diagram illustrating the working mode of a wireless network card provided in an embodiment of this application. In the prior art, a display device may be configured with two wireless network cards, wireless network card 101 and wireless network card 102. Wireless network card 101 supports the display device's Station mode and P2P mode, while wireless network card 102 supports the display device's AP mode. In Station mode, the display device can achieve wireless internet access; in P2P mode, the display device can achieve data transmission with other devices, such as screen projection; and in AP mode, the display device can achieve hotspot transmission.

[0078] Due to limitations in the Android system's native code, Station mode and P2P mode share the same daemon process, meaning that enabling P2P mode depends on enabling Station mode. To enable P2P mode, the display device's Wi-Fi must first be turned on to activate the shared daemon process, which then enables P2P mode on the display device for data transmission. As you can see, this process is quite cumbersome and cannot be used to enable P2P mode on the display device independently.

[0079] When both Station mode and P2P mode are enabled and working simultaneously, the chip in the wireless network card 101 needs to allocate channel resources to meet the communication needs of display devices in different modes. In concurrent situations, both Station mode and P2P mode devices require channel access for data transmission, leading to resource contention. For example, the chip may need to decide whether to prioritize allocating channel resources to a Station mode device downloading a file or a P2P mode device performing real-time data transmission. Inappropriate resource allocation may result in decreased communication quality for devices in one mode, or insufficient channel resources for devices in both modes, thus impacting the overall network performance.

[0080] Furthermore, because Station mode and P2P mode follow different Wi-Fi protocol rules and priority settings, the chip in the wireless network card 101 needs to coordinate different protocols and priorities when both modes operate concurrently. For example, a device in Station mode may follow the access point coordination rules in the IEEE 802.11 standard, while a device in P2P mode may have corresponding P2P protocol rules. When both modes are working simultaneously, the chip may face the challenge of balancing the priorities of the two protocols to ensure compliance with protocol requirements while maximizing network efficiency.

[0081] Due to the aforementioned technical issues with existing wireless network card configuration strategies, data transmission delays between multiple devices may occur during application.

[0082] For example, when the display device is a smart TV, smart interactive flat panel, or conference flat panel, users can send the content to be cast to the display device using screen casting software or a screen casting device. During the screen casting process, if the display device operates in both Station mode and P2P mode simultaneously, and these two modes operate on different channels, the chip needs to switch channels. Switching from channel 1 to channel 2 takes time t1, switching the display device's role takes time t2, and switching back from channel 2 to channel 1 also takes time t1. In other words, there is a time consumption of t1*2+t2 during each channel switching process. This time consumption can cause stuttering during screen casting, potentially affecting the user's visual experience.

[0083] To address the problems existing in the prior art, this application, based on the Android system, decouples the Station mode and P2P mode of the display device. It configures two independent processes for data transmission for the Station mode and P2P mode respectively. That is, when there is a need to enable the P2P mode, the P2P mode can be directly controlled to be enabled without enabling the Wi-Fi of the display device, thus simplifying the operation steps.

[0084] Wireless signal transmission relies on a wireless network card. When connecting to the wireless network card through independent processes in different modes, the same wireless network card can be used. However, when using the same wireless network card, there may be time consumption during channel allocation and mode switching, resulting in transmission delay. Therefore, this solution uses different wireless network cards to achieve data transmission in different communication modes, which eliminates the channel switching problem between Station mode and P2P mode and eliminates the delay problem during data transmission.

[0085] Figure 2 This is a schematic diagram illustrating another working mode of a wireless network card provided in an embodiment of this application. For example... Figure 2 As shown in this application, the display device is configured with at least two physical wireless network cards, wireless network card 201 and wireless network card 202. The Station mode and P2P mode are decoupled. Wireless network card 201 can enumerate one logical network card: a WiFi STA network card (wlan0 network card). Wireless network card 201 supports the display device's Station mode for wireless internet access. Wireless network card 202 can enumerate two logical network cards: a WiFi P2P network card (p2p0 network card) and a SoftAP network card (wlan1 network card). The WiFi P2P network card supports the display device's P2P mode, and the SoftAP network card supports the display device's AP mode. Both modes can be used for data transmission between devices. Since P2P mode and Station mode are configured on two different wireless network cards, and when P2P mode and AP mode are running concurrently, P2P mode can force GO (Group Owner) mode to allocate the channel in this mode to the corresponding channel in AP mode. When both transmit data through the same channel, there is no problem of switching modes and channels, thus avoiding the latency problem during data transmission.

[0086] In view of this, embodiments of this application provide a communication method for a display device, a display device, a circuit board, and a storage medium. The method involves receiving an instruction to enable a target network mode in the display device and determining the type of the enabled target network mode. When the target network mode is a peer-to-peer network mode, data transmission occurs between the device and the target device via a first process corresponding to the peer-to-peer network mode. When the target network mode is a client mode, data transmission occurs between the device and the target device via a second process corresponding to the client mode. The first and second processes have no overlapping parts and are independent of each other. This method avoids the latency problem that exists when client mode and peer-to-peer network mode are running concurrently.

[0087] The following is combined Figure 3 and Figure 4 The communication method of the display device provided in the embodiments of this application will be described in detail.

[0088] Figure 3 This is a schematic flowchart illustrating a communication method for a display device provided in an embodiment of this application. It should be understood that this method can be applied to a display device; or to a display device circuit board; or to a processor in a display device; or to a chip in a processor mounted in a display device, etc.

[0089] For example, such as Figure 3 As shown, the method 300 includes:

[0090] S301 receives a command to enable the target network mode in the display device.

[0091] For example, when a user needs to transmit data between a target device and a display device, they can enable the target network mode of the display device through the relevant settings function in the display device. The target network mode can include peer-to-peer (P2P) mode, client mode (STA mode), and access point mode (AP mode), etc. After receiving the enable command, the command can be analyzed to determine the type of target network mode enabled by the user.

[0092] Optionally, the network mode settings interface on the display device can display multiple alternative target network modes, allowing users to select and enable the desired target network mode according to their needs. For example, enabling methods may include illuminating the display area for that mode or turning the mode's switch on.

[0093] S302, if the target network mode is a peer-to-peer network mode, data is transmitted with the target device through the first process.

[0094] In the display device provided in this application embodiment, corresponding processes are configured for different network modes to realize data transmission with the target device. Specifically, for peer-to-peer network modes, a first process corresponding to this mode is configured; data transmission cannot be performed through the first process in other modes.

[0095] For example, when it is detected that the target network mode enabled by the user is peer-to-peer network mode, data transmission between the display device and the target device can be achieved through the first process dedicated to peer-to-peer network mode.

[0096] Devices with wireless communication capabilities are all equipped with a wireless network card (NIC). The NIC contains a built-in antenna, and data transmission between two or more devices is achieved by sending electromagnetic waves through this antenna. The antenna in a wireless network card can include a transmitting antenna and a receiving antenna. The transmitting antenna converts the electrical signals generated by the wireless network card into electromagnetic waves and transmits them into the air. Common antenna types include omnidirectional antennas, directional antennas, built-in antennas, and external antennas. The receiving antenna captures the electromagnetic waves propagating from the air and converts them into electrical signals. The receiving antenna can be an omnidirectional antenna or a directional antenna, etc.

[0097] To establish a connection between the display device and the wireless device, communication is required between a first process and a first wireless network card. In one implementation, the process of data transmission between the first process and the target device may include: running the driver for the peer-to-peer network mode interface in the first process; establishing a communication connection with the first wireless network card through the peer-to-peer network mode interface; and transmitting data between the first wireless network card and the target device.

[0098] The display device may be equipped with a first wireless network card (i.e. Figure 2 The wireless network card 202 shown) and the second wireless network card (i.e. Figure 2 The wireless network card 201 shown; the first wireless network card can be used to realize data transmission of the display device in peer-to-peer network mode, and the first wireless network card is configured with a peer-to-peer network mode interface; the second wireless network card can be used to realize data transmission of the display device in client mode.

[0099] Optionally, the interface in the peer-to-peer network mode can be named p2p0 interface.

[0100] It should be noted that the target device can be used to represent a set of devices that establish a peer-to-peer network mode connection with the display device through the first wireless network card. It can be one device or multiple devices. The number of target devices is not limited in the embodiments of this application.

[0101] For example, when the target network mode is detected to be peer-to-peer (P2P) mode, the driver corresponding to the peer-to-peer interface in the first process is first run to mount the peer-to-peer interface; then a communication connection can be established between the peer-to-peer interface and the first wireless network card; after the communication connection is successfully established, wireless data transmission can be performed between the first wireless network card and the target device.

[0102] For example, the driver for the peer-to-peer (P2P) interface defines the P2P interface name as p2p0. This allows for matching with other P2P interfaces based on the driver's name, enabling the mounting and invocation of these interfaces.

[0103] In this embodiment, when the target network mode is peer-to-peer (P2P) mode, the driver for the P2P interface in the first process is first executed. Then, a communication connection is established with the first wireless network card through the P2P interface, and data transmission can then be performed between the first wireless network card and the target device. Connecting the first wireless network card through the first process enables data transmission in client mode, avoiding sharing the same process with client mode, reducing the impact of simultaneous data transmission in client mode and P2P mode, and improving the efficiency of data transmission by the target device in both client mode and P2P mode.

[0104] In one implementation, the process of running the driver for the peer-to-peer network mode interface in the first process may specifically include: running the first daemon process of the local service layer in the first process; wherein the first daemon process is a process used to monitor wireless network communication in the peer-to-peer network mode; based on the first daemon process, calling the driver for the peer-to-peer network mode interface; and running the driver for the peer-to-peer network mode interface.

[0105] Taking the Android system architecture as an example, the existing local service layer (Native layer) only contains a daemon process wpa_supplicant. wpa_supplicant is used to monitor wireless network communication in both STA mode and P2P mode. When P2P mode is enabled, wpa_supplicant needs to be activated by enabling Wi-Fi in order to enable data transmission of the display device in P2P mode.

[0106] For example, in this embodiment of the application, a first daemon process is added to the local service layer in the first process to realize the separate monitoring of wireless network communication in P2P mode; when the peer-to-peer network mode start command is detected, the first daemon process of the Native layer is run; through the first daemon process, the driver of the peer-to-peer network mode interface, that is, the p2p0 interface driver, is called; and the driver of the peer-to-peer network mode interface is run.

[0107] The first daemon process can include the p2p_supplicant service process and the p2p_supplicant service definition. A new p2p_supplicant service process is added, and the p2p_supplicant.bin file is compiled; a new p2p_supplicant service definition is added, which can use the vendor / bin / hw / p2p_supplicant process.

[0108] Optionally, the wpa_supplicant process and the p2p_supplicant process can be implemented using different source code or the same source code.

[0109] In one implementation, when the wpa_supplicant and p2p_supplicant processes use the same source code, the input parameters of the service definition are parsed in the main.c file of supplicant in the Native layer. Based on the newly added parameters, the p2p_supplicant and wpa_supplicant services are started differently, and the registered server interface names are differentiated accordingly. When the p2p_supplicant process is started, the service interface name is p2p_supplicant; when wpa_supplicant is started, the registered server interface name uses the default value (e.g., default).

[0110] In this embodiment, a first daemon process is added to the local service layer of the first process to monitor wireless network communication in peer-to-peer network mode. When a peer-to-peer network mode enable command is detected, the first daemon process of the local service layer is run. The driver of the peer-to-peer network mode interface is called through the first daemon process, and after the driver is called, the driver of the peer-to-peer network mode is run. In the prior art, there is only one daemon process in the local service layer, which is used for both peer-to-peer network mode and client mode. If there is a need to enable peer-to-peer network mode, the wireless network in client mode must first be enabled to activate the daemon process before data transmission in peer-to-peer network mode can be realized. This makes enabling peer-to-peer network mode dependent on client mode. This application adds a first daemon process, which is used separately to monitor the communication process in peer-to-peer network mode. This allows peer-to-peer network mode to be enabled independently. Data transmission in peer-to-peer network mode can be realized even when the wireless network is not enabled, improving the convenience of enabling and using peer-to-peer network mode. When both modes are running together, there is no need to rely on a shared daemon process, improving data transmission efficiency.

[0111] In one implementation, the specific process of running the first daemon process of the local service layer in the first process may include: running the first startup process in the hardware abstraction layer of the first process; calling the first daemon process through the first startup process and running the first daemon process.

[0112] For example, after receiving the instruction to enable peer-to-peer network mode, the application framework layer receives the P2P enable signal. In order to realize the connection between the application framework layer and the first daemon process in the Native layer, this application adds a first startup process in the Hardware Abstraction Layer (HAL). In response to the instruction to enable P2P mode, after processing by the application framework layer, the first startup process of the HAL layer is run. Then, the first startup process calls and activates the first daemon process and runs the first daemon process.

[0113] The first startup process can be SupplicantP2pfaceHal.startP2pDaemon.

[0114] Optionally, in the Android system, the Hardware Abstraction Layer Interface Definition Language (HIDL) can be used to enable the HAL layer to connect and interact with the application framework layer and the native layer. HIDL primarily uses a client-server approach to establish the connection.

[0115] For example, in the HAL layer client, add logic to the file SupplicantP2pIfaceHal.java that connects to p2p_supplicant, specifying the service name to be obtained as p2p_supplicant, to realize the connection between the HAL layer client and the local service layer.

[0116] In this embodiment, a first startup process is added to the hardware abstraction layer in the first process to establish a connection between the application framework layer and the local service layer. When a peer-to-peer network mode activation command is received, the first startup process in the hardware abstraction layer is run in response to the command. Then, the first startup process can call the first daemon process of the local service layer to run the first daemon process. In peer-to-peer network mode, the independent first startup process calls the first daemon process corresponding to the peer-to-peer network mode, eliminating shared processes between different modes and further improving the efficiency of data transmission by the display device in peer-to-peer network mode.

[0117] In one implementation, the specific process of running the first startup process in the hardware abstraction layer of the first process may include: sending an enable signal for the peer-to-peer network mode to the application framework layer through the application layer in the first process; activating the waiting connection process of the application framework layer through the enable signal; and calling the first startup process of the hardware abstraction layer and running the first startup process.

[0118] For example, before P2P mode is enabled, the display device's P2P mode is in a disabled state; when the application layer in the first process detects the instruction to enable P2P mode, it generates a P2P enable signal and sends the P2P enable signal to the application framework layer in the first process; at this time, the waiting connection process of the application framework layer is activated to wait for the establishment of a communication connection with the target device; after the display device and the target device successfully establish a communication connection, the first startup process of the HAL layer is called and the first startup process is run.

[0119] The process waiting for a connection can be WifiP2PNative.waitForSupplicantConnection.

[0120] In this embodiment, after the user initiates the peer-to-peer network mode activation operation, the application layer receives the peer-to-peer network mode activation command. In response to this command, the application layer sends an enable signal for the peer-to-peer network mode to the application framework layer to establish the peer-to-peer network mode activation link. The enable signal activates the waiting connection process in the application framework layer and invokes and runs the first startup process of the hardware abstraction layer. By sending the enable signal to the application framework layer and activating the waiting connection process, the complex configuration and waiting time that may be required in traditional network connection modes are reduced, improving network construction efficiency. In a collaborative mode involving the application layer, application framework layer, and hardware abstraction layer, devices can autonomously activate peer-to-peer network mode without relying on a centralized network server or management device, improving the efficiency of data transmission between devices.

[0121] In one implementation, the process of transmitting data with the target device through the first wireless network card may include: broadcasting a probe request signal through the first wireless network card; establishing a connection with the target device in response to a probe response signal sent by the target device; wherein the probe response signal is a response signal corresponding to the probe request signal; and receiving target data sent by the target device.

[0122] The target data may include video data, audio data, image data, document text data, and application-related data.

[0123] Furthermore, the detection response signal is a response signal sent by the target device to the display device in response to the user's operation when the detection request signal is detected.

[0124] For example, after the display device enables P2P mode, it broadcasts a detection request signal through the transmitting antenna in the first wireless network card so that other devices can detect the signal of the display device. When a user needs to transmit data between the target device and the display device, the user can perform a user operation on the target device to select the display device. At this time, the target device sends a detection response signal to the display device. In response to the detection response signal, the display device establishes a communication connection with the target device that sent the signal and further receives the target data sent by the target device.

[0125] In this embodiment, after determining the first wireless network card corresponding to the peer-to-peer network mode, the first wireless network card broadcasts a probe request signal to notify other devices that a peer-to-peer network connection can be established with the display device. When a probe response signal sent by the first target signal is detected, a connection is established with the target device, and the target data sent by the target device is received. Device connection is established by broadcasting probe request signals and responses, enabling data sharing and exchange; this facilitates data transmission between the display device and other devices, improving the convenience of establishing connections and transmitting data between multiple devices.

[0126] In one implementation, the target data includes target projection data; the method further includes displaying the target projection data sent by the target device.

[0127] For example, peer-to-peer network mode can be applied to device projection. After establishing a communication connection in peer-to-peer network mode between the display device and the target device, the user can send the target projection data to be displayed to the display device through applications on the target device. At this time, the display device receives the target projection data and can display the target projection data on the screen of the display device for the user to view.

[0128] In this embodiment, after the display device and the target device establish a connection, if the target data sent by the target device is target projection data, then the target projection data is displayed after it is received. Based on the peer-to-peer network mode implemented using the first wireless network card, when performing projection operations through the peer-to-peer network mode, a connection can be directly established with the projection sending end through the first wireless network card corresponding to the peer-to-peer network mode, thereby avoiding projection stuttering caused by channel switching; ensuring smooth data transmission during projection; and improving the user's visual experience.

[0129] S303, if the target network mode is client mode, data transmission is performed with the target device through the second process; wherein, the first process and the second process are independent processes.

[0130] In the display device, a second process corresponding to this mode is also configured for the client mode (STA mode). The second process and the first process used in P2P mode are two independent processes.

[0131] Understandably, when a user simultaneously enables both peer-to-peer and client modes—that is, when peer-to-peer and client modes run concurrently—data transmission in peer-to-peer mode is handled by the first process, while data transmission in client mode is handled by the second process. Since the first and second processes are independent, they do not affect each other when running in parallel. Enabling one mode does not depend on enabling the other, thus allowing each mode to operate independently.

[0132] For example, when it is detected that the target network mode enabled by the user is client mode, data transmission between the display device and the target device can be achieved through a second process dedicated to client mode.

[0133] In one implementation, the process of transmitting data between the second process and the target device may include: running the driver of the client-mode interface in the second process; establishing a communication connection with the second wireless network card through the client-mode interface; and transmitting data between the second wireless network card and the target device.

[0134] Optionally, the client-mode interface can be named wlan0.

[0135] For example, the second wireless network card can be used to implement data transmission in client mode, and the second wireless network card is configured with a client mode interface; when a client mode enable command is detected, the driver corresponding to the client mode interface is run; after the driver runs, a communication connection can be established between the second wireless network card and the client mode interface; after the connection is successfully established, data transmission can be performed between the second wireless network card and the target device.

[0136] It should be noted that the target device can be used to represent a set of devices that establish a client-mode connection between the second wireless network card and the display device. It can be one device or multiple devices. The number of target devices is not limited in the embodiments of this application.

[0137] It should be noted that a wireless network card may be configured with multiple interfaces corresponding to different modes, but different interface names can be used to distinguish the correspondence between different wireless network cards and different modes.

[0138] For example, in the first wireless network interface card (NIC), the interface name corresponding to the peer-to-peer network mode is specified as p2p0, and the interface name corresponding to the client mode is named with a name other than wlan0. An example implementation code could be `insmod vendor / lib / modules / b.ko sta=sta p2p=p2p0 ap=wlan1`. The first daemon process of the local service layer, p2p_supplicant, can bind to the first wireless NIC through the interface name p2p0. In the second wireless NIC, the interface name corresponding to the client mode is specified as wlan0, and the interface name corresponding to the peer-to-peer network mode is named with a name other than p2p0. An example implementation code could be `insmod vendor / lib / modules / a.ko sta=wlan0 p2p=p2p1 ap=wlan1`. The second daemon process of the local service layer, wpa_supplicant, can bind to the second wireless NIC through the interface name wlan0.

[0139] It should be noted that the target device can be used to represent a set of devices that establish a client-mode connection between the second wireless network card and the display device. It can be one device or multiple devices. The number of target devices is not limited in the embodiments of this application.

[0140] In this embodiment, when a client mode enable command is received, the corresponding driver for the client mode interface is executed in response to the command. The second wireless network card is configured with a client mode interface. After the interface driver is running, a communication connection can be established between the second wireless network card corresponding to the client mode through the client mode interface. Data transmission can then be performed between the second wireless network card and the target device. By utilizing the second wireless network card to independently implement data transmission in client mode, the impact of simultaneous data transmission in client mode and peer-to-peer network mode is reduced, improving the efficiency of data transmission by the target device in both client mode and peer-to-peer network mode.

[0141] The display device also includes an access point mode. For data transmission in access point mode, a separate third process and a third wireless network card can be configured. A connection is established between the third process and the third wireless network card to transmit data between the third wireless network card and the target device. Alternatively, access point mode and peer-to-peer network mode can be configured on the same network card to reduce hardware costs.

[0142] In one implementation, the method further includes: if the target network mode is access point mode, running the driver of the access point mode interface in the third process; establishing a communication connection with the first wireless network card through the access point mode interface; and transmitting data with the target device through the first wireless network card.

[0143] Among them, the third process, the first process, and the second process are all independent processes.

[0144] For example, the first wireless network card can be used to simultaneously achieve data transmission in peer-to-peer network mode and access point mode. When an access point mode enable command is received, the corresponding driver for the access point mode interface is run; after the driver runs, a communication connection can be established between the access point mode interface and the first wireless network card; after a successful connection, data transmission can be performed between the first wireless network card and the target device.

[0145] For example, during the data transmission process in access point mode, the hostapd process of the local service layer in the third process can be started to detect the wireless communication process in access point mode.

[0146] The access point mode interface can be named wlan1.

[0147] It should be noted that the target device refers to the set of devices that establish an access point mode connection between the first wireless network card and the display device. It can be one device or multiple devices. The number of target devices is not limited in this application embodiment.

[0148] In this embodiment, when the target network mode is access point mode, the corresponding driver for the access point mode interface in the third process is executed in response to the enable command. Then, a communication connection is established with the first wireless network card through the access point mode interface. After successful connection establishment, data transmission can be performed between the first wireless network card and the target device. This allows the first wireless network card to simultaneously meet data transmission requirements in both peer-to-peer and access point modes, eliminating the need for a separate wireless network card for access point mode and reducing hardware costs. In both peer-to-peer and access point modes, the display device can act as a central device to connect with other devices. During this process, data transmission can be allocated to the same channel, avoiding the switching process between two channels and eliminating data transmission delays caused by time consumption. This reduces hardware costs while improving data transmission efficiency.

[0149] In a peer-to-peer network model, the role of a display device can be divided into two types: one is the management device, also known as the group owner (GO); the other is the member device, also known as the group client (GC).

[0150] A GO device is similar to an access point (AP) in a small network. When P2P devices establish connections to form a group, the GO manages the group's network settings, including frequency band selection and security settings. GO devices can also provide network connection sharing functionality. If the device itself has a network connection (e.g., via mobile data), other P2P devices connected to the GO device can access external networks through it.

[0151] GC devices connect to GO devices to obtain network services. In terms of data transmission, GC devices rely on GO devices for network management and data forwarding. GC devices primarily participate in P2P network activities through their connection with GO devices, adhering to the network rules set by the GO devices, such as frequency bands and security protocols.

[0152] In the case of simultaneously implementing data transmission in peer-to-peer network mode and access point mode using the first wireless network card, in order to avoid the data to be transmitted in the two modes being assigned to different channels, which would require channel switching and cause data transmission delay, in one implementation, if both peer-to-peer network mode and access point mode are enabled, the display device is determined to be the management device in the peer-to-peer network group; wherein, the peer-to-peer network group includes the display device and the target device.

[0153] For example, when both peer-to-peer network mode and access point mode are enabled, the display device's role in the peer-to-peer network group is set as a management device.

[0154] In this embodiment, when the device is in peer-to-peer network mode, the device's role can include both a management device and a member device. When both peer-to-peer network mode and access point mode are enabled simultaneously, the display device's role in the peer-to-peer network group is determined as a management device. This enables the display device to manage the network settings of the peer-to-peer network group. When both modes are running simultaneously, the display device, acting as a management device, can allocate data to be transmitted in peer-to-peer network mode to the same channel as in access point mode. When both are on the same channel, there is no channel switching issue, thus avoiding data transmission delays caused by channel switching and further improving data transmission efficiency.

[0155] In summary, in this embodiment, when an instruction to enable a target network mode in the display device is received, it is determined whether the target network mode is a peer-to-peer network mode or a client mode. When the target network mode is a peer-to-peer network mode, data transmission is performed through the first process corresponding to the peer-to-peer network mode; when the target network mode is a client mode, data transmission is performed through the second process corresponding to the client mode. Compared to the prior art where data transmission in peer-to-peer network mode and client mode requires the use of some of the same processes, this solution pre-configures a first process dedicated to data transmission in peer-to-peer network mode and a second process dedicated to data transmission in client mode in the display device. The two processes are independent of each other, eliminating the dependency of peer-to-peer network mode on client mode when it is enabled, allowing peer-to-peer network mode to be enabled independently. When the two modes run in parallel, data transmission can be performed through independent processes, avoiding mutual interference between data transmission in different network modes and eliminating the latency problem in data transmission when client mode and peer-to-peer network mode run in parallel.

[0156] The solution involved in this application is based on the Android system architecture. The communication method of the display device provided in this application will be introduced below in conjunction with the Android system architecture.

[0157] Figure 4 This is a schematic flowchart illustrating another communication method for a display device provided in an embodiment of this application. It should be understood that this method can be applied to a display device; or to a display device circuit board; or to a processor in a display device; or to a chip in a processor of a display device, etc. The display device includes a first wireless network card (i.e., Figure 2 The wireless network card 202 shown) and the second wireless network card (i.e. Figure 2 The wireless network card 201 shown is shown.

[0158] like Figure 4 As shown, the system architecture involved in this method includes an application layer, an application framework layer, a hardware abstraction layer, a local service layer, a driver layer, and a hardware layer. Through this system architecture, the display device can operate in various network communication modes, including peer-to-peer network mode, client mode, and access point mode.

[0159] The operation process of the peer-to-peer network mode may include the following S401 to S407.

[0160] It is understandable that the following peer-to-peer network operation process can be understood as follows: Figure 3 The relevant description describes the process of data transmission between the display device and the target device through the first process.

[0161] S401 receives the peer-to-peer network mode activation operation through the application layer peer-to-peer network mode control module.

[0162] The application layer is the layer that directly interacts with the user. In devices with P2P functionality, users can enable peer-to-peer (P2P) mode through the peer-to-peer network mode control module.

[0163] The peer-to-peer network mode control module can be implemented through applications such as system settings programs or file transfer applications.

[0164] For example, on a display device, the interface of the relevant application typically displays a "Enable P2P Mode" or similar button. When the user clicks the button, the application-layer peer-to-peer network mode control module can receive the instruction to enable P2P mode.

[0165] Alternatively, the implementation of S401 can be found in [reference needed]. Figure 3 The relevant description of S301 is not repeated here in the embodiments of this application.

[0166] S402, through the peer-to-peer network mode control module of the application layer, sends the first enable signal corresponding to enabling the peer-to-peer network mode to the peer-to-peer network mode manager of the application framework layer.

[0167] The first enable signal can be ENABLE_P2P.

[0168] For example, after detecting a user's peer-to-peer network mode activation operation, the peer-to-peer network mode control module sends a first enable signal to the peer-to-peer network mode manager in the application framework layer to indicate that there is a current need to enable P2P mode.

[0169] Alternatively, the implementation of S402 can be found in [reference needed]. Figure 3 The relevant description of S302 is not repeated here in the embodiments of this application.

[0170] S403 receives the first enable signal sent by the peer-to-peer network mode control module through the peer-to-peer network mode manager of the application framework layer; and triggers the peer-to-peer network mode connection module to run the waiting connection process.

[0171] The process running by the peer-to-peer network mode manager can be WifiP2pServiceImpI.P2pDisabledState; the process running by the peer-to-peer network mode connection module that waits for connections can be WifiP2PNative.waitForSupplicantConnection.

[0172] For example, the peer-to-peer network mode control module sends a first enable signal to the peer-to-peer network mode manager; after receiving the first enable signal, the peer-to-peer network mode manager activates the peer-to-peer network mode connection module of the application framework layer and triggers the peer-to-peer network mode connection module to run a waiting connection process, which is used to wait for a connection with the requester of the local service layer.

[0173] Alternatively, the implementation of S403 can be found in [reference needed]. Figure 3 The relevant description of S302 is not repeated here in the embodiments of this application.

[0174] S404, through the peer-to-peer network mode connection module of the application framework layer, sends instructions to the hardware abstraction layer to invoke and run the first startup process.

[0175] In existing technologies, during the operation of client mode and peer-to-peer network mode, a daemon process wpa_supplicant is shared in the local service layer. The local service layer and the application framework layer need to establish a connection through the hardware abstraction layer. Correspondingly, there is only one startup process in the hardware abstraction layer, which is used to start the daemon process wpa_supplicant shared by the two modes. The above solution will cause the peer-to-peer network mode to be unable to start and run independently. That is, to enable P2P mode, the wireless network Wi-Fi in STA mode must be enabled.

[0176] In this application, a first daemon process p2p_supplicant is added to the local service layer, and a first startup process is added to the hardware abstraction layer accordingly to start the first daemon process of the local service layer, thereby realizing the connection between the application framework layer and the local service layer in the peer-to-peer network mode.

[0177] The first startup process is used to start the daemon process of the local service layer. A code example for implementing the first startup process is SupplicantP2pfaceHal.startP2pDaemon.

[0178] For example, after the waiting connection process of the peer-to-peer network mode connection module is activated, an instruction is sent to the hardware abstraction layer to invoke the first startup process of the hardware abstraction layer and run the first startup process.

[0179] Alternatively, the implementation of S404 can be found in [reference needed]. Figure 3 The relevant description of S302 is not repeated here in the embodiments of this application.

[0180] S405, through the first startup process, calls the first daemon process of the local service layer and runs the first daemon process.

[0181] For example, the first startup process establishes a connection with the first daemon process in the local service layer through a specific invocation mechanism. Specifically, the first startup process sends an invocation request to the local service layer according to a predetermined protocol or interface specification. This request contains information used to identify the first daemon process (such as process name, unique identifier, etc.) in order to accurately locate and invoke the first daemon process. After the first daemon process is invoked, it begins to perform a series of network-related operations, such as scanning available networks, managing network connection status, and handling network data transmission.

[0182] Alternatively, the implementation of S405 can be found in [reference needed]. Figure 3 The relevant description of S302 is not repeated here in the embodiments of this application.

[0183] S406 sends a request message to the peer-to-peer network mode interface driver in the driver layer through the first daemon process in order to invoke the peer-to-peer network mode interface driver.

[0184] Among them, the peer-to-peer network mode interface driver can be a p2p0 interface driver.

[0185] In the existing technology, since the peer-to-peer network mode and the client mode share a daemon process, after the shared daemon process starts, step B is executed to connect the second daemon process to the peer-to-peer network mode interface.

[0186] In this application, when the system needs to enable peer-to-peer network mode or needs to perform certain specific operations (such as device discovery, connection establishment, data transmission, etc.) during the operation of peer-to-peer network mode, the first daemon process will act as the request initiator of the corresponding peer-to-peer network mode and directly send request information to the peer-to-peer network mode interface driver of the driver layer, thereby triggering the driver layer to execute the corresponding peer-to-peer network mode related operations.

[0187] Alternatively, the implementation of S406 can be found in [reference needed]. Figure 3 The relevant description of S302 is not repeated here in the embodiments of this application.

[0188] The S407 establishes a communication connection with the first wireless network card in the hardware layer through a peer-to-peer network mode interface.

[0189] In the existing technology, both the peer-to-peer network mode and the client mode are implemented through a second wireless network card. When the peer-to-peer network mode interface driver is activated, step C is executed to connect the second wireless network card, so that the second wireless network card can be used in both peer-to-peer network mode and client mode.

[0190] In this application, the peer-to-peer network mode and the client mode are implemented using two separate wireless network cards. After calling the peer-to-peer network mode interface driver, a communication connection can be established with the first wireless network card at the hardware layer that supports peer-to-peer network mode through the corresponding peer-to-peer network mode interface.

[0191] The first wireless network card is equipped with a corresponding interface. The target interface is found by searching among the interfaces of the first wireless network card for an interface with the same name as the peer-to-peer network mode interface. The connection with the interface driver can then be established through this interface.

[0192] Alternatively, the implementation of S407 can be found in [reference needed]. Figure 3 The relevant description of S302 is not repeated here in the embodiments of this application.

[0193] Optionally, after establishing a connection with the first wireless network card via a peer-to-peer network interface, the display device can transmit data between itself and the target device through the first wireless network card. The data transmission process can be found in [reference needed]. Figure 3 The relevant description of S302 is not repeated here in the embodiments of this application.

[0194] The client-side operation flow can include the following S501 to S507.

[0195] Understandably, the following client-side operation flow can be understood as follows: Figure 3 The relevant description describes the process of data transmission between the display device and the target device through a second process.

[0196] S501 receives the client mode enable operation through the application layer client mode control module.

[0197] On devices that support STA mode, users can enable client STA mode through the client mode control module.

[0198] The client-side mode control module can be implemented through applications such as system settings programs or file transfer applications.

[0199] For example, on a display device, the interface of the relevant application may display a "Start STA Mode" or similar button. When the user clicks the relevant button, the application layer's client mode control module can receive the instruction to start STA mode.

[0200] S502 sends a second enable signal corresponding to enabling client mode to the client mode manager of the application framework layer through the client mode control module of the application layer.

[0201] The second enable signal can be CMD_SWITCH_TO_CONNECT_MODE.

[0202] For example, after detecting a user's client mode enabling operation, the client mode control module sends a second enable signal to the client mode manager of the application framework layer to indicate that there is a current need to enable STA mode.

[0203] S503 receives the second enable signal sent by the client mode control module through the client mode manager of the application framework layer; and triggers the client mode connection module to run the waiting connection process.

[0204] The process running by the client mode manager can be ClientModeManager.StartedState; the process waiting for connection running by the client mode connection module can be WifiNative.startSupplicant.

[0205] For example, the client mode control module sends a second enable signal to the client mode manager; after receiving the second enable signal, the client mode manager activates the client mode connection module of the application framework layer and triggers the client mode connection module to run a waiting connection process to wait for a connection with the requester of the local service layer.

[0206] S504, through the client mode connection module of the application framework layer, sends instructions to the hardware abstraction layer to call and run the second startup process.

[0207] The second startup process is used to start the second daemon process of the local service layer. A code example for implementing the second startup process is SupplicantStalfaceHal.startDaemon.

[0208] For example, after the client-mode connection module's waiting connection process is activated, an instruction is sent to the hardware abstraction layer to invoke the hardware abstraction layer's second startup process and run the second startup process.

[0209] S505 calls and runs the second daemon process of the local service layer through the second startup process.

[0210] The second daemon process can be wpa_supplicant.

[0211] For example, the second startup process can establish a connection with the second daemon process in the local service layer through a specific invocation mechanism. Specifically, the second startup process sends an invocation request to the local service layer according to a predetermined protocol or interface specification. This request contains information used to identify the second daemon process (such as process name, unique identifier, etc.) in order to accurately locate and invoke the second daemon process. After being invoked, the second daemon process begins to perform a series of network-related operations, such as scanning available networks, managing network connection status, and handling network data transmission.

[0212] S506 sends a request message to the client-mode interface driver in the driver layer through the second daemon process in order to invoke the client-mode interface driver.

[0213] The client-side interface driver can be the wlan0 interface driver.

[0214] In the existing technology, since the client mode and the client mode share a daemon process, after the shared daemon process starts, step B is executed to connect the second daemon process with the client mode interface.

[0215] In this application, when the system needs to enable client mode or perform certain specific operations (such as device discovery, connection establishment, data transmission, etc.) during the operation of client mode, the second daemon process will act as the request initiator of the corresponding client mode and directly send request information to the client mode interface driver of the driver layer, thereby triggering the driver layer to execute the corresponding client mode related operations.

[0216] The S507 establishes a communication connection with the second wireless network card at the hardware layer through the client mode interface.

[0217] For example, the peer-to-peer network mode and client mode in this application are implemented using two wireless network cards respectively. After calling the client mode interface driver, a communication connection can be established with a second wireless network card that supports client mode at the hardware layer through the corresponding client mode interface.

[0218] The second wireless network card is equipped with a corresponding interface. The target interface is the interface whose name matches the client mode interface. The connection with the interface driver can then be established through this interface.

[0219] Optionally, after establishing a connection with the second wireless network card through the client interface, the display device can transmit data with the target device through the second wireless network card.

[0220] In summary, in this embodiment, the P2P mode and STA mode are decoupled; a first startup process and a first daemon process, used only for the peer-to-peer network mode, are added to the hardware abstraction layer and the local service layer, so that the peer-to-peer network mode no longer depends on the relevant service processes of the client mode. That is, when P2P mode is enabled, Wi-Fi in the peer-to-peer network mode does not need to be enabled, improving the convenience of enabling P2P mode; two wireless network cards are configured for the display device. The first wireless network card is used to realize data transmission in P2P mode, and the second wireless network card is used to realize data transmission in STA mode. When the two modes are running together, the wireless network cards do not need to switch modes and channels, eliminating the time consumption caused by mode and channel switching, and improving the smoothness and efficiency of data transmission.

[0221] The above text combined Figures 1 to 4 The communication method of the display device provided in the embodiments of this application is described in detail below; the following will be combined with Figure 5 and Figure 6 The apparatus embodiments of this application are described in detail below. It should be understood that the apparatus in the embodiments of this application can perform the various methods described in the foregoing embodiments of this application, that is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.

[0222] Figure 5 This is a schematic diagram of the structure of a communication device for a display device according to an embodiment of this application. The display device includes a first wireless network card and a second wireless network card, the first wireless network card being configured with a peer-to-peer network mode interface;

[0223] For example, such as Figure 5 As shown, the communication device 600 includes:

[0224] The instruction receiving module 601 is used to receive an instruction to enable the target network mode in the display device;

[0225] The first transmission module 602 is used to transmit data with the target device through the first process if the target network mode is a peer-to-peer network mode.

[0226] The second transmission module 603 is used to transmit data with the target device through the second process if the target network mode is client mode;

[0227] The first process and the second process are independent of each other.

[0228] In one possible implementation, the first transmission module 602 is further configured to run the driver for the peer-to-peer network mode interface in the first process; establish a communication connection with the first wireless network card through the peer-to-peer network mode interface; and transmit data with the target device through the first wireless network card.

[0229] In one possible implementation, the first transmission module 602 is further configured to run a first daemon process of the local service layer in the first process; wherein the first daemon process is a process for monitoring wireless network communication in peer-to-peer network mode; based on the first daemon process, the driver of the peer-to-peer network mode interface is called; and the driver of the peer-to-peer network mode interface is run.

[0230] In one possible implementation, the first transmission module 602 is further configured to run the first startup process in the hardware abstraction layer of the first process; call the first daemon process through the first startup process, and run the first daemon process.

[0231] In one possible implementation, the first transmission module 602 is further configured to send an enable signal for the peer-to-peer network mode to the application framework layer through the application layer in the first process; activate the waiting connection process of the application framework layer through the enable signal; and call the first startup process of the hardware abstraction layer and run the first startup process.

[0232] In one possible implementation, the second transmission module 603 is also used to run the driver of the client mode interface in the second process; to establish a communication connection with the second wireless network card through the client mode interface; and to transmit data with the target device through the second wireless network card.

[0233] In one possible implementation, the communication device 600 further includes: a third transmission module, used to run the driver of the access point mode interface in the third process if the target network mode is access point mode; to establish a communication connection with the first wireless network card through the access point mode interface; and to transmit data with the target device through the first wireless network card.

[0234] In one possible implementation, the communication device 600 further includes: a device role determination module, used to determine that the display device is a management device in a peer-to-peer network group if both the peer-to-peer network mode and the access point mode are enabled; wherein the peer-to-peer network group includes the display device and the target device.

[0235] In one possible implementation, the first transmission module 602 is further configured to broadcast the probe request signal via the first wireless network card; establish a connection with the target device in response to the probe response signal sent by the target device; wherein the probe response signal is the response signal corresponding to the probe request signal; and receive target data sent by the target device.

[0236] In one possible implementation, the target data includes target projection data; the communication device 600 further includes a display module for displaying the target projection data sent by the target device.

[0237] It should be noted that the communication device of the aforementioned display device is embodied in the form of a functional unit. The term "module" here can be implemented in software and / or hardware, without specific limitations.

[0238] For example, a "module" can be a software program, hardware circuit, or a combination of both that implements the above functions. Hardware circuits may include application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functions.

[0239] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0240] Figure 6 This is a schematic diagram of the structure of a display device provided in an embodiment of this application.

[0241] For example, such as Figure 6 As shown, the display device 700 includes a memory 701 and a processor 702. The memory 701 stores executable program code 703, and the processor 702 is used to call and execute the executable program code 703 to perform a communication method of the display device.

[0242] This embodiment can divide the device into functional modules according to the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0243] When the functional modules are divided according to their respective functions, the device may also include an instruction receiving module, a first transmission module, a second transmission module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced to the functional description of the corresponding functional module, and will not be repeated here.

[0244] It should be understood that the device provided in this embodiment is used to execute the communication method of the display device described above, and therefore can achieve the same effect as the implementation method described above.

[0245] When using integrated units, the device may include a processing module and a storage module. When applied to a display device, the processing module can be used to control and manage the operation of the display device. The storage module can be used to support the display device in executing relevant program code.

[0246] The processing module may be a processor or a controller, which can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0247] In addition, the device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a communication method for a display device provided in the above embodiments.

[0248] This embodiment also provides a display device circuit board, including a circuit board body, a memory, and a processor; the memory is disposed on the circuit board body and is used to store executable program code; the processor is disposed on the circuit board body and is used to call and run the executable program code in the memory, so that the display device circuit board executes a communication method of a display device.

[0249] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement the communication method of a display device provided in the above embodiment.

[0250] The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVDs), Compact Disc Read-Only Memory (CD-ROM), microdrives, and magneto-optical disks, read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), dynamic random access memory (DRAM), video random access memory (VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0251] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to realize the communication method of a display device provided in the above embodiment.

[0252] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0253] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0254] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0255] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A communication method for a display device, characterized in that, The method includes: Receives a command to enable the target network mode in the display device; If the target network mode is a peer-to-peer network mode, data transmission is performed between the first process and the target device. If the target network mode is client mode, data transmission is performed with the target device through the second process; The first process and the second process are independent processes.

2. The method according to claim 1, characterized in that, The data transmission with the target device via the first process includes: Run the driver for the peer-to-peer network mode interface in the first process; It communicates with the first wireless network card through the peer-to-peer network mode interface; Data is transmitted between the first wireless network card and the target device.

3. The method according to claim 2, characterized in that, The driver that runs the peer-to-peer network mode interface in the first process includes: The first daemon process of the local service layer in the first process is run; wherein the first daemon process is a process used to monitor wireless network communication in the peer-to-peer network mode; Based on the first daemon process, the driver of the peer-to-peer network mode interface is invoked; and the driver of the peer-to-peer network mode interface is run.

4. The method according to claim 3, characterized in that, The first daemon process running the local service layer in the first process includes: Run the first startup process in the hardware abstraction layer of the first process; The first startup process calls the first daemon process and runs the first daemon process.

5. The method according to claim 4, characterized in that, The first startup process in the hardware abstraction layer of the first process includes: The application layer in the first process sends an enable signal for the peer-to-peer network mode to the application framework layer. The application framework layer's waiting connection process is activated by the enable signal; and the first startup process of the hardware abstraction layer is invoked and run.

6. The method according to any one of claims 1 to 5, characterized in that, The data transmission with the target device via the second process includes: Run the driver for the client-mode interface in the second process; The client mode interface is used to establish a communication connection with the second wireless network card. Data is transmitted to the target device via the second wireless network card.

7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: If the target network mode is access point mode, run the driver for the access point mode interface in the third process; It communicates with the first wireless network card through the access point mode interface; Data is transmitted between the first wireless network card and the target device.

8. The method according to claim 7, characterized in that, The method further includes: If both the peer-to-peer network mode and the access point mode are enabled, the display device is determined to be the management device in the peer-to-peer network group. The peer-to-peer network group includes the display device and the target device.

9. The method according to claim 2, characterized in that, The data transmission with the target device via the first wireless network card includes: The detection request signal is broadcast through the first wireless network card; In response to a detection response signal sent by the target device, a connection is established with the target device; wherein, the detection response signal is the response signal corresponding to the detection request signal; Receive target data sent by the target device.

10. The method according to claim 9, characterized in that, The target data includes target projection data; the method further includes: Display the target projection data sent by the target device.

11. A display device, characterized in that, The display device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the display device to perform the method as described in any one of claims 1 to 10.

12. A circuit board for a display device, characterized in that, The display device circuit board includes: Circuit board body; A memory, disposed on the circuit board body, is used to store executable program code; and A processor, disposed on the circuit board body, is configured to call and run the executable program code from the memory, causing the display device to perform the method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 10.