Android intercom system based on the WiFi networkTechnical field
The present invention relates to a kind of Android intercom system, belong to radio communication and electronic information technical field based on the WiFi network.
Background technology
At present, wireless communication technology is along with human living standard's raising constantly develops.Communication mode also begins to evolve, and lighting more, cost degradation and intellectuality become.WiFi be a kind of can be one group of communication technology the terminal that includes the WiFi module with the interconnected network technology of wireless mode based on the IEEE802.11 standard.With common radio network technique contrast, WiFi has wideer bandwidth, stronger radiofrequency signal, lower power consumption and improved fail safe.Android is a kind of open source code control system based on Linux, and smooth operation, the design of hommization are arranged.Yet also there is following problem in the intercom system that exists in China:
1. the intercom system of China also is in the stage of traditional design.Talk back equipment often volume big, be not easy to carry.
2. traditional talk back equipment development cost height, price is also high behind the finished product.Because new science and technology updates fast, causes the wasting of resources easily.
3. traditional talk back equipment transferring voice is still analog communication signal, and the design of less radio-frequency and antenna is had very high specification requirement, and communication quality is subjected to environmental interference easily.
4. traditional talk back equipment function ratio is more single, can not adjust different communication patterns according to the different communication environment.
5. reprocess the cost height after traditional talk back equipment fault, maintenance workload is big.
6. traditional talk back equipment power consumption is big, is also using disposable particle battery, and green energy conservation does not cause environmental pollution.
7. traditional talk back equipment user's intercom can only be single and corresponding channel, selectivity and specific user carry out intercommunication flexibly.
Summary of the invention
The present invention is directed to the problems referred to above, a kind of Android intercom system based on the WiFi network is provided, this system operates on the Android platform, has realized the transplanting of traditional talk back equipment function to the intelligent terminal.System directly inserts WLAN (wireless local area network) by the WiFi module, can select suitable communication pattern according to current network environment, and volume is little, cost is low, communication quality is secure.
Technical scheme of the present invention is:
A kind of Android intercom system based on the WiFi network, this system comprise WiFi module (1), voice broadcast service module (2), voice clean culture module (3), user monitor module (4), information receiving and transmitting module (5), (6) six parts of database management module; WiFi module (1) provides the connection of WiFi wireless network; Voice broadcast service module (2) is used for the interior broadcasting speech intercommunication of local area network (LAN) that the WiFi network is formed; Voice clean culture module (3) is used for the interior speech talkback one to one of local area network (LAN) that the WiFi network is formed; User monitor module (4) is used to monitor local area network users information; Information receiving and transmitting module (5) is used for the information interaction between the user in the local area network (LAN); Database management module (6) is used to manage the user profile in the local area network (LAN).
WiFi module (1) can be set up the local area network (LAN) of forming based on the WiFi wireless network by WiFi focus function, and the user that other in the local area network (LAN) possesses the WiFi module can connect enter the internet through this focus, and system terminal carries out wireless connections by the WiFi module.
Voice broadcast service module (2) broadcasting speech data are transmitted based on udp protocol, and communication pattern is a simplex mode.Host terminal enters system and directly enters the voice broadcast service module, and this module is connected with system by the audio frequency input/output port.Terminal use in the local area network (LAN) can carry out speech talkback with all users except that main frame by this module.The voice broadcast service intercommunication is adopted towards unconnected data transfer mode, can produce packet loss, has some data delays, but does not influence communication quality substantially.
Voice clean culture module (3) clean culture speech data transmits based on ICP/IP protocol, and communication pattern is a simplex mode.This module is connected with user monitor module (4) by system database.Under the user profile interface, select other terminal use IP can enter voice clean culture module, realize speech talkback function one to one.This pattern adopts connection-oriented mode to carry out transfer of data, can obtain than higher speech quality.
Voice broadcast service module (2) is 44100 with the audio sample rate that voice clean culture module (3) is selected for use, and the sound channel of recording of audio frequency is a monophony, and the data general layout of audio frequency is each sample of PCM16 position.What module was carried out the audio coding use is the speex encoder.
User monitor module (4) is used to intercept the reaching the standard grade of user in the local area network (LAN), offline information.This module exchanges by the data that the transmit status announcement information comes with other terminal use carries out in the system database.By Data Update, can guarantee constantly that the user profile in the system database all is up-to-date.
Information receiving and transmitting module (5) is used under the non-voice communication pattern, and it is mutual to carry out Word message between the user.Data are transmitted based on udp protocol.This module is the socket(socket) general communication mode, be mainly used in being inconvenient to and carry out under the speech talkback situation, carry out Word message between the terminal use and exchange.
Database management module (6) is used to manage the IP data message of all users in the local area network (LAN), the date and time information of reaching the standard grade, and remark information.Database keeps last state constantly, and the terminal use is the meeting destruction database when logging off program, rebulids database when entering system.
The invention has the beneficial effects as follows:
1. the present invention is based on the WiFi wireless network transmissions, better bandwidth is arranged than legacy network.Speech data becomes digital signal to transmit by analog signal conversion, and the possibility that disturbed by surrounding environment is almost nil, can obtain than higher communication quality.
2. the present invention realizes in the Android system, and based on the increasing income property and the convenience of Android system, system maintenance is got up convenient, and the cost of version updating is low.Terminal intelligent height, compatible strong, low in energy consumption, environmental protection.
3. the present invention's design has clean culture and two kinds of communication patterns of broadcasting, is adapted at selecting under the different communication environment corresponding intercommunication mode.And additional the information receiving and transmitting module is arranged, make the communication mode of intercom system more flexible.
4. the present invention has database management module, and this function can conveniently be obtained the IP information of user in the local area network (LAN), removes the trouble of oneself going to collect user profile from, and is efficient, convenient.
Description of drawings
Fig. 1 is the structural representation of the Android intercom system based on the WiFi network provided by the invention;
Fig. 2 is the interface schematic diagram of the Android intercom system based on the WiFi network provided by the invention;
Wherein: Fig. 2 (a) is a voice broadcast service interface schematic diagram;
Fig. 2 (b) is a user profile interface schematic diagram;
Fig. 2 (c) is voice clean culture and information receiving and transmitting interface schematic diagram;
Fig. 3 is the program flow diagram of the present invention's running.
Embodiment
Below in conjunction with accompanying drawing a concrete execution mode of the present invention is described.
The structural representation of the Android intercom system based on the WiFi network of the present invention as shown in Figure 1.Comprise WiFi module (1), voice broadcast service module (2), voice clean culture module (3), user monitor module (4), information receiving and transmitting module (5), database management module (6).
Accompanyingdrawing 2 is based on an embodiment (the present invention is mainly used in the speech talkback in the local area network (LAN) scope) of the Android intercom system of WiFi network:
Select intelligent terminal A, the terminal B, the terminal C that are mounted with the Android system for use.Terminal all is equipped with WiFi module (1), is responsible for having set up the local area network (LAN) based on the WiFi wireless network.Terminal C is enabled as the WiFi focus, and terminal A is connected focus and emerges a self-organizing network with terminal B.
Android intercommunication application program among initialization terminal A and the terminal B, the user monitors thread and begins to start, the search for networks user of beginning self-organizing, initialization and new database more.
Application program among terminal A and the terminal B enters voice broadcast service master interface automatically after 1s welcomes animation, interface profile schematic diagram is consulted shown in Fig. 2 (a).Voice broadcast service playback thread begins to start, and advanced terminal can be received the reminder message of reaching the standard grade of laggard terminal.Voice broadcast service is the simplex mode.Terminal A presses down the microphone on the voice broadcast service interface, and other any terminal use in the local area network (LAN) comprises the voice that terminal B can uppick terminal A transmits from headset.
Terminal A clicks microphone to last eyes seek button, and application program begins the user profile in the reading database, enters into the user profile display interface.Interface profile schematic diagram is consulted shown in Fig. 2 (b).The IP information (comprising this machine IP information and loop address " 127.0.0.1 ") that all users in the local area network (LAN) are arranged on the interface.In the user profile display interface, can manually add, revise or delete user data.
Terminal A and terminal B select the other side's IP information mutually, enter voice clean culture and information receiving and transmitting interface.Interface profile schematic diagram is consulted shown in Fig. 2 (c).The information receiving and transmitting function is carried out transfer of data based on udp protocol, and local terminal can be received the Word message that other any terminal sends, for desiring to provide prompting convenient with other terminal use of local terminal conversation.Open the voice clean culture switch (OFF-ON) in this upper right corner, interface of both sides, voice clean culture playback thread begins to start.The voice clean culture is the simplex mode.Terminal A presses down edit box last push-to-talk button is begun intercommunication, the voice that terminal B can uppick terminal A transmits from headset.The program circuit of the detailed operation of system is consulted shown in Figure 3.This intercommunication pattern is carried out transfer of data based on ICP/IP protocol, has higher communication quality, is suitable for the demanding intercommunication occasion of communication quality.