Network connection method and device, computer device and storage medium

By displaying a Bluetooth configuration page and generating Bluetooth data packets on a small, portable hardware device, the problem of being unable to connect to a wireless network due to size and power consumption limitations is solved, thus enabling wireless network configuration.

CN115988676BActive Publication Date: 2026-07-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-10-14
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Due to size and power consumption limitations, small portable hardware devices do not support the full Bluetooth protocol and cannot establish a Bluetooth connection with the terminal, thus making it impossible to configure a wireless network.

Method used

By responding to the network configuration graphic code scanning operation, the Bluetooth configuration page is displayed, and a Bluetooth data packet based on the network connection information of the target network is generated and broadcast to the device to be configured for connection, thus avoiding the need for Bluetooth connection establishment.

Benefits of technology

This enables small hardware devices to connect to a target network via Bluetooth broadcast even if they do not support the full Bluetooth protocol, thus achieving wireless network configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115988676B_ABST
    Figure CN115988676B_ABST
Patent Text Reader

Abstract

The application relates to a network connection method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: in response to a network configuration pattern code scanning operation, a Bluetooth network configuration page of a to-be-network-configured device is displayed; in response to a network configuration operation triggered on the Bluetooth network configuration page, a network selection page is displayed; when a target network is selected from candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on network connection information of the target network; the Bluetooth data packet is broadcasted, so that the to-be-network-configured device is connected to the target network based on the network connection information when the Bluetooth data packet is received, and a network connection state is reported; and according to the network connection state, a network connection result of the to-be-network-configured device to the target network is displayed. By using the method, a small portable hardware device with small size and low energy consumption can be connected to a wireless network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a network connection method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of computer technology, some application scenarios use hardware devices (such as screen mirroring boxes) that do not have a network connection button or input device. How to connect these hardware devices to wireless networks has become an urgent problem to be solved.

[0003] In traditional technology, hardware devices, acting as master devices, broadcast data packets via Bluetooth, while terminals, acting as slave devices, monitor these broadcasts. When a terminal detects a broadcast data packet, it establishes a Bluetooth connection with the hardware device and then uses this connection for network configuration. However, portable, small hardware devices, due to their size and power consumption, typically do not support the full Bluetooth protocol and cannot establish a Bluetooth connection with the terminal. Therefore, these hardware devices cannot be configured for network configuration via Bluetooth. Summary of the Invention

[0004] Therefore, it is necessary to provide a network connection method, device, computer equipment, storage medium, and computer program product to address the above-mentioned technical problems, so that small, low-power portable hardware devices can connect to wireless networks.

[0005] A network connection method, the method comprising:

[0006] In response to the network configuration graphic code scanning operation, display the Bluetooth network configuration page of the device to be configured;

[0007] In response to a network configuration operation triggered on the Bluetooth configuration page, a network selection page is displayed;

[0008] When a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the network connection information of the target network;

[0009] The Bluetooth data packet is broadcast so that when the device to be configured receives the Bluetooth data packet, it connects to the target network based on the network connection information and reports the network connection status.

[0010] Based on the network connection status, the connection result of the device to be configured to the target network is displayed.

[0011] A network connectivity device, the device comprising:

[0012] The display module is used to display the Bluetooth configuration page of the device to be configured in response to the configuration graphic code scanning operation;

[0013] The display module is also used to display a network selection page in response to a network configuration operation triggered on the Bluetooth configuration page;

[0014] The generation module is used to generate Bluetooth data packets based on the network connection information of the target network when a target network is selected from the candidate networks displayed on the network selection page.

[0015] The broadcast module is used to broadcast the Bluetooth data packet so that when the device to be configured receives the Bluetooth data packet, it connects to the target network based on the network connection information and reports the network connection status.

[0016] The display module is also used to display the connection result of the device to be configured to the target network based on the connection status.

[0017] In one embodiment, the display module is further configured to:

[0018] In response to a network distribution graphic code scanning operation triggered by an instant messaging application, the scanned network distribution graphic code is decoded to obtain graphic information;

[0019] When the graphical information contains preset field information, the Bluetooth network configuration page of the device to be configured is displayed through the instant messaging application; the Bluetooth network configuration page displays network configuration controls.

[0020] The display module is also used to display a network selection page in response to a network configuration operation triggered on the network configuration control displayed on the Bluetooth network configuration page.

[0021] In one embodiment, the generation module is further configured to:

[0022] Obtain the network identifier, encryption type, and access password of the target network; the network identifier, encryption type, and access password belong to the network connection information;

[0023] Bluetooth data packets are generated based on the network identifier, the encryption type, and the network access password.

[0024] In one embodiment, the Bluetooth data packet includes a first data packet and a second data packet; the generation module is further configured to:

[0025] The concatenated data of the network identifier, the network access password, and the encryption type is divided into first network connection information and second network connection information;

[0026] The first network connection information and the corresponding field flag are encapsulated to obtain a first data packet; and the second network connection information and the corresponding field flag are encapsulated to obtain a second data packet.

[0027] In one embodiment, both the first data packet and the second data packet include a device name field; the device name field includes a header subfield and a data subfield.

[0028] The header subfield and data subfield of the first data packet respectively store the field flag corresponding to the first network connection information and the first network connection information;

[0029] The header subfield and data subfield of the second data packet respectively store the field flag corresponding to the second network connection information and the second network connection information.

[0030] In one embodiment, the generation module is further configured to:

[0031] Perform a hash calculation on the network identifier to obtain the hash value of the network identifier;

[0032] The network access password is encrypted to obtain the encrypted network access password;

[0033] The hash value, the encrypted network access password, and the encryption type are concatenated to obtain concatenated data.

[0034] The spliced ​​data is divided into first network connection information and second network connection information.

[0035] In one embodiment, the apparatus further includes:

[0036] The selection module is used to select a string of a preset length from the hash values ​​as the target hash value of the network identifier;

[0037] The generation module is also used to concatenate the target hash value, the encrypted network access password, and the encryption type to obtain concatenated data.

[0038] In one embodiment, the broadcast module is further configured to:

[0039] Obtain the broadcast duration for broadcasting the first data packet and the second data packet;

[0040] The first data packet and the second data packet are broadcast sequentially via Bluetooth network within the broadcast duration, so that when the device to be configured receives the first data packet and the second data packet, it can extract the first network connection information and the second network connection information from the first data packet and the second data packet, respectively, and connect to the target network based on the first network connection information and the second network connection information.

[0041] In one embodiment, the apparatus further includes:

[0042] The query module is used to query the network connection status reported by the device to be configured during the broadcasting of the Bluetooth data packet, and start a timer to keep track of the connection status.

[0043] The query module is further configured to, if the network connection status reported by the device to be configured is "connected", execute the step of displaying the connection result of the device to be configured to the target network based on the network connection status.

[0044] The query module is further configured to continue executing the step of broadcasting the Bluetooth data packet if the network status reported by the device to be configured is not connected, until the timer reaches the preset duration.

[0045] In one embodiment, the display module is further configured to:

[0046] If the network connection status reported by the device to be configured is "connected", the device details page of the device to be configured is displayed according to the network connection status.

[0047] On the device details page, the connection results of the device to be configured to the target network are displayed in a floating layer.

[0048] In one embodiment, the device to be configured on the network is a screen projection device; the apparatus further includes:

[0049] The display module is also used to display a screen projection verification page in the instant messaging application in response to the screen projection graphic code scanning operation;

[0050] The acquisition module is used to acquire the screen casting verification code entered on the screen casting verification page;

[0051] The sending module is used to send media data to the screen projection device through the target network if the screen projection verification code passes the verification, so that the screen projection device can project and display the media data.

[0052] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0053] In response to the network configuration graphic code scanning operation, display the Bluetooth network configuration page of the device to be configured;

[0054] In response to a network configuration operation triggered on the Bluetooth configuration page, a network selection page is displayed;

[0055] When a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the network connection information of the target network;

[0056] The Bluetooth data packet is broadcast so that when the device to be configured receives the Bluetooth data packet, it connects to the target network based on the network connection information and reports the network connection status.

[0057] Based on the network connection status, the connection result of the device to be configured to the target network is displayed.

[0058] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0059] In response to the network configuration graphic code scanning operation, display the Bluetooth network configuration page of the device to be configured;

[0060] In response to a network configuration operation triggered on the Bluetooth configuration page, a network selection page is displayed;

[0061] When a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the network connection information of the target network;

[0062] The Bluetooth data packet is broadcast so that when the device to be configured receives the Bluetooth data packet, it connects to the target network based on the network connection information and reports the network connection status.

[0063] Based on the network connection status, the connection result of the device to be configured to the target network is displayed.

[0064] A computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0065] In response to the network configuration graphic code scanning operation, display the Bluetooth network configuration page of the device to be configured;

[0066] In response to a network configuration operation triggered on the Bluetooth configuration page, a network selection page is displayed;

[0067] When a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the network connection information of the target network;

[0068] The Bluetooth data packet is broadcast so that when the device to be configured receives the Bluetooth data packet, it connects to the target network based on the network connection information and reports the network connection status.

[0069] Based on the network connection status, the connection result of the device to be configured to the target network is displayed.

[0070] The aforementioned network connection method, apparatus, computer equipment, storage medium, and computer program product, in response to a network configuration graphic code scanning operation, display a Bluetooth configuration page for the device to be configured, thereby initiating the network configuration process for the device to be configured through a configuration operation triggered on the Bluetooth configuration page. When a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the network connection information of the target network, and then the Bluetooth data packet is broadcast. This allows the device to be configured to connect to the target network based on the network connection information in the Bluetooth data packet upon receiving it. Therefore, the network configuration initiating device acts as the master device for Bluetooth broadcasting, and the device to be configured acts as the slave device for broadcast monitoring. The network configuration initiating device does not need to establish a Bluetooth connection with the device to be configured to send Bluetooth data packets to the device to be configured via Bluetooth broadcasting. This allows the device to obtain network connection information and connect to the target network even when it cannot establish a Bluetooth connection as a master device and terminal due to not supporting the complete Bluetooth protocol.

[0071] A network connection method, the method comprising:

[0072] Monitor Bluetooth data packets broadcast by devices initiating broadcasts in the distribution network;

[0073] When a Bluetooth data packet broadcast by the network distribution initiating device is detected, network connection information is extracted from the Bluetooth data packet; the Bluetooth data packet is generated by the network distribution initiating device based on the network connection information of the target network; the target network is selected on the network selection page of the network distribution initiating device.

[0074] Connect to the target network based on the network connection information;

[0075] The connection status of the target network is obtained and reported, so that the distribution network initiating device can display the connection result to the target network based on the connection status.

[0076] A network connectivity device, the device comprising:

[0077] The monitoring module is used to monitor Bluetooth data packets broadcast by devices initiating the distribution network.

[0078] The extraction module is used to extract network connection information from Bluetooth data packets broadcast by the network distribution initiating device when Bluetooth data packets are detected; the Bluetooth data packets are generated by the network distribution initiating device based on the network connection information of the target network; the target network is selected on the network selection page of the network distribution initiating device.

[0079] A connection module is used to connect to the target network based on the network connection information;

[0080] The acquisition module is used to acquire and report the connection status of the target network, so that the distribution network initiating device can display the connection result of the target network based on the connection status.

[0081] In one embodiment, the Bluetooth data packet includes a first data packet and a second data packet; the extraction module is further configured to:

[0082] When the first data packet broadcast by the distribution network initiating device is detected, the first network connection information is extracted from the first data packet;

[0083] When the second data packet broadcast by the distribution network initiating device is detected, the second network connection information is extracted from the second data packet;

[0084] The network connection information is obtained by splicing data synthesized from the first network connection information and the second network connection information.

[0085] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:

[0086] Monitor Bluetooth data packets broadcast by devices initiating broadcasts in the distribution network;

[0087] When a Bluetooth data packet broadcast by the network distribution initiating device is detected, network connection information is extracted from the Bluetooth data packet; the Bluetooth data packet is generated by the network distribution initiating device based on the network connection information of the target network; the target network is selected on the network selection page of the network distribution initiating device.

[0088] Connect to the target network based on the network connection information;

[0089] The connection status of the target network is obtained and reported, so that the distribution network initiating device can display the connection result to the target network based on the connection status.

[0090] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0091] Monitor Bluetooth data packets broadcast by devices initiating broadcasts in the distribution network;

[0092] When a Bluetooth data packet broadcast by the network distribution initiating device is detected, network connection information is extracted from the Bluetooth data packet; the Bluetooth data packet is generated by the network distribution initiating device based on the network connection information of the target network; the target network is selected on the network selection page of the network distribution initiating device.

[0093] Connect to the target network based on the network connection information;

[0094] The connection status of the target network is obtained and reported, so that the distribution network initiating device can display the connection result to the target network based on the connection status.

[0095] A computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0096] Monitor Bluetooth data packets broadcast by devices initiating broadcasts in the distribution network;

[0097] When a Bluetooth data packet broadcast by the network distribution initiating device is detected, network connection information is extracted from the Bluetooth data packet; the Bluetooth data packet is generated by the network distribution initiating device based on the network connection information of the target network; the target network is selected on the network selection page of the network distribution initiating device.

[0098] Connect to the target network based on the network connection information;

[0099] The connection status of the target network is obtained and reported, so that the distribution network initiating device can display the connection result to the target network based on the connection status.

[0100] The aforementioned network connection method, apparatus, computer equipment, storage medium, and computer program product enable the device to be configured in a network to perform broadcast monitoring. When a Bluetooth data packet broadcast by the network initiating device is detected, network connection information is extracted from the Bluetooth data packet, and the device connects to the target network based on the network connection information. Therefore, for devices to be configured in a network that can only perform broadcast monitoring but not broadcast transmission because they do not support the complete Bluetooth communication protocol, broadcast monitoring can be used to obtain Bluetooth data packets broadcast by the network initiating device, and the device can connect to the target network based on the network connection information in the Bluetooth data packet. Attached Figure Description

[0101] Figure 1 This is a diagram illustrating the application environment of a network connection method in one embodiment.

[0102] Figure 2 This is a flowchart illustrating a network connection method in one embodiment;

[0103] Figure 3This is a schematic diagram of a Bluetooth configuration page in one embodiment;

[0104] Figure 4a This is a schematic diagram of a message page in one embodiment;

[0105] Figure 4b This is a schematic diagram of scanning a page in one embodiment;

[0106] Figure 5 This is a schematic diagram of a network selection page in one embodiment;

[0107] Figure 6 This is a schematic diagram illustrating the broadcast of Bluetooth data packets in one embodiment;

[0108] Figure 7 This is a flowchart illustrating a method for generating Bluetooth data packets in one embodiment;

[0109] Figure 8 This is a flowchart illustrating a method for encapsulating network information in one embodiment;

[0110] Figure 9 This is a schematic diagram of a Bluetooth data packet in one embodiment;

[0111] Figure 10 This is a flowchart illustrating a method for generating network connection information in one embodiment;

[0112] Figure 11 This is a schematic diagram of a device details page in one embodiment;

[0113] Figure 12 This is a schematic diagram of the screen mirroring verification page in one embodiment;

[0114] Figure 13 This is a schematic diagram illustrating the screen-casting verification code and screen-casting graphic code in one embodiment;

[0115] Figure 14a This is a flowchart illustrating a network connection method in one embodiment;

[0116] Figure 14b This is a schematic diagram illustrating the distribution network graphic code in one embodiment;

[0117] Figure 15 This is a diagram illustrating the application environment of the network connection method in another embodiment;

[0118] Figure 16 This is a schematic diagram illustrating the execution steps of the distribution network initiating device in one embodiment;

[0119] Figure 17 This is a schematic diagram illustrating the steps executed by the device to be configured in one embodiment;

[0120] Figure 18 This is a schematic diagram illustrating the screen projection principle in one embodiment;

[0121] Figure 19 This is a structural block diagram of a network connection device in one embodiment;

[0122] Figure 20 This is a structural block diagram of a network connection device in another embodiment;

[0123] Figure 21 This is a structural block diagram of a network connection device in another embodiment;

[0124] Figure 22 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0125] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0126] The network connection method provided in this application can be applied to, for example... Figure 1 The application environment shown includes a network configuration initiator 102 and a device to be configured 104. In response to a network configuration graphic code scanning operation, the network configuration initiator 102 displays the Bluetooth configuration page for the device to be configured 104; in response to a network configuration operation triggered on the Bluetooth configuration page, it displays a network selection page; when a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the target network's network connection information. The network configuration initiator 102 broadcasts the Bluetooth data packet so that the device to be configured 104, upon receiving the Bluetooth data packet, connects to the target network based on the network connection information and reports the connection status. Based on the connection status, the network configuration initiator 102 displays the connection result of the device to be configured 104 to the target network.

[0127] Among them, the network distribution initiating device 102 can be a terminal, which can be a mobile terminal, including smartphones, tablets, smartwatches, vehicle terminals, etc., or it can be a laptop, desktop computer, smart speaker, etc., but is not limited to these. The device to be distributed to the network 104 can be various portable small devices, such as TV boxes, screen mirroring boxes, etc.

[0128] In one embodiment, such as Figure 2 As shown, a network connection method is provided, which is applied to... Figure 1 Taking the distribution network initiating device as an example, the explanation includes the following steps:

[0129] S202, in response to the network configuration graphic code scanning operation, displays the Bluetooth network configuration page of the device to be configured.

[0130] Graphic codes, including QR codes and barcodes, are graphics that record data information using regularly distributed black-and-white geometric shapes. They encode data using these geometric shapes, and the data information recorded in the graphic code can be obtained by decoding the graphics. Network configuration graphic codes are used to configure devices within a network. The decoded graphic information contains fields instructing the initiating device to display a Bluetooth network configuration page. Scanning is performed using image acquisition devices or photoelectric scanning devices. For example, graphic codes can be scanned using an image acquisition device on a mobile terminal.

[0131] Among them, the device to be configured for network access is the device that needs to connect to the wireless network. It can be various portable small devices, such as TV boxes, screen mirroring boxes, etc. The device to be configured for network access is characterized by its small size and low power consumption. The operating system installed on it supports incomplete Bluetooth BLE (Bluetooth Low Energy) technology. It can only broadcast and monitor Bluetooth data packets through the Bluetooth BLE protocol, but cannot broadcast and send Bluetooth data packets through the Bluetooth BLE protocol.

[0132] Network configuration is the process by which devices to be configured obtain network connection information for a wireless network and then connect to the wireless network based on that information. The wireless network can be a Wi-Fi (Wireless Fidelity) wireless local area network or other wireless networks.

[0133] The Bluetooth pairing page is the page that can trigger pairing operations. This page can include pairing controls, which can be used to trigger pairing operations. For example, pairing operations can be triggered by clicking, dragging, or sliding the pairing controls. Specifically, such as... Figure 3 As shown, the Bluetooth network configuration page includes a "Configure Network" button, and the network configuration operation can be triggered by clicking the "Configure Network" button.

[0134] In one embodiment, the device to be configured is connected to a display device, and the display device shows a configuration graphic code; S202 specifically includes: the configuration initiating device responds to the scanning operation of the configuration graphic code displayed on the display device and displays a Bluetooth configuration page for configuring the device to be configured.

[0135] In one embodiment, before S202, the method further includes: the network configuration initiating device responding to a scan command triggered by an application, performing a network configuration graphic code scanning operation via the application; S202 specifically includes: the network configuration initiating device responding to the network configuration graphic code scanning operation, causing the application to display a Bluetooth network configuration page for configuring the device to be configured. The application can be various applications such as instant messaging applications, social applications, office applications, and game applications, for example, WeChat for Business, WeChat for Personal Use, QQ, and mini-games. For example, such as... Figure 4a As shown, the application is an instant messaging application. In response to clicking the "Add" button, the instant messaging application displays a pop-up window on the message page containing a "Scan" control. The scan command is triggered by clicking the scan control in the pop-up window. The distribution network initiating device responds to the scan command triggered by clicking "Scan" and performs a distribution network graphic code scan operation. For example... Figure 4b As shown, the distribution network initiating device scans the distribution network graphic code in a scanning box displayed through an instant messaging application.

[0136] S204, in response to a network configuration operation triggered on the Bluetooth configuration page, displays the network selection page.

[0137] The network configuration operation is used to initiate the network configuration process. This can be triggered by network configuration controls on the Bluetooth network configuration page, or by sliding or dragging the Bluetooth network configuration page. For example, if the network configuration operation is triggered by sliding the Bluetooth network configuration page, the network initiating device will respond to the sliding operation by displaying a network selection page through an instant messaging application.

[0138] The network selection page displays candidate networks. The device initiating the network configuration can choose the wireless network from this list to connect to. For example... Figure 5 As shown, the network selection page includes several candidate networks, namely WechatWork-Staffwifi1-4.

[0139] In one embodiment, the network configuration graphic code scanning operation is triggered by an instant messaging application, and the Bluetooth network configuration page is the page displayed by the instant messaging application. S204 specifically includes: in response to the network configuration operation triggered on the Bluetooth network configuration page, the network configuration initiating device switches the Bluetooth network configuration page displayed by the instant messaging application to a network selection page.

[0140] S206, When a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the network connection information of the target network.

[0141] Network connection information refers to the information required for the device to be configured to access the target network, including the target network's network identifier, access password, and encryption type. The network identifier is the name of the target network, composed of numbers, letters, and special symbols. For example, the network identifier could be WechatWork-Staffwifi1. The encryption type specifies the type of security encryption applied to the target network, including WEP (Wired Equivalent Privacy), WPA (Wi-Fi Protected Access), WPA2, WPA3, WPA2 Enterprise, and WPA3 Enterprise. The device initiating the configuration can use numbers and letters to represent the encryption type; for example, the number "1" represents WEP encryption, and the number "2" represents WPA encryption.

[0142] Bluetooth data packets are data packets encapsulated based on the Bluetooth protocol. The Bluetooth protocol can be the classic Bluetooth protocol or the BLE Bluetooth protocol, etc. The Bluetooth data packet may include a devicename field; the device initiating the network configuration can write network connection information into the devicename field. In addition, the Bluetooth data packet may also carry a flag bit for identification, which can be a UUID (Universally Unique Identifier).

[0143] In one embodiment, the network selection page displays multiple candidate networks. S206 specifically includes: the network configuration initiating device selecting a target network in response to a selection operation triggered on the network selection page; when a password is required to access the target network, the network configuration initiating device obtaining the access password for the candidate network in response to a password input operation; the network configuration initiating device obtaining the network identifier, encryption type, and access password of the target network; and generating Bluetooth data packets based on the network identifier, encryption type, and access password. For example, ... Figure 5 As shown, when a password is required to access the target network, the distribution network initiating device responds to the click operation triggered by the "Password Required to Connect to Network" control by displaying a password input box and retrieving the network access password entered in the password input box. When a password is not required to access the target network, the distribution network initiating device responds to the confirmation operation triggered by clicking the "Password Not Required to Connect to Network" control, confirming that a network access password is not required to access the target network.

[0144] S208 broadcasts Bluetooth data packets so that when the device to be configured receives the Bluetooth data packets, it connects to the target network based on the network connection information and reports the network connection status.

[0145] Broadcasting Bluetooth data packets enables the network initiating device to broadcast Bluetooth data packets as the master device. The device to be configured acts as a slave device and monitors the broadcast. The network connection status indicates the connection status of the device to be configured to the target network, including connected and disconnected states.

[0146] In one embodiment, the Bluetooth data packet includes a first data packet and a second data packet; the network connection information includes first network connection information and second network connection information; S208 specifically includes: obtaining the broadcast duration for broadcasting the first data packet and the second data packet; broadcasting the first data packet and the second data packet sequentially within the broadcast duration via the Bluetooth network, so that when the device to be configured receives the first data packet and the second data packet, it extracts the first network connection information and the second network connection information from the first data packet and the second data packet respectively, and connects to the target network based on the first network connection information and the second network connection information. For example, as... Figure 6 As shown, the broadcast duration is 15 seconds. First, the first data packet is broadcast continuously for 15 seconds, then the second data packet is broadcast continuously for 15 seconds, and so on. Because the network connection information is quite long, a single Bluetooth data packet may not be able to contain all the network connection information. Therefore, the configuration initiating device can divide the Bluetooth data packet into a first data packet and a second data packet, and transmit part of the network connection information through the first and second data packets respectively. This avoids the loss of network connection information when the Bluetooth data packet cannot contain all the network connection information, especially when the network connection information is too long.

[0147] S210 displays the connection results of the device to be configured to the target network based on the network connection status.

[0148] The connection result indicates whether the device to be configured has successfully connected to the target network, including successful connection and connection failure. The device initiating the configuration can display the connection result on the device details page. When the connection result is successful, the device details page can also display the device details of the device to be configured.

[0149] In one embodiment, when the network connection status is found to be connected, the device serial number of the device to be configured is added to the device list of the instant messaging application to bind the device and prevent other instant messaging applications from using it. The device serial number can be obtained by decoding the configuration QR code from the configuration initiating device.

[0150] In one embodiment, before S210, the method further includes: querying the network status reported by the device to be configured during the broadcasting of Bluetooth data packets, and starting a timer to start timing; S210 specifically includes: if the network status reported by the device to be configured is connected, then performing the step of displaying the connection result of the device to be configured to the target network according to the network status; if the network status reported by the device to be configured is not connected, then continuing to perform the step of broadcasting Bluetooth data packets until the timer reaches the preset duration.

[0151] The device to be configured on the network can report its network connection status to the backend server of the instant messaging application running on the network configuration initiating device. The network configuration initiating device then queries the backend server for the network connection status reported by the device to be configured through the instant messaging application. When the query finds that the network connection status reported by the device to be configured is "connected," it stops broadcasting Bluetooth data packets and displays the connection result indicating that the device to be configured has successfully connected to the target network. If, after the timer has elapsed for a preset period, the query finds that the network connection status reported by the device to be configured is still "not connected," then the query displays the connection result indicating that the device to be configured has failed to connect to the target network.

[0152] A timer tracks the duration of Bluetooth data packet broadcast by the network initiating device. If the network connection status reported by the device to be configured is still "not connected" after the preset broadcast duration, it indicates that the device to be configured cannot access the target network via network connection information. In this case, the network initiating device stops broadcasting Bluetooth data packets and displays the connection result indicating the device to be configured has failed to connect to the target network. This prevents the network initiating device from continuing to broadcast Bluetooth data packets for an extended period when the device to be configured cannot access the target network, thus saving time and reducing network configuration efficiency.

[0153] In the above embodiments, in response to the network configuration graphic code scanning operation, a Bluetooth network configuration page for the device to be configured is displayed, thereby initiating the network configuration process for the device to be configured through a network configuration operation triggered on the Bluetooth network configuration page. When a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the network connection information of the target network, and then the Bluetooth data packet is broadcast. This allows the device to be configured to connect to the target network based on the network connection information in the Bluetooth data packet when it receives the Bluetooth data packet. Therefore, the network configuration initiating device acts as the master device to perform Bluetooth broadcasting, and the device to be configured acts as the slave device to perform broadcast monitoring. The network configuration initiating device does not need to establish a Bluetooth connection with the device to be configured to send Bluetooth data packets to the device to be configured via Bluetooth broadcasting. This allows the device to obtain network connection information and connect to the target network even when it cannot establish a Bluetooth connection with the network configuration initiating device as the master device due to not supporting the complete Bluetooth protocol.

[0154] In one embodiment, S202 specifically includes: in response to a network configuration graphic code scanning operation triggered by an instant messaging application, decoding the scanned network configuration graphic code to obtain graphic information; when the graphic information contains preset field information, displaying the Bluetooth network configuration page of the device to be configured through the instant messaging application; displaying network configuration controls on the Bluetooth network configuration page; S204 specifically includes: in response to a network configuration operation triggered on the network configuration controls displayed on the Bluetooth network configuration page, displaying a network selection page.

[0155] The instant messaging application is a client application running on the distribution network initiating device, such as WeChat for Business or personal WeChat. The distribution network graphic code scanning operation is triggered and executed through the instant messaging application. For example... Figure 4a As shown, the distribution network initiating device responds to the scanning command triggered by clicking the scan control in the pop-up window of the instant messaging application and performs a distribution network graphic code scanning operation.

[0156] Graphical information refers to information recorded in a patterned graphic representation of a power distribution network, including links and text information. For example, graphical information can be a network address, which leads to a corresponding webpage.

[0157] The preset field information is used to instruct the network configuration initiating device to display the Bluetooth configuration page. The preset field information can be a string composed of numbers, letters, special characters, etc. In one embodiment, the graphic information is link information. After decoding the link information from the configuration graphic code, the network configuration initiating device determines whether the link information contains the preset field information. If the link information contains the preset field information, the network configuration initiating device displays the Bluetooth configuration page for the device to be configured via an instant messaging application. In response to a configuration operation triggered on the configuration control displayed on the Bluetooth configuration page, the network configuration initiating device displays a network selection page via the instant messaging application.

[0158] In the above embodiments, the network configuration initiating device decodes the scanned network configuration graphic code to obtain graphic information. When the graphic information contains preset field information, the Bluetooth network configuration page of the device to be configured is displayed through an instant messaging application. When the device to be configured cannot act as the master device to initiate the Bluetooth network configuration process via Bluetooth broadcast, the network configuration initiating device acts as the master device, initiates the Bluetooth network configuration process through the instant messaging application, and configures the device to be configured through the initiated Bluetooth network configuration process, thereby enabling devices to be configured that do not support the complete Bluetooth protocol to access the wireless network.

[0159] In one embodiment, such as Figure 7 As shown, S206 specifically includes the following steps:

[0160] S702, obtain the network identifier, encryption type, and access password of the target network; the network identifier, encryption type, and access password are network connection information.

[0161] The network identifier is the name of the target network, composed of numbers, letters, and special symbols. For example, the network identifier could be WechatWork-Staffwifi1. The encryption type is the type of security encryption applied to the target network, including WEP, WPA, WPA2, WPA3, WPA2 Enterprise, and WPA3 Enterprise.

[0162] In one embodiment, S702 specifically includes: in response to a selection operation triggered on the network selection page, selecting a target network from the candidate networks on the network selection page, and obtaining the network identifier and encryption type of the selected target network; when an access password is required to access the target network, popping up a password input box, and obtaining the access password entered in the password input box.

[0163] S704 generates Bluetooth data packets based on network identifier, encryption type, and network access password.

[0164] The network initiating device encapsulates the network identifier, encryption type, and network access password to generate a Bluetooth data packet. This generated Bluetooth data packet can be one or multiple. The network identifier, encryption type, and network access password can be written into the same Bluetooth data packet or into multiple different Bluetooth data packets.

[0165] In the above embodiments, the network identifier, encryption type, and network access password of the target network are obtained, and Bluetooth data packets are generated based on the network identifier, encryption type, and network access password. This allows the network configuration initiating device to act as the master device and broadcast Bluetooth data packets to the devices to be configured, thus enabling network configuration for the devices to be configured.

[0166] In one embodiment, the Bluetooth data packet includes a first data packet and a second data packet; such as Figure 8 As shown, S704 specifically includes the following steps:

[0167] S802 divides the concatenated data of network identifier, network access password and encryption type into first network connection information and second network connection information.

[0168] The concatenated data is obtained by concatenating the network identifier, access password, and encryption type. The concatenated data can be obtained by directly concatenating the network identifier, access password, and encryption type, or it can be obtained by concatenating data generated based on the network identifier, access password, and encryption type. For example, the concatenated data could be obtained by concatenating the hash value of the network identifier, the encrypted access password, and the encryption type.

[0169] The first network connection information and the second network connection information are both portions of the concatenated data. The lengths of the first and second network connection information can be the same or different. For example, the first network connection information could be the first 20 bytes of the concatenated data, or it could be bytes 21 to 30. When the length of the Bluetooth data packet cannot accommodate all the concatenated data, the network configuration initiating device can divide the concatenated data into first and second network connection information and write them into separate Bluetooth data packets.

[0170] S804, the first network connection information and the field flag corresponding to the first network connection information are encapsulated to obtain a first data packet; and the second network connection information and the field flag corresponding to the second network connection information are encapsulated to obtain a second data packet.

[0171] The field flags are identifiers used to distinguish Bluetooth data packets, including letters, numbers, and special characters. For example, the device initiating the network configuration uses the field flag "PS@" to identify the first data packet and the field flag "PE@" to identify the second data packet. When the device to be configured receives a data packet with the field flag "PS@", it confirms receipt of the first data packet and caches the first network connection information extracted from it. When it receives a data packet with the field flag "PE@", it confirms receipt of the second data packet, combines the second network connection information extracted from it with the cached first network connection information to form network connection information, and connects to the target network based on this network connection information.

[0172] In one embodiment, both the first data packet and the second data packet include a device name field; the device name field includes a header subfield and a data subfield; the header subfield and the data subfield of the first data packet respectively store the field flag corresponding to the first network connection information and the first network connection information; the header subfield and the data subfield of the second data packet respectively store the field flag corresponding to the second network connection information and the second network connection information.

[0173] The device name field is a field composed of a portion of the bytes in the Bluetooth data packet, including header subfields and data subfields. For example... Figure 9As shown, the Bluetooth data packet includes a device name field, which comprises a header subfield and a data subfield. The header subfield of the first data packet can store the field flag corresponding to the first network connection information, i.e., the field flag "PS@" corresponding to the first data packet, and the data subfield of the first data packet can store the first network connection information. Similarly, the header subfield of the second data packet can store the field flag corresponding to the second network connection information, i.e., the field flag "PE@" corresponding to the second data packet, and the data subfield of the second data packet can store the second network connection information.

[0174] In the above embodiments, the network configuration initiating device divides the network identifier, network access password, and encrypted concatenated data into first network connection information and second network connection information, and encapsulates them in different Bluetooth data packets to avoid the Bluetooth data packet length being insufficient to contain all the network connection information. Thus, the network connection information can be sent to the device to be configured via broadcast Bluetooth data packets, enabling the device to connect to the target network based on the network connection information.

[0175] In one embodiment, such as Figure 10 As shown, S802 specifically includes:

[0176] S1002, perform hash calculation on the network identifier to obtain the hash value of the network identifier.

[0177] Hash computation is a method of calculating a data digest by mapping input data to a hash function. Commonly used hash computation algorithms include MD4 (Message Digest), MD5, and SHA-1.

[0178] S1004, encrypt the network access password to obtain the encrypted network access password.

[0179] Distribution network initiating devices can encrypt network access passwords using either asymmetric or symmetric encryption algorithms. Symmetric encryption algorithms use the same encryption and decryption keys, including AES (Advanced Encryption Standard), DES (Data Encryption Standard), RC5, and TDEA. Asymmetric encryption algorithms use different public and private keys for encryption and decryption, including RSA, ECC (Error Correcting Code), and DH algorithms.

[0180] In one embodiment, the distribution network initiating device uses the CBC (Cipher Block Chaining) encryption mode of the AES encryption method to perform symmetric encryption on the access password, and the initial vector N parameter used for encryption is the key itself used for encryption.

[0181] In one embodiment, after encrypting the network access password, the distribution network initiating device converts the encrypted network access password into a visible character form using the base64 algorithm.

[0182] S1006 concatenates the hash value, the encrypted access password, and the encryption type to obtain concatenated data.

[0183] In this process, concatenation involves linking data sequences sequentially. For example, the distribution network initiating device might use a 1-byte data sequence to store the encryption type, a 16-byte data sequence to store the hash value, and a 24-byte data sequence to store the encrypted access password. Then, the 16-byte hash value is concatenated after the 1-byte encryption type, and the 24-byte encrypted access password is concatenated after the hash value, resulting in 41 bytes of concatenated data.

[0184] In one embodiment, the distribution network initiating device concatenates the hash value, the encrypted access password in visible character form, and the encryption type to obtain concatenated data.

[0185] S1008, divide the spliced ​​data into first network connection information and second network connection information.

[0186] The network initiating device divides the spliced ​​data into two parts: first network connection information and second network connection information. This allows the first and second network connection information to be encapsulated in separate Bluetooth data packets. The lengths of the first and second network connection information can be the same or different.

[0187] In one embodiment, after S1002, the method further includes: selecting a string of a preset length from the hash value as the target hash value for the network identifier; S1006 specifically includes: concatenating the target hash value, the encrypted network access password, and the encryption type to obtain concatenated data.

[0188] Specifically, the distribution network initiating device can extract a portion of bytes from the hash value as the target hash value for the network identifier. For example, the distribution network initiating device can extract 16 bytes from the hash value as the target hash value. The distribution network initiating device can then concatenate the extracted bytes from the hash value, the encrypted network access password, and the encryption type in sequence to obtain the concatenated data.

[0189] In the above embodiments, the network initiating device performs hash calculation on the network identifier, mapping the network identifier to a shorter hash value, thereby improving the byte utilization rate in Bluetooth data packets. Furthermore, encrypting the network access password prevents its theft, enhancing its security.

[0190] In one embodiment, S210 specifically includes: if the network connection status reported by the device to be configured is "connected", display the device details page of the device to be configured according to the network connection status; on the device details page, display the connection result of the device to be configured to the target network in a floating layer.

[0191] The device details page displays detailed information about the devices to be configured on the network, and can be displayed within the application of the network initiating device. For example, the network initiating device might display the device details page through an instant messaging application. A floating layer is a view with transparency that is overlaid on the page. The floating layer method refers to the way information is displayed. For example, such as... Figure 11 As shown, the device details page displays that the device to be configured for network connection is a screen mirroring box. If the device initiating the network configuration finds that the connection status reported by the device to be configured for network connection is "connected", a pop-up will be displayed, showing the connection result "Connection successful". When the device initiating the network configuration receives a query command triggered by clicking the device details control on the device details page, the device details of the screen mirroring box will be displayed.

[0192] In the above embodiments, when the device to be configured connects to the wireless network, the configuration initiating device displays the device details page of the device to be configured based on the connection status, and displays the connection result of the device to the target network in a floating layer on the device details page. This promptly notifies the user that the device to be configured has connected to the wireless network, improving the efficiency of displaying the connection result.

[0193] In one embodiment, the device to be configured on the network is a screen projection device; after S210, the method further includes: in response to the screen projection graphic code scanning operation, displaying a screen projection verification page in an instant messaging application; obtaining the screen projection verification code entered on the screen projection verification page; if the screen projection verification code passes the verification, sending media data to the screen projection device through the target network so that the screen projection device can project and display the media data.

[0194] The network initiator broadcasts Bluetooth data packets, enabling the projection device to connect to the target network based on its network connectivity information upon receiving the Bluetooth data packets. Once the projection device successfully connects to the target network, it can receive media data sent by instant messaging applications and project the media data onto the screen.

[0195] The screen mirroring graphic code is a graphic code used to mirror the screen of a device. Specifically, it can be a graphic code displayed by the device to be configured on the display device. The screen mirroring verification page is used to enter the screen mirroring verification code. The screen mirroring verification code is a code symbol used to verify the screen mirroring operation. Specifically, it can be a sequence of numbers, or a sequence composed of numbers, letters, etc. For example, ... Figure 12 As shown, the screen mirroring verification page includes a screen mirroring verification code input area, a "Start Screen Mirroring" trigger control, and a keyboard. The network initiating device obtains the screen mirroring verification code entered on the screen mirroring verification page, and then verifies the screen mirroring verification code. If the screen mirroring verification code passes the verification, the media data is sent to the screen mirroring device through the target network, so that the screen mirroring device can display the media data.

[0196] Screen mirroring can involve sending media data to a display device for display, or projecting media data onto a screen, wall, or other display surface. For example, a screen mirroring device can acquire media data playing on a mobile terminal and then send the acquired media data to a display device (e.g., a television) for playback, allowing the media data to be played on a larger screen.

[0197] In one embodiment, if the network connection status reported by the device to be configured is "connected," the device initiating the configuration adds the device serial number of the device to be configured to the device list of the instant messaging application to bind the device. For example... Figure 13 As shown, after the device to be configured on the network is bound, it displays a screen mirroring graphic code and a screen mirroring verification code. The network configuration initiating device responds to the screen mirroring graphic code scanning operation by displaying a screen mirroring verification page in the instant messaging application. It then compares the screen mirroring verification code entered on the verification page with the screen mirroring verification code displayed on the device to be configured. If the two codes match, the user-entered verification code passes verification, and the network configuration initiating device sends media data to the screen mirroring device via the target network, enabling the screen mirroring device to display the media data.

[0198] In the above embodiments, the distribution network device responds to the screen projection graphic code scanning operation by displaying a screen projection verification page in the instant messaging application and obtaining the screen projection verification code entered on the screen projection verification page. If the screen projection verification code is verified, the media data is sent to the screen projection device through the target network so that the screen projection device can project and display the media data. This improves the efficiency of media data display by enabling media data to be sent to the screen projection device through the target network for screen projection display.

[0199] In one embodiment, such as Figure 14a As shown, a network connection method is provided, which is applied to... Figure 1Taking the device to be configured on the network as an example, the following steps are included:

[0200] S1402a monitors Bluetooth data packets broadcast by devices initiating the distribution network.

[0201] Among them, the network configuration initiating device is the device that initiates the Bluetooth network configuration process as the master device. It can be a mobile terminal, smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, vehicle terminal, etc., but is not limited to these.

[0202] Bluetooth data packets are data packets encapsulated based on the Bluetooth protocol. The Bluetooth protocol can be the classic Bluetooth protocol or the BLE Bluetooth protocol, etc. Bluetooth data packets may include a device name field, from which the network connection information of the target network that the device to be configured is expected to access can be read.

[0203] In one embodiment, the graphic code includes a network configuration graphic code and a binding graphic code; prior to S602, the method further includes: after the device to be configured is powered on, checking whether it is connected to a wireless network; if not connected to a wireless network, displaying the network configuration graphic code so that the network configuration initiating device responds to the scanning operation of the network configuration graphic code and displays a Bluetooth network configuration page for configuring the device to be configured; if connected to a wireless network, displaying the binding graphic code so that the network configuration initiating device responds to the scanning operation of the binding graphic code and binds the device to be configured to the device list. The network configuration graphic code displayed by the device to be configured on the page is as follows: Figure 14b As shown.

[0204] S1404a, when a Bluetooth data packet broadcast by the distribution network initiating device is detected, network connection information is extracted from the Bluetooth data packet; the Bluetooth data packet is generated by the distribution network initiating device based on the network connection information of the target network; the target network is selected on the network selection page of the distribution network initiating device.

[0205] The network connection information refers to the information required for the device to be configured to access the target network, including the target network's network identifier, access password, and encryption type. The network identifier is the name of the target network, composed of numbers, letters, and special symbols. For example, the network identifier could be WechatWork-Staffwifi1. The encryption type specifies the type of security encryption applied to the target network, including WEP, WPA, WPA2, WPA3, WPA2 Enterprise, and WPA3 Enterprise. The device initiating the configuration can use numbers and letters to represent the encryption type; for example, the number "1" represents WEP encryption, and the number "2" represents WPA encryption.

[0206] The network selection page displays candidate networks. The device initiating the network configuration can choose the wireless network that the device to be configured will connect to from the candidate networks displayed on the network selection page. The selected wireless network is the target network.

[0207] In one embodiment, S1404a specifically includes: the device to be configured monitors the Bluetooth broadcast channel; when a Bluetooth data packet carrying a specific flag bit is detected, it determines that the detected data packet is a Bluetooth data packet broadcast by the device initiating the configuration network; and extracts network connection information from the device name field of the Bluetooth data packet.

[0208] S1406a, connect to the target network based on network connection information.

[0209] When a device receiving network connection information connects to a target network, it does so based on this information. The network connection information may include a network identifier, access password, and encryption type. The device selects a wireless network from the currently covered networks that matches the network identifier as the target network, and then accesses that target network using the access password and encryption type.

[0210] In one embodiment, after determining the target network, the device to be configured sends the access password and encryption type obtained from the network connection information to the network device, so that the network device verifies the access password based on the encryption type, and allows the device to access the target network when the access password is verified.

[0211] S1408a: Obtain the network connection status of the target network and report it, so that the distribution network initiating device can display the network connection result of the target network based on the network connection status.

[0212] The network connection status indicates the connection status of the device to be configured to the target network, including a connected state and a disconnected state. Before the device connects to the target network, the network connection status is disconnected; once the device successfully connects, the network connection status becomes connected. The device can report its network connection status to the server, which then relays the status back to the network configuration initiating device.

[0213] In one embodiment, S1408a specifically includes: the device to be configured reports the connection status of the target network to the backend server of an instant messaging application, wherein the instant messaging application is an application client installed on the configuration initiating device. The backend server responds to the query request sent by the configuration initiating device through the instant messaging application and feeds back the connection status of the target network to the configuration initiating device.

[0214] In the above embodiments, the device to be configured on the network performs broadcast monitoring. When it detects a Bluetooth data packet broadcast by the network initiating device, it extracts network connection information from the Bluetooth data packet and connects to the target network based on the network connection information. Therefore, for devices to be configured on the network that can only perform broadcast monitoring but not broadcast transmission because they do not support the complete Bluetooth communication protocol, they can obtain the Bluetooth data packet broadcast by the network initiating device through broadcast monitoring and connect to the target network based on the network connection information in the Bluetooth data packet.

[0215] In one embodiment, the Bluetooth data packet includes a first data packet and a second data packet; when a Bluetooth data packet broadcast by the distribution network initiating device is detected, extracting network connection information from the Bluetooth data packet includes: when a first data packet broadcast by the distribution network initiating device is detected, extracting first network connection information from the first data packet; when a second data packet broadcast by the distribution network initiating device is detected, extracting second network connection information from the second data packet; and obtaining network connection information by splicing data synthesized based on the first network connection information and the second network connection information.

[0216] The first data packet and the second data packet are both Bluetooth data packets, each carrying some network connection information, namely the first network connection information and the second network connection information.

[0217] In one embodiment, the device name field of the first data packet and the second data packet includes a header subfield and a data subfield. The device to be configured extracts the field flag corresponding to the first network connection information and the first network connection information from the header subfield and the data subfield of the first data packet, respectively; and extracts the field flag corresponding to the second network connection information and the second network connection information from the header subfield and the data subfield of the second data packet, respectively.

[0218] In one embodiment, the field flag corresponding to the first data packet is "PS@", and the field flag corresponding to the second data packet is "PE@". When the device to be configured receives a Bluetooth data packet with the field flag "PS@", it confirms that the first data packet has been detected and caches the first network connection information extracted from the first data packet. When the device to be configured receives a Bluetooth data packet with the field flag "PE@", it confirms that the second data packet has been detected and concatenates the second network connection information extracted from the second data packet with the cached first network connection information to obtain concatenated data. Then, the network connection information is obtained based on the concatenated data.

[0219] In one embodiment, this application also provides an application scenario in which the above-described network connection method is applied. Specifically, the network connection method is applied in this scenario as follows:

[0220] like Figure 15As shown, mobile terminal 1502 is the network configuration initiator, and screen mirroring box 1506 is the device to be configured. Mobile terminal 1502 and screen mirroring box 1506 transmit Bluetooth data packets via Bluetooth broadcast. Screen mirroring box 1506 runs on a KitKat version of Android, which only supports an incomplete Bluetooth BLE protocol. It can monitor Bluetooth data packet broadcasts but cannot broadcast Bluetooth data packets. Screen mirroring box 1506 is connected to display device 1508 via an HDMI interface. When screen mirroring box 1506 is powered on, it checks if it is connected to the wireless network. If it is not connected, a network configuration graphic code is displayed on display device 1508.

