Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides the instant intercom device based on CAT1 without distance limitation, which can save flow on the premise of ensuring tone quality, solve the problem of communication distance and meet the application requirements of various occasions.
The technical scheme adopted by the invention for solving the technical problems is as follows:
the utility model provides an instant intercom device based on CAT1 does not have distance restriction, includes server, main intercom equipment and a plurality of vice intercom, and main intercom equipment reports pronunciation to the server, and the server is handled the back and is distributed pronunciation to a plurality of vice intercom equipment, or distribute to appointed vice intercom equipment, realizes one-to-one calling, or the group call to and shield a contact person or shield a plurality of groups and appoint the call.
As an improvement of the above technical solution, after the main intercom device is powered on, a TCP receive callback task is created, where the TCP receive callback task is used to receive information returned by the server, and the returned information includes voice data, text message, response message, group creation result, friend application message, heartbeat packet, waiting signal, and service push message.
As an improvement of the above technical solution, if a text message is returned, the text message is displayed on the screen of the main intercom device or the text message is displayed on the screen while the content of the text message is broadcasted by voice;
if voice data is returned and the first packet of voice data is the voice data, an opus decoder needs to be created for decoding and a player needs to play the voice data.
As an improvement of the technical scheme, the TCP receiving callback task works after the main talkback device logs in, and is in a suspended state before logging in.
As an improvement of the above technical solution, the main intercom device creates LED tasks for prompting the working state, including a power-on prompt, a network registration success prompt, a login success prompt, an intercom state, and a waiting state.
As an improvement of the technical scheme, the main talkback equipment creates voice prompt tasks, including key tone prompt, login success prompt, offline prompt, prompt of network incorrect registration and text message playing service.
As an improvement of the above technical solution, the main intercom device creates a key task and a Talk task, the key task includes a plurality of keys for distributing messages, and the Talk task is used for creating intercom resource management and processing account login.
As an improvement of the above technical solution, the main intercom device needs to configure information when being started for the first time, the configuration mode includes that the mobile phone or the computer writes account information through an NFC or USB link mode, and pushes friend management and group management information to the mobile phone or the computer, and the main intercom device acquires friend list information after logging in through a configured account password;
or sharing the information to the main talkback equipment through the mobile phone.
As an improvement of the technical scheme, the main talkback equipment is provided with a microphone and an editor, and the editor is used for processing data collected by the microphone.
As an improvement of the above technical solution, the main intercom device and the auxiliary intercom device have the same structure.
The invention has the beneficial effects that: the equipment of the invention can solve the problem of communication distance, and communication contents are encrypted by coding, thereby ensuring the safety of conversation and meeting various application places.
Detailed Description
The conception, the specific structure, and the technical effects produced by the present invention will be clearly and completely described below in conjunction with the embodiments and the accompanying drawings to fully understand the objects, the features, and the effects of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments, and those skilled in the art can obtain other embodiments without inventive effort based on the embodiments of the present invention, and all embodiments are within the protection scope of the present invention. In addition, all the connection/connection relations referred to in the patent do not mean that the components are directly connected, but mean that a better connection structure can be formed by adding or reducing connection auxiliary components according to specific implementation conditions. All technical characteristics in the invention can be interactively combined on the premise of not conflicting with each other.
Referring to fig. 1-2, the invention discloses an instant intercom device based on CAT1 without distance limitation, comprising a server, a main intercom device and a plurality of auxiliary intercom devices, wherein the main intercom device reports voice to the server, the server processes the voice and distributes the voice to the plurality of auxiliary intercom devices or appointed auxiliary intercom devices, so as to realize one-to-one calling or group calling, and shield a contact or a plurality of groups for appointed calling.
In the above embodiments, the present invention is mainly applied to the food service industry, but not limited thereto, such as the security industry. The main talkback equipment and the auxiliary talkback equipment have the same structure, the two types of equipment are put into the catering industry, when a guest needs the equipment, the handheld equipment can be used as the main talkback equipment, the equipment held by each waiter can be used as the auxiliary talkback equipment, different keys can be pressed down respectively, the server is used for carrying out voice recognition processing, the equipment is selectively distributed to the corresponding auxiliary talkback equipment, one-to-one calling or group calling is realized, and one contact is shielded or a plurality of groups are shielded for carrying out appointed calling.
Referring to fig. 3-5, after the main intercom device is started, the device used when the main intercom device is started needs to configure information for the first time, the configuration mode includes that the account information is written into the device by the mobile phone and the PC end of the computer through NFC or USB link, the configuration information such as friends is pushed to the background for configuration, and then the device logs in through the configured account password and acquires the configuration information such as a friend list. The configuration mode also comprises the step that friends on the mobile phone APP configure and share the main talkback equipment, and the main talkback equipment is bound with the mobile phone, wherein the configuration mode is called mother and child APP. The main intercom device can give 6 digits in a voice broadcasting and screen display mode in the configuration process, the mobile phone can log on the account by inputting the 6 digits from the account login interface, and the configuration of a contact person in the mobile phone or the configuration in the mobile phone can be acquired after login.
Referring to fig. 6, the primary intercom device creates a TCP receive callback task, where the TCP receive callback task is used to receive information returned by the server, and the TCP receive callback task works after the primary intercom device logs in an account, and is in a suspended state before logging in. The returned information comprises voice data, text messages, response messages, group creation results, friend application messages, heartbeat packets, waiting signals and service push messages. If the text message is returned, the text message is displayed on the screen of the main talkback equipment or the text message is displayed on the screen and simultaneously the content of the text message is broadcasted by voice; if voice data is returned and the first packet of voice data, i.e. the un-disassembled and scattered data packet, needs to create an opus decoder for decoding and a player for voice playing.
In the above embodiment, the flow of the TCP receiving the callback task is as follows: the data from the server is received only after the server is required to be logged in; the restorer sends data to receive, and the task enters a dormant state at other time; and after receiving and packaging a plurality of packets of data sent by the server into complete one frame of data, starting analysis. In the process of processing the data sent by the server, if the sent data is a text message, the equipment is provided with a screen and is configured to allow the text message to be displayed on the screen, the text message is displayed on the screen, and the equipment simultaneously allows voice playing, converts the text message into voice and plays the voice message; if the voice data is received and the first packet of voice data is the voice data, an opus decoder and a player need to be created, and at the moment, due to resource locking, key tones, incoming call ringtones and the like cannot be played.
If the data transmitted by the TCP needs to be subjected to unpacking, scattering and encryption and needs to be recombined, sequenced and decrypted, it is known that one frame of TCP data may contain multiple frames of opus data, so that the multiple frames of opus data are sequentially sent to an opus decoder, data decoded by the opus decoder needs to be sent to a player queue for playing, when the TCP frame is marked as the last packet of data, the player is released to reduce power consumption, and the decoder is released to reduce waste of system resources.
Further, the main intercom device creates LED tasks for prompting the working state, including a starting prompt, a network registration success prompt, a login success prompt, an intercom state and a waiting state. The configuration is as follows: the two color numbers of red and blue are conventional color numbers; when the machine is started, the blue light is normally on, and the red light flickers; the successful network registration is blue light off and red light flashing; the login success is totally off, and the blue lamp is used as a breathing lamp; the talkback state is that the red light is normally on.
Further, the main intercom device creates voice prompt tasks, including key tone prompt, login success prompt, offline prompt, prompt of network incorrect registration and text message playing service.
Further, the main talkback device creates a key task and a Talk task, wherein the key task comprises a plurality of keys used for distributing messages, and the Talk task is used for creating talkback resource management and processing account login.
Furthermore, the main talkback equipment is provided with a microphone and an editor, and the editor is used for processing data collected by the microphone.
Referring to fig. 7-10, in the invention, when talkback, the talkback key of the main talkback device is pressed, so that the talkback task is started, the talkback task needs to judge whether the talkback task is logged in, if the talkback task is not logged in, a prompt tone is started until the login is successful, the identity information of the current interphone is obtained and is encoded and encrypted, then the server is informed to start talkback once, an opus encoder is created, parameters are set, encoded voice data are prepared, and an editor is also created, the editor is used for processing data collected by the microphone, algorithms such as threshold and echo cancellation can be performed according to requirements, the microphone is configured to work, the microphone is bound with the editor, the data of the microphone is directly transmitted to the editor, and the microphone is started to record after the editor is started. Processing data transmitted from the microphone in the editor, sending the processed data into a work queue, splitting the received data by one frame of 20ms, sending the data to the opus encoder, encoding the data, then placing the data into a cache, placing the cached data by one TCP frame, encoding the cached data again, sending the encoded TCP frame again to the server, and forwarding the encoded TCP frame to the created contact person by the server, wherein the contact person is the current interphone.
The invention has the beneficial effects that: the equipment of the invention can solve the problem of communication distance, and communication contents are encrypted by coding, thereby ensuring the safety of conversation and meeting various application places.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.