The content of the invention
In view of this, the invention solves the problems that a technical problem be to provide and a kind of be used to set up service access in a wlan
Method, pass through mobile terminal send multicast message Mechanism establishing access connection.
A kind of method for setting up service access in a wlan, including:Send mobile terminal period in WLAN
Multicast message;Management equipment in the WLAN receives the multicast message, and stores the mobile end for sending the multicast message
Client information;The management equipment is set up with mobile terminal according to the information of mobile terminal and is connected, and sends or receive file, number
According to.
According to one embodiment of the method for the invention, further, the mobile terminal is every the default very first time
Interval sends the packet carried in the multicast message, the multicast message
Include:IP address, port, broadcasting frequency, device name, unit type, mobile terminal IEMI md5, mac md5;
The management equipment receives the multicast message, sets up the information of mobile terminal table using MAC Address as major key and stores;When described
When management equipment does not receive the multicast message that the mobile device is sent more than default second time interval, then this is judged
Mobile terminal goes offline.
According to one embodiment of the method for the invention, further, when the management equipment newly adds WLAN, send
PC multicast messages;When the mobile terminal in WLAN receives PC multicast messages, echo message is sent to the management equipment;Its
In, the management equipment includes:PC, notebook computer, server.
According to one embodiment of the method for the invention, further, when the management equipment is based on the direct-connected WLAN of wifi
In mobile terminal when, enumerate the mobile terminal in WLAN according to the information of mobile terminal table, and one by one connection with swashing
The corresponding tcp addresses of mobile terminal of state living, if it is possible to connect, then directly set up first connection and exchange tid/cid letters
Breath.
According to one embodiment of the method for the invention, further, when the management equipment is based on the direct-connected WLAN of wifi
In mobile terminal when, judge whether to preserve this connection according to IEMI information;If do not preserved, ejection confirms that connection frame is carried
Show the tid/cid for whether preserving this link and preserving both sides' exchange;If it is direct-connected mobile whole that the management equipment is based on wifi
End is when can turn on, and pop-up dialogue box suggestion Activates Phone assistant or selection sends the Object linking of Quick Response Code form;The pipe
When reason equipment transmission file, data do not meet with a response in default 3rd time interval, then send file or data are corresponding
Cloud address.
According to one embodiment of the method for the invention, further, the Object linking of Quick Response Code form includes:IP
Location, port and MAC Address;Wherein, the IP address of Object linking is the IP address of internal network of the management equipment, the end of Object linking
Mouth is the Intranet udp port of the management equipment, and the MAC Address of Object linking is the MAC Address of router;Mobile scanning terminal
The Object linking of this Quick Response Code form received, when judging that router is identical according to the MAC Address included in Object linking, then
Announcement information is sent to the management equipment, the information of carrying includes:IP address, port, broadcasting frequency, device name, equipment
The md5 of model, mobile terminal IEMI md5, mac.
The invention solves the problems that a technical problem be to provide a kind of system for setting up service access in a wlan, lead to
Cross the Mechanism establishing access connection that mobile terminal sends multicast message.
A kind of system for setting up service access in a wlan, including:Mobile terminal and management equipment;It is described mobile whole
End periodically sends multicast message;The management equipment receives the multicast message, and stores the transmission multicast message
Information of mobile terminal;The management equipment is set up with mobile terminal according to the information of mobile terminal and is connected, and sends or receive text
Part, data.
One embodiment of the system according to the present invention, further, the mobile terminal is every the default very first time
Interval, which sends the information carried in the multicast message, the multicast message, to be included:IP address, port, broadcasting frequency, implementor name
Title, unit type, mobile terminal IEMI md5, mac md5;The management equipment receives the multicast message, sets up with MAC
Address is the information of mobile terminal table of major key and stored;When the management equipment more than default second time interval does not receive institute
When stating the multicast message of mobile device transmission, then judge that this mobile terminal goes offline.
One embodiment of the system according to the present invention, further, when the management equipment newly adds WLAN, sends
PC multicast messages;When the mobile terminal in WLAN receives PC multicast messages, echo message is sent to the management equipment;Its
In, the management equipment includes:PC, notebook computer, server.
One embodiment of the system according to the present invention, further, when the management equipment is based on the direct-connected WLAN of wifi
In mobile terminal when, enumerate the mobile terminal in WLAN according to the information of mobile terminal table, and one by one connection with swashing
The corresponding tcp addresses of mobile terminal of state living, if it is possible to connect, then directly set up first connection and exchange tid/cid letters
Breath.
One embodiment of the system according to the present invention, further, when the management equipment is based on the direct-connected WLAN of wifi
In mobile terminal when, judge whether to preserve this connection according to IEMI information;If do not preserved, ejection confirms that connection frame is carried
Show the tid/cid for whether preserving this link and preserving both sides' exchange;If it is direct-connected mobile whole that the management equipment is based on wifi
End is when can turn on, and pop-up dialogue box suggestion Activates Phone assistant or selection sends the Object linking of Quick Response Code form;The pipe
When reason equipment transmission file, data do not meet with a response in default 3rd time interval, then send file or data are corresponding
Cloud address.
One embodiment of the system according to the present invention, further, the Object linking of Quick Response Code form include:IP
Location, port and MAC Address;Wherein, the IP address of Object linking is the IP address of internal network of the management equipment, the end of Object linking
Mouth is the Intranet udp port of the management equipment, and the MAC Address of Object linking is the MAC Address of router;Mobile scanning terminal
The Object linking of this Quick Response Code form received, when judging that router is identical according to the MAC Address included in Object linking, then
Announcement information is sent to the management equipment, the information of carrying includes:IP address, port, broadcasting frequency, device name, equipment
The md5 of model, mobile terminal IEMI md5, mac.
The method and system for being used to set up service access in a wlan of the present invention, multicast message is sent by mobile terminal
Mechanism establishing access connection, easily can send new opplication, data etc. to mobile terminal, and can easily manage movement
Terminal, is user-friendly.
Embodiment
The present invention is described more fully with reference to the accompanying drawings, wherein illustrating the exemplary embodiment of the present invention.Under
The accompanying drawing that face will be combined in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, and shows
So, described embodiment is only a part of embodiment of the invention, rather than whole embodiments.Based on the reality in the present invention
Example is applied, the every other embodiment that those of ordinary skill in the art are obtained under the premise of creative work is not made all belongs to
In the scope of protection of the invention.
Fig. 1 is the flow chart for being used to set up one embodiment of the method for service access in a wlan according to the present invention,
As shown in Figure 1:
Step 101, send multicast message the mobile terminal period in WLAN.
Step 102, the management equipment in WLAN receives multicast message, and stores the mobile terminal letter for sending multicast message
Breath.
Step 103, management equipment is set up with mobile terminal according to information of mobile terminal and is connected, and sends or receive file, number
According to.
Management equipment in the present invention is PC in a wlan, notebook computer, server etc., in PC, notebook electricity
Network interface card is set in brain, server, WLAN can be accessed by WIFI, with new business file, pipe can be sent to mobile terminal
The functions such as mobile terminal are managed, for example, mobile phone assistant can be opened, connection guide prompting has mobile phone to connect, and can manage same
The mobile phone of connection is agreed in one LAN, there can be redaction with the application in prompting mobile telephone set, can upgrade.Mobile terminal bag
Include:Mobile phone, ipad etc..
WLAN (Wireless Local Area Networks) is WLAN, and some wireless devices pass through some
, can or several base stations (commonly referred to as focus or AP) reach interconnection, it is possible to constitute an internal lan by wireless connection
With shared file.WIFI is a kind of agreement (being actually Handshake Protocol) for realizing wireless networking, and WIFI network is operated in 2.4G
Or 5G frequency range (close to straightline propagation), operating distance is not far, is conducive to channeling, the general institute on the electronic equipments such as mobile phone
The WLAN of title just refers to WIFI in fact.
According to one embodiment of present invention, as shown in Fig. 2 mobile terminal 11 is disappeared with very first time interval transmission multicast
Breath, the very first time interval can set according to demand, for example, 10,15 minutes etc..When mobile terminal 11 adds a wlan, stand
I.e. to one devicenotify bag of " 238 network segment " multicast, the information of carrying includes:IP address, port, broadcasting frequency, equipment
Title, unit type, mobile terminal IEMI md5, mac md5 etc., and broadcasted again once every 15 minutes, mobile terminal
11 monitor tcp ports:38517.
Management equipment 12 receives multicast message, sets up the information of mobile terminal table using MAC Address as major key and stores, passes through
The MAC Address of mobile terminal is the characteristic value of difference mobile terminal.When management equipment 12 exceedes default second time interval not
When receiving the multicast message of the transmission of mobile device 11, then judge that this mobile terminal goes offline.Second time interval can be according to demand
It is configured, for example, 30,40 minutes etc..After management equipment judges that mobile terminal goes offline, the state of mobile terminal will be preserved,
When user needs to send data to this mobile terminal, then user can obtain the whether online accurate information of this mobile terminal.
After management equipment 12 adds a new WLAN, immediately to one PC notify bag of " 239 network segment " multicast, take
The information of band includes:IP address, port, device name etc..When the mobile terminal in WLAN receives PC multicast messages, Xiang Guan
Manage equipment and send echo message, the information of carrying includes:IP address, port, broadcasting frequency, device name, unit type, movement
Terminal IEMI md5, mac md5 etc..
According to one embodiment of present invention, management equipment can be PC, notebook, server etc., and user can be direct
Set up direct-connected using management equipment and mobile phone, file, data are sent or received between management equipment and mobile phone, or, Yong Hutong
The connection servers such as individual PC are crossed, set up direct-connected by server and mobile phone using PC, text is sent or received between PC and mobile phone
Part, data for example, PC and mobile phone to set up direct-connected flow as shown in Figure 5:
Step 201, PC by inquire about server obtain mobile terminal whether online information.Server is by receiving mobile phone
Multicast message, sets up the information of mobile terminal table using MAC Address as major key and stores.
Step 202, PC sends the message of " I am direct-connected " by server to mobile phone.
Step 203, mobile phone receives the message of this " I am direct-connected ", sets up service processes on mobile phone, and by IP address,
The information such as port, broadcasting frequency, device name, unit type are sent to server, and PC is forwarded to by server.
Step 204, after the information of mobile phone that server transmission is received in PC, attempt to set up direct-connected with mobile phone by wifi.
Step 205, PC sets up direct-connected with mobile phone, sends or receive file, data.
Step 206, when carrying out step 202 to failing during 204 or time-out, then by server send file or
The corresponding cloud address of data.
According to one embodiment of present invention, when management equipment 12 is based on mobile terminal in the direct-connected WLAN of wifi, root
The mobile terminal in WLAN is enumerated according to information of mobile terminal table, and connects corresponding with the mobile terminal being active one by one
Tcp addresses, if it is possible to connect, then directly set up first connection and exchange tid/cid information.
Triggered in management equipment 12 direct-connected interface, management equipment 12 enumerate under current wlan it is all stated set
It is standby, as shown in figure 3, management equipment 12 enumerates the equipment that lower 2 of current wlan was stated, the type of one of mobile terminal 11
For xiaomi, IP is the information such as 192.168.100.2, and management equipment 12 connects the corresponding tcp addresses of mobile terminal one by one, and hands over
Change tid/cid/key.If connecting the success of mobile terminal 11, mobile terminal 11 is set to state of activation in interface, if even
Failure is connect, then gray states are set in interface.Cid is CustomerIDentity abbreviation, the platform release of mobile phone.
According to one embodiment of present invention, when management equipment 12 is based on mobile terminal 11 in the direct-connected WLAN of wifi,
Judged whether to preserve this connection according to IEMI information;If do not preserved, ejection confirms whether connection frame prompting preserves this chain
Meet and preserve the tid/cid of both sides' exchange.IMEI (mobile device world identification code) is the mark for distinguishing mobile device, by 15
" the electronics string number " of bit digital composition, it is corresponded with every mobile phone, and the code is that the whole world is unique.
According to one embodiment of present invention, after the direct-connected disconnection of PC and mobile phone, PC continues to set up with mobile phone to be connected, such as
Shown in Fig. 6:
Step 301, PC attempted to set up direct-connected with mobile phone every X seconds by wifi, is successfully established, then enters when in 3 times
Step 305, when setting up failure or time-out, then into step 302;Can be set within X seconds, can for 10,20 seconds etc..
Step 302, PC is sent by cloud and sets up the message being connected with mobile phone.
Step 303, mobile phone receives message, sets up service processes on mobile phone, and by IP address, port, broadcasting frequency,
The information such as device name, unit type are sent to PC.
Step 304, after PC receives the information of mobile phone, attempt to set up direct-connected with mobile phone by wifi.
Step 305, PC sets up direct-connected with mobile phone, sends or receive file, data.
Step 306, when unsuccessfully or overtime during progress step 302 to 304, then disconnect, abandon and mobile phone
Carry out direct-connected.
According to one embodiment of present invention, if management equipment 12 not can turn on based on the direct-connected mobile terminals of wifi,
Pop-up dialogue box suggestion Activate Phone assistant or selection send Quick Response Code form Object linking.When management equipment 12 sends text
When part, data do not meet with a response in default 3rd time interval, then file or the corresponding cloud address of data are sent.When the 3rd
Between at intervals of 2,3 seconds etc..Mobile phone assistant is the management by synchronization instrument of smart mobile phone, including PC ends and mobile phone terminal.PC ends mobile phone is helped
Hand can install application program with safer easily download, realize all-round mobile phone easily in computer end managing mobile phone
Data management --- system file, short message, the integrated management of contact person, significant data at any time inside backup and reduction mobile phone.Pipe
It is shared to manage equipment 12 and the connection of the foundation of mobile terminal 11 and the link information of mobile phone assistant.
According to one embodiment of present invention, as shown in figure 4, the Object linking of Quick Response Code form includes:IP address, port
And MAC Address;The IP address of Object linking is the IP address of internal network of management equipment, and the port of Object linking is the interior of management equipment
Net udp port, the MAC Address of Object linking is the MAC Address of router, and data are encrypted by des, and make base64 codings.
After mobile phone scanning, if discovery is identical with the mac addresses of Object linking, IP is preferentially given:One devicenotify's of PORT hairs
Packet, allows PC reversely to connect mobile phone.Object linking it is as follows:http://zhushou.360.cn/installer.apk
Param=base64 (des (IP Port MAC)), the Object linking of this Quick Response Code form received of mobile scanning terminal, when sentencing
When the MAC Address included in disconnected Object linking is identical with the MAC Address of the router in the WLAN that mobile terminal is accessed, to target
The corresponding UDP addresses in IP address+port of link send to management equipment and send announcement information, and the information of carrying includes:IP
Location, port, broadcasting frequency, device name, unit type, mobile terminal IEMI md5, mac md5 etc..
According to one embodiment of present invention, PC is connected with mobile phone cloud, as shown in Figure 7:
Step 401, user sends out task, such as software upgrading or upload data etc. by PC.
Step 402, task is sent to Cloud Server by PC;When sending failure, into step 406, PC displays send failure.
Step 403, judge the connection status of Cloud Server and mobile phone, according to specific demand Cloud Server can be set to examine
Survey the cycle being connected with mobile phone;When connection status is normal, then into step 404, when judging failure or can not connect, then enter step
Rapid 407.
Step 404, task is sent to mobile phone by Cloud Server, and will send successful message return PC;
Step 405, show and sent successfully on PC.
Step 407, Cloud Server will be sent to PC with the message that mobile phone is disconnected.
Step 408, show that Cloud Server is disconnected with mobile phone on PC.
As shown in figure 8, including for the system for setting up service access in a wlan:Mobile terminal 21,22 and management equipment
23.Mobile terminal 21,22 periodically sends multicast message.Management equipment 23 receive multicast message, and store transmission multicast disappear
The information of mobile terminal of breath.Management equipment 23 is set up with mobile terminal 21,22 according to information of mobile terminal and is connected, and sends or receives
File, data.
According to one embodiment of present invention, mobile terminal 21,22 sends multicast every default very first time interval and disappeared
The information carried in breath, multicast message includes:IP address, port, broadcasting frequency, device name, unit type, mobile terminal
IEMI md5, mac md5 etc..Management equipment 23 receives multicast message, sets up the information of mobile terminal using MAC Address as major key
Table is simultaneously stored.When management equipment 23 exceedes the multicast message that default second time interval does not receive the transmission of mobile device 21,22
When, then judge that this mobile terminal 21,22 goes offline.
According to one embodiment of present invention, when management equipment 23 newly adds WLAN, PC multicast messages are sent;Work as WLAN
In mobile terminal 21,22 when receiving PC multicast messages, send echo message to management equipment.When management equipment 23 is based on
During mobile terminal in the direct-connected WLAN of wifi, the mobile terminal in WLAN is enumerated according to information of mobile terminal table, and connect one by one
Tcp addresses corresponding with the mobile terminal being active, if it is possible to connect, then directly set up first connection and exchange
Tid/cid information.
The method and system for being used to set up service access in a wlan of the present invention, user can stay at home or other places
Using wireless routing, on computers just it can directly be seen that mobile phone, with managing mobile phone or can be passed through by the direct-connected mobile phones of wifi
Cell phone managing computer, wifi is had found to apply in several scenes, for example, it is possible to achieve mobile phone blit is experienced to computer,
Application in prompting mobile telephone set has redaction to upgrade, and easily can send new opplication, data etc., and energy to mobile terminal
It is enough easily to manage mobile terminal, it is user-friendly.
The method and system of the present invention may be achieved in many ways.For example, can by software, hardware, firmware or
Software, hardware, firmware any combinations come realize the present invention method and system.The said sequence of the step of for method is only
Order described in detail above is not limited in order to illustrate, the step of method of the invention, is especially said unless otherwise
It is bright.In addition, in certain embodiments, the present invention can be also embodied as recording to program in the recording medium, these programs include
Machine readable instructions for realizing the method according to the invention.Thus, the present invention also covering storage is used to perform according to this hair
The recording medium of the program of bright method.