[0221] like Figure 16 As shown, mobile terminal 1502 scans the network configuration graphic code via an instant messaging application. In response to the network configuration graphic code scanning operation, it displays the Bluetooth network configuration page of the projection box 1506. The Bluetooth network configuration page includes a network configuration control. In response to the network configuration operation triggered by clicking the network configuration control, mobile terminal 1502 displays a network selection page. The network selection page displays multiple candidate networks. In response to the selection operation for a candidate network, mobile terminal 1502 selects the target network from the candidate networks and then generates a Bluetooth data packet based on the network connection information of the target network. The Bluetooth data packet may include a first data packet and a second data packet. The network connection information includes the network identifier, network access password, and encryption type of the target network.

[0222] Mobile terminal 1502 performs MD5 hash calculation on the network identifier to obtain the hash value of the network identifier. Then, it extracts a portion of bytes from the obtained hash value and writes it into the Bluetooth data packet. For example, the first 16 bytes of the hash value are written into the device name field of the Bluetooth data packet. The mobile terminal performs symmetric encryption on the network access password using the CBC (Cipher Block Chaining) encryption mode of the AES encryption method. The initialization vector N parameter used for encryption is the key itself.

[0223] Mobile terminal 1502 splits the concatenated data obtained by truncating a portion of the hash value, the encrypted network access password, and the encryption type into first network connection information and second network connection information. Then, it encapsulates the first network connection information and the corresponding field flag "PS@" in the device name field of the first data packet, and encapsulates the second network connection information and the corresponding field flag "PE@" in the device name field of the second data packet.

[0224] Mobile terminal 1502 calls the Bluetooth BLE broadcast interface to broadcast the first data packet and the second data packet in a loop according to the broadcast duration. For example, mobile terminal 1502 can set the broadcast duration to 15 seconds. After broadcasting the first data packet for 15 seconds, it will then broadcast the second data packet for 15 seconds, and so on.

[0225] During the broadcasting of Bluetooth data packets, mobile terminal 1502 queries the network connection status reported by screen mirroring box 1506 and starts a timer. If the screen mirroring box 1506 reports a connected network status, it displays the successful connection result of screen mirroring box 1506 to the target network. If the screen mirroring box 1506 reports a disconnected network status, it continues broadcasting Bluetooth data packets until the timer reaches the preset duration. If the connection status is still disconnected after the preset duration, it displays a failed connection result.

[0226] like Figure 17 As shown, after powering on, the screen mirroring box 1506 checks for a network connection. If a wireless network is connected, it displays a binding QR code, allowing the mobile terminal 1502 to respond to the QR code scanning operation triggered by the instant messaging application and bind the device to be configured to the device list of the instant messaging application. If no wireless network is connected, the screen mirroring box 1506 determines whether Bluetooth configuration is required. If Bluetooth configuration is required, it displays a configuration QR code, allowing the configuration initiating device to respond to the configuration graphic code scanning operation triggered by the instant messaging application and initiate the configuration process.

[0227] While displaying the network configuration graphic code, the screen mirroring box 1506 begins Bluetooth broadcast monitoring. When it detects a Bluetooth data packet broadcast by the mobile terminal 1502, it extracts the device name field from the Bluetooth data packet and then extracts the network connection information from the device name field. If the detected Bluetooth data packet includes a first data packet and a second data packet, it concatenates the first network connection information extracted from the first data packet and the second network connection information extracted from the second data packet, and obtains the hash value of the network identifier, the network access password, and the encryption type based on the concatenated data.

[0228] The 1506 screen mirroring box calculates the hash value of the network identifier of each wireless network currently in coverage, selects the target network from each wireless network based on the calculated hash value, and accesses the target network using the network access password and encryption type extracted from the Bluetooth data packet.

[0229] If the screen mirroring box 1506 successfully connects to the target network, it reports the network connection status to the backend server of the instant messaging application via CGI (Common Gateway Interface) commands, and displays a successful network connection and binding graphic code on the display device. After receiving the network connection status reported by the screen mirroring box, the backend server of the instant messaging application responds to the query command sent by the mobile terminal 1502 through the client of the instant messaging application, and feeds back the network connection status of the screen mirroring box 1506 to the mobile terminal.

[0230] After the screen mirroring box 1506 connects to the wireless network, the mobile terminal 1502 adds the device serial number of the screen mirroring box 1506 connected to the wireless network to the device list of the instant messaging application, and sends a binding success command to the screen mirroring box 1506 so that the screen mirroring box 1506 responds to the binding success command and displays the screen mirroring graphic code.

[0231] In response to a screen mirroring graphic code scanning operation triggered by an instant messaging application, mobile terminal 1502 displays a screen mirroring verification code input page, obtains the screen mirroring verification code entered on the input page, verifies the obtained verification code, and if the verification code passes, sends media data to the background server 1504 of the instant messaging application. The background server 1504 forwards the media data to the screen mirroring box 1506, which then sends the media data to the display device 1508 for display. Specifically, the process of mobile terminal 1502 mirroring media data to display device 1508 is as follows: Figure 18 As shown.

[0232] It should be understood that, although Figure 2 , 7 The steps in flowcharts 8, 10, and 14a are shown sequentially as indicated by the arrows; however, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order requirement for the execution of these steps, and they can be executed in other orders. Furthermore, Figure 2 , 7 At least some of the steps in 8, 10, and 14a may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0233] In one embodiment, such as Figure 19As shown, a network connection device is provided. This device can be a software module, a hardware module, or a combination of both, integrated into a computer device. Specifically, the device includes: a display module 1902, a generation module 1904, and a broadcast module 1906, wherein:

[0234] Display module 1902 is used to display the Bluetooth network configuration page of the device to be configured in response to the graphic code scanning operation;

[0235] The display module 1902 is also used to display the network selection page in response to a network configuration operation triggered on the Bluetooth configuration page;

[0236] The generation module 1904 is used to generate Bluetooth data packets based on the network connection information of the target network when a target network is selected from the candidate networks displayed on the network selection page.

[0237] The broadcast module 1906 is used to broadcast Bluetooth data packets so that when the device to be configured on the network receives the Bluetooth data packets, it can connect to the target network based on the network connection information and report the network connection status.

[0238] The display module 1902 is also used to display the connection results of the device to be configured to the target network based on the connection status.

[0239] The aforementioned network connection method, apparatus, computer equipment, storage medium, and computer program product, in response to a network configuration graphic code scanning operation, display a Bluetooth configuration page for the device to be configured, thereby initiating the network configuration process for the device to be configured through a configuration operation triggered on the Bluetooth configuration page. When a target network is selected from the candidate networks displayed on the network selection page, a Bluetooth data packet is generated based on the network connection information of the target network, and then the Bluetooth data packet is broadcast. This allows the device to be configured to connect to the target network based on the network connection information in the Bluetooth data packet upon receiving it. Therefore, the network configuration initiating device acts as the master device for Bluetooth broadcasting, and the device to be configured acts as the slave device for broadcast monitoring. The network configuration initiating device does not need to establish a Bluetooth connection with the device to be configured to send Bluetooth data packets to the device to be configured via Bluetooth broadcasting. This allows the device to obtain network connection information and connect to the target network even when it cannot establish a Bluetooth connection as a master device and terminal due to not supporting the complete Bluetooth protocol.

[0240] In one embodiment, the display module 1902 is further configured to:

[0241] In response to a network distribution graphic code scanning operation triggered by an instant messaging application, the scanned network distribution graphic code is decoded to obtain graphic information;

[0242] When the graphical information contains preset field information, the Bluetooth network configuration page of the device to be networked is displayed through an instant messaging application; the network configuration control is displayed on the Bluetooth network configuration page.

[0243] The display module is also used to respond to network configuration operations triggered on the network configuration control displayed on the Bluetooth network configuration page, and to display the network selection page.

[0244] In one embodiment, the generation module 1904 is further configured to:

[0245] Obtain the target network's network identifier, encryption type, and access password; the network identifier, encryption type, and access password are network connection information.

[0246] Bluetooth data packets are generated based on the network identifier, encryption type, and network access password.

[0247] In one embodiment, the Bluetooth data packet includes a first data packet and a second data packet; the generation module 1904 is further configured to:

[0248] The concatenated data, including network identifier, network access password, and encryption type, is divided into first network connection information and second network connection information.

[0249] The first network connection information and the corresponding field flags are encapsulated to obtain a first data packet; and the second network connection information and the corresponding field flags are encapsulated to obtain a second data packet.

[0250] In one embodiment, both the first data packet and the second data packet include a device name field; the device name field includes a header subfield and a data subfield;

[0251] The header subfield and data subfield of the first data packet respectively store the field flags corresponding to the first network connection information and the first network connection information;

[0252] The header subfield and data subfield of the second data packet respectively store the field flags corresponding to the second network connection information and the second network connection information.

[0253] In one embodiment, the generation module 1904 is further configured to:

[0254] Perform hash calculation on the network identifier to obtain the hash value of the network identifier;

[0255] Encrypt the network access password to obtain the encrypted network access password;

[0256] The hash value, the encrypted access password, and the encryption type are concatenated to obtain the concatenated data.

[0257] The spliced ​​data is divided into first network connection information and second network connection information.

[0258] In one embodiment, such as Figure 20 As shown, the device also includes:

[0259] The selection module 1908 is used to select a string of a preset length from the hash value as the target hash value for the network identifier;

[0260] The generation module 1904 is also used to concatenate the target hash value, the encrypted access password, and the encryption type to obtain concatenated data.

[0261] In one embodiment, the broadcast module 1906 is further configured to:

[0262] Get the broadcast duration for broadcasting the first data packet and the second data packet;

[0263] The first data packet and the second data packet are broadcast sequentially within the broadcast duration via Bluetooth network, so that when the device to be configured receives the first data packet and the second data packet, it can extract the first network connection information and the second network connection information from the first data packet and the second data packet, respectively, and connect to the target network based on the first network connection information and the second network connection information.

[0264] In one embodiment, the apparatus further includes:

[0265] The query module 1910 is used to query the network status reported by the device to be configured during the broadcast of Bluetooth data packets, and start a timer to keep track of the connection status.

[0266] The query module 1910 is also used to execute the step of displaying the connection result of the device to be configured to the target network based on the connection status if the connection status reported by the device to be configured is "connected".

[0267] The query module 1910 is also used to continue the step of broadcasting Bluetooth data packets if the network status reported by the device to be configured is not connected, until the timer reaches the preset duration.

[0268] In one embodiment, the display module 1902 is further configured to:

[0269] If the network connection status reported by the device to be configured is "connected", display the device details page of the device to be configured according to the network connection status;

[0270] On the device details page, the connection results of the device to be configured to the target network are displayed in a floating layer.

[0271] In one embodiment, the device to be configured on the network is a projection device; the apparatus further includes:

[0272] The display module 1902 is also used to respond to the screen projection graphic code scanning operation and display the screen projection verification page in the instant messaging application;

[0273] The acquisition module 1912 is used to acquire the screen casting verification code entered on the screen casting verification page;

[0274] The sending module 1914 is used to send media data to the screen projection device via the target network if the screen projection verification code is verified, so that the screen projection device can project and display the media data.

[0275] In one embodiment, such as Figure 21 As shown, a network connection device is provided. This device can be a software module, a hardware module, or a combination of both, integrated into a computer device. Specifically, the device includes: a monitoring module 2102, an extraction module 2104, a connection module 2106, and an acquisition module 2108, wherein:

[0276] Monitoring module 2102 is used to monitor Bluetooth data packets broadcast by the distribution network initiating device;

[0277] Extraction module 2104 is used to extract network connection information from Bluetooth data packets when Bluetooth data packets broadcast by the network initiating device are detected; the Bluetooth data packets are generated by the network initiating device based on the network connection information of the target network; the target network is selected on the network selection page of the network initiating device.

[0278] Connection module 2106 is used to connect to a target network based on network connection information;

[0279] The acquisition module 2108 is used to acquire and report the connection status of the target network, so that the distribution network initiating device can display the connection result of the target network based on the connection status.

[0280] In the above embodiments, the device to be configured on the network performs broadcast monitoring. When it detects a Bluetooth data packet broadcast by the network initiating device, it extracts network connection information from the Bluetooth data packet and connects to the target network based on the network connection information. Therefore, for devices to be configured on the network that can only perform broadcast monitoring but not broadcast transmission because they do not support the complete Bluetooth communication protocol, they can obtain the Bluetooth data packet broadcast by the network initiating device through broadcast monitoring and connect to the target network based on the network connection information in the Bluetooth data packet.

[0281] In one embodiment, the Bluetooth data packet includes a first data packet and a second data packet; the extraction module 2104 is further configured to:

[0282] When the first data packet broadcast by the distribution network initiating device is detected, the first network connection information is extracted from the first data packet;

[0283] When a second data packet broadcast by the distribution network initiating device is detected, the second network connection information is extracted from the second data packet.

[0284] Network connection information is obtained by splicing data synthesized from the first network connection information and the second network connection information.

[0285] For specific limitations regarding the network connection device, please refer to the limitations on the network connection method above, which will not be repeated here. Each module in the aforementioned network connection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.

[0286] In one embodiment, a computer device is provided, which can be a terminal as a network distribution initiator, and its internal structure diagram can be as follows: Figure 22 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a network connection method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0287] Those skilled in the art will understand that Figure 22 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0288] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0289] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0290] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in the above-described method embodiments.

[0291] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0292] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0293] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A network connection method, characterized in that, The method includes: In response to the network configuration graphic code scanning operation, the Bluetooth network configuration page of the device to be configured is displayed through an instant messaging application; the device to be configured is a portable small device that supports incomplete Bluetooth BLE technology. In response to a network configuration operation triggered on the Bluetooth configuration page, a network selection page is displayed, including multiple candidate networks, a passwordless network connection control, and a password-required network connection control. When a target network is selected from the candidate networks displayed on the network selection page, and the target network does not require a password for access, in response to the triggering operation of the passwordless network connection control, the network connection information of the target network is written into the device name field to obtain a Bluetooth data packet; the network connection information includes a network identifier; When a target network is selected from the candidate networks displayed on the network selection page, and the target network requires a password for access, in response to the trigger operation of the control for connecting to the network requiring a password, the network identifier, encryption type, and access password of the target network are obtained; a Bluetooth data packet is generated based on the network identifier, the encryption type, and the access password; the network identifier, encryption type, and access password are respectively stored in the header subfield and data subfield of the device name field in the Bluetooth data packet; The Bluetooth data packet is broadcast so that when the device to be configured receives the Bluetooth data packet, it connects to the target network based on the network connection information and reports the network connection status. Based on the network connection status, the connection result of the device to be configured to the target network is displayed on the device details page; the device details page includes a device binding control, which is used to add the device serial number of the device to be configured to the device list of the instant messaging application when the network connection status is found to be connected, so as to bind the device to be configured and prevent other instant messaging applications from using the device to be configured.

2. The method according to claim 1, characterized in that, The step of displaying the Bluetooth network configuration page of the device to be configured via an instant messaging application in response to the network configuration graphic code scanning operation includes: In response to a network distribution graphic code scanning operation triggered by an instant messaging application, the scanned network distribution graphic code is decoded to obtain graphic information; When the graphical information contains preset field information, the Bluetooth network configuration page of the device to be configured is displayed through the instant messaging application; the Bluetooth network configuration page displays network configuration controls. The network selection page displayed in response to the network configuration operation triggered on the Bluetooth configuration page includes: In response to a network configuration operation triggered by the network configuration control displayed on the Bluetooth configuration page, a network selection page is displayed.

3. The method according to claim 1, characterized in that, The network selection page, which displays multiple candidate networks, a passwordless network connection control, and a password-required network connection control in response to a network configuration operation triggered on the Bluetooth configuration page, includes: In response to the network configuration operation triggered on the Bluetooth configuration page, the Bluetooth configuration page displayed by the instant messaging application is switched to a network selection page that includes multiple candidate networks, a passwordless network connection control, and a password-required network connection control.

4. The method according to claim 3, characterized in that, The Bluetooth data packet includes a first data packet and a second data packet; the generation of the Bluetooth data packet based on the network identifier, the encryption type, and the network access password includes: The concatenated data of the network identifier, the network access password, and the encryption type is divided into first network connection information and second network connection information; The first network connection information and the corresponding field flag are encapsulated to obtain a first data packet; and the second network connection information and the corresponding field flag are encapsulated to obtain a second data packet.

5. The method according to claim 4, characterized in that, Both the first data packet and the second data packet include a device name field; the device name field includes a header subfield and a data subfield. The header subfield and data subfield of the first data packet respectively store the field flag corresponding to the first network connection information and the first network connection information; The header subfield and data subfield of the second data packet respectively store the field flag corresponding to the second network connection information and the second network connection information.

6. The method according to claim 4, characterized in that, The step of dividing the concatenated data of the network identifier, the network access password, and the encryption type into first network connection information and second network connection information includes: Perform a hash calculation on the network identifier to obtain the hash value of the network identifier; The network access password is encrypted to obtain the encrypted network access password; The hash value, the encrypted network access password, and the encryption type are concatenated to obtain concatenated data. The spliced ​​data is divided into first network connection information and second network connection information.

7. The method according to claim 6, characterized in that, After performing hash calculation on the network identifier to obtain the hash value of the network identifier, the method further includes: A string of a preset length is selected from the hash values ​​as the target hash value for the network identifier; The concatenation of the hash value, the encrypted network access password, and the encryption type to obtain concatenated data includes: The target hash value, the encrypted network access password, and the encryption type are concatenated to obtain concatenated data.

8. The method according to claim 4, characterized in that, The broadcasting of the Bluetooth data packet, so that the device to be configured to connect to the target network based on the network connection information upon receiving the Bluetooth data packet, includes: Obtain the broadcast duration for broadcasting the first data packet and the second data packet; The first data packet and the second data packet are broadcast sequentially via Bluetooth network within the broadcast duration, so that when the device to be configured receives the first data packet and the second data packet, it can extract the first network connection information and the second network connection information from the first data packet and the second data packet, respectively, and connect to the target network based on the first network connection information and the second network connection information.

9. The method according to claim 1, characterized in that, The method further includes: During the broadcasting of the Bluetooth data packet, the network status reported by the device to be configured is queried, and a timer is started to keep track of the connection. If the network connection status reported by the device to be configured is "connected", then the step of displaying the connection result of the device to be configured to the target network on the device details page according to the network connection status is executed. If the network status reported by the device to be configured is not connected, the step of broadcasting the Bluetooth data packet continues until the timer reaches the preset duration.

10. The method according to claim 1, characterized in that, The step of displaying the connection result of the device to be configured to the target network on the device details page according to the connection status includes: If the network connection status reported by the device to be configured is "connected", the device details page of the device to be configured is displayed according to the network connection status. On the device details page, the connection results of the device to be configured to the target network are displayed in a floating layer.

11. The method according to any one of claims 1 to 10, characterized in that, The device to be configured is a screen projection device; after displaying the connection result of the device to be configured to the target network on the device details page according to the connection status, the method further includes: In response to the screen projection graphic code scanning operation, a screen projection verification page is displayed in the instant messaging application; Obtain the screen casting verification code entered on the screen casting verification page; If the screen mirroring verification code is verified, the media data is sent to the screen mirroring device through the target network so that the screen mirroring device can display the media data.

12. A network connection method, characterized in that, Applied to a device to be networked, wherein the device to be networked is a portable small device supporting incomplete Bluetooth BLE technology, the method includes: Monitor Bluetooth data packets broadcast by the network configuration initiating device; wherein, the Bluetooth data packets are obtained by the network configuration initiating device through the following methods: in response to a network configuration graphic code scanning operation, display the Bluetooth configuration page of the device to be configured via an instant messaging application; in response to a network configuration operation triggered on the Bluetooth configuration page, display a network selection page including multiple candidate networks, a passwordless network connection control, and a password-required network connection control; when a target network is selected from the candidate networks displayed on the network selection page, and the target network does not require a password for access, in response to a trigger operation on the passwordless network connection control, write the network connection information of the target network into the device name field to obtain the Bluetooth configuration data packet. Bluetooth data packet; the network connection information includes a network identifier; when a target network is selected from the candidate networks displayed on the network selection page, and the target network requires a password for access, in response to the trigger operation of the control for the network requiring a password, the network identifier, encryption type, and access password of the target network are obtained; the Bluetooth data packet is generated based on the network identifier, the encryption type, and the access password; the network identifier, the encryption type, and the access password are respectively stored in the header subfield and data subfield of the device name field in the Bluetooth data packet; when a Bluetooth data packet broadcast by the device initiating the network configuration is detected, the network connection information is extracted from the Bluetooth data packet; Connect to the target network based on the network connection information; The connection status of the target network is obtained and reported, so that the network configuration initiating device can display the connection result of the target network on the device details page based on the connection status. The device details page includes a device binding control, which is used to add the device serial number of the device to be configured to the device list of the instant messaging application when the connection status is found to be connected, so as to bind the device to be configured and prevent other instant messaging applications from using the device to be configured.

13. The method according to claim 12, characterized in that, The Bluetooth data packet includes a first data packet and a second data packet; when the Bluetooth data packet broadcast by the network initiating device is detected, extracting network connection information from the Bluetooth data packet includes: When the first data packet broadcast by the distribution network initiating device is detected, the first network connection information is extracted from the first data packet; When the second data packet broadcast by the distribution network initiating device is detected, the second network connection information is extracted from the second data packet; The network connection information is obtained by splicing data synthesized from the first network connection information and the second network connection information.

14. A network connection device, characterized in that, The device includes: The display module is used to respond to the network configuration graphic code scanning operation and display the Bluetooth network configuration page of the device to be configured via an instant messaging application; the device to be configured is a portable small device that supports incomplete Bluetooth BLE technology. The display module is also used to display a network selection page that includes multiple candidate networks, a passwordless network connection control, and a password-required network connection control in response to a network configuration operation triggered on the Bluetooth configuration page. The generation module is configured to, when a target network is selected from the candidate networks displayed on the network selection page and the target network does not require a password for access, respond to a trigger operation on the passwordless network connection control, write the network connection information of the target network into the device name field to obtain a Bluetooth data packet; the network connection information includes a network identifier; when a target network is selected from the candidate networks displayed on the network selection page and the target network requires a password for access, respond to a trigger operation on the password-required network connection control, obtain the network identifier, encryption type, and access password of the target network; generate a Bluetooth data packet based on the network identifier, the encryption type, and the access password; the network identifier, the encryption type, and the access password are respectively stored in the header subfield and data subfield of the device name field in the Bluetooth data packet; The broadcast module is used to broadcast the Bluetooth data packet so that when the device to be configured receives the Bluetooth data packet, it connects to the target network based on the network connection information and reports the network connection status. The display module is further configured to display the connection result of the device to be configured to the target network on the device details page according to the connection status; the device details page includes a device binding control, which is used to add the device serial number of the device to be configured to the device list of the instant messaging application when the connection status is found to be connected, so as to bind the device to be configured and prevent other instant messaging applications from using the device to be configured.

15. The apparatus according to claim 14, characterized in that, The display module is further configured to, in response to a network configuration graphic code scanning operation triggered by an instant messaging application, decode the scanned network configuration graphic code to obtain graphic information; when the graphic information contains preset field information, display the Bluetooth network configuration page of the device to be configured through the instant messaging application; display network configuration controls on the Bluetooth network configuration page; and, in response to a network configuration operation triggered on the network configuration controls displayed on the Bluetooth network configuration page, display a network selection page.

16. The apparatus according to claim 14, characterized in that, The display module is also used to switch the Bluetooth network configuration page displayed by the instant messaging application to a network selection page that includes multiple candidate networks, a passwordless network connection control, and a password-required network connection control in response to a network configuration operation triggered on the Bluetooth network configuration page.

17. The apparatus according to claim 16, characterized in that, The Bluetooth data packet includes a first data packet and a second data packet; The generation module is further configured to divide the concatenated data of the network identifier, the network access password, and the encryption type into first network connection information and second network connection information; encapsulate the first network connection information and the field flags corresponding to the first network connection information to obtain a first data packet; and encapsulate the second network connection information and the field flags corresponding to the second network connection information to obtain a second data packet.

18. The apparatus according to claim 17, characterized in that, Both the first data packet and the second data packet include a device name field; the device name field includes a header subfield and a data subfield. The header subfield and data subfield of the first data packet respectively store the field flag corresponding to the first network connection information and the first network connection information; The header subfield and data subfield of the second data packet respectively store the field flag corresponding to the second network connection information and the second network connection information.

19. The apparatus according to claim 17, characterized in that, The generation module is also used to perform hash calculation on the network identifier to obtain the hash value of the network identifier; The network access password is encrypted to obtain the encrypted network access password; the hash value, the encrypted network access password, and the encryption type are concatenated to obtain concatenated data; the concatenated data is divided into first network connection information and second network connection information.

20. The apparatus according to claim 19, characterized in that, The device further includes: The selection module is used to select a string of a preset length from the hash values ​​as the target hash value of the network identifier; The generation module is also used to concatenate the target hash value, the encrypted network access password, and the encryption type to obtain concatenated data.

21. The apparatus according to claim 17, characterized in that, The broadcast module is further configured to acquire the broadcast duration for broadcasting the first data packet and the second data packet; and to broadcast the first data packet and the second data packet sequentially within the broadcast duration via the Bluetooth network, so that when the device to be configured receives the first data packet and the second data packet, it can extract the first network connection information and the second network connection information from the first data packet and the second data packet respectively, and connect to the target network based on the first network connection information and the second network connection information.

22. The apparatus according to claim 14, characterized in that, The device further includes: The query module is used to query the network connection status reported by the device to be configured during the broadcasting of the Bluetooth data packet, and start a timer to keep track of the connection status. If the network connection status reported by the device to be configured is "connected", then the step of displaying the connection result of the device to be configured to the target network based on the network connection status is executed. If the network connection status reported by the device to be configured is "not connected", then the step of broadcasting the Bluetooth data packet continues until the timer reaches a preset duration.

23. The apparatus according to claim 14, characterized in that, The display module is further configured to, if the network connection status reported by the device to be configured is "connected", display the device details page of the device to be configured according to the network connection status; and display the connection result of the device to be configured to the target network in a floating layer on the device details page.

24. The apparatus according to any one of claims 14 to 23, characterized in that, The device to be configured on the network is a screen projection device; the device also includes: The display module is also used to display a screen projection verification page in the instant messaging application in response to the screen projection graphic code scanning operation; The acquisition module is used to acquire the screen casting verification code entered on the screen casting verification page; The sending module is used to send media data to the screen projection device through the target network if the screen projection verification code passes the verification, so that the screen projection device can project and display the media data.

25. A network connection device, characterized in that, Applied to a device to be networked, wherein the device is a portable small device supporting incomplete Bluetooth BLE technology, the device includes: A monitoring module is used to monitor Bluetooth data packets broadcast by the network configuration initiating device. The Bluetooth data packets are obtained by the network configuration initiating device through the following methods: in response to a network configuration graphic code scanning operation, the device displays a Bluetooth configuration page for the network to be configured via an instant messaging application; in response to a network configuration operation triggered on the Bluetooth configuration page, a network selection page is displayed, including multiple candidate networks, a passwordless network connection control, and a password-required network connection control; when a target network is selected from the candidate networks displayed on the network selection page, and the target network does not require a password for access, in response to a trigger operation on the passwordless network connection control, the device... The network connection information of the target network is written into the device name field to obtain the Bluetooth data packet; the network connection information includes a network identifier; when a target network is selected from the candidate networks displayed on the network selection page, and the target network requires a password for access, in response to the trigger operation of the control for the network requiring a password, the network identifier, encryption type, and access password of the target network are obtained; the Bluetooth data packet is generated based on the network identifier, the encryption type, and the access password; the network identifier, the encryption type, and the access password are respectively stored in the header subfield and data subfield of the device name field in the Bluetooth data packet; The extraction module is used to extract network connection information from the Bluetooth data packets when the Bluetooth data packets broadcast by the network initiating device are detected. A connection module is used to connect to the target network based on the network connection information; The acquisition module is used to acquire and report the connection status of the target network, so that the network configuration initiating device can display the connection result of the target network on the device details page based on the connection status. The device details page includes a device binding control, which is used to add the device serial number of the device to be configured to the device list of the instant messaging application when the connection status is found to be connected, so as to bind the device to be configured and prevent other instant messaging applications from using the device to be configured.

26. The apparatus according to claim 25, characterized in that, The Bluetooth data packet includes a first data packet and a second data packet; The extraction module is further configured to extract first network connection information from the first data packet when the first data packet broadcast by the distribution network initiating device is detected; and to extract second network connection information from the second data packet when the second data packet broadcast by the distribution network initiating device is detected. The network connection information is obtained by splicing data synthesized from the first network connection information and the second network connection information.

27. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 13.

28. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.

29. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • CN108055688A

  • CN111314942A

  • KR20200117160A