CN112835643A - Cloud intercom management method and device based on equipment shadow service and equipment - Google Patents

Cloud intercom management method and device based on equipment shadow service and equipment Download PDF

Info

Publication number
CN112835643A
CN112835643A CN202110143567.4A CN202110143567A CN112835643A CN 112835643 A CN112835643 A CN 112835643A CN 202110143567 A CN202110143567 A CN 202110143567A CN 112835643 A CN112835643 A CN 112835643A
Authority
CN
China
Prior art keywords
shadow
request
configuration
cloud intercom
intercom device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110143567.4A
Other languages
Chinese (zh)
Other versions
CN112835643B (en
Inventor
陈志伟
陈毅聪
陈镇兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ringslink Xiamen Network Communication Technologies Co ltd
Original Assignee
Ringslink Xiamen Network Communication Technologies Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ringslink Xiamen Network Communication Technologies Co ltd filed Critical Ringslink Xiamen Network Communication Technologies Co ltd
Priority to CN202110143567.4A priority Critical patent/CN112835643B/en
Publication of CN112835643A publication Critical patent/CN112835643A/en
Application granted granted Critical
Publication of CN112835643B publication Critical patent/CN112835643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Telephonic Communication Services (AREA)
  • Interconnected Communication Systems, Intercoms, And Interphones (AREA)

Abstract

The invention discloses a management method for cloud intercom equipment based on equipment shadow service, which comprises the following steps: responding to an operation request or a configuration request of a user to the cloud intercom device through a client; writing request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request; analyzing the request data according to the incremental log of the database, and configuring an MQ subscription mode; consuming from the MQ subscription mode by deploying two equipment shadow servers respectively, and generating a shadow file; downloading and linking the shadow file to the corresponding cloud intercom device by using a distributed lock mode and through TCP long connection; the cloud intercom device downloads the corresponding shadow file through the download link, executes operation or configuration updating according to corresponding instructions, and automatically feeds back state information of the execution operation or the configuration updating to the device shadow server.

Description

Cloud intercom management method and device based on equipment shadow service and equipment
Technical Field
The invention relates to the technical field of voice recognition, in particular to a method, a device and equipment for managing cloud intercom equipment based on equipment shadow service.
Background
At present, most terminal equipment configuration issuing is directly through signaling interaction, so that network load pressure of the terminal equipment is overlarge when the request is frequent, the configuration information currently issued by an application program cannot be received once the equipment is disconnected, and the problem is often encountered in a weak network environment, so that a user can successfully complete the configuration of the equipment information by multiple attempts. Although some management platforms have a scheme of device shadows, the management platforms only aim at IoT devices with simple configuration information, and do not have strong expansibility, so that the IoT devices in a cloud talkback scene cannot have good applicability, and the problems that the configuration information cannot be classified in a customized manner, the size of a data transmission message is limited and the like exist. The collection and the issue of the shadow information need to be specially processed. And after the single-point shadow server is abnormal, catastrophic problems such as data loss, functional failure, incapability of recovery and the like easily occur.
Disclosure of Invention
In view of this, the present invention aims to provide a method and an apparatus for managing a cloud intercom device based on a device shadow service, and a device, which can avoid a load problem caused by frequent requests to a cloud intercom terminal device, ensure access stability of the cloud intercom device and a cloud service, meet diversified application scenarios, improve high availability of the service, and improve non-sensible use of the cloud intercom device by a user.
In order to achieve the above object, the present invention provides a method for managing a cloud intercom device based on a device shadow service, where the method includes:
responding to an operation request or a configuration request of a user to the cloud intercom device through a client;
writing request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request;
analyzing the request data according to the incremental log of the database, and configuring an MQ subscription mode;
consuming from the MQ subscription mode by deploying two equipment shadow servers respectively, and generating a shadow file;
downloading and linking the shadow file to the corresponding cloud intercom device by using a distributed lock mode and through TCP long connection;
the cloud intercom device downloads the corresponding shadow file through the download link, executes operation or configuration updating according to corresponding instructions, and automatically feeds back state information of the execution operation or the configuration updating to the device shadow server.
Preferably, the step of writing the request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request includes:
and receiving the operation request or the configuration request through an HTTPS interface provided by a Web server based on the operation request or the configuration request, and writing the request data of the operation request or the configuration request into a database for storage.
Preferably, the parsing the request data according to the incremental log of the database, and the step of configuring the MQ subscription mode includes:
incremental data subscription and consumption are provided through the Canal to configure an MQ subscription mode;
and sending the request data to the Topic of the MQ subscription mode.
Preferably, the step of consuming from the MQ subscription mode by deploying two device shadow servers respectively and generating the shadow file comprises:
and consuming according to the consumption message in the Topic through each equipment shadow server, and generating a shadow file from the request data according to a preset protocol and a preset encryption mode.
Preferably, the step of deploying the two shadow servers includes:
subscribing to the Topic specified by Kafka by adding a different consumer group to each of the identified shadow servers.
Preferably, the cloud intercom device downloads the corresponding shadow file through the download link, and further includes:
and monitoring whether the cloud intercom device downloads the shadow file through the download link or not, if so, alarming through an alarm mechanism to prompt a download error, and informing operation and maintenance personnel to repair the abnormality.
In order to achieve the above object, the present invention further provides an apparatus for managing a cloud intercom device based on a device shadow service, where the apparatus includes:
the response unit is used for responding to an operation request or a configuration request of a user to the cloud intercom device through the client;
a writing unit, configured to write request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request;
the configuration unit is used for analyzing the request data according to the incremental log of the database and configuring an MQ subscription mode;
the consumption unit is used for respectively consuming from the MQ subscription mode by deploying two equipment shadow servers and generating a shadow file;
the issuing unit is used for issuing the download link of the shadow file to the corresponding cloud intercom device in a distributed lock mode through TCP long connection;
and the execution unit is used for downloading the corresponding shadow file by the cloud intercom device through the download link, executing operation or configuration updating according to a corresponding instruction, and automatically feeding back the state information of the execution operation or the configuration updating to the device shadow server.
Preferably, the writing unit is further configured to:
and receiving the operation request or the configuration request through an HTTPS interface provided by a Web server based on the operation request or the configuration request, and writing the request data of the operation request or the configuration request into a database for storage.
Preferably, the consumption unit is further configured to:
and consuming according to the consumption message in the Topic through each equipment shadow server, and generating a shadow file from the request data according to a preset protocol and a preset encryption mode.
In order to achieve the above object, the present invention further provides a device shadow service based management device for a cloud intercom device, including a processor, a memory, and a computer program stored in the memory, where the computer program is executable by the processor to implement the device shadow service based management method for a cloud intercom device according to the above embodiment.
Has the advantages that:
according to the technical scheme, the request data are written into the database, the request data are analyzed according to the incremental logs, the shadow files are generated through the equipment shadow server, and the corresponding download links are generated, so that the cloud intercom device can conveniently perform download synchronization at any time, although the cloud intercom device is in an off-line state, the corresponding configuration file information can be acquired for information synchronization after being on-line again, the executed state information is fed back to the equipment shadow server, the subsequent client side only needs to acquire the cloud intercom device information through the equipment shadow server directly, the load problem caused by frequent requests to the cloud intercom device is avoided, the high availability of the service is improved, and the use of a user to the cloud intercom device is improved.
The scheme can be applied to IOT equipment which has complicated configuration information (comprising thousands of contact persons, access control card numbers and other large information) such as access control talkback and the like and needs linkage among equipment, namely in a smart community scene, a plurality of cloud talkback equipment is deployed in different areas such as rooms, ladders, parking lots and the like, the equipment needs linkage, and configuration information of equipment shadows is agreed by using a preset protocol to be related to other equipment, so that the configuration synchronization consistency among the equipment is realized; and moreover, a preset encryption mode is used for processing, so that the safety of message transmission is ensured.
According to the scheme, two equipment shadow servers are deployed, and message middleware for notifying shadow changes is subscribed and consumed, so that configuration files which are backed up with each other are generated on the two equipment shadow server hosts each time the changes are performed, the cloud intercom equipment is prevented from being notified for many times in a distributed locking mode, and the risk that once one single equipment shadow server is abnormal, the whole set of configuration information synchronization process cannot be recovered by self and data loss is caused is avoided. Therefore, the dual-device shadow server mutual backup deployment adopted by the scheme solves the problems, relieves the read-write IO pressure when the single machine generates the device shadow to a certain extent, well solves the problems of high availability and load balance, and enables a user to normally use the function of the cloud intercom device even though sudden abnormality occurs and because of the existence of the mutual backup server.
According to the scheme, the downloading abnormity monitoring during the downloading of the shadow file is carried out on the downloading link, when abnormity is monitored, an alarm mechanism is used for alarming to prompt downloading errors, and operation and maintenance personnel are informed to carry out abnormity repairing, so that the reliability operation of the system is guaranteed, and the consistency of data is maintained.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for managing a cloud intercom device based on a device shadow service according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a device shadow service management system according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a management apparatus for a cloud intercom device based on a device shadow service according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
The present invention will be described in detail with reference to the following examples.
The device shadow refers to a configuration file for storing the reported state information of the device and the expected state information of the application program. When the application program needs to request to acquire the device state, the device state is directly acquired from the device shadow service, so that the request load of the device end is reduced, and the decoupling of the application program and the device is realized. When the application program sends information to the equipment, the equipment is disconnected, the configuration information is stored in the shadow of the equipment, and the configuration information is issued when the equipment is disconnected and reconnected, so that the problem that the control cannot be performed due to the fact that the network of the equipment is unstable is reduced. The cloud intercom is an important and special ring in the modern IoT field, has the characteristics of various and complex configurations, high information security requirement, low fault tolerance, multiple linkage devices and the like in scenes such as an intelligent community and the like, and needs to perform special processing on the collection and the issuing of shadow information; at present, some products provide shadow services issued aiming at complex configuration, the problems of uncertainty such as data backup and service downtime under a single machine architecture exist, high-availability shadow services cannot be provided for terminal equipment, and after a single-point shadow server is abnormal, catastrophic problems such as data loss, functional failure and incapability of recovery easily occur.
Therefore, the cloud intercom device management method based on the device shadow service provided by the invention can avoid the load problem caused by frequent requests to the cloud intercom terminal device, ensure the access stability of the cloud intercom device and the cloud service, meet diversified application scenes, improve the high availability of the service and improve the non-inductive use of the cloud intercom device by users.
Fig. 1 is a schematic flowchart illustrating a method for managing a cloud intercom device based on a device shadow service according to an embodiment of the present invention.
In this embodiment, the method includes:
and S11, responding to the operation request or the configuration request of the user to the cloud intercom device through the client.
In this embodiment, a user may make an operation request or a configuration request for the cloud intercom device through an APP application or a Web page of a client.
And S12, writing the request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request.
In this embodiment, after the user changes the relevant configuration request of the corresponding cloud intercom device through the application program operation in the client, the front end notifies through the HTTPS interface provided by the Web management server, and the Web management server writes the changed data into the MySQL database for storage.
Wherein, the step of writing the request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request comprises:
and receiving the operation request or the configuration request through an HTTPS interface provided by a Web server based on the operation request or the configuration request, and writing the request data of the operation request or the configuration request into a database for storage.
S13, analyzing the request data according to the increment log of the database, and configuring an MQ subscription mode.
Analyzing the request data according to the incremental log of the database, wherein the step of configuring the MQ subscription mode comprises the following steps of:
s13-1, incremental data subscription and consumption are provided through the Canal to configure an MQ subscription mode;
s13-2, sending the request data to the Topic of the MQ subscription mode.
In this embodiment, the client pretends itself to be MySQL Slave through the data synchronization module Canal, sends a Dump protocol to the MySQL Master, and the MySQL Master receives the Dump request, starts to push Binary Log to the Canal (namely Canal), and sends incremental data to the specified Topic of Kafka through analyzing the Binary Log pushed by MySQL.
And S14, consuming from the MQ subscription mode by deploying two device shadow servers respectively, and generating a shadow file.
Wherein, the step of consuming from the MQ subscription mode by deploying two device shadow servers respectively and generating shadow files comprises:
and consuming according to the consumption message in the Topic through each equipment shadow server, and generating a shadow file from the request data according to a preset protocol and a preset encryption mode.
Wherein, the step of deploying the two shadow servers comprises:
subscribing to the Topic specified by Kafka by adding a different consumer group to each of the identified shadow servers.
In this embodiment, two device shadow servers are deployed, join different consumer groups, subscribe to the provision Topic of Kafka, consume the relevant data of configuration change from the provision Topic, write the file in a specific protocol and a specific encryption manner, and notify an access server that the cloud intercom device needs to be updated and configured. And after receiving the notification of the shadow server, the access server transmits the corresponding configuration file download link to the cloud intercom device through the long connection of the TCP. The message content in the whole process is encrypted by AES256, and the anti-theft link is set for the download link, so that the safety of message transmission is ensured.
And S15, the downloading link of the shadow file is issued to the corresponding cloud intercom device through TCP long connection in a distributed lock mode.
In this embodiment, in order to avoid redundant requests caused by repeated notifications of the shadow server of the dual-device, a distributed lock based on a database is introduced in the scheme to solve this problem. That is, a state table is created, each configuration change inserts a piece of unique data into the state table, and the uniqueness constraint of the database ensures that only one server can operate successfully at a time, namely, the lock of the change is obtained. Meanwhile, the distribution problem of load balancing can be solved, because: the server which obtains the lock firstly proves that the server processes data, writes files with higher overall speed and lighter load, and distributes the download address of the configuration file based on the result.
And S16, the cloud intercom device downloads the corresponding shadow file through the download link, executes operation or configuration update according to a corresponding instruction, and automatically feeds back the state information of the execution operation or the configuration update to the device shadow server.
Wherein, the cloud intercom device downloads the corresponding shadow file through the download link, and further includes:
and monitoring whether the cloud intercom device downloads the shadow file through the download link or not, if so, alarming through an alarm mechanism to prompt a download error, and informing operation and maintenance personnel to repair the abnormality.
In the embodiment, by monitoring the abnormal downloading of the configuration file in the Nginx log, if the downloading error occurs, the operation and maintenance personnel is timely notified to perform manual intervention, so that the system reliability is further guaranteed.
In the above scheme, by introducing the device shadow service into the cloud intercom platform, the state information reported by the cloud intercom device and the state of the client-side changed cloud intercom device can be written into the corresponding configuration file (i.e., the device shadow), and by using the device shadow as an intermediary, a network request can be prevented from being directly initiated to the cloud intercom device, and information issued by the client-side can be prevented from being directly discarded after the cloud intercom device is offline. According to the scheme, a set of configuration file protocols are customized, the configuration files are stored in the file server in a safe encryption mode, the downloading link is issued when the comparison is different according to the comparison with the configuration files MD5 stored in the cloud intercom device, and the cloud intercom device downloads the configuration files automatically, so that the pressure of network load is reduced, and the safety and the controllability are greatly improved. In addition, the downloading is monitored, and once the downloading abnormity is found, the operation and maintenance personnel is informed to carry out abnormity repairing. According to the scheme, the multi-machine deployment shadow service is realized by adopting a distributed architecture, so that the problems of high availability and overlarge single-machine IO load pressure are solved, the access stability of the cloud intercom device and the cloud service is ensured, and rich community application scenes are met.
In the scheme, the interaction mode between the cloud and the equipment is optimized mainly through an equipment shadow mechanism, so that the method can be widely applied to the cloud-related fields of equipment such as the Internet of things and the like; in addition, the scheme can be in butt joint with the intelligent device based on AIoT, and stable and reliable service is provided for diversified parameter configuration in an AI application scene.
Fig. 2 is a schematic structural diagram of a device shadow service management system according to an embodiment of the present invention. The management system comprises cloud intercom equipment (terminal equipment), an access server, an equipment shadow server, a Web management server, Kafka (message queue module), MySQL (data storage module) and Canal (data synchronization module). Wherein the content of the first and second substances,
cloud intercom equipment: and responding to the remote operation and configuration of the user by interacting with the access server, and reporting the state information of the equipment.
Accessing a server: the access server is an entrance for the cloud intercom device to access the cloud platform service, and is in long connection with the cloud intercom device.
The equipment shadow server: and consuming the configuration change data in the MQ (message middleware), generating a shadow file and informing the access server to issue a configuration download link.
A Web server: and after receiving a request for modifying the configuration of the cloud intercom device from the front end, a request inlet of an application program (Web/APP) writes data into the database.
MySQL: the relational database management system can be used for storing state information reported by the cloud intercom device and configuration information to be modified by a user through an application program.
The Canal: and providing incremental data subscription and consumption based on database incremental log analysis, configuring an MQ subscription mode, sending data to a Topic of the MQ subscription mode, and processing a message consumed by the device shadow server from the Topic.
Kafka: the MQ adopted in the scheme is based on the distributed message middleware for publishing and subscribing.
The invention also provides a management device for the cloud intercom device based on the device shadow service, which can avoid the load problem caused by frequent requests to the cloud intercom terminal device, ensure the access stability of the cloud intercom device and the cloud service, meet diversified application scenes, improve the high availability of the service and improve the non-inductive use of the cloud intercom device by users.
Fig. 3 is a schematic structural diagram of a management apparatus for a cloud intercom device based on a device shadow service according to an embodiment of the present invention.
In this embodiment, the apparatus 30 includes:
the response unit 31 is configured to respond to an operation request or a configuration request of a user to the cloud intercom device through the client.
A writing unit 32, configured to write request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request.
Wherein the writing unit 32 is further configured to:
and receiving the operation request or the configuration request through an HTTPS interface provided by a Web server based on the operation request or the configuration request, and writing the request data of the operation request or the configuration request into a database for storage.
The configuration unit 33 is configured to parse the request data according to the incremental log of the database, and configure an MQ subscription mode.
Wherein the configuration unit 33 further includes:
incremental data subscription and consumption are provided through the Canal to configure an MQ subscription mode;
and sending the request data to the Topic of the MQ subscription mode.
And the consuming unit 34 is configured to respectively consume from the MQ subscription mode by deploying two device shadow servers, and generate a shadow file.
Further, the step of consuming from the MQ subscription mode by deploying two device shadow servers respectively and generating a shadow file comprises:
and consuming according to the consumption message in the Topic through each equipment shadow server, and generating a shadow file from the request data according to a preset protocol and a preset encryption mode.
Further, the step of deploying the two shadow servers includes:
subscribing to the Topic specified by Kafka by adding a different consumer group to each of the identified shadow servers.
And the issuing unit 35 is configured to issue the download link of the shadow file to the corresponding cloud intercom device through a TCP long connection in a distributed lock manner.
The execution unit 36 is configured to download the corresponding shadow file through the download link, execute operation or configuration update according to a corresponding instruction, and automatically feed back state information of the execution operation or the configuration update to the device shadow server.
Wherein, the cloud intercom device downloads the corresponding shadow file through the download link, and further includes:
and monitoring whether the cloud intercom device downloads the shadow file through the download link or not, if so, alarming through an alarm mechanism to prompt a download error, and informing operation and maintenance personnel to repair the abnormality.
Each unit module of the apparatus 30 can respectively execute the corresponding steps in the above method embodiments, and therefore, the detailed description of each unit module is omitted here, and please refer to the description of the corresponding steps above.
The embodiment of the invention also provides a management device for the cloud intercom device based on the device shadow service, which comprises a processor, a memory and a computer program stored in the memory, wherein the computer program can be executed by the processor to realize the management method for the cloud intercom device based on the device shadow service.
The device shadow service based management device for the cloud intercom device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the schematic diagram is merely an example of a device for managing a cloud intercom device based on the device shadow service, and does not constitute a limitation of the device for managing a cloud intercom device based on the device shadow service, and may include more or less components than those shown, or combine some components, or different components, for example, the device for managing a cloud intercom device based on the device shadow service may further include an input-output device, a network access device, a bus, and the like.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, and the like, and the control center of the management device of the cloud intercom device based on the device shadow service connects various parts of the management device of the entire cloud intercom device based on the device shadow service by using various interfaces and lines.
The memory may be configured to store the computer programs and/or modules, and the processor may implement various functions of the management device for the cloud intercom device based on the device shadow service by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
The unit integrated with the management device of the cloud intercom device based on the device shadow service can be stored in a computer readable storage medium if the unit is implemented in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
The embodiments in the above embodiments can be further combined or replaced, and the embodiments are only used for describing the preferred embodiments of the present invention, and do not limit the concept and scope of the present invention, and various changes and modifications made to the technical solution of the present invention by those skilled in the art without departing from the design idea of the present invention belong to the protection scope of the present invention.

Claims (10)

1. A management method for a cloud intercom device based on a device shadow service is characterized by comprising the following steps:
responding to an operation request or a configuration request of a user to the cloud intercom device through a client;
writing request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request;
analyzing the request data according to the incremental log of the database, and configuring an MQ subscription mode;
consuming from the MQ subscription mode by deploying two equipment shadow servers respectively, and generating a shadow file;
downloading and linking the shadow file to the corresponding cloud intercom device by using a distributed lock mode and through TCP long connection;
the cloud intercom device downloads the corresponding shadow file through the download link, executes operation or configuration updating according to corresponding instructions, and automatically feeds back state information of the execution operation or the configuration updating to the device shadow server.
2. The method for managing the cloud intercom device based on the device shadow service according to claim 1, wherein the step of writing request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request comprises:
and receiving the operation request or the configuration request through an HTTPS interface provided by a Web server based on the operation request or the configuration request, and writing the request data of the operation request or the configuration request into a database for storage.
3. The method for managing a cloud intercom device based on device shadow service as claimed in claim 1, wherein the step of parsing the request data according to the incremental log of the database, the step of configuring the MQ subscription mode includes:
incremental data subscription and consumption are provided through the Canal to configure an MQ subscription mode;
and sending the request data to the Topic of the MQ subscription mode.
4. The method for managing cloud intercom device based on device shadow service of claim 3, wherein the step of consuming from the MQ subscription mode by deploying two device shadow servers respectively and generating a shadow file comprises:
and consuming according to the consumption message in the Topic through each equipment shadow server, and generating a shadow file from the request data according to a preset protocol and a preset encryption mode.
5. The method for managing the cloud intercom device based on the device shadow service of claim 4, wherein the step of deploying the two device shadow servers comprises:
subscribing to the Topic specified by Kafka by adding a different consumer group to each of the identified shadow servers.
6. The method for managing the cloud intercom device based on the device shadow service of claim 1, wherein the cloud intercom device downloads the corresponding shadow file through the download link, further comprising:
and monitoring whether the cloud intercom device downloads the shadow file through the download link or not, if so, alarming through an alarm mechanism to prompt a download error, and informing operation and maintenance personnel to repair the abnormality.
7. An apparatus for managing a cloud intercom device based on a device shadow service, the apparatus comprising:
the response unit is used for responding to an operation request or a configuration request of a user to the cloud intercom device through the client;
a writing unit, configured to write request data of the operation request or the configuration request into a database for storage based on the operation request or the configuration request;
the configuration unit is used for analyzing the request data according to the incremental log of the database and configuring an MQ subscription mode;
the consumption unit is used for respectively consuming from the MQ subscription mode by deploying two equipment shadow servers and generating a shadow file;
the issuing unit is used for issuing the download link of the shadow file to the corresponding cloud intercom device in a distributed lock mode through TCP long connection;
and the execution unit is used for downloading the corresponding shadow file by the cloud intercom device through the download link, executing operation or configuration updating according to a corresponding instruction, and automatically feeding back the state information of the execution operation or the configuration updating to the device shadow server.
8. The apparatus for managing a cloud intercom device based on device shadow service according to claim 7, wherein the writing unit is further configured to:
and receiving the operation request or the configuration request through an HTTPS interface provided by a Web server based on the operation request or the configuration request, and writing the request data of the operation request or the configuration request into a database for storage.
9. The apparatus for managing a cloud intercom device based on device shadow service of claim 7, wherein the consuming unit is further configured to:
and consuming according to the consumption message in the Topic through each equipment shadow server, and generating a shadow file from the request data according to a preset protocol and a preset encryption mode.
10. A management device for a cloud intercom device based on a device shadow service, comprising a processor, a memory and a computer program stored in the memory, the computer program being executable by the processor to implement a management method for a cloud intercom device based on a device shadow service according to any one of claims 1 to 6.
CN202110143567.4A 2021-02-02 2021-02-02 Cloud intercom management method and device based on equipment shadow service and equipment Active CN112835643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110143567.4A CN112835643B (en) 2021-02-02 2021-02-02 Cloud intercom management method and device based on equipment shadow service and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110143567.4A CN112835643B (en) 2021-02-02 2021-02-02 Cloud intercom management method and device based on equipment shadow service and equipment

Publications (2)

Publication Number Publication Date
CN112835643A true CN112835643A (en) 2021-05-25
CN112835643B CN112835643B (en) 2022-05-17

Family

ID=75931652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110143567.4A Active CN112835643B (en) 2021-02-02 2021-02-02 Cloud intercom management method and device based on equipment shadow service and equipment

Country Status (1)

Country Link
CN (1) CN112835643B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629907A (en) * 2022-03-25 2022-06-14 广州助蜂网络科技有限公司 Management and control method and device for parking lot equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1774697A (en) * 2003-04-29 2006-05-17 国际商业机器公司 Managing access to objects of a computing environment
US20180152401A1 (en) * 2016-11-28 2018-05-31 Amazon Technologies, Inc. Managing security in messaging protocol communications
CN109587228A (en) * 2018-11-23 2019-04-05 济南浪潮高新科技投资发展有限公司 A kind of publicly-owned agreement platform of internet of things and equipment cut-in method
CN110719311A (en) * 2018-07-13 2020-01-21 深圳兆日科技股份有限公司 Distributed coordination service method, system and computer readable storage medium
CN111586043A (en) * 2020-05-07 2020-08-25 广东培正学院 Operation and maintenance management system for computer equipment
CN112287410A (en) * 2020-11-05 2021-01-29 中国平安财产保险股份有限公司 Method and device for pressure measurement data storage isolation, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1774697A (en) * 2003-04-29 2006-05-17 国际商业机器公司 Managing access to objects of a computing environment
US20180152401A1 (en) * 2016-11-28 2018-05-31 Amazon Technologies, Inc. Managing security in messaging protocol communications
CN110719311A (en) * 2018-07-13 2020-01-21 深圳兆日科技股份有限公司 Distributed coordination service method, system and computer readable storage medium
CN109587228A (en) * 2018-11-23 2019-04-05 济南浪潮高新科技投资发展有限公司 A kind of publicly-owned agreement platform of internet of things and equipment cut-in method
CN111586043A (en) * 2020-05-07 2020-08-25 广东培正学院 Operation and maintenance management system for computer equipment
CN112287410A (en) * 2020-11-05 2021-01-29 中国平安财产保险股份有限公司 Method and device for pressure measurement data storage isolation, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629907A (en) * 2022-03-25 2022-06-14 广州助蜂网络科技有限公司 Management and control method and device for parking lot equipment

Also Published As

Publication number Publication date
CN112835643B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
US9819733B2 (en) Peer-to-peer exchange of data resources in a control system
CN108874558B (en) Message subscription method of distributed transaction, electronic device and readable storage medium
US7096391B2 (en) Error message suppression system and method
US9542177B1 (en) Peer configuration analysis and enforcement
CN112955874A (en) System and method for self-healing in decentralized model building using machine learning of blockchains
CN110895488B (en) Task scheduling method and device
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
CN113704354A (en) Data synchronization method and device, computer equipment and storage medium
US10693709B2 (en) Processing gap events in a change detection management system
CN108255994A (en) A kind of database version management method based on database snapshot
CN112882738A (en) Configuration information updating method and device under micro-service architecture and electronic equipment
CN112835643B (en) Cloud intercom management method and device based on equipment shadow service and equipment
CN107633026B (en) data synchronization exception handling method and device and server
CN110620798A (en) Control method, system, equipment and storage medium for FTP connection
CN113900855B (en) Active hot start method, system and device for abnormal state of switch
CN113032477B (en) Long-distance data synchronization method and device based on GTID and computing equipment
CN114143330A (en) Configuration method, device and system of time server
CN110502460B (en) Data processing method and node
CN109753292B (en) Method and device for deploying multiple applications in multiple single instance database service
CN111586135A (en) Cloud deployment micro-service application system and data transmission method, device and equipment thereof
CN113590591B (en) Automatic event state updating method, device, equipment and storage medium
US11953995B1 (en) Centralized data backup platform supporting multiple data environments
US20220164733A1 (en) Event monitoring with support system integration
CN117170701A (en) Upgrading method, device and medium for baseboard management controller
CN116881354A (en) Uninterrupted replication method and system between heterogeneous databases

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant