CN115988676A - Network connection method, device, computer equipment and storage medium - Google Patents

Network connection method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN115988676A
CN115988676A CN202111197656.3A CN202111197656A CN115988676A CN 115988676 A CN115988676 A CN 115988676A CN 202111197656 A CN202111197656 A CN 202111197656A CN 115988676 A CN115988676 A CN 115988676A
Authority
CN
China
Prior art keywords
network
data packet
bluetooth
connection information
network connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111197656.3A
Other languages
Chinese (zh)
Inventor
李泽旺
黄铁鸣
陈丘
李斌
文孝木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111197656.3A priority Critical patent/CN115988676A/en
Publication of CN115988676A publication Critical patent/CN115988676A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to a network connection method, a network connection device, a computer device, a storage medium and a computer program product. The method comprises the following steps: responding to the distribution network graphic code scanning operation, and displaying a Bluetooth distribution network page of the equipment to be distributed; responding to the distribution network operation triggered on the Bluetooth distribution network page, and displaying a network selection page; when a target network is selected from the candidate networks displayed on the network selection page, generating a Bluetooth data packet based on the network connection information of the target network; broadcasting the Bluetooth data packet to enable the equipment to be networked to be connected with the target network based on the network connection information and report a networking state when receiving the Bluetooth data packet; and displaying the networking result of the equipment to be distributed to the target network according to the networking state. By adopting the method, the portable small-sized hardware equipment with small size and low energy consumption can be connected to the wireless network.

Description

Network connection method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a network connection method, apparatus, computer device, storage medium, and computer program product.
Background
With the development of computer technology, hardware devices (such as screen projection boxes) without networking buttons or input devices are used in some application scenarios, and how to connect the hardware devices to a wireless network becomes a problem to be solved urgently.
In the conventional technology, a hardware device serves as a master device to broadcast a data packet through bluetooth, a terminal serves as a slave device to perform broadcast monitoring, when the terminal monitors the broadcast data packet, bluetooth connection is established with the hardware device, and then the established bluetooth connection is utilized to perform network distribution. However, for portable small hardware devices, due to the device size and power consumption, a complete bluetooth protocol is not supported, and bluetooth connection cannot be established with a terminal, so that the hardware devices cannot be distributed in a bluetooth connection mode with the terminal.
Disclosure of Invention
In view of the above, it is necessary to provide a network connection method, apparatus, computer device, storage medium and computer program product for connecting a small-sized portable hardware device with low power consumption to a wireless network.
A network connection method, the method comprising:
responding to the distribution network graphic code scanning operation, and displaying a Bluetooth distribution network page of the equipment to be distributed;
responding to the distribution network operation triggered on the Bluetooth distribution network page, and displaying a network selection page;
when a target network is selected from the candidate networks displayed on the network selection page, generating a Bluetooth data packet based on the network connection information of the target network;
broadcasting the Bluetooth data packet to enable the device to be networked to be connected with the target network based on the network connection information and report a networking state when receiving the Bluetooth data packet;
and displaying the networking result of the equipment to be distributed to the target network according to the networking state.
A network connection device, the device comprising:
the display module is used for responding to the distribution network graphic code scanning operation and displaying the Bluetooth distribution network page of the equipment to be distributed;
the display module is also used for responding to the distribution network operation triggered by the Bluetooth distribution network page and displaying a network selection page;
the generating module is used for generating a Bluetooth data packet based on the network connection information of the target network when the target network is selected from the candidate networks displayed on the network selection page;
the broadcasting module is used for broadcasting the Bluetooth data packet so as to enable the equipment to be networked to connect the target network based on the network connection information and report a networking state when receiving the Bluetooth data packet;
the display module is further configured to display the networking result of the to-be-configured network device on the target network according to the networking state.
In one embodiment, the display module is further configured to:
responding to distribution network graphic code scanning operation triggered by instant messaging application, and decoding the scanned distribution network graphic code to obtain graphic information;
when the graphic information contains preset field information, displaying a Bluetooth distribution network page of the equipment to be distributed through the instant messaging application; a distribution network control is displayed in the Bluetooth distribution network page;
the exhibition module is further used for responding to distribution network operation triggered on the distribution network control displayed on the Bluetooth distribution network page and displaying a network selection page.
In one embodiment, the generating module is further configured to:
acquiring a network identifier, an encryption type and a network access password of the target network; the network identification, the encryption type and the network access password belong to the network connection information;
and generating a Bluetooth data packet based on the network identification, the encryption type and the network access password.
In one embodiment, the bluetooth packet comprises a first packet and a second packet; the generation module is further configured to:
dividing the network identification, the network access password and the encrypted type splicing data into first network connection information and second network connection information;
packaging the first network connection information and a field mark corresponding to the first network connection information to obtain a first data packet; and encapsulating the second network connection information and the field mark corresponding to the second network connection information to obtain a second data packet.
In one embodiment, the first packet and the second packet each include a device name field; the device name field includes a header subfield and a data subfield;
a header subfield and a data subfield of the first data packet respectively store a field mark corresponding to the first network connection information and the first network connection information;
and the header subfield and the data subfield of the second data packet respectively store the field mark corresponding to the second network connection information and the second network connection information.
In one embodiment, the generating module is further configured to:
carrying out hash calculation on the network identifier to obtain a hash value of the network identifier;
encrypting the network access password to obtain the encrypted network access password;
splicing the hashed value, the encrypted network access password and the encrypted type to obtain spliced data;
the splicing data is divided into first network connection information and second network connection information.
In one embodiment, the apparatus further comprises:
the selecting module is used for selecting a character string with preset digits from the hash value as a target hash value of the network identifier;
the generating module is further configured to splice the target hash value, the encrypted network access password, and the encryption type to obtain spliced data.
In one embodiment, the broadcasting module is further configured to:
acquiring the broadcast time length for broadcasting the first data packet and the second data packet;
the first data packet and the second data packet are sequentially broadcasted in the broadcasting time through a Bluetooth network, so that when the equipment to be networked receives the first data packet and the second data packet, first network connection information and second network connection information are respectively extracted from the first data packet and the second data packet, and the target network is connected based on the first network connection information and the second network connection information.
In one embodiment, the apparatus further comprises:
the inquiry module is used for inquiring the networking state reported by the equipment to be networked in the process of broadcasting the Bluetooth data packet and starting a timer to time;
the query module is further configured to execute the step of displaying the networking result of the to-be-configured network device on the target network according to the networking state if the networking state reported by the to-be-configured network device is queried to be connected;
the inquiry module is further configured to continue to execute the step of broadcasting the bluetooth data packet until the time counted by the timer reaches a preset time length if the inquiry indicates that the networking state reported by the device to be networked is unconnected.
In one embodiment, the display module is further configured to:
if the networking state reported by the equipment to be distributed is inquired to be connected, displaying an equipment detail page of the equipment to be distributed according to the networking state;
and displaying the networking result of the equipment to be distributed to the target network in a floating layer mode on the equipment detail page.
In one embodiment, the device to be distributed is a screen projection device; the device further comprises:
the display module is also used for responding to the screen-projecting graphic code scanning operation and displaying a screen-projecting verification page in the instant messaging application;
the acquisition module is used for acquiring the screen projection verification code input in the screen projection verification page;
and the sending module is used for sending the media data to the screen projection equipment through the target network if the screen projection verification code passes verification so that the screen projection equipment can carry out screen projection display on the media data.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
responding to the distribution network graphic code scanning operation, and displaying a Bluetooth distribution network page of the equipment to be distributed;
responding to the distribution network operation triggered by the Bluetooth distribution network page, and displaying a network selection page;
when a target network is selected from the candidate networks displayed on the network selection page, generating a Bluetooth data packet based on the network connection information of the target network;
broadcasting the Bluetooth data packet to enable the device to be networked to be connected with the target network based on the network connection information and report a networking state when receiving the Bluetooth data packet;
and displaying the networking result of the equipment to be distributed to the target network according to the networking state.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
responding to the distribution network graphic code scanning operation, and displaying a Bluetooth distribution network page of the equipment to be distributed;
responding to the distribution network operation triggered on the Bluetooth distribution network page, and displaying a network selection page;
when a target network is selected from the candidate networks displayed on the network selection page, generating a Bluetooth data packet based on the network connection information of the target network;
broadcasting the Bluetooth data packet to enable the device to be networked to be connected with the target network based on the network connection information and report a networking state when receiving the Bluetooth data packet;
and displaying the networking result of the equipment to be distributed to the target network according to the networking state.
A computer program product comprising a computer program which when executed by a processor performs the steps of:
responding to the distribution network graphic code scanning operation, and displaying a Bluetooth distribution network page of the equipment to be distributed;
responding to the distribution network operation triggered on the Bluetooth distribution network page, and displaying a network selection page;
when a target network is selected from the candidate networks displayed on the network selection page, generating a Bluetooth data packet based on the network connection information of the target network;
broadcasting the Bluetooth data packet to enable the device to be networked to be connected with the target network based on the network connection information and report a networking state when receiving the Bluetooth data packet;
and displaying the networking result of the equipment to be distributed to the target network according to the networking state.
The network connection method, the network connection device, the computer equipment, the storage medium and the computer program product respond to the distribution network graphic code scanning operation and display the Bluetooth distribution network page of the equipment to be distributed, so that the distribution network process of the equipment to be distributed can be started through the distribution network operation triggered in the Bluetooth distribution network 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 broadcasted, so that the device to be networked can be connected with the target network based on the network connection information in the Bluetooth data packet when receiving the Bluetooth data packet. Therefore, the distribution network initiating device serves as a master device to perform Bluetooth broadcasting, the device to be configured serves as a slave device to perform broadcasting monitoring, the distribution network initiating device does not need to establish Bluetooth connection with the device to be configured, the Bluetooth data packet can be sent to the device to be configured through the Bluetooth broadcasting, and when the device to be configured cannot serve as the master device to establish Bluetooth connection with the terminal due to the fact that a complete Bluetooth protocol is not supported, network connection information can be obtained and the device to be configured can be connected to a target network through the obtained network connection information.
A network connection method, the method comprising:
monitoring a Bluetooth data packet broadcasted by a distribution network initiating device;
when a Bluetooth data packet broadcasted by the distribution network initiating equipment is monitored, extracting network connection information from the Bluetooth data packet; the Bluetooth data packet is generated by the distribution network initiating equipment based on network connection information of a target network; the target network is selected on a network selection page of the distribution network initiating device;
connecting the target network based on the network connection information;
and acquiring and reporting the networking state of the target network, so that the distribution network initiating equipment displays the networking result of the target network based on the networking state.
A network connection device, the device comprising:
the monitoring module is used for monitoring a Bluetooth data packet broadcasted by the distribution network initiating equipment;
the extraction module is used for extracting network connection information from the Bluetooth data packet when the Bluetooth data packet broadcasted by the distribution network initiating device is monitored; the Bluetooth data packet is generated by the distribution network initiating equipment based on network connection information of a target network; the target network is selected on a network selection page of the distribution network initiating device;
a connection module for connecting the target network based on the network connection information;
and the acquisition module is used for acquiring and reporting the networking state of the target network so that the distribution network initiating device can display the networking result of the target network based on the networking state.
In one embodiment, the bluetooth packet comprises a first packet and a second packet; the extraction module is further configured to:
when a first data packet broadcasted by the distribution network initiating equipment is monitored, extracting first network connection information from the first data packet;
when a second data packet broadcasted by the distribution network initiating device is monitored, extracting second network connection information from the second data packet;
and obtaining the network connection information based on splicing data synthesized by the first network connection information and the second network connection information.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
monitoring a Bluetooth data packet broadcasted by a distribution network initiating device;
when a Bluetooth data packet broadcasted by the distribution network initiating equipment is monitored, extracting network connection information from the Bluetooth data packet; the Bluetooth data packet is generated by the distribution network initiating equipment based on the network connection information of the target network; the target network is selected on a network selection page of the distribution network initiating device;
connecting the target network based on the network connection information;
and acquiring and reporting the networking state of the target network, so that the distribution network initiating equipment displays the networking result of the target network based on the networking state.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
monitoring a Bluetooth data packet broadcasted by a distribution network initiating device;
when a Bluetooth data packet broadcasted by the distribution network initiating equipment is monitored, extracting network connection information from the Bluetooth data packet; the Bluetooth data packet is generated by the distribution network initiating equipment based on network connection information of a target network; the target network is selected on a network selection page of the distribution network initiating device;
connecting the target network based on the network connection information;
and acquiring and reporting the networking state of the target network, so that the distribution network initiating equipment displays the networking result of the target network based on the networking state.
A computer program product comprising a computer program which when executed by a processor performs the steps of:
monitoring a Bluetooth data packet broadcasted by a distribution network initiating device;
when a Bluetooth data packet broadcasted by the distribution network initiating equipment is monitored, extracting network connection information from the Bluetooth data packet; the Bluetooth data packet is generated by the distribution network initiating equipment based on the network connection information of the target network; the target network is selected on a network selection page of the distribution network initiating device;
connecting the target network based on the network connection information;
and acquiring and reporting the networking state of the target network, so that the distribution network initiating equipment displays the networking result of the target network based on the networking state.
According to the network connection method, the network connection device, the computer equipment, the storage medium and the computer program product, the equipment to be distributed performs broadcast monitoring, when a Bluetooth data packet broadcasted by the distribution network initiating equipment is monitored, network connection information is extracted from the Bluetooth data packet, and a target network is connected based on the network connection information. Therefore, for the device to be networked which does not support a complete bluetooth communication protocol, can only perform broadcast monitoring but cannot perform broadcast transmission, the bluetooth data packet broadcast by the distribution network initiating device can be obtained through broadcast monitoring, and the device to be networked is connected with the target network based on the network connection information in the bluetooth data packet.
Drawings
FIG. 1 is a diagram of an exemplary network connection method;
FIG. 2 is a flow diagram illustrating a method for network connectivity in one embodiment;
FIG. 3 is a diagram of a Bluetooth distribution network page in one embodiment;
FIG. 4a is a diagram of a message page in one embodiment;
FIG. 4b is a schematic diagram of scanning a page in one embodiment;
FIG. 5 is a diagram of a network selection page in one embodiment;
FIG. 6 is a diagram of a broadcast Bluetooth packet in one embodiment;
FIG. 7 is a flowchart illustrating a method for generating Bluetooth packets in one embodiment;
FIG. 8 is a flowchart illustrating a method for encapsulating network information according to an embodiment;
FIG. 9 is a diagram of a Bluetooth packet in one embodiment;
FIG. 10 is a flowchart illustrating a method for generating network connection information in one embodiment;
FIG. 11 is a diagram of a device details page in one embodiment;
FIG. 12 is a diagram of a screen projection verification page in one embodiment;
FIG. 13 is a diagram illustrating a screen shot verification code and a screen shot graphics code, in one embodiment;
FIG. 14a is a flowchart illustrating a method of network connectivity in one embodiment;
fig. 14b is a diagram showing a distribution network graphic code in one embodiment;
FIG. 15 is a diagram showing an application environment of a network connection method in another embodiment;
fig. 16 is an actual diagram illustrating the steps executed by the distribution network initiating device in one embodiment;
FIG. 17 is an exemplary diagram illustrating steps executed by a device side of a network to be distributed according to an embodiment;
FIG. 18 is a schematic view of the screen projection principle in one embodiment;
FIG. 19 is a block diagram of a network connection device in one embodiment;
FIG. 20 is a block diagram showing the construction of a network connection device according to another embodiment;
FIG. 21 is a block diagram showing the construction of a network connection device according to another embodiment;
FIG. 22 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
The network connection method provided by the application can be applied to the application environment shown in fig. 1. In the application environment, a distribution network initiating device 102 and a device to be distributed 104 are included. The distribution network initiating device 102 responds to the distribution network graphic code scanning operation and displays a Bluetooth distribution network page of the device 104 to be distributed; responding to distribution network operation triggered on a Bluetooth distribution network page, and displaying a network selection page; when a target network is selected among the candidate networks displayed on the network selection page, a bluetooth packet is generated based on network connection information of the target network. The distribution network initiating device 102 broadcasts the bluetooth data packet, so that the device 104 to be distributed connects to the target network based on the network connection information when receiving the bluetooth data packet, and reports the networking state. And the distribution network initiating device 102 shows the networking result of the device 104 to be distributed on the target network according to the networking state.
The distribution network initiating device 102 may be a terminal, and the terminal may be a mobile terminal including a smart phone, a tablet computer, a smart watch, a vehicle-mounted terminal, or may also be a notebook computer, a desktop computer, a smart sound box, but is not limited thereto. The device to be networked 104 may be a variety of portable small devices such as a television box, a drop box, etc.
In an embodiment, as shown in fig. 2, a network connection method is provided, which is described by taking the example that the method is applied to the distribution network initiating device in fig. 1, and includes the following steps:
s202, responding to the distribution network graphic code scanning operation, and displaying the Bluetooth distribution network page of the equipment to be distributed.
The graphic code is a graphic which records data information by a geometric shape which is distributed according to a certain rule and is alternate between black and white, and comprises a two-dimensional code, a bar code and the like. The graphic code encodes data information through black and white geometric figures, and the data information recorded by the graphic code can be obtained by decoding the figures in the graphic code. The distribution network graphic code is used for carrying out distribution network on the equipment to be distributed, and the graphic information obtained by decoding the distribution network graphic code comprises field information for indicating the distribution network initiating equipment to display a Bluetooth distribution network page. The scanning operation is to scan the graphic code through an image acquisition device or an optoelectronic scanning device. For example, the graphic code is scanned by an image acquisition device on the mobile terminal.
The device to be configured is a device to be accessed to the wireless network, and may be various portable small devices, such as a television box, a screen projection box, and the like. The equipment to be distributed has the characteristics of small size and Low power consumption, an operating system arranged on the equipment supports the incomplete Bluetooth BLE (Bluetooth Low Energy) technology, and the equipment can only broadcast and monitor Bluetooth data packets through a Bluetooth BLE protocol and cannot broadcast and send the Bluetooth data packets through the Bluetooth BLE protocol.
The network distribution is a process of enabling the equipment to be distributed to acquire network connection information of the wireless network and access the wireless network according to the acquired network connection information. The accessed Wireless network may be a WIFI (Wireless Fidelity) Wireless local area network, or may be another Wireless network.
The Bluetooth distribution network page is a page capable of triggering distribution network operation. The page can comprise a distribution network control, and distribution network operation can be triggered through the distribution network control. For example, the distribution network operation may be triggered by clicking, dragging, sliding, and the like on the distribution network control. Specifically, as shown in fig. 3, a "configure network" button is included in the bluetooth network distribution page, and the network distribution operation may be an operation triggered by clicking the "configure network" button.
In one embodiment, the equipment to be networked is connected with display equipment, and the distribution network graphic code is displayed through the display equipment; s202 specifically includes: and the distribution network initiating device responds to the scanning operation of the distribution network graphic code displayed by the display device and displays the Bluetooth distribution network page for the distribution network to be performed on the distribution network device.
In one embodiment, S202 further includes before: the distribution network initiating equipment responds to a scanning instruction triggered by an application program and performs distribution network graphic code scanning operation through the application program; s202 specifically includes: the distribution network initiating device responds to the distribution network graphic code scanning operation, so that the application program displays the Bluetooth distribution network page for the distribution network to be distributed. The application program can be various application programs such as an instant messaging application, a social application, an office application, a game application and the like, for example, enterprise WeChat, personal WeChat, QQ, mini-games and the like. For example, as shown in fig. 4a, the application program is an instant messaging application, and the instant messaging application pops up a popup window containing a "scan control on the message page in response to a click operation on the add button, and the scan instruction is an instruction triggered by clicking the scan control in the popup window. And the distribution network initiating equipment responds to a scanning instruction triggered by clicking 'scanning' to perform distribution network graphic code scanning operation. As shown in fig. 4b, the distribution network initiating device scans the distribution network graphic code in a scanning frame displayed by the instant messaging application.
And S204, responding to the distribution network operation triggered on the Bluetooth distribution network page, and displaying a network selection page.
The distribution network operation is an operation for initiating a distribution network process, and may be an operation triggered by a distribution network control in a bluetooth distribution network page, or an operation triggered by sliding, dragging, and the like of the bluetooth distribution network page. For example, the distribution network operation is an operation triggered by sliding a bluetooth distribution network page, and the distribution network initiating device responds to the sliding operation of the bluetooth distribution network page and displays a network selection page through the instant messaging application.
The network selection page is a page showing a candidate network. The distribution network initiating device can select a wireless network which enables the device to be distributed to access from the candidate networks displayed on the network selection page. As shown in FIG. 5, the network selection page includes a plurality of candidate networks, which are respectively WechatWork-Staffwifi1-4.
In one embodiment, the distribution network graphic code scanning operation is an operation triggered by an instant messaging application, and the Bluetooth distribution network page is a page displayed by the instant messaging application. S204 specifically comprises: and the distribution network initiating equipment responds to the distribution network operation triggered on the Bluetooth distribution network page, and switches the Bluetooth distribution network page displayed by the instant messaging application into a network selection page.
And S206, when the target network is selected from the candidate networks displayed on the network selection page, generating a Bluetooth data packet based on the network connection information of the target network.
The network connection information is information required for enabling the device to be configured to access the target network, and comprises a network identifier, a network access password, an encryption type and the like of the target network. The network identifier is the name of the target network and is composed of numbers, letters, special symbols and the like. For example, the network identification may be WechatWork-Staffwifi1. The encryption type is a type for performing secure encryption on the target network, and includes types such as WEP (Wired Equivalent Privacy), WPA (Wi-Fi Protected Access), WPA2, WPA3, WPA2 enterprise level, and WPA3 enterprise level. The distribution network initiating device may indicate the encryption type by a number, a letter, etc., for example, the WEP encryption type by a number "1", the WAP encryption type by a number 2, etc.
The Bluetooth data packet is a data packet obtained by encapsulating data based on a Bluetooth protocol. The bluetooth protocol may be a classic bluetooth protocol or a BLE bluetooth protocol, etc. The bluetooth packet may include a devicename field, and the distribution network initiating device may write the network connection information into the devicename field. In addition, the bluetooth packet may further carry a flag bit for identifying the bluetooth packet, where the flag bit may be a UUID (universal Unique Identifier).
In one embodiment, a plurality of candidate networks are presented in a network selection page. S206 specifically includes: the distribution network initiating equipment responds to the selection operation triggered in the network selection page and selects a target network; when the password is required to access the target network, the distribution network initiating equipment responds to the password input operation to obtain the network access password of the candidate network; the method comprises the steps that a distribution network initiating device obtains a network identifier and an encryption type of a target network and obtains a network access password input through password input operation; and generating a Bluetooth data packet based on the network identification, the encryption type and the network access password. For example, as shown in fig. 5, when a password is required to access a target network, the distribution network initiating device displays a password input box in response to a click operation triggered by the "network connection required" control, and acquires an access password input in the password input box. When the password is not needed to access the target network, the distribution network initiating device responds to the confirmation operation triggered by clicking the 'network connection without password' control, and confirms that the target network can be accessed without the password for accessing the network.
And S208, broadcasting the Bluetooth data packet so that the equipment to be networked is connected with a target network based on the network connection information and reports the networking state when receiving the Bluetooth data packet.
The Bluetooth data packet is broadcast by using the distribution network initiating device as a main device. And the equipment to be distributed is used as slave equipment for broadcast monitoring. The networking state is used for representing the state of the device to be networked, including a connected state and an unconnected state, connected to the target network.
In one embodiment, the bluetooth packet includes a first packet and a second packet; the network connection information comprises first network connection information and second network connection information; s208 specifically comprises: acquiring the broadcast time length for broadcasting the first data packet and the second data packet; through a Bluetooth network, a first data packet and a second data packet are sequentially broadcasted in a broadcasting time length, so that when the device to be networked receives the first data packet and the second data packet, first network connection information and second network connection information are respectively extracted from the first data packet and the second data packet, and the target network is connected based on the first network connection information and the second network connection information. For example, as shown in fig. 6, the broadcasting time is 15 seconds, first the first packet is broadcasted for 15 seconds continuously, then the second packet is broadcasted for 15 seconds continuously, and the cycle is repeated. Because the byte length of the network connection information is long, a single bluetooth data packet may not accommodate all the network connection information, so the distribution network initiating device may 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 data packet and the second data packet, respectively, to avoid the loss of the network connection information due to the fact that the bluetooth data packet cannot accommodate all the network connection information when the network connection information is too long.
And S210, displaying the networking result of the equipment to be networked to the target network according to the networking state.
The networking result is used for indicating whether the device to be networked has successfully accessed the target network, including successful networking and failed networking. The network distribution initiating device can display the networking result on the device detail page, and when the networking result is successful, the device detail of the device to be distributed can be displayed on the device detail page.
In an embodiment, when the networking state is queried to be connected, the device serial number of the device to be networked is added to the device list of the instant messaging application to bind the device to be networked, so that other instant messaging applications cannot use the device to be networked. The device serial number may be obtained by decoding the distribution network initiating device from the distribution network two-dimensional code.
In one embodiment, S210 further comprises, before: in the process of broadcasting the Bluetooth data packet, inquiring the networking state reported by the equipment to be distributed, and starting a timer to time; s210 specifically includes: if the networking state reported by the equipment to be networked is inquired to be connected, the step of displaying the networking result of the equipment to be networked on the target network according to the networking state is executed; and if the networking state reported by the equipment to be networked is not connected, continuing to execute the step of broadcasting the Bluetooth data packet until the time counted by the timer reaches the preset time length.
The device to be distributed can report the networking state to a background server of the instant messaging application running in the device to be distributed, and the device to be distributed inquires the networking state reported by the device to be distributed from the background server through the running instant messaging application. When the networking state reported by the equipment to be networked is inquired to be connected, stopping broadcasting the Bluetooth data packet, and displaying the networking result of the equipment to be networked, which is successfully connected with the target network; and if the networking state reported by the inquired to-be-configured network equipment is still unconnected when the time counted by the timer reaches the preset time, displaying the networking result of the to-be-configured network equipment on the failure of the connection of the target network.
The timer times the time length of the distribution network initiating device broadcasting the Bluetooth data packet, and if the networking state reported by the to-be-distributed network device is not connected when the time length of the distribution network initiating device broadcasting the Bluetooth data packet reaches the preset time length, the situation that the to-be-distributed network device cannot be accessed to the target network through the network connection information is shown. At the moment, the distribution network initiating device stops broadcasting the Bluetooth data packet and displays the networking result of the target network connection failure of the to-be-configured network device, so that the problem that the distribution network initiating device still broadcasts the Bluetooth data packet for a long time when the to-be-configured network device cannot access the target network, time is wasted, and distribution network efficiency is reduced is solved.
In the embodiment, the Bluetooth distribution network page of the equipment to be distributed is displayed in response to the distribution network graphic code scanning operation, so that the distribution network process of the equipment to be distributed can be started through distribution network operation triggered in the Bluetooth distribution network 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 broadcasted, so that the device to be networked can be connected with the target network based on the network connection information in the Bluetooth data packet when receiving the Bluetooth data packet. Therefore, the distribution network initiating device serves as a master device to perform Bluetooth broadcasting, the device to be configured serves as a slave device to perform broadcasting monitoring, the distribution network initiating device does not need to establish Bluetooth connection with the device to be configured, the Bluetooth data packet can be sent to the device to be configured through the Bluetooth broadcasting, and when the device to be configured cannot serve as the master device to establish Bluetooth connection with the distribution network initiating device due to the fact that a complete Bluetooth protocol is not supported, network connection information can be obtained and the device to be configured can be connected to a target network through the obtained network connection information.
In one embodiment, S202 specifically includes: responding to a distribution network graphic code scanning operation triggered by instant messaging application, and decoding the scanned distribution network graphic code to obtain graphic information; when the graphic information contains preset field information, displaying a Bluetooth distribution network page of the equipment to be distributed through the instant messaging application; a distribution network control is displayed in the Bluetooth distribution network page; s204 specifically comprises: and responding to the distribution network operation triggered on the distribution network control displayed on the Bluetooth distribution network page, and displaying a network selection page.
The instant messaging application is an application program client running in the distribution network initiating device and can be enterprise wechat, personal wechat and the like. The distribution network graphic code scanning operation is triggered and executed by the instant messaging application. For example, as shown in fig. 4a, the distribution network initiating device executes a distribution network graphic code scanning operation in response to a scanning instruction triggered by clicking a scanning control in a pop-up window of an instant messaging application.
The graphic information is recorded by a graphic with a certain rule through a distribution network graphic code, and comprises link information, text information and the like. For example, the graphical information may be a network address through which the corresponding page may be entered.
The preset field information is used for indicating the distribution network initiating equipment to display the Bluetooth distribution network page. The preset field information may be a character string composed of numbers, letters, special characters, etc. In one embodiment, the graphic information is link information, the distribution network initiating device judges whether the link information contains preset field information after decoding the link information from the distribution network graphic code, and when the link information contains the preset field information, the distribution network initiating device displays a Bluetooth distribution network page of the device to be distributed through instant messaging application. The distribution network initiating device responds to distribution network operation triggered on a distribution network control displayed on the Bluetooth distribution network page, and displays a network selection page through instant messaging application.
In the above embodiment, the distribution network initiating device decodes the scanned distribution network graphic code to obtain the graphic information, and when the graphic information includes the preset field information, the bluetooth distribution network page of the device to be distributed is displayed through the instant messaging application. When the device to be configured cannot be used as a main device to perform Bluetooth broadcasting so as to initiate a Bluetooth distribution process, the distribution network initiating device is used as the main device to initiate the Bluetooth distribution process through instant messaging application, and the device to be configured is distributed through the initiated Bluetooth distribution process, so that the device to be configured, which does not support a complete Bluetooth protocol, can also be accessed to a wireless network.
In one embodiment, as shown in fig. 7, S206 specifically includes the following steps:
s702, acquiring a network identifier, an encryption type and a network access password of a target network; the network identification, the encryption type and the network access password belong to network connection information.
The network identifier is the name of the target network and is composed of numbers, letters, special symbols and the like. For example, the network identification may be WechatWork-Staffwifi1. The encryption type is a type for performing security encryption on the target network, and comprises WEP, WPA2, WPA3, WPA2 enterprise level, WPA3 enterprise level and the like.
In one embodiment, S702 specifically includes: responding to a selection operation triggered on a network selection page, selecting a target network from the candidate networks of the network selection page, and acquiring a network identifier and an encryption type of the selected target network; when the network access password is required to access the target network, popping up a password input box, and acquiring the network access password input in the password input box.
And S704, generating a Bluetooth data packet based on the network identification, the encryption type and the network access password.
The distribution network initiating device packages the network identifier, the encryption type and the network access password to generate a Bluetooth data packet, wherein the number of the generated Bluetooth data packets can be one or more. The network identification, the encryption type and the network access password can be written into the same Bluetooth data packet or a plurality of different Bluetooth data packets.
In the above embodiment, the network identifier, the encryption type, and the access password of the target network are obtained, and the bluetooth data packet is generated based on the network identifier, the encryption type, and the access password. Therefore, the distribution network initiating device can be used as a main device to send the Bluetooth data packet to the device to be distributed in a broadcasting mode so as to distribute the distribution network to the device to be distributed.
In one embodiment, the bluetooth packet includes a first packet and a second packet; as shown in fig. 8, S704 specifically includes the following steps:
s802, dividing the network identification, the network access password and the encrypted splicing data into first network connection information and second network connection information.
The splicing data is obtained by splicing based on the network identification, the network access password and the encryption type. The splicing data may be data obtained by directly splicing the network identifier, the network access password and the encryption type, or data obtained by splicing data generated based on the network identifier, the network access password and the encryption type. For example, the splicing data may be data obtained by splicing a hash value of the network identifier, an encrypted network access password, and an encryption type.
The first network connection information and the second network connection information are partial data in the splicing data. The lengths of the first network connection information and the second network connection information may be the same or different. For example, the first network connection information may be the first 20 bytes in the concatenated data, and the first network connection information may be the 21 st to 30 th bytes in the concatenated data. When the length of the bluetooth data packet cannot accommodate all the splicing data, the distribution network initiating device can divide the splicing data into first network connection information and second network connection information, and write the first network connection information and the second network connection information into different bluetooth data packets respectively.
S804, the first network connection information and the field mark corresponding to the first network connection information are packaged to obtain a first data packet; and encapsulating the second network connection information and the field mark corresponding to the second network connection information to obtain a second data packet.
The field mark is an identifier for distinguishing the bluetooth data packet, and comprises letters, numbers, special characters and the like. For example, the distribution network initiating device identifies the first packet with a field flag of "PS@" and the second packet with a field flag of "PE@". When receiving a data packet with a field mark of 'PS@', the device to be configured confirms that a first data packet is received and caches first network connection information extracted from the first data packet, and when receiving a data packet with a field mark of 'PE@', confirms that a second data packet is received and synthesizes second network connection information extracted from the second data packet and the cached first network connection information into network connection information and connects a target network based on the network connection information.
In one embodiment, the first data packet and the second data packet each 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 a field mark corresponding to the first network connection information and the first network connection information; and the header subfield and the data subfield of the second data packet respectively store the field mark corresponding to the second network connection information and the second network connection information.
Wherein the device name field is a field composed of partial bytes in the bluetooth packet and includes a header sub-field and a data sub-field. As shown in fig. 9, the bluetooth packet includes a device name field including a header subfield and a data subfield. The header subfield of the first data packet may store a field flag corresponding to the first network connection information, that is, a field flag "PS@" corresponding to the first data packet, and the data subfield of the first data packet may store the first network connection information; the header subfield of the second data packet may store a field flag corresponding to the second network connection information, that is, a field flag "PE@" corresponding to the second data packet, and the data subfield of the second data packet may store the second network connection information.
In the above embodiment, the distribution network initiating device divides the network identifier, the network access password, and the encrypted splicing data into the first network connection information and the second network connection information, and encapsulates the first network connection information and the second network connection information in different bluetooth data packets, so as to avoid that the length of the bluetooth data packet cannot accommodate all network connection information. Therefore, the network connection information can be sent to the equipment to be distributed through the broadcasted Bluetooth data packet, so that the equipment to be distributed is connected with the target network based on the network connection information.
In one embodiment, as shown in fig. 10, S802 specifically includes:
s1002, carrying out hash calculation on the network identifier to obtain a hash value of the network identifier.
The hash calculation is a calculation method for mapping input data into a data digest by a hash function. Common hash calculation algorithms include the MD4 (Message Digest) algorithm, the MD5 algorithm, the SHA-1 algorithm, and the like.
And S1004, encrypting the network access password to obtain the encrypted network access password.
The distribution network initiating device can encrypt the network access password through an asymmetric encryption algorithm or a symmetric encryption algorithm. The symmetric Encryption algorithm is an Encryption algorithm in which an Encryption key is the same as a decryption key, and includes an AES (Advanced Encryption Standard) algorithm, a DES (Data Encryption Standard) algorithm, an RC5 algorithm, a TDEA algorithm, and the like. The asymmetric encryption algorithm is an algorithm for respectively encrypting and decrypting by using different public keys and private keys, and comprises an RSA algorithm, an ECC (Error Correcting Code) algorithm, a D-H algorithm and the like.
In one embodiment, the network-accessing password is symmetrically encrypted by the network-accessing password using a CBC (Cipher Block Chaining) encryption mode of an AES encryption method, and the initial vector iv parameter used for encryption is a key used for encryption.
In one embodiment, after the network access password is encrypted, the network access password is converted into a visible character form through a base64 algorithm by the distribution network initiating device.
And S1006, splicing the hash value, the encrypted network access password and the encryption type to obtain spliced data.
Wherein, the splicing is to connect the data sequences in sequence. For example, the distribution network initiating device stores the encrypted type with a data sequence of 1 byte, stores the hash value with a data sequence of 16 bytes, and stores the encrypted network access password with a data sequence of 24 bytes. Then, after the hash value of 16 bytes is spliced into the encryption type of 1 byte, the encrypted network access password of 24 bytes is spliced into the hash value, and 41 bytes of spliced data is obtained.
In one embodiment, the distribution network initiating device splices the hash value, the encrypted network access password in the form of the visible character and the encryption type to obtain spliced data.
S1008, the splicing data is divided into first network connection information and second network connection information.
The distribution network initiating device divides the splicing data into two parts, namely first network connection information and second network connection information. Therefore, the first network connection information and the second network connection information can be respectively packaged in different Bluetooth data packets. The lengths of the first network connection information and the second network connection information may be the same or different.
In one embodiment, S1002 is followed by: selecting a character string with a preset digit number from the hash value as a target hash value of the network identifier; s1006 specifically includes: and splicing the target hash value, the encrypted network access password and the encryption type to obtain spliced data.
In particular, the distribution network initiating device may intercept a portion of the bytes from the hash value as a target hash value for the network identification, e.g., the distribution network initiating device intercepts 16 bytes from the hash value as a target hash value. The distribution network initiating device can sequentially connect the part of bytes intercepted from the hash value, the encrypted network access password and the encryption type to obtain splicing data.
In the above embodiment, the distribution network initiating device performs hash calculation on the network identifier, and maps the network identifier to a hash value with a shorter length, so that the utilization rate of bytes in the bluetooth data packet can be improved. Moreover, the network access password is encrypted, so that the network access password can be prevented from being stolen, and the security of the network access password is improved.
In one embodiment, S210 specifically includes: if the networking state reported by the equipment to be distributed is inquired to be connected, displaying an equipment detail page of the equipment to be distributed according to the networking state; and displaying the networking result of the equipment to be networked to the target network in a floating layer mode on the equipment detail page.
The device detail page is a page showing detailed information of the device to be networked, and may be a page shown in an application program of the device initiating the network distribution. For example, the distribution network initiating device presents a device details page through an instant messaging application. A float is a view with transparency superimposed on a page. The floating layer mode is a mode of displaying information through the floating layer. For example, as shown in fig. 11, the device detail page shows that the device to be networked is a screen box. If the network distribution initiating device inquires that the network connection state reported by the device to be connected is connected, the floating layer is displayed, and the network connection result of successful network connection is displayed in the displayed floating layer. And when the distribution network initiating device receives a query instruction triggered by clicking the device detail control in the device detail page, displaying the device detail information of the screen projection box.
In the above embodiment, when the device to be networked accesses the wireless network, the distribution network initiating device displays the device detail page of the device to be networked according to the networking state, and displays the networking result of the device to be networked on the target network in a floating layer manner on the device detail page. Therefore, the user is informed that the equipment to be distributed has been accessed to the wireless network in time, and the efficiency of displaying the networking result is improved.
In one embodiment, the device to be distributed is a screen projection device; after S210, further comprising: responding to the screen-projecting graphic code scanning operation, and displaying a screen-projecting verification page in the instant messaging application; acquiring a screen projection verification code input in a screen projection verification page; and if the screen projection verification code passes the verification, the media data are sent to the screen projection equipment through the target network, so that the screen projection equipment performs screen projection display on the media data.
The distribution network initiating device broadcasts the Bluetooth data packet, so that the screen projection device is connected with a target network based on the network connection information when receiving the Bluetooth data packet. And after the screen projection equipment is successfully accessed to the target network, the media data sent by the instant messaging application can be received through the target network, and the media data is subjected to screen projection display.
The screen projection graphic code is used for projecting the screen of the screen projection equipment, and specifically can be a graphic code displayed by the to-be-configured network equipment through the display equipment. The screen-projection verification page is a page for inputting a screen-projection verification code. The screen-projection verification code is a code symbol used for verifying screen-projection operation, and specifically may be a number sequence, or a sequence composed of numbers, letters, and the like. For example, as shown in fig. 12, the screen shot verification page includes a screen shot verification code input area, a "start screen shot" trigger control, and a keyboard. The distribution network initiating device acquires the screen projection verification code input in the screen projection verification page, then verifies the screen projection verification code, and if the screen projection verification code passes verification, the media data is sent to the screen projection device through the target network, so that the screen projection device can perform screen projection display on the media data.
The screen projection can be that the media data are sent to the display device for display through the screen projection device, or the media data are projected to a curtain, a wall surface and the like for display through the screen projection device. For example, a screen projection device acquires media data played in a mobile terminal, and then sends the acquired media data to a display device (e.g., a television) for playing, so that the media data can be played on a larger screen.
In one embodiment, if the networking state reported by the device to be configured is found to be connected, the device initiating device for the distribution network adds the device serial number of the device to be configured to the device list of the instant messaging application, so as to bind the device to be configured. As shown in fig. 13, after the device to be networked is bound, a screen-projection graphic code and a screen-projection verification code are displayed. And responding to the screen-projecting graphic code scanning operation by the distribution network initiating equipment, and displaying a screen-projecting verification page in the instant messaging application. And then comparing the screen projection verification code input in the screen projection verification page with the screen projection verification code displayed by the equipment to be configured, if the screen projection verification code input in the screen projection verification page is the same as the screen projection verification code displayed by the equipment to be configured, the screen projection verification code input by the user passes verification, and the distribution network initiating equipment sends the media data to the screen projection equipment through a target network so that the screen projection equipment performs screen projection display on the media data.
In the above embodiment, the distribution network device responds to the screen-projecting graphic code scanning operation, displays the screen-projecting verification page in the instant messaging application, and acquires the screen-projecting verification code input in the screen-projecting verification page. If the screen projection verification code passes the verification, the media data are sent to the screen projection equipment through the target network, so that the screen projection equipment can perform screen projection display on the media data. Therefore, the media data can be sent to the screen projection equipment through the target network for screen projection display, and the display efficiency of the media data is improved.
In an embodiment, as shown in fig. 14a, a network connection method is provided, which is described by taking as an example that the method is applied to a device to be networked in fig. 1, and includes the following steps:
s1402a, monitoring a Bluetooth data packet broadcast by the distribution network initiating device.
The distribution network initiating device is a device which is used as a main device to initiate a bluetooth distribution network process, and may be a mobile terminal, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart sound box, a smart watch, a vehicle-mounted terminal, and the like, but is not limited thereto.
The bluetooth data packet is a data packet obtained by encapsulating data based on a bluetooth protocol. The bluetooth protocol may be a classic bluetooth protocol or a BLE bluetooth protocol or the like. The bluetooth data packet may include a device name field, from which network connection information of a target network that the device to be networked expects to access may be read.
In one embodiment, the graphic code comprises a distribution network graphic code and a binding graphic code; before S602, the method further includes: after the network distribution equipment is started, checking whether the network distribution equipment is connected to a wireless network or not, and if the network distribution equipment is not connected to the wireless network, displaying a distribution network graphic code so that the distribution network initiating equipment responds to the scanning operation of the distribution network graphic code and displays a Bluetooth distribution network page for the network distribution equipment to be distributed; and if the equipment is connected to the wireless network, displaying the binding graphic code so that the distribution network initiating equipment responds to the scanning operation of the binding graphic code and binds the equipment to be distributed into the equipment list. The distribution network graphic code displayed in the page of the device to be distributed is shown in fig. 14 b.
S1404a, when a Bluetooth data packet broadcasted by the distribution network initiating equipment is monitored, extracting network connection information from the Bluetooth data packet; the Bluetooth data packet is generated by the distribution network initiating equipment based on the network connection information of the target network; the target network is selected on a network selection page of the distribution network initiating device.
The network connection information is information required by the network equipment to be configured to access the target network, and comprises a network identifier, a network access password, an encryption type and the like of the target network. The network identifier is the name of the target network and is composed of numbers, letters, special symbols and the like. For example, the network identification may be WechatWork-Staffwifi1. The encryption type is a type for performing security encryption on the target network, and comprises WEP, WPA2, WPA3, WPA2 enterprise level, WPA3 enterprise level and the like. The distribution network initiating device may indicate the encryption type by a number, a letter, etc., for example, the WEP encryption type by a number "1", the WAP encryption type by a number 2, etc.
The network selection page is a page showing a candidate network. The distribution network initiating device can select a wireless network which enables the device to be distributed to access from the candidate networks displayed on the network selection page, and the selected wireless network is a target network.
In an embodiment, S1404a specifically includes: the method comprises the steps that a device to be distributed monitors a Bluetooth broadcast channel, and when a Bluetooth data packet carrying a specific zone bit is monitored, the monitored data packet is determined to be the Bluetooth data packet broadcasted by a distribution network initiating device; network connection information is extracted from the device name field of the bluetooth packet.
S1406a, connecting the target network based on the network connection information.
And when the network to be distributed equipment receives the network connection information, connecting the target network based on the network connection information. The network connection information may include a network identifier, a network access password, and an encryption type. And the equipment to be distributed selects a wireless network matched with the network identifier from the currently covered wireless networks as a target network, and then accesses the target network through the access password and the encryption type.
In one embodiment, after determining a target network, the device to be networked sends the network access password and the encryption type acquired from the network connection information to the network device, so that the network device verifies the network access password based on the encryption type, and when the network access password is verified, the device to be networked is allowed to access the target network.
And S1408a, acquiring and reporting the networking state of the target network, so that the distribution network initiating device displays the networking result of the target network based on the networking state.
The networking state is used for representing the state of the device to be networked connected with the target network, and comprises a connected state and an unconnected state. And the networking state is an unconnected state before the equipment to be networked does not access the target network, and the networking state is a connected state after the equipment to be networked successfully accesses the target network. The equipment to be distributed can report the networking state to the server, so that the networking state is fed back to the distribution network initiating equipment through the server.
In an embodiment, S1408a specifically includes: and the equipment to be distributed reports the networking state of the target network to a background server of the instant messaging application, wherein the instant messaging application is an application program client installed in the distribution network initiating equipment. And the background server responds to a query request sent by the distribution network initiating equipment through the instant messaging application and feeds back the networking state of the target network to the distribution network initiating equipment.
In the above embodiment, the device to be configured performs broadcast monitoring, and when a bluetooth data packet broadcasted by the network distribution initiating device is monitored, extracts network connection information from the bluetooth data packet, and connects to the target network based on the network connection information. Therefore, for the device to be networked which can only perform broadcast monitoring but cannot perform broadcast transmission because the device does not support a complete bluetooth communication protocol, the bluetooth data packet broadcasted by the distribution network initiating device can be acquired through broadcast monitoring, and the device to be networked is connected to the target network based on the network connection information in the bluetooth data packet.
In one embodiment, the bluetooth packet includes a first packet and a second packet; when a Bluetooth data packet broadcasted by a distribution network initiating device is monitored, the extracting network connection information from the Bluetooth data packet comprises the following steps: when a first data packet broadcasted by distribution network initiating equipment is monitored, first network connection information is extracted from the first data packet; when a second data packet broadcasted by the distribution network initiating device is monitored, extracting second network connection information from the second data packet; and obtaining the network connection information based on the splicing data synthesized by the first network connection information and the second network connection information.
The first data packet and the second data packet are both bluetooth data packets, and carry partial network connection information respectively, and the carried network connection information is first network connection information and second network connection information respectively.
In one embodiment, the first data packet and the second data packet include a header subfield and a data subfield in the device name field. The device to be networked extracts a field mark and first network connection information corresponding to the first network connection information from a header subfield and a data subfield of the first data packet respectively; and respectively extracting a field mark corresponding to the second network connection information and the second network connection information from a header subfield and a data subfield of the second data packet.
In one embodiment, the field flag corresponding to the first packet is "PS@" and the field flag corresponding to the second packet is "PE@". When the device to be networked receives the Bluetooth data packet with the field mark of 'PS@', the first data packet is confirmed to be monitored, the first network connection information extracted from the first data packet is cached, when the device to be networked receives the Bluetooth data packet with the field mark of 'PE@', the second data packet is confirmed to be monitored, the second network connection information extracted from the second data packet and the cached first network connection information are spliced to obtain spliced data, and then the network connection information is obtained based on the spliced data.
In an embodiment, the present application further provides an application scenario, where the application scenario applies the network connection method described above. Specifically, the application of the network connection method in the application scenario is as follows:
as shown in fig. 15, the mobile terminal 1502 is a distribution network initiating device, the screen projecting box 1506 is a device to be distributed, and a bluetooth data packet is transmitted between the mobile terminal 1502 and the screen projecting box 1506 through bluetooth broadcast. The operating system of the screen projection box 1506 is an android system of a kit kat version, only supports an incomplete bluetooth BLE protocol, can perform broadcast monitoring on a bluetooth data packet, and cannot perform broadcast transmission on the bluetooth data packet. The screen projection box 1506 is connected with the display device 1508 through an HDMI interface, when the screen projection box 1506 is powered on, whether a wireless network is connected is checked, and if the wireless network is not connected, the distribution network graphic code is displayed on the display device 1508.
As shown in fig. 16, the mobile terminal 1502 scans a distribution network graphic code through the instant messaging application, and in response to a distribution network graphic code scanning operation, displays a bluetooth distribution network page of the screen projection box 1506. The bluetooth network distribution page includes a network distribution control, and the mobile terminal 1502 displays a network selection page in response to a network distribution operation triggered by clicking the network distribution control. The network selection page shows a plurality of candidate networks, and the mobile terminal 1502 selects a target network from the candidate networks in response to a selection operation for the candidate networks, and then generates a bluetooth packet based on network connection information of the target network, where the bluetooth packet may include a first packet and a second packet. The network connection information comprises a network identifier, a network access password and an encryption type of the target network.
The mobile terminal 1502 performs MD5 hash calculation on the network identifier to obtain a hash value of the network identifier, and then intercepts a part of bytes from the obtained hash value and writes the part of bytes into the bluetooth data packet, for example, intercepts the first 16 bytes of the hash value and writes the first 16 bytes into the device name field of the bluetooth data packet. The mobile terminal symmetrically encrypts the network access password through a CBC (Cipher Block Chaining) encryption mode of an AES encryption method, and an initial vector IV parameter used for encryption is a secret key used for encryption.
The mobile terminal 1502 splits part of bytes intercepted from the hash value, the encrypted network access password and the spliced data obtained by splicing the encryption type into the first network connection information and the second network connection information, then encapsulates a field mark "PS@" corresponding to the first network connection information and the first network connection information in the device name field of the first data packet, and encapsulates a field mark "PE@" corresponding to the second network connection information and the second network connection information in the device name field of the second data packet.
The mobile terminal 1502 calls the bluetooth BLE broadcast interface, and cyclically broadcasts the first data packet and the second data packet according to the broadcast duration, for example, the mobile terminal 1502 may set the broadcast duration to be 15 seconds, and broadcast the first data packet for 15 seconds, then broadcast the second data packet for 15 seconds, and cycle sequentially.
In the process of broadcasting the bluetooth data packet, the mobile terminal 1502 inquires the networking state reported by the screen projection box 1506 and starts a timer to time; if the networking state reported by the screen projection box 1506 is inquired to be connected, displaying a successful networking result of the screen projection box 1506 on the target network according to the networking state; if the networking state reported by the screen projection box 1506 is not connected, the bluetooth data packet is continuously broadcast until the time counted by the timer reaches the preset time length. And if the inquired networking state is still unconnected when the time counted by the timer reaches the preset time, displaying the networking result of the networking failure.
As shown in fig. 17, after the screen projection box 1506 is powered on and started, it checks whether there is a network connection, and if the wireless network is connected, the bound two-dimensional code is displayed, so that the mobile terminal 1502 binds the device to be networked to the device list of the instant messaging application in response to the bound two-dimensional code scanning operation triggered by the instant messaging application. If the wireless network is not connected, the screen projection box 1506 judges whether a Bluetooth network distribution is carried out or not, and if the Bluetooth network distribution is carried out, the two-dimensional code of the network distribution is displayed, so that the network distribution initiating device responds to the network distribution graphic code scanning operation triggered by the instant messaging application to initiate a network distribution process.
The screen projection box 1506 starts to monitor the bluetooth broadcast while displaying the distribution network graphic code, and when monitoring the bluetooth data packet broadcast by the mobile terminal 1502, extracts the device name field from the bluetooth data packet, and then extracts the network connection information from the device name field. And if the monitored Bluetooth data packet comprises a first data packet and a second data packet, splicing the first network connection information extracted from the first data packet and the second network connection information extracted from the second data packet, and obtaining the hash value, the network access password and the encryption type of the network identifier according to spliced data obtained based on splicing.
The screen projection box 1506 calculates hash values of network identifiers of the wireless networks currently covered, selects a target network from the wireless networks based on the calculated hash values, and accesses the target network by using an access password and an encryption type extracted from the bluetooth data packet.
If the screen projecting box 1506 successfully accesses the target network, reporting the networking state to a background server of the instant messaging application through a CGI (Common Gateway Interface) command, and displaying the network connection success and the binding graphic code on the display device. After receiving the networking state reported by the screen projection box, the background server of the instant messaging application responds to the query instruction sent by the mobile terminal 1502 through the client of the instant messaging application, and feeds back the networking state of the screen projection box 1506 to the mobile terminal.
After the screen projection box 1506 accesses the wireless network, the mobile terminal 1502 adds the device serial number of the screen projection box 1506 connected to the wireless network to the device list of the instant messaging application, and sends a binding success instruction to the screen projection box 1506, so that the screen projection box 1506 responds to the binding success instruction to display the screen projection graphic code.
The mobile terminal 1502 responds to a screen projection graphic code scanning operation triggered by the instant messaging application, displays a screen projection verification code input page, acquires a screen projection verification code input on the screen projection verification code input page, verifies the acquired screen projection verification code, and sends media data to a background server 1504 of the instant messaging application if the screen projection verification code passes the verification, and the background server 1504 forwards the media data to a screen projection box, so that the screen projection box 1506 sends the media data to a display device 1508 to be displayed, and specifically, the process that the mobile terminal 1502 projects the media data to the display device 1508 is shown in fig. 18.
It should be understood that although the various steps in the flowcharts of fig. 2, 7, 8, 10, 14a are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 7, 8, 10, 14a may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or in alternation with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 19, there is provided a network connection apparatus, which may be a part of a computer device using a software module or a hardware module, or a combination of the two, and specifically includes: a presentation module 1902, a generation module 1904, and a broadcast module 1906, wherein:
the display module 1902 is configured to display, in response to the graphic code scanning operation, a bluetooth network distribution page of the device to be network-distributed;
the display module 1902 is further configured to display a network selection page in response to a distribution network operation triggered on the bluetooth distribution network page;
a generating module 1904, configured to generate a bluetooth data packet based on the network connection information of the target network when the target network is selected from the candidate networks displayed on the network selection page;
a broadcasting module 1906, configured to broadcast a bluetooth data packet, so that when receiving the bluetooth data packet, the device to be networked connects to a target network based on network connection information, and reports a networking state;
the display module 1902 is further configured to display a networking result of the device to be networked on the target network according to the networking state.
The network connection method, the network connection device, the computer equipment, the storage medium and the computer program product respond to the distribution network graphic code scanning operation and display the Bluetooth distribution network page of the equipment to be distributed, so that the distribution network process of the equipment to be distributed can be started through distribution network operation triggered in the Bluetooth distribution network 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 broadcasted, so that the device to be networked can be connected with the target network based on the network connection information in the Bluetooth data packet when receiving the Bluetooth data packet. Therefore, the distribution network initiating device serves as a master device to perform Bluetooth broadcasting, the device to be configured serves as a slave device to perform broadcasting monitoring, the distribution network initiating device does not need to establish Bluetooth connection with the device to be configured, the Bluetooth data packet can be sent to the device to be configured through the Bluetooth broadcasting, and when the device to be configured cannot serve as the master device to establish Bluetooth connection with the terminal due to the fact that a complete Bluetooth protocol is not supported, network connection information can be obtained and the device to be configured can be connected to a target network through the obtained network connection information.
In one embodiment, display module 1902, further configured to:
responding to a distribution network graphic code scanning operation triggered by instant messaging application, and decoding the scanned distribution network graphic code to obtain graphic information;
when the graphic information contains preset field information, displaying a Bluetooth distribution network page of the equipment to be distributed through the instant messaging application; a distribution network control is displayed in the Bluetooth distribution network page;
and the exhibition module is also used for responding to the distribution network operation triggered on the distribution network control displayed on the Bluetooth distribution network page and displaying a network selection page.
In one embodiment, the generating module 1904 is further configured to:
acquiring a network identifier, an encryption type and a network access password of a target network; the network identification, the encryption type and the network access password belong to network connection information;
and generating a Bluetooth data packet based on the network identification, the encryption type and the network access password.
In one embodiment, the bluetooth packet includes a first packet and a second packet; a generating module 1904, further configured to:
dividing the network identification, the network access password and the encrypted splicing data into first network connection information and second network connection information;
packaging the first network connection information and a field mark corresponding to the first network connection information to obtain a first data packet; and encapsulating the second network connection information and the field mark corresponding to the second network connection information to obtain a second data packet.
In one embodiment, the first data packet and the second data packet each 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 a field mark corresponding to the first network connection information and the first network connection information;
and the header subfield and the data subfield of the second data packet respectively store the field mark corresponding to the second network connection information and the second network connection information.
In one embodiment, the generating module 1904 is further configured to:
carrying out hash calculation on the network identifier to obtain a hash value of the network identifier;
encrypting the network access password to obtain an encrypted network access password;
splicing the hashed value, the encrypted network access password and the encryption type to obtain spliced data;
the splicing data is divided into first network connection information and second network connection information.
In one embodiment, as shown in fig. 20, the apparatus further comprises:
a selecting module 1908, configured to select a character string with a preset number of digits from the hash value as a target hash value of the network identifier;
the generating module 1904 is further configured to splice the target hash value, the encrypted network access password, and the encryption type to obtain spliced data.
In one embodiment, the broadcasting module 1906 is further configured to:
acquiring the broadcast time length for broadcasting the first data packet and the second data packet;
the method comprises the steps that a first data packet and a second data packet are sequentially broadcasted in a broadcasting time through a Bluetooth network, so that when a device to be networked receives the first data packet and the second data packet, first network connection information and second network connection information are respectively extracted from the first data packet and the second data packet, and a target network is connected based on the first network connection information and the second network connection information.
In one embodiment, the apparatus further comprises:
an inquiry module 1910 for inquiring the networking state reported by the equipment to be distributed during the process of broadcasting the bluetooth data packet, and starting a timer to time;
the query module 1910 is further configured to, if it is queried that the networking state reported by the device to be configured is connected, perform a step of displaying a networking result of the device to be configured on the target network according to the networking state;
the querying module 1910 is further configured to, if it is queried that the networking state reported by the device to be configured is unconnected, continue to execute the step of broadcasting the bluetooth data packet until the time counted by the timer reaches a preset time length.
In one embodiment, display module 1902, further configured to:
if the networking state reported by the equipment to be distributed is inquired to be connected, displaying an equipment detail page of the equipment to be distributed according to the networking state;
and displaying the networking result of the equipment to be networked to the target network in a floating layer mode on the equipment detail page.
In one embodiment, the device to be networked is a screen projection device; the device still includes:
the display module 1902 is further configured to display, in response to the screen-projection graphic code scanning operation, a screen-projection verification page in the instant messaging application;
an obtaining module 1912, configured to obtain a screen-casting verification code input in the screen-casting verification page;
a sending module 1914, configured to send the media data to the screen projection device through the target network if the screen projection verification code passes verification, so that the screen projection device performs screen projection display on the media data.
In one embodiment, as shown in fig. 21, there is provided a network connection apparatus, which may be a part of a computer device using a software module or a hardware module, or a combination of the two, and specifically includes: a snoop module 2102, an extraction module 2104, a connection module 2106, and an acquisition module 2108, wherein:
a monitoring module 2102, configured to monitor a bluetooth packet broadcast by a distribution network initiating device;
the extracting module 2104 is configured to extract the network connection information from a bluetooth packet when the bluetooth packet broadcasted by the distribution network initiating device is monitored; the Bluetooth data packet is generated by the distribution network initiating equipment based on the network connection information of the target network; the target network is selected on a network selection page of the distribution network initiating equipment;
a connection module 2106 for connecting to a target network based on the network connection information;
the obtaining module 2108 is configured to obtain a networking state of the target network and report the networking state, so that the distribution network initiating device displays a networking result of the target network based on the networking state.
In the above embodiment, the device to be configured performs broadcast monitoring, and when a bluetooth data packet broadcasted by the network distribution initiating device is monitored, extracts network connection information from the bluetooth data packet, and connects to the target network based on the network connection information. Therefore, for the device to be networked which can only perform broadcast monitoring but cannot perform broadcast transmission because the device does not support a complete bluetooth communication protocol, the bluetooth data packet broadcasted by the distribution network initiating device can be acquired through broadcast monitoring, and the device to be networked is connected to the target network based on the network connection information in the bluetooth data packet.
In one embodiment, the bluetooth packet includes a first packet and a second packet; an extraction module 2104 further configured to:
when a first data packet broadcasted by distribution network initiating equipment is monitored, extracting first network connection information from the first data packet;
when a second data packet broadcasted by the distribution network initiating device is monitored, extracting second network connection information from the second data packet;
and obtaining the network connection information based on the splicing data synthesized by the first network connection information and the second network connection information.
For specific limitations of the network connection device, reference may be made to the above limitations of the network connection method, which are not described herein again. The modules in the network connection device may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, and the computer device may be a terminal as a distribution network initiating device, and its internal structure diagram may be as shown in fig. 22. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a network connection method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 22 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (18)

1. A method of network connectivity, the method comprising:
responding to the distribution network graphic code scanning operation, and displaying a Bluetooth distribution network page of the equipment to be distributed;
responding to the distribution network operation triggered by the Bluetooth distribution network page, and displaying a network selection page;
when a target network is selected from the candidate networks displayed on the network selection page, generating a Bluetooth data packet based on the network connection information of the target network;
broadcasting the Bluetooth data packet to enable the device to be networked to be connected with the target network based on the network connection information and report a networking state when receiving the Bluetooth data packet;
and displaying the networking result of the equipment to be distributed to the target network according to the networking state.
2. The method of claim 1, wherein the displaying the bluetooth distribution network page of the device to be distributed in response to the distribution network graphic code scanning operation comprises:
responding to a distribution network graphic code scanning operation triggered by instant messaging application, and decoding the scanned distribution network graphic code to obtain graphic information;
when the graphic information contains preset field information, displaying a Bluetooth distribution network page of the equipment to be distributed through the instant messaging application; a distribution network control is displayed in the Bluetooth distribution network page;
the displaying a network selection page in response to the network distribution operation triggered on the Bluetooth network distribution page comprises:
and responding to the distribution network operation triggered on the distribution network control displayed on the Bluetooth distribution network page, and displaying a network selection page.
3. The method of claim 1, wherein generating the bluetooth packet based on the network connection information of the target network comprises:
acquiring a network identifier, an encryption type and a network access password of the target network; the network identification, the encryption type and the network access password belong to the network connection information;
and generating a Bluetooth data packet based on the network identification, the encryption type and the network access password.
4. The method of claim 3, wherein the Bluetooth data packet comprises a first data packet and a second data packet; the generating the bluetooth data packet based on the network identifier, the encryption type and the network access password comprises:
dividing the network identification, the network access password and the encrypted type splicing data into first network connection information and second network connection information;
packaging the first network connection information and a field mark corresponding to the first network connection information to obtain a first data packet; and encapsulating the second network connection information and the field mark corresponding to the second network connection information to obtain a second data packet.
5. The method of claim 4, wherein the first packet and the second packet each include a device name field; the device name field includes a header subfield and a data subfield;
a header subfield and a data subfield of the first data packet respectively store a field mark corresponding to the first network connection information and the first network connection information;
and the header subfield and the data subfield of the second data packet respectively store the field mark corresponding to the second network connection information and the second network connection information.
6. The method of claim 4, wherein the dividing the network identifier, the network access password, and the splicing data of the encryption type into first network connection information and second network connection information comprises:
carrying out hash calculation on the network identifier to obtain a hash value of the network identifier;
encrypting the network access password to obtain the encrypted network access password;
splicing the hashed value, the encrypted network access password and the encrypted type to obtain spliced data;
the splicing data is divided into first network connection information and second network connection information.
7. The method of claim 6, wherein after performing the hash calculation on the network identifier to obtain the hash value of the network identifier, the method further comprises:
selecting a character string with preset digits from the hash value as a target hash value of the network identifier;
the splicing the hash value, the encrypted network access password and the encrypted type to obtain spliced data comprises:
and splicing the target hash value, the encrypted network access password and the encryption type to obtain spliced data.
8. The method of claim 4, wherein the broadcasting the bluetooth packet to enable the device to be networked to connect to the target network based on the network connection information when receiving the bluetooth packet comprises:
acquiring the broadcast time length for broadcasting the first data packet and the second data packet;
the first data packet and the second data packet are sequentially broadcasted in the broadcasting time through a Bluetooth network, so that when the equipment to be networked receives the first data packet and the second data packet, first network connection information and second network connection information are respectively extracted from the first data packet and the second data packet, and the target network is connected based on the first network connection information and the second network connection information.
9. The method of claim 1, further comprising:
in the process of broadcasting the Bluetooth data packet, inquiring the networking state reported by the equipment to be networked, and starting a timer to time;
if the networking state reported by the equipment to be networked is inquired to be connected, the step of displaying the networking result of the equipment to be networked to the target network according to the networking state is executed;
and if the networking state reported by the equipment to be networked is not connected, continuing to execute the step of broadcasting the Bluetooth data packet until the time timed by the timer reaches a preset time length.
10. The method of claim 1, wherein the displaying the networking result of the device to be configured to the target network according to the networking status comprises:
if the networking state reported by the equipment to be distributed is inquired to be connected, displaying an equipment detail page of the equipment to be distributed according to the networking state;
and displaying the networking result of the equipment to be distributed to the target network in a floating layer mode on the equipment detail page.
11. The method according to any one of claims 1 to 10, wherein the device to be distributed is a screen projection device; after the networking result of the device to be configured to the target network is displayed according to the networking state, the method further includes:
responding to the screen-projecting graphic code scanning operation, and displaying a screen-projecting verification page in the instant messaging application;
acquiring a screen projection verification code input in the screen projection verification page;
and if the screen projection verification code passes the verification, sending the media data to the screen projection equipment through the target network so that the screen projection equipment performs screen projection display on the media data.
12. A method of network connectivity, the method comprising:
monitoring a Bluetooth data packet broadcast by a distribution network initiating device;
when a Bluetooth data packet broadcasted by the distribution network initiating equipment is monitored, extracting network connection information from the Bluetooth data packet; the Bluetooth data packet is generated by the distribution network initiating equipment based on network connection information of a target network; the target network is selected on a network selection page of the distribution network initiating device;
connecting the target network based on the network connection information;
and acquiring and reporting the networking state of the target network, so that the distribution network initiating equipment displays the networking result of the target network based on the networking state.
13. The method of claim 12, wherein the bluetooth packets comprise a first packet and a second packet; when monitoring the bluetooth data packet broadcast by the distribution network initiating device, the extracting network connection information from the bluetooth data packet includes:
when a first data packet broadcasted by the distribution network initiating device is monitored, extracting first network connection information from the first data packet;
when a second data packet broadcasted by the distribution network initiating device is monitored, extracting second network connection information from the second data packet;
and obtaining the network connection information based on splicing data synthesized by the first network connection information and the second network connection information.
14. A network connection apparatus, the apparatus comprising:
the display module is used for responding to the distribution network graphic code scanning operation and displaying the Bluetooth distribution network page of the equipment to be distributed;
the display module is also used for responding to the distribution network operation triggered by the Bluetooth distribution network page and displaying a network selection page;
the generating module is used for generating a Bluetooth data packet based on the network connection information of the target network when the target network is selected from the candidate networks displayed on the network selection page;
the broadcasting module is used for broadcasting the Bluetooth data packet so that the equipment to be networked is connected with the target network based on the network connection information and reports a networking state when receiving the Bluetooth data packet;
the display module is further configured to display the networking result of the to-be-configured network device on the target network according to the networking state.
15. A network connection apparatus, the apparatus comprising:
the monitoring module is used for monitoring a Bluetooth data packet broadcasted by the distribution network initiating equipment;
the extraction module is used for extracting network connection information from the Bluetooth data packet when the Bluetooth data packet broadcasted by the distribution network initiating device is monitored; the Bluetooth data packet is generated by the distribution network initiating equipment based on network connection information of a target network; the target network is selected on a network selection page of the distribution network initiating device;
a connection module for connecting the target network based on the network connection information;
and the acquisition module is used for acquiring and reporting the networking state of the target network so that the distribution network initiating device can display the networking result of the target network based on the networking state.
16. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 13 when executing the computer program.
17. A computer-readable storage medium, storing a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 13.
18. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 13 when executed by a processor.
CN202111197656.3A 2021-10-14 2021-10-14 Network connection method, device, computer equipment and storage medium Pending CN115988676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111197656.3A CN115988676A (en) 2021-10-14 2021-10-14 Network connection method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111197656.3A CN115988676A (en) 2021-10-14 2021-10-14 Network connection method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115988676A true CN115988676A (en) 2023-04-18

Family

ID=85964793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111197656.3A Pending CN115988676A (en) 2021-10-14 2021-10-14 Network connection method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115988676A (en)

Similar Documents

Publication Publication Date Title
CN110493261B (en) Verification code obtaining method based on block chain, client, server and storage medium
US11616775B2 (en) Network access authentication method, apparatus, and system
WO2017097041A1 (en) Data transmission method and device
CN110401677B (en) Method and device for acquiring digital copyright key, storage medium and electronic equipment
CN113691502B (en) Communication method, device, gateway server, client and storage medium
CN113553572B (en) Resource information acquisition method, device, computer equipment and storage medium
CN113572743B (en) Data encryption and decryption methods and devices, computer equipment and storage medium
US20200228504A1 (en) Private Exchange of Encrypted Data Over A Computer Network
CN111131416A (en) Business service providing method and device, storage medium and electronic device
CN110166489B (en) Data transmission method, system, equipment and computer medium in Internet of things
CN117240625B (en) Tamper-resistant data processing method and device and electronic equipment
CN116662941B (en) Information encryption method, device, computer equipment and storage medium
JP2018523360A (en) Method and system for secure SMS communication
CN111339201A (en) Evaluation method and system based on block chain
CN107872315B (en) Data processing method and intelligent terminal
CN113824553A (en) Key management method, device and system
CN115348107A (en) Internet of things equipment secure login method and device, computer equipment and storage medium
CN112399392A (en) Communication connection method, device, equipment and storage medium of home care terminal
CN112004201A (en) Short message sending method and device and computer system
CN109120576B (en) Data sharing method and device, computer equipment and storage medium
CN116455572B (en) Data encryption method, device and equipment
CN113127844A (en) Variable access method, device, system, equipment and medium
CN117041956A (en) Communication authentication method, device, computer equipment and storage medium
CN116743481A (en) Service security management and control method, device, equipment and storage medium
CN116684102A (en) Message transmission method, message verification method, device, equipment, medium and product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40083875

Country of ref document: HK