A kind of information real-time sharing method based on WLAN (wireless local area network)
Technical field
The present invention relates to a kind of information real-time sharing method based on WLAN (wireless local area network), belong to computer data technology of sharing and WLAN (wireless local area network) field.
Background technology
A part indispensable during mobile Internet has become people's life today and worked, and just towards synthesization, broadband, wireless penetration future development, this provides chance for the mankind realize information sharing.People by oneself carry-on equipment as smart mobile phone, notebook computer and anyone sharing information.Such as, when opening small-sized seminar, there is no local broadcasting PPT, so just can realize with wireless office net, everyone intelligent terminal simultaneous display PPT, for small-sized investigation provides instrument more easily.
When friend gets together, except immediately being obtained except content by intelligent terminal, many times also wishing can by the Information Sharing of acquisition to present friend, and such as share the news seen, the picture etc. of shooting before sharing, this kind of sharing is real-time.
Universal and the WLAN (wireless local area network) of the intelligent terminal such as smart mobile phone, panel computer develop into the implementation method that this kind of application provides simple cheap.The intelligent terminal such as smart mobile phone, panel computer popularize to user bring more powerful computing capability and convenient smoothness online experience, number of users is increased sharply, particularly these intelligent terminals all support WIFI and blue tooth communication function, WLAN (wireless local area network) can be built easily, overcome the above problems.To fairly large WLAN (wireless local area network), distribution intelligence terminate load may be too heavy, therefore adopts P2P peer-to-peer network technology to realize Information Sharing.P2P peer-to-peer network does not need special server to do network support, does not need other assembly to improve the performance of network yet, but only relies on the intelligent terminal in WLAN (wireless local area network), and networking is simple.
The present invention proposes a kind of information real-time sharing method based on WLAN (wireless local area network) solving this kind of problem, the screen-picture realizing running on an intelligent terminal is real-time transmitted to other intelligent terminal simultaneous display by WLAN (wireless local area network), thus achieve intelligent terminal in WLAN can sharing video frequency together, news, picture, the information such as webpage.
Summary of the invention
The technical problem to be solved in the present invention is: can not realize direct information real-time sharing problem between the intelligent terminal in existing WLAN (wireless local area network) easily.
A kind of information real-time sharing method based on WLAN (wireless local area network) comprises distribution intelligence terminal and shares intelligent terminal.The task that distribution intelligence terminal mainly completes comprises: control and the network connection state sharing intelligent terminal; Intercept desktop picture, according to share the coding format that intelligent terminal consults desktop picture compressed, then send to and share intelligent terminal; The collaborative browse control information that intelligent terminal is sent is shared in acceptance, identifies and processes effective control information; Support collaborative browse function.Share the task that intelligent terminal mainly completes to comprise: provide and be connected with the network of distribution intelligence terminal; Obtain on-screen data by WLAN (wireless local area network), draw screen message; Receive the collaborative browse control information of own user, and send to distribution intelligence terminal; Preserve Screen sharing information.
A kind of information real-time sharing method based on WLAN (wireless local area network), it is characterized in that, the method comprises two parts: the distribution intelligence terminal of distribution real-time sharing information, real-time reception sharing information share intelligent terminal, wherein distribution intelligence terminal works flow process comprises the following steps:
(1) detect and select to share intelligent terminal in WLAN (wireless local area network), set up and control communication connection
(2) receive each control information of sharing the assistance visit that intelligent terminal is sent and process
(3) information needing to share is shown
(4) screen message of display is gathered
(5) in real time the on-screen data of collection is delivered to each intelligent terminal of sharing by P2P WLAN (wireless local area network) to share intelligent terminal workflow and comprise the following steps:
A () is registered and is connected to distribution intelligence terminal
B on-screen data that () is sent by P2P WLAN (wireless local area network) acquisition distribution intelligence terminal
(c) decoding also display screen data
D () receives the collaborative visit control command of local user input, and send it to distribution intelligence terminal
E () preserves the sharing information received
Beneficial effect
Compared with prior art, a kind of information real-time sharing method based on WLAN (wireless local area network) of the present invention has the following advantages:
(1) share the screen message of intelligent terminal energy real-time sharing distribution intelligence terminal demonstration, share cost very low.
(2) adopt P2P to set up WLAN (wireless local area network), alleviate the load of distribution intelligence terminal, accelerate and share speed.
(3) share the visit that intelligent terminal can work in coordination with distribution intelligence terminal control sharing information, can the information shared be preserved.
(4) share intelligent terminal need authentication to the connection of distribution intelligence terminal and secure permission, ensure that the fail safe of connection and sharing information.
(5) there is a lot of application scenarios, such as realize PPT with smart mobile phone and discuss, together appreciate video when friend has an informal discussion, news, picture, the letters such as webpage,
Accompanying drawing explanation
The P2P structure of the WLAN figure that Fig. 1 real time information is shared
The workflow diagram of Fig. 2 distribution intelligence terminal
Fig. 3 shares the workflow diagram of intelligent terminal
Embodiment
A kind of information real-time sharing method based on WLAN (wireless local area network) that the present invention proposes, is described as follows with case study on implementation by reference to the accompanying drawings.Fig. 1 is a kind of P2P structure of the WLAN figure of the information real-time sharing method based on WLAN (wireless local area network), and WLAN (wireless local area network) adopts P2P peer-to-peer network, and in a network, only have a distribution intelligence terminal to provide sharing information, remaining shares intelligent terminal for reception information.Share intelligent terminal and have identical function, without master-slave, arbitrary intelligent terminal both can be used as server, again can as work station.Distribution intelligence terminal provides the bang path of sharing information in P2P peer-to-peer network.In the implementation case, the intelligent terminal in WLAN (wireless local area network) adopts Android intelligent, adopts WIFI to set up WLAN (wireless local area network).Android platform provides application framework, provide SQL database to store for structural data, provide the support to media such as audio frequency, video and pictures, provide the developing instrument of the aspects such as bluetooth, 3G and WIFI communication, the WIFI communication that the present invention adopts them to realize between Android intelligent, adopts the SDK such as DDMS assembly coding of Android to intercept intelligent terminal screen.Adopt the SDK coding of Android to process the event of the input equipments such as keyboard, and complete control information and sharing the transmission between intelligent terminal and distribution intelligence terminal.Adopt P2P technology to set up WLAN (wireless local area network) transmission data, by distribution intelligence mobile phone, the data of its screen display are sent in real time and multiplely shares smart mobile phone.It is client computer is also server that every platform in P2P network shares smart mobile phone, while reception service, provide service again to others.
Based on an information real-time sharing method for WLAN (wireless local area network), it is characterized in that, the method comprises two parts: the distribution intelligence terminal of distribution real-time sharing information, real-time reception sharing information share intelligent terminal.Wherein distribution intelligence terminal works flow process as shown in Figure 2, comprises the following steps:
(1) detect and select to share intelligent terminal in WLAN (wireless local area network), set up and control communication connection
(2) receive each control information of sharing the assistance visit that intelligent terminal is sent and process
(3) information needing to share is shown
(4) screen message of display is gathered
(5) on-screen data of collection is delivered to by P2P WLAN (wireless local area network) eachly shares intelligent terminal in real time
Share intelligent terminal workflow as shown in Figure 3, comprise the following steps:
A () is registered and is connected to distribution intelligence terminal
B on-screen data that () is sent by P2P WLAN (wireless local area network) acquisition distribution intelligence terminal
(c) decoding also display screen data
D () receives the collaborative visit control command of local user input, and send it to distribution intelligence terminal
E () preserves the sharing information received
One of key technology based on the information real-time sharing method of WLAN (wireless local area network) is the on-screen data P2P transmission method in a wireless local area network gathered, and the implementation case realizes by the following method.
Distribution intelligence mobile phone realizes screenshotss by the API of Android, obtains the data of screen display, and these data are carried out piecemeal, coding, packing, for P2P network provides original data, shares smart mobile phone obtain for other.In time sharing smart mobile phone to distribution intelligence handset requests data, a distribution intelligence handset-selected free time shares smart mobile phone (not for other shares smart mobile phone service) and returns to requestor, and is set to busy by its state; After requestor obtains the address of ISP, just provide service to supplier's request.Share after smart mobile phone obtains request content, just notice distribution intelligence mobile phone, to share smart mobile phone for other below providing service.
Distribution intelligence mobile phone, before screenshotss, dynamically follows the tracks of screen change rectangular area, reducing the data volume of image procossing and transmission, raising the efficiency and bandwidth by only preserving the change data of rectangular area and the method for position.Because the size of change rectangular area is unfixed, distribution intelligence mobile phone is further processed the rectangle data gathered, and larger rectangle is divided into little rectangular block, then sends, concrete steps are as follows:
(1) rectangle data of collection is divided into little rectangular area by distribution intelligence mobile phone, encapsulation of then encoding
(2) in store by sharing smart mobile phone list after legal identity certification on distribution intelligence mobile phone, according to this list, distribution intelligence mobile phone sends a little rectangle data bag at random to each smart mobile phone of sharing, this packet contains the overall condition of data, comprise little rectangle sum, the current little rectangle numbering etc. received.
(3) share smart mobile phone the little rectangle data bag received is decoded, then according to the positional information of little rectangle, little rectangle display is gone up in position.
(4) information that smart mobile phone obtains according to step (2) is shared, infer the little rectangle data bag that whole on-screen data also lacks, and send request to the smart mobile phone of sharing of its neighboring regions, have sharing smart mobile phone and will sending to it of institute's request data package.Meanwhile, this share smart mobile phone also using the packet that received as sharing, sharing smart mobile phone to other provides data source.
Those of ordinary skill in the art should be appreciated that technical scheme of the present invention can be modified, distortion or equivalents, and does not depart from essence and the scope of technical solution of the present invention, all covers among right of the present invention.