CN106454766A - Real-time cooperation data sharing system based on Android system and Wi-Fi Direct - Google Patents
Real-time cooperation data sharing system based on Android system and Wi-Fi Direct Download PDFInfo
- Publication number
- CN106454766A CN106454766A CN201610856195.9A CN201610856195A CN106454766A CN 106454766 A CN106454766 A CN 106454766A CN 201610856195 A CN201610856195 A CN 201610856195A CN 106454766 A CN106454766 A CN 106454766A
- Authority
- CN
- China
- Prior art keywords
- direct
- data
- socket
- module
- client
- 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
Links
- 238000004891 communication Methods 0.000 claims abstract description 48
- 230000005540 biological transmission Effects 0.000 claims abstract description 25
- 238000000034 method Methods 0.000 claims description 20
- 238000012544 monitoring process Methods 0.000 claims description 12
- 230000008859 change Effects 0.000 claims description 7
- 206010008190 Cerebrovascular accident Diseases 0.000 claims description 5
- 208000006011 Stroke Diseases 0.000 claims description 5
- 230000013011 mating Effects 0.000 claims description 4
- 230000006870 function Effects 0.000 description 22
- 238000005516 engineering process Methods 0.000 description 6
- 230000003993 interaction Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 101000666098 Homo sapiens WAP four-disulfide core domain protein 12 Proteins 0.000 description 1
- 102100038089 WAP four-disulfide core domain protein 12 Human genes 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 239000012467 final product Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 239000011800 void material Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
- H04W4/10—Push-to-Talk [PTT] or Push-On-Call services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/436—Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
- H04N21/4363—Adapting the video stream to a specific local network, e.g. a Bluetooth® network
- H04N21/43637—Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q5/00—Selecting arrangements wherein two or more subscriber stations are connected by the same line to the exchange
- H04Q5/24—Selecting arrangements wherein two or more subscriber stations are connected by the same line to the exchange for two-party-line systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a real-time cooperation data sharing system based on an Android system and Wi-Fi Direct. The real-time cooperation data sharing system comprises a Wi-Fi Direct module which is used for carrying out device search and matching connection and management through Wi-Fi Direct; a Socket communication module which is used for carrying out data transmission based on a socket of a TCP protocol between connected devices; a real-time video module which is used for sending and receiving real-time video images through a TCP/IP network communication protocol in the devices which are in successful matching connection; and an audio intercom module which is used for sending and receiving voice information through the TCP/IP network communication protocol in the devices which are in successful matching connection. The other devices can be searched in a relatively wide working range, and peer to peer connection can be established independent of a mobile signal or a wireless hotspot. After the connection is established, the devices can transmit the real-time video images and share real-time cooperation data of an audio intercom function.
Description
Technical field
The invention belongs to data communication field, more particularly to a kind of based on android system and Wi-Fi Direct
Live collaboration data-sharing systems.
Background technology
Android device has higher popularity rate at present, and because the portability of its own makes people
More convenient in the cooperation producing and live.However, in bad border for field or industrial environment, because mobility etc. is former
Cause, we are not easy WLAN to cover in whole working environment, the situation that mobile phone movable signal is shielded in the wild
Under be then more difficult to be exchanged.
For example there is cluster of tourists missing in more remote mountain area, lost contact people separately finds in the scouting team of urgent composition
Member, but now do not have mobile phone signal or other communication tools, the personnel being distributed in wide area cannot be timely
Information communication and task are assigned.
Or be in the industrial environment in a piece of big region, several workmens be responsible for one need collaborative complete appoint
Business, but now there is no mobile phone signal and wireless network, due to relatively far apart it is impossible to timely link up.
Therefore we need not can connect in the case that in the Internet, movable signal also cannot obtain simultaneously, by me
Intelligent movable equipment such as mobile phone etc. carry out convenient communication for information immediately.
Wi-Fi Direct communication protocol refers to that permission equipment need not pass through wireless router or mobile data network
Get final product peer to peer connection.The equipment after peer to peer connection of setting up such as can carry out data transmission at the other functions, by rational setting number
Interaction mechanism according to the data flow between form and flexible Android device and controlling stream, it is possible to achieve the sound that equipment collects
Flexibly the sharing of video data.It is with Bluetooth technology identical place, this agreement allows wireless device mutual in the form of P2P
Connect, but the bluetooth that compares is substantially improved in transmission speed and transmission range.As can be seen here, it is not based on base in middle distance
In the radio communication of the plinth network facilities, Wi-Fi Direct has more preferable application prospect.
Content of the invention
For above-mentioned technical problem, the present invention seeks to:There is provided a kind of based on android system and Wi-Fi Direct
Live collaboration data-sharing systems are so that user can search other equipment in efficient working range and set up equity even
Connect, set up the process connecting and need not rely on movable signal or hotspot.After connection establishment, permissible between equipment
Carry out the live collaboration data sharing of real-time video picture transmission and audio frequency intercommunication function.
The technical scheme is that:
A kind of live collaboration data-sharing systems based on android system and Wi-Fi Direct are it is characterised in that include:
Wi-Fi Direct module, carries out equipment search by Wi-Fi Direct and is connected and manages with mating;
Socket communication module, is carried out data transmission based on the socket of Transmission Control Protocol for the equipment room in connection;
Real-time video module, for, in the equipment that connects in successful match, being sent and received by TCP/IP network communication protocol
Real time video image;
Voice talk module, for, in the equipment that connects in successful match, being sent and received by TCP/IP network communication protocol
Voice messaging.
Preferably, described Wi-Fi Direct module includes:
Wi-Fi Direct starting module, the Wi-Fi of page jump to system is arranged interface, beats on or off for setting
Close;
Wi-Fi Direct search module, after opening Wi-Fi Direct, one on-air monitor audiomonitor of registration is current
Connection status and facility information and neighbouring available devices show in lists, when equipment current information change when, touch
Send out event corresponding;
Wi-Fi Direct link block, sets up peer to peer connection group by calling corresponding api function to be attached request, builds
Server end and client is established during vertical group.
Preferably, the communication of described Socket communication module includes server end Socket communication and client Socket is led to
Letter, described server end Socket communication includes:
A) create server S ocket instance objects to be used for monitoring the port setting;
B) create a thread to be used for monitoring the connection request of client, wait client to connect;
C) after being successfully established connection, the data being read out and write;
Described client Socket communication includes:
1)Create client Socket instance objects, setting network address and port numbers are specifying the service of corresponding server end
Device Socket instance objects;
2)It is actively connected to the Socket of service end;
3)After being successfully established connection, the data being read out and write.
Preferably, described real-time video module includes:
Image capture module, obtains the present image of photographic head by the onPreviewFrame () overload function of Android,
Image is compressed and cutting, is converted into file thread apoplexy due to endogenous wind transport format data, send view data;
Image display, after receiving view data, is decoded to view data reducing, is shown by image shows assembly
Image.
Preferably, described voice talk module includes:
Audio collection module, the instance objects creating audio recording are used for recording setting, start, according to trigger event, thread of recording,
And the audio-frequency information of collection is stored in buffer relief area, the audio-frequency information of collection is entered according to trigger event by transmitting thread
Row sends;
Audio playing module, the instance objects creating audio setting are configured to parameter when playing, and group thread gets
After the voice data receiving, by corresponding api function method, the content getting is play with audio form.
The present invention discloses a kind of live collaboration data sharing side based on android system and Wi-Fi Direct again
Method is it is characterised in that comprise the following steps:
S01:Carry out equipment search by Wi-Fi Direct to be connected and manage with mating;
S02:Carried out data transmission based on the socket of Transmission Control Protocol in the equipment room of connection;
S03:Successful match connect equipment in, by TCP/IP network communication protocol send and receive real time video image and
Voice messaging.
Preferably, described step S01 includes:
The Wi-Fi of page jump to system is arranged interface, opens for setting or close;
After opening Wi-Fi Direct, the current connection status of one on-air monitor audiomonitor of registration and facility information are simultaneously
Neighbouring available devices are shown in lists, when the current information of equipment changes, triggers corresponding event;
Set up peer to peer connection group by calling corresponding api function to be attached request, during setting up group, establish clothes
Business device end and client.
Preferably, described step S02 includes server end Socket communication and the communication of client Socket, described server
End Socket communication includes:
A) create server S ocket instance objects to be used for monitoring the port setting;
B) create a thread to be used for monitoring the connection request of client, wait client to connect;
C) after being successfully established connection, the data being read out and write;
Described client Socket communication includes:
1)Create client Socket instance objects, setting network address and port numbers are specifying the service of corresponding server end
Device Socket instance objects;
2)It is actively connected to the Socket of service end;
3)After being successfully established connection, the data being read out and write.
Preferably, described step S03 includes:
Obtain the present image of photographic head by the onPreviewFrame () overload function of Android, image is compressed
And cutting, it is converted into file thread apoplexy due to endogenous wind transport format data, send view data;
After receiving view data, view data is decoded reduce, by image shows assembly display image;
The instance objects creating audio recording are used for recording setting, start thread of recording, and the sound collection according to trigger event
Frequency information is stored in buffer relief area, is transmitted the audio-frequency information of collection according to trigger event by transmitting thread;
The instance objects creating audio setting are configured to parameter when playing, and group thread gets the audio frequency number receiving
According to rear, by corresponding api function method, the content getting is play with audio form.
Compared with prior art, it is an advantage of the invention that:
1st, using the mobile device of Wi-Fi Direct technology do not need by WLAN or GPRS base station etc. other
Infrastructure network it is not required that by netting twine by equipment limit on the router or Centroid of a fixation, Wi-Fi
Direct equipment can carry out peer to peer connection whenever and wherever possible.
2nd, can simply and easily equipment discovery feature.It is right to be searched for using the mobile device of Wi-Fi Direct technology
Deng equipment, the facility information in efficient working range is displayed, user can easily select to want connect to set simultaneously
Standby.
3rd, the connection of Wi-Fi Direct equipment is simple and safety.Because Wi-Fi Direct equipment uses peace
The WPS mechanism of tall and erect equipment, so accordingly simplify the process setting up connection between peer device.
4th, the data-transmission mode using P2P of Wi-Fi Direct equipment because without access wireless network, from
And avoid the obstruction of passage.
5th, have a extensive future, following increasing equipment can use android system, such as mobile phone, camera, display
Device and printer etc..Communication mode by Wi-Fi Direct a, it is possible to use smart mobile phone is not having wireless local
Carry out data interaction with other smart machines of surrounding in the case of net.Such as, passed through with printer by intelligent movable mobile phone
Wi-Fi Direct is interconnected, and can very easily print photo or document in our mobile phones;Again such as, in office
In room, employee can interconnect to carry out the literary compositions such as committee paper or video/audio by the mobile device based on Wi-Fi Direct
The transmission of part.The release of Wi-Fi Direct standard, provides for aspects such as following intelligent movable office, smart home life
Very big help.
Brief description
Below in conjunction with the accompanying drawings and embodiment the invention will be further described:
Fig. 1 is the hierarchical structure based on the live collaboration data-sharing systems of android system and Wi-Fi Direct for the present invention
Figure;
Fig. 2 is the modular structure based on the live collaboration data-sharing systems of android system and Wi-Fi Direct for the present invention
Figure;
Fig. 3 is the monitoring flow chart of radio receiver of the present invention;
Fig. 4 is present device search routine figure;
Fig. 5 is image-receptive flow chart of the present invention.
Specific embodiment
For making the object, technical solutions and advantages of the present invention of greater clarity, with reference to specific embodiment and join
According to accompanying drawing, the present invention is described in more detail.It should be understood that these descriptions are simply exemplary, and it is not intended to limit this
Bright scope.Additionally, in the following description, eliminate the description to known features and technology, to avoid unnecessarily obscuring this
The concept of invention.
Embodiment:
The present embodiment can be configured to Wi-Fi with Android Intelligent mobile equipment, every equipment, then starts to search for
Available peer device simultaneously shows in available devices list.After user selects to want the equipment connecting to click on connection button
System sends connection request, can set up peer to peer connection after the equipment confirmation receiving connection request.
System can make the equipment just in connection procedure form a group, and system is determined by GroupOwner negotiation algorithm
Server end and client.
The system of the present invention can be divided into four levels, as shown in figure 1, including the boundary layer that user directly operates(UI layer)、
The driving layer of the logical layer of Business Processing, the communication layers of data interaction and equipment bottom.Every layer of function is specific as follows:
A) boundary layer(UI layer):User passes through boundary layer(UI layer)Directly interact, by being operated accordingly with system
It is sent to request to logical layer, logical layer is made corresponding differential responses and then is shown on interface, completes user and software is entered
The process of row operation.
B) logical layer:The operation requests different to user are processed and are responded, and are carried out by different api function storehouses
Corresponding operation, realizes system and the interaction of user.
C) communication layers:Realize the information data interaction of equipment room, i.e. search, connection, view data and voice data etc..
D) drive layer:The correlation technique of this layer of Wi-Fi Direct mainly realizing system is supported, is the application journey of bottom
Sequence provides api function interface etc..
The system is designed by Socket socket and using Wi-Fi Direct technology, as shown in Fig. 2 the present invention
Including four modules, respectively real-time video module, voice talk module, Socket communication module and Wi-Fi Direct mould
Block, each module particular content is as follows:
A) real-time video module:In equipment after successful match connects, it is current that user can transmit oneself photographic head with other side
Picture, also or the real-time pictures of other side can be accepted.
B) voice talk module:In equipment after successful match connects, user can carry out speech talkback, realizes handing over
Stream cooperation.
C) Socket communication module:Realize providing network service to connect for above-mentioned systemic-function by Socket socket
Mouthful.
D) Wi-Fi Direct module:System is connected with coupling by the search that Wi-Fi Direct completes equipment, even
Connect after being successfully established, carry out other functional realiey.
Wi-Fi Direct module is the nucleus module of system, by the hardware supported of bottom and the function interface of API is
Communication based on Socket provides technical support below.Wi-Fi Direct module includes following module:
1) Wi-Fi Direct starting module
After user opens program, if equipment does not give tacit consent to unlatching Wi-Fi Direct function, the operation of user for convenience
Experience, when needing to open Wi-Fi Direct function choosing-item, jumps directly to the Wi-Fi setting of system by button
Interface, user can directly select and open or the off option, be then back to program interface.
2) Wi-Fi Direct search module
After user opens Wi-Fi Direct function, by registering an on-air monitor come the current connection of audiomonitor
Neighbouring available devices, state, facility information etc. simultaneously show that in lists, when the current information of equipment changes, triggering is corresponding
Event.
3) Wi-Fi Direct link block
After user searches neighbouring attachable peer device, user can select to want the equipment connecting to be attached.
Now, set up peer to peer connection group by calling corresponding api function to be attached request, establish during setting up group
Server end and client.The process that equipment connects uses WPS(Wi-Fi Protected Setup)Mechanism,
Three kinds of WPS are had in android system:PIN(Personal Information Number)Pattern, is set up by 4 or 8 digits
Connect;PBC(Push Button Configuration)Pattern, confirms to set up connection by clicking on button;WAP2 encrypts mould
Formula, is set up by security password and connects.
The realization of Wi-Fi Direct include initialize Wi-Fi Direct, monitor Wi-Fi Direct state, search right
Deng equipment and connection peer device.
Initialization Wi-Fi Direct
A) System Privileges are obtained
Android application program must be provided with ability after the authority of application program in AndroidManifest.xml file
Enough using relevant interface function and the other equipment hardware access right of Wi-Fi Direct.
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE">
</uses-permission>
Above-mentioned code just adds the authority that APP accesses Wifi state, also needs to add shooting picture video simultaneously, accesses completely
WLAN, the reading authority such as mobile phone state and identity.Afterwards when set up applications, system can show the power that needs are used
Limit and confirm to install.
B) initialize
One WifiP2pManager instance objects of establishment in the main Activity of application program, by corresponding Wi-Fi
The current application program of Direct interface function registration.Application program carries out Wi-Fi by WifiP2pManager system service
The connection of Direct and management, return a WifiP2pManager.Channel object after successful registration, this two parameters are
All it is passed to the radio receiver of system creation afterwards.The action audiomonitor of one WifiP2pManager of system creation, passes through
Broadcast Intent obtains the action return value that WifiP2pManager is associated.Main code is as follows:
// represent that Wi-Fi peer-to-peer network state there occurs change
intentFilter.addAction(WifiP2pManager.WIFI_P2P_STATE_CHANGED_ACTION);
// represent that the list of available equity point there occurs change
intentFilter.addAction(WifiP2pManager.WIFI_P2P_PEERS_CHANGED_ACTION);
// represent that the connection status of Wi-Fi peer-to-peer network there occurs change
intentFilter.addAction(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_
ACTION);
// device configuration information there occurs change
intentFilter.addAction(WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_
ACTION);
C) Wi-Fi Direct radio receiver
In the main Activity of system, registration Wi-Fi Direct radio receiver simultaneously will be in onDestroy () method
Face this radio receiver main.Main code is as follows:
// registration wifi broadcast recipients
receiver = new WiFiDirectBroadcastReceiver();
registerReceiver(receiver, intentFilter);
// cancel wifi broadcast recipients
protected void onDestroy() {
super.onDestroy();
unregisterReceiver(receiver);
}.
Monitor Wi-Fi Direct state
A) create radio receiver, for monitoring corresponding event and being responded.
Registration WifiP2pManager and the wherein instance object of Channel first, then create a broadcast reception
Device.
B) in radio receiver, function operation is carried out thus realizing snoop responses to specific purpose.Idiographic flow such as Fig. 3
Shown.
Search peer device
After user presses search button, system can broadcast coupling purpose, after program receives this purpose, calls corresponding method
The equipment list that just can obtain.Idiographic flow is as shown in Figure 4.
Connect peer device
User clicks on the equipment that can connect in list and is attached, and needs to call the connect () side in Wi-Fi Direct
Method, and the relevant information of equipment is saved in WifiP2pConfig object.
Equipment after being successfully connected is communicated by Socket the data transfer to carry out between equipment.Socket communication is clothes
Communication between business device and client, Socket communication module is socket based on the Transmission Control Protocol biography to carry out real-time pictures
The defeated transmission with voice data.It is divided into Socket two parts of communication that the Socket of server end communicates with client.
First, the Socket communication of service end includes:
A) create ServerSocket instance objects to be used for monitoring the port setting.
B) create a thread to be used for monitoring the connection request of client, wait client actively to connect.
C) after being successfully established connection, data is read by Input Stream, data is write by Output Stream.
Secondly, the Socket communication of client includes:
A) create the instance objects of client Socket, set the network address and port numbers to specify corresponding service end
ServerSocket.
B) it is actively connected to the Socket of service end.
C) after being successfully established connection, data is read by Input Stream, data is write by Output Stream.
Real-time video module is used for obtaining the real-time pictures of current photographic head and being transmitted.Real-time video module is to set up
On the basis of the connection of server and client side, it is broadly divided into three parts:The collection of image, the transmission of data and image
Display.Individually below three parts are introduced.
A) image acquisition
The present image of photographic head is obtained by the onPreviewFrame () overload function of Android, parameter byte [] is
One of this function important parameter, content is the realtime image data of photographic head, and then system uses YuvImage method
Picture file can be converted this data to, system just can be compressed and cutting to this picture afterwards, and picture is pressed
It is converted into the ByteArrayOutputStream data of file thread apoplexy due to endogenous wind needs, then starting transmission thread will after contracting conversion
View data is sent to other side.
B) data transfer
After user is successfully established Socket connection, after clicking the beginning transmission button triggering click time, log-on data transmission
Thread.Sender sends data to recipient by OutputStream, and recipient is then obtained by the Socket of sender
Corresponding InputStream, reads byte stream therein, is then presented in image shows assembly by corresponding data convert
In.
C) image shows
Recipient, after receiving the data that sender is transmitted, is reduced to decoding data, will be received by surfaceview assembly
To image be shown on screen, main flow is as shown in Figure 5.
Voice talk module is mainly responsible for the function of real-time speech communicating.Voice talk module is also set up in service
On the basis of the connection of device and client, it is broadly divided into three parts:The broadcasting of the collection of voice data, the transmission of data and audio frequency
Put.Individually below three parts are introduced.
A) collection of audio frequency
The instance objects needing to create an AudioRecord before recording starts to carry out the recording setting of correlation.In user
Press record button triggering click event after start record thread, system pass through start Recording () start record and
The audio frequency collecting is deposited in buffer relief area, then audio-frequency information will be collected by transmission thread and be sent to other side
Equipment.Trigger corresponding event after user's release button to terminate to record and start transmission thread.
B) data transfer
Similar with video pictures transmission, received by the transmission that OutputStream and InputStream carries out data flow.
C) broadcasting of audio frequency
System broadcasting to carry out audio frequency by the AudioTrack class of Android.By creating an AudioTrack example
Object is simultaneously arranged accordingly to parameter when playing.After group thread gets the data receiving, by corresponding API
The content getting is play in the form of audio frequency by functional based method, thus allowing user hear the voice messaging of other side.
It should be appreciated that the above-mentioned specific embodiment of the present invention is used only for exemplary illustration or explains the present invention's
Principle, and be not construed as limiting the invention.Therefore, that is done in the case of without departing from the spirit and scope of the present invention is any
Modification, equivalent, improvement etc., should be included within the scope of the present invention.Additionally, claims purport of the present invention
Covering the whole changes falling in scope and border or the equivalents on this scope and border and repair
Change example.
Claims (9)
1. a kind of live collaboration data-sharing systems based on android system and Wi-Fi Direct are it is characterised in that wrap
Include:
Wi-Fi Direct module, carries out equipment search by Wi-Fi Direct and is connected and manages with mating;
Socket communication module, is carried out data transmission based on the socket of Transmission Control Protocol for the equipment room in connection;
Real-time video module, for, in the equipment that connects in successful match, being sent and received by TCP/IP network communication protocol
Real time video image;
Voice talk module, for, in the equipment that connects in successful match, being sent and received by TCP/IP network communication protocol
Voice messaging.
2. the live collaboration data-sharing systems based on android system and Wi-Fi Direct according to claim 1,
It is characterized in that, described Wi-Fi Direct module includes:
Wi-Fi Direct starting module, the Wi-Fi of page jump to system is arranged interface, beats on or off for setting
Close;
Wi-Fi Direct search module, after opening Wi-Fi Direct, one on-air monitor audiomonitor of registration is current
Connection status and facility information and neighbouring available devices show in lists, when equipment current information change when, touch
Send out event corresponding;
Wi-Fi Direct link block, sets up peer to peer connection group by calling corresponding api function to be attached request, builds
Server end and client is established during vertical group.
3. the live collaboration data-sharing systems based on android system and Wi-Fi Direct according to claim 2,
It is characterized in that, the communication of described Socket communication module includes server end Socket communication and the communication of client Socket,
Described server end Socket communication includes:
A) create server S ocket instance objects to be used for monitoring the port setting;
B) create a thread to be used for monitoring the connection request of client, wait client to connect;
C) after being successfully established connection, the data being read out and write;
Described client Socket communication includes:
1)Create client Socket instance objects, setting network address and port numbers are specifying the service of corresponding server end
Device Socket instance objects;
2)It is actively connected to the Socket of service end;
3)After being successfully established connection, the data being read out and write.
4. the live collaboration data-sharing systems based on android system and Wi-Fi Direct according to claim 1,
It is characterized in that, described real-time video module includes:
Image capture module, obtains the present image of photographic head by the onPreviewFrame () overload function of Android, right
Image is compressed and cutting, is converted into file thread apoplexy due to endogenous wind transport format data, sends view data;
Image display, after receiving view data, is decoded to view data reducing, is shown by image shows assembly
Image.
5. the live collaboration data-sharing systems based on android system and Wi-Fi Direct according to claim 1,
It is characterized in that, described voice talk module includes:
Audio collection module, the instance objects creating audio recording are used for recording setting, start, according to trigger event, thread of recording,
And the audio-frequency information of collection is stored in buffer relief area, the audio-frequency information of collection is entered according to trigger event by transmitting thread
Row sends;
Audio playing module, the instance objects creating audio setting are configured to parameter when playing, and group thread gets
After the voice data receiving, by corresponding api function method, the content getting is play with audio form.
6. a kind of live collaboration data sharing method based on android system and Wi-Fi Direct is it is characterised in that include
Following steps:
S01:Carry out equipment search by Wi-Fi Direct to be connected and manage with mating;
S02:Carried out data transmission based on the socket of Transmission Control Protocol in the equipment room of connection;
S03:Successful match connect equipment in, by TCP/IP network communication protocol send and receive real time video image and
Voice messaging.
7. the live collaboration data sharing method based on android system and Wi-Fi Direct according to claim 6,
It is characterized in that, described step S01 includes:
The Wi-Fi of page jump to system is arranged interface, opens for setting or close;
After opening Wi-Fi Direct, the current connection status of one on-air monitor audiomonitor of registration and facility information are simultaneously
Neighbouring available devices are shown in lists, when the current information of equipment changes, triggers corresponding event;
Set up peer to peer connection group by calling corresponding api function to be attached request, during setting up group, establish clothes
Business device end and client.
8. the live collaboration data sharing method based on android system and Wi-Fi Direct according to claim 6,
It is characterized in that, described step S02 includes server end Socket communication and the communication of client Socket, described server end
Socket communication includes:
A) create server S ocket instance objects to be used for monitoring the port setting;
B) create a thread to be used for monitoring the connection request of client, wait client to connect;
C) after being successfully established connection, the data being read out and write;
Described client Socket communication includes:
1)Create client Socket instance objects, setting network address and port numbers are specifying the service of corresponding server end
Device Socket instance objects;
2)It is actively connected to the Socket of service end;
3)After being successfully established connection, the data being read out and write.
9. the live collaboration data sharing method based on android system and Wi-Fi Direct according to claim 6,
It is characterized in that, described step S03 includes:
Obtain the present image of photographic head by the onPreviewFrame () overload function of Android, image is compressed
And cutting, it is converted into file thread apoplexy due to endogenous wind transport format data, send view data;
After receiving view data, view data is decoded reduce, by image shows assembly display image;
The instance objects creating audio recording are used for recording setting, start thread of recording, and the sound collection according to trigger event
Frequency information is stored in buffer relief area, is transmitted the audio-frequency information of collection according to trigger event by transmitting thread;
The instance objects creating audio setting are configured to parameter when playing, and group thread gets the audio frequency number receiving
According to rear, by corresponding api function method, the content getting is play with audio form.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610856195.9A CN106454766A (en) | 2016-09-27 | 2016-09-27 | Real-time cooperation data sharing system based on Android system and Wi-Fi Direct |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610856195.9A CN106454766A (en) | 2016-09-27 | 2016-09-27 | Real-time cooperation data sharing system based on Android system and Wi-Fi Direct |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106454766A true CN106454766A (en) | 2017-02-22 |
Family
ID=58170612
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610856195.9A Pending CN106454766A (en) | 2016-09-27 | 2016-09-27 | Real-time cooperation data sharing system based on Android system and Wi-Fi Direct |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106454766A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107172060A (en) * | 2017-06-06 | 2017-09-15 | 武汉票据交易中心有限公司 | A kind of login method of client container |
CN107809807A (en) * | 2017-10-20 | 2018-03-16 | 广州小鹏汽车科技有限公司 | The communication means and device of large-size screen monitors and mobile terminal are controlled in a kind of Android |
CN110035133A (en) * | 2018-01-12 | 2019-07-19 | 珠海全志科技股份有限公司 | The method and apparatus of peer device IP address is obtained in Android WiFi-Direct connection |
CN110177345A (en) * | 2019-05-31 | 2019-08-27 | 东北大学 | A kind of file transmission, chat system and method for no cellular network signals region |
CN111050415A (en) * | 2019-12-23 | 2020-04-21 | 精诚工坊电子集成技术(北京)有限公司 | Wireless data transmission method convenient to operate |
CN113572823A (en) * | 2021-07-07 | 2021-10-29 | 维沃移动通信有限公司 | File transmission system and transmission method and electronic equipment |
CN115022849A (en) * | 2021-10-29 | 2022-09-06 | 荣耀终端有限公司 | Data transmission method based on Wi-Fi P2P and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140177613A1 (en) * | 2012-12-21 | 2014-06-26 | Broadcom Corporation | Resilient peer network with 802.11 technology |
CN104092769A (en) * | 2014-07-22 | 2014-10-08 | Tcl通讯(宁波)有限公司 | WiFi point-to-point data transmission method and system |
CN104333888A (en) * | 2014-10-27 | 2015-02-04 | 中央民族大学 | Self-organized instant messaging method based on Wi-Fi direct connection |
CN104661191A (en) * | 2013-11-15 | 2015-05-27 | 深圳市快播科技有限公司 | Local area network communication method, system and terminal, and information sharing device |
CN204733305U (en) * | 2015-05-30 | 2015-10-28 | 深圳市华宇达实业有限公司 | A kind of Smart Home all-digital visible talkback indoor unit |
CN105682250A (en) * | 2014-11-19 | 2016-06-15 | 中兴通讯股份有限公司 | Method and apparatus for realizing couple terminal based on Wifi Direct and terminal thereof |
CN105744491A (en) * | 2016-01-29 | 2016-07-06 | 河南捷步电子科技有限公司 | Communication management system and method between different android devices |
-
2016
- 2016-09-27 CN CN201610856195.9A patent/CN106454766A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140177613A1 (en) * | 2012-12-21 | 2014-06-26 | Broadcom Corporation | Resilient peer network with 802.11 technology |
CN104661191A (en) * | 2013-11-15 | 2015-05-27 | 深圳市快播科技有限公司 | Local area network communication method, system and terminal, and information sharing device |
CN104092769A (en) * | 2014-07-22 | 2014-10-08 | Tcl通讯(宁波)有限公司 | WiFi point-to-point data transmission method and system |
CN104333888A (en) * | 2014-10-27 | 2015-02-04 | 中央民族大学 | Self-organized instant messaging method based on Wi-Fi direct connection |
CN105682250A (en) * | 2014-11-19 | 2016-06-15 | 中兴通讯股份有限公司 | Method and apparatus for realizing couple terminal based on Wifi Direct and terminal thereof |
CN204733305U (en) * | 2015-05-30 | 2015-10-28 | 深圳市华宇达实业有限公司 | A kind of Smart Home all-digital visible talkback indoor unit |
CN105744491A (en) * | 2016-01-29 | 2016-07-06 | 河南捷步电子科技有限公司 | Communication management system and method between different android devices |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107172060A (en) * | 2017-06-06 | 2017-09-15 | 武汉票据交易中心有限公司 | A kind of login method of client container |
CN107172060B (en) * | 2017-06-06 | 2020-03-17 | 武汉票据交易中心有限公司 | Login method of client container |
CN107809807A (en) * | 2017-10-20 | 2018-03-16 | 广州小鹏汽车科技有限公司 | The communication means and device of large-size screen monitors and mobile terminal are controlled in a kind of Android |
CN107809807B (en) * | 2017-10-20 | 2020-12-15 | 广州小鹏汽车科技有限公司 | Method and device for communication between Android central control large screen and mobile terminal |
CN110035133A (en) * | 2018-01-12 | 2019-07-19 | 珠海全志科技股份有限公司 | The method and apparatus of peer device IP address is obtained in Android WiFi-Direct connection |
CN110035133B (en) * | 2018-01-12 | 2021-09-21 | 珠海全志科技股份有限公司 | Method and device for acquiring IP address of peer-to-peer device in android WiFi-Direct connection |
CN110177345A (en) * | 2019-05-31 | 2019-08-27 | 东北大学 | A kind of file transmission, chat system and method for no cellular network signals region |
CN111050415A (en) * | 2019-12-23 | 2020-04-21 | 精诚工坊电子集成技术(北京)有限公司 | Wireless data transmission method convenient to operate |
CN113572823A (en) * | 2021-07-07 | 2021-10-29 | 维沃移动通信有限公司 | File transmission system and transmission method and electronic equipment |
CN115022849A (en) * | 2021-10-29 | 2022-09-06 | 荣耀终端有限公司 | Data transmission method based on Wi-Fi P2P and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106454766A (en) | Real-time cooperation data sharing system based on Android system and Wi-Fi Direct | |
KR101475525B1 (en) | A portable cellular enhancer | |
CN111565137A (en) | System and method for binding WiFi distribution network and equipment | |
CN103269329B (en) | A kind of domestic video monitoring system based on digital TV set-top box and IMS system | |
CN110933653B (en) | Message transmission method, device, terminal and storage medium | |
CN110943959A (en) | Business processing method, cloud management platform, terminal and storage medium | |
CN103037319A (en) | Communication transferring method, mobile terminal and server | |
CN105122726A (en) | Multiple user wireless docking | |
WO2022143071A1 (en) | Connection establishment method and electronic device | |
WO2014183404A1 (en) | Data transmission method, apparatus, system and terminal | |
US10425812B2 (en) | Method and apparatus for establishment of private communication between devices | |
CN105493527B (en) | Wireless communication apparatus and wireless communication method | |
CN103888488A (en) | Method for sharing data based on WIFI | |
JP2003318917A (en) | Wireless communication system, wireless communication terminal, and method for participating in wireless communication system | |
WO2010000121A1 (en) | A method, a system and a system server for realizing monitor | |
CN103312677A (en) | Terminal, server and establishment method of communication connection | |
CN105553921B (en) | Internet of things communication method and device and internet of things communication system | |
CN202551353U (en) | Wireless unvarnished transmission terminal device and wireless system equipped therewith | |
JP6454076B2 (en) | Relay device, communication device, control method, system, and program thereof | |
CN113132997B (en) | Communication method, device and system of intelligent household equipment | |
JP2014093748A (en) | Gateway device | |
US11252553B2 (en) | Method and device for establishing connection using Bluetooth low energy | |
CN102111732B (en) | Method and device for sharing information between wireless terminals | |
JP2018174404A (en) | Communication control apparatus, communication control method, and program | |
JP6704380B2 (en) | External server, communication system and communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170222 |
|
RJ01 | Rejection of invention patent application after publication |