Intercommunication terminal and intercommunication method

Through the use of dual controller single network architecture and data flow switching module, the real-time intercom function failure problem in the intercom terminal system failure is solved, ensuring the stability and user experience of the intercom terminal, and achieving abnormalities in the main controller normal communication.

CN119299884AActive Publication Date: 2025-01-10HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411814965.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-01-10
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

The existing intercom terminal system may cause the real-time intercom function to fail in the event of a failure, affecting the security of the management area. In addition, the Android system and other systems that are convenient for installing new functions have stability problems such as lag, crash, etc.

Method used

The dual controller single network architecture is adopted, and the slave controller switches the data flow when the master controller is abnormal, ensuring normal communication between the intercom terminal and external devices, and switching between the first and second working states through the data flow switching module. And communicate with external devices based on the same intercom parameters.

Benefits of technology

It realizes normal communication between the intercom terminal when the main controller is abnormal, avoids the impact of user experience, and maintains the stability and consistency of the intercom terminal, making it convenient for user management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299884A_ABST
    Figure CN119299884A_ABST
Patent Text Reader

Abstract

The invention discloses a talkback terminal and a talkback method, relates to the technical field of talkback, and is used for realizing a talkback function by a slave controller and ensuring normal communication between the talkback terminal and external equipment in a double-controller single-network mode when a master controller is abnormal. According to the talkback terminal, in a first working state, a data stream switching module is used for transmitting a data stream from external equipment to a main controller and sending the data stream generated by the main controller to the external equipment; the slave controller is used for detecting the working state of the master controller according to the message transmission condition between the slave controller and the master controller; under the condition that the data flow switching module is in the first working state, the slave controller is further used for indicating the data flow switching module to be switched from the first working state to the second working state in response to the fact that the master controller is detected to be in the abnormal working state, and communicating with the external equipment based on the same talkback parameter in the master controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intercom technology, and in particular to an intercom terminal and an intercom method. Background Art

[0002] With the development of communication technology, intercom technology has become increasingly mature. People can not only make voice calls through intercom terminals, but also make video calls. They can also configure alarm devices to achieve security management of the management area.

[0003] In different application scenarios, the requirements for the functions that can be realized by the intercom terminal are also different. For specific needs in some specific scenarios, the new functions of the intercom terminal need to be researched and developed by dedicated R&D personnel, which requires the intercom terminal to meet the user's needs to install the service installation packages corresponding to different new functions. Therefore, the intercom terminals usually run systems that are easy to install the service installation packages corresponding to new functions, such as the Android system, but this system may be unstable and often have abnormal problems such as freezing, freezing, and restarting.

[0004] For some scenarios that require real-time intercom to ensure the safety of the management area, if the intercom terminal system fails, even if it causes the intercom terminal to be unable to achieve real-time intercom with external devices for a short period of time, it may cause immeasurable catastrophic consequences to the safety of the management area.

[0005] Therefore, there is a need for an intercom terminal that can more stably implement real-time intercom with external equipment. Summary of the invention

[0006] The present application provides an intercom terminal and an intercom method, which are used in a dual-controller single network mode. When an abnormality occurs in the main controller, the intercom function is implemented by the slave controller to ensure normal communication between the intercom terminal and the external device.

[0007] In order to achieve the above technical objectives, this application adopts the following technical solutions: In a first aspect, an embodiment of the present application provides an intercom terminal, including: A master controller for running a first intercom function system, a slave controller for running a second intercom function system, and a data stream switching module; The master controller and the slave controller communicate with the external device respectively through the data stream switching module; the data stream switching module supports a first working state and a second working state; in the first working state, the data stream switching module is used to transmit the data stream from the external device to the master controller, and to send the data stream generated by the master controller to the external device; in the second working state, the data stream switching module is used to transmit the data stream from the external device to the slave controller, and to send the data stream generated by the slave controller to the external device; The master controller and the slave controller transmit messages through a preset communication method; the slave controller is used to detect the working state of the master controller according to the message transmission between the slave controller and the master controller; when the data stream switching module is in the first working state, the slave controller is also used to respond to detecting that the master controller is in an abnormal working state, instruct the data stream switching module to switch from the first working state to the second working state, and communicate with the external device based on the same intercom parameters as those in the master controller.

[0008] The technical solution provided by the present application brings at least the following beneficial effects: the intercom terminal provided by the present application includes a master controller and a slave controller. When the master controller works normally, normal communication between the intercom terminal and the external device can be realized. The slave controller continuously detects the working state of the master controller according to the message transmission between the master controller and the slave controller. When the master controller works abnormally, the slave controller promptly controls the data stream switching module to switch from the first working state to the second working state, and transmits the data stream from the external device to the slave controller. The slave controller realizes the intercom function of the intercom terminal, that is, the intercom terminal can realize normal communication with the external device through the slave controller when the master controller works abnormally. In this way, it can avoid that the intercom terminal of a controller cannot communicate with the external device when the controller is abnormal, affecting the user experience, and the intercom parameters in the slave controller are the same as the intercom parameters in the master controller. The master controller and the slave controller use the same set of intercom parameters. Even if the intercom terminal switches between the first intercom function system and the second intercom function system, it still appears as an intercom terminal for the external device, which is convenient for users to manage the intercom terminal.

[0009] In one possible implementation, the slave controller is used to detect the working status of the main controller based on the message transmission between the slave controller and the main controller, including: regularly sending heartbeat detection messages to the main controller; receiving a heartbeat response message sent by the main controller within a preset time after sending the heartbeat detection message, and determining that the main controller is in a normal working state; or, not receiving a heartbeat response message sent by the main controller within a preset time after sending the heartbeat detection message, and determining that the main controller is in an abnormal working state.

[0010] In one possible implementation, the master controller is also used to: in response to receiving a heartbeat detection message sent by the slave controller, send a heartbeat response message carrying the latest intercom parameters in the master controller to the slave controller; the slave controller is also used to: in response to receiving a heartbeat response message sent by the master controller, obtain the intercom parameters from the heartbeat response message; if the intercom parameters carried in the heartbeat response message are different from the intercom parameters already in the slave controller, then the intercom parameters already in the slave controller are updated to the intercom parameters carried in the heartbeat response message.

[0011] In one possible implementation, the master controller is also used to send a heartbeat response message carrying the latest intercom parameters in the master controller to the slave controller if the intercom parameters in the master controller are updated relative to the last time a heartbeat detection message was received; the slave controller is also used to, in response to receiving a heartbeat response message sent by the master controller, update the existing intercom parameters in the slave controller to the intercom parameters carried in the heartbeat response message if the heartbeat response message carries the intercom parameters.

[0012] In one possible implementation, the main controller is also used to: obtain an upgrade package for the intercom function system; determine whether the intercom function system upgrade package includes an upgrade package for the second intercom function system; if included, send a network upgrade request message to the slave controller, and the network upgrade request message carries the upgrade package for the second intercom function system; the slave controller is also used to: in response to receiving a network upgrade request message sent by the main controller, upgrade the second intercom function system based on the upgrade package of the second intercom function system; after the upgrade of the second intercom function system is completed, send a network upgrade response message to the main controller and restart the second intercom function system; the main controller is also used to restart the first intercom function system after receiving the network upgrade response message sent by the slave controller and completing the upgrade of the first intercom function system.

[0013] In one possible implementation, the main controller is connected to the first button, and the slave controller is connected to the second button, and the second button is a physical button; the main controller is also used to, when the main controller is in a normal working state, in response to detecting a user triggering operation on the first button, issue a call request to the intercom network, and the intercom network is the network to which the intercom terminal is currently connected; the slave controller is also used to, in response to detecting a user triggering operation on the second button, if the main controller is in an abnormal working state, issue a call request to the intercom network.

[0014] In one possible implementation, the slave controller is also used to, in response to detecting a user's triggering operation on the second button, if the main controller is in a normal working state, send a button status message to the main controller, and the button status message is used to indicate that the second button is triggered; the main controller is used to, in response to receiving a button status message sent by the slave controller, issue a call request to the intercom network to communicate with other devices in the intercom network; the main controller is also used to send a button status response message to the slave controller to notify the slave controller that the call request has been initiated; or, the slave controller is also used to, in response to detecting a user's triggering operation on the second button, if the main controller is in a normal working state, issue a call request to the intercom network and forward the call request to the main controller; the main controller is also used to receive the call request forwarded by the slave controller to communicate with other devices in the intercom network.

[0015] In one possible implementation, the slave controller is used to instruct the data flow switching module to switch from a first working state to a second working state in response to detecting that the master controller is in an abnormal working state, including: when the data flow switching module is in the first working state, in response to detecting that the master controller is in an abnormal working state, sending first control information and second control information to the data flow switching module, so that the data flow switching module switches from the first working state to the second working state; or, when the data flow switching module is in the first working state, in response to detecting that the master controller is in an abnormal working state, sending first control information to the data flow switching module, and opening a connection port between the slave controller and the data flow switching module, so that the data flow switching module switches from the first working state to the second working state; wherein the first control information is used to instruct the data flow switching module to close the connection port between the data flow switching module and the master controller, and the second control information is used to instruct the data flow switching module to open the connection port between the data flow switching module and the slave controller.

[0016] In some possible implementations, the slave controller is also used to: continue to detect the working state of the master controller after the data flow switching module switches to the second working state; in response to detecting that the master controller resumes a normal working state, instruct the data flow switching module to switch from the second working state to the first working state; the slave controller is used to instruct the data flow switching module to switch from the second working state to the first working state in response to detecting that the master controller resumes a normal working state, including: in response to detecting that the master controller resumes a normal working state, closing the connection port between the slave controller and the data flow switching module, and sending third control information to the data flow switching module so that the data flow switching module switches from the second working state to the first working state; or, in response to detecting that the master controller resumes a normal working state, sending third control information and fourth control information to the data flow switching module so that the data flow switching module switches from the second working state to the first working state; wherein the third control information is used to instruct the data flow switching module to open the connection port between the data flow switching module and the master controller, and the fourth control information is used to instruct the data flow switching module to close the connection port between the data flow switching module and the slave controller.

[0017] In a second aspect, the present application provides an intercom method, which is applied to an intercom terminal, and the intercom terminal includes: A master controller for running the first intercom function system, a slave controller for running the second intercom function system, and a data stream switching module, wherein the master controller and the slave controller communicate with external devices respectively through the data stream switching module; and messages are transmitted between the master controller and the slave controller through a preset communication method; The method includes: The slave controller detects the working status of the master controller based on the message transmission between it and the master controller; When the data stream switching module is in the first working state, the slave controller in response to detecting that the master controller is in an abnormal working state instructs the data stream switching module to switch from the first working state to the second working state; wherein, in the first working state, the data stream switching module is used to transmit the data stream from the external device to the master controller, and to send the data stream generated by the master controller to the external device; in the second working state, the data stream switching module is used to transmit the data stream from the external device to the slave controller, and to send the data stream generated by the slave controller to the external device; The slave controller communicates with the external device based on the same intercom parameters as in the master controller.

[0018] In one possible implementation, the slave controller detects the working status of the main controller based on the message transmission between the slave controller and the main controller, including: the slave controller periodically sends a heartbeat detection message to the main controller; the slave controller receives a heartbeat response message sent by the main controller within a preset time after sending the heartbeat detection message, and determines that the main controller is in a normal working state; or, the slave controller does not receive a heartbeat response message sent by the main controller within a preset time after sending the heartbeat detection message, and determines that the main controller is in an abnormal working state.

[0019] In a possible implementation, the method also includes: the master controller sends a heartbeat response message carrying the latest intercom parameters in the master controller to the slave controller in response to receiving a heartbeat detection message sent by the slave controller; the slave controller obtains the intercom parameters from the heartbeat response message in response to receiving the heartbeat response message sent by the master controller; if the intercom parameters carried in the heartbeat response message are different from the intercom parameters already in the slave controller, the slave controller updates the intercom parameters already in the slave controller to the intercom parameters carried in the heartbeat response message.

[0020] In one possible implementation, the method also includes: if the intercom parameters in the master controller are updated relative to the last time a heartbeat detection message was received, the master controller sends a heartbeat response message carrying the latest intercom parameters in the master controller to the slave controller; in response to receiving the heartbeat response message sent by the master controller, if the heartbeat response message carries the intercom parameters, the slave controller updates the existing intercom parameters in the slave controller to the intercom parameters carried in the heartbeat response message.

[0021] In a possible implementation, the method also includes: the main controller obtains an upgrade package for the intercom function system; the main controller determines whether the intercom function system upgrade package includes an upgrade package for the second intercom function system; if included, the main controller sends a network upgrade request message to the slave controller, and the network upgrade request message carries the upgrade package for the second intercom function system; the slave controller upgrades the second intercom function system based on the upgrade package for the second intercom function system in response to receiving the network upgrade request message sent by the main controller; after the upgrade of the second intercom function system is completed, the slave controller sends a network upgrade response message to the main controller and restarts the second intercom function system; after receiving the network upgrade response message sent by the slave controller and completing the upgrade of the first intercom function system, the main controller restarts the first intercom function system.

[0022] In one possible implementation, the main controller is connected to the first button, and the slave controller is connected to the second button, and the second button is a physical button; the method also includes: when the main controller is in a normal working state, the main controller responds to detecting a user's trigger operation on the first button and sends a call request to the intercom network, and the intercom network is the network currently connected to the intercom terminal; in response to detecting a user's trigger operation on the second button, if the main controller is in an abnormal working state, the slave controller sends a call request to the intercom network.

[0023] In one possible implementation, the method also includes: in response to detecting a user's triggering operation on the second button, the slave controller sends a button status message to the master controller if the master controller is in a normal working state, wherein the button status message is used to indicate that the second button is triggered; in response to receiving the button status message sent by the slave controller, the master controller sends a call request to the intercom network to communicate with other devices in the intercom network; the master controller sends a button status response message to the slave controller to notify the slave controller that the call request has been initiated; or, in response to detecting a user's triggering operation on the second button, the slave controller sends a call request to the intercom network and forwards the call request to the master controller if the master controller is in a normal working state; the master controller receives the call request forwarded by the slave controller to communicate with other devices in the intercom network.

[0024] In one possible implementation, the slave controller in response to detecting that the master controller is in an abnormal working state instructs the data flow switching module to switch from a first working state to a second working state, including: when the data flow switching module is in the first working state, the slave controller in response to detecting that the master controller is in an abnormal working state sends first control information and second control information to the data flow switching module, so that the data flow switching module switches from the first working state to the second working state; or, when the data flow switching module is in the first working state, the slave controller in response to detecting that the master controller is in an abnormal working state sends first control information to the data flow switching module, and opens the connection port between the slave controller and the data flow switching module, so that the data flow switching module switches from the first working state to the second working state; wherein the first control information is used to instruct the data flow switching module to close the connection port between the data flow switching module and the master controller, and the second control information is used to instruct the data flow switching module to open the connection port between the data flow switching module and the slave controller.

[0025] In a possible implementation, the method further includes: after the data flow switching module switches to the second working state, the slave controller continues to detect the working state of the master controller; in response to detecting that the master controller resumes the normal working state, the slave controller instructs the data flow switching module to switch from the second working state to the first working state; in response to detecting that the master controller resumes the normal working state, the slave controller instructs the data flow switching module to switch from the second working state to the first working state, including: in response to detecting that the master controller resumes the normal working state, the slave controller closes the connection port between the slave controller and the data flow switching module, and sends third control information to the data flow switching module, so that the data flow switching module switches from the second working state to the first working state; or, in response to detecting that the master controller resumes the normal working state, the slave controller sends third control information and fourth control information to the data flow switching module, so that the data flow switching module switches from the second working state to the first working state; wherein the third control information is used to instruct the data flow switching module to open the connection port between the data flow switching module and the master controller, and the fourth control information is used to instruct the data flow switching module to close the connection port between the data flow switching module and the slave controller.

[0026] For the specific description of the second aspect and its various implementations in the present application, reference may be made to the detailed description of the first aspect and its various implementations; and for the beneficial effects of the second aspect and its various implementations, reference may be made to the analysis of the beneficial effects of the first aspect and its various implementations, which will not be repeated here.

[0027] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A schematic diagram of the structure of an intercom system provided in an embodiment of the present application; Figure 2 A schematic diagram of the application logic of an intercom device provided in an embodiment of the present application Figure 1 ; Figure 3 A schematic diagram of a use scenario of an intercom device provided in an embodiment of the present application Figure 1 ; Figure 4 A schematic diagram of the application logic of an intercom device provided in an embodiment of the present application Figure 2 ; Figure 5 A schematic diagram of a use scenario of an intercom device provided in an embodiment of the present application Figure 2 ; Figure 6 A schematic diagram of the application logic of an intercom device provided in an embodiment of the present application Figure 3 ; Figure 7 A schematic diagram of the application logic of an intercom device provided in an embodiment of the present application Figure 4 ; Figure 8 A schematic diagram of the application logic of an intercom device provided in an embodiment of the present application Figure 5 ; Fig. 9 A schematic diagram of a use scenario of an intercom device provided in an embodiment of the present application Figure 3 ; Fig.10 A schematic diagram of the application logic of an intercom device provided in an embodiment of the present application Figure 6 ; Fig.11 A schematic diagram of a use scenario of an intercom device provided in an embodiment of the present application Figure 4 ; Fig.12 A schematic diagram of a use scenario of an intercom device provided in an embodiment of the present application Figure 5 ; Fig.13 A schematic diagram of the hardware composition of a computing device provided in an embodiment of the present application; Fig.14 A flowchart of an intercom method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. The terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, "multiple" means two or more.

[0031] With the development of communication technology, intercom technology has become increasingly mature. People can not only make voice calls through intercom terminals, but also make video calls. They can also configure alarm devices to achieve security management of the management area.

[0032] In different application scenarios, the requirements for the functions that can be realized by the intercom terminal are also different. For specific needs in some specific scenarios, the new functions of the intercom terminal need to be researched and developed by dedicated R&D personnel, which requires the intercom terminal to meet the user's needs to install the service installation packages corresponding to different new functions. Therefore, the intercom terminals usually run systems that are easy to install the service installation packages corresponding to new functions, such as the Android system, but this system may be unstable and often have abnormal problems such as freezing, freezing, and restarting.

[0033] For some scenarios that require real-time intercom to ensure the safety of the management area, if the intercom terminal system fails, even if it causes the intercom terminal to be unable to achieve real-time intercom with external devices for a short period of time, it may cause immeasurable catastrophic consequences to the safety of the management area.

[0034] Therefore, there is a need for an intercom terminal that can more stably implement real-time intercom with external equipment.

[0035] In this regard, an embodiment of the present application provides an intercom terminal. The intercom terminal provided by the present application includes a master controller and a slave controller. When the master controller works normally, normal communication between the intercom terminal and the external device can be realized. The slave controller continuously detects the working state of the master controller according to the message transmission between the master controller and the slave controller. When the master controller works abnormally, the slave controller promptly controls the data stream switching module to switch from the first working state to the second working state, and transmits the data stream from the external device to the slave controller. The slave controller realizes the intercom function of the intercom terminal, that is, the intercom terminal can realize normal communication with the external device through the slave controller when the master controller works abnormally. In this way, it can avoid that the intercom terminal of a controller cannot communicate with the external device when the controller is abnormal, affecting the user experience, and the intercom parameters in the slave controller are the same as the intercom parameters in the master controller. The master controller and the slave controller use the same set of intercom parameters. Even if the first intercom function system and the second intercom function system in the intercom terminal are switched, it still appears as an intercom terminal for the external device, which is convenient for users to manage the intercom terminal.

[0036] Please refer to Figure 1 , which shows an intercom system applicable to an intercom terminal provided by the present application. Figure 1 As shown, the intercom system 1 includes: a plurality of intercom terminals 10 and at least one intercom server 20 .

[0037] Among them, a communication connection is established between the intercom terminal 10 and the intercom server 20. It should be understood that the connection method can be a wireless connection, such as a Bluetooth connection, a wireless fidelity (Wi-Fi) connection, etc.; or, the connection method can also be a wired connection, such as an optical fiber connection, an Ethernet connection, a universal serial bus (USB) connection, a high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIE), a serial peripheral interface (Serial Peripheral Interface, SPI), an integrated circuit bus (Inter-Integrated Circuit, I 2 C), universal asynchronous receiver / transmitter (URAT), etc., which are not limited. In actual application, for the sake of security and stability, the intercom terminal 10 and the intercom server 20 can establish a communication connection through a wired manner. For example, the intercom terminal 10 is configured with an RJ45 network interface, and then the intercom terminal 10 can establish a communication connection with the intercom server 20 through a network cable based on the RJ45 network interface.

[0038] In some embodiments, the intercom terminal 10 includes: a main controller 101 for running a first intercom function system, a slave controller 102 for running a second intercom function system, and a data stream switching module 103. The main controller 101 and the slave controller 102 communicate with the external device through the data stream switching module 103 respectively; the data stream switching module 103 supports a first working state and a second working state; in the first working state, the data stream switching module 103 is used to transmit the data stream from the external device to the main controller 101, and to send the data stream generated by the main controller 101 to the external device; in the second working state, the data stream switching module 103 is used to transmit the data stream from the external device to the slave controller 102, and to send the data stream generated by the slave controller 102 to the external device.

[0039] Among them, a communication connection is established between the main controller 101 and the slave controller 102. The specific mode of the communication connection can be a wireless connection or a wired connection, which is not specifically limited in this application. In actual application, for considerations such as security, stability, and construction cost, the main controller 101 and the slave controller 102 can be set to communicate and interact through any low-speed communication method, such as USB, Uart, RS485, etc.

[0040] In some embodiments, the master controller 101 and the slave controller 102 transmit messages through a preset communication method, and the slave controller 102 is used to detect the working state of the master controller 101 according to the message transmission between the master controller 101 and the slave controller 102. When the data stream switching module 103 is in the first working state, the slave controller 102 is also used to instruct the data stream switching module 103 to switch from the first working state to the second working state in response to detecting that the master controller 101 is in an abnormal working state, and communicate with the external device based on the same intercom parameters as those in the master controller 101. After the data stream switching module 103 switches to the second working state, the slave controller 102 continues to detect the working state of the master controller 101; in response to detecting that the master controller 101 resumes the normal working state, the slave controller instructs the data stream switching module 103 to switch from the second working state to the first working state.

[0041] Specifically, the data flow switching module 103 includes a connection port between the main controller 101 and a connection port between the main controller 101 and the slave controller 102. The slave controller 102 controls the switching of the working state of the data flow switching module 103 by controlling the opening and closing of these connection ports on the data flow switching module 103, or the opening and closing of the connection port on the slave controller connected to the data flow switching module 103.

[0042] The slave controller 102 controls the data stream switching module 103 to switch from the first working state to the second working state, and there are two implementation methods: ① When the data stream switching module 103 is in the first working state, the slave controller 102 responds to detecting that the main controller 101 is in an abnormal working state, and sends the first control information and the second control information to the data stream switching module 103, so that the data stream switching module 103 switches from the first working state to the second working state. ② When the data stream switching module 103 is in the first working state, the slave controller 102 responds to detecting that the main controller 101 is in an abnormal working state, and sends the first control information to the data stream switching module 103, and opens the connection port between the slave controller 102 and the data stream switching module 103, so that the data stream switching module 103 switches from the first working state to the second working state. The first control information is used to instruct the data flow switching module 103 to close the connection port between the data flow switching module 103 and the main controller 101 , and the second control information is used to instruct the data flow switching module 103 to open the connection port between the data flow switching module 103 and the slave controller 102 .

[0043] The slave controller 102 controls the data stream switching module 103 to switch from the second working state to the first working state, and there are two implementation methods: ① In response to detecting that the master controller 101 has resumed normal working state, the slave controller 102 closes the connection port between the slave controller 102 and the data stream switching module 103, and sends the third control information to the data stream switching module 103, so that the data stream switching module 103 switches from the second working state to the first working state. ② In response to detecting that the master controller 101 has resumed normal working state, the slave controller 102 sends the third control information and the fourth control information to the data stream switching module 103, so that the data stream switching module 103 switches from the second working state to the first working state. Among them, the third control information is used to instruct the data stream switching module 103 to open the connection port between the data stream switching module 103 and the master controller 101, and the fourth control information is used to instruct the data stream switching module 103 to close the connection port between the data stream switching module 103 and the slave controller 102.

[0044] In practical applications, the data stream switching module can specifically adopt a switch data switching integrated circuit. The data stream switching module 103 should include at least three connection ports, one connection port is used to connect to the main controller 101 running the first intercom function system, one connection port is used to connect to the slave controller 102 running the second intercom function system, and another connection port is used to connect to the connection port on the intercom terminal 10, and the connection port on the intercom terminal 10 is used to establish a communication connection with the intercom server 20. In this way, the data stream switching module 103 can receive the intercom data sent by the external device, and can also forward the intercom data of the intercom terminal 10 to the external device.

[0045] In some embodiments, the slave controller 102 may include three types of connection ports, one connection port (such as a uart serial port) is used to establish a communication connection with the main controller 101, and the slave controller 102 realizes message transmission between the master controller 101 and the master controller 101 through this connection port; one connection port (such as an mdio serial port) is used to establish a communication connection with the data stream switching module 103, and the slave controller 102 sends control information (first control information, second control information, third control information or fourth control information) to the data stream switching module 103 through this connection port; and another connection port (such as an ethernet serial port) is also used to establish a communication connection with the data stream switching module 103, and the slave controller 102 and the data stream switching module 103 send intercom data to each other through this connection port.

[0046] In some embodiments, the main controller 101 may include two connection ports, one connection port (such as a uart serial port) is used to establish a communication connection with the slave controller 102, and the main controller 101 realizes message transmission between the slave controller 102 through this connection port; the other connection port (such as an ethernet serial port) is used to establish a communication connection with the data stream switching module 103, and the main controller 101 and the data stream switching module 103 send intercom data to each other through this connection port.

[0047] In some embodiments, the first intercom function system running on the main controller 101 and the second intercom function system running on the slave controller 102 can be completely the same. In practical applications, when the user only requires the intercom terminal 10 to realize the voice intercom function in real time, the second intercom function system running on the slave controller 102 only needs to realize the voice intercom function. For example, if the user hopes that the slave controller 102 can also realize the same function as the main controller 101 when the main controller 101 is abnormal, the first intercom function system is an Android system running on the A2S platform, and the second intercom function system is also an Android system running on the A2S platform. These two intercom function systems can not only support voice intercom functions, but also support video intercom functions, text message intercom functions, etc., then the main controller 101 and the slave controller 102 in the intercom terminal 10 are both central processors that can support the A2S platform. As another example, the user hopes that when the main controller 101 is abnormal, the slave controller 102 can only ensure the realization of the voice intercom function. The first intercom function system is an Android system running on the A2S platform, which can support a variety of intercom functions including the voice intercom function. The second intercom function system can be a Linux system running on the B2 platform, which can support the voice intercom function. The main controller 101 is a central processor that can support the A2S platform, and the slave controller 102 is a central processor that can support the B2 platform.

[0048] In some embodiments, the intercom terminal 10 can implement an intercom function of one-click calling. The intercom terminal 10 is pre-configured with a contact party. When the user triggers the intercom function of one-click calling of the intercom terminal 10, the controller in the intercom terminal 10 initiates a call request to the contact party pre-configured in the intercom network.

[0049] In some embodiments, the intercom terminal 10 may include a first button connected to the main controller 101, and the first button may be a virtual button or a physical button. When the intercom terminal 10 includes a touch panel type device, the first button may be set as a virtual button, and the virtual button is set in the touch panel. When the main controller 101 is abnormal, the virtual button is unavailable, or the virtual button is available but the intercom function of the first intercom function system cannot be called. A second button connected to the slave controller 102 may also be set in the intercom terminal 10, and the second button is a physical button. Both the first button and the second button can realize the intercom function of one-key calling. When the main controller 101 is working normally, the user can instruct the main controller 101 to initiate a call request by touching a virtual button or a physical button to communicate with an external device. When the main controller 101 is abnormal, the user can instruct the slave controller 102 to initiate a call request by a physical button to communicate with an external device.

[0050] Specifically, the main controller 101 is also used to, when the main controller 101 is in a normal working state, in response to detecting a user's trigger operation on the first button, issue a call request to the intercom network, and the intercom network is the network to which the intercom terminal 10 is currently connected; the slave controller 102 is also used to, in response to detecting a user's trigger operation on the second button, if the main controller 101 is in an abnormal working state, issue a call request to the intercom network.

[0051] The slave controller 102 is also used to, in response to detecting a user's triggering operation on the second button, if the main controller 101 is in a normal working state, send a button status message to the main controller 101, the button status message is used to indicate that the second button is triggered; the main controller 101 is used to, in response to receiving the button status message sent by the slave controller 102, issue a call request to the intercom network to communicate with other devices in the intercom network; the main controller 101 is also used to send a button status response message to the slave controller 102 to notify the slave controller 102 that the call request has been initiated; or, the slave controller 102 is also used to, in response to detecting a user's triggering operation on the second button, if the main controller 101 is in a normal working state, issue a call request to the intercom network and forward the call request to the main controller 101; the main controller 101 is also used to receive the call request forwarded by the slave controller 102 to communicate with other devices in the intercom network.

[0052] For example, when the main controller 101 is working normally, if the user clicks the virtual button, the main controller 101 directly sends a call request to the pre-configured contact party in the intercom network. For another example, when the main controller 101 fails and the slave controller 102 is used to realize the connection with the external device, the personnel can trigger the slave controller 102 to send a call request to the pre-configured contact party in the intercom network by clicking the second button. For another example, when the main controller 101 is working normally, assuming that the main controller 101 is a central processor supporting the A2S platform, the Android system on the A2S platform runs normally, the main controller 101 can realize the video preview function, the visual intercom function, and other daily management business functions, the slave controller 102 is a central processor supporting the B2 platform, and the slave controller 102 can only realize the voice intercom function. When the slave controller 102 detects that the state of the physical button has changed, the state change of the physical button is written into the button state message and sent to the main controller 101 through uart, and finally the main controller 101 sends a call request to the pre-configured contact party in the intercom network. For example, when the main controller 101 is working normally, the user clicks a physical button connected to the slave controller 102, and the slave controller 102 sends a call request to a pre-configured contact party in the intercom network, and then forwards the call request to the main controller 101, which communicates with the pre-configured contact party.

[0053] By setting a physical button connected to the slave controller 102 in the intercom terminal, when the main controller 101 is abnormal, the intercom function of one-key calling can be realized through the slave controller 102, which is convenient for users.

[0054] Optionally, the intercom terminal 10 may include a physical button connected to the main controller 101 in addition to a virtual button connected to the main controller 101. When the main controller 101 is working normally, the user can use this physical button or virtual button to implement the one-touch call intercom function of the intercom terminal 10.

[0055] In some embodiments, the first intercom function system and the second intercom function system each correspond to a set of independent intercom function-related devices (such as a network card, a microphone, a speaker, a camera, etc.), or the first intercom function system and the second intercom function system call the same set of intercom function-related devices, and the first intercom function system and the second intercom function system can independently realize the intercom function of the intercom terminal 10.

[0056] In some embodiments, when the user only requires the intercom terminal 10 to realize the voice intercom function in real time, the voice intercom function of the slave controller 102 can be realized through a physical button of a one-touch call, that is, the slave controller 102 cannot call the video intercom function related devices, the management service function related devices, etc., and can only call the voice intercom function related devices (such as microphones, speakers, etc.). For example, under normal circumstances, all the services of the intercom terminal 10 are run in the central processor supporting the A2S platform to run the Android system. When the central processor supporting the A2S platform to run the Android system is stuck, stuck, or crashes abnormally, the intercom function is taken over by the central processor supporting the B2 platform to run the Linux system. At this time, only the voice intercom function realized by the physical button can be supported. When the user clicks the physical button, the central processor supporting the B2 platform to run the Linux system calls the corresponding microphone and speaker to realize the voice intercom between the intercom terminal 10 and the external device.

[0057] In some embodiments, after the intercom terminal 10 is started, the user can enter the configuration page by logging into the interactive interface, interactive web page and client, and configure the functional parameters and intercom parameters of the intercom terminal 10, so that the intercom terminal 10 can support the intercom function. The master controller 101 and the slave controller 102 can synchronize IP parameters, MAC addresses, intercom parameters and activation information through the uart serial port protocol to ensure that the intercom function of the intercom terminal 10 can be normally realized after the master controller 101 abnormally switches to the slave controller 102.

[0058] In some embodiments, the slave controller 102 is used to detect the working status of the main controller 101 based on the message transmission between the slave controller 102 and the main controller 101, which can be specifically implemented as follows: the slave controller 102 periodically sends a heartbeat detection message to the main controller 101; if the slave controller 102 receives a heartbeat response message sent by the main controller 101 within a preset time after sending the heartbeat detection message, the slave controller 102 determines that the main controller 101 is in a normal working state; or, if the slave controller 102 does not receive a heartbeat response message sent by the main controller 101 within a preset time after sending the heartbeat detection message, the slave controller 102 determines that the main controller 101 is in an abnormal working state.

[0059] In some embodiments, after the slave controller 102 detects that the master controller 101 is in an abnormal working state, if the slave controller 102 receives heartbeat response messages from the master controller 101 for a preset number of consecutive times, the slave controller 102 determines that the master controller 101 has recovered from the abnormal working state to the normal working state.

[0060] In some embodiments, the master controller 101 is also used to: in response to receiving a heartbeat detection message sent by the slave controller 102, send a heartbeat response message carrying the latest intercom parameters in the master controller 101 to the slave controller 102; the slave controller 102 is also used to: in response to receiving a heartbeat response message sent by the master controller 101, obtain the intercom parameters from the heartbeat response message; if the intercom parameters carried in the heartbeat response message are different from the intercom parameters already in the slave controller 102, then the intercom parameters already in the slave controller 102 are updated to the intercom parameters carried in the heartbeat response message.

[0061] In some embodiments, the master controller 101 is also used to send a heartbeat response message carrying the latest intercom parameters in the master controller 101 to the slave controller 102 if the intercom parameters in the master controller 101 are updated relative to the last time a heartbeat detection message was received; the slave controller 102 is also used to, in response to receiving a heartbeat response message sent by the master controller 101, update the existing intercom parameters in the slave controller 102 to the intercom parameters carried in the heartbeat response message if the heartbeat response message carries the intercom parameters.

[0062] In some embodiments, the main controller 101 is also used to: obtain an upgrade package for the intercom function system; determine whether the intercom function system upgrade package includes an upgrade package for the second intercom function system; if included, send a network upgrade request message to the slave controller 102, and the network upgrade request message carries the upgrade package for the second intercom function system; the slave controller 102 is also used to: in response to receiving the network upgrade request message sent by the main controller 101, upgrade the second intercom function system based on the upgrade package of the second intercom function system; after the upgrade of the second intercom function system is completed, send a network upgrade response message to the main controller 101, and restart the second intercom function system; the main controller 101 is also used to restart the first intercom function system after receiving the network upgrade response message sent by the slave controller 102 and completing the upgrade of the first intercom function system.

[0063] In some embodiments, the communication types between the master controller 101 and the slave controller 102 can be divided into several types of messages: heartbeat detection message, heartbeat response message, key status message, key status reply message, network upgrade request message, network upgrade reply message. Figure 2 As shown, after the master controller 101 and the slave controller 102 are initialized, the slave controller 102 sends a heartbeat detection message to the master controller 101. When the master controller 101 works normally, it will reply a heartbeat response message to the slave controller 102. If the master controller 101 updates the IP address, MAC address, intercom parameters and other information, the heartbeat response message replied by the master controller 101 to the slave controller 102 includes the IP address, MAC address, intercom parameters and other information (that is, the master controller 101 determines whether the intercom parameters are updated, and sends the updated intercom parameters to the slave controller 102). After receiving the heartbeat response message, the slave controller 102 updates its own IP address, MAC address, intercom parameters and other information to keep in sync with the master controller 101. The slave controller 102 detects the state of the physical button connected to the slave controller 102 (pressed or not pressed). When the master controller 101 works normally, the slave controller 102 sends a button state message to the master controller 101. The master controller 101 performs corresponding actions according to the state of the physical button, and then the master controller 101 replies with a button state response message to the slave controller 102. When the master controller 101 determines that the network of the slave controller 102 needs to be upgraded, the master controller 101 sends a network upgrade request message to the slave controller 102. After the upgrade of the slave controller 102 is completed, the slave controller 102 replies with a slave controller network upgrade response message to the master controller.

[0064] In some embodiments, activation request messages and activation response messages may also be transmitted between the master controller 101 and the slave controller 102. When the master controller 101 is working normally, the master controller 101 writes activation parameters into the activation request message, sends the activation request message to the slave controller 102, and then the slave controller 102 performs an activation operation according to the activation parameters in the activation request message, writes the activation result into the activation response message and replies to the master controller 101. The activation parameters may be parameters used to activate the slave controller 102 to implement the intercom function, or may be parameters used to activate the resources required by the slave controller 102 to implement the intercom function.

[0065] Based on the above description, the structure of the intercom terminal 10 can be divided into: a dual-system communication module, a dual-system redundant backup module, a two-way intercom module and an upgrade module according to the functions.

[0066] The dual-system communication module is responsible for the interactive communication between the first intercom function system and the second intercom function system in the intercom terminal. The communication content may include: full-duplex transmission and reception of the underlying uart, communication protocol formulation, message format analysis, communication protocol analysis, etc. The dual-system communication module can build a bridge for abnormal detection, parameter synchronization, system switching and other processes between the first intercom function system and the second intercom function system.

[0067] Specifically, the interactive communication between the first intercom function system and the second intercom function system may adopt a specific message format, and the communication interface between the first intercom function system and the second intercom function system may adopt a specific interface. For example, the message format adopts a format including a start bit, a data packet sequence number, a destination address, a command word, a data segment length value, a data segment, an end bit, and a checksum, such as Figure 3 As shown, when the first intercom function system and the second intercom function system communicate with each other, the data to be communicated (such as IP address, MAC address, activation information, intercom parameters, and status information of physical buttons, etc.) must be organized in JSON data format first, and then the message content in JSON data format is converted into string format and put into the data segment of the protocol message to be sent. Then, the start bit, data packet sequence number, destination address, command word, data segment length value, data segment, end bit and checksum are filled in, and then the complete communication protocol message packet is transmitted through the UART serial port.

[0068] Based on this, the dual-system communication module can be divided into a serial port function submodule, a communication protocol submodule, and a parameter synchronization submodule. Among them, the serial port function submodule is responsible for the encapsulation of the underlying uart communication, including serial port parameter initialization, sending interface, receiving interface, etc.; the communication protocol submodule is responsible for the message format used when the first intercom function system communicates with the second intercom function system, including the start bit, command word, data segment length value, destination address, data segment, end bit, checksum, etc.; the parameter synchronization submodule is responsible for synchronizing the IP address, mac address, intercom parameters, and activation information of the first intercom function system to the second intercom function system, providing a basis for switching between the first intercom function system and the second intercom function system in the intercom terminal 10.

[0069] In actual applications, data content can be encapsulated using the json data format, parsed using the json library interface, and communicated using the uart serial port. The configuration parameters of the uart serial port communication can be uniformly marked, with a baud rate of 115200, 8 data bits, a check bit and a flow control bit of NONE, and a total of 9 bits of data per group. For communication between the first intercom function system and the second intercom function system, the bottom layer can use the uart serial port full-duplex communication mode, and the application layer can use the message format shown in Table 1 below to send, receive and parse messages.

[0070] Table 1 Message format name Start bit Packet sequence number address Command word Data segment length value Data segment End bit Checksum length 2 2 2 2 4 n 4 1 value 0x1234 0x22 0x00 0x01 n 0x10 0x10 0x1122 By adopting the full-duplex communication mode of UART serial port, UART is a low-speed transmission protocol, which can avoid abnormalities caused by transmission delay. When designing the protocol and message format of the communication message, use the simplest message content possible to send, and avoid large amounts of data being transmitted through UART.

[0071] The dual-system redundant backup module is used to complete the heartbeat mechanism abnormality detection of the first intercom function system by the second intercom function system, and the smooth switching between the first intercom function system and the second intercom function system, so as to ensure that when an intercom function system of the intercom terminal 10 is abnormal, the real-time intercom function between the intercom terminal 10 and the external device is always available. For example, before the first intercom function system is abnormal, the intercom terminal 10 realizes real-time visual intercom between the intercom terminal 10 and the external device through the first intercom function system, and after the first intercom function system is abnormal, the intercom terminal 10 realizes real-time voice intercom between the intercom terminal and the external device through the second intercom function system.

[0072] The dual system redundant backup module completes the abnormal detection of the heartbeat mechanism of the first intercom function system by the second intercom function system, and the logic of smooth switching between the first intercom function system and the second intercom function system can be as follows Figure 4 As shown: First, the main controller 101 running the first intercom function system and the slave controller 102 running the second intercom function system establish a communication connection after completing initialization. For example, the communication connection between the main controller 101 and the slave controller 102 can be established through RS485.

[0073] Regardless of whether the master controller 101 works normally, the slave controller 102 regularly sends heartbeat detection messages to the master controller 101. The slave controller 102 sends a heartbeat detection message to the master controller 101, and within a preset time after each heartbeat detection message is sent, the slave controller 102 waits for a heartbeat response message from the master controller 101 to determine whether the master controller 101 has timed out to reply to the heartbeat response message.

[0074] If the heartbeat response message from the master controller 101 is not received within the preset time, the slave controller 102 determines that the heartbeat response message from the master controller 101 has timed out, that is, it is determined that the first intercom function system running on the master controller 101 is abnormal, and further determines whether it is necessary to switch to the second intercom function system. If the first intercom function system is originally in an abnormal state, the intercom function is realized by the second intercom function system, and it is determined that the first intercom function system is abnormal at this time, it means that it is not necessary to switch the system at this time, and the intercom function is still realized by the slave controller 102 running the second intercom function system. If the first intercom function system is originally in a normal state, the intercom function is realized by the first intercom function system, and it is determined that the first intercom function system is abnormal at this time, it means that it is necessary to switch the system at this time, and the slave controller 102 controls the connection port between the data stream switching module 103 and the master controller 101 to close, so as to enable the network card of the slave controller 102 to start, and after the switch, the intercom function is realized by the slave controller 102 running the second intercom function system. When the intercom function is implemented by the slave controller 102 running the second intercom function system, if a call request of the aforementioned physical button is received, the slave controller 102 directly processes the call request, and the slave controller 102 implements the signaling interaction and audio and video information interaction during the intercom process.

[0075] If the heartbeat response message replied by the master controller 101 is received within the preset time, the slave controller 102 determines that the heartbeat response message replied by the master controller 101 has not timed out, that is, it is determined that the first intercom function system running on the master controller 101 is normal, and then further determines whether it is necessary to switch to the first intercom function system. If the first intercom function system is originally in a normal state, the intercom function is realized by the first intercom function system, and at this time it is determined that the first intercom function system is normal, it means that there is no need to switch the system at this time, and the intercom function is still realized by the master controller 101 running the first intercom function system. If the first intercom function system is originally in an abnormal state, the intercom function is realized by the second intercom function system, and at this time it is determined that the first intercom function system is normal, it means that the first intercom function can be restored to use at this time, and it is necessary to switch the second intercom function system to the first intercom function system, enable the connection port between the data stream switching module 103 and the master controller 101 to start, turn off the network card of the slave controller, and after switching, the intercom function is realized by the master controller 101 running the first intercom function system. When the intercom function is implemented by the main controller 101 running the first intercom function system, if a call request from the aforementioned physical button is received, the slave controller 102 forwards the call request to the main controller 101, and the main controller 101 directly processes the call request, and the main controller 101 implements the signaling interaction and audio and video information interaction during the intercom process.

[0076] The slave controller 102 controls the data flow switching module 103 to turn off the connection port between the data flow switching module 103 and the master controller 101, and sets the network card of the slave controller 102 to the on state. After the switching is completed, the slave controller 102 sends a group of ping packets with the destination address being the IP address of the intercom server 20, so that the nearest switch updates the mac address table to ensure smooth network operation.

[0077] After switching from the first intercom function system to the second intercom function system, the intercom terminal 10 can only realize the voice intercom function through the slave controller 102, and can only use the physical button to call the call function. After switching from the first intercom function system to the second intercom function system or from the second intercom function system to the first intercom function system, the slave controller 102 will continue to send heartbeat detection messages to the main controller 101. When the mentality detection response messages of the N consecutive heartbeat detection messages sent are all normal messages, it can be determined that the main controller 101 has returned to normal and needs to be switched to the first intercom function system. The slave controller 102 first turns off its own network card, and then resets the connection port between the data flow switching module 103 and the main controller 101 to the open state by controlling the data flow switching module 103, and then notifies the main controller 101 to send a group of ping packets, the destination address is the IP address of the intercom server 20, so that the nearest switch updates the mac address table to ensure smooth network.

[0078] The intercom terminal 10 has only one network port for realizing communication connection with external devices. The switching between the first intercom function system and the second intercom function system in the intercom terminal 10 is actually the switching of the use right of the single network port. Figure 5 As shown, the first intercom function system and the second intercom function system perform parameter synchronization and heartbeat detection, and the data stream switching module 103 is connected to the external network. When the first intercom function system is abnormal, the slave controller 102 controls the data stream switching module 103 to connect the external network to the second intercom function system, and the network usage right of the single network port belongs to the second intercom function system. When the first intercom function system returns to normal, the slave controller 102 controls the data stream switching module 103 to connect the external network to the first intercom function system, and the network usage right of the single network port belongs to the first intercom function system. The first intercom function system and the second intercom function system share the same IP address and the same MAC address. Even if the intercom function system is switched, the network information displayed to the outside by the intercom terminal 10 remains unchanged.

[0079] like Figure 6As shown, the control of the data stream switching module 103 by the slave controller 102 can be achieved through two commands, one is to control the connection port status between the data stream switching module 103 and the main controller 101 to be enabled (at this time, the connection port status between the slave controller 102 and the data stream switching module 103 is closed), and the other is to control the connection port status between the data stream switching module 103 and the main controller 101 to be closed (at this time, the connection port status between the slave controller 102 and the data stream switching module 103 is enabled). After the data stream switching module 103 completes the switching, the data stream switching module 103 replies to the slave controller 102 with a switching completion response message to inform the slave controller 102 whether the system switching is completed.

[0080] Based on this, the dual system redundant backup module can be divided into an abnormality detection submodule, a system switching submodule and an abnormality recovery submodule. Among them, the abnormality detection submodule is used to detect whether the first intercom function system is abnormal; the system switching submodule is used to realize the switching from the first intercom function system to the second intercom function system; the abnormality recovery submodule is used to realize the switching from the second intercom function system to the first intercom function system when the first intercom function system returns to normal.

[0081] During the switching process between the first intercom function system and the second intercom function system, there may be an abnormal situation of IP address conflict, and the mac address table of the data flow switching module 103 is invalid, resulting in an abnormal situation that the uplink and downlink are blocked. In the present application, the method of solving these abnormal situations is to first shut down the intercom function system in use, and then start the intercom function system after switching. After switching the intercom function system, the mac address table of the data flow switching module is forced to be updated by using a ping packet to avoid the uplink and downlink being blocked.

[0082] The two-way intercom module is used to implement the intercom function of the intercom terminal 10. When the first intercom function system is normal, the virtual button call function, the physical button call function and the called function are all processed by the first intercom function system. When the first intercom function system is abnormal, the virtual button call function is no longer supported, and the physical button call function and the called function are all processed by the second intercom function system. The first intercom function system can complete the video intercom function, and the second intercom function system only needs to ensure that it can complete the voice intercom function. When the second intercom function system is running, video-related functions (such as viewing real-time video, previewing video, etc.) can no longer be used.

[0083] The physical button is directly connected to the slave controller 102, and the virtual button is directly connected to the master controller 101. Before the first intercom function system is abnormal, that is, when the first intercom function system is working normally, the one-key call logic of the intercom terminal 10 can be as follows: Figure 7As shown, when a call request for a one-key call is received, if it is a call request corresponding to a physical button, the slave controller 102 forwards the call request to the master controller 101, and the master controller 101 performs call logic processing after receiving the call request. If it is a call request corresponding to a virtual button, the master controller 101 directly receives the call request and performs call logic processing. When the first intercom function system is abnormal, that is, when the intercom function is realized by the second intercom function system, the one-key call logic of the intercom terminal 10 can be as follows Figure 8 As shown, when a call request for a one-key call is received, if it is a call request corresponding to a physical button, the call logic processing is performed after the call request is received from the controller 102. If it is a call request corresponding to a virtual button, the call request should be received by the main controller 101 for call logic processing. However, due to the abnormality of the first intercom function system, the call request corresponding to the virtual button will fail.

[0084] Before the first intercom function system becomes abnormal, all business functions are run in the first intercom function system, including the most important call intercom function. After the first intercom function system becomes abnormal, the call intercom function is implemented by the redundant backup second intercom function system, and other business functions are not available. The original visual intercom function that can be implemented by the first intercom function system in the intercom terminal 10 is also downgraded to a voice intercom function, which can only support the one-key call function of physical buttons, and the one-key call function of virtual buttons is no longer supported.

[0085] Based on this, the two-way intercom module can be divided into a pre-abnormal visual intercom submodule and a post-abnormal voice intercom submodule. The pre-abnormal visual intercom submodule is implemented in the first intercom function system, mainly realizing the visual intercom function of the caller and the called party. The post-abnormal voice intercom submodule is implemented in the second intercom function system, mainly realizing the voice intercom function of the caller and the called party. The pre-abnormal visual intercom submodule and the post-abnormal voice intercom submodule are implemented in two intercom function systems respectively. During the implementation process, it is necessary to ensure that the intercom parameters, registration parameters, audio streaming parameters, etc. are consistent to ensure that the intercom function can be used normally after the intercom function system is switched.

[0086] In summary, the logic diagram for implementing the intercom function in the intercom terminal 10 can be as follows: Fig. 9As shown. In the first intercom function system, the intercom function of visual dialogue is realized through the video acquisition device, microphone, and speaker. In the second intercom function system, the basic intercom function is realized through the microphone and speaker. A connection is established between the physical button and the second intercom function system, and the second intercom function system processes or forwards the call request of the physical button. The first intercom function system and the second intercom function system will perform parameter synchronization operation and abnormality detection operation to ensure that the first intercom function system and the second intercom function system use the same intercom parameters to realize the intercom function, and timely find out whether the first intercom function system is abnormal. The main controller 101 running the first intercom function system and the slave controller 102 running the second intercom function system are both connected to the data stream switching module 103, and the data stream switching module 103 forwards the external intercom data to the main controller 101 running the first intercom function system or the slave controller 102 running the second intercom function system, or the data stream switching module 103 forwards the intercom data processed by the first intercom function system or the intercom data processed by the second intercom function system to the external intercom server 20. The slave controller 102 running the second intercom function system will also send a control signal to the data stream switching module 103 to control the data stream switching module 103 to connect to the main controller 101 or to connect to the slave controller 102 .

[0087] The upgrade module is used to realize the remote network upgrade of the first intercom function system and the second intercom function system on the basis that the intercom terminal 10 is a single network port externally. Two intercom function systems correspond to one whole machine upgrade package, and the whole machine upgrade package is imported into the intercom terminal 10 through the webpage of the first intercom function system with a single network port, and the whole machine upgrade package is decompressed in the first intercom function system. The main controller 101 running the first intercom function system transmits the upgrade package of the second intercom function system to the slave controller 102 running the second intercom function system, and the upgrade package of the first intercom function system is upgraded in the main controller 101.

[0088] The specific upgrade process of the intercom function system can be as follows: Fig.10As shown, the whole machine upgrade package needs to be upgraded in the first intercom function system first. The first intercom function system first performs a packet header check. If the check fails, the upgrade fails. If the check passes, the first intercom function system downloads the upgrade package, decompresses the upgrade package, and then counts the number of upgrade packages and classifies them. If there is an upgrade package for the second intercom function system, the second intercom function system is notified to perform the upgrade operation. The second intercom function system modifies the network parameters. The first intercom function system transmits the upgrade package to the second intercom function system through the network connection between the first intercom function system and the second intercom function system. Similarly, the second intercom function system must also perform a packet header check first. The upgrade operation is performed only after the check passes. When upgrading the second intercom function system, or when the second intercom function system does not need to be upgraded, the first intercom function system will also perform the upgrade operation in parallel. After the upgrade of the second intercom function system is completed, the first intercom function system is notified and restarted. The first intercom function system will restart only after the upgrade is completed and the notification of the second intercom function system also being upgraded is received. After both the first intercom function system and the second intercom function system are upgraded and restarted, it is determined that both the first intercom function system and the second intercom function system are successfully upgraded. Based on this logic, the logic diagram for implementing the upgrade function in the intercom terminal 10 is as follows: Fig.11 shown.

[0089] Based on this, the upgrade module can be divided into a packaging script submodule, an upgrade verification submodule, a Jenkins packaging submodule, and a second intercom function system upgrade package acquisition submodule. The packaging script submodule is used to add the whole machine model of the intercom terminal and the separate model of the abnormal voice intercom submodule in the packaging script according to the encryption model applied, to ensure that during the network upgrade, when the old program package is performing header verification, the type of the upgrade package can be verified and passed, and it can be upgraded to the intercom terminal normally. The upgrade verification submodule is used to automatically match and verify with the major category of the upgrade package after the intercom terminal receives the whole machine upgrade package. The Jenkins packaging submodule is used to take the upgrade package of the abnormal voice intercom submodule as a component, integrate it into the whole machine upgrade package in the process of generating the whole machine upgrade package, and use platform resources for packaging. The second intercom function system upgrade package acquisition submodule is used to transfer the upgrade package of the second intercom function system from the first intercom function system to the second intercom function system.

[0090] During the upgrade process of the intercom function system, no matter what the reason is that the intercom function system upgrade fails, the intercom function system must be restarted. When the first intercom function system fails to upgrade, the first intercom function system needs to be restarted. When the second intercom function system fails to upgrade, the first and second intercom function systems need to be restarted. That is, no matter whether the second intercom function system fails to upgrade or not, both intercom function systems must be restarted to avoid problems when switching the intercom function system during the upgrade.

[0091] In some embodiments, the intercom terminal 10 registers in the intercom server 20 once every preset time period to prevent communication abnormalities caused by the intercom terminal 10 being disconnected or offline.

[0092] In some embodiments, when the network parameters and SIP service parameters used by the intercom terminal 10 change, the intercom terminal 10 is automatically triggered to re-register in the intercom server 20, and the new network parameters and SIP service parameters are synchronized between the first intercom function system and the second intercom function system.

[0093] Based on the above description, the specific structure of the intercom terminal 10 can be as follows Fig.12 As shown. The first intercom function system of the intercom terminal 10 may include a video acquisition device, a fingerprint acquisition device, a microphone and a speaker. The video image acquired by the video acquisition device can be used for user previewing the screen, detecting the screen, and performing facial recognition on the person in the screen, etc. The fingerprint acquired by the fingerprint acquisition device can be used for fingerprint recognition of the person. The content acquired by the video acquisition device, the fingerprint acquisition device, the microphone and the speaker and the output content together realize the intercom function of the first intercom function system. The second intercom function system detects the state of the first intercom function system in real time to switch the system. Signaling transmission (transmission of upgrade packages, upgrade instructions, intercom parameters, heartbeat detection messages, heartbeat response messages and other information and instructions) will also be performed between the first intercom function system and the second intercom function system. The virtual button is connected to the first intercom function system. When the first intercom function system is working normally, if a person triggers the call function through the virtual button, the first intercom function system will initiate a call request after confirming that the person has the authority to initiate a call request. The physical button is connected to the second intercom function system. When the intercom function of the intercom terminal is realized by the second intercom function system, if a person triggers the call function through the physical button, the second intercom function system initiates a call request. When the intercom function of the intercom terminal is realized by the first intercom function system (that is, the first intercom function system works normally), if a person triggers the call function through the physical button, the second intercom function system sends the status of the physical button to the first intercom function system to trigger the first intercom function system to initiate a call request.

[0094] In some embodiments, the intercom terminal 10 may be any of the following intercom terminals: Video intercom is used in residences and other building systems to provide two-way video calls between visitors and residents (users), achieving dual recognition of images and voices to increase security and reliability, while saving a lot of time and improving work efficiency. Furthermore, it can also provide basic alarm and detection signals in the building system to realize a basic security management system.

[0095] The management machine is installed in the security room in the video intercom system, and provides functions such as video intercom, receiving alarms, remote unlocking, and access control card issuance.

[0096] The management center is a platform server (the above-mentioned intercom server 20) or a management machine device that provides management of the video intercom system in the video intercom system and can be installed in a computer room or a security room.

[0097] The hardware structure of the master controller 101 and the slave controller 102 may include Fig.13 The computing device shown in FIG. Fig.13 Taking the computing device shown as an example, the hardware structure of the main controller 101 and the slave controller 102 is introduced.

[0098] like Fig.13 As shown, the computing device may include a processor 301, a memory 302, a communication interface 303, and a bus 304. The processor 301, the memory 302, and the communication interface 303 may be connected via a bus 304.

[0099] The processor 301 is the control center of the computing device, which can be a processor or a general term for multiple processing elements. For example, the processor 301 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0100] As an embodiment, the processor 301 may include one or more CPUs, such as Fig.13 CPU 0 and CPU 1 are shown in .

[0101] The memory 302 is usually an embedded multi media card (EMMC), but may also be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0102] In a possible implementation, the memory 302 may exist independently of the processor 301, and the memory 302 may be connected to the processor 301 via a bus 304 to store instructions or program codes. When the processor 301 calls and executes the instructions or program codes stored in the memory 302, the model deployment method provided in the embodiment of the present application can be implemented.

[0103] In another possible implementation, the memory 302 may also be integrated with the processor 301 .

[0104] The communication interface 303 is used for the computing device to connect with other devices through a communication network, which may be Ethernet, wireless fidelity (Wi-Fi), wireless local area networks (WLAN), etc. The communication interface 303 may include a receiving unit for receiving data and a sending unit for sending data.

[0105] The bus 304 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0106] It should be pointed out that Fig.13 The structure shown in the figure does not constitute a limitation on the computing device, except Fig.13 In addition to the components shown, the computing device may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0107] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0108] The intercom method provided in the embodiment of the present application can be applied to the intercom terminal 10 in the above-mentioned intercom system 1.

[0109] like Fig.14 As shown, the embodiment of the present application provides an intercom method, which includes the following steps: S101, the slave controller detects the working status of the master controller according to the message transmission status between the slave controller and the master controller.

[0110] In some embodiments, the slave controller periodically sends a heartbeat detection message to the master controller; if a heartbeat response message is received from the master controller within a preset period of time after sending the heartbeat detection message, the slave controller determines that the master controller is in a normal working state; or, if a heartbeat response message is not received from the master controller within a preset period of time after sending the heartbeat detection message, the slave controller determines that the master controller is in an abnormal working state.

[0111] The slave controller periodically sends a heartbeat detection message to the master controller, and the slave controller may send a heartbeat detection message to the master controller at a preset frequency or at fixed intervals.

[0112] Exemplarily, the slave controller sends a heartbeat detection message to the master controller every 30 seconds, with a preset duration of 5 seconds. If the slave controller sends a heartbeat detection message to the master controller at 00:02:14, if no heartbeat response message is received from the master controller between 00:02:14 and 00:02:35, the slave controller can determine that the master controller is in an abnormal working state. If a heartbeat response message is received from the master controller, the slave controller determines that the master controller is in a normal working state.

[0113] In other embodiments, after the slave controller detects an abnormality in the master controller, if the slave controller receives a heartbeat response message from the master controller within a preset time period after sending the heartbeat detection message for a preset number of consecutive times, the slave controller determines that the master controller has resumed normal working state.

[0114] For example, assuming the preset number of times is 5, after an abnormality is detected in the main controller, the slave controller will determine that the main controller is in a normal working state only when it receives a heartbeat response message from the main controller within a preset time period after sending 5 consecutive heartbeat detection messages. Otherwise, the slave controller will determine that the main controller is still in an abnormal working state.

[0115] Optionally, when the slave controller determines whether the master controller is abnormal, a preset number of times can also be set. That is, if the slave controller does not receive a heartbeat response message from the master controller within a preset time period after sending heartbeat detection messages for a consecutive preset number of times, the slave controller determines that the master controller is in an abnormal working state.

[0116] Exemplarily, assuming the preset number of times is 2, the slave controller will determine that the master controller is in an abnormal working state only when the slave controller fails to receive a heartbeat response message from the master controller within the preset time period after sending the heartbeat detection message for two consecutive times.

[0117] In this way, by continuously sending heartbeat detection messages to the main controller, the slave controller can know whether the main controller is in an abnormal working state based on the heartbeat response message replied by the main controller, which is convenient for subsequent switching of the intercom function system when the main controller is in an abnormal working state.

[0118] In some embodiments, in response to receiving a heartbeat detection message sent by a slave controller, the master controller sends a heartbeat response message carrying the latest intercom parameters in the master controller to the slave controller; in response to receiving a heartbeat response message sent by the master controller, the slave controller obtains the intercom parameters from the heartbeat response message; if the intercom parameters carried in the heartbeat response message are different from the intercom parameters already in the slave controller, the intercom parameters already in the slave controller are updated to the intercom parameters carried in the heartbeat response message.

[0119] In particular, the heartbeat response message may also carry other parameters, such as network parameters, activation parameters, etc.

[0120] The heartbeat response message replied by the master controller each time includes the intercom parameters, and the slave controller determines whether the intercom parameters are updated. If the intercom parameters are updated, the slave controller changes its stored intercom parameters to the new intercom parameters, reducing the operation of the master controller to determine whether the intercom parameters are updated.

[0121] In other embodiments, if the intercom parameters in the master controller are updated relative to the last time a heartbeat detection message was received, the master controller sends a heartbeat response message carrying the latest intercom parameters in the master controller to the slave controller; in response to receiving the heartbeat response message sent by the master controller, if the heartbeat response message carries the intercom parameters, the slave controller updates the existing intercom parameters in the slave controller to the intercom parameters carried in the heartbeat response message.

[0122] In this way, the main controller determines whether the intercom parameters are updated. Only when the intercom parameters are updated will the updated intercom parameters be carried in the heartbeat response message. This can reduce the workload of the slave controller and the amount of data in the heartbeat response message.

[0123] In general, the transmission of heartbeat detection messages and heartbeat response messages can not only detect the working status of the main controller, but also carry intercom parameters, so that the intercom parameters between the main controller and the slave controller are synchronized, and there will be no conflict when switching the use of a single network port between the main controller and the slave controller to communicate with external devices.

[0124] S102: When the data stream switching module is in the first working state, the slave controller instructs the data stream switching module to switch from the first working state to the second working state in response to detecting that the master controller is in an abnormal working state.

[0125] Among them, in the first working state, the data stream switching module is used to transmit the data stream from the external device to the main controller, and to send the data stream generated by the main controller to the external device; in the second working state, the data stream switching module is used to transmit the data stream from the external device to the slave controller, and to send the data stream generated by the slave controller to the external device.

[0126] In some embodiments, when the data flow switching module is in the first working state, the slave controller, in response to detecting that the master controller is in an abnormal working state, instructs the data flow switching module to switch from the first working state to the second working state. Specifically, it can be implemented as follows: when the data flow switching module is in the first working state, in response to detecting that the master controller is in an abnormal working state, first control information and second control information are sent to the data flow switching module, so that the data flow switching module switches from the first working state to the second working state; or, when the data flow switching module is in the first working state, in response to detecting that the master controller is in an abnormal working state, first control information is sent to the data flow switching module, and the connection port between the slave controller and the data flow switching module is opened, so that the data flow switching module switches from the first working state to the second working state; wherein the first control information is used to instruct the data flow switching module to close the connection port between the data flow switching module and the master controller, and the second control information is used to instruct the data flow switching module to open the connection port between the data flow switching module and the slave controller.

[0127] In some embodiments, after the data flow switching module switches to the second working state, the slave controller continues to detect the working state of the master controller; in response to detecting that the master controller has resumed normal working state, the slave controller instructs the data flow switching module to switch from the second working state to the first working state.

[0128] In some embodiments, in response to detecting that the main controller has resumed normal working state, the slave controller instructs the data flow switching module to switch from the second working state to the first working state, which can be specifically implemented as follows: in response to detecting that the main controller has resumed normal working state, the connection port between the slave controller and the data flow switching module is closed, and third control information is sent to the data flow switching module to switch the data flow switching module from the second working state to the first working state; or, in response to detecting that the main controller has resumed normal working state, third control information and fourth control information are sent to the data flow switching module to switch the data flow switching module from the second working state to the first working state; wherein the third control information is used to instruct the data flow switching module to open the connection port between the data flow switching module and the main controller, and the fourth control information is used to instruct the data flow switching module to close the connection port between the data flow switching module and the slave controller.

[0129] In this way, the slave controller controls the opening and closing of the connection port on the data stream switching module for establishing a connection with the main controller by controlling the opening and closing of the connection port on itself for establishing a connection with the data stream switching module and sending control information to the data stream switching module, thereby switching the working state of the data stream switching module, thereby realizing the transmission of intercom data between different intercom function systems and external devices.

[0130] S103: The slave controller communicates with the external device based on the same intercom parameters as those in the master controller.

[0131] The intercom parameters may include parameters such as communication protocol, communication standard, communication frequency, encoding method, etc. The slave controller implements the calling and called functions of the intercom terminal based on the intercom parameters.

[0132] In some embodiments, the main controller can control the upgrade of the slave controller, specifically: the main controller obtains an upgrade package for the intercom function system; the main controller determines whether the intercom function system upgrade package includes an upgrade package for the second intercom function system; if included, the main controller sends a network upgrade request message to the slave controller, and the network upgrade request message carries the upgrade package for the second intercom function system; the slave controller upgrades the second intercom function system based on the upgrade package for the second intercom function system in response to receiving the network upgrade request message sent by the main controller; after the upgrade of the second intercom function system is completed, the slave controller sends a network upgrade response message to the main controller and restarts the second intercom function system; after receiving the network upgrade response message sent by the slave controller and completing the upgrade of the first intercom function system, the main controller restarts the first intercom function system.

[0133] The master controller controls the slave controller to upgrade, and the upgrade process is performed when the master controller is working normally. This ensures that the intercom systems running in the slave controller and the master controller are in the latest functional status, better realizes the intercom function, and provides users with a better user experience.

[0134] In some embodiments, the main controller is connected to the first button, and the slave controller is connected to the second button, and the second button is a physical button; the main controller is also used to, when the main controller is in normal working state, in response to detecting a user trigger operation on the first button, issue a call request to the intercom network, and the intercom network is the network to which the intercom terminal is currently connected; the slave controller is also used to, in response to detecting a user trigger operation on the second button, if the main controller is in an abnormal working state, issue a call request to the intercom network.

[0135] The slave controller is also used to, in response to detecting a user's triggering operation on the second button, send a button status message to the main controller if the main controller is in a normal working state, and the button status message is used to indicate that the second button is triggered; the main controller is used to, in response to receiving a button status message sent by the slave controller, issue a call request to the intercom network to communicate with other devices in the intercom network; the main controller is also used to send a button status response message to the slave controller to notify the slave controller that the call request has been initiated.

[0136] Alternatively, the slave controller is also used to, in response to detecting a user trigger operation on a second button, if the main controller is in a normal working state, send a call request to the intercom network and forward the call request to the main controller; the main controller is also used to receive the call request forwarded by the slave controller to communicate with other devices in the intercom network.

[0137] The first button is not limited to a virtual button or a physical button. When the main controller is working normally, the user can trigger the intercom terminal through the first button or the second button to realize the intercom function of one-click calling. When the main controller is abnormal, the second button is a physical button connected to the slave controller, which is not affected by the abnormality of the main controller and can play the role of a backup button. The user triggers the intercom terminal through the second button to realize the intercom function of one-click calling.

[0138] Under normal circumstances, all services of the intercom terminal run on the main controller, and the right to use the network is also in the main controller. When the user needs to make a call with a physical button, the slave controller transmits the button status to the main controller. The main controller decides whether to initiate a call or hang up the call based on the current state of the main controller. When an abnormality occurs in the main controller, such as the main process is stuck, deadlocked, or crashed, the slave controller can detect the abnormality of the main controller based on the heartbeat, and then obtain the right to use a single network port by controlling the data flow switching module and the network card of the slave controller, and at the same time close the network usage right of the main controller. Because the main controller and the slave controller use the same network parameters and intercom parameters, they are displayed as one device on the registered intercom server. Therefore, after the main controller and the slave controller are switched, there is no need to re-register, and they can access the intercom server at any time to perform calling and called operations.

[0139] The intercom terminal provided in this application has only one network port, and the two intercom function systems use a set of network parameters even when switching, which is very convenient and concise in the equipment management and deployment of the intercom system.

[0140] Fig.14The technical solution shown brings at least the following beneficial effects: the intercom terminal provided by the present application includes a master controller and a slave controller. When the master controller works normally, normal communication between the intercom terminal and the external device can be realized. The slave controller continuously detects the working state of the master controller according to the message transmission between the master controller and the slave controller. When the master controller works abnormally, the slave controller promptly controls the data stream switching module to switch from the first working state to the second working state, and transmits the data stream from the external device to the slave controller. The slave controller realizes the intercom function of the intercom terminal, that is, the intercom terminal can realize normal communication with the external device through the slave controller when the master controller works abnormally. In this way, it can avoid that the intercom terminal of a controller cannot communicate with the external device when the controller is abnormal, affecting the user experience, and the intercom parameters in the slave controller are the same as the intercom parameters in the master controller. The master controller and the slave controller use the same set of intercom parameters. Even if the intercom terminal switches between the first intercom function system and the second intercom function system, it still appears as an intercom terminal for the external device, which is convenient for users to manage the intercom terminal.

[0141] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed in this article, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0142] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can 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 the computer execution instruction is loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by the computer or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with the medium. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), etc.

[0143] The above is only a specific implementation of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific implementation provided by the present application, which should all be included in the protection scope of the present application.

Claims

1. An intercom terminal, characterized in that: include: A master controller for running a first intercom function system, a slave controller for running a second intercom function system, and a data stream switching module; The master controller and the slave controller communicate with the external device respectively through the data stream switching module; the data stream switching module supports a first working state and a second working state; in the first working state, the data stream switching module is used to transmit the data stream from the external device to the master controller, and to send the data stream generated by the master controller to the external device; in the second working state, the data stream switching module is used to transmit the data stream from the external device to the slave controller, and to send the data stream generated by the slave controller to the external device; The master controller and the slave controller transmit messages via a preset communication method; the slave controller is used to detect the working state of the master controller based on the message transmission between the slave controller and the master controller; when the data stream switching module is in the first working state, the slave controller is also used to respond to detecting that the master controller is in an abnormal working state, instruct the data stream switching module to switch from the first working state to the second working state, and communicate with the external device based on the same intercom parameters as those in the master controller.

2. The intercom terminal according to claim 1, characterized in that: The slave controller is used to detect the working state of the master controller according to the message transmission between the slave controller and the master controller, including: Sending heartbeat detection messages to the main controller regularly; Receiving a heartbeat response message sent by the main controller within a preset time period after sending the heartbeat detection message, determining that the main controller is in a normal working state; or, If no heartbeat response message sent by the main controller is received within a preset time period after the heartbeat detection message is sent, it is determined that the main controller is in an abnormal working state.

3. The intercom terminal according to claim 1 or 2, characterized in that: The main controller is also used for: In response to receiving the heartbeat detection message sent by the slave controller, sending a heartbeat response message carrying the latest intercom parameters in the master controller to the slave controller; The slave controller is also used for: In response to receiving the heartbeat response message sent by the main controller, obtaining intercom parameters from the heartbeat response message; If the intercom parameters carried in the heartbeat response message are different from the intercom parameters already in the slave controller, the intercom parameters already in the slave controller are updated to the intercom parameters carried in the heartbeat response message.

4. The intercom terminal according to claim 1 or 2, characterized in that: The master controller is further configured to send a heartbeat response message carrying the latest intercom parameters in the master controller to the slave controller if the intercom parameters in the master controller are updated relative to the last time the heartbeat detection message was received; The slave controller is also used to, in response to receiving a heartbeat response message sent by the master controller, update the existing intercom parameters in the slave controller to the intercom parameters carried in the heartbeat response message if the heartbeat response message carries intercom parameters.

5. The intercom terminal according to claim 1, characterized in that: The main controller is also used for: Get the intercom system upgrade package; Determining whether the intercom function system upgrade package includes the upgrade package of the second intercom function system; If included, sending a network upgrade request message to the slave controller, the network upgrade request message carrying an upgrade package of the second intercom function system; The slave controller is also used for: In response to receiving the network upgrade request message sent by the main controller, upgrading the second intercom function system based on the upgrade package of the second intercom function system; After the upgrade of the second intercom function system is completed, sending a network upgrade response message to the main controller, and restarting the second intercom function system; The main controller is further configured to restart the first intercom function system after receiving the network upgrade response message sent by the slave controller and completing the upgrade of the first intercom function system.

6. The intercom terminal according to claim 1, characterized in that: The master controller is connected to a first button, the slave controller is connected to a second button, and the second button is a physical button; The main controller is further configured to, when the main controller is in a normal working state, in response to detecting a trigger operation of the user on the first button, send a call request to the intercom network, the intercom network being the network currently accessed by the intercom terminal; The slave controller is further configured to, in response to detecting a trigger operation of the user on the second button, send a call request to the intercom network if the master controller is in an abnormal working state.

7. The intercom terminal according to claim 6, characterized in that: The slave controller is further configured to, in response to detecting a trigger operation of the user on the second button, send a button status message to the master controller if the master controller is in a normal working state, wherein the button status message is used to indicate that the second button is triggered; the master controller is configured to, in response to receiving the button status message sent by the slave controller, send a call request to the intercom network to communicate with other devices in the intercom network; the master controller is further configured to send a button status response message to the slave controller to notify the slave controller that the call request has been initiated; or, The slave controller is also used to, in response to detecting a user's trigger operation on the second button, if the main controller is in a normal working state, issue a call request to the intercom network and forward the call request to the main controller; the main controller is also used to receive the call request forwarded by the slave controller to communicate with other devices in the intercom network.

8. The intercom terminal according to claim 1, characterized in that: The slave controller is used to instruct the data stream switching module to switch from the first working state to the second working state in response to detecting that the master controller is in an abnormal working state, including: When the data stream switching module is in the first working state, in response to detecting that the main controller is in an abnormal working state, sending first control information and second control information to the data stream switching module so that the data stream switching module switches from the first working state to the second working state; or When the data stream switching module is in the first working state, in response to detecting that the master controller is in an abnormal working state, first control information is sent to the data stream switching module, and a connection port between the slave controller and the data stream switching module is opened, so that the data stream switching module is switched from the first working state to the second working state; Among them, the first control information is used to instruct the data flow switching module to close the connection port between the data flow switching module and the main controller, and the second control information is used to instruct the data flow switching module to open the connection port between the data flow switching module and the slave controller.

9. The intercom terminal according to claim 1, characterized in that: The slave controller is also used for: After the data stream switching module switches to the second working state, continuing to detect the working state of the main controller; In response to detecting that the main controller resumes a normal working state, instructing the data stream switching module to switch from the second working state to the first working state; The slave controller is used to, in response to detecting that the master controller resumes normal working state, instruct the data stream switching module to switch from the second working state to the first working state, including: In response to detecting that the master controller resumes normal working state, closing the connection port between the slave controller and the data stream switching module, and sending third control information to the data stream switching module, so that the data stream switching module switches from the second working state to the first working state; or, In response to detecting that the main controller resumes a normal working state, sending third control information and fourth control information to the data stream switching module, so that the data stream switching module switches from the second working state to the first working state; Among them, the third control information is used to instruct the data flow switching module to open the connection port between the data flow switching module and the main controller, and the fourth control information is used to instruct the data flow switching module to close the connection port between the data flow switching module and the slave controller.

10. A method for intercom, characterized in that: Applied to an intercom terminal, the intercom terminal comprises: a main controller for running a first intercom function system, a slave controller for running a second intercom function system, and a data stream switching module, the main controller and the slave controller communicate with an external device respectively through the data stream switching module; the main controller and the slave controller transmit messages through a preset communication method; The method comprises: The slave controller detects the working state of the master controller according to the message transmission between the slave controller and the master controller; In the case where the data stream switching module is in the first working state, the slave controller in response to detecting that the master controller is in an abnormal working state instructs the data stream switching module to switch from the first working state to the second working state; wherein, in the first working state, the data stream switching module is used to transmit the data stream from the external device to the master controller, and to send the data stream generated by the master controller to the external device; in the second working state, the data stream switching module is used to transmit the data stream from the external device to the slave controller, and to send the data stream generated by the slave controller to the external device; The slave controller communicates with the external device based on the same intercom parameters as those in the master controller.

Citation Information

Patent Citations

  • Dual-operation system, working state control method and device and storage medium

    CN110502928A

  • Main and standby system switching method and device based on IPPBX

    CN111130862A

  • OMA talkback system and method supporting talkback protocol stack switching

    CN116156438A

  • System switching system of duplex programmable controller

    JP2010146363A

  • Method and Device for communication of walkie-talkiein mobile communication mobile system

    KR1020050036527A