CN104661191A - Local area network communication method, system and terminal, and information sharing device - Google Patents

Local area network communication method, system and terminal, and information sharing device Download PDF

Info

Publication number
CN104661191A
CN104661191A CN201310576444.5A CN201310576444A CN104661191A CN 104661191 A CN104661191 A CN 104661191A CN 201310576444 A CN201310576444 A CN 201310576444A CN 104661191 A CN104661191 A CN 104661191A
Authority
CN
China
Prior art keywords
terminal
visitor
chatroom
master terminal
area network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310576444.5A
Other languages
Chinese (zh)
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 QVOD Technology Co Ltd
Original Assignee
Shenzhen QVOD Technology 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 QVOD Technology Co Ltd filed Critical Shenzhen QVOD Technology Co Ltd
Priority to CN201310576444.5A priority Critical patent/CN104661191A/en
Publication of CN104661191A publication Critical patent/CN104661191A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to a local area network communication method, a system and a terminal, and an information sharing device. The method comprises a network establishment step, a connecting step and a communication step. The network establishment step comprises the substeps that a main terminal establishes a wireless local area network on the basis of a software wireless access point function, and the main terminal is set as a wireless hotspot so that at least one visitor terminal can get access to the wireless hotspot. The connecting step comprises the substep that the main terminal creates a chat room so that the visitor terminal can enter. The communication step comprises the substeps that after the visitor terminal enters the chat room, the main terminal and the visitor terminal perform communication interaction. The local area network communication method has the beneficial effects that the wireless local area network is provided through the software wireless access point function; communication interaction among a plurality of terminals is carried out through creation of the chat room, a wireless fidelity (wifi) or wireless authentication and privacy infrastructure (wapi) network and special file transmission software are not needed, and various resources are shared rapidly by multiple terminals and among applications.

Description

LAN communication method, system, terminal and Information Sharing device
Technical field
The application relates to radio transmission technical field, particularly relates to a kind of LAN communication method, system, terminal and a kind of Information Sharing device.
Background technology
The mobile terminals such as current mobile phone adopt bluetooth or wifi/wapi to carry out wireless files transmission substantially.But the speed of Bluetooth transmission file is very slow, is only about 60-100kB/s, is only applicable to the very little file of transmission; And adopt the transmission of wifi/wapi function to need to set up network, then find network and transmitting software.Wherein, the mode setting up network is that two equipment connect common wireless aps (wireless access node or local area network (LAN)) respectively and are in consolidated network to make two equipment, or utilize the adhoc technology of wifi/wapi to set up adhoc network (being also called multi-hop wireless network), the step operation of this type of networking bothers very much; And transmitting software is generally adopt flying pigeon, FTP etc., and its operation is more loaded down with trivial details and mixed and disorderly, and needs two equipment to run corresponding software simultaneously.The condition that all factors cause utilizing wifi/wapi to transmit is too harsh, and setting operation is too complicated, adds transmitting software variation, makes to build transmission environment and bothers very much, and do not support multi-point, cannot realize sharing.
Along with widely using of mobile terminal, the demand that media resource is shared gets more and more, high-speed transfer becomes particularly important in the terminal, such as, user wishes effectively to transmit rapidly such as to broadcast the dedicated resources such as interior video, music, radar, bookmark, footprint soon, or realizes the sharing files of multiple terminals across application, or realizes the chat of multi-to-multi and file transfer etc. together with other fast broadcasting user, but current wireless files transmission means cannot meet these demands.
Summary of the invention
In view of this, the application provides a kind of is not having to realize under wifi network condition the LAN communication method of file transfer and multiusers interaction, system, terminal and Information Sharing device.
According to the first aspect of the application, the application provides a kind of LAN communication method, comprising: networking step: master terminal sets up WLAN (wireless local area network) based on software wireless access point function, and arranges from connecting at least one visitor's terminal as hotspot; Connection Step: described master terminal creates chatroom and adds for described visitor's terminal; Communication steps: described master terminal, after described visitor's terminal adds described chatroom, carries out communication interaction with described visitor's terminal.
According to the second aspect of the application, the application provides a kind of master terminal for local area network communication, described master terminal has software wireless acceptance point function, described master terminal comprises: networking module, for setting up WLAN (wireless local area network) based on described software wireless access point function, and to arrange described master terminal be hotspot; Main link block, adds for the visitor's terminal being in same described WLAN (wireless local area network) for creating chatroom; Main communication module, for carrying out communication interaction with described visitor's terminal after described visitor's terminal adds described chatroom.
According to the third aspect of the application, the application provides a kind of visitor's terminal for local area network communication, comprising: networking module, for searching for hotspot to be entered the WLAN (wireless local area network) at described hotspot place by described hotspot; Visitor's link block, is in for adding the chatroom that in same described WLAN (wireless local area network), master terminal creates; Visitor's communication module, for carrying out communication interaction with the described master terminal be in same described WLAN (wireless local area network) and other visitor's terminal after adding described chatroom.
According to the fourth aspect of the application, the application provides a kind of LAN communication system, and it comprises aforesaid master terminal and at least one aforesaid visitor's terminal.
According to the 5th aspect of the application, the application provides a kind of Information Sharing device realized based on terminal, comprise: mixed-media network modules mixed-media, WLAN (wireless local area network) is set up based on software wireless access point function for making described terminal, and to arrange described terminal be that hotspot enters described WLAN (wireless local area network) for other terminal, or for making described terminal searching hotspot to enter WLAN (wireless local area network) by described hotspot; Chart-room module, creates chatroom for making described terminal and adds chatroom for the terminal be in same local area network (LAN), or for making described terminal add the chatroom created in described local area network (LAN); Interactive module, carries out information interaction with other terminal for making described terminal in described chatroom.
The beneficial effect of the application is: provide WLAN (wireless local area network) by software wireless access point function, and carry out the communication interaction between multiple terminal by the mode creating chatroom, do not need special file transfer software without the need to wifi/wapi network, realize all kinds of resource fast sharings of multiple terminals across application yet.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of master terminal side in the LAN communication method of a kind of embodiment of the application;
Fig. 2 is the schematic flow sheet of visitor's end side in the LAN communication method of a kind of embodiment of the application;
Fig. 3 is the schematic flow sheet that in the LAN communication method of a kind of embodiment of the application, master terminal establishment chatroom adds for visitor's terminal;
Fig. 4 is the schematic flow sheet that in the LAN communication method of a kind of embodiment of the application, visitor's terminal adds chatroom;
Fig. 5 be in the LAN communication method of a kind of embodiment of the application chat messages move towards schematic diagram;
Fig. 6 is that in the LAN communication method of a kind of embodiment of the application, master terminal and visitor's terminal carry out mutual schematic diagram;
Fig. 7 is the high-level schematic functional block diagram that the master terminal of a kind of embodiment of the application comprises;
Fig. 8 is the high-level schematic functional block diagram that visitor's terminal of a kind of embodiment of the application comprises.
Embodiment
The each embodiment of the application utilizes software wireless access point (SoftAP) function of terminal equipment to set up WLAN (wireless local area network) wifi environment, relate to as the operation of the master terminal of hotspot in a local network and create chatroom (also known as room), wait for that visitor's terminal adds, confirms that visitor's terminal adds, chats and dismiss chatroom etc., the operation of corresponding visitor's terminal relates to search chat room, adds chatroom, wait acknowledge, chat and exit chatroom etc.
By reference to the accompanying drawings the application is described in further detail below by specific embodiment.
Embodiment 1:
As shown in Figure 1, the present embodiment provides a kind of LAN communication method, comprises the steps S11-S15:
Networking step S11, master terminal sets up WLAN (wireless local area network) based on software wireless access point function, and arranges from connecting at least one visitor's terminal as hotspot;
Connection Step S13, master terminal creates chatroom and adds for visitor's terminal;
Communication steps S15, master terminal, after visitor's terminal adds chatroom, carries out communication interaction with visitor's terminal.
Above-mentioned steps S11-S15 is more the operating process embodying master terminal side, and visitor's terminal also exists corresponding operating process, and such as, as shown in Figure 2, the operating process of visitor's end side comprises the steps S21-S25:
Networking step S21, visitor's terminal searching hotspot is to enter WLAN (wireless local area network) by hotspot;
Visitor's Connection Step S23, visitor's terminal adds the chatroom being in master terminal establishment in same WLAN (wireless local area network);
Visitor communication steps S25, visitor's terminal carries out communication interaction with the master terminal be in same described WLAN (wireless local area network) and/or other visitor's terminal after adding chatroom.
Above in each step, master terminal and visitor's terminal can be intelligent terminal in such as mobile phone, clustered paging system or the such as terminal such as PC, PDA, and these terminals need to provide SoftAP function and network enabled communication function.In the following description, master terminal (also known as main frame) represents establishment hotspot and sets up the house-owner of chatroom, and visitor's terminal (also known as client computer) represents in WLAN (wireless local area network) other member connecting hotspot.Below for mobile phone as terminal, specifically describe above steps, wherein mobile phone is provided with android system.
For step S11, master terminal is actually the AP function utilizing Android itself, using the network that the signal of master terminal itself connects as other visitor's terminal.In a kind of specific implementation, create one by the mode of programming and specify ssid(Service Set Identifier, service set identification) hotspot, by reflection the setWifiApEnabled function obtained in Wifimanager just can open hotspot.WifiManager provides most of API that management Wifi connects, such as check configured networked lists, the indivedual record of amendment attribute, foundation or close that wifi network connects, the multidate information of inquiry related network state, the scanning result of access point comprised enough information decide needs and what access point connects, etc.; The function of the enable AP function that setWifiApEnabled function then provides for Wifimanager.Concrete establishment focus with reference to existing relevant android development technique, can not describe in detail at this with the mode opening focus.In addition, the AP released due to same manufacturer generally uses identical ssid, once make a stab, the assailant of illegal link utilizes general initialization string to link wireless network, just very easily set up an illegal link, thus bring threat to wireless network, therefore, the present embodiment is when creating the hotspot of specifying ssid, ssid is encoded, adopts base64 coding here.The thought of base64 coding is that the basic ASCII character character of employing 64 carries out recompile to data, specifically with reference to existing base64 coding techniques, can not describe in detail at this process of ssid coding.
The hotspot arranged for finding master terminal, visitor's terminal needs to open wifi module, the startScan function calling WifiManager starts hot spot scanning, the ssid list scanned is obtained by monitoring android system broadcast, then travel through ssid list and base64 decoding is carried out to ssid, and judge whether the naming rule meeting ssid, if met, then think that hotspot corresponding to this ssid is the hotspot needing to search.
After searching hotspot, visitor's terminal calls addNetwork function by WifiManager, and arranges relevant wifi parameter, such as, specify the focus of ssid, just can be connected to this focus to android system application.Now need to monitor android system broadcast, judge wifi state, connect (connected) if wifi state becomes, and the ssid set during ssid and the addNetwork connected is identical, then think that this visitor's terminal has added in WLAN (wireless local area network) corresponding to this hotspot.
For step S13, be the associative operation after master terminal creates focus, as shown in Figure 3, it comprises following sub-step S131-S137:
Room creates sub-step S131, master terminal obtains local IP address and arranges certainly as transmission control protocol server (tcp server after successfully obtaining, Transmission Control Protocol Server), the foundation of tcp server is considered as creating chatroom;
Due to the diversity of Android device, after receiving the AP_ENABLE notice of android system readjustment, can not ensure that one gets local IP address surely, so master terminal needs retry several times after the failure of acquisition local IP address, such as retry 3 times, every minor tick 1 second.If the local IP address of master terminal also cannot be got after retry several times, then determine to create chatroom failure.Master terminal, after successfully getting local IP address, just can set up tcp server.
Broadcast sub-step S133, User Datagram Protocol (udp, the user data protocol) broadcast in master terminal monitoring wireless local area network (LAN), and respond the udp broadcast received, this udp broadcast sends by visitor's terminal the local IP address obtaining master terminal;
The object monitoring udp broadcast is, after visitor's terminal connects focus, need the IP address finding focus founder (i.e. master terminal), master terminal needs reply IP address and listening port to visitor's terminal of specifying after receiving the inquiry broadcast that visitor's terminal sends.If master terminal is monitored unsuccessfully, then determine that master terminal creates chatroom failure.
Socket sub-step S135, master terminal and visitor's terminal are set up socket (socket) and are connected; That is, after master terminal responds the udp broadcast received, wait for that the socket of visitor's terminal connects and determines whether agree to that visitor's terminal connects.
Room request sub-step S137, what master terminal reception and response visitor terminal were sent adds chatroom request.
Master terminal and visitor's terminal are set up after socket is connected, visitor's terminal send request enter chatroom instruction to master terminal, master terminal determines whether agree to that visitor's terminal enters according to demand.If in advance setting can enter the maximum quantity of visitor's terminal of chatroom, the visitor's terminal entering chatroom when request is greater than this maximum quantity, and it is full that master terminal can reply room, or refuse with other reason, then visitor's terminal enters room failure.
Be more than the associative operation of master terminal after establishment focus, certainly, also there is the associative operation after visitor's terminal is connected to AP accordingly, as shown in Figure 4, it comprises following sub-step S231-S237:
IP obtaining step S231, visitor's terminal obtains the machine IP;
Due to the diversity of Android device, after receiving the AP_ENABLE notice of system readjustment, visitor's terminal can not ensure that one gets local IP address surely, so need to carry out several times retry after the failure of acquisition local IP address, such as retry 3 times, every minor tick 1 second.If also cannot local IP address be got after visitor's terminal retry several times, then determine to enter chatroom failure.
Visitor's Broadcast step S233, visitor's terminal sends udp broadcast with the local IP address obtaining master terminal;
Because visitor's terminal does not know the IP address of master terminal, therefore visitor's terminal obtains IP address and the listening port of master terminal by the mode sending udp broadcast, can directly be returned to visitor's terminal after master terminal receives this broadcast.So, if visitor's terminal does not listen to the packet that master terminal is beamed back in the given time, then think that the IP address of searching master terminal is failed, determine that visitor's terminal enters chatroom failure thus.Here the scheduled time can broadcast by sending every the some time udp and repeated several times is determined, such as, sent a udp broadcast every 5 seconds, does not receive packet that master terminal sends yet and then think and search unsuccessfully after repeating 5 times.
Polite formula meets step S235, and visitor's terminal sends to master terminal and sets up socket connection request;
Behind the IP address finding master terminal and listening port, visitor's terminal can initiate IP address and the listening port that socket is connected to master terminal; If socket connection failure, then add chatroom failure.
Request step S237 between guest room, visitor's terminal sends add chatroom request to setting up master terminal that socket is connected with it.
After visitor's terminal is connected to the socket of master terminal, initiates the request adding chatroom, agree to if master terminal is replied, add chatroom success, if master terminal reply room is full or refuse with other reasons, then visitor's terminal adds chatroom failure.In embodiment, if visitor's terminal adds chatroom success, then master terminal can comprise the information about firms of current chat room at the packet that feedback adheres to chatroom, so that guest machine is known.After master terminal agrees to that visitor's terminal adds chatroom, master terminal and visitor's terminal can start session, namely perform step S15.
For step S15, when master terminal and each visitor's terminal carry out communication interaction, if master terminal is as chat messages promoter, then its coding chat messages, and send the chat messages after coding to visitor's terminal; If master terminal is as chat messages transfer person, then the chat messages received is transmitted in WLAN (wireless local area network) except all visitor's terminals except visitor's terminal of chat messages promoter by it.
After master terminal and visitor's terminal carry out communication interaction, also can perform instruction step, namely master terminal detects and characterizes the activity that visitor's terminal entered or left chatroom, then send instruction to other visitor's terminal in WLAN (wireless local area network), to ensure that other visitor's terminal also can simultaneous display visitor's terminal of newly entering chatroom or visitor's terminal of having left.If master terminal cuts out SoftAp function, then represent and dismiss chatroom, or master terminal all visitor's terminals directly can cut out focus after sending the message of cutting out chatroom in local area network (LAN); And the mode that visitor's terminal also connects by disconnecting socket exits chatroom.In another kind of embodiment, between master terminal and visitor's terminal, disconnection detection can also be carried out by the mode sending heartbeat data packets.
The LAN communication method of the present embodiment provides the mode of the social networks in a kind of rapid foundation among a small circle, SoftAp function is utilized to set up hotspot, other user adds emerge WLAN by connecting this focus, master terminal as hotspot is that numerous visitor terminal uses creates a chatroom, under the permission of master terminal, each visitor's terminal using master terminal as agency, realize the communication interaction between visitor's terminal, by this chatroom, local resource is shared to other user between terminal, its data type related to can comprise word, voice, video, picture etc., can select as required in actual applications, and due to direct point-to-point tcp transmission, compare the mode of traditional Bluetooth transmission or the transmission of networking employing special-purpose software, the present embodiment can guarantee the safety and integrity of quality efficiency and the file transmitted.
Embodiment 2:
Based on embodiment 1, present embodiments provide a kind of LAN communication method so that the concrete communication interaction process in local area network (LAN) between master terminal and visitor's terminal to be described further, can think that the present embodiment is to the step S13 of embodiment 1 and further illustrating of step S23.
In the WLAN (wireless local area network) set up by embodiment 1, the chat messages between each terminal (comprising master terminal and visitor's terminal) can be divided into: plaintext message, formatted text message and non-text media message related to resources.Wherein formatted text can be such as Shenzhen Kuaibo Technology Co., Ltd. provide broadcast dedicated resources in player soon as network address, radar, footprint, bookmark etc., non-text media resource can be the media resource that the data volumes such as such as video, music, picture are larger.
The chat messages transmitted between each terminal during specific implementation can adopt message structure body TTChatMessage to represent, it comprises the information such as thumbnail download path of message content, type of message, resource downloading path and resource.For ease of using between multiple system, the encoding and decoding of the message between each terminal can adopt Protobuf storehouse to realize.Protobuf full name Google ProtoBuffer, it is a set of method of data structure being carried out to serializing developed by Google company, it is lower that its message of encoding takies byte number, when multiple platform uses, do not need to re-define message structure, only need to use relevant instrument proto defined file to be generated the correlative code of corresponding language.In embodiment, do not process the Code And Decode of various message in network layer, but place it in SDK layer and carry out, the various network services in SDK layer are all supported to import a decoder into, when receiving message, are carried out the decode operation of being correlated with by decoder.If business upgrades, only need amendment or replace relevant decoder.
For master terminal, contain the connection of all visitor's terminals in local area network (LAN) in its internal memory, during specific implementation, each connection can abstractly be Connection object, and each Connection object contains the method being sent to the other side by Socket.If chat messages initiated by master terminal, it is message call encoder first, is the binary format of specifying, then travels through Connection list object, send a message to visitor's terminal by TTChatMessage object coding.
For visitor's terminal, chat messages between each visitor's terminal carries out transfer by master terminal, namely the chat messages of each visitor's terminal can only be sent to main frame, after master terminal receives message, message is transmitted to other visitor's terminals all in local area network (LAN), the situation of chat messages initiated by the similar master terminal of pass-through mode, master terminal is first resolved after receiving message, to confirm that this message is for chat messages or instruction class message, if chat messages, then forward this chat messages, certainly, master terminal is when forwarding chat messages, need the promoter getting rid of this chat messages.As shown in Figure 5, it illustrates the trend of chat messages between master terminal and visitor's terminal, now master terminal is as tcp server, and visitor's terminal is tcp client(tcp client).The instruction class message produced between master terminal and visitor's terminal can be comprise: request connection, refusal connect, agreement connects, scan lan device, scan hot spot founder, responding scanning, closedown TCP server, room information response, equipment state change, scan A P founder response, heartbeat packet, equipment enters/withdraws from a room, room is full, dismiss room etc.
Due to non-text media resource as the data volume of picture, Voice & Video etc. is usually larger, therefore, can consider not use the TCP channel of master terminal to send for the transmission relating to this kind of media resource, to avoid the transmission of blocking chat and other message instruction.
The present embodiment is the mode using HTTP PULL to the scheme that this adopts, when type of message is non-text media message related to resources, http(Hyper-Text Transfer Protocol opened by each visitor's terminal or master terminal, HTML (Hypertext Markup Language)) service, to be supplied to the download that other visitor's terminal or master terminal carry out file, now, http server(http server is regarded as) as the visitor's terminal initiating non-text media message related to resources, other terminal is regarded as http client(http client), as shown in Figure 6.
Initiate visitor's terminal (i.e. http-server) of non-text media message related to resources when sending this message, the type of message arranging TTChatMessage field is relevant non-text media resource type (as RES_VIDEO, RES_AUDIO etc.), the thumbnail download path of resource downloading path (being such as the reference address of the machine and http server) and resource is set, then relevant message maps is kept in http service, then as transmission plaintext message, message is sent.
As visitor's terminal of message recipient or master terminal (i.e. http client) upon receiving the message, whether the type of message judging TTChatMessage field is non-text media resource type, if, then the relevant information of this message is joined queue management, and carry out the down operation of non-text media resource in suitable, now the interface of terminal may need the information such as display thumbnail, only needs the thumbnail address by comprising in chat messages to carry out downloading.In the http request header (http head) of http client initiation, the GUID(GUID of this http client oneself is included in embodiment) so that it is which http client is at download file that http-server end is known.
In embodiment, according to demand, can set after the file being more than or equal to pre-sizing (such as 10M) needs user to confirm and just start to carry out download transmission, and the file being less than this pre-sizing does not need user to confirm just can automatically download.
Http-server does not carry out too much management to transmit queue, but mapped resource simply.And http client needs to manage transmit queue, such as each http client is maximum can carry out 1 download, so in the queue management of http client, needs transmit queue to be divided into and automatically downloads queue and wait for that user confirms queue.After the download of user to non-text media resource is made and downloaded and confirm, the relevant information of this download will confirm to remove queue from wait user, and add to and automatically download in queue, even can also as first be downloaded preferentially to download.
The method that the present embodiment provides can allow user under the environment not having wifi to network, utilize SoftAP that focus is set, by setting up chatroom, make user can carry out many people group chat in chatroom, chat content comprises word, picture, music, video, fast sowing, radar, footprint, bookmark etc., the method not only can support sharing of dedicated resources, all right transmission user apk(Android Package, Android installation kit), realize local area network (LAN) video calling, the multiple interaction functions such as game, and the communication of each terminal room still can be kept unobstructed while adopting the mode of http service to realize large files transmission.
Embodiment 3:
The present embodiment provides a kind of master terminal for local area network communication, and this master terminal has SoftAp function, and as shown in Figure 7, this master terminal comprises:
Networking module 11, for setting up WLAN (wireless local area network) based on SoftAp function, and to arrange master terminal be hotspot;
Main link block 13, adds for the visitor's terminal being in same WLAN (wireless local area network) for creating chatroom;
Main communication module 15, carries out communication interaction with visitor's terminal for making master terminal after visitor's terminal adds chatroom.
Further, this main link block 13 comprises:
Room creating unit, for obtaining the local IP address of master terminal, and to arrange master terminal be tcp server after successfully obtaining, and the foundation of this tcp server is considered as creating chatroom;
Main radio unit, for the udp broadcast in monitoring wireless local area network (LAN), and respond the udp broadcast received, udp broadcast is the local IP address being sent to obtain master terminal by visitor's terminal;
Main socket unit, for receive and respond that visitor's terminal sends set up socket connection request;
Main room request unit, for receive and respond set up with it that visitor's terminal that socket is connected sends add chatroom request.
In the master terminal that the present embodiment provides, the function of each module and handling process can see aforesaid embodiments of the method, and it realizes principle and technique effect is similar, does not repeat them here.
Embodiment 4:
The present embodiment provides a kind of visitor's terminal for local area network communication, and as shown in Figure 8, this visitor's terminal comprises:
Networking module 21, for searching for hotspot to enter WLAN (wireless local area network) by hotspot;
Visitor's link block 23, is in for adding the chatroom that in same WLAN (wireless local area network), master terminal creates;
Visitor's communication module 25, for carrying out communication interaction with the master terminal be in same WLAN (wireless local area network) and other visitor's terminal after adding chatroom.
Further, this objective link block 23 comprises:
IP acquiring unit, for obtaining the machine IP of visitor's terminal;
Visitor's radio unit, for sending udp broadcast with the local IP address and the listening port that obtain master terminal;
Polite formula order unit, sets up socket connection request for sending to master terminal;
Request unit between guest room, the master terminal for connecting to built vertical socket sends and adds chatroom request.
In visitor's terminal that the present embodiment provides, the function of each module and handling process can see aforesaid embodiments of the method, and it realizes principle and technique effect is similar, does not repeat them here.
Embodiment 5:
The present embodiment provides a kind of LAN communication system, as shown in Figure 5 or Figure 6, this system comprises as the master terminal of hotspot and at least one visitor's terminal, master terminal and visitor's terminal realize principle and the similar preceding method embodiment of technique effect, repeat no more.
Embodiment 6:
The present embodiment provides a kind of Information Sharing device realized based on terminal, and it comprises:
Mixed-media network modules mixed-media, WLAN (wireless local area network) is set up based on software wireless access point function for making this terminal, and to arrange this terminal be that hotspot enters described WLAN (wireless local area network) for other terminal, or for making this terminal searching hotspot to enter WLAN (wireless local area network) by hotspot;
Chart-room module, creates chatroom for making this terminal and adds chatroom for the terminal be in same local area network (LAN), or for making this terminal add the chatroom created in described local area network (LAN);
Interactive module, carries out information interaction with other terminal for making this terminal in described chatroom.
In the Information Sharing device that the present embodiment provides, the function of each module and handling process can see aforesaid embodiments of the method, and it realizes principle and technique effect is similar, does not repeat them here.
In a kind of specific implementation, this Information Sharing instrument is the application program in terminal, local area network (LAN) chatroom can be set up under the environment not having wifi network by this application program, in chatroom, user can carry out many people group chat, chat content is decided according to the actual requirements, and can comprise such as word, picture, music, video, sow son, radar, footprint, bookmark etc. soon.
Embodiment also can utilize the broadcast mechanism of android system to support the transmission of messages of striding course, make this other third party's module of Information Sharing instrument accessible site, the opal functional module that such as fast Columbia Broadcasting System releases, now Information Sharing instrument needs to provide interface to third party's module.Namely, the Information Sharing instrument of another kind of embodiment also comprises interface module, for providing the information about firms in chatroom to other application program in this terminal, or transmission custom instruction, wherein information about firms comprises the notice that the members list of current all terminals in chatroom and each terminal entered or exited chatroom.This integrated third party's module such as opal initiates inquiry members list instruction by broadcast to Information Sharing instrument, and Information Sharing instrument, after receiving dependent instruction, replys related data to this integrated third party's module by broadcast; Occur after terminal exits the event of chatroom when Information Sharing instrument receives, also can by broadcast by message informing to third party's module.For simplifying the integrated difficulty of third party's plug-in unit, Information Sharing instrument can be made to provide the SDK of standard packaging when realizing.
Based on the efficient local area network (LAN) set up, terminal use can also share more information to other terminal use easily, such as use integrated exclusive opal function, realize the function of a machine shooting, multimachine viewing, share the excellent picture oneself taken in real time to the friend being in chatroom.
And the application program being integrated with Information Sharing instrument can carry out the file transfer across application easily, such as user A has only installed and has broadcast application program soon, and user B has only installed fast object for appreciation application program, owing to broadcasting soon and playing the SDK being all integrated with Information Sharing instrument soon, then can realize the file transfer between broadcasting soon and playing soon.
It will be appreciated by those skilled in the art that, in above-mentioned execution mode, all or part of step of various method can be carried out instruction related hardware by program and completes, this program can be stored in a computer-readable recording medium, and storage medium can comprise: read-only memory, random asccess memory, disk or CD etc.
Above content is the further description done the application in conjunction with concrete execution mode, can not assert that the concrete enforcement of the application is confined to these explanations.For the application person of an ordinary skill in the technical field, under the prerequisite not departing from the application's design, some simple deduction or replace can also be made.

Claims (15)

1. a LAN communication method, is characterized in that, comprising:
Networking step: master terminal sets up WLAN (wireless local area network) based on software wireless access point function, and arrange from connecting at least one visitor's terminal as hotspot;
Connection Step: described master terminal creates chatroom and adds for described visitor's terminal;
Communication steps: described master terminal, after described visitor's terminal adds described chatroom, carries out communication interaction with described visitor's terminal.
2. LAN communication method as claimed in claim 1, it is characterized in that, described Connection Step comprises:
Room creates sub-step: described master terminal obtains local IP address and arranges after successfully obtaining certainly as transmission control protocol server, and the foundation of described transmission control protocol server is considered as creating chatroom;
Broadcast sub-step: the User Datagram Protocol broadcast in described WLAN (wireless local area network) monitored by described master terminal, and the described User Datagram Protocol broadcast that response receives, described User Datagram Protocol broadcast sends the local IP address in order to obtain described master terminal by described visitor's terminal;
Socket sub-step: described master terminal is set up socket with described visitor's terminal and is connected;
Room request sub-step: described master terminal receive and respond that described visitor's terminal sends add chatroom request.
3. LAN communication method as claimed in claim 2, is characterized in that,
Described room creates in sub-step, and the local IP address that predetermined time obtains described master terminal attempted by described master terminal, if do not obtain the local IP address of described master terminal yet after described predetermined time, then determines that described chatroom creates unsuccessfully;
In described broadcast sub-step, if described master terminal does not listen to the broadcast of described User Datagram Protocol, then determine that described chatroom creates unsuccessfully.
4. LAN communication method as claimed in claim 2, it is characterized in that, described Connection Step also comprises:
Described visitor's terminal attempts the local IP address that predetermined number contents obtains described visitor's terminal, if do not obtain the local IP address of described visitor's terminal after described predetermined number contents yet, then determines that described visitor's terminal enters chatroom failure;
And/or the response that described in described visitor's terminal monitoring, master terminal is broadcasted described User Datagram Protocol, if do not listen to described response in the given time, then determines that described visitor's terminal enters chatroom failure;
And/or described visitor's terminal is initiated to be connected with the socket of described master terminal after obtaining the local IP address that returns of described master terminal and port, if connection failure, then determines that described visitor's terminal enters chatroom unsuccessfully;
And/or, if it is characterize room to have expired or the information that refusal adds that described visitor's terminal receives described master terminal to the described response adding chatroom request, then determine that described visitor's terminal enters chatroom failure.
5. LAN communication method as claimed in claim 1, it is characterized in that, described communication steps comprises:
Described master terminal to be encoded chat messages as chat messages promoter, and sends the chat messages after coding at least one visitor's terminal described;
And/or the chat messages received is transmitted in described WLAN (wireless local area network) except all visitor's terminals except visitor's terminal of chat messages promoter as chat messages transfer person by described master terminal.
6. LAN communication method as claimed in claim 5, it is characterized in that, described chat messages comprises the thumbnail download path of message content, type of message, resource downloading path and resource, and described type of message comprises at least one in plaintext message, formatted text message and non-text media message related to resources;
When described type of message is non-text media message related to resources, all visitor's terminals in described master terminal and described local area network (LAN) open HTML (Hypertext Markup Language) service processes, first visitor's terminal as chat messages promoter is set to hypertext transfer protocol server, described chat messages maps to be kept in HTML (Hypertext Markup Language) service and sends by it, HTML (Hypertext Markup Language) client is set to as the master terminal of chat messages recipient or second visitor's terminal, it is after receiving described chat messages, non-text media message related to resources in described chat messages is added queue management.
7. LAN communication method as claimed in claim 6, it is characterized in that, queue in queue management is divided into by described HTML (Hypertext Markup Language) client automatically downloads queue and waits for that user confirms to download queue, non-text media resource corresponding to the non-text media message related to resources in described automatic download queue is less than pre-sizing, and the non-text media resource that described wait user confirms to download non-text media message related to resources in queue corresponding is more than or equal to pre-sizing; The GUID of self is comprised in the hypertext transfer protocol requests that described HTML (Hypertext Markup Language) client is initiated to described hypertext transfer protocol server.
8. LAN communication method as claimed in claim 1, is characterized in that, also comprise:
Instruction step: described master terminal monitors and characterizes the activity that described visitor's terminal entered or left described chatroom, and it is movable not disconnect in described WLAN (wireless local area network) described in the visitor's terminal notifying be connected with described master terminal.
9., for a master terminal for local area network communication, described master terminal has software wireless acceptance point function, it is characterized in that, described master terminal comprises:
Networking module, for setting up WLAN (wireless local area network) based on described software wireless access point function, and to arrange described master terminal be hotspot;
Main link block, adds at least one visitor's terminal being in same described WLAN (wireless local area network) for creating chatroom;
Main communication module, for carrying out communication interaction with described visitor's terminal after described visitor's terminal adds described chatroom.
10. master terminal as claimed in claim 9, it is characterized in that, described main link block comprises:
Room creating unit, for obtaining the local IP address of described master terminal, and to arrange described master terminal be transmission control protocol server after successfully obtaining, and the foundation of described transmission control protocol server is considered as creating chatroom;
Main radio unit, for monitoring the User Datagram Protocol broadcast in described WLAN (wireless local area network), and the described User Datagram Protocol broadcast that response receives, described User Datagram Protocol broadcast sends the local IP address in order to obtain described master terminal by described visitor's terminal;
Main socket unit, for receive and respond that described visitor's terminal sends set up socket connection request;
Main room request unit, for receive and respond that described visitor's terminal that built vertical socket connects sends add chatroom request.
11. 1 kinds, for visitor's terminal of local area network communication, is characterized in that, comprising:
Networking module, for searching for hotspot to be entered the WLAN (wireless local area network) at described hotspot place by described hotspot;
Visitor's link block, is in for adding the chatroom that in same described WLAN (wireless local area network), master terminal creates;
Visitor's communication module, for carrying out communication interaction with the described master terminal be in same described WLAN (wireless local area network) and other visitor's terminal after adding described chatroom.
12. visitor's terminals as claimed in claim 11, it is characterized in that, described objective link block comprises:
IP acquiring unit, for obtaining the machine IP of described visitor's terminal;
Visitor's radio unit, for sending User Datagram Protocol broadcast with the local IP address and the port that obtain described master terminal;
Polite formula order unit, sets up socket connection request for sending to described master terminal;
Request unit between guest room, the master terminal for connecting to built vertical socket sends and adds chatroom request.
13. 1 kinds of LAN communication system, is characterized in that, comprising: the master terminal as described in claim 9 or 10 and at least one visitor's terminal as described in claim 11 or 12.
14. 1 kinds of Information Sharing devices realized based on terminal, is characterized in that, comprising:
Mixed-media network modules mixed-media, WLAN (wireless local area network) is set up based on software wireless access point function for making described terminal, and to arrange described terminal be that hotspot enters described WLAN (wireless local area network) for other terminal, or for making described terminal searching hotspot to enter WLAN (wireless local area network) by described hotspot;
Chart-room module, creates chatroom for making described terminal and adds chatroom for the terminal be in same local area network (LAN), or for making described terminal add the chatroom created in described local area network (LAN);
Interactive module, carries out information interaction with other terminal for making described terminal in described chatroom.
15. Information Sharing devices as claimed in claim 14, is characterized in that, also comprise:
Interface module, for sending custom instruction to the application program in described terminal or providing information about firms in described chatroom, described information about firms comprises the notice that the list of current terminal in described chatroom and terminal entered or exited described chatroom.
CN201310576444.5A 2013-11-15 2013-11-15 Local area network communication method, system and terminal, and information sharing device Pending CN104661191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310576444.5A CN104661191A (en) 2013-11-15 2013-11-15 Local area network communication method, system and terminal, and information sharing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310576444.5A CN104661191A (en) 2013-11-15 2013-11-15 Local area network communication method, system and terminal, and information sharing device

Publications (1)

Publication Number Publication Date
CN104661191A true CN104661191A (en) 2015-05-27

Family

ID=53251783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310576444.5A Pending CN104661191A (en) 2013-11-15 2013-11-15 Local area network communication method, system and terminal, and information sharing device

Country Status (1)

Country Link
CN (1) CN104661191A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954575A (en) * 2015-06-24 2015-09-30 惠州Tcl移动通信有限公司 Inter-mobile-terminal use scene control method and system
CN105208014A (en) * 2015-08-31 2015-12-30 腾讯科技(深圳)有限公司 Voice communication processing method, electronic device and system
CN105451161A (en) * 2015-11-06 2016-03-30 上海斐讯数据通信技术有限公司 Method and system for realizing file sharing based on built-in base station way of android phone
CN106454766A (en) * 2016-09-27 2017-02-22 盐城工学院 Real-time cooperation data sharing system based on Android system and Wi-Fi Direct
CN106550493A (en) * 2016-10-27 2017-03-29 青岛海信移动通信技术股份有限公司 A kind of media resource sharing method and mobile terminal
CN106713976A (en) * 2016-12-29 2017-05-24 上海聚力传媒技术有限公司 Stream media playing method based on android mobile terminal
WO2018103447A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Method and device for enabling wi-fi/hotspot
CN109327510A (en) * 2018-09-13 2019-02-12 上海宇佑船舶科技有限公司 Ship social contact method, device, electronic equipment and readable storage medium storing program for executing
CN109379424A (en) * 2018-10-12 2019-02-22 四川长虹电器股份有限公司 Multiple terminals resource introduction method
CN110971506A (en) * 2019-11-06 2020-04-07 厦门亿联网络技术股份有限公司 Decentralized real-time cluster communication method, device, equipment and system
CN113709142A (en) * 2021-08-26 2021-11-26 深圳小佳科技有限公司 Hotspot network distribution method and device, intelligent terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100040033A1 (en) * 2008-08-14 2010-02-18 Texas Instruments Incorporated Reverse direction grant (rdg) for wireless network technologies subject to coexistence interference
CN102201846A (en) * 2011-05-27 2011-09-28 珠海市魅族科技有限公司 Wireless data transmission system and method based on soft AP (access point) technology
TW201204151A (en) * 2010-07-15 2012-01-16 Acer Inc Method for quickly establishing a wireless link
CN102882938A (en) * 2012-09-10 2013-01-16 广东欧珀移动通信有限公司 Data share method and mobile terminal
CN102932745A (en) * 2012-09-07 2013-02-13 佳都新太科技股份有限公司 Personal multimedia broadcasting system based on mobile WIFI (Wireless Fidelity) hotspot
CN102932958A (en) * 2011-08-12 2013-02-13 中兴通讯股份有限公司 Method, device and system for real-time data sharing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100040033A1 (en) * 2008-08-14 2010-02-18 Texas Instruments Incorporated Reverse direction grant (rdg) for wireless network technologies subject to coexistence interference
TW201204151A (en) * 2010-07-15 2012-01-16 Acer Inc Method for quickly establishing a wireless link
CN102201846A (en) * 2011-05-27 2011-09-28 珠海市魅族科技有限公司 Wireless data transmission system and method based on soft AP (access point) technology
CN102932958A (en) * 2011-08-12 2013-02-13 中兴通讯股份有限公司 Method, device and system for real-time data sharing
CN102932745A (en) * 2012-09-07 2013-02-13 佳都新太科技股份有限公司 Personal multimedia broadcasting system based on mobile WIFI (Wireless Fidelity) hotspot
CN102882938A (en) * 2012-09-10 2013-01-16 广东欧珀移动通信有限公司 Data share method and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡明庆、高巍、钟梅: "《操作系统教程与实验》", 31 January 2007, 清华大学出版社 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954575A (en) * 2015-06-24 2015-09-30 惠州Tcl移动通信有限公司 Inter-mobile-terminal use scene control method and system
CN105208014A (en) * 2015-08-31 2015-12-30 腾讯科技(深圳)有限公司 Voice communication processing method, electronic device and system
CN105208014B (en) * 2015-08-31 2018-09-25 腾讯科技(深圳)有限公司 A kind of voice communication processing method, electronic equipment and system
US10412227B2 (en) 2015-08-31 2019-09-10 Tencent Technology (Shenzhen) Company Limited Voice communication processing method and system, electronic device, and storage medium
CN105451161B (en) * 2015-11-06 2019-09-13 上海斐讯数据通信技术有限公司 File sharing method and system are realized based on Android mobile phone built in base station mode
CN105451161A (en) * 2015-11-06 2016-03-30 上海斐讯数据通信技术有限公司 Method and system for realizing file sharing based on built-in base station way of android phone
CN106454766A (en) * 2016-09-27 2017-02-22 盐城工学院 Real-time cooperation data sharing system based on Android system and Wi-Fi Direct
CN106550493A (en) * 2016-10-27 2017-03-29 青岛海信移动通信技术股份有限公司 A kind of media resource sharing method and mobile terminal
CN106550493B (en) * 2016-10-27 2022-03-11 青岛海信移动通信技术股份有限公司 Media resource sharing method and mobile terminal
WO2018103447A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Method and device for enabling wi-fi/hotspot
CN106713976A (en) * 2016-12-29 2017-05-24 上海聚力传媒技术有限公司 Stream media playing method based on android mobile terminal
CN109327510A (en) * 2018-09-13 2019-02-12 上海宇佑船舶科技有限公司 Ship social contact method, device, electronic equipment and readable storage medium storing program for executing
CN109327510B (en) * 2018-09-13 2022-03-01 上海宇佑船舶科技有限公司 Ship social contact method and device, electronic equipment and readable storage medium
CN109379424A (en) * 2018-10-12 2019-02-22 四川长虹电器股份有限公司 Multiple terminals resource introduction method
CN110971506A (en) * 2019-11-06 2020-04-07 厦门亿联网络技术股份有限公司 Decentralized real-time cluster communication method, device, equipment and system
CN113709142A (en) * 2021-08-26 2021-11-26 深圳小佳科技有限公司 Hotspot network distribution method and device, intelligent terminal and storage medium
CN113709142B (en) * 2021-08-26 2023-06-23 深圳小佳科技有限公司 Hot spot distribution network method and device, intelligent terminal and storage medium

Similar Documents

Publication Publication Date Title
CN104661191A (en) Local area network communication method, system and terminal, and information sharing device
US11051359B2 (en) Managing MBMS membership at the service capability exposure function
JP5102364B2 (en) Selective review of bundled messages sent from wireless communication devices
CN110312160A (en) Wireless screen projection method and device, intelligent panel, terminal and system
RU2436245C2 (en) System and method for implementing mbms handover during downloaded delivery
US11233817B2 (en) Methods and apparatus for end device discovering another end device
US10284494B2 (en) Device controlling method, client, server and intermediate device
US20130022033A1 (en) Method and terminal for access control of network service
US9781579B2 (en) Method and device for realizing terminal WIFI talkback
US20180048633A1 (en) Perception-free authentication method and system, and control method and system based on the same
CN113079555B (en) Network resource sharing method and related device
CN104641599B (en) Method and system for delayed notification in a communication network
US8825096B2 (en) Method and apparatus for enabling voice discussions among independent and simultaneous users of data content
US10425812B2 (en) Method and apparatus for establishment of private communication between devices
CN103888488A (en) Method for sharing data based on WIFI
CN104410982B (en) Terminal polymerization and reconstructing method in a kind of Wireless Heterogeneous Networks
CN104584490A (en) Data transmitting method and device
CN104106252A (en) P2p streaming support
US11979247B2 (en) Message forwarding method and apparatus
CN103648056A (en) Point-to-point transmission method and apparatus for smart television
WO2018196463A1 (en) Method and apparatus for network access, storage medium, and processor
Belblidia et al. Epics: Fair opportunistic multi-content dissemination
WO2013185682A1 (en) Method and system for sending and receiving multimedia message
CN114666846A (en) Communication method and gateway equipment
WO2021208059A1 (en) Connection establishment method and apparatus, device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned

Effective date of abandoning: 20190903

AD01 Patent right deemed abandoned