CN117998227B - Intercom system, method and device - Google Patents
Intercom system, method and device Download PDFInfo
- Publication number
- CN117998227B CN117998227B CN202410398568.7A CN202410398568A CN117998227B CN 117998227 B CN117998227 B CN 117998227B CN 202410398568 A CN202410398568 A CN 202410398568A CN 117998227 B CN117998227 B CN 117998227B
- Authority
- CN
- China
- Prior art keywords
- audio data
- data
- intercom
- interphone
- digital audio
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000004044 response Effects 0.000 claims abstract description 44
- 238000005070 sampling Methods 0.000 claims description 21
- 230000005540 biological transmission Effects 0.000 claims description 20
- 238000012795 verification Methods 0.000 claims description 7
- 230000008054 signal transmission Effects 0.000 claims description 6
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 238000013524 data verification Methods 0.000 claims description 4
- 238000012423 maintenance Methods 0.000 claims 1
- 238000004891 communication Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 125000004122 cyclic group Chemical group 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000005236 sound signal Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Classifications
-
- 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
- H04Q5/245—Circuit arrangements in which for one subscriber low frequency speech and/or signalling signals proceed on the line, while for the other subscriber the low frequency speech and/or signalling signals are modulated upon a high frequency carrier signal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B15/00—Suppression or limitation of noise or interference
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Interconnected Communication Systems, Intercoms, And Interphones (AREA)
Abstract
The embodiment of the application provides an intercom system, an intercom method and an intercom device. The first audio acquisition equipment is used for acquiring first analog audio data and transmitting the first analog audio data to the first MCU; the first MCU is used for converting the first analog audio data into first digital audio data through the first ADC and transmitting the first digital audio data to the second MCU; the second MCU is used for receiving the first digital audio data, converting the first digital audio data into analog audio data through the second DAC, sending the analog audio data to the second playing device, and sending the holding message data to the first MCU under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data; the second playing device is used for playing the analog audio data; the first MCU is configured to drive the first audio acquisition device to repeatedly perform the step of acquiring the first analog audio data in response to the hold message data. The anti-interference capability of the intercom system is improved.
Description
Technical Field
The application relates to the technical field of building intercom products, in particular to an intercom system, method and device.
Background
The anti-interference capability of the intercom system adopted in the current economical building intercom market is weak, so that noise is very easy to be introduced under the condition that the surrounding environment is interfered, and the voice quality is influenced.
Disclosure of Invention
The embodiment of the application aims to provide an intercom system, an intercom method and an intercom device so as to improve the anti-interference capability of the intercom system. The specific technical scheme is as follows:
The embodiment of the application provides an intercom system, which comprises a first intercom and a second intercom, wherein the first intercom and the second intercom realize data transmission through a digital signal transmission circuit; the first interphone includes: first MCU, first audio acquisition equipment, first playback devices, the second intercom includes: the second MCU, second audio acquisition equipment, second playback device, include in the first MCU: a first ADC, a first digital-to-analog converter DAC; the second MCU comprises: a second ADC and a second DAC;
The first audio acquisition device is used for acquiring first analog audio data and sending the first analog audio data to the first MCU;
the first MCU is configured to convert the first analog audio data into first digital audio data through the first ADC if the intercom direction of the first intercom is a data sender, and send the first digital audio data to the second MCU;
The second MCU is configured to receive the first digital audio data if the intercom direction of the second intercom is a data receiver, convert the first digital audio data into analog audio data through the second DAC, send the analog audio data to the second playback device, and send a hold message data to the first MCU if the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data;
The second digital audio data are obtained by the second audio acquisition device obtaining second analog audio data and sending the second analog audio data to the second MCU, and the second MCU converts the second analog audio data through the second ADC;
the second playing device is used for playing the analog audio data;
the first MCU is used for responding to the holding message data and driving the first audio acquisition device to repeatedly execute the step of acquiring the first analog audio data.
In a possible embodiment, the second MCU is further configured to send switching message data to the first MCU if the first audio energy of the first digital audio data is not greater than the second audio energy of the second digital audio data;
the first MCU is further used for responding to the switching message data, sending response message data to the second MCU and switching the intercom direction of the first intercom to the data receiver;
the second MCU is further configured to switch the intercom direction of the second intercom to the data sender in response to the response message data.
In a possible embodiment, the first MCU is further configured to backup the first analog audio data to obtain backup analog audio data;
The second MCU is further configured to perform data verification on the first digital audio data, and perform the steps of converting the first digital audio data into analog audio data through the second DAC if the verification is successful, transmitting the analog audio data to the second playback device, and transmitting hold message data to the first MCU if the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data; transmitting retransmission message data to the first MCU under the condition that verification fails;
The first MCU is further used for responding to the retransmission message data, converting the backup analog audio data into third digital audio data through the first ADC, and sending the third digital audio data to the second MCU.
In a possible embodiment, the first MCU is further configured to, within a preset period of time after the first digital audio data is sent to the second MCU, drive the first audio capturing device to perform the step of obtaining the first analog audio data if the message data sent by the second MCU is not received.
In one possible embodiment, the audio energy of the digital audio data is obtained by:
determining the amplitude corresponding to each sampling point in the digital audio data;
and calculating the audio energy of the digital audio data in the preset sampling duration according to the amplitude corresponding to each sampling point.
In one possible embodiment, the first interphone and the second interphone realize data transmission through an RS485 circuit.
The embodiment of the application also provides an intercom method which is applied to the first intercom, and comprises the following steps:
acquiring first analog audio data;
Converting the first analog audio data into first digital audio data, and transmitting the first digital audio data to a second interphone, so that the second interphone converts the first digital audio data into analog audio data after receiving the first digital audio data, plays the analog audio data, and transmits a holding message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data; the second digital audio data are obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data;
And in response to the hold message data, repeating the step of acquiring the first analog audio data.
The embodiment of the application also provides an intercom method which is applied to the second intercom, and comprises the following steps:
Receiving first digital audio data; the first digital audio data are first analog audio data acquired by a first interphone, and the first analog audio data are converted into first digital audio data and then sent to the second interphone;
converting the first digital audio data into analog audio data and playing the analog audio data;
Transmitting hold message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data, so that the first interphone responds to the hold message data to acquire first analog audio data; the second digital audio data is obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data.
The embodiment of the application also provides an intercom device which is applied to the first intercom, and comprises:
the acquisition module is used for acquiring the first analog audio data;
The conversion module is used for converting the first analog audio data into first digital audio data and sending the first digital audio data to a second interphone, so that the second interphone converts the first digital audio data into analog audio data after receiving the first digital audio data, plays the analog audio data and sends a holding message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data; the second digital audio data are obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data;
and the response module is used for responding to the holding message data and repeatedly executing the step of acquiring the first analog audio data.
The embodiment of the application also provides an intercom device which is applied to the second intercom, and the device comprises:
A receiving module for receiving first digital audio data; the first digital audio data are first analog audio data acquired by a first interphone, and the first analog audio data are converted into first digital audio data and then sent to the second interphone;
the playing module is used for converting the first digital audio data into analog audio data and playing the analog audio data;
A transmitting module, configured to transmit hold message data to the first interphone when the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data, so that the first interphone responds to the hold message data to acquire first analog audio data; the second digital audio data is obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data.
The embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the intercom methods described above.
The embodiment of the application has the beneficial effects that:
According to the intercom system, the intercom method and the intercom device, the first audio acquisition equipment of the first intercom in the intercom system can acquire first analog audio data and send the first analog audio data to the first MCU of the first intercom, when the intercom direction of the first intercom is the data sender, the first MCU converts the first analog audio data into first digital audio data through the first ADC, and the first digital audio data is sent to the second MCU of the second intercom. The second MCU of the second interphone can receive the first digital audio data when the intercom direction of the first interphone is the data sender, convert the first digital audio data into analog audio data through the second DAC, and send the analog audio data to the second playing device of the second interphone, so that the second playing device can play the analog audio data. The second MCU of the second interphone can send the holding message data to the first MCU of the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data; the second digital audio data are obtained by converting the second analog audio data through a second ADC (analog to digital converter) by the second MCU after the second analog audio data are acquired by second audio acquisition equipment of the second interphone; and after receiving the holding message data, the first MCU of the first interphone drives the first audio acquisition equipment of the first interphone to repeatedly execute the step of acquiring the first analog audio data. Because the first MCU of the first interphone internally comprises the first ADC and the first DAC, and the second MCU of the second interphone internally comprises the second ADC and the second DAC, the first interphone can convert the acquired first analog audio data into first digital audio data, and even if the second interphone receives the first digital audio data, the second interphone can convert the first digital audio data into analog audio data and play the analog audio data, namely the scheme provided by the application does not influence the realization of the intercom function of the intercom system. In addition, the first interphone and the second interphone realize data transmission through the digital signal transmission circuit, so that when the intercom system is used, digital signals can be transmitted between the first interphone and the second interphone, and the anti-interference capability of the digital signals is strong.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and other embodiments may be obtained according to these drawings to those skilled in the art.
Fig. 1 is a schematic structural diagram of an intercom system according to an embodiment of the present application;
Fig. 2 is a schematic flow chart of an intercom method applied to a first intercom according to an embodiment of the present application;
Fig. 3 is a schematic flow chart of an intercom method applied to a second intercom according to an embodiment of the present application;
fig. 4 is a schematic diagram of an interaction flow of an intercom method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an intercom device applied to a first intercom according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an intercom device applied to a second intercom according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
For a clearer description of an intercom system, method and apparatus provided by the present application, some terms appearing herein will be explained as follows:
half duplex: data can be transmitted in both directions of one signal carrier, but cannot be transmitted simultaneously.
MCU (Micro Control Unit ): the method is to integrate a CPU (Central Processing Unit ), a RAM (Random Access Memory, random access Memory), a ROM (Read-Only Memory), a timer counter and various I/O (Input/Output) interfaces of a computer on a chip to form a chip-level computer, which can perform different combination control for different application occasions.
ADC (Analog-to-Digital Converter ): refers to devices that convert a continuously variable analog signal to a discrete digital signal.
DAC (Digital Audio Compress, digital-to-analog converter): is a device that converts digital signals into analog signals (in the form of current, voltage or charge).
CRC (Cyclic Redundancy Check, cyclic redundancy check code): the error checking check code is the most commonly used in the field of data communication, and is characterized in that the lengths of an information field and a check field can be arbitrarily selected. Cyclic Redundancy Check (CRC) is a data transmission error detection function that performs polynomial computation on data and attaches the resulting result to the back of the frame, and the receiving device also performs a similar algorithm to ensure the correctness and integrity of the data transmission.
In order to more clearly describe an intercom system, method and apparatus provided by the present application, an exemplary description will be given below of a possible application scenario of the intercom system, method and apparatus provided by the present application, it should be understood that the following examples are only possible application scenarios of the intercom system, method and apparatus provided by the present application, and in other possible embodiments, the intercom system, method and apparatus provided by the present application can also be applied to other possible application scenarios, and the following examples are not limited in any way.
In the current economical building intercom market, in order to solve the problems of echo, howling and the like, a half-duplex intercom scheme is mostly adopted to realize half-duplex intercom, for example, half-duplex intercom can be realized based on a half-duplex voice control chip such as MC34118 and the like.
The analog intercom scheme transmits analog voice signals, so that noise is very easy to be introduced under the condition that the surrounding environment is interfered, and the voice quality is influenced. In addition, the half-duplex voice control chip is in the process of switching the intercom direction, the problems of blocking, word loss and the like can possibly occur, the cost of the half-duplex voice control chip is high, and the cost of intercom system products can be increased. At present, half-duplex intercom can be realized mainly by the following two modes:
(1) Half-duplex intercom is realized through the half-duplex intercom circuit. The half-duplex communication circuit comprises a channel switching module, and can use the singlechip to switch channels, so that the circuit contains fewer elements and has a simple structure. The mode of realizing half-duplex intercom through the half-duplex conversation circuit is similar to the mode of realizing half-duplex intercom through the half-duplex voice control chip, and the two are transmitted to be analog voice signals, and environmental interference is easy to receive.
(2) The channel volume of the microphone and the loudspeaker are respectively adjusted to be 0 to 5V direct current level through the double operation circuits, the channel volume of the microphone and the loudspeaker are input into the MCU processor to be compared with each other, the audio channels of the microphone and the loudspeaker are switched according to the comparison result of the volume, and the switching of the two audio channels is completed. Compared with the scheme of realizing half-duplex intercom through the half-duplex intercom circuit, the scheme has the advantages that the current adjusting circuit is added, the channel switching accuracy is improved, the analog voice signal is still transmitted, the environment interference is easy to occur, and the cost of the circuit device required to be used is high.
Therefore, the scheme for realizing half-duplex intercom in the related art is easy to introduce noise under the condition that the surrounding environment is interfered, and the voice quality is affected, namely the anti-interference capability of the scheme for realizing half-duplex intercom in the related art is weaker. And the cost of circuit devices such as chips for realizing the scheme of half-duplex intercom in the related technology is higher, so that the cost of the product is higher.
Based on this, in order to improve the anti-interference capability of the intercom system and reduce the product cost, the application provides an intercom system, referring to fig. 1, the intercom system comprises:
The first interphone 10 and the second interphone 20 realize data transmission through a digital signal transmission circuit.
The first interphone 10 includes: the first micro control unit MCU101, the first audio acquisition device 102 and the first playing device 103; the second interphone 20 includes: the second micro control unit MCU201, the second audio acquisition device 202 and the second playing device 203. The first MCU101 includes: a first analog-to-digital converter ADC and a first digital-to-analog converter DAC; the second MCU201 includes: a second ADC and a second DAC.
The first audio acquisition device 102 is configured to acquire first analog audio data and send the first analog audio data to the first MCU101.
The first MCU101 is configured to convert the first analog audio data into first digital audio data through the first ADC and send the first digital audio data to the second MCU201 if the intercom direction of the first intercom is the sender.
The second MCU201 is configured to receive the first digital audio data if the intercom direction of the second intercom is the data receiver, convert the first digital audio data into analog audio data through the second DAC, send the analog audio data to the second playback device 203, and send the hold message data to the first MCU101 if the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data.
The second digital audio data is obtained by the second audio acquisition device 202 obtaining second analog audio data, and sending the second analog audio data to the second MCU201, where the second MCU201 converts the second analog audio data through the second ADC.
And a second playback device 203 for playing back the analog audio data.
The first MCU101 is configured to drive the first audio acquisition device 102 to repeatedly perform the step of acquiring the first analog audio data in response to the hold message data.
By applying the embodiment of the application, the first audio acquisition equipment of the first interphone in the intercom system can acquire the first analog audio data and send the first analog audio data to the first MCU of the first interphone, and when the intercom direction of the first interphone is the data sender, the first MCU converts the first analog audio data into the first digital audio data through the first ADC and sends the first digital audio data to the second MCU of the second interphone. The second MCU of the second interphone can receive the first digital audio data when the intercom direction of the first interphone is the data sender, convert the first digital audio data into analog audio data through the second DAC, and send the analog audio data to the second playing device of the second interphone, so that the second playing device can play the analog audio data. The second MCU of the second interphone can send the holding message data to the first MCU of the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data; the second digital audio data are obtained by converting the second analog audio data through a second ADC (analog to digital converter) by the second MCU after the second analog audio data are acquired by second audio acquisition equipment of the second interphone; and after receiving the holding message data, the first MCU of the first interphone drives the first audio acquisition equipment of the first interphone to repeatedly execute the step of acquiring the first analog audio data. Because the first MCU of the first interphone internally comprises the first ADC and the first DAC, and the second MCU of the second interphone internally comprises the second ADC and the second DAC, the first interphone can convert the acquired first analog audio data into first digital audio data, and even if the second interphone receives the first digital audio data, the second interphone can convert the first digital audio data into analog audio data and play the analog audio data, namely the scheme provided by the application does not influence the realization of the intercom function of the intercom system. In addition, the first interphone and the second interphone realize data transmission through the digital signal transmission circuit, so that when the intercom system is used, digital signals can be transmitted between the first interphone and the second interphone, and the anti-interference capability of the digital signals is strong.
On the other hand, the embodiment of the application can realize the intercom function of the intercom system without adopting a half-duplex voice control chip or other chips or circuit devices with higher cost, thereby reducing the cost of the devices and the cost of products of the intercom system.
The intercom system provided by the application will be exemplified as follows:
The first interphone 10 and the second interphone 20 in the present application may be two interphones in an intercom system in any scene. Illustratively, the first interphone 10 may be an indoor interphone in an entrance guard intercom system, and the second interphone 20 may be an interphone disposed at a cell door in the entrance guard intercom system; or the first interphone 10 may be an interphone disposed at a cell gate in the entrance guard intercom system, and the second interphone 20 may be an indoor interphone in the entrance guard intercom system. The present application is not limited in any way.
The first MCU101 is a micro control unit having a first ADC and a first DAC built therein, and the second MCU201 is a micro control unit having a second ADC and a second DAC built therein.
The first audio acquisition device 102 may be any device that may be used to acquire audio data. The first audio capturing device 102 may be a MIC (microphone) as shown in fig. 1, or may be other devices that may be used to capture audio data, such as a microphone, sound card, etc. Similarly, the second audio acquisition device 202 may be any device that may be used to acquire audio data. The second audio capture device 202 may be, for example, the MIC shown in fig. 1, or other devices that may be used to capture audio data, such as a microphone, sound card, etc.
The first playback device 103 may be any device that may be used to play audio data. The first playing device 103 may be, for example, an SPK (Speaker) shown in fig. 1, or may be other devices that may be used to play audio data, such as a Speaker, a sound box, etc. Similarly, the second playback device 203 may be any device that can be used to play audio data. The second playing device 203 may be, for example, an SPK (Speaker) shown in fig. 1, or may be other devices that may be used to play audio data, such as a Speaker, a sound box, etc. The present application does not make any restrictions on the first audio collection device 102, the first playback device 103, the second audio collection device 202, and the second playback device 203.
The first interphone 10 and the second interphone 20 may perform data transmission through any circuit capable of realizing digital signal transmission. The first interphone 10 and the second interphone 20 may transmit data through an RS485 circuit as in fig. 1, and may transmit data through a serial transcoding line circuit.
In one possible embodiment, to further improve the anti-interference capability of the intercom system, an RS485 circuit with a stronger anti-interference capability may be selected to implement data transmission between the first intercom 10 and the second intercom 20.
Referring to fig. 1, the first interphone 10 may further include: the first power amplifier PA (Power Amplifier), 104, the second intercom 20 may further include: a second power amplifier PA204.
The first PA104 is connected with the first MCU101 and the first playback device 103, and when the first intercom needs to play audio, the first MCU101 can drive the first PA104 to amplify an audio signal, and then drive the first playback device 103 to play audio. The second PA204 is connected to the second MCU201 and the second playback device 203, and when the second intercom needs to play audio, the second MCU201 may drive the second PA204 to amplify a signal of the audio data, and further drive the second playback device 203 to play the audio data.
It can be understood that, when the intercom direction of the first intercom 10 is the data sender, and the intercom direction of the second intercom 20 is the data receiver, if the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data, it is indicated that the audio energy of the audio data collected by the current first audio collecting device 102 is greater, and the audio energy of the audio data collected by the second audio collecting device 202 is smaller, that is, the first intercom 10 still needs to send the audio data, the intercom direction of the first intercom 10 needs to be kept as the data sender, the second intercom 20 still needs to receive the audio data, and the intercom direction of the second intercom 20 needs to be kept as the data receiver. Accordingly, in case the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data, the second MCU201 needs to transmit the hold message data to the first MCU101, so that the first MCU101 drives the first audio acquisition device 102 to repeatedly perform the step of acquiring the first analog audio data in response to the hold message data.
Then, when the intercom direction of the first intercom 10 is the data sender and the intercom direction of the second intercom 20 is the data receiver, if the first audio energy of the first digital audio data is not greater than the second audio energy of the second digital audio data, it indicates that the audio energy of the audio data collected by the current first audio collection device 102 is smaller, that is, the audio energy of the audio data collected by the second audio collection device 202 is larger, that is, the first intercom 10 needs to receive the audio data, the intercom direction of the first intercom 10 needs to be switched to the data receiver, the second intercom 20 needs to send the audio data, and the intercom direction of the second intercom 20 needs to be switched to the data sender.
Based on this, in order to achieve switching of the intercom directions of the first intercom 10 and the second intercom 20, in a possible embodiment, the second MCU201 is further configured to send switching message data to the first MCU101 in case the first audio energy of the first digital audio data is not greater than the second audio energy of the second digital audio data.
The first MCU101 is further configured to send response message data to the second MCU201 in response to the switching message data, and switch the intercom direction of the first intercom 10 to the data receiving party.
The second MCU201 is further configured to switch the intercom direction of the second intercom 20 to the data sender in response to the response message data.
It can be appreciated that when the intercom direction of the first intercom 10 is switched to the data receiving side, the first intercom 10 can be regarded as a new second intercom to implement the functions of the second intercom described herein. Similarly, when the intercom direction of the second intercom 20 is switched to the data sender, the second intercom 20 may be regarded as a new first intercom to implement the functions of the first intercom described herein.
By adopting the embodiment, the first interphone and the second interphone can synchronously switch the intercom directions by sending the switching message data to the first MCU through the second MCU under the condition that the first audio energy of the first digital audio data is not larger than the second audio energy of the second digital audio data and the first MCU responds to the mode that the switching message data sends the response message data to the second MCU. Because the first interphone and the second interphone can synchronously switch the intercom directions, the situations of blocking, word loss and the like when the intercom directions are switched can be avoided, and the stability of data transmission of an intercom system is improved.
Referring to the foregoing description, the intercom system provided by the application can determine whether the first intercom and the second intercom need to switch intercom directions according to the detection of the audio energy, that is, determine whether the data transmission direction between the first intercom and the second intercom needs to be changed. An exemplary description of how the audio energy of the digital audio data is acquired will be given below.
In one possible embodiment, the audio energy of the digital audio data may be obtained by: determining the amplitude corresponding to each sampling point in the digital audio data; and calculating the audio energy of the digital audio data in the preset sampling time according to the amplitude corresponding to each sampling point.
The digital audio data may be the first digital audio data or the second digital audio data.
For example, assuming that the sampling frequency is 200Hz, that is, the time interval of each sampling point is 0.005s, if the preset sampling duration is 1s, the preset sampling duration contains 200 sampling points in total, and the average value of the amplitudes corresponding to the 200 sampling points can be used as the audio energy of the digital audio data in the preset sampling duration, and the root mean square of the amplitudes corresponding to the 200 sampling points can also be used as the audio energy of the digital audio data in the preset sampling duration.
With the embodiment, the amplitude corresponding to each sampling point in the digital audio data can be determined; according to the amplitude corresponding to each sampling point, calculating the audio energy mode of the digital audio data in the preset sampling time length to obtain the first audio energy of the first digital audio data and the second digital energy of the second digital audio data, and facilitating the second MCU to determine whether the first interphone and the second interphone need to switch the intercom direction or not through the comparison of the audio energy, so that the intercom direction of the first interphone and the intercom direction of the second interphone can be effectively switched in time through the detection and comparison of the audio energy.
In order to ensure the correctness and integrity of the data transmission, in a possible embodiment, the first MCU101 is further configured to backup the first analog audio data to obtain backup analog audio data.
The second MCU201 is further configured to perform data verification on the first digital audio data, and perform a step of converting the first digital audio data into analog audio data through the second DAC, transmitting the analog audio data to the second playback device 203, and transmitting the hold message data to the first MCU101 if the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data if the verification is successful; in case of a check failure, retransmission message data is transmitted to the first MCU 101.
The first MCU101 is further configured to convert the backup analog audio data into third digital audio data through the first ADC in response to retransmitting the message data, and transmit the third digital audio data to the second MCU201.
It will be appreciated that, if the backup analog audio data is obtained by backing up the first analog audio data, the third digital audio data obtained by converting the backup analog audio data is substantially the same as the first digital audio data obtained by converting the first analog audio data, and the first MCU101 sends the third digital audio data to the second MCU201, which is equivalent to sending the first digital audio data to the second MCU201, that is, retransmission of the first digital audio data is achieved.
The data check means, for example, whether the received first digital audio data is accurately checked, specifically, may refer to CRC check, where the first MCU101 performs polynomial computation on the first digital audio data and attaches the obtained result to the back of a data frame for transmitting the first digital audio data, and after the second MCU201 receives the first digital audio data, performs polynomial computation identical to that of the first MCU101 according to the received first digital audio data, compares the obtained result with the result behind the received data frame, and if the difference between the two results is smaller than a preset threshold, the check is successful, that is, the second MCU receives the accurate first digital audio data; if the difference value between the two is not smaller than the preset threshold value, the verification fails, namely the second MCU does not receive the accurate first digital audio data, and the first MCU is required to retransmit the data.
By selecting the embodiment, the correctness and the integrity of the first digital audio data received by the second MCU can be checked through a data checking mode, if the checking is successful, the first digital audio data can be converted into analog audio data and played, if the checking is failed, retransmission message data can be sent to the first MCU, so that the first MCU retransmits the data, the correctness and the integrity of data transmission are ensured as much as possible, and the correctness and the integrity of intercom system data transmission are improved.
As described above, in this embodiment, the first MCU101 needs to be able to continue to perform the relevant steps of implementing a call in case of receiving message data transmitted by the second MCU 201. However, a packet loss may occur during the data transmission process, and if the packet loss occurs in the message data sent by the second MCU201, the first MCU101 may wait for the message data, so that the call may not be realized for a long time. In order to ensure that the intercom system can normally implement a conversation, in a possible embodiment, the first MCU101 is further configured to, in a preset duration after sending the first digital audio data to the second MCU201, drive the first audio acquisition device 102 to perform the step of obtaining the first analog audio data if the message data sent by the second MCU201 is not received.
The preset duration may be set according to experience or actual requirements, and exemplary preset durations may be set to 1s, 2s, etc.
The message data may refer to the hold message data described above, or may refer to the retransmission message data or the handover message data described above.
With the embodiment, if the first MCU does not receive the message data sent by the second MCU within the preset time period after the first MCU sends the first digital audio data to the second MCU, a new first analog audio signal may be obtained again, so as to avoid the situation that the intercom system cannot continue to perform the relevant steps of implementing the call due to the fact that the first MCU does not receive the message data for a long time, so as to ensure that the intercom system can implement the call normally.
In another possible embodiment, if the first MCU does not receive the message data sent by the second MCU within the preset time period after the first MCU sends the first digital audio data to the second MCU, the first MCU may also convert the backup analog audio data into the third digital audio data through the first ADC and send the third digital audio data to the second MCU201, and retransmit the first digital audio signal to the second MCU.
Based on the same inventive concept, the embodiment of the application also provides an intercom method applied to the first intercom, referring to fig. 2, the method comprises the following steps:
s201, acquiring first analog audio data;
S202, converting the first analog audio data into first digital audio data, and sending the first digital audio data to the second interphone.
The first interphone sends the first digital audio data to the second interphone, so that the second interphone converts the first digital audio data into analog audio data after receiving the first digital audio data, plays the analog audio data, and sends the holding message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data. The second digital audio data is obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data.
S203, in response to the hold message data, the step of acquiring the first analog audio data is repeatedly performed.
The embodiment of the application also provides an intercom method applied to the second intercom, referring to fig. 3, the method comprises the following steps:
s301, receiving first digital audio data.
The first digital audio data is first analog audio data acquired by the first interphone, and the first analog audio data is converted into first digital audio data and then sent to the second interphone.
S302, converting the first digital audio data into analog audio data and playing the analog audio data.
S303, in the case that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data, the holding message data is sent to the first interphone.
The second interphone sends the hold message data to the first interphone, so that the first interphone responds to the hold message data to acquire the first analog audio data. The second digital audio data is obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data.
In order to more clearly explain the intercom method provided by the present application, in the intercom system shown in fig. 1, taking an intercom direction of a first intercom as a data sender and an intercom direction of a second intercom as a data receiver as an example, an execution flow of the first intercom and the second intercom in the intercom method provided by the present application is described, referring to fig. 4, where the method includes:
s401, the first interphone acquires ADC audio data.
S401 corresponds to the aforementioned first audio capturing device acquiring the first analog audio data.
S402, the first interphone performs uplink audio processing.
The upstream audio is the first analog audio data, and S402 is equivalent to the first MCU converting the first analog audio data into the first digital audio data through the first ADC.
S403, the first interphone backs up one frame of audio data.
S403 is equivalent to the foregoing first MCU backing up the first analog audio data, to obtain backup analog audio data.
S404, the first interphone sends the audio data to a serial port TX (Transmit).
The audio data are the first digital audio data, and the first interphone sends the first digital audio data through the TX serial port of the first MCU. S404 corresponds to the first MCU transmitting the first digital audio data to the second MCU of the second interphone.
S405, the first interphone updates the serial port state so that the serial port state is a receiving message.
Because the first interphone has sent the first digital audio data to the second interphone, and the relevant steps of realizing the conversation can be continuously executed only by receiving the message data sent by the second interphone, the first interphone needs to update the serial port state to the receiving message so that the first interphone can receive the message data sent by the second interphone through the serial port of the first MCU.
S406, the second interphone receives the audio data through a serial port RX (Receiver).
The audio data are the first digital audio data, and the second interphone receives the first digital audio data through an RX serial port of the second MCU. S404 corresponds to the aforementioned second MCU receiving the first digital audio data.
S407, performing CRC check on the second interphone, if the check is successful, executing S410-S418 by the second interphone, and if the check is failed, executing S408-S409 by the second interphone.
S407 corresponds to the aforementioned second MCU performing data verification on the first digital audio data.
S408, the second interphone encapsulates the message "Retransmit (RESEND)".
S409, the second interphone sends message data 'RESEND' through the serial port TX.
"RESEND" is the retransmission message data. S408-S409 correspond to the foregoing case where the verification fails, the second MCU transmits retransmission message data to the first MCU.
S410, the second interphone compares the uplink and downlink audio energy.
S410 corresponds to the second MCU comparing the first audio energy of the first digital audio data with the second audio energy of the second digital audio data.
S411, the second interphone updates the state machine.
And updating the intercom direction of the second intercom recorded in the software program according to the comparison result of the S410. If the first audio energy of the first digital audio data is not greater than the second audio energy of the second digital audio data, the intercom direction needs to be switched, namely the intercom direction of the second intercom is updated to be the data sender; if the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data, the intercom direction does not need to be switched, namely the intercom direction of the second intercom remains unchanged and is still the data receiver.
S412, the second interphone judges whether state switching is needed, if so, the second interphone executes S416-S418; if not, the second interphone performs S413 to S415.
And the second interphone judges whether the intercom directions of the current first interphone and the second interphone need to be changed according to the intercom directions of the second interphone recorded by the software program in the S411.
S413, the second interphone packages the message "KEEP current status (KEEP)".
S414, the second interphone transmits the message data "KEEP" through the serial port TX.
"KEEP" is the hold message data described above. S413-S414 correspond to the second MCU transmitting the hold message data to the first MCU in case the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data as described above.
S415, the second interphone updates the serial port state so that the serial port state is the received data.
Because the second interphone sends the holding message data to the first interphone, the first interphone can acquire new first analog audio data and convert the new first analog audio data into first digital audio data to be sent to the second interphone, and therefore the second interphone needs to update the serial port state into receiving data, and the second interphone can receive the first digital audio data sent by the first interphone through the serial port of the second MCU.
S416, the second interphone encapsulates the message "switch status (CHANGE)".
S417, the second interphone transmits the message data "CHANGE" through the serial port TX.
"CHANGE" is the aforementioned handover message data. S416-S417 correspond to the second MCU transmitting the switching message data to the first MCU in case the first audio energy of the first digital audio data is not greater than the second audio energy of the second digital audio data as described above.
S418, the second interphone updates the serial port state so that the serial port state is a receiving message.
Because the second interphone sends the switching message data to the first interphone, the second interphone can switch the intercom direction of the second interphone only after receiving the response message data sent by the first interphone, and therefore the second interphone needs to update the serial port state into a receiving message so that the second interphone can receive the response message data sent by the first interphone through the serial port of the second MCU.
S419, the first interphone receives message data through a serial port RX.
Message data refers to any one of the retransmission message data, the hold message data, and the handover message data.
S420, the first interphone judges which of the message data is the hold message data/the switch message data/the retransmission message data, if the message data is the retransmission message data, the first interphone executes the step S421; if the message data is kept, the first interphone executes step S422; if the message data is the switching message data, the first interphone executes steps S423 to S427.
S421, the first interphone sends the backup data to the serial port TX.
The backup data is the backup analog audio data obtained in the step S403, and after the first interphone converts the backup analog audio data into third digital audio data, the third digital audio data is sent to the second interphone. S421 corresponds to the foregoing first MCU converting the backup analog audio data into the third digital audio data through the first ADC in response to the retransmission message data, and transmitting the third digital audio data to the second MCU.
S422, the first interphone updates the serial port state so that the serial port state is the sending data.
Because the first interphone receives the hold message data sent by the second interphone, the first interphone needs to repeatedly execute the step S401 to acquire new first analog audio data and convert the new first analog audio data into first digital audio data to be sent to the second interphone, and therefore the first interphone needs to update the serial port state into the sending data, so that the first interphone can send the new first digital audio data to the second interphone through the serial port of the first MCU.
S423, the first interphone updates the serial port state so that the serial port state is a sending message.
Because the first interphone receives the switching message data sent by the second interphone, the first interphone needs to switch the intercom direction to a data receiver and send response message data to the second interphone so that the second interphone synchronously switches the intercom direction, and therefore the first interphone needs to update the serial port state to send a message so that the first interphone can send the response message data to the second interphone through the serial port of the first MCU.
S424, the first interphone encapsulates the message RESPONSE.
S425, the first interphone transmits the message data "RESPONSE" through the serial port TX.
The RESPONSE is the RESPONSE message data. S424-S425 correspond to the aforementioned first MCU transmitting response message data to the second MCU in response to the handover message data.
S426, the first interphone updates the serial port state so that the serial port state is the received data.
Because the first interphone has sent response message data to the second interphone, the second interphone can respond to the response message data, the intercom direction of the second interphone is switched to be a data sender, and the second interphone can be used as the data sender to acquire first analog audio data and convert the first analog audio data into first digital audio data to be sent to the first interphone, so that the first interphone needs to update the serial port state into receiving data, and the first interphone can receive the first digital audio data sent by the second interphone through the serial port of the first MCU.
S427, the first interphone switches the intercom direction, receives data and plays the data.
The first interphone switches the intercom direction to a data receiver, receives first digital audio data sent by the second interphone, converts the first digital audio data into analog audio data, and plays the analog audio data.
S428, the second interphone receives the message data "RESPONSE" through the serial port RX.
The second interphone receives response message data sent by the first interphone through a serial port RX of the second MCU.
S429, the second interphone updates the serial port state, so that the serial port state is the sending data.
Because the second interphone receives the response message data sent by the first interphone, the second interphone responds to the response message data, the intercom direction of the second interphone is switched to be a data sender, and the second interphone is used as the data sender to acquire the first analog audio data and convert the first analog audio data into the first digital audio data to be sent to the first interphone, so that the second interphone needs to update the serial port state into the sending data, and the second interphone can send the first digital audio data to the first interphone through the serial port of the second MCU.
S430, the second interphone switches the intercom direction, sends data and stops playing.
The second interphone switches the intercom direction to a data sender, stops playing the analog audio data, and is used as the data sender to acquire the first analog audio data, convert the first analog audio data into the first digital audio data and send the first digital audio data to the first interphone.
Referring to the embodiment shown in fig. 4, in the intercom method provided by the application, in an initial state, a first intercom is used as a data sender, and a second intercom is used as a data receiver. The first interphone actively transmits the first digital audio data, and the second interphone decides the intercom direction according to the comparison of the first audio energy and the second audio energy.
If the intercom direction is unchanged, the second intercom sends a message kept in one direction to the first intercom after receiving the first digital audio data each time, namely sends the data of the kept message. After receiving the hold message data, the first interphone transmits the next frame of audio data, namely, transmits new first digital audio data.
If the intercom direction needs to be changed, the second intercom sends a message of changing the direction to the first intercom, namely sends switching message data. After receiving the switching message data, the first interphone replies a response message to the second interphone, namely replies the response message data to the second interphone, and changes the intercom direction of the first interphone into a data receiver. And simultaneously, the second interphone synchronously changes the intercom direction after receiving the response message data, and changes the intercom direction of the second interphone into a data sender.
Referring to the embodiment shown in fig. 1 and fig. 4, the intercom system provided by the application uses the MCU as a main control, realizes acquisition and playing of analog audio data through the MIC and the SPK, performs conversion between the analog audio data and digital audio data through the built-in ADC and the DAC of the MCU, and realizes transmission of digital audio data between the first intercom and the second intercom through the RS485 circuit. And the data transmission direction is controlled through software programming, namely the intercom direction of the first interphone and the second interphone is controlled, so that half-duplex intercom is realized. The half-duplex RS485 chip is used in the RS485 circuit on the hardware, and data can be transmitted in one direction at the same time, so that the intercom direction of the first interphone and the second interphone can be effectively switched through the intercom method and time shown in the embodiment of fig. 4.
Therefore, the embodiment of the application can realize the intercom function of the intercom system without using a half-duplex voice control chip, thereby reducing the cost of devices. Meanwhile, in the embodiment of the application, the digital audio data are transmitted between the first interphone and the second interphone, so that the anti-interference capability of the intercom system on environmental noise can be improved. And can combine the message communication mechanism that the audio frequency energy detects the mechanism through the figure 4 shows, whether the intercom direction of automatic monitoring first intercom and second intercom needs to switch, and can realize synchronous switching data transmission direction, the intercom direction of synchronous switching first intercom and second intercom promptly to can realize the switching of the intercom direction of first intercom and second intercom through software programming, solve echo and squeal problem, thereby realize low-cost, high-quality half duplex intercom.
Corresponding to the foregoing intercom method applied to the first intercom, an embodiment of the present application provides an intercom device applied to the first intercom, referring to fig. 5, where the device includes:
An acquisition module 501, configured to acquire first analog audio data;
The conversion module 502 is configured to convert the first analog audio data into first digital audio data, and send the first digital audio data to the second interphone, so that the second interphone converts the first digital audio data into analog audio data after receiving the first digital audio data, plays the analog audio data, and sends the hold message data to the first interphone when the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data; the second digital audio data are obtained by obtaining second analog audio data by a second interphone and converting the second analog audio data;
a response module 503 for repeating the step of acquiring the first analog audio data in response to the hold message data.
Corresponding to the foregoing intercom method applied to the second intercom, an embodiment of the present application provides an intercom device applied to the second intercom, referring to fig. 6, where the device includes:
A receiving module 601, configured to receive first digital audio data; the first digital audio data is first analog audio data obtained by the first interphone, and the first analog audio data is converted into first digital audio data and then sent to the second interphone;
A playing module 602, configured to convert the first digital audio data into analog audio data, and play the analog audio data;
A sending module 603, configured to send hold message data to the first interphone, so that the first interphone obtains first analog audio data in response to the hold message data, when the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data; the second digital audio data is obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data.
The embodiment of the application also provides an electronic device, as shown in fig. 7, including:
a memory 701 for storing a computer program;
The processor 702 is configured to execute the program stored in the memory 701, if the electronic device is the first intercom, implement the following steps:
acquiring first analog audio data;
Converting the first analog audio data into first digital audio data, and transmitting the first digital audio data to the second interphone, so that the second interphone converts the first digital audio data into analog audio data after receiving the first digital audio data, plays the analog audio data, and transmits the holding message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data; the second digital audio data are obtained by obtaining second analog audio data by a second interphone and converting the second analog audio data;
the step of acquiring the first analog audio data is repeatedly performed in response to the hold message data.
If the electronic equipment is the second interphone, the following steps are realized:
Receiving first digital audio data; the first digital audio data is first analog audio data obtained by the first interphone, and the first analog audio data is converted into first digital audio data and then sent to the second interphone;
converting the first digital audio data into analog audio data and playing the analog audio data;
Transmitting hold message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data, so that the first interphone responds to the hold message data to acquire first analog audio data; the second digital audio data is obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data.
And the electronic device may further comprise a communication bus and/or a communication interface, through which the processor 702, the communication interface, and the memory 701 communicate with each other.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the intercom methods described above.
In yet another embodiment of the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the intercom methods of the previous embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a Solid state disk (Solid STATE DISK, SSD), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for method, apparatus, electronic device, computer-readable storage medium, and computer program product embodiments containing instructions, the description is relatively simple as it is substantially similar to system embodiments, with reference to the section descriptions of method embodiments being merely illustrative.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims (10)
1. The intercom system is characterized by comprising a first intercom and a second intercom, wherein the first intercom and the second intercom realize data transmission through a digital signal transmission circuit; the first interphone includes: first MCU, first audio acquisition equipment, first playback devices, the second intercom includes: the second MCU, second audio acquisition equipment, second playback device, include in the first MCU: a first ADC, a first digital-to-analog converter DAC; the second MCU comprises: a second ADC and a second DAC;
The first audio acquisition device is used for acquiring first analog audio data and sending the first analog audio data to the first MCU;
the first MCU is configured to convert the first analog audio data into first digital audio data through the first ADC if the intercom direction of the first intercom is a data sender, and send the first digital audio data to the second MCU;
The second MCU is configured to receive the first digital audio data if the intercom direction of the second intercom is a data receiver, convert the first digital audio data into analog audio data through the second DAC, send the analog audio data to the second playback device, and send a hold message data to the first MCU if the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data;
The second digital audio data are obtained by the second audio acquisition device obtaining second analog audio data and sending the second analog audio data to the second MCU, and the second MCU converts the second analog audio data through the second ADC;
the second playing device is used for playing the analog audio data;
the first MCU is used for responding to the holding message data and driving the first audio acquisition device to repeatedly execute the step of acquiring the first analog audio data.
2. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
The second MCU is further used for sending switching message data to the first MCU under the condition that the first audio energy of the first digital audio data is not larger than the second audio energy of the second digital audio data;
the first MCU is further used for responding to the switching message data, sending response message data to the second MCU and switching the intercom direction of the first intercom to the data receiver;
the second MCU is further configured to switch the intercom direction of the second intercom to the data sender in response to the response message data.
3. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
The first MCU is further used for backing up the first analog audio data to obtain backup analog audio data;
The second MCU is further configured to perform data verification on the first digital audio data, and perform the steps of converting the first digital audio data into analog audio data through the second DAC if the verification is successful, transmitting the analog audio data to the second playback device, and transmitting hold message data to the first MCU if the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data; transmitting retransmission message data to the first MCU under the condition that verification fails;
The first MCU is further used for responding to the retransmission message data, converting the backup analog audio data into third digital audio data through the first ADC, and sending the third digital audio data to the second MCU.
4. The system of claim 1, wherein the system further comprises a controller configured to control the controller,
The first MCU is further configured to, in a preset duration after the first digital audio data is sent to the second MCU, drive the first audio acquisition device to execute the step of acquiring the first analog audio data if the message data sent by the second MCU is not received.
5. The system of claim 1, wherein the audio energy of the digital audio data is obtained by:
determining the amplitude corresponding to each sampling point in the digital audio data;
and calculating the audio energy of the digital audio data in the preset sampling duration according to the amplitude corresponding to each sampling point.
6. The system of claim 1, wherein the first intercom and the second intercom implement data transmission through an RS485 circuit.
7. An intercom method, applied to a first intercom, comprising:
acquiring first analog audio data;
Converting the first analog audio data into first digital audio data, and sending the first digital audio data to a second interphone, so that the second interphone converts the first digital audio data into analog audio data after receiving the first digital audio data, plays the analog audio data, and sends a holding message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data; the second digital audio data are obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data;
And in response to the hold message data, repeating the step of acquiring the first analog audio data.
8. An intercom method, characterized by being applied to a second intercom, the method comprising:
Receiving first digital audio data; the first digital audio data are first analog audio data acquired by a first interphone, and the first analog audio data are converted into first digital audio data and then sent to the second interphone;
converting the first digital audio data into analog audio data and playing the analog audio data;
Transmitting hold message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data, so that the first interphone responds to the hold message data to acquire first analog audio data; the second digital audio data is obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data.
9. An intercom device, characterized by being applied to a first intercom, said device comprising:
the acquisition module is used for acquiring the first analog audio data;
The conversion module is used for converting the first analog audio data into first digital audio data and sending the first digital audio data to a second interphone, so that the second interphone converts the first digital audio data into analog audio data after receiving the first digital audio data, plays the analog audio data and sends maintenance message data to the first interphone under the condition that the first audio energy of the first digital audio data is larger than the second audio energy of the second digital audio data; the second digital audio data are obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data;
and the response module is used for responding to the holding message data and repeatedly executing the step of acquiring the first analog audio data.
10. An intercom device, characterized by being applied to a second intercom, said device comprising:
A receiving module for receiving first digital audio data; the first digital audio data are first analog audio data acquired by a first interphone, and the first analog audio data are converted into first digital audio data and then sent to the second interphone;
the playing module is used for converting the first digital audio data into analog audio data and playing the analog audio data;
A transmitting module, configured to transmit hold message data to the first interphone when the first audio energy of the first digital audio data is greater than the second audio energy of the second digital audio data, so that the first interphone responds to the hold message data to acquire first analog audio data; the second digital audio data is obtained by obtaining second analog audio data by the second interphone and converting the second analog audio data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410398568.7A CN117998227B (en) | 2024-04-02 | 2024-04-02 | Intercom system, method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410398568.7A CN117998227B (en) | 2024-04-02 | 2024-04-02 | Intercom system, method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117998227A CN117998227A (en) | 2024-05-07 |
CN117998227B true CN117998227B (en) | 2024-07-02 |
Family
ID=90895615
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410398568.7A Active CN117998227B (en) | 2024-04-02 | 2024-04-02 | Intercom system, method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117998227B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101018123A (en) * | 2007-02-14 | 2007-08-15 | 四川易恒科技发展有限公司 | A Linux operation system based voice communication method with CPK authentication |
WO2011062016A1 (en) * | 2009-11-20 | 2011-05-26 | ダイキン工業株式会社 | Intercom system |
Family Cites Families (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2485104A1 (en) * | 2002-05-09 | 2003-11-20 | Herman Cardenas | Audio network distribution system |
CN101184255B (en) * | 2006-11-13 | 2011-05-04 | 海能达通信股份有限公司 | System and method for performing digital demodulation to frequency modulated signal in digital wireless intercom system |
EP2485431B1 (en) * | 2007-07-27 | 2015-12-09 | Clear-Com Research Inc. | Method and terminal in a multi-point to multi-point intercom system |
US8692410B2 (en) * | 2008-09-27 | 2014-04-08 | Witricity Corporation | Wireless energy transfer with frequency hopping |
US20100203878A1 (en) * | 2009-02-10 | 2010-08-12 | Samsung Electronics Co., Ltd. | Portable device including a digital walkie-talkie module |
CN101902807B (en) * | 2010-07-05 | 2013-02-06 | 海能达通信股份有限公司 | Terminal of digital mobile wireless transferring system, method for adjusting transmission power thereof and system thereof |
CN102682583A (en) * | 2011-09-28 | 2012-09-19 | 朱良学 | Wireless digital remote control talkback all-in-one machine |
CN102572616B (en) * | 2012-03-21 | 2014-07-09 | 天津七一二通信广播有限公司 | Digital interphone with digital and analogue hybrid receiving function |
CN103428895B (en) * | 2013-08-27 | 2016-12-28 | 海能达通信股份有限公司 | Communication establishing method based on transfer mode, mobile station and transferring equipment |
KR101631130B1 (en) * | 2014-09-22 | 2016-06-17 | (주) 코콤 | Interphone functionality implemented system and method using a smartphone |
WO2016130992A1 (en) * | 2015-02-13 | 2016-08-18 | Reed Mark L | Multi-mode wireless intercom |
CN205039809U (en) * | 2015-11-04 | 2016-02-17 | 成都鼎桥通信技术有限公司 | Simulation intercom with audio frequency reinforcing |
SG11201806457UA (en) * | 2016-03-14 | 2018-08-30 | Bosch Gmbh Robert | Digital wireless intercom with user-selectable audio codecs |
CN207135090U (en) * | 2017-08-23 | 2018-03-23 | 杭州海康威视数字技术股份有限公司 | A kind of intercom |
CN109788113A (en) * | 2017-11-13 | 2019-05-21 | 北京小米移动软件有限公司 | Play the method and device of voice messaging |
CN109818641A (en) * | 2017-11-21 | 2019-05-28 | 北京小米移动软件有限公司 | Intercom and electronic equipment |
CN109818629A (en) * | 2017-11-22 | 2019-05-28 | 北京小米移动软件有限公司 | Intercom and electronic equipment |
CN107770635B (en) * | 2017-11-23 | 2023-12-22 | 黄清文 | Interphone, control method thereof and interphone system |
CN108989948B (en) * | 2018-08-08 | 2024-03-08 | 福建科立讯通信有限公司 | Audio channel switching realization circuit and method for digital interphone |
CN111181585B (en) * | 2020-04-13 | 2021-01-26 | 北京云迹科技有限公司 | Intercommunication equipment and intercommunication system |
WO2023097461A1 (en) * | 2021-11-30 | 2023-06-08 | 海能达通信股份有限公司 | Multi-carrier receiving method and multi-carrier receiver |
CN116260477B (en) * | 2022-11-25 | 2025-06-03 | 广州广哈通信股份有限公司 | Intercom access device and emergency command system |
-
2024
- 2024-04-02 CN CN202410398568.7A patent/CN117998227B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101018123A (en) * | 2007-02-14 | 2007-08-15 | 四川易恒科技发展有限公司 | A Linux operation system based voice communication method with CPK authentication |
WO2011062016A1 (en) * | 2009-11-20 | 2011-05-26 | ダイキン工業株式会社 | Intercom system |
Also Published As
Publication number | Publication date |
---|---|
CN117998227A (en) | 2024-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113472488B (en) | HARQ-ACK feedback mode determining method, HARQ-ACK feedback mode configuring method and HARQ-ACK feedback mode configuring equipment | |
CN105872654B (en) | Bluetooth connection switching method, device and system in audio playing system | |
US9544703B2 (en) | Detection of device configuration | |
TW201129015A (en) | System and method for supporting higher-layer protocol messaging in an in-band modem | |
CN105991857A (en) | Method and device for adjusting reference signal | |
CN116260477B (en) | Intercom access device and emergency command system | |
CN116996173A (en) | Data transmission method, device and system | |
CN117998227B (en) | Intercom system, method and device | |
CN110895939A (en) | Voice interaction method, device and system | |
US20230058981A1 (en) | Conference terminal and echo cancellation method for conference | |
CN110912577B (en) | Three-in-one digital interphone | |
EP4439989A1 (en) | Signal anti-interference method and electronic device | |
US9204206B2 (en) | Method and apparatus for transmitting signaling | |
CN105120198A (en) | Video calling system and realization method thereof capable of eliminating calling echoes | |
CN104396169A (en) | Method and apparatus for determining channel state information reference resource | |
CN104967728A (en) | Voice communication method | |
EP4451593A1 (en) | Communication method and device, storage medium, and computer program product | |
CN112910829A (en) | Audio sharing method, device and system | |
CN111491061A (en) | Audio detection method, device and related equipment for call scene | |
EP4029290B1 (en) | Methods and apparatus for low audio fallback from remote devices using associated device speaker | |
CN119316547B (en) | Video processing equipment | |
KR102257767B1 (en) | broadcasting output and transmission device | |
CN110322885B (en) | Artificial intelligent voice interaction method, computer program product and near-end electronic device thereof | |
CN115567864B (en) | Microphone gain adjusting method and device, storage medium and electronic equipment | |
JP2020010076A (en) | Lobby station, door phone system, and communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |