CN105763516A - Method and apparatus for terminal in wireless local area network to send data to equipment outside wireless local area network - Google Patents

Method and apparatus for terminal in wireless local area network to send data to equipment outside wireless local area network Download PDF

Info

Publication number
CN105763516A
CN105763516A CN201410790326.9A CN201410790326A CN105763516A CN 105763516 A CN105763516 A CN 105763516A CN 201410790326 A CN201410790326 A CN 201410790326A CN 105763516 A CN105763516 A CN 105763516A
Authority
CN
China
Prior art keywords
packet
wlan
terminal
data
target string
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.)
Granted
Application number
CN201410790326.9A
Other languages
Chinese (zh)
Other versions
CN105763516B (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.)
Shenzhen Tencent Computer Systems Co Ltd
Original Assignee
Shenzhen Tencent Computer Systems 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 Shenzhen Tencent Computer Systems Co Ltd filed Critical Shenzhen Tencent Computer Systems Co Ltd
Priority to CN201410790326.9A priority Critical patent/CN105763516B/en
Publication of CN105763516A publication Critical patent/CN105763516A/en
Application granted granted Critical
Publication of CN105763516B publication Critical patent/CN105763516B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method for a terminal in a wireless local area network to send data to equipment outside the wireless local area network. The method comprises the step of generating an initial IP data packet and an IP data packet corresponding to a target character string by the terminal. The above data packets are arranged to be multicast IP data packets. A target address and/or a packet length is used for bearing the identity information thereof. The adjacent data length variation information or the coded value of each character in the target character and the serial number of the character in the target character are encrypted based on an encryption mechanism during the data communication process of the wireless local area network. Furthermore, the terminal successively sends the initial IP data packet and the IP data packet corresponding to the target character to the wireless access point of the wireless local area network. Based on the above method, the equipment outside the wireless local area network can accurately recognize data sent from the terminal inside the wireless local area network. In addition, the invention also provides a method corresponding to the above method, a method and a device for receiving data sent from the terminal in the wireless local area network to the equipment outside the wireless local area network.

Description

The method and apparatus sending data from terminal in WLAN to net external equipment
Technical field
The present invention relates to networking technology area, particularly relate to a kind of method and apparatus sending data from terminal in WLAN to net external equipment and the method and apparatus relating to the data that a kind of reception sends from terminal in WLAN to net external equipment.
Background technology
WLAN (WirelessLocalAreaNetworks;WLAN) wireless technology is utilized aloft to transmit data, speech and video signal.As a kind of replacement scheme or the extension of traditional wiring network, WLAN has been liberated user out from fixed position so that user can obtain information whenever and wherever possible in WLAN coverage.
The equipment that wireless access points (AccessPoint, AP) is the most frequently used when being set up micro radio LAN at present.Wireless access points carries the role of the bridge being connected to gauze and wireless network, and is connected together by each wireless network terminal (wireless terminal can be described as again wireless stations).The wireless terminal accessing WLAN can be communicated by wireless access points in wireless access points coverage.
Each WLAN has the service set (SSID, ServiceSetIdentifier) of oneself, is namely equivalent to the name of WLAN.Wireless terminal needs to be set to the wireless network card of self SSID of respective wireless LAN, could access this WLAN.If this WLAN has access pin, then wireless terminal also needs to the wireless access points to this WLAN and sends this access pin so that wireless terminal is carried out authentication by wireless access points, after authentication is passed through, wireless terminal could access this WLAN.
Consideration based on secure data area, mutual communication process has between the wireless terminal in WLAN encryption mechanism and corresponding decryption mechanisms, the inclusion of IP packet can be encrypted according to the access pin of WLAN before sending IP packet by wireless network card according to certain AES, and the inclusion of IP packet can be decrypted according to the access pin of WLAN after receiving IP packet by wireless network card according to corresponding decipherment algorithm, even if thus the equipment outside WLAN captures the packet that the wireless terminal in WLAN sends, also the information content wherein comprised cannot be accurately identified out.
Summary of the invention
Based on this, it is necessary to provide a kind of method sending data from terminal in WLAN to net external equipment and a kind of device sending data from terminal in WLAN to net external equipment so that the equipment outside WLAN can accurately identify out the data that the terminal in WLAN sends.
In addition, the device of the data that the method for the data that there is a need to provide a kind of reception to send from terminal in WLAN to net external equipment and a kind of reception send from terminal in WLAN to net external equipment so that the equipment outside WLAN can accurately identify out the data that the terminal in WLAN sends.
A kind of method sending data from terminal in WLAN to net external equipment, comprises the following steps:
Described terminal obtains the target string needing to send;
Described terminal constructions IP packet, the first paragraph of the destination address of this IP packet is set to represent that this IP packet is multicast IP data bag, and latter three sections of the destination address of this IP packet be configured to meet about definite form, with represent this IP packet carry data according to the encryption mechanism in described WLAN data communication process encrypt before and after data length variable quantity information, and the inclusion length of described IP packet is about definite value;
Described terminal generates the IP packet that in described target string, each character is corresponding, the first paragraph of the destination address in described IP packet is set to represent that this IP packet is multicast IP data bag, rear three sections of encoded radios being set to represent corresponding character of the destination address in described IP packet and corresponding character sequence number in described target string, the length of described IP packet inclusion meets pre-conditioned to represent that described IP packet is for IP packet corresponding to described target string;
IP packet corresponding to described IP packet and described target string is sent to the wireless access points of described WLAN by described terminal successively, described IP packet and IP packet corresponding to described target string is broadcasted, so that the described equipment that wireless network card is under monitoring pattern can capture described IP packet and IP packet corresponding to described target string by described wireless access points.
A kind of method receiving the data sent from terminal in WLAN to net external equipment, comprises the following steps:
Described equipment catches the IP packet of the wireless access points broadcast of described WLAN by the wireless network card being under monitoring pattern, and described IP packet is sent to described wireless access points by the terminal in described WLAN;
Whether latter three sections of the destination address of the IP packet that described unit check captures meet about definite form, to determine that whether this IP packet is for carrying data according to the IP packet of data length variable quantity information before and after the encryption mechanism encryption in described WLAN data communication process, if capturing described IP packet, then using the difference of the inclusion length of described IP packet and about definite value as data according to the encryption mechanism in described WLAN data communication process encrypt before and after the length variable quantity of data;
Whether the length of the IP packet inclusion that unit check captures after described IP packet meets pre-conditioned to determine that whether described IP packet is for from IP packet corresponding to the target string of transmission outside WLAN in WLAN, obtaining the encoded radio of the rear corresponding character three sections represented of the destination address of IP packet corresponding to described target string and corresponding character sequence number in described target string with the difference of described length variable quantity;Described equipment according to the encoded radio of each character obtained and each character the sequence number in described target string reduce described target string.
A kind of device sending data from terminal in WLAN to net external equipment, including:
Character string acquisition module, for obtaining the target string needing to send.
IP packet constructing module, for constructing IP packet, the first paragraph of the destination address of this IP packet is set to represent that this IP packet is multicast IP data bag, and latter three sections of the destination address of this IP packet be configured to meet about definite form, with represent this IP packet carry data according to the encryption mechanism in described WLAN data communication process encrypt before and after data length variable quantity information, and the inclusion length of described IP packet is about definite value;
Target IP packet generation module, the IP packet corresponding for generating each character in target string, wherein, the first paragraph of the destination address in IP packet is set to represent that this IP packet is multicast IP data bag, rear three sections of encoded radios being set to represent corresponding character of the destination address in IP packet and corresponding character sequence number in target string, the length of IP packet meets pre-conditioned to represent that IP packet is for IP packet corresponding to described target string;
Packet sending module, for successively IP packet corresponding to described IP packet and described target string being sent to the wireless access points of described WLAN, described IP packet and IP packet corresponding to described target string is broadcasted, so that the described equipment that wireless network card is under monitoring pattern can capture described IP packet and IP packet corresponding to described target string by described wireless access points.
A kind of device receiving the data sent from terminal in WLAN to net external equipment, including:
Packet acquisition module, for being caught the IP packet of the wireless access points broadcast of WLAN by the wireless network card being under monitoring pattern, IP packet is sent to wireless access points by the terminal in WLAN;
First inspection processing module, for checking whether latter three sections of the destination address of the IP packet captured meet about definite form, to determine that whether this IP packet is for carrying data according to the IP packet of data length variable quantity information before and after the encryption mechanism encryption in described WLAN data communication process, if capturing described IP packet, then using the difference of the inclusion length of described IP packet and about definite value as data according to the encryption mechanism in described WLAN data communication process encrypt before and after the length variable quantity of data;
Second inspection processing module, for checking whether the length of the IP packet inclusion captured after described IP packet meets pre-conditioned to determine that whether described IP packet is for from IP packet corresponding to the target string of transmission outside WLAN in WLAN, obtaining the encoded radio of the rear corresponding character three sections represented of the destination address of IP packet corresponding to described target string and corresponding character sequence number in described target string with the difference of described length variable quantity;
Character string recovery module, for the sequence number described target string of reduction in described target string according to each character obtained and each character.
Based on the above-mentioned method and apparatus sending data from terminal in WLAN to net external equipment, IP packet and the first paragraph of the destination address of IP packet corresponding to target string that terminal generates are set to represent that this IP packet is multicast IP data bag, so that wireless access points can broadcast these IP packets after receiving these IP packets, the equipment being under monitoring pattern outside WLAN for wireless network card captures this IP packet offer basis;And, the inclusion length of IP packet is about definite value, so that after WLAN external equipment captures IP packet, can according to the inclusion length of IP packet determine data according to the encryption mechanism in WLAN data communication process encrypt before and after data length variable quantity, so that it is determined that IP packet inclusion corresponding to target string encrypt according to this encryption mechanism before original length;Encoded radio and the character sequence number in target string of each character of target string are arranged in corresponding IP packet in latter three sections of destination address by terminal, owing to the IP packet that terminal sends only having inclusion be encrypted according to the access pin of WLAN, and the packet header of IP packet will not be encrypted, thus destination address therein is without encrypted, therefore, even after the equipment do not known outside the WLAN of the access pin of WLAN captures IP packet, encoded radio and the character sequence number in character string of character can also be obtained from latter three sections of the destination address of IP packet, thus getting the target string that wireless terminal sends;Additionally, the length of IP packet that terminal generates meet pre-conditioned with represents IP packet for from WLAN to the IP packet of transmission outside WLAN, so that equipment can be based only upon the target string that these packets send to the wireless terminal obtaining in WLAN, rather than all packets captured based on it obtain target strings, thus finally making the target string that the wireless terminal that equipment identifies in WLAN exactly from the IP packet that it is caught sends.
Accordingly, method and apparatus based on the data that above-mentioned reception sends from from terminal in WLAN to net external equipment, even if the wireless network card of equipment is in monitoring pattern thus do not access the IP packet that WLAN also can capture the wireless access points broadcast of WLAN, unit check catches whether the IP packet taken is IP packet, determines that data encrypt the length variable quantity of front and back data according to the encryption mechanism in WLAN data communication process according to the inclusion length of IP packet;Further according to whether this length variable quantity IP packet of capturing after IP packet of inspection is the IP packet that target string is corresponding, and from IP packet corresponding to target string, obtain the character of the encoded radio of the character of correspondence and the correspondence sequence number in target string;Finally, equipment is the sequence number reduction target string in target string according to the encoded radio of each character obtained and each character, thus the target string that the wireless terminal that can identify exactly from the IP packet that it is caught in WLAN sends.
Accompanying drawing explanation
Figure 1A is the method for data that sends from terminal in WLAN to net external equipment and the running environment schematic diagram of the method receiving the data sent from terminal in WLAN to net external equipment of the present invention in an embodiment;
Figure 1B is the internal structure schematic diagram of the terminal 102 of Figure 1A in an embodiment;
Fig. 1 C is the internal structure schematic diagram of the equipment 106 of Figure 1A in an embodiment;
Fig. 2 is the schematic flow sheet of the method sending data from terminal in WLAN to net external equipment in an embodiment;
Fig. 3 is the schematic flow sheet of the step S206 in an embodiment in Fig. 2;
Fig. 4 is the schematic flow sheet of the method for the data that the reception in an embodiment sends from terminal in WLAN to net external equipment;
Fig. 5 is the structural representation of the device sending data from terminal in WLAN to net external equipment in an embodiment;
Fig. 6 is the structural representation of the Target IP packet generation module 506 in an embodiment in Fig. 5;
Fig. 7 is the structural representation of the device of the data that the reception in an embodiment sends from terminal in WLAN to net external equipment.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein is only in order to explain the present invention, is not intended to limit the present invention.
Figure 1A is the method for data that sends from terminal in WLAN to net external equipment and the running environment schematic diagram of the method receiving the data sent from terminal in WLAN to net external equipment of the present invention in an embodiment.
Terminal in WLAN of the present invention refers to and accesses the terminal that namely WLAN has communicated to connect with the wireless access points foundation of WLAN;Equipment outside WLAN then refers to the equipment not yet accessing WLAN.Wireless access points of the present invention can be wireless router.
The built vertical communication connection of wireless access points 104 of terminal in Figure 1A 102 and WLAN, equipment 106 not yet sets up communication connection with wireless access points 104.
As shown in Figure 1A, terminal 102 obtains the target string needing to send, and generates destination address and carries the IP packet of target string information, IP packet is sent to wireless access points 104.Wireless access points 104 broadcasts this IP packet, and the wireless network card passing through to be under monitoring pattern of equipment 106 catches this IP packet, and parses target string information from IP packet.
It can be that mobile phone, notebook computer, panel computer etc. arbitrarily can interact and can be accessed by the intelligent subscriber terminal of WLAN with user that terminal of the present invention (includes the terminal 102 shown in Figure 1A).In one embodiment, as shown in Figure 1B, this terminal 102 includes the processor, storage medium, internal memory, network interface, display screen and the input mechanism that are connected by system bus to the internal structure of terminal 102.The input mechanism of terminal 102 triggers dependent instruction according to user operation, and relevant information is then showed user by the display screen of user terminal 102.Terminal 102 is communicated by its network interface and wireless access points 104.In the storage medium of terminal 102, storage is for realizing the software instruction of the method sending data from terminal in WLAN to net external equipment of the present invention, and the processor of terminal 102 performs these instructions to realize the method that the present invention sends data from terminal in WLAN to net external equipment.
It can be wireless router etc. that wireless access points of the present invention (includes the terminal 102 shown in Figure 1A).
It can be the arbitrary equipment that can be accessed by WLAN such as television set, photographic head, printer, intelligent lamp, intelligence beginning that equipment of the present invention (includes the equipment 106 in Figure 1A).In one embodiment, as shown in Figure 1 C, this equipment 106 includes control chip, work functions mechanism, wireless network card and storage medium to the internal structure of the equipment 106 in Figure 1A.Wherein, control chip coordinates to control the work of work functions mechanism, wireless network card and storage medium, and work functions mechanism is for realizing the basic function of equipment 104, for instance the work functions mechanism of photographic head at least has the function etc. catching image;Wireless network card has monitoring pattern and general mode, wireless network card can be caught all IP packets of neighbouring wireless access points transmission and not filter any IP packet in the listen mode, in the normal mode, wireless network card filters out the IP packet not being destined to oneself in the IP packet caught;The software instruction of the method for the data that storage sends from terminal in WLAN to net external equipment for the reception realizing the present invention in storage medium, control chip performs these instructions to realize the method that the present invention receives the data sent from terminal in WLAN to net external equipment.
As in figure 2 it is shown, a kind of method sending data from terminal in WLAN to net external equipment, comprise the following steps:
Step S202, terminal obtains the target string needing to send.
In one embodiment, target string comprises service set (SSID) and the access pin of WLAN, so that equipment can be accessed by WLAN after getting service set and access pin.
Before step S202, the above-mentioned method sending data from terminal in WLAN to net external equipment further comprises the steps of: terminal and obtains the access pin of the WLAN being currently accessed.In one embodiment, terminal can show the interface of the access pin of the WLAN being currently accessed for input terminal, and obtains the access pin that user is inputted by this interface.
Further in step S202, terminal can obtain the SSID of the WLAN being currently accessed, and according to preset format, the access pin of this SSID with the WLAN being currently accessed is combined into target string.Such as, SSID is REXCHANG, and access pin is 123, SSID and access pin can be combined into target string: REXCHANG | 123.
Step S204, terminal constructions IP packet, the first paragraph of the destination address of this IP packet is set to represent that this IP packet is multicast IP data bag, and latter three sections of the destination address of this IP packet be configured to meet about definite form, with represent this IP packet carry data according to the encryption mechanism in described WLAN data communication process encrypt before and after data length variable quantity information, and the inclusion length of IP packet is about definite value.
IP packet is the minimum unit that data are transmitted on the internet, is made up of packet header and inclusion, and wherein, packet header has regular length, and including check information, source address, destination address etc., inclusion then includes the concrete data carried.
The destination address of IP packet is the IP address of intended recipient, the form of the decimal integer string between generally available " dotted decimal notation " be expressed as separating by fullstop 4 0~255, for instance, 100.4.5.6;Wherein, a section of each integer correspondence destination address, the first integer correspondence first paragraph, second integer correspondence second segment, the like.
In a wireless local area network, owing to wireless access points is with the form propagation data of radio wave, as long as therefore wireless access points carries the radio wave of IP packet to external radiation, broadcast IP data bag is namely equivalent to.Multicast IP data bag be terminal in LAN to belonging to the packet that same group of other terminal is propagated, after wireless access points receives multicast IP data bag, this multicast IP data bag can be broadcasted.IP packet is arranged to multicast IP data bag by the present invention, it is therefore intended that make wireless access points after receiving IP packet, this IP packet can be broadcasted.The purpose that IP packet corresponding for target string is arranged to multicast IP data bag below is identical.
The first paragraph (numeral) of the destination address of multicast IP data bag is normally in 224~239 scopes, according to the IEEE802.11 (standard that WLAN is general now, the standard of the wireless communication that its Shi You world motor electronic Engineering society (IEEE) is defined), the first paragraph (numeral) of destination address is 239, rear three sections be any 0~255 the IP packet of numeral be multicast IP data bag.
In one embodiment, the first paragraph of the destination address of IP packet and IP packet corresponding to target string is set to 239, thus latter three sections of the destination address of IP packet and IP packet corresponding to target string can be used for carrying appointment information.
In one embodiment, the destination address of IP packet can be set to 239.0.0.0.
Due to IP packet before transmitting, its inclusion has been encrypted according to the access pin of WLAN according to certain AES by wireless network card, after encryption, the length of inclusion can change, inclusion length variable quantity is uniquely determined by AES, and the inclusion length variable quantity that specific AES is corresponding is fixed value.Owing to terminal may be unaware that the AES adopted, if terminal does not know the AES adopted, thus inclusion length variable quantity just cannot be known a priori by.The initial length that can arrange the inclusion of IP packet between terminal and equipment is about definite value, the inclusion of the IP packet that equipment receives is the inclusion after encryption, equipment can obtain the difference of the inclusion length of the IP packet received and about definite value as data according to the encryption mechanism in WLAN data communication process encrypt before and after data length variable quantity.
The inclusion length of IP packet that equipment captures in one embodiment, the inclusion length of IP packet can be set to 0, thus can be made to be data length variable quantity before and after above-mentioned encryption.
Step S206, terminal generates the IP packet that in target string, each character is corresponding, wherein, the first paragraph of the destination address in IP packet is set to represent that this IP packet is multicast IP data bag, rear three sections of encoded radios being set to represent corresponding character of the destination address in IP packet and corresponding character sequence number in target string, the length of IP packet inclusion meet pre-conditioned with represents IP packet for from WLAN to the IP packet that the target string of transmission outside WLAN is corresponding.
As it is shown on figure 3, in one embodiment, step S206 comprises the following steps:
Step S302, obtains encoded radio and each character sequence number in target word string of target word string each character upper.
In one embodiment, can obtaining the UTF-8 encoded radio that each character in target string is corresponding, wherein UTF-8 (8-bitUnicodeTransformationFormat) is that a kind of variable length character for Unicode encodes.
For target string " REXCHANG | 123 ", the UTF-8 encoded radio that can get each character in target string is as shown in table 1 below:
Table 1
R E X C H A N G | 1 2 3
82 69 88 67 72 65 78 71 124 49 50 51
Step S304, construct the packet header of IP packet corresponding to each character, it is set to the first paragraph of the destination address in packet header represent that IP packet is multicast IP data bag, and by rear three sections of encoded radios being set to represent corresponding character of destination address and corresponding character sequence number in target string.
In one embodiment, the second segment of the destination address of the IP packet that each character is corresponding and the 3rd section are set to represent corresponding character sequence number in target string, the 4th section of encoded radio being set to represent corresponding character.In one embodiment, second segment numeral as the low level of sequence number, when the 3rd piece of digital is less than three, can can supply three with 0 as a high position for sequence number, the 3rd piece of digital before the 3rd piece of digital.Such as, destination address is: 239.1.2.82, then corresponding character sequence number in target string is 1002.
Step S306, constructs the inclusion of IP packet corresponding to each character so that the inclusion length of IP packet meet pre-conditioned with represent IP packet for from WLAN to the IP packet sent outside WLAN.
In one embodiment, the inclusion length of the IP packet that each character is corresponding equal to the fixed value of agreement, with represent IP packet for from WLAN to the IP packet sent outside WLAN;
In another embodiment, the inclusion length of the IP packet that each character is corresponding equal to the encoded radio sum of corresponding character sequence number in target string with corresponding character, with represent IP packet for from WLAN to the IP packet of transmission outside WLAN;
So that the equipment outside WLAN can pick out the IP packet with above-mentioned special characteristic from the IP packet caught, and target string in therefrom identifying further.
Such as, for target string " REXCHANG | 123 ", the relation between length after each character sequence number in target string, the destination address of corresponding IP packet, corresponding IP Data Packet Encryption is as shown in table 2 below:
Table 2
Step S308, constitutes the IP packet that each character is corresponding by the packet header of IP packet corresponding for each character with inclusion.
Step S208, IP packet corresponding to IP packet and target string is sent to the wireless access points of WLAN by terminal successively, IP packet and IP packet corresponding to target string is broadcasted, so that wireless network card is in the equipment under monitoring pattern and can capture IP packet and IP packet corresponding to target string by wireless access points.
Terminal sends the IP packet that target string is corresponding after sending IP packet.About fix on and send, after sending IP packet, the IP packet that target string is corresponding, then, after WLAN external equipment captures IP packet, namely may know that the terminal in WLAN is about to send the IP packet that target string is corresponding.
In one embodiment, the above-mentioned method sending data from terminal in WLAN to net external equipment is further comprising the steps of: terminal obtains the physical label code of equipment, according to physical label code, the encoded radio of each character in target string is encrypted;The encoded radio of the corresponding character represented by the destination address in IP packet is the encoded radio after the encryption of corresponding character.
Physical label code can uniquely identify equipment, and the physical label code of any two distinct device is all different.
In one embodiment, terminal can show the interface of the physical label code for input equipment, and obtains the physical label code of the equipment that user is inputted by this interface.In another embodiment, the Quick Response Code that the physical label code of equipment is corresponding can be printed on the label appended by equipment body, and terminal obtains the physical label code of equipment by scanning means scanning.
In the present embodiment, the encoded radio of the corresponding character represented by the destination address in IP packet has been encrypted according to the physical label code of the equipment of input, thus the equipment that only this physical label code is corresponding just can recognize that corresponding character after capturing IP packet, therefore improve the safety of data transmission.
In one embodiment, the above-mentioned method sending data from terminal in WLAN to net external equipment further comprises the steps of:
After terminating to send each IP packet that target string is corresponding, send and terminate IP packet, the first paragraph of this destination address terminating IP packet is set to represent that this IP packet is multicast IP data bag, and terminate IP packet destination address rear three sections be configured to meet about definite form to represent that IP packet is sent.
Such as, the destination address terminating IP packet can be set to 239.255.255.255.
Thus, after WLAN external equipment captures end IP packet, then may know that the epicycle of IP packet corresponding in target character sends and be over.WLAN external equipment can according to the IP packet reduction target string received during receiving IP packet and terminating IP packet
In one embodiment, above-mentioned target string also comprises the port numbers for communicating of terminal IP address in a wireless local area network and terminal with equipment, so that equipment can send packet to terminal after accessing WLAN.Terminal can in the port numbers for communicating with equipment being combined in target string by the SSID of WLAN to add terminal IP address in a wireless local area network and terminal with access pin.Such as, terminal IP address in a wireless local area network is 192.168.1.102, terminal is 8080 for the port numbers with equipment communication, based on above-mentioned target string " REXCHANG | 123 ", 192.168.1.102 and 8080 can be added in this target string, form final target string: REXCHANG | 123 | 192.168.1.102 | 8080.
The above-mentioned method sending data from terminal in WLAN to net external equipment is further comprising the steps of: terminal cycles through the IP packet that each character IP packet and target string is corresponding, until receiving the feedback information bag of the expression equipment successful data reception that equipment sends.
If terminal just stops sending IP packet and IP packet corresponding to target string not receiving feedback information bag, then equipment is likely due to the of short duration failure and other reasons of IP data-bag lost, damage or equipment and causes not receiving IP packet or all IP packets corresponding to target string.And the present embodiment cycles through the IP packet that each character in IP packet and target string is corresponding, until receiving the feedback information bag of the expression equipment successful data reception that equipment sends, it can be ensured that equipment receives all IP packets that initial data bag is corresponding with target string.
Corresponding to the above-mentioned method sending data from terminal in WLAN to net external equipment, receiving the angle of the data that terminal sends in net from WLAN external equipment, the present invention also provides for the method for the data that a kind of reception sends from terminal in WLAN to net external equipment.
As shown in Figure 4, a kind of method receiving the data sent from terminal in WLAN to net external equipment, comprise the following steps:
Step S402, equipment catches the IP packet of the wireless access points broadcast of WLAN by the wireless network card being under monitoring pattern, and IP packet is sent to wireless access points by the terminal in WLAN.
Step S404, whether latter three sections of the destination address of the IP packet that unit check captures meet about definite form, to determine that whether this IP packet is for carrying data according to the IP packet of data length variable quantity information before and after the encryption mechanism encryption in WLAN data communication process, if capturing IP packet, then using the difference of the inclusion length of IP packet and about definite value as data according to the encryption mechanism in WLAN data communication process encrypt before and after the length variable quantity of data.
Such as, equipment can check whether rear three sections (numerals) of the destination address of the IP packet captured are all 0.Preferably, equipment can check whether the destination address of the IP packet captured is 239.0.0.0.If so, then this IP packet is IP packet.
IP packet due to IP packet before transmitting, its inclusion has been encrypted according to the access pin of WLAN according to certain AES by terminal wireless network interface card, IP packet original length of inclusion before this ciphering process is about definite value, after encryption, the length of inclusion can change, and length variable quantity is uniquely determined by AES.The IP packet that equipment captures is the IP packet after encryption, the difference of this IP packet and about definite value is the length variable quantity of inclusion, is also that data encrypt the length variable quantities of front and back data according to the encryption mechanism in WLAN data communication process.
Step S406, whether the length of the IP packet inclusion that unit check captures after IP packet meets pre-conditioned to determine that whether IP packet is for from IP packet corresponding to the target string of transmission outside WLAN in WLAN, obtaining the encoded radio of the rear corresponding character three sections represented of the destination address of IP packet corresponding to target string and corresponding character sequence number in target string with the difference of above-mentioned length variable quantity.
The length of the IP packet inclusion captured and the difference of above-mentioned length variable quantity are this IP packet original length of inclusion before above-mentioned ciphering process.
In one embodiment, the length of the IP packet inclusion captured can be checked with whether the difference of above-mentioned length variable quantity is equal to the fixed value of agreement, if so, then judge IP packet be from WLAN to the IP packet that the target string sent in WLAN is corresponding.
In one embodiment, the second segment of the destination address in IP packet can be obtained and the blockette of the 3rd section synthesizes a numeral.Wherein, using second segment numeral as high-order digit, the 3rd piece of digital as low order digit, when the 3rd piece of digital is less than three, before the 3rd piece of digital, three can be supplied with 0.
Further, can check the length of the IP packet inclusion captured whether equal to the second segment of the destination address of this IP packet and the 3rd section of numeral that combination obtains and the 4th piece of digital and, if so, then judge IP packet as from WLAN to the IP packet that the target string sent outside WLAN is corresponding.
In one embodiment, the destination address second segment of target string correspondence IP packet and the 3rd section of numeral being combined into can be obtained as corresponding character sequence number in target string, and obtain the numeral of the 4th section of the destination address encoded radio as corresponding character.Step S408, equipment is the sequence number reduction target string in target string according to the encoded radio of each character obtained and each character.
In one embodiment, using the encoded radio of corresponding character that obtains in the destination address from the IP packet UTF-8 encoded radio as corresponding character, can parse, according to UTF-8 coding rule, the character that the encoded radio of acquisition is corresponding.
In one embodiment, in the IP packet that equipment captures, the encoded radio represented by destination address carried out encryption according to the physical label code of equipment.In the present embodiment, the method of the data that above-mentioned reception sends from terminal in WLAN to net external equipment further comprises the steps of: after the encoded radio of the rear corresponding character three sections represented of the destination address getting IP packet, this encoded radio is decrypted by equipment according to the physical label code of equipment, and the character that equipment reduction is used by target string acquires according to the encoded radio after deciphering.
In one embodiment, whether the method for the data that above-mentioned reception sends from terminal in WLAN to net external equipment further comprise the steps of: the destination address of the IP packet that unit check captures after IP packet latter three sections meet about that definite form is to determine that whether this IP packet is for the end IP packet representing that the IP packet that target string is corresponding is sent, according to receiving IP packet and terminating the IP packet reduction target string that receives during IP packet.
Such as, when the destination address of IP packet is 239.255.255.255, it may be determined that this IP packet is for terminating IP packet.
The present embodiment can avoid the indefinite capturing IP data packets of equipment to identify the situation of target string.
In one embodiment, the service set comprising WLAN in the target string that equipment reduction obtains and access pin;The method of the data that above-mentioned reception sends from terminal in WLAN to net external equipment further comprises the steps of: equipment and accesses WLAN according to service set and access pin.Accessing before WLAN at equipment, its built-in wireless network card can be general mode by monitoring mode adjustment by equipment, thus equipment is communicated by wireless network card and wireless access points.
In the present embodiment, even if equipment does not have input mechanism, for instance touch screen etc., it is possible to get the service set in WLAN and access pin, thus being linked in WLAN.
In one embodiment, the port numbers for communicating also comprising terminal IP the address in a wireless local area network and terminal sending IP packet in the target string that obtains is reduced with equipment;The method of the data that above-mentioned reception sends from terminal in WLAN to net external equipment further comprises the steps of: equipment and sends the feedback information bag of expression equipment successful data reception according to IP address and port numbers to terminal.Thus terminal can be made to be not repeated to send the IP packet that target string is corresponding.
The present invention also provides for a kind of terminal, and this terminal is for performing the method sending data from terminal in WLAN to net external equipment in any of the above-described embodiment.
The present invention also provides for a kind of equipment, this equipment method for performing the data that the reception in any of the above-described embodiment sends from terminal in WLAN to net external equipment.
As shown in Figure 5, a kind of device sending data from terminal in WLAN to net external equipment, this device is arranged in this terminal, including character string acquisition module 502, IP packet constructing module 504, Target IP packet generation module 506 and packet sending module 508:
Character string acquisition module 502 is for obtaining the target string needing to send.
In one embodiment, target string comprises service set (SSID) and the access pin of WLAN, so that equipment can be accessed by WLAN after getting service set and access pin.
In one embodiment, the above-mentioned device sending data from terminal in WLAN to net external equipment also includes access pin acquisition module (not shown), for obtaining the access pin of the WLAN being currently accessed.In one embodiment, access pin acquisition module can obtain the access pin that user is inputted by interface, the access pin of the WLAN that this interface is currently accessed for input terminal.
Further, character string acquisition module 502 can obtain the SSID of the WLAN being currently accessed, and according to preset format, the access pin of this SSID with the WLAN being currently accessed is combined into target string.
IP packet constructing module 504 is used for constructing IP packet, the first paragraph of the destination address of this IP packet is set to represent that this IP packet is multicast IP data bag, and latter three sections of the destination address of this IP packet be configured to meet about definite form, with represent this IP packet carry data according to the encryption mechanism in described WLAN data communication process encrypt before and after data length variable quantity information, and the inclusion length of IP packet is about definite value.
IP packet is the minimum unit that data are transmitted on the internet, is made up of packet header and inclusion, and wherein, packet header has regular length, and including check information, source address, destination address etc., inclusion then includes the concrete data carried.
The destination address of IP packet is the IP address of intended recipient, the form of the decimal integer string between generally available " dotted decimal notation " be expressed as separating by fullstop 4 0~255, for instance, 100.4.5.6;Wherein, a section of each integer correspondence destination address, the first integer correspondence first paragraph, second integer correspondence second segment, the like.
In a wireless local area network, owing to wireless access points is with the form propagation data of radio wave, as long as therefore wireless access points carries the radio wave of IP packet to external radiation, broadcast IP data bag is namely equivalent to.Multicast IP data bag be terminal in LAN to belonging to the packet that same group of other terminal is propagated, after wireless access points receives multicast IP data bag, this multicast IP data bag can be broadcasted.IP packet is arranged to multicast IP data bag by the present invention, it is therefore intended that make wireless access points after receiving IP packet, this IP packet can be broadcasted.The purpose that IP packet corresponding for target string is arranged to multicast IP data bag below is identical.
The first paragraph (numeral) of the destination address of multicast IP data bag is normally in 224~239 scopes, according to the IEEE802.11 (standard that WLAN is general now, the standard of the wireless communication that its Shi You world motor electronic Engineering society (IEEE) is defined), the first paragraph (numeral) of destination address is 239, rear three sections be any 0~255 the IP packet of numeral be multicast IP data bag.
In one embodiment, the first paragraph of the destination address of IP packet and IP packet corresponding to target string is set to 239, thus latter three sections of the destination address of IP packet and IP packet corresponding to target string can be used for carrying appointment information.
In one embodiment, the destination address of IP packet can be set to 239.0.0.0 by IP packet constructing module 504.
Due to IP packet before transmitting, its inclusion has been encrypted according to the access pin of WLAN according to certain AES by wireless network card, after encryption, the length of inclusion can change, inclusion length variable quantity is uniquely determined by AES, and the inclusion length variable quantity that specific AES is corresponding is fixed value.Owing to may be unaware that the AES adopted in terminal, thus inclusion length variable quantity also cannot be known a priori by.The initial length that can arrange the inclusion of IP packet between terminal and equipment is about definite value, the inclusion of the IP packet that equipment receives is the inclusion after encryption, equipment can obtain the difference of the inclusion length of the IP packet received and about definite value as data according to the encryption mechanism in WLAN data communication process encrypt before and after data length variable quantity.
In one embodiment, the inclusion length of IP packet can be set to 0 by IP packet constructing module 504, thus the inclusion length of IP packet that equipment captures can be made to be data length variable quantity before and after above-mentioned encryption.
Target IP packet generation module 506 is for generating the IP packet that each character in target string is corresponding, wherein, the first paragraph of the destination address in IP packet is set to represent that this IP packet is multicast IP data bag, rear three sections of encoded radios being set to represent corresponding character of the destination address in IP packet and corresponding character sequence number in target string, the length of IP packet inclusion meet pre-conditioned with represents IP packet for from WLAN to the IP packet that the target string of transmission outside WLAN is corresponding.
As shown in Figure 6, in one embodiment, Target IP packet generation module 506 includes encoded radio and sequence number acquisition module 602, packet header constructing module 604, inclusion constructing module 606 and packet constitute module 608, wherein:
Encoded radio and sequence number acquisition module 602 are for obtaining encoded radio and each character sequence number in target word string of target word string each character upper.
In one embodiment, encoded radio and sequence number acquisition module 602 are for obtaining the UTF-8 encoded radio that each character in target string is corresponding.
Packet header constructing module 604 is for constructing the packet header of IP packet corresponding to each character, it is set to the first paragraph of the destination address in packet header represent that IP packet is multicast IP data bag, and by rear three sections of encoded radios being set to represent corresponding character of destination address and corresponding character sequence number in target string.
In one embodiment, the second segment of the destination address of the IP packet that each character is corresponding and the 3rd section are set to represent corresponding character sequence number in target string, the 4th section of encoded radio being set to represent corresponding character.In one embodiment, second segment numeral as the low level of sequence number, when the 3rd piece of digital is less than three, can can supply three with 0 as a high position for sequence number, the 3rd piece of digital before the 3rd piece of digital.Such as, destination address is: 239.1.2.82, then corresponding character sequence number in target string is 1002.
Inclusion constructing module 606 is for constructing the inclusion of IP packet corresponding to each character so that the inclusion length of IP packet meet pre-conditioned with represents IP packet for from WLAN to the IP packet of transmission outside WLAN.
In one embodiment, the inclusion length of the IP packet that each character is corresponding equal to the fixed value of agreement, with represent IP packet for from WLAN to the IP packet sent outside WLAN;
In another embodiment, the inclusion length of the IP packet that each character is corresponding equal to the encoded radio sum of corresponding character sequence number in target string with corresponding character, with represent IP packet for from WLAN to the IP packet of transmission outside WLAN;
So that the equipment outside WLAN can pick out the IP packet with above-mentioned special characteristic from the IP packet caught, and target string in therefrom identifying further.
Packet constitutes module 608 for the packet header of IP packet corresponding for each character constitutes the IP packet that each character is corresponding with inclusion.
Packet sending module 508 for being sent to the wireless access points of WLAN successively by IP packet corresponding to IP packet and target string, IP packet and IP packet corresponding to target string is broadcasted, so that wireless network card is in the equipment under monitoring pattern and can capture IP packet and IP packet corresponding to target string by wireless access points.
Packet sending module 508 sends the IP packet that target string is corresponding after sending IP packet.About fix on and send, after sending IP packet, the IP packet that target string is corresponding, then, after WLAN external equipment captures IP packet, namely may know that the terminal in WLAN is about to send the IP packet that target string is corresponding.
In one embodiment, the device that in above-mentioned WLAN, terminal sends data to net external equipment also includes identification code acquisition module and encrypting module (not shown), identification code acquisition module is for obtaining the physical label code of equipment, and encrypting module is for being encrypted the encoded radio of each character in target string according to physical label code;The encoded radio of the corresponding character represented by destination address in the IP packet that packet sending module 508 sends is the encoded radio after the encryption of corresponding character.
Physical label code can uniquely identify equipment, and the physical label code of any two distinct device is all different.
In one embodiment, identification code acquisition module can obtain the physical label code of the equipment that user is inputted by interface, and this interface is the interface of the physical label code for input equipment.In another embodiment, the Quick Response Code that the physical label code of equipment is corresponding can be printed on the label appended by equipment body, and identification code acquisition module can pass through scanning means scanning and obtain the physical label code of equipment.
In the present embodiment, the encoded radio of the corresponding character represented by the destination address in IP packet has been encrypted according to the physical label code of the equipment of input, thus the equipment that only this physical label code is corresponding just can recognize that corresponding character after capturing IP packet, therefore improve the safety of data transmission.
In one embodiment, packet sending module 508 is additionally operable to after terminating to send each IP packet that target string is corresponding, send and terminate IP packet, the first paragraph of this destination address terminating IP packet is set to represent that this IP packet is multicast IP data bag, and terminate IP packet destination address rear three sections be configured to meet about definite form to represent that IP packet is sent.
Such as, the destination address terminating IP packet is 239.255.255.255.
Thus, after WLAN external equipment captures end IP packet, then may know that the epicycle of IP packet corresponding in target character sends and be over.WLAN external equipment can according to the IP packet reduction target string received during receiving IP packet and terminating IP packet
In one embodiment, above-mentioned target string also comprises the port numbers for communicating of terminal IP address in a wireless local area network and terminal with equipment, so that equipment can send packet to terminal after accessing WLAN.Character string acquisition module 502 is additionally operable in the port numbers for communicating with equipment being combined in target string by the SSID of WLAN to add terminal IP address in a wireless local area network and terminal with access pin.
The device that in above-mentioned WLAN, terminal sends data to net external equipment also includes loop control module (not shown), the IP packet that each character in IP packet and target string is corresponding is cycled through, until receiving the feedback information bag of the expression equipment successful data reception that equipment sends for controlling packet sending module 508.
If terminal just stops sending IP packet and IP packet corresponding to target string not receiving feedback information bag, then equipment is likely due to the of short duration failure and other reasons of IP data-bag lost, damage or equipment and causes not receiving IP packet or all IP packets corresponding to target string.And the present embodiment cycles through the IP packet that each character in IP packet and target string is corresponding, until receiving the feedback information bag of the expression equipment successful data reception that equipment sends, it can be ensured that equipment receives all IP packets that initial data bag is corresponding with target string.
Corresponding to the above-mentioned device sending data from terminal in WLAN to net external equipment, receiving the angle of the data that terminal sends in net from WLAN external equipment, the present invention also provides for the device of the data that a kind of reception sends from terminal in WLAN to net external equipment.
As shown in Figure 7, a kind of device receiving the data sent from terminal in WLAN to net external equipment, this device is arranged in this equipment, checks processing module 704, second to check processing module 706 and character string recovery module 708 including packet acquisition module 702, first, wherein:
Packet acquisition module 702 for catching the IP packet of the wireless access points broadcast of WLAN by the wireless network card being under monitoring pattern, and IP packet is sent to wireless access points by the terminal in WLAN.
First inspection processing module 704 is for checking whether latter three sections of the destination address of the IP packet captured meet about definite form, to determine that whether this IP packet is for carrying data according to the IP packet of data length variable quantity information before and after the encryption mechanism encryption in WLAN data communication process, if capturing IP packet, then using the difference of the inclusion length of IP packet and about definite value as data according to the encryption mechanism in WLAN data communication process encrypt before and after the length variable quantity of data.
Such as, the first inspection processing module 704 can check whether rear three sections (numerals) of the destination address of the IP packet captured are all 0.Preferably, the first inspection processing module 704 can check whether the destination address of the IP packet captured is 239.0.0.0.If so, then this IP packet is IP packet.
IP packet due to IP packet before transmitting, its inclusion has been encrypted according to the access pin of WLAN according to certain AES by terminal wireless network interface card, IP packet original length of inclusion before this ciphering process is about definite value, after encryption, the length of inclusion can change, and length variable quantity is uniquely determined by AES.The IP packet that equipment captures is the IP packet after encryption, the difference of this IP packet and about definite value is the length variable quantity of inclusion, is also that data encrypt the length variable quantities of front and back data according to the encryption mechanism in WLAN data communication process.
Whether the second inspection processing module 706 is pre-conditioned to determine that whether IP packet is for from IP packet corresponding to the target string of transmission outside WLAN in WLAN, obtaining the encoded radio of the rear corresponding character three sections represented of the destination address of IP packet corresponding to target string and corresponding character sequence number in target string for checking the length of the IP packet inclusion captured after IP packet to meet with the difference of above-mentioned length variable quantity.
The length of the IP packet inclusion captured and the difference of above-mentioned length variable quantity are this IP packet original length of inclusion before above-mentioned ciphering process.
In one embodiment, second inspection processing module 706 can check the length of the IP packet inclusion captured with whether the difference of above-mentioned length variable quantity is equal to the fixed value of agreement, if so, then judge IP packet be from WLAN to the IP packet that the target string sent in WLAN is corresponding.
In one embodiment, the second inspection processing module 706 can obtain the second segment of the destination address in IP packet and blockette one numeral of synthesis of the 3rd section.Wherein, using second segment numeral as high-order digit, the 3rd piece of digital as low order digit, when the 3rd piece of digital is less than three, before the 3rd piece of digital, three can be supplied with 0.
Further, second inspection processing module 706 can check the length of the IP packet inclusion captured whether equal to the second segment of the destination address of this IP packet and the 3rd section of numeral that combination obtains and the 4th piece of digital and, if so, then judge IP packet as from WLAN to the IP packet that the target string sent outside WLAN is corresponding.
In one embodiment, second inspection processing module 706 can obtain the destination address second segment of target string correspondence IP packet and the 3rd section of numeral being combined into as corresponding character sequence number in target string, and obtains the numeral of the 4th section of the destination address encoded radio as correspondence character.Character string recovery module 708 is the sequence number reduction target string in target string for the encoded radio according to each character obtained and each character.
In one embodiment, character string recovery module 708 using the encoded radio of corresponding character that obtains in the destination address from the IP packet UTF-8 encoded radio as corresponding character, can parse, according to UTF-8 coding rule, the character that the encoded radio of acquisition is corresponding.
In one embodiment, in the IP packet that packet acquisition module 702 captures, the encoded radio represented by destination address carried out encryption according to the physical label code of equipment.In the present embodiment, in the present embodiment, the device of the data that above-mentioned reception sends from equipment in WLAN to net external equipment also includes deciphering module (not shown), the encoded radio checking the character of processing module 706 acquisition for the physical label code according to equipment to second is decrypted, and the character that character string recovery module 708 is reduced used by target string acquires according to the encoded radio after deciphering.
In one embodiment, whether the second inspection processing module 706 be additionally operable to the destination address of IP packet that inspection captures after IP packet latter three sections meet about that definite form is to determine that whether this IP packet is for the end IP packet representing that the IP packet that target string is corresponding is sent, and character string recovery module 708 reduces target string according to the IP packet that the target string of reception during receiving IP packet and terminating IP packet is corresponding.
Such as, when the destination address of IP packet is 239.255.255.255, the second inspection processing module 706 can determine that this IP packet is for terminating IP packet.
The present embodiment can avoid the indefinite capturing IP data packets of equipment to identify the situation of target string.
In one embodiment, the service set comprising WLAN in the target string that character string recovery module 708 reduction obtains and access pin;The device of the data that above-mentioned reception sends from terminal in WLAN to net external equipment also includes LAN optimization module (not shown), for accessing WLAN according to service set and access pin.Accessing before WLAN at equipment, its built-in wireless network card can be general mode by monitoring mode adjustment by equipment, thus equipment is communicated by wireless network card and wireless access points.
In the present embodiment, even if equipment does not have input mechanism, for instance touch screen etc., it is possible to get the service set in WLAN and access pin, thus being linked in WLAN.
In one embodiment, the target string that obtains of character string recovery module 708 reduction also comprises the port numbers for communicating with equipment of terminal IP the address in a wireless local area network and terminal sending IP packet;The device of the data that above-mentioned reception sends from terminal in WLAN to net external equipment also includes feedback module (not shown), for sending the feedback information bag of expression equipment successful data reception according to IP address and port numbers to terminal.Thus terminal can be made to be not repeated to send the IP packet that target string is corresponding.
Based on the above-mentioned method and apparatus sending data from terminal in WLAN to net external equipment and the terminal performing the above-mentioned method sending data from terminal in WLAN to net external equipment, IP packet and the first paragraph of the destination address of IP packet corresponding to target string that terminal generates are set to represent that this IP packet is multicast IP data bag, so that wireless access points can broadcast these IP packets after receiving these IP packets, the equipment being under monitoring pattern outside WLAN for wireless network card captures this IP packet offer basis;And, the inclusion length of IP packet is about definite value, so that after WLAN external equipment captures IP packet, can according to the inclusion length of IP packet determine data according to the encryption mechanism in WLAN data communication process encrypt before and after data length variable quantity, so that it is determined that IP packet inclusion corresponding to target string encrypt according to this encryption mechanism before original length;Encoded radio and the character sequence number in target string of each character of target string are arranged in corresponding IP packet in latter three sections of destination address by terminal, owing to the IP packet that terminal sends only having inclusion be encrypted according to the access pin of WLAN, and the packet header of IP packet will not be encrypted, thus destination address therein is without encrypted, therefore, even after the equipment do not known outside the WLAN of the access pin of WLAN captures IP packet, encoded radio and the character sequence number in character string of character can also be obtained from latter three sections of the destination address of IP packet, thus getting the target string that wireless terminal sends;Additionally, the length of IP packet that terminal generates meet pre-conditioned with represents IP packet for from WLAN to the IP packet of transmission outside WLAN, so that equipment can be based only upon the target string that these packets send to the wireless terminal obtaining in WLAN, rather than all packets captured based on it obtain target strings, thus finally making the target string that the wireless terminal that equipment identifies in WLAN exactly from the IP packet that it is caught sends.
Accordingly, the method and apparatus of the data sent from terminal in WLAN to net external equipment based on above-mentioned reception and perform the equipment of method of the data that above-mentioned reception sends from terminal in WLAN to net external equipment, even if the wireless network card of equipment is in monitoring pattern thus do not access the IP packet that WLAN also can capture the wireless access points broadcast of WLAN, unit check catches whether the IP packet taken is IP packet, inclusion length according to IP packet determines that data encrypt the length variable quantity of front and back data according to the encryption mechanism in WLAN data communication process;Further according to whether this length variable quantity IP packet of capturing after IP packet of inspection is the IP packet that target string is corresponding, and from IP packet corresponding to target string, obtain the character of the encoded radio of the character of correspondence and the correspondence sequence number in target string;Finally, equipment is the sequence number reduction target string in target string according to the encoded radio of each character obtained and each character, thus the target string that the wireless terminal that can identify exactly from the IP packet that it is caught in WLAN sends.
Above example only have expressed the several embodiments of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that, for the person of ordinary skill of the art, without departing from the inventive concept of the premise, it is also possible to making some deformation and improvement, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (12)

1. the method sending data from terminal in WLAN to net external equipment, comprises the following steps:
Described terminal obtains the target string needing to send;
Described terminal constructions IP packet, the first paragraph of the destination address of this IP packet is set to represent that this IP packet is multicast IP data bag, and latter three sections of the destination address of this IP packet be configured to meet about definite form, with represent this IP packet carry data according to the encryption mechanism in described WLAN data communication process encrypt before and after data length variable quantity information, and the inclusion length of described IP packet is about definite value;
Described terminal generates the IP packet that in described target string, each character is corresponding, the first paragraph of the destination address in described IP packet is set to represent that this IP packet is multicast IP data bag, rear three sections of encoded radios being set to represent corresponding character of the destination address in described IP packet and corresponding character sequence number in described target string, the length of described IP packet inclusion meets pre-conditioned to represent that described IP packet is for IP packet corresponding to described target string;
IP packet corresponding to described IP packet and described target string is sent to the wireless access points of described WLAN by described terminal successively, described IP packet and IP packet corresponding to described target string is broadcasted, so that the described equipment that wireless network card is under monitoring pattern can capture described IP packet and IP packet corresponding to described target string by described wireless access points.
2. the method sending data from terminal in WLAN to net external equipment according to claim 1, it is characterised in that further comprise the steps of:
Described terminal obtains the physical label code of described equipment, according to described physical label code, the encoded radio of each character in described target string is encrypted;
The encoded radio of the corresponding character represented by destination address in described IP packet is the encoded radio after the encryption of corresponding character.
3. the method sending data from terminal in WLAN to net external equipment according to claim 1, it is characterised in that further comprise the steps of:
After terminating to send each IP packet that described target string is corresponding, send and terminate IP packet, the described first paragraph of destination address terminating IP packet is set to represent that this IP packet is multicast IP data bag, and the described destination address terminating IP packet rear three sections be configured to meet about definite form to represent that IP packet is sent.
4. the method sending data from terminal in WLAN to net external equipment according to claim 1, it is characterized in that, described target string comprises service set and the access pin of described WLAN, so that described equipment can be accessed by described WLAN after getting described service set and access pin.
5. the method sending data from terminal in WLAN to net external equipment according to claim 4, it is characterized in that, described target string also comprises the port numbers for communicating of described terminal IP address in described WLAN and described terminal with described equipment, so that described equipment can send packet to described terminal after accessing described WLAN;
Described method further comprises the steps of:
Described terminal cycles through the IP packet that in described IP packet and described target string, each character is corresponding, until receiving the feedback information bag of the expression equipment successful data reception that described equipment sends.
6. the method receiving the data sent from terminal in WLAN to net external equipment, comprises the following steps:
Described equipment catches the IP packet of the wireless access points broadcast of described WLAN by the wireless network card being under monitoring pattern, and described IP packet is sent to described wireless access points by the terminal in described WLAN;
Whether latter three sections of the destination address of the IP packet that described unit check captures meet about definite form, to determine that whether this IP packet is for carrying data according to the IP packet of data length variable quantity information before and after the encryption mechanism encryption in described WLAN data communication process, if capturing described IP packet, then using the difference of the inclusion length of described IP packet and about definite value as data according to the encryption mechanism in described WLAN data communication process encrypt before and after the length variable quantity of data;
Whether the length of the IP packet inclusion that unit check captures after described IP packet meets pre-conditioned to determine that whether described IP packet is for from IP packet corresponding to the target string of transmission outside WLAN in WLAN, obtaining the encoded radio of the rear corresponding character three sections represented of the destination address of IP packet corresponding to described target string and corresponding character sequence number in described target string with the difference of described length variable quantity;Described equipment according to the encoded radio of each character obtained and each character the sequence number in described target string reduce described target string.
7. the method for the data that reception according to claim 6 sends from terminal in WLAN to net external equipment, it is characterised in that further comprise the steps of:
After getting the encoded radio of the rear corresponding character three sections represented of destination address of IP packet, this encoded radio is decrypted by described equipment according to the physical label code of described equipment, and the character reduced used by described target string acquires according to the encoded radio after deciphering.
8. the method for the data that reception according to claim 6 sends from terminal in WLAN to net external equipment, it is characterized in that, whether latter three sections of the destination address of the IP packet that unit check captures after described IP packet meet about definite form and, to determine that whether this IP packet is for the end IP packet representing that the IP packet that target string is corresponding is sent, reduce described target string according to the IP packet receiving IP packet with terminate to receive during IP packet.
9. the method for the data that reception according to claim 6 sends from terminal in WLAN to net external equipment, it is characterised in that comprise service set and the access pin of described WLAN in the target string that described reduction obtains;
Described method further comprises the steps of:
Described equipment accesses described WLAN according to described service set and access pin.
10. the method for the data that reception according to claim 9 sends from terminal in WLAN to net external equipment, it is characterized in that, the target string that described reduction obtains also comprises the port numbers for communicating with described equipment of the terminal sending described IP packet IP address in described WLAN and described terminal;
Described method further comprises the steps of:
Described equipment sends the feedback information bag of expression equipment successful data reception according to described IP address and described port numbers to described terminal.
11. the device sending data from terminal in WLAN to net external equipment, it is characterised in that including:
Character string acquisition module, for obtaining the target string needing to send;
IP packet constructing module, for constructing IP packet, the first paragraph of the destination address of this IP packet is set to represent that this IP packet is multicast IP data bag, and latter three sections of the destination address of this IP packet be configured to meet about definite form, with represent this IP packet carry data according to the encryption mechanism in described WLAN data communication process encrypt before and after data length variable quantity information, and the inclusion length of described IP packet is about definite value;
Target IP packet generation module, the IP packet corresponding for generating each character in target string, wherein, the first paragraph of the destination address in IP packet is set to represent that this IP packet is multicast IP data bag, rear three sections of encoded radios being set to represent corresponding character of the destination address in IP packet and corresponding character sequence number in target string, the length of IP packet meets pre-conditioned to represent that IP packet is for IP packet corresponding to described target string;
Packet sending module, for successively IP packet corresponding to described IP packet and described target string being sent to the wireless access points of described WLAN, described IP packet and IP packet corresponding to described target string is broadcasted, so that the described equipment that wireless network card is under monitoring pattern can capture described IP packet and IP packet corresponding to described target string by described wireless access points.
12. the device receiving the data sent from terminal in WLAN to net external equipment, it is characterised in that including:
Packet acquisition module, for being caught the IP packet of the wireless access points broadcast of WLAN by the wireless network card being under monitoring pattern, IP packet is sent to wireless access points by the terminal in WLAN;
First inspection processing module, for checking whether latter three sections of the destination address of the IP packet captured meet about definite form, to determine that whether this IP packet is for carrying data according to the IP packet of data length variable quantity information before and after the encryption mechanism encryption in described WLAN data communication process, if capturing described IP packet, then using the difference of the inclusion length of described IP packet and about definite value as data according to the encryption mechanism in described WLAN data communication process encrypt before and after the length variable quantity of data;
Second inspection processing module, for checking whether the length of the IP packet inclusion captured after described IP packet meets pre-conditioned to determine that whether described IP packet is for from IP packet corresponding to the target string of transmission outside WLAN in WLAN, obtaining the encoded radio of the rear corresponding character three sections represented of the destination address of IP packet corresponding to described target string and corresponding character sequence number in described target string with the difference of described length variable quantity;
Character string recovery module, for the sequence number described target string of reduction in described target string according to each character obtained and each character.
CN201410790326.9A 2014-12-17 2014-12-17 The method and apparatus that terminal sends data to net external equipment out of WLAN Active CN105763516B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410790326.9A CN105763516B (en) 2014-12-17 2014-12-17 The method and apparatus that terminal sends data to net external equipment out of WLAN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410790326.9A CN105763516B (en) 2014-12-17 2014-12-17 The method and apparatus that terminal sends data to net external equipment out of WLAN

