A method and system for realizing two-way voice intercom of intelligent camera

Through the two-way voice intercom method of smart cameras, the client, cloud server and NVR are used to manage IPC to achieve full-duplex intercom, which solves the problem of low communication efficiency of existing cameras, improves user experience and communication efficiency, and satisfies users The need for two-way intercom.

CN115442673BActive Publication Date: 2024-10-22CHENGDU JIXIANG RUIYI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211071885.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-02
Publication Date
2024-10-22
Estimated Expiration
2042-09-02

AI Technical Summary

Technical Problem

Existing cameras cannot achieve two-way voice intercom, and camera communication on the market is usually simplex or half-duplex, resulting in poor user experience and low communication efficiency.

Method used

Through the implementation method of smart camera two-way voice intercom, full-duplex intercom is realized using the client, cloud server, network hard disk video recorder NVR and consumer camera IPC. The client takes the lead in starting or stopping the intercom function, and the NVR manages the audio of the IPC. Data interface ensures the pushing and decoding of audio data and optimizes communication efficiency.

Benefits of technology

It realizes full-duplex intercom between mobile phones and cameras, optimizes user experience, improves communication efficiency, and meets users’ safe communication needs for home care and nursing homes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442673B_ABST
    Figure CN115442673B_ABST
Patent Text Reader

Abstract

The present invention provides a method for realizing two-way voice intercom of an intelligent camera, comprising the following steps: opening intercom: opening the voice intercom function is controlled by the user end, when the user end opens the voice, a request with audio parameters is sent to the cloud server, the cloud server sends the request to the network hard disk recorder NVR, after the NVR receives the request, it sends a command to open the voice intercom to the consumer camera IPC through the protocol library, after the intercom is successfully opened, the audio data interface sent by the IPC is opened to receive the audio data sent by the IPC. The beneficial effects of the present invention are: full-duplex intercom between the mobile phone and the camera can be realized, the user experience is optimized, and the communication efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a smart camera, and in particular to a method and system for realizing two-way voice intercom of a smart camera. Background Art

[0002] With the widespread application of the Internet of Things in life, the use of ordinary cameras to protect the home can no longer meet the needs of users. In outdoor, store, home and other scenarios, users are more looking forward to a smart device and software that can realize the two-way intercom function, communicate and persuade the hidden risks and threats under surveillance, and better protect their lives and property.

[0003] Among them, the defects of existing cameras are as follows:

[0004] 1. Ordinary cameras are used for fixed-point monitoring. Intercom cannot be enabled through the camera, and information cannot be communicated in a timely manner when the person and the machine are separated.

[0005] Second, even if the cameras used in many application scenarios on the market can intercom, they are limited to simplex and half-duplex communication, resulting in poor user experience and low communication efficiency.

[0006] In order to solve the above problems, it is necessary to develop a camera that can realize full-duplex intercom between mobile phones and cameras, optimize user experience and improve communication efficiency. Summary of the invention

[0007] In order to solve the problems in the prior art, the present invention provides a method and system for realizing two-way voice intercom of an intelligent camera, which can realize full-duplex intercom between a mobile phone and a camera, optimize user experience, and improve communication efficiency.

[0008] The present invention provides a method for realizing two-way voice intercom of an intelligent camera, comprising the following steps:

[0009] Enable intercom: The voice intercom function is controlled by the user. When the user enables the voice, a request with audio parameters is sent to the cloud server. The cloud server sends this request to the network video recorder NVR. After receiving this request, the NVR sends a command to enable the voice intercom to the consumer camera IPC through the protocol library. After the intercom is successfully enabled, the audio data interface sent by the IPC is enabled to receive the audio data sent by the IPC.

[0010] Stop intercom: The stop voice intercom function is controlled by the user end. When the stop intercom is triggered, the user end sends a stop intercom request to the cloud server, and the cloud server forwards the request to the NVR. When the NVR receives the stop intercom request, it first sends a stop intercom command to the IPC, and then closes the interface that captures the intercom data sent by the IPC.

[0011] As a further improvement of the present invention, the method further includes: the user end plays the IPC audio, and when the NVR receives the audio sent by the IPC, the NVR first checks whether to send the IPC audio parameters to the cloud server;

[0012] If the NVR does not send the IPC audio parameters to the cloud server, the NVR obtains the encoding format, bitstream size, sampling rate, bit depth, and channel parameters from the IPC, and then forwards these parameters to the cloud server, and then starts pushing the IPC audio data to the cloud server;

[0013] If the NVR has sent the IPC audio parameters to the cloud server, it will start pushing data directly.

[0014] As a further improvement of the present invention, the steps of playing the IPC audio at the user end are as follows:

[0015] S101, after the IPC collects the audio data, it sends the audio data to the NVR through the TCP link with the NVR;

[0016] S102, after receiving the audio data sent by the IPC, the NVR determines whether the audio configuration information has been sent to the cloud server. The method for determining whether the audio configuration has been sent is that the NVR uses a state machine to record the configuration information, and the configuration information includes: compression method, sampling rate, bit depth, and channel;

[0017] S102.1. If the audio configuration information has been sent, jump to S103;

[0018] S102.2. If the audio configuration information is not sent, the NVR parses the audio parameters from the received IPC audio data and then sends it to the cloud server. A private header is added to the audio data to carry the audio configuration information.

[0019] S103, the NVR removes the private header and tail of the received audio data and sends it to the cloud server;

[0020] S104, after receiving the push audio notification, the cloud server sends a message for setting the block size;

[0021] S105, the cloud server sends a user control message, specifies the event "stream record" and the stream ID, and then sends another user control message, specifies the event "stream start", and indicates the start of the stream to the user terminal;

[0022] S106, the user terminal creates a voice intercom instance and sets the intercom mode and audio parameters;

[0023] S107: The user end registers a listener and processes the voice intercom callback.

[0024] As a further improvement of the present invention, the method also includes: IPC plays the user-side audio, IPC plays the audio data sent by the user side, decodes according to the audio parameters set in advance, IPC obtains the current output volume from the configuration information, and then starts playing the audio data sent by the user side.

[0025] As a further improvement of the present invention, the IPC plays the user-side audio including the following steps:

[0026] S201, the user terminal sets the intercom mode, encoding format, and gain parameters for sound collection;

[0027] S202, the user terminal performs echo cancellation;

[0028] S203, the user terminal initiates a push stream to the cloud server, and after receiving the push audio notification, the cloud server specifies the stream record and stream ID to indicate the start of the stream to the NVR;

[0029] S204, after receiving the audio data sent by the cloud server, the NVR determines whether to set audio parameters to the IPC;

[0030] S205, the NVR sends the data sent by the cloud server to the IPC through the TCP link between the NVR and the IPC. This TCP link is the same link as the audio and video data sent by the IPC received by the NVR;

[0031] S206, after receiving the audio data, the IPC reads the output volume from the IPC configuration;

[0032] S207, after the IPC receives the audio data sent by the NVR, it pushes the data to the decoding unit for audio decoding;

[0033] S208. After the decoding unit completes processing of the audio data, the data is pushed to the audio output unit, and the audio data sent by the user end is played through the speaker.

[0034] As a further improvement of the present invention, in step S202, the user end adopts the audio stream in G711 format, and through the Speex library, converts the audio format first into pcm format, then into speex format, and finally into 711 format for echo cancellation; in step S204, the method of judging whether to send the audio configuration to the IPC is that the NVR end adopts a state machine method to record, and the audio parameters include: compression method, sampling rate, bit depth, and channel.

[0035] As a further improvement of the present invention, the user terminal is a mobile device.

[0036] As a further improvement of the present invention, the method further comprises:

[0037] The user sets the IPC output volume:

[0038] S301, the user sets the intercom volume and uploads it to the cloud server via HTTPS, and the cloud server then forwards it to the NVR via HTTPS;

[0039] S302, after receiving the command for setting the IPC output volume sent by the cloud server, the NVR sends the command for setting the IPC output volume and the output volume value sent by the cloud server to the NVR to the IPC via a TCP link;

[0040] S303, after receiving the command for setting the IPC output volume, the IPC saves the value of the output volume in the configuration file;

[0041] S304, the IPC returns the saved result to the NVR;

[0042] S305, NVR has a timeout mechanism. If the IPC does not return after 5 seconds of NVR sending a command, it is considered a timeout;

[0043] S306, after the NVR obtains the processing result replied by the IPC, it reports the result to the cloud server;

[0044] S307, the user end makes a corresponding prompt to the result returned to the cloud server through the NVR;

[0045] The user side displays the IPC output volume:

[0046] S401, when the NVR is connected to an IPC, a command for obtaining output volume is sent to the IPC via a TCP link;

[0047] S402, after receiving the command to obtain the output volume, the IPC reads the value of the output volume from the configuration and sends the value to the NVR via the TCP link;

[0048] S403, after receiving the output volume value replied by IPC, NVR first checks whether the value is legal;

[0049] S404, if it is legal, report this value to the cloud server, if it is illegal, report -1 to the cloud server as the initial value of the output volume;

[0050] S405, the user end obtains volume data from the cloud server through HTTPS for custom drawing. The principle is to set the maximum value of the progress bar to 100, and fill the color according to the percentage by obtaining the volume value to display it to the user.

[0051] As a further improvement of the present invention, the method further comprises:

[0052] NVR and cloud server interaction interface:

[0053] 1) Start intercom;

[0054] 2) Stop intercom;

[0055] 3) Receive APP intercom data;

[0056] 4) Send audio parameters: send intercom audio parameter interface to the cloud server;

[0057] 5) Send audio data: send audio data interface to the cloud server;

[0058] 6) Report attribute interface;

[0059] 7) Obtain cloud server interaction ID interface: Obtain the cloud server interaction ID based on the device's MAC;

[0060] NVR and IPC interaction interface:

[0061] 1) Start intercom;

[0062] 2) Stop intercom;

[0063] 3) Send audio configuration;

[0064] 4) Get audio configuration;

[0065] 5) Send audio data to IPC;

[0066] 6) Set the output volume;

[0067] 7) Get the output volume.

[0068] The present invention also provides a system for implementing two-way voice intercom of an intelligent camera, comprising a user terminal, a cloud server, a network video recorder NVR and a consumer camera IPC, wherein the user terminal interacts with the cloud server, the cloud server interacts with the network video recorder NVR, the network video recorder NVR interacts with the consumer camera IPC, and the system is used to implement the described method.

[0069] The present invention also provides a system for implementing two-way voice intercom of an intelligent camera, a readable storage medium, wherein the readable storage medium stores execution instructions, and the execution instructions are used to implement the described method when executed by a processor.

[0070] The beneficial effect of the present invention is that through the above scheme, full-duplex intercom between the mobile phone and the camera can be achieved, the user experience is optimized, and the communication efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other solutions can be obtained based on these drawings without paying creative work.

[0072] Figure 1 It is an architecture diagram of a system for realizing two-way voice intercom of an intelligent camera according to the present invention.

[0073] Figure 2 The present invention is an interactive schematic diagram of a system for realizing two-way voice intercom of an intelligent camera.

[0074] Figure 3 The present invention is a flow chart of a method for realizing two-way voice intercom of an intelligent camera. DETAILED DESCRIPTION

[0075] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0076] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the scope of protection of the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0077] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.

[0078] The present invention will be further described below in conjunction with the accompanying drawings and specific implementation methods.

[0079] like Figures 1 to 3 As shown, a system for implementing two-way voice intercom of a smart camera includes a user terminal 1, a cloud server 2, a network hard disk video recorder 3 and a consumer camera 4. The user terminal 1 interacts with the cloud server 2, the cloud server 2 interacts with the network hard disk video recorder 3, and the network hard disk video recorder 3 interacts with the consumer camera 4.

[0080] The user terminal 1 is preferably a mobile device, such as a mobile phone, which is called an APP terminal.

[0081] The cloud server 2 is referred to as the cloud server for short.

[0082] The software part of this system is mainly written in Java and C++ languages, including audio acquisition, audio encoding, streaming, audio decoding, volume adjustment, server storage, etc.

[0083] The network video recorder 3 is abbreviated as NVR, which is a sub-device manager.

[0084] Consumer camera 4 is abbreviated as IPC, which is a consumer camera, smart camera, including but not limited to: outdoor barrel camera, shaking head camera, conch camera.

[0085] NVR and cloud server interaction interface:

[0086] 1> Start intercom start_voice_intercom_cb;

[0087] 2> Stop intercom stop_voice_intercom_cb;

[0088] 3> Receive APP intercom data recv_voice_intercom_data_cb;

[0089] 4> Send audio parameters stream_send_config: send intercom audio parameter interface to the cloud server;

[0090] 5> Send audio data send_media_data: send audio data interface to the cloud server;

[0091] 6> Report attribute interface report_ipc_properties_value;

[0092] 7> Get the cloud interaction ID interface iotx_dm_subdev_query: Get the cloud interaction ID based on the device's MAC.

[0093] NVR and IPC interaction interface:

[0094] 1> Start intercom int MixedTalkStart(int channel, MixedAudioTalkFormat*format);

[0095] 2> Stop intercom int MixedTalkStop(int channel);

[0096] 3> Send audio configuration int MixedTalkSetInfo(int channel,MixedAudioTalkOption* info);

[0097] 4> Get audio configuration int MixedTalkGetInfo(int channel,MixedAudioTalkOption* info);

[0098] 5> Send audio data to IPC int MixedTalkSendData(int channel, void* data,unsigned int datalen);

[0099] 6> Set the output volume int MixedTalkSetVolume(int channel, int Volume);

[0100] 7> Get the output volume int MixedTalkGetVolume(int channel, int *pVolume).

[0101] Voice intercom audio parameters:

[0102] struct MixedAudioTalkFormat {

[0103] int encode_type; encoding format, g711a, g711u

[0104] int bit_rate; bit rate, 192kbps, 128kbps

[0105] int sample_rate; sampling rate, 44100Hz, 8000Hz

[0106] int sample_width; bit depth, 16bit, 8bit

[0107] int vocal tract; vocal tract, MONO, STEREO

[0108] }.

[0109] A method for realizing two-way voice intercom of an intelligent camera, the specific implementation process is as follows:

[0110] Turn on intercom: The intercom function is turned on / off by the APP. When the APP turns on the voice, it will send the request with audio parameters to the cloud server, and the cloud server will send the request to the NVR. After receiving the request, the NVR will send the command to turn on the voice intercom to the IPC through the protocol library (managing the link relationship between the NVR and the IPC, and the NVR sending various commands to the IPC, receiving IPC replies, etc.). After the intercom is successfully turned on (whether it is successful or failed, the IPC will be sent to the NVR via the TCP link), the audio data interface sent by the IPC will be opened to receive the audio data sent by the IPC.

[0111] Stop intercom: Stopping voice intercom is controlled by the APP. When the stop intercom is triggered, the APP will send a request to stop intercom to the cloud server. The cloud server will forward the request to the NVR. When the NVR receives the stop intercom request, it will first send a stop intercom command to the IPC. Secondly, it will close the interface that captures the intercom data sent by the IPC (this interface is opened when the intercom is turned on).

[0112] APP plays IPC audio: When NVR receives audio from IPC, NVR first checks whether the IPC audio parameters are sent to the cloud server. If not, NVR obtains the encoding format, bit stream size, sampling rate, bit depth, channel and other parameters from IPC, and then forwards these parameters to the cloud server. Then it starts to push the IPC audio data to the cloud server. If NVR has sent the IPC audio parameter information to the cloud server, it starts to push data directly.

[0113] The detailed steps are as follows:

[0114] 1> After IPC collects audio data, it will send the data to NVR through the TCP link with NVR (this link is a media stream link, created when NVR adds IPC).

[0115] 2> After receiving the audio data sent by IPC, NVR will determine whether the audio configuration information has been sent to the cloud (configuration information includes: compression method, sampling rate, bit depth, and channels).

[0116] 2.1> If audio configuration information has been sent (the method for determining whether audio configuration has been sent is that the NVR uses a state machine to record it), jump to 3>.

[0117] 2.2> If the audio configuration information is not sent, the NVR will parse the audio parameters from the received IPC audio data and send it to the cloud. The audio data will add a private header to carry the audio configuration information.

[0118] 3> NVR will remove the private header and tail of the received audio data and send it to the cloud.

[0119] 4> After receiving the push audio notification, the cloud sends a SetChunkSize message.

[0120] 5> The cloud sends a user control message, specifying the event "stream record" (StreamIsRecorded) and the stream ID. Then it sends another user control message, specifying the event "stream start" (StreamBegin), to indicate the start of the stream to the app.

[0121] 6> The APP creates a voice intercom instance and sets the intercom mode and audio parameters.

[0122] 7> APP registers the listener and handles the voice intercom callback, including the start of intercom, the start and end of recording, and the recording data callback (for UI display, such as volume calculation, etc.).

[0123] IPC plays APP audio: IPC plays the audio data sent by the APP, and decodes it according to the pre-set audio parameters. IPC obtains the current output volume from the configuration information. Then IPC starts playing the audio data sent by the APP.

[0124] 1> APP sets the intercom mode, encoding format, gain and other parameters for sound collection.

[0125] 2> The APP uses the G711 format audio stream. Through the Speex library, the audio format is first converted to the pcm format, then to the speex format, and finally to the 711 format for echo cancellation.

[0126] 3> The App initiates streaming to the cloud. After receiving the push audio notification, the cloud specifies the stream record and stream ID to indicate the start of the stream to the NVR.

[0127] 4> After receiving the audio data sent by the cloud, the NVR will determine whether to set audio parameters to the IPC (the method for determining whether to send audio configuration to the IPC is also a state machine. Audio parameters include: compression method, sampling rate, bit depth, and channels).

[0128] 5> NVR sends the data sent by the cloud to IPC through the TCP link between NVR and IPC (this link is the same link where NVR receives the audio and video data sent by IPC).

[0129] 6> After receiving the audio data, IPC will read the output volume from the IPC configuration (output volume: controls the size of the IPC external sound, 0 is silent, and the maximum value is 100).

[0130] 7> After the IPC receives the audio data sent by the NVR, it pushes the data to the decoding unit for audio decoding.

[0131] 8> After the decoding unit processes the audio data, it will push the data to the audio output unit and play the audio data sent by the APP through the speaker.

[0132] APP sets the IPC output volume (IPC speaker sound, minimum is 0, maximum is 100):

[0133] 1> The APP sets the intercom volume and uploads it to the cloud via HTTPS, which is then forwarded to the NVR via HTTPS.

[0134] 2> After the NVR receives the command to set the IPC output volume from the cloud, it sends the output volume value set by the cloud to the NVR and sends this command and the output volume value to the IPC via the TCP link.

[0135] 3> After receiving this command, IPC will save the output volume value in the configuration file.

[0136] 4> IPC will save the result and return the value NVR (saving success or failure).

[0137] 5> There is a timeout mechanism on the NVR side. If the IPC does not play back the video 5 seconds after the NVR issues the command, it is considered to have timed out.

[0138] 6> After the NVR receives the processing result of the IPC reply, it will report the result to the cloud.

[0139] 7> APP will give corresponding prompts based on the results returned to the cloud by NVR.

[0140] APP displays IPC output volume (IPC speaker sound, minimum is 0, maximum is 100):

[0141] 1> When the NVR is connected to an IPC, it will send a command to obtain the output volume to the IPC through the TCP link.

[0142] 2> After receiving this command, the IPC will read the output volume value from the configuration and send this value to the NVR through the TCP link.

[0143] 3> After the NVR receives the output volume value replied by IPC, it will first check whether the value is legal (0<= output volume<=100).

[0144] 4> If legal, report this value to the cloud. If illegal, report -1 to the cloud (as the initial value of the output volume).

[0145] 5> The APP obtains volume data (0-100) from the cloud via HTTPS for custom drawing. The principle is to set the maximum value of the progress bar to 100, and fill the color according to the percentage of the volume value to show it to the user.

[0146] Note: There is a timeout processing mechanism for the interaction between NVR and IPC. Different error codes will be reported to the cloud for different commands, so that the APP can perform corresponding operations according to the corresponding error codes.

[0147] The present invention provides a method and system for realizing two-way voice intercom of smart cameras. Through App collecting (playing) sound, server data transfer, and NVR (network video recorder) managing IPC (consumer camera), App can initiate voice intercom to smart cameras. At the same time, the smart camera can also pick up sound and synchronously initiate voice intercom to App. It solves the problem of half-duplex and simplex communication of most products on the market, optimizes user experience, improves the efficiency of voice intercom, and better realizes the function of smart cameras to guard homes.

[0148] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A method for realizing two-way voice intercom of intelligent camera, It is characterized in that The following steps are involved: Enable intercom: The voice intercom function is controlled by the user. When the user enables the voice, a request with audio parameters is sent to the cloud server. The cloud server sends this request to the network video recorder NVR. After receiving this request, the NVR sends a command to enable the voice intercom to the consumer camera IPC through the protocol library. After the intercom is successfully enabled, the audio data interface sent by the IPC is enabled to receive the audio data sent by the IPC. Stop intercom: The stop voice intercom function is controlled by the user end. When the stop intercom is triggered, the user end sends a stop intercom request to the cloud server, and the cloud server forwards the request to the NVR. When the NVR receives the stop intercom request, it first sends a stop intercom command to the IPC, and then closes the interface that captures the intercom data sent by the IPC. The method further includes: the user end plays the IPC audio, and when the NVR receives the audio sent by the IPC, the NVR first checks whether to send the IPC audio parameters to the cloud server; If the NVR does not send the IPC audio parameters to the cloud server, the NVR obtains the encoding format, bitstream size, sampling rate, bit depth, and channel parameters from the IPC, and then forwards these parameters to the cloud server, and then starts pushing the IPC audio data to the cloud server; If the NVR has sent the IPC audio parameters to the cloud server, it will start pushing data directly; The steps for the user to play IPC audio are as follows: S101, after the IPC collects the audio data, it sends the audio data to the NVR through the TCP link with the NVR; S102, after receiving the audio data sent by the IPC, the NVR determines whether the audio configuration information has been sent to the cloud server. The method for determining whether the audio configuration has been sent is that the NVR uses a state machine to record the configuration information, and the configuration information includes: compression method, sampling rate, bit depth, and channel; S102.

1. If the audio configuration information has been sent, jump to S103; S102.

2. If the audio configuration information is not sent, the NVR parses the audio parameters from the received IPC audio data and then sends it to the cloud server. A private header is added to the audio data to carry the audio configuration information. S103, the NVR removes the private header and tail of the received audio data and sends it to the cloud server; S104, after receiving the push audio notification, the cloud server sends a message for setting the block size; S105, the cloud server sends a user control message, specifies the event "stream record" and the stream ID, and then sends another user control message, specifies the event "stream start", to indicate the start of the stream to the user terminal; S106, the user terminal creates a voice intercom instance and sets the intercom mode and audio parameters; S107, the user end registers the listener and processes the voice intercom callback; The method further includes: the IPC plays the audio of the user end, the IPC plays the audio data sent by the user end, decodes it according to the audio parameters set in advance, the IPC obtains the current output volume from the configuration information, and then starts to play the audio data sent by the user end; IPC plays the client audio including the following steps: S201, the user terminal sets the intercom mode, encoding format, and gain parameters for sound collection; S202, the user terminal performs echo cancellation; S203, the user terminal initiates a push stream to the cloud server, and after receiving the push audio notification, the cloud server specifies the stream record and stream ID to indicate the start of the stream to the NVR; S204, after receiving the audio data sent by the cloud server, the NVR determines whether to set audio parameters to the IPC; S205, the NVR sends the data sent by the cloud server to the IPC through the TCP link between the NVR and the IPC. This TCP link is the same link as the audio and video data sent by the IPC received by the NVR; S206, after receiving the audio data, the IPC reads the output volume from the IPC configuration; S207, after the IPC receives the audio data sent by the NVR, it pushes the data to the decoding unit for audio decoding; S208. After the decoding unit completes processing of the audio data, the data is pushed to the audio output unit, and the audio data sent by the user end is played through the speaker.

2. The method for implementing two-way voice intercom of a smart camera according to claim 1, Features: In step S202, the user end adopts the audio stream in G711 format, and converts the audio format into pcm format, then into speex format, and finally into 711 format for echo cancellation through the Speex library; in step S204, the method of judging whether to send the audio configuration to the IPC is that the NVR end adopts the state machine method to record, and the audio parameters include: compression method, sampling rate, bit depth, and channel; the user end is a mobile device.

3. The method for implementing two-way voice intercom of a smart camera according to claim 1, Features: The method further comprises: The user sets the IPC output volume: S301, the user sets the intercom volume and uploads it to the cloud server via HTTPS, and the cloud server then forwards it to the NVR via HTTPS; S302, after receiving the command for setting the IPC output volume sent by the cloud server, the NVR sends the command for setting the IPC output volume and the output volume value sent by the cloud server to the NVR to the IPC via a TCP link; S303, after receiving the command for setting the IPC output volume, the IPC saves the value of the output volume in the configuration file; S304, the IPC returns the saved result to the NVR; S305, NVR has a timeout mechanism. If the IPC does not return after 5 seconds of NVR sending a command, it is considered a timeout; S306, after the NVR obtains the processing result replied by the IPC, it reports the result to the cloud server; S307, the user end makes a corresponding prompt to the result returned to the cloud server through the NVR; The user side displays the IPC output volume: S401, when the NVR is connected to an IPC, a command for obtaining output volume is sent to the IPC via a TCP link; S402, after receiving the command to obtain the output volume, the IPC reads the value of the output volume from the configuration and sends the value to the NVR via the TCP link; S403, after receiving the output volume value replied by IPC, NVR first checks whether the value is legal; S404, if it is legal, report this value to the cloud server, if it is illegal, report -1 to the cloud server as the initial value of the output volume; S405, the user end obtains volume data from the cloud server through HTTPS for custom drawing. The principle is to set the maximum value of the progress bar to 100, and fill the color according to the percentage by obtaining the volume value to display it to the user.

4. The method for implementing two-way voice intercom of a smart camera according to claim 1, Features: The method further comprises: NVR and cloud server interaction interface: 1) Start intercom; 2) Stop intercom; 3) Receive APP intercom data; 4) Send audio parameters: send intercom audio parameter interface to the cloud server; 5) Send audio data: send audio data interface to the cloud server; 6) Report attribute interface; 7) Obtain cloud server interaction ID interface: Obtain the cloud server interaction ID based on the device's MAC; NVR and IPC interaction interface: 1) Start intercom; 2) Stop intercom; 3) Send audio configuration; 4) Get audio configuration; 5) Send audio data to IPC; 6) Set the output volume; 7) Get the output volume.

5. A smart camera two-way voice intercom implementation system, Features: The system comprises a user terminal, a cloud server, a network video recorder NVR and a consumer camera IPC, wherein the user terminal interacts with the cloud server, the cloud server interacts with the network video recorder NVR, the network video recorder NVR interacts with the consumer camera IPC, and the system is used to implement the method as described in any one of claims 1 to 4.

6. A smart camera two-way voice intercom implementation system, Features: A readable storage medium, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, they are used to implement the method according to any one of claims 1 to 4.