CN108430091B - Efficient wifi network distribution method and device for smart home - Google Patents

Efficient wifi network distribution method and device for smart home Download PDF

Info

Publication number
CN108430091B
CN108430091B CN201711442256.8A CN201711442256A CN108430091B CN 108430091 B CN108430091 B CN 108430091B CN 201711442256 A CN201711442256 A CN 201711442256A CN 108430091 B CN108430091 B CN 108430091B
Authority
CN
China
Prior art keywords
field
coding
encoding
data packet
numerical value
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.)
Active
Application number
CN201711442256.8A
Other languages
Chinese (zh)
Other versions
CN108430091A (en
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.)
SUNING INTELLIGENT TERMINAL Co.,Ltd.
Original Assignee
Suning Intelligent Terminal 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 Suning Intelligent Terminal Co ltd filed Critical Suning Intelligent Terminal Co ltd
Priority to CN201711442256.8A priority Critical patent/CN108430091B/en
Publication of CN108430091A publication Critical patent/CN108430091A/en
Application granted granted Critical
Publication of CN108430091B publication Critical patent/CN108430091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery

Abstract

The embodiment of the invention discloses a high-efficiency wifi network distribution method and device for smart homes, relates to the technical field of electronic information, and can improve the safety of routers in the network distribution process. The invention comprises the following steps: the method comprises the steps of coding distribution network information to obtain a coded numerical value, wherein the distribution network information comprises: password information; determining a data packet corresponding to the coding numerical value, wherein the length of the data packet and each coding numerical value establish a mapping relation; broadcasting the determined data packet outwards; and when receiving multicast information, determining that the distribution network is completed, wherein the multicast information is sent out after the connection between the wireless router and the intelligent equipment is established. The invention is suitable for wireless network distribution networks.

Description

Efficient wifi network distribution method and device for smart home
Technical Field
The invention relates to the technical field of electronic information, in particular to a high-efficiency wifi network distribution method and device for smart homes.
Background
In the application of small wireless networks, smart homes develop rapidly and gradually enter thousands of households, and corresponding smart devices are also developing continuously. The connection between the intelligent device and the network is a necessary condition, and is the basis for realizing various intelligent requirements. Therefore, higher requirements are also put on the distribution network technology and operability.
Due to the selection of cost control, many current intelligent devices do not have operation interfaces, and only have simple operation systems, such as air conditioners, floor sweeping robots, intelligent air conditioners and the like, so that a network is not directly operated on the devices to be distributed, and a network is generally required to be distributed by using a smart phone. For example: and carrying out network distribution through mobile phone APP terminal multicast.
There is a scheme for distributing network by broadcasting packets carrying IP through mobile phone APP, but because the coding mode in this mode is complex, the efficiency of the distribution network is low. And because the data volume that the mobile phone can actually encode is too small, most schemes are difficult to add the information of the routers such as SSID (service set identifier) in the packets sent by the mobile phone, and the routers need to be actively in a scanned state, so that the safety of the routers is reduced.
Disclosure of Invention
The embodiment of the invention provides a network distribution method and equipment, which can improve the safety of a router in a network distribution process.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in the existing scheme, if a user terminal such as a smart phone broadcasts a packet carrying an IP address, information such as the IP address needs to be encapsulated according to a communication coding protocol, wherein coding and encryption modes are complex, the processing performance of the user terminal is limited, and the distribution network efficiency is low; and the amount of data that can be encoded is too small, the supported code length is very short, and the user terminal cannot send more information. Therefore, the router device needs to be in a scanned state and actively receive scanning of the smart device, so that the smart device can acquire information of the router device through scanning. The process can expose the router device, and if other malicious users appear in the range of the wireless network, the router device can be revealed, so that the problem of safety is caused.
In this embodiment, each character is converted into a data packet with different lengths for broadcasting, and character recognition is performed through the length of the data packet, so that the work of encoding and decoding the data packet is not required in the process of distribution network, and the distribution network information can be acquired only by simply querying the mapping relation between the encoding numerical value and the length of the data packet.
Meanwhile, the problem that more information cannot be sent due to the fact that the encoding length is limited in the prior art is solved, the number of supported encodable characters is enough, and information related to the router can be sent. Therefore, the problem that the router device is actively exposed in the process of distribution network is avoided, in the process of distribution network, the router device does not need to actively send other data packets with security risks except for forwarding the data packets sent by the user terminal, the problem of malicious scanning is also avoided, the security of the router in the process of distribution network is improved, and the privacy of users is protected.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a possible implementation manner of a system architecture provided in an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method according to an embodiment of the present invention;
FIG. 3 is an interaction diagram providing an embodiment of the present invention;
fig. 4 is a schematic flow chart of another method according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or coupled. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items. It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The embodiment of the present invention may be specifically implemented in a system as shown in fig. 1, which includes: router equipment, user terminal and intelligent equipment.
The intelligent device is provided with a wireless communication module, such as a WIFI module, and a serial port module, and an operating system is installed in a memory of the intelligent device. The serial port module is used for communicating with the equipment mainboard through the existing serial port protocol, the existing serial port protocol can be adopted by a manufacturer of the intelligent equipment according to the specific model and type of the intelligent equipment, and the local program can be written by the manufacturer of the intelligent equipment. Specifically, the intelligent device in this embodiment may be composed of an intelligent device and an electrical device, where an operating system is operated in the intelligent device, and the operating system communicates with a device motherboard of the electrical device through a serial module by using an existing serial protocol; the equipment mainboard is used for identifying the state change of the electrical equipment and controlling the operation of the intelligent equipment. The intelligent device can be an information display/control module with a display screen, the intelligent device is often provided with an operating system, the intelligent device is communicated with the outside through a WIFI module and is communicated with an equipment mainboard through a serial port module, and meanwhile, a customized local program runs in the operating system and is responsible for mutual conversion between serial port data and a data format understandable by the intelligent device. The user can actively operate on the intelligent device to realize the networking function and can complete additional functions such as shopping, webpage browsing and the like. The electrical equipment can be a refrigerator, a freezer, a dish washer, an air conditioner and other household appliances.
The user terminal may be implemented as a single Device, or integrated into various media data playing systems, such as a smart phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), or a Wearable Device (Wearable Device). The user terminal can be used for configuring the intelligent device and the controllable household appliance device through the installed application program or APP, for example, the household appliance device configured through the APP can establish a binding relationship with the user terminal registered in the router device; and establishing a binding relationship between the multimedia playing equipment and the intelligent equipment.
The router device can be specifically a device for building a wireless network, can be a WIFI router in general, and is connected to the Internet through radiating WIFI signals within a certain range.
The embodiment of the invention provides a network distribution method which can be specifically realized on a user terminal shown in fig. 1. As shown in fig. 2, the method includes:
and S11, encoding the distribution network information to obtain an encoded numerical value.
Wherein the distribution network information comprises: password information. Optionally, the distribution network information may further include: the SSID (Service Set Identifier) of the router device.
In this embodiment, coding schemes such as base64 coding, 16-ary coding, and base62 coding may be used. The following description will take the encoding method of base64 as an example: the method comprises the steps of carrying out base64 processing on characters of distribution network information, and mapping all the characters to encoding numerical values of base64 encoding, wherein any character can be serialized and converted into 64 fixed characters by adopting the currently common base64 encoding.
Then, according to the obtained encoded numerical value of the base64 format, mapping the data packets into specific length-specific data packets (wherein, since 64 fixed characters can be finally obtained in the base64 encoding mode, 64 data packets with different lengths can be prepared in advance so as to respectively represent the 64 fixed characters through different packet lengths), and then broadcasting and transmitting the data packets with specific lengths one by one. Therefore, the distribution network information is transmitted to the Wifi module of the intelligent device, after the Wifi module of the intelligent device receives the data packet, the encoding numerical value in the base64 format is obtained according to the length query of the received data packet, then the base64 decoding is carried out, and the original characters of the distribution network information are decoded. For example: the password information comprises 4 characters of a, b, c and d, and is converted into a coding numerical value in a base64 format, and the corresponding data packet length is as follows: the length of the data packet corresponding to the code value converted from the character a into the base64 format is 1, the length of the data packet corresponding to the code value converted from the character b into the base64 format is 2 … …, and the like.
And S12, determining the data packet corresponding to the encoding value.
Wherein, the length of the data packet and each coding value establish a mapping relation.
Specifically, the mapping relationship between the encoding numerical value and the packet length may be stored in any encoding and decoding device in this embodiment, such as the router device, the user terminal, and the intelligent device in fig. 1. For example: the user terminal starts broadcasting the data packet (the data packet has a certain length) by running the corresponding APP. The wifi module of the intelligent device monitors, receives and analyzes a data packet broadcasted by the user terminal, and analyzes network distribution information such as an SSID (Service Set Identifier) and a password of the router device required by networking from the data packet.
And S13, broadcasting the determined data packet outwards.
The router device may forward the data packet broadcast by the user equipment to the intelligent device.
And S14, when the multicast information (mDNS) is received, determining that the distribution network is completed.
And the multicast information is sent out after the wireless router establishes connection with the intelligent equipment.
For example: as shown in fig. 3, a 2.4G wifi module is embedded in the smart device, wherein the "wifi module" shown in fig. 3 is the 2.4G wifi module embedded in the smart device, the "wifi route" shown in fig. 3 is the router device, and the "mobile phone APP" shown in fig. 3 is the APP running on the user terminal (the execution main body is the smart phone serving as the user terminal). Based on the processes of S1-S4, the distribution network connection between the intelligent device and the wifi router can be realized through the following steps.
Enabling the wifi module to enter a promisc mode through a combined key on a remote controller of the intelligent device or other triggering modes;
then the APP on the user terminal starts to send a broadcast packet (the broadcast packet carries the distribution network information);
the wifi module monitors, receives and analyzes the broadcast packet, analyzes information such as SSID (service set identifier), passwords and the like required by networking from the broadcast packet, and analyzes and obtains the SSID and the passwords;
the wifi module is connected with a wifi router;
and the wifi module informs the mobile phone APP of successful networking through the mDNS protocol.
In the existing scheme, if a user terminal such as a smart phone broadcasts a packet carrying an IP address, information such as the IP address needs to be encapsulated according to a communication coding protocol, wherein coding and encryption modes are complex, and the distribution network efficiency is low due to the processing performance of the user terminal. And the amount of data that can be encoded is too small, typically a supported cipher length of less than 32 bits. For example, the current domestic distribution network technology which is relatively common usually supports a 31-bit coding length, and still cannot solve the problem of hiding the SSID of the router device in the distribution network process.
In this embodiment, SSID information is no longer carried by content in a data packet, but each character is converted into a data packet with different lengths for broadcasting, and character recognition is performed according to the length of the data packet, so that the SSID is sent to the intelligent device without encoding and decoding the data packet, and the distribution network information can be acquired only by simply querying a mapping relation between an encoding value and the length of the data packet, that is, "encoding and decoding" in this embodiment is only a series of processing performed according to the length of the data packet.
The problem that the router device is exposed actively in the distribution network process is also avoided, in the distribution network process, the router device does not need to actively send other data packets with security risks except for forwarding the data packets sent by the user terminal, the problem of malicious scanning is also avoided, the security of the distribution network process is improved, and the privacy of users is protected.
In this embodiment, in step S1, the specific implementation manner of encoding the distribution network information to obtain the encoded numerical value may include:
and encoding the characters in the distribution network information to obtain the corresponding encoding numerical values of the characters. And generating the coding field of each coding numerical value according to the coding numerical value corresponding to each character.
Wherein an encoded field of an encoded value comprises: a field indicating the position of the character and a field indicating the content of the character.
In this embodiment, the distribution network information further includes the Service Set Identifier (SSID), the characters of the Service Set Identifier (SSID) are encoded to obtain an encoded numerical value of the Service Set Identifier (SSID), and the data packet converted from the Service Set Identifier (SSID) includes a data packet corresponding to the encoded numerical value of the Service Set Identifier (SSID).
The broadcasting the determined data packet outwards comprises: and broadcasting the data packet obtained by converting the password information and the Service Set Identifier (SSID) outwards.
The embodiment provides a set of efficient distribution network protocols, which comprises the improvement of a data packet frame structure, and the data packet does not need to be disassembled, and only the length of the data packet represents corresponding information, so that the coding mode is simplified, the SSID length of 32 bits and the password length of 64 bits can be supported, and the user terminal can broadcast SSID and password information simultaneously in the distribution network process.
In practical application of this embodiment, a frame format suitable for the 802.11 protocol and used for the distribution network may be designed based on the 802.11 wlan protocol, for example, as shown in table 1:
Figure RE-GDA0001718668470000081
TABLE 1
The Frame Body is encrypted information, and the monitoring end cannot analyze data; and the other fields are defined in the wireless local area network protocol, and the user terminal has no authority to modify the fields. It is impossible to add effective information in the frame format. Therefore, in the present embodiment, the character information is transmitted by the change of the packet length (length).
Specifically, the generating of the encoding field of each encoding numerical value includes: and generating a first coding field to an Nth coding field of the coding numerical value.
The field for representing the character content is divided into the first content field to the Nth content field, the ith content field is written with the ith coding field, i is more than or equal to 1 and less than or equal to N, 2 and less than or equal to N and is a positive integer. In this embodiment, the field indicating the character position may be referred to as a turn number; the field indicating the character content can be understood as the packet length value. The specific functions of Turn are: the sequence identification of the characters in the distribution network information is that the distribution network information is specifically composed of a plurality of characters, and a series of characters include information such as SSID and password. Since the user terminal needs to send the information in the form of a circular broadcast data packet, the user terminal needs to be able to determine the correct position of each character in the distribution network information in the circular sending process, mark the correct sequence and mark the uniqueness of the data packet, thereby preventing out-of-order errors.
For example: a turn number occupies 6 bits and represents 64 different values from 000000 to 111111. Such as: one format of the encoded field includes XXXXXX (turn number) YYY (packet length value), where X, Y are all binary numbers. The length value of the data packet is a field indicating the content of the character, since the length value of the data packet in one coding field is 3 bits, if a character with a coding value of 6 bits is to be described, two coding fields are required, for example, if the coding value obtained by coding the character with base64 is 110111, 2 coding fields are required to be sent. That is, for a character to be transmitted, the number of data packets to be broadcast finally corresponds to the number of encoding fields of the character, one encoding field is sent by a data packet with a specific length, and the length of the data packet represents specific values of the encoding field, such as: 111111+110 and 111110+111, that is, the data packets corresponding to the two values 111111110 and 111110111 need to be transmitted.
It can be seen that 111111 and 111110 in front of the field are 2 turn numbers respectively, and 110 and 111 behind the field constitute the coded value 110111. Thus, in this example, a character needs to be transmitted 2 times, and the supportable character is 64/2 ═ 32, which can have 64 different values because of the turn number of 6 bits in total, but since 2 turn numbers are required to transmit a character, 32 characters can actually be transmitted. And the length of the coding field is 6+ 3-9 bit. In practical application, the original characters are converted into base64 encoded values, so that the number of the encoded values obtained is increased, and thus, only 22 effective characters can be input by an actual user.
Since the more times of reusing 1 turn number in the process of transmitting a character, the more data packets need to be transmitted, the lower the packet loss rate, and in consideration of the packet loss rate and the transmission efficiency, this embodiment provides several possible encoding schemes:
specifically, the fields representing the character positions in the first coding field to the fields representing the character positions in the jth coding field are the same, wherein j is more than or equal to 2 and less than or equal to N. 1 turn number is used to send one character, i.e. turn number takes 2 passes.
Because the network is distributed in a mode of broadcasting and sending packets by the user terminal, the user terminal cannot directly confirm whether the wifi module end of the intelligent device receives the broadcasting packets, the wifi module of the intelligent device must lose packets in the packet receiving process, and all the broadcasting packets cannot be completely received at one time. The user terminal needs to continuously and repeatedly send the broadcast packet circularly. The coding algorithm of the broadcast packet is the key of the broadcast distribution network in this embodiment.
The length of the Wifi broadcast packet is limited by the maximum packet of the Wifi protocol, and if the Wifi broadcast packet exceeds the maximum packet limit, the Wifi broadcast packet needs to be split, and once the Wifi broadcast packet is split and reassembled, the Wifi broadcast packet is troublesome because each packet needs to be completely transmitted successfully and needs to be retransmitted continuously. Therefore, the maximum number of encodable bits can be 10 bits, and if the number of bits is too small, the number of encodable characters is too small, so the following efficient encoding algorithms are designed in the embodiment:
one is as follows: in a coding mode with 9-bit length of one frame, a field for indicating the character position occupies 6 bits, and a field for indicating the character content occupies 3 bits. As shown in table 2:
Figure RE-GDA0001718668470000111
TABLE 2
The second step is as follows: the encoding method of a frame with a length of 10 bits is shown in table 3:
the field representing the character position takes 7 bits and the field representing the character content takes 3 bits. As shown in table 3:
Figure RE-GDA0001718668470000112
TABLE 3
In a preferred embodiment, N ═ j ═ 2, i.e., the embodiment 3-extension 1 in table 3 is implemented. The supported effective encodable characters are the most, the receiving efficiency can meet the requirement, and the successful distribution of the distribution network can be realized within 20S by broadcasting the distribution network information of SSID + password with the common length under the condition of good network state.
Based on the above encoding manner, the determining the data packet corresponding to the encoded numerical value in step S2 specifically includes: and inquiring to obtain the data packet corresponding to the coding numerical value according to the mapping relation between the length of the data packet and each coding numerical value.
For example, taking a frame of 10bit length as an example, the effect of each bit is shown in table 4:
Figure RE-GDA0001718668470000121
TABLE 4
In general, the SSID of the router device can be set to 32 characters at maximum, and the password can be set to 64 characters. In order to satisfy the usage scenario of the user as much as possible, the existing coding scheme needs to be extended, that is, the scheme 3-extension 1 introduced in table 3 is adopted, and one Turn number transmits 2 data packets, so that the usage scenario of the user can be satisfied. Through the extended encoding algorithm of the embodiment, the SSID can support 32 character lengths, and the password can support 64 character lengths.
In the existing scheme, when a user terminal such as a smart phone is used for carrying out network distribution on the smart device, if the safety of the router device needs to be guaranteed, the SSID of the router device needs to be hidden, so that a multicast packet cannot be forwarded through a wireless router, therefore, the resource of the router cannot be utilized when the APP end of the smart phone is used for multicast network distribution, the situation of network distribution failure can occur when the maximum rate supported by wifi of the smart phone is too high, and the multicast mode can only be matched with the maximum rate of 150 m. In practical applications, the maximum rate supported by wifi of some smart phones is 150m, and the maximum rate supported by wifi of some smart phones is 300 m.
And the broadcast that adopts in this embodiment joins in marriage the net mode, because utilize the retransmission resource of router, the speed is 1Mbps after the router is retransmitted, has alleviated the problem that the packet rate of sending of present cell-phone surpassed wifi module receiving range, can compatible different wifi performance's cell-phone, consequently 2 kinds of speeds of 150m and 300m can both be joined in marriage.
In addition, in the existing scheme, if a user terminal such as a smart phone broadcasts a packet carrying an IP address, information such as the IP address needs to be encapsulated according to a communication coding protocol, and coding and encryption methods in the information are complex and are limited by the processing performance of the user terminal, so that the distribution network efficiency is low.
And the amount of data that can be encoded is too small, typically a supported cipher length of less than 32 bits. For example, the current domestic distribution network technology which is relatively common usually supports a 31-bit coding length, and still cannot solve the problem of hiding the SSID of the router device in the distribution network process.
In the problem of hiding the SSID of the router device, the user terminal cannot send the SSID due to the short code length supported by the existing distribution network algorithm. Therefore, the router device needs to be in a scanned state and actively receive scanning of the smart device, so that the smart device can acquire the SSID of the router device through scanning. In the process, the router device can expose information such as the SSID of the router device, and if other malicious users appear in the range of the wireless network, the SSID of the router device can be revealed, so that the security problem is caused.
In this embodiment, SSID information is no longer carried by content in a data packet, but each character is converted into a data packet with different lengths for broadcasting, and character recognition is performed according to the length of the data packet, so that the SSID is sent to the intelligent device without encoding and decoding the data packet, and the distribution network information can be acquired only by simply querying a mapping relation between an encoding value and the length of the data packet, that is, "encoding and decoding" in this embodiment is only a series of processing performed according to the length of the data packet.
Meanwhile, the problem that the SSID cannot be sent due to the fact that the SSID cannot be sent due to the encoding length in the prior art is solved, the number of supported encodable characters is enough, the SSID can be sent, possibility is provided for adding more information in the future, and the use range is expanded.
The problem that the router device is exposed actively in the distribution network process is also avoided, in the distribution network process, the router device does not need to actively send other data packets with security risks except for forwarding the data packets sent by the user terminal, the problem of malicious scanning is also avoided, the security of the distribution network process is improved, and the privacy of users is protected.
The embodiment of the invention provides a network distribution method which can be specifically realized on intelligent equipment shown in figure 1. As shown in fig. 4, the method includes:
and S21, analyzing the data packet acquired from the broadcast and determining the coding value of the corresponding data packet.
The coding numerical values are obtained by coding distribution network information, the length of a data packet and each coding numerical value establish a mapping relation, and the distribution network information comprises: password information.
And S22, acquiring the distribution network information by using the determined coding value, and establishing connection with a wireless router according to the distribution network information.
And S23, sending multicast information (mDNS) to the wireless router.
Further, the distribution network information further includes: the data packet obtained by converting the Service Set Identifier (SSID) comprises a data packet corresponding to the coding value of the Service Set Identifier (SSID).
In this embodiment, in step S21, the parsing the data packet received from the broadcast to determine the encoding value of the corresponding data packet may include:
parsing a packet received from a broadcast to obtain encoded fields, wherein an encoded field of an encoded value comprises: a field indicating the position of the character and a field indicating the content of the character.
Based on the resulting encoded field, an encoded value is determined.
And obtaining characters in the distribution network information according to the determined coding numerical value.
Specifically, one coded numerical value includes first to nth coded fields, wherein the ith coded field is written in the ith content field, i is greater than or equal to 1 and less than or equal to N, 2 is greater than or equal to N and is a positive integer, and the fields representing character content are divided into the first to nth content fields.
Further, the fields representing the character positions in the first coding field to the fields representing the character positions in the jth coding field are the same, wherein j is more than or equal to 2 and less than or equal to N.
In a preferred embodiment, the field indicating the character position occupies 7 bits, the field indicating the character content occupies 3 bits, and N ═ j ═ 2.
In the existing scheme, if a user terminal such as a smart phone broadcasts a packet carrying an IP address, information such as the IP address needs to be encapsulated according to a communication coding protocol, wherein coding and encryption modes are complex, and the distribution network efficiency is low due to the processing performance of the user terminal. And the amount of data that can be encoded is too small, typically a supported cipher length of less than 32 bits. For example, the current domestic distribution network technology which is relatively common usually supports a 31-bit coding length, and still cannot solve the problem of hiding the SSID of the router device in the distribution network process.
In this embodiment, SSID information is no longer carried by content in a data packet, but each character is converted into a data packet with different lengths for broadcasting, and character recognition is performed according to the length of the data packet, so that the SSID is sent to the intelligent device without encoding and decoding the data packet, and the distribution network information can be acquired only by simply querying a mapping relation between an encoding value and the length of the data packet, that is, "encoding and decoding" in this embodiment is only a series of processing performed according to the length of the data packet.
The problem that the router device is exposed actively in the distribution network process is also avoided, in the distribution network process, the router device does not need to actively send other data packets with security risks except for forwarding the data packets sent by the user terminal, the problem of malicious scanning is also avoided, the security of the distribution network process is improved, and the privacy of users is protected.
The embodiment of the invention provides a user terminal, which can be specifically implemented on the user terminal shown in fig. 1. In a specific application of this embodiment, the ue at least includes:
the device comprises a processor, a network interface, a memory, a communication antenna and a communication bus, wherein the communication bus is used for connection communication among the components.
The memory having stored therein a computer program for execution by the processor, the computer program executed by the processor comprising:
the encoding module is used for encoding the distribution network information to obtain an encoding numerical value, wherein the distribution network information comprises: password information.
And the preprocessing module is used for determining a data packet corresponding to the coding numerical value, wherein the length of the data packet and each coding numerical value establish a mapping relation.
A sending module, configured to broadcast the determined data packet to the outside through the communication antenna. And when multicast information (mDNS) is received, determining that the distribution network is completed, wherein the multicast information is sent out after the connection between the multicast information and the intelligent equipment is established by the wireless router.
In this embodiment, SSID information is no longer carried by content in a data packet, but each character is converted into a data packet with different lengths for broadcasting, and character recognition is performed according to the length of the data packet, so that the SSID is sent to the intelligent device without encoding and decoding the data packet, and the distribution network information can be acquired only by simply querying a mapping relation between an encoding value and the length of the data packet, that is, "encoding and decoding" in this embodiment is only a series of processing performed according to the length of the data packet.
The problem that the router device is exposed actively in the distribution network process is also avoided, in the distribution network process, the router device does not need to actively send other data packets with security risks except for forwarding the data packets sent by the user terminal, the problem of malicious scanning is also avoided, the security of the distribution network process is improved, and the privacy of users is protected.
The embodiment of the invention provides an intelligent device which can be specifically realized on a user terminal shown in fig. 1. In a specific application of this embodiment, the intelligent device at least includes:
the device comprises a processor, a network interface, a memory, a communication antenna and a communication bus, wherein the communication bus is used for connection communication among the components.
The memory having stored therein a computer program for execution by the processor, the computer program executed by the processor comprising:
an analysis module, configured to analyze a data packet obtained from a broadcast received by the communication antenna, and determine a code value corresponding to the data packet, where the code value is obtained by encoding distribution network information, a mapping relationship is established between a length of the data packet and each code value, and the distribution network information includes: password information.
And the connection module is used for acquiring the distribution network information by using the determined coding numerical value and establishing connection with a wireless router according to the distribution network information.
A notification module, configured to send multicast information (mDNS) to the wireless router.
In this embodiment, SSID information is no longer carried by content in a data packet, but each character is converted into a data packet with different lengths for broadcasting, and character recognition is performed according to the length of the data packet, so that the SSID is sent to the intelligent device without encoding and decoding the data packet, and the distribution network information can be acquired only by simply querying a mapping relation between an encoding value and the length of the data packet, that is, "encoding and decoding" in this embodiment is only a series of processing performed according to the length of the data packet.
The problem that the router device is exposed actively in the distribution network process is also avoided, in the distribution network process, the router device does not need to actively send other data packets with security risks except for forwarding the data packets sent by the user terminal, the problem of malicious scanning is also avoided, the security of the distribution network process is improved, and the privacy of users is protected.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. An efficient wifi network distribution method for smart homes is characterized by comprising the following steps:
the method comprises the steps of coding distribution network information to obtain a coded numerical value, wherein the distribution network information comprises: password information;
determining a data packet corresponding to the coding numerical value, wherein the length of the data packet and each coding numerical value establish a mapping relation;
broadcasting the determined data packet outwards;
when multicast information (mDNS) is received, determining that the distribution network is completed, wherein the multicast information is sent out after the connection between the multicast information and the intelligent equipment is established by a wireless router;
the encoding of the distribution network information to obtain a coding numerical value includes:
encoding characters in the distribution network information to obtain encoding numerical values corresponding to the characters;
generating an encoding field of each encoding numerical value according to the encoding numerical value corresponding to each character, wherein the encoding field of one encoding numerical value comprises: a field indicating a character position and a field indicating character contents;
the generating of the code field of each code value includes:
generating a first coding field to an Nth coding field of a coding numerical value, wherein the ith coding field is written in the ith content field, i is more than or equal to 1 and less than or equal to N, 2 is more than or equal to N and is a positive integer, and the fields representing the character content are divided into the first content field to the Nth content field;
the fields representing the character positions in the first coding field to the fields representing the character positions in the jth coding field are the same, wherein j is more than or equal to 2 and less than or equal to N;
the field representing the character position occupies 7 bits, the field representing the character content occupies 3 bits, and N ═ j ═ 2;
and one Turn number carries 2 packets.
2. The method of claim 1, wherein determining the data packet corresponding to the encoded value comprises:
and inquiring to obtain the data packet corresponding to the coding numerical value according to the mapping relation between the length of the data packet and each coding numerical value.
3. The method of claim 1, wherein broadcasting the determined data packet out comprises:
and broadcasting a data packet obtained by converting the password information and a Service Set Identifier (SSID) to the outside, wherein the distribution network information further comprises the Service Set Identifier (SSID), characters of the Service Set Identifier (SSID) are encoded to obtain an encoding numerical value of the Service Set Identifier (SSID), and the data packet obtained by converting the Service Set Identifier (SSID) comprises a data packet corresponding to the encoding numerical value of the Service Set Identifier (SSID).
4. An efficient wifi network distribution method for smart homes is characterized by comprising the following steps:
analyzing a data packet acquired from a broadcast, and determining a coding value corresponding to the data packet, wherein the coding value is obtained by coding distribution network information, a mapping relation is established between the length of the data packet and each coding value, and the distribution network information comprises: password information;
acquiring the distribution network information by using the determined coding value, and establishing connection with a wireless router according to the distribution network information;
sending multicast information (mDNS) to the wireless router;
the analyzing the data packet obtained from the broadcast and determining the coding value of the corresponding data packet includes:
parsing a packet received from a broadcast to obtain encoded fields, wherein an encoded field of an encoded value comprises: a field indicating a character position and a field indicating character contents;
determining a coding numerical value according to the obtained coding field;
obtaining characters in the distribution network information according to the determined coding numerical value;
an encoded numerical value includes first to nth encoded fields, wherein the ith encoded field is written in the ith content field, i is greater than or equal to 1 and less than or equal to N, 2 is less than or equal to N and is a positive integer, and the field representing the character content is divided into the first to nth content fields;
the fields representing the character positions in the first coding field to the fields representing the character positions in the jth coding field are the same, wherein j is more than or equal to 2 and less than or equal to N;
the field representing the character position occupies 7 bits, the field representing the character content occupies 3 bits, and N ═ j ═ 2;
and one Turn number carries 2 packets.
5. The method of claim 4, wherein the distribution network information further comprises: the data packet obtained by converting the Service Set Identifier (SSID) comprises a data packet corresponding to the coding value of the Service Set Identifier (SSID).
6. A user terminal, characterized in that it comprises at least:
the device comprises a processor, a network interface, a memory, a communication antenna and a communication bus, wherein the communication bus is used for connection and communication among all components;
the memory having stored therein a computer program for execution by the processor, the computer program executed by the processor comprising:
the encoding module is used for encoding the distribution network information to obtain an encoding numerical value, wherein the distribution network information comprises: password information;
the preprocessing module is used for determining a data packet corresponding to the coding numerical value, wherein the length of the data packet and each coding numerical value establish a mapping relation;
a sending module, configured to broadcast the determined data packet to the outside through the communication antenna; when multicast information (mDNS) is received, determining that the distribution network is completed, wherein the multicast information is sent out after the connection between the multicast information and the intelligent equipment is established by a wireless router;
the encoding of the distribution network information to obtain a coding numerical value includes: encoding characters in the distribution network information to obtain encoding numerical values corresponding to the characters; generating an encoding field of each encoding numerical value according to the encoding numerical value corresponding to each character, wherein the encoding field of one encoding numerical value comprises: a field indicating a character position and a field indicating character contents;
the generating of the code field of each code value includes: generating a first coding field to an Nth coding field of a coding numerical value, wherein the ith coding field is written in the ith content field, i is more than or equal to 1 and less than or equal to N, 2 is more than or equal to N and is a positive integer, and the fields representing the character content are divided into the first content field to the Nth content field; the fields representing the character positions in the first coding field to the fields representing the character positions in the jth coding field are the same, wherein j is more than or equal to 2 and less than or equal to N; the field representing the character position occupies 7 bits, the field representing the character content occupies 3 bits, and N ═ j ═ 2; and one Turn number carries 2 packets.
7. A smart device, characterized by comprising at least:
the device comprises a processor, a network interface, a memory, a communication antenna and a communication bus, wherein the communication bus is used for connection and communication among all components;
the memory having stored therein a computer program for execution by the processor, the computer program executed by the processor comprising:
an analysis module, configured to analyze a data packet obtained from a broadcast received by the communication antenna, and determine a code value corresponding to the data packet, where the code value is obtained by encoding distribution network information, a mapping relationship is established between a length of the data packet and each code value, and the distribution network information includes: password information;
the connection module is used for acquiring the distribution network information by using the determined coding numerical value and establishing connection with a wireless router according to the distribution network information;
a notification module for sending multicast information (mDNS) to the wireless router;
the encoding of the distribution network information to obtain a coding numerical value includes: encoding characters in the distribution network information to obtain encoding numerical values corresponding to the characters; generating an encoding field of each encoding numerical value according to the encoding numerical value corresponding to each character, wherein the encoding field of one encoding numerical value comprises: a field indicating a character position and a field indicating character contents;
the generating of the code field of each code value includes: generating a first coding field to an Nth coding field of a coding numerical value, wherein the ith coding field is written in the ith content field, i is more than or equal to 1 and less than or equal to N, 2 is more than or equal to N and is a positive integer, and the fields representing the character content are divided into the first content field to the Nth content field; the fields representing the character positions in the first coding field to the fields representing the character positions in the jth coding field are the same, wherein j is more than or equal to 2 and less than or equal to N; the field representing the character position occupies 7 bits, the field representing the character content occupies 3 bits, and N ═ j ═ 2; and one Turn number carries 2 packets.
CN201711442256.8A 2017-12-27 2017-12-27 Efficient wifi network distribution method and device for smart home Active CN108430091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711442256.8A CN108430091B (en) 2017-12-27 2017-12-27 Efficient wifi network distribution method and device for smart home

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711442256.8A CN108430091B (en) 2017-12-27 2017-12-27 Efficient wifi network distribution method and device for smart home

Publications (2)

Publication Number Publication Date
CN108430091A CN108430091A (en) 2018-08-21
CN108430091B true CN108430091B (en) 2021-04-20

Family

ID=63155708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711442256.8A Active CN108430091B (en) 2017-12-27 2017-12-27 Efficient wifi network distribution method and device for smart home

Country Status (1)

Country Link
CN (1) CN108430091B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110167193A (en) * 2019-04-17 2019-08-23 苏宁智能终端有限公司 WiFi matches network method and WiFi equipment automatically
CN110149631B (en) * 2019-05-29 2023-06-13 飞天诚信科技股份有限公司 Method and system suitable for cloud loudspeaker box connection establishment
CN111314864B (en) * 2020-03-04 2022-02-22 联想万像(深圳)科技有限公司 Network distribution method, device and equipment
CN113490209A (en) * 2021-06-29 2021-10-08 锐迪科创微电子(北京)有限公司 Data transmission method, system, transmitting device, receiving device and medium

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103945369B (en) * 2013-01-18 2017-12-19 杭州古北电子科技有限公司 A kind of length by checking WIFI packets realizes the Internet-surfing configuration method of WIFI equipment
US10827417B2 (en) * 2013-12-10 2020-11-03 Beijing Zhigu Rui Tuo Tech Co., Ltd. Wireless network access method and access apparatus
CN104394577B (en) * 2014-12-09 2019-07-19 上海斐讯数据通信技术有限公司 The wireless network access method of wireless routing device and electronic equipment
CN104581647A (en) * 2015-01-30 2015-04-29 青岛海尔智能家电科技有限公司 Network access method and device of intelligent equipment
CN104796888A (en) * 2015-03-19 2015-07-22 北京宇音天下科技有限公司 Method for connecting WI-FI network by intelligent hardware terminal based on sound waves and system for realizing same
CN105101102B (en) * 2015-07-01 2019-01-25 北京奇虎科技有限公司 Multicast transmission method, information extracting method and corresponding terminal and equipment
CN105682183B (en) * 2016-01-14 2017-06-16 美的集团股份有限公司 The method and apparatus that control home appliance networks
CN105898831B (en) * 2016-03-29 2020-03-06 海尔优家智能科技(北京)有限公司 Method and device for accessing WiFi by intelligent equipment and intelligent equipment
CN106028423A (en) * 2016-05-06 2016-10-12 武汉诚迈科技有限公司 Wireless network distribution method applicable to smart furniture device
CN106059800A (en) * 2016-05-23 2016-10-26 Tcl集团股份有限公司 Network access configuration method and system based on intelligent household electric appliances
CN106375166B (en) * 2016-09-30 2019-11-22 无锡小天鹅电器有限公司 Distribution method, apparatus, system and the intelligent router of household electrical appliance
CN106973124A (en) * 2017-03-02 2017-07-21 深圳壹秘科技有限公司 Network connection collocation method and its electronic installation
CN107241247A (en) * 2017-06-30 2017-10-10 广东美的厨房电器制造有限公司 Method for network access and device, the intelligent appliance of intelligent appliance

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Implementing Ultra Low Latency Data Center Services with Programmable Logic;John W. Lockwood; Madhu Monga;《 2015 IEEE 23rd Annual Symposium on High-Performance Interconnects》;20151102;全文 *
Optimal Configuration of IEEE 802.11e EDCA with Variable Packet Length;Wei Zhang; Jun Sun; Jing Liu; Youyun Xu;《 2007 Second International Conference on Communications and Networking in China》;20080307;全文 *
WiFi家庭网络的安全防范;李文坚;《佳木斯职业学院学报》;20171115;全文 *
基于Android平台智能家居客户端的设计与实现;秦利红; 秦会斌; 诸坚彬; 曹曙光;《计算机应用与软件》;20160915;全文 *

Also Published As

Publication number Publication date
CN108430091A (en) 2018-08-21

Similar Documents

Publication Publication Date Title
CN108430091B (en) Efficient wifi network distribution method and device for smart home
CN107231606B (en) WiFi network access method, intelligent hardware equipment and electronic terminal
US9338130B2 (en) Apparatus and method to register Wi-Fi clients on a Wi-Fi network
EP2859761B1 (en) Dynamically configurable air interfaces
CN104735260B (en) A kind of correlating method for being applied to intelligent terminal
CN109548019B (en) Network distribution method and system
CN104205933B (en) Seamless transition of cellular phone from cellular communication to Wi-Fi communication
CN105554754A (en) Method and system for accessing WIFI module of the internet of things to network
CN104796888A (en) Method for connecting WI-FI network by intelligent hardware terminal based on sound waves and system for realizing same
CN105446305A (en) Intelligent household gateway network configuration method and intelligent household system
CN105120507A (en) Data packet monitoring method and system
CN106487454B (en) Sound wave configuration method and configuration system of Internet of things intelligent equipment
CN104581647A (en) Network access method and device of intelligent equipment
CN101843121A (en) Transmission of control information in a broadcast/multicast single frequency network
AU2018286249B2 (en) Communication method, apparatus, and computer-readable storage medium
CN105050202A (en) Method of establishing communication session using active connection of mobile terminal to relay server
Chen et al. Implementing the design of smart home and achieving energy conservation
CN105119900A (en) Information secure transmission method, network access method and corresponding terminals
CN112868200A (en) Apparatus for transmission of control messages for a forwarding interface
CN103561088B (en) A kind of long-range control method logged in based on account and device
CN105120454B (en) Information transferring method, networking cut-in method and corresponding terminal
CN101790177A (en) Communication control unit, communication control method, program and communication system
CN102298590A (en) Home interconnected information display system and method, and display terminals and server for the same
CN103392310A (en) Method and arrangement for resolving a temporary block flow
CN104900044A (en) Method and device for transmitting control information

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210324

Address after: 210042 No.1, Suning Avenue, Xuanwu District, Nanjing City, Jiangsu Province

Applicant after: SUNING INTELLIGENT TERMINAL Co.,Ltd.

Address before: 210042 Suning Headquarters, No. 1 Suning Avenue, Xuanwu District, Nanjing City, Jiangsu Province

Applicant before: SUNING COMMERCE GROUP Co.,Ltd.

GR01 Patent grant
GR01 Patent grant