Publications (2)

Publication Number Publication Date
CN105763516A true CN105763516A (en) 2016-07-13
CN105763516B CN105763516B (en) 2019-11-29

Family

ID=56339609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410790326.9A Active CN105763516B (en) 2014-12-17 2014-12-17 The method and apparatus that terminal sends data to net external equipment out of WLAN

Country Status (1)

Country Link
CN (1) CN105763516B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900532A (en) * 2018-01-05 2018-11-27 艾科立方(香港)公司 For the electronic equipment of Message Processing, method and storage medium
CN113490209A (en) * 2021-06-29 2021-10-08 锐迪科创微电子(北京)有限公司 Data transmission method, system, transmitting device, receiving device and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030059051A1 (en) * 2001-09-27 2003-03-27 Kabushiki Kaisha Toshiba Electronic apparatus, wireless communication device, and encryption key setting method
EP1592166A1 (en) * 2003-02-03 2005-11-02 Sony Corporation Broadcast encryption key distribution system
CN102655643A (en) * 2011-03-04 2012-09-05 希姆通信息技术(上海)有限公司 Wireless data encryption method and wireless data decryption method
CN103825788A (en) * 2014-01-29 2014-05-28 北京睿通慧联科技有限公司 WIFI network configuration method and system
CN104010327A (en) * 2014-06-18 2014-08-27 江勇 Method and system for quickly having access to WIFI wireless network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030059051A1 (en) * 2001-09-27 2003-03-27 Kabushiki Kaisha Toshiba Electronic apparatus, wireless communication device, and encryption key setting method
EP1592166A1 (en) * 2003-02-03 2005-11-02 Sony Corporation Broadcast encryption key distribution system
CN102655643A (en) * 2011-03-04 2012-09-05 希姆通信息技术(上海)有限公司 Wireless data encryption method and wireless data decryption method
CN103825788A (en) * 2014-01-29 2014-05-28 北京睿通慧联科技有限公司 WIFI network configuration method and system
CN104010327A (en) * 2014-06-18 2014-08-27 江勇 Method and system for quickly having access to WIFI wireless network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900532A (en) * 2018-01-05 2018-11-27 艾科立方(香港)公司 For the electronic equipment of Message Processing, method and storage medium
CN108900532B (en) * 2018-01-05 2020-10-16 艾科立方(香港)公司 Electronic device, method, storage medium, and apparatus for message processing
CN113490209A (en) * 2021-06-29 2021-10-08 锐迪科创微电子(北京)有限公司 Data transmission method, system, transmitting device, receiving device and medium

Also Published As

Publication number Publication date
CN105763516B (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN104735260B (en) A kind of correlating method for being applied to intelligent terminal
CN103945369B (en) A kind of length by checking WIFI packets realizes the Internet-surfing configuration method of WIFI equipment
CN106455001A (en) Method and device for configuring WIFI module
US9787498B2 (en) System and method of identifying networked device for establishing a P2P connection
CN105120456A (en) Method and system for intelligent device to access to wireless network quickly
US20200275276A1 (en) Security Protection Method and Apparatus
CN104735747A (en) Information transferring and receiving method and internet-of-things equipment
CN104270744B (en) The rapid configuration system and method for wireless network
CN102883322A (en) Mobile terminal and WiFi (wireless fidelity) connection method for same
CN105376048A (en) Method and system for connecting terminal with display equipment
CN103765848A (en) Apparatus and methods for media access control replacement
CN104065765A (en) WIFI data transmitting method and system and related method thereof
CN105119900A (en) Information secure transmission method, network access method and corresponding terminals
US9325523B2 (en) Method, device and system for accessing wireless local area network, wireless station, and wireless access point
TWI667899B (en) Electronic device and method for communication
CN108476131A (en) Data transmission method, device and equipment
CN106792991A (en) Wi Fi devices, networked devices and networking method
CN104683994A (en) Wireless network configuration method and wireless network devices
CN103442250A (en) System and method for debugging television
CN105120454B (en) Information transferring method, networking cut-in method and corresponding terminal
CN108430091A (en) A kind of efficient smart home wifi distribution method and apparatus
CN105591755A (en) Intelligent home system and authentication connection method on the basis of sound wave authentication connection
CN105120012B (en) Smart machine and its networking cut-in method, message receiving method and device
CN105763516A (en) Method and apparatus for terminal in wireless local area network to send data to equipment outside wireless local area network
CN105704710A (en) Wi-Fi (Wireless Fidelity) parameter configuration method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant