CN111787541A - Wireless equipment rapid network distribution method and system based on multi-sub-packet independent record - Google Patents
Wireless equipment rapid network distribution method and system based on multi-sub-packet independent record Download PDFInfo
- Publication number
- CN111787541A CN111787541A CN202010749674.7A CN202010749674A CN111787541A CN 111787541 A CN111787541 A CN 111787541A CN 202010749674 A CN202010749674 A CN 202010749674A CN 111787541 A CN111787541 A CN 111787541A
- Authority
- CN
- China
- Prior art keywords
- sub
- packet
- wireless
- data packet
- packets
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/02—Arrangements for optimising operational condition
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/20—Selecting an access point
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a method and a system for rapidly distributing a network to wireless equipment based on multi-sub-packet independent recording. In the process of the existing wireless equipment distribution network, the whole packet data verification is carried out, so that the success rate of the distribution network is reduced. The invention comprises the following steps: firstly, broadcasting or multicasting a protocol data packet to a wireless device; the protocol data packet comprises a plurality of sub-packets. Secondly, the wireless equipment receives a protocol data packet; and thirdly, the wireless device receives the protocol data packet again to supplement the missing sub-packet. And fourthly, the wireless equipment analyzes the protocol data packet to obtain an encrypted value and a password of the target wireless hotspot, and the encrypted value is matched to obtain a hotspot name connected to the target wireless hotspot. The wireless equipment of the invention respectively checks and screens a plurality of sub-packets in the protocol data packet, stores the sub-packets with complete data, and can accurately and completely acquire the protocol data packet after 3-5 rounds of data transmission; the data volume of a single sub-packet is effectively utilized to be small, and the speed and the success rate of a wireless device distribution network are improved.
Description
Technical Field
The invention belongs to the technical field of IOT (Internet of things), and particularly relates to a wireless device accurate discovery method and system based on a serial number packet technology.
Background
The distribution network in the IOT technical scheme is an AP distribution network and a key distribution network at present. In a home or hotel application environment, the AP distribution network mode has too many wireless equipment hotspots, and multiple WIFI hotspots in the same environment can interfere with the performance of a router actually applied by a user and the selection of the user when the user uses a mobile phone to connect the hotspots. On the other hand, the AP network distribution mode may have problems on some android phones, specifically: the android mobile phone carries out AP network distribution, automatically switches WIFI hotspots, and then carries out communication network distribution and authentication. When the WIFI hotspot is automatically switched, some versions of android mobile phones cannot acquire the authority of the WIFI hotspot switching, and the AP distribution network fails.
The one-key network distribution mode is realized in such a way that a mobile phone end assembles a router hotspot and a router password into a data packet, and then the data packet is sent to a router and broadcasted through the router; after the wireless equipment collects the data, the whole packet is subjected to data verification, if the verification is successful, the hot spot and the password of the router are analyzed, and then the module is connected to the router. This solution presents problems: 1. the sending data packet contains a router and a password, and the data packet is too large. 2. The success rate of the distribution network can be reduced by carrying out whole packet data verification, the distribution network time is prolonged, and a distribution network debugging mechanism is not provided. Under normal conditions, the router needs to continuously transmit for 10 seconds at the transmission frequency of 20Hz to realize the acquisition of the protocol data packet by the wireless equipment, and the failure rate is high, thereby greatly reducing the user experience.
Disclosure of Invention
The invention aims to overcome the defects of low distribution network speed and success rate of wireless equipment in the prior art, and provides a method and a system for accurately discovering wireless equipment based on a sequence number packet technology.
The method comprises the following specific steps:
step one, broadcasting or multicasting a protocol data packet to wireless equipment; the protocol data packet comprises a plurality of sub-packets. Each sub-packet contains check bits and content packets.
Step two, the wireless equipment receives a protocol data packet; after receiving, the wireless device carries out integrity check on N sub-packets in the received protocol data packet, and stores one or more complete sub-packets in the received protocol data packet;
step three, if the stored data has sub-packet loss, the wireless equipment receives the protocol data packet again; after the receiving is finished again, the wireless equipment carries out integrity check again, and stores one or more sub-packets which are missing when the last receiving is ended and are received completely; and repeating the cycle until no sub-packets are lost.
And step four, the wireless equipment analyzes the protocol data packet to obtain the name and the password of the target wireless hotspot and is connected to the target wireless hotspot according to the name and the password.
Preferably, in step three, each time the protocol data packet is received, only the sub-packets missing by the last reception are subjected to integrity check.
Preferably, each sub-packet includes a sub-packet identifier, a sub-packet check bit, a sequence number and a content packet.
Preferably, in the second and third steps, the integrity check of a sub-packet is performed as follows: the wireless equipment calculates according to the sequence number of the sub-package and the content package data and a preset calculation formula to obtain a check code; comparing the check code with the check bits recorded in the sub-packet; if the two are consistent, the sub-packet is considered to be complete.
Preferably, in the step one, the protocol data packet is obtained by assembling the wireless hotspot name encryption value and the password by the user client.
Preferably, the protocol data packet conforms to a segmentation mechanism of < main packet > < sub-packet > < end packet >; the content packets in the multiple < sub-packets > collectively constitute the data to be transmitted. In the first step, the mode of broadcasting or multicasting the protocol data packet is to broadcast or multicast the main packet, each sub-packet and the ending packet in sequence.
Preferably, the main packet comprises a starting packet identifier, a data packet number identifier and a whole packet calibration code;
preferably, in step four, the specific process of the wireless device connecting to the target wireless hotspot is as follows: a WIFI module of the wireless equipment searches surrounding wireless hotspots, and screens a surrounding wireless hotspot list which is the same as the analyzed wireless hotspot name encryption value; and then, sequentially linking each wireless hotspot on the wireless hotspot list by using the analyzed password value until the wireless equipment successfully links one of the wireless hotspots.
Preferably, in the first step, while the protocol data packet is broadcasted or multicasted, the user client connects to the router through UDP for interception, and whether the distribution of the wireless device is completed is determined. And after the wireless device is connected with the wireless hotspot, sending the mac address to the user client through the router. And after the broadcasting or the multicasting is finished, the user client sends the mac address of the wireless equipment to the Internet of things cloud platform, and binds the wireless equipment to the Internet of things cloud platform.
A wireless device rapid distribution network system based on multi-sub-packet independent recording comprises a wireless device and a user mobile terminal. The user mobile terminal is used for assembling the protocol data packet containing a plurality of sub-packets and controlling the router to broadcast or multicast the protocol data packet. The wireless device comprises a data packet inspection module, a data packet analysis module and a storage module; the data packet inspection module is used for respectively inspecting each received sub-packet and respectively judging the integrity of each sub-packet. The storage module is used for storing the complete sub-packets which are verified by the data packet verification module. And the data packet analysis module is used for analyzing each sub-packet after all the sub-packets are stored, and acquiring the name and the password of the wireless hotspot.
The invention has the beneficial effects that:
1. the wireless equipment of the invention respectively checks and screens a plurality of sub-packets in the protocol data packet, stores the sub-packets with complete data, and can accurately and completely acquire the protocol data packet after 3-5 rounds of data transmission; the characteristics of small data volume and high success rate of complete receiving of a single sub-packet are effectively utilized, and the speed and the success rate of a wireless device distribution network are greatly improved.
2. According to the invention, through the mode of separately verifying the sub-packets, the times of sending the protocol data packets by the router are less, the finished protocol data packets can be received by the wireless equipment only in about 4s under the 20Hz sending frequency, and compared with the existing distribution network mode of continuously sending the protocol data packets for 10 seconds under the 20Hz sending frequency, the user experience is obviously improved.
3. The required sending times are few, so that compared with a 120MHz chip in the existing Internet of things module, the wireless equipment using the wireless equipment can use a chip with lower dominant frequency, thereby reducing the cost of the Internet of things module.
4. The user client in the invention divides the effective information in the protocol data packet into a plurality of sub-packets to be sent, and sets a mark packet and a sequence number in each sub-packet, so that the wireless equipment can more conveniently identify whether each sub-packet is complete or not by combining the data bit number.
Drawings
FIG. 1 is a block flow diagram of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
A wireless device accurate discovery method based on a sequence number packet technology comprises the following specific steps:
step one, a user client prepares a data packet. The method comprises the following steps that application software of a user client starts to be distributed with WIFI modules in wireless equipment (namely Internet of things equipment), and a protocol data packet consisting of a router hotspot name encryption value and a password is assembled; after acquiring the hotspot name encryption value, the WIFI module scans nearby hotspots, and then calculates hotspot names by an encryption reverse algorithm to serve as connected hotspot names; the protocol data packet is prepared for the segmentation mechanism according to < main packet > < sub-packet > < end packet >. Wherein, the number of < sub-packets > is N, and name encryption values and passwords of the hot spots of the router are recorded together. In this embodiment, N is 14.
Step two, the user client circularly broadcasts or multicasts a 16-system protocol data packet to the wireless equipment through the router: the process of broadcasting or multicasting the one-time protocol data packet is as follows:
2-1, the user client broadcasts or multicasts the main packet to the wireless device; the main packet comprises an initial packet identifier, a data packet number identifier and a whole packet calibration code; the start packet identifier consists of 1-4 bytes (e.g., using FF, FFFF, or FFFFFFF).
For example, the primary packet is FFFFFFFF0F 00; wherein, FFFFFF is the initial packet identification, used to indicate the start of transmission; 0F is a data packet number identifier and indicates that the protocol data packet to be sent has 0F sub-packets in total; 00 is the whole packet calibration code.
2-2, the user client broadcasts or multicasts each sub-packet (N packets in total) after segmentation to the wireless device in turn;
1-3 bytes in each sub-packet are sub-packet mark codes, 4 bytes are sub-packet check bits, 5 bytes are sequence numbers, and the sixth byte is a content packet; the content packet is the 6 th byte of data to be transmitted specifically.
For example, 14 subpackets in total; the first sub-packet is FEFEFE09010A, the second sub-packet is fefe09020B, the third sub-packet is fefe09030B, the fourth sub-packet is fefe09040B, the fifth sub-packet is fefe09050B, the sixth sub-packet is fefe09060B, the seventh sub-packet is fefe09070B, the eighth sub-packet is fefe09080B, the ninth sub-packet is fefe09090B, the tenth sub-packet is fefe090A0B, the eleventh sub-packet is fefe090B0B, the twelfth sub-packet is fefe090C0B, the thirteenth sub-packet is fefe090D0B, and the fourteenth sub-packet is fefe090E 0B; wherein, the first three bytes FEFEFEFE are sub-packet mark codes; the fourth byte 09 is a check bit; the fifth byte 01-0E is the sequence number, and the sixth byte is the content packet (in this example, the content packet is 1 byte). The check bits can be obtained by calculation according to the sequence number and the content packet data of the sub-packets according to a preset calculation formula.
2-3, the user client broadcasts or multicasts an end packet to the WIFI module of the wireless equipment; for example, the end packet is FDFDFDFDFDFD, which is used to indicate the end of the transmission.
And step three, the wireless equipment receives the packet. The wireless device can receive partial complete sub-packet content every time, but the partial complete sub-packet content can not be received at one time; after the third step is finished, the wireless device receives the protocol data packet, performs integrity check on N sub-packets in the received protocol data packet, screens and stores each complete sub-packet; the integrity check for a sub-packet is as follows: the wireless equipment calculates according to the sequence number of the sub-package and the content package data and a preset calculation formula to obtain a check code; comparing the check code with the check bits recorded in the sub-packet; if the two are consistent, the sub-packet is considered to be complete and can be stored.
And then, acquiring the sequence number of each missing (not stored) sub-packet according to the data packet number identifier in the main packet and the stored sequence number in each sub-packet. If the sub-packets are missing, the wireless equipment receives the protocol data packets again, and the wireless equipment performs integrity check on the partial sub-packets (namely the sub-packets which are not completely received before) which are received again according to the sequence numbers of the missing sub-packets, screens and stores the complete sub-packets; and repeating the steps until no sub-packets are lost (namely, all the N sub-packets are completely checked and stored).
Under most circumstances, the protocol data packet is recorded and stored according to the method, and the wireless equipment can record and store all sub-packets only by 3-5 rounds of protocol data packet sending operation, so that the complete receiving degree of the packet serial number of the wireless equipment reaches more than 99%, and the accurate discovery of the wireless equipment is realized. When the network is distributed by the prior art, the router needs to continuously transmit for 10 seconds at a transmission frequency of 20Hz to acquire the protocol data packet by the wireless device, namely, 160 times of transmission is needed, even though the complete receiving degree is still lower than 99% of the invention by the prior art. In contrast, with the same transmission frequency, the method can complete transmission and data analysis only in 4 seconds, and obviously improves the distribution network efficiency of the wireless equipment to a great extent.
In addition, because the required sending times are very few, compared with a chip of 120MHz in the existing Internet of things module, the wireless device applying the invention can use a chip with lower dominant frequency (such as a chip of 60 MHz), thereby greatly reducing the cost of the Internet of things module.
Step four, the wireless equipment analyzes a complete data content packet according to the received N sub-packets, wherein the complete data content packet comprises an encryption value and a password of a hot spot of a router of the distribution network; then, a WIFI module of the wireless equipment searches surrounding wireless hotspots, carries out encryption calculation on surrounding wireless hotspot names in the searching process, and screens out a surrounding wireless hotspot list with the same encryption value as the analyzed hotspot name; and then, sequentially linking each wireless hotspot on the wireless hotspot list by using the analyzed password value until the wireless equipment successfully links one of the wireless hotspots.
And step five, when the User client sends the Protocol data packet to the router, the User client is connected with the router through a User Datagram Protocol (UDP) to monitor, and whether the wireless equipment is completed in the distribution network is judged. When the wireless device connects to the wireless hotspot released by the router, a notification that the device has completed distribution (specifically sending onlineRoutePack, RouteNowPack, or configroutennowpackack) and the mac address (i.e., the local network address) of the wireless device are sent to the user client through the router.
And step six, the user client sends the mac address of the wireless device to the Internet of things cloud platform, so that the wireless device is bound to the Internet of things cloud platform.
And seventhly, successfully distributing the network and finishing.
Claims (10)
1. A wireless device rapid network distribution method based on multi-sub-packet independent recording is characterized in that: step one, broadcasting or multicasting a protocol data packet to wireless equipment; the protocol data packet comprises a plurality of sub-packets; each sub-packet comprises a check bit and a content packet;
step two, the wireless equipment receives a protocol data packet; after receiving, the wireless device carries out integrity check on N sub-packets in the received protocol data packet, and stores one or more complete sub-packets in the received protocol data packet;
step three, if the stored data has sub-packet loss, the wireless equipment receives the protocol data packet again; after the receiving is finished again, the wireless equipment carries out integrity check again, and stores one or more sub-packets which are missing when the last receiving is ended and are received completely; repeating the steps in turn until no sub-packets are lost;
and step four, the wireless equipment analyzes the protocol data packet to obtain a target wireless hotspot name encryption value and a password, and is connected to the target wireless hotspot according to the target wireless hotspot name encryption value and the password.
2. The method for the rapid distribution of the wireless equipment based on the independent recording of the multiple sub-packets as claimed in claim 1, wherein: in the third step, each time the protocol data packet is received, only the sub-packets missing by the last receiving are subjected to integrity check.
3. The method for the rapid distribution of the wireless equipment based on the independent recording of the multiple sub-packets as claimed in claim 1, wherein: each sub-packet comprises a sub-packet mark code, a sub-packet check bit, a sequence number and a content packet.
4. The method of claim 3, wherein the method for the rapid distribution of the wireless device based on the multi-subpacket independent recording is as follows: in the second and third steps, the process of performing integrity check on a sub-packet is as follows: the wireless equipment calculates according to the sequence number of the sub-package and the content package data and a preset calculation formula to obtain a check code; comparing the check code with the check bits recorded in the sub-packet; if the two are consistent, the sub-packet is considered to be complete.
5. The method for the rapid distribution of the wireless equipment based on the independent recording of the multiple sub-packets as claimed in claim 1, wherein: in the first step, the protocol data packet is obtained by assembling the wireless hotspot name encryption value and the password by the user client.
6. The method for the rapid distribution of the wireless equipment based on the independent recording of the multiple sub-packets as claimed in claim 1, wherein: the protocol data packet accords with a segmentation mechanism of < main packet > < sub-packet > < end packet >; the content packets in the plurality of < sub-packets > collectively constitute data to be transmitted; in the first step, the mode of broadcasting or multicasting the protocol data packet is to broadcast or multicast the main packet, each sub-packet and the ending packet in sequence.
7. The method of claim 6, wherein the method for the rapid distribution of the wireless device based on the multi-subpacket independent recording is as follows: the main packet comprises a starting packet identifier, a data packet number identifier and a whole packet calibration code.
8. The method for the rapid distribution of the wireless equipment based on the independent recording of the multiple sub-packets as claimed in claim 1, wherein: in step four, the specific process of the wireless device connecting to the target wireless hotspot is as follows: a WIFI module of the wireless equipment searches surrounding wireless hotspots, and screens a surrounding wireless hotspot list which is the same as the analyzed wireless hotspot name encryption value; and then, sequentially linking each wireless hotspot on the wireless hotspot list by using the analyzed password value until the wireless equipment successfully links one of the wireless hotspots.
9. The method for the rapid distribution of the wireless equipment based on the independent recording of the multiple sub-packets as claimed in claim 1, wherein: in the first step, while broadcasting or multicasting the protocol data packet, the user client is connected with the router through UDP to monitor, and whether the wireless equipment completes the distribution network is judged; after the wireless device is connected with the wireless hotspot, sending a mac address to the user client through the router; and after the broadcasting or the multicasting is finished, the user client sends the mac address of the wireless equipment to the Internet of things cloud platform, and binds the wireless equipment to the Internet of things cloud platform.
10. A wireless device rapid distribution network system based on multi-sub-packet independent recording comprises a wireless device and a user mobile terminal; the method is characterized in that: the user mobile terminal is used for assembling a protocol data packet containing a plurality of sub-packets and controlling the router to broadcast or multicast the protocol data packet; the wireless device comprises a data packet inspection module, a data packet analysis module and a storage module; the data packet inspection module is used for respectively inspecting each received sub-packet and respectively judging the integrity of each sub-packet; the storage module is used for storing the complete sub-packages which are detected by the data packet detection module; and the data packet analysis module is used for analyzing each sub-packet after all the sub-packets are stored to obtain the wireless hotspot name encryption value and the password.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010749674.7A CN111787541A (en) | 2020-07-30 | 2020-07-30 | Wireless equipment rapid network distribution method and system based on multi-sub-packet independent record |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010749674.7A CN111787541A (en) | 2020-07-30 | 2020-07-30 | Wireless equipment rapid network distribution method and system based on multi-sub-packet independent record |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111787541A true CN111787541A (en) | 2020-10-16 |
Family
ID=72766655
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010749674.7A Pending CN111787541A (en) | 2020-07-30 | 2020-07-30 | Wireless equipment rapid network distribution method and system based on multi-sub-packet independent record |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111787541A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014035603A1 (en) * | 2012-08-29 | 2014-03-06 | Qualcomm Incorporated | Encrypting a service announcement message in a discovery packet |
CN105451230A (en) * | 2015-11-12 | 2016-03-30 | 深圳市江波龙科技有限公司 | Internet-of-things device configuration method and Internet-of-things device configuration system |
CN106254189A (en) * | 2016-09-13 | 2016-12-21 | 四川长虹电器股份有限公司 | A kind of WiFi distribution method |
CN106452689A (en) * | 2016-11-28 | 2017-02-22 | 畅捷通信息技术股份有限公司 | Data transmission apparatus and method of client and data transmission apparatus and method of server |
CN110221856A (en) * | 2019-06-25 | 2019-09-10 | 努比亚技术有限公司 | A kind of wearable device upgrade method, wearable device and storage medium |
-
2020
- 2020-07-30 CN CN202010749674.7A patent/CN111787541A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014035603A1 (en) * | 2012-08-29 | 2014-03-06 | Qualcomm Incorporated | Encrypting a service announcement message in a discovery packet |
CN105451230A (en) * | 2015-11-12 | 2016-03-30 | 深圳市江波龙科技有限公司 | Internet-of-things device configuration method and Internet-of-things device configuration system |
CN106254189A (en) * | 2016-09-13 | 2016-12-21 | 四川长虹电器股份有限公司 | A kind of WiFi distribution method |
CN106452689A (en) * | 2016-11-28 | 2017-02-22 | 畅捷通信息技术股份有限公司 | Data transmission apparatus and method of client and data transmission apparatus and method of server |
CN110221856A (en) * | 2019-06-25 | 2019-09-10 | 努比亚技术有限公司 | A kind of wearable device upgrade method, wearable device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105050083B (en) | A kind of network collocating method and system of smart machine | |
US10356694B2 (en) | Grouping of user terminal cell access information in a system information block | |
CN106254147A (en) | A kind of collocation method for Wi Fi network, internet-of-things terminal and control end | |
CN109451502A (en) | Household appliance matches network method, network distribution device and computer readable storage medium | |
US20050270996A1 (en) | Apparatus and method for enhanced UM RLC data handling | |
CN104661172A (en) | Extended data transmission method and extended data transmission system based on Bluetooth low power consumption | |
CN105072012A (en) | Quick network access method of intelligent device | |
TW202002712A (en) | Method and apparatus for device to be configured with network to access network hotspot device | |
CN104660308A (en) | File transfer method and file transfer system based on Bluetooth low power consumption technology | |
CN107181605B (en) | Message detection method and system, content extraction device and flow matching device | |
CN111211980A (en) | Transmission link management method, transmission link management device, electronic equipment and storage medium | |
CN111786869B (en) | Data transmission method between servers and server | |
CN102413069B (en) | Method and system for downloading in multicast way in ubiquitous network | |
US9226194B2 (en) | Grouping of user terminal cell access information in a system information block | |
US20100085922A1 (en) | System and method for improving bandwidth of wireless local area network | |
CN109714742A (en) | A kind of Internet of Things Wi-Fi module network self-adapting switching method | |
CN108541077A (en) | A kind of quick distribution method and system of intelligent hardware devices based on WPS | |
CN111786868B (en) | Data transmission method between servers and strongswan server | |
CN104581886A (en) | Method and system for data transmission and wireless connection of terminal and wireless device | |
CN113613251B (en) | Information synchronization method and system, storage medium and electronic device | |
US20080310449A1 (en) | Method and Apparatus For Upper Level Protocol Message | |
CN113411866B (en) | Safe and efficient multicast distribution network side system, electronic equipment and storage medium | |
US20190261436A1 (en) | Device networking method, apparatus and system | |
CN106454812A (en) | Method and device for receiving data | |
CN111787541A (en) | Wireless equipment rapid network distribution method and system based on multi-sub-packet independent record |
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 |