Disclosure of Invention
The invention mainly aims to provide an automatic configuration method, an automatic configuration system, automatic configuration equipment and a readable storage medium, and aims to solve the technical problem that the installation and debugging of equipment mounted on an intelligent multifunctional rod are not convenient enough in the prior art.
In a first aspect, the present invention provides an automatic configuration method, including:
the edge computing gateway sends a search message to each sub-device;
after receiving the search message, each sub-device reports the capability information of the sub-device to the edge computing gateway;
the edge computing gateway establishes communication connection with each sub-device according to the capability information of each sub-device;
after receiving the self-checking message of the intelligent terminal, the edge computing gateway acquires the state information of each sub-device based on the communication connection, and detects whether each sub-device is abnormal or not based on the state information of each sub-device;
and the edge computing gateway sends the identity information of the abnormal sub-equipment to the intelligent terminal.
Optionally, the sub-devices include a camera, and after the step of establishing, by the edge computing gateway, a communication connection with each sub-device according to the capability information of each sub-device, the method further includes:
the method comprises the steps that an edge computing gateway obtains images of all directions of an intelligent multifunctional rod to which the edge computing gateway belongs from an intelligent multifunctional rod cloud platform;
the method comprises the steps that an edge computing gateway obtains real-time images shot by a camera, and the real-time images are compared with images of all directions of an intelligent multifunctional rod to which the edge computing gateway belongs to obtain installation direction information of the camera;
the edge computing gateway sends the installation direction information of the camera to the intelligent multifunctional rod cloud platform.
Optionally, the sub-devices include a first type of sub-device connected to an ethernet port of the edge computing gateway and a second type of sub-device connected to an RS485 port of the edge computing gateway, where the step of the edge computing gateway sending the search message to each sub-device includes:
the edge computing gateway sends a search message corresponding to each Ethernet protocol to each first-type sub-device based on a plurality of configured Ethernet protocols;
and the edge computing gateway sends a search message corresponding to each RS485 protocol to each second-class sub-device based on the configured multiple RS485 protocols.
Optionally, the capability information of the first type of sub-device includes a type of a used communication protocol, an IP address, a connected port number, vendor information, a type and a model of the device, and a serial number of a product; the capability information of the second type of sub-device comprises the type of the used communication protocol, RS485 address information, manufacturer information, the type of the device, the model number of the device and a product serial number.
Optionally, the step of establishing, by the edge computing gateway according to the capability information of each piece of sub-equipment, a communication connection with each piece of sub-equipment includes:
the edge computing gateway determines a third type of sub-equipment and a fourth type of sub-equipment according to the manufacturer information, the equipment type, the equipment model and the product serial number of each sub-equipment;
the edge computing gateway is connected to the third type of sub-equipment based on information related to the establishment of communication connection in the capability information of the third type of sub-equipment;
and the edge computing gateway sends the information related to the establishment of the communication connection in the local terminal information to the fourth class of sub-equipment, and the fourth class of sub-equipment is connected to the edge computing gateway based on the information related to the establishment of the communication connection in the edge computing gateway terminal information.
Optionally, the step of detecting whether each sub device is abnormal based on the status information of each sub device includes:
and inputting the state information of each sub-device into an abnormality detection model, and determining whether each sub-device has abnormality according to the output of the abnormality detection model.
Optionally, after the step of sending, by the edge computing gateway, the identity information of the abnormal sub-device to the intelligent terminal, the method further includes:
and the edge computing gateway determines the abnormal type of the abnormal sub-equipment and sends a solution corresponding to the abnormal type to the intelligent terminal.
In a second aspect, the present invention further provides an automatic configuration system, including:
the edge computing gateway is used for sending search messages to each sub-device;
the sub-equipment is used for reporting the capability information of the equipment to the edge computing gateway after receiving the search message;
the edge computing gateway is used for establishing communication connection with each sub-device according to the capability information of each sub-device;
the edge computing gateway is used for acquiring the state information of each piece of sub-equipment based on the communication connection after receiving the self-checking message of the intelligent terminal, and detecting whether each piece of sub-equipment is abnormal or not based on the state information of each piece of sub-equipment;
and the edge computing gateway is used for sending the identity information of the abnormal sub-equipment to the intelligent terminal.
In a third aspect, the present invention also provides an automatic configuration device, which includes a processor, a memory, and an automatic configuration program stored in the memory and executable by the processor, wherein when the automatic configuration program is executed by the processor, the steps of the automatic configuration method described above are implemented.
In a fourth aspect, the present invention further provides a readable storage medium, on which an automatic configuration program is stored, wherein the automatic configuration program, when executed by a processor, implements the steps of the automatic configuration method as described above.
In the invention, the edge computing gateway sends a search message to each sub-device; after receiving the search message, each sub-device reports the capability information of the sub-device to the edge computing gateway; the edge computing gateway establishes communication connection with each sub-device according to the capability information of each sub-device; after receiving the self-checking message of the intelligent terminal, the edge computing gateway acquires the state information of each sub-device based on the communication connection, and detects whether each sub-device is abnormal or not based on the state information of each sub-device; and the edge computing gateway sends the identity information of the abnormal sub-equipment to the intelligent terminal. According to the invention, the communication connection between the edge computing gateway and each sub-device can be automatically established, manual configuration is not needed, and the state detection of each sub-device is automatically carried out, so that the normal function of the sub-device is ensured, the traditional construction method of the intelligent multifunctional rod which completely depends on manual work is replaced, the construction cost is reduced, and the construction efficiency and quality are improved.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
In a first aspect, an embodiment of the present invention provides an automatic configuration device.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of an automatic configuration device according to an embodiment of the present invention. In this embodiment of the present invention, the automatic configuration device may include a processor 1001 (e.g., a Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WI-FI interface, WIreless FIdelity, WI-FI interface); the memory 1005 may be a Random Access Memory (RAM) or a non-volatile memory (non-volatile memory), such as a disk memory, and the memory 1005 may optionally be a storage device independent of the processor 1001. Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 is not intended to limit the present invention, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
With continued reference to FIG. 1, the memory 1005 of FIG. 1, which is one type of computer storage medium, may include an operating system, a network communication module, a user interface module, and an auto-configuration program. The processor 1001 may call an auto configuration program stored in the memory 1005 and execute the auto configuration method provided by the embodiment of the present invention.
In a second aspect, an embodiment of the present invention provides an automatic configuration method.
Referring to fig. 2, fig. 2 is a flow chart illustrating an automatic configuration method according to an embodiment of the present invention. As shown in fig. 2, in an embodiment, the automatic configuration method includes:
step S10, the edge computing gateway sends the search message to each sub-device;
in this embodiment, a constructor sequentially accesses each piece of sub-equipment to a port of an edge computing gateway, and after the edge computing gateway and each piece of accessed sub-equipment are powered on, the edge computing gateway automatically accesses the accessed sub-equipment and needs to send a search message to each piece of sub-equipment. The edge computing gateway and each sub-device connected to the edge computing gateway are installed on the intelligent multifunctional rod.
Further, in an embodiment, the sub devices include a first type sub device connected to an ethernet port of the edge computing gateway, and a second type sub device connected to an RS485 port of the edge computing gateway, and step S10 includes:
the edge computing gateway sends a search message corresponding to each Ethernet protocol to each first-type sub-device based on the configured Ethernet protocols; and the edge computing gateway sends the search message corresponding to each RS485 protocol to each second-class sub-device based on the configured multiple RS485 protocols.
In this embodiment, referring to fig. 3, fig. 3 is a schematic connection diagram of an edge computing gateway and a child device in an embodiment. As shown in fig. 3, there are two types of ports on the edge computing gateway, an ethernet port and an RS485 port. A part of the sub-devices are connected to the Ethernet ports and are called first-class sub-devices; and the other part of the sub-devices are connected to the RS485 port of the edge computing gateway and are called second-class sub-devices. Because the edge computing gateway does not know which specific ethernet protocol is used by each first-type sub-device, nor which specific RS485 protocol is used by each second-type sub-device, the edge computing gateway sends a search message corresponding to each ethernet protocol to each first-type sub-device based on the configured multiple ethernet protocols; and the edge computing gateway sends the search message corresponding to each RS485 protocol to each second-class sub-device based on the configured multiple RS485 protocols.
For example, if the first type of child device includes child device 1, child device 2, and child device 3, and ethernet protocols 1 to 5 are configured on the edge computing gateway, then search message 1 generated based on ethernet protocol 1, search message 2 generated based on ethernet protocol 2, search message 3 generated based on ethernet protocol 3, search message 4 generated based on ethernet protocol 4, and search message 5 generated based on ethernet protocol 5 are sent to child device 1, child device 2, and child device 3. Certainly, the search messages 1 to 5 can be broadcast to the sub-device 1, the sub-device 2 and the sub-device 3 in a broadcast manner.
If the sub-device 1 uses the ethernet protocol 2, it can respond to the search message 2; if the sub-device 2 uses the ethernet protocol 3, it can respond to the search message 3; the sub-device 3 uses the ethernet protocol 5, it can respond to the search message 5.
Similarly, if the second type of sub-device includes the sub-device 4, the sub-device 5, and the sub-device 6, and if the RS485 protocols 1 to 3 are configured on the edge computing gateway, the search message 6 generated based on the RS485 protocol 1, the search message 7 generated based on the RS485 protocol 2, and the search message 8 generated based on the RS485 protocol 3 are sequentially sent to the sub-device 4, the sub-device 5, and the sub-device 6. Of course, the search messages 6 to 8 can be broadcast to the sub-devices 4, 5 and 6 in a broadcast manner.
If the sub-device 4 uses the RS485 protocol 2, it can respond to the search message 7; if the sub-device 5 uses the RS485 protocol 1, it can respond to the search message 6; if the sub-device 6 uses the RS485 protocol 3, it can respond to the search message 8.
Through the embodiment, when the constructor accesses each sub-device to the edge computing gateway, the constructor only needs to make sure which attribute interface each sub-device accesses through, and connect each sub-device to the corresponding attribute interface.
Step S20, after each sub-device receives the search message, reporting the capability information of the device to the edge computing gateway;
in this embodiment, after receiving the search message, each of the child devices first packages the capability information of the device, and then sends the capability information package of the device to the edge computing gateway by using the source address of the search message as the destination address. Wherein, the specific content contained in the capability information is set according to the actual requirement.
In one embodiment, the capability information of the first type of sub-device includes a type of a used communication protocol, an IP address, a connected port number, manufacturer information, a type and a model of the device, and a product serial number; the capability information of the second type of sub-device includes the type of communication protocol used, RS485 address information, manufacturer information, device type, device model number, and product serial number.
Step S30, the edge computing gateway establishes communication connection with each sub-device according to the capability information of each sub-device;
in this embodiment, after obtaining the capability information of each sub-device, the edge computing gateway may establish communication connection with each sub-device according to information related to establishment of communication connection in the capability information of each sub-device and information related to establishment of communication connection in the home terminal information.
Specifically, in an embodiment, step S30 includes:
the edge computing gateway determines a third type of sub-equipment and a fourth type of sub-equipment according to the manufacturer information, the equipment type, the equipment model and the product serial number of each sub-equipment; the edge computing gateway is connected to the third type of sub-equipment based on information related to the establishment of communication connection in the capability information of the third type of sub-equipment; and the edge computing gateway sends the information related to the establishment of the communication connection in the local terminal information to the fourth class of sub-equipment, and the fourth class of sub-equipment is connected to the edge computing gateway based on the information related to the establishment of the communication connection in the edge computing gateway terminal information.
In this embodiment, different sub-devices need to establish communication connections in different ways. The manufacturer information, the device type and the device model number of the third type of sub-device and the product serial number of the fourth type of sub-device are pre-stored, wherein the manufacturer information, the device type and the device model number of the third type of sub-device and the product serial number of the fourth type of sub-device are required to be actively connected, and the communication connection is required to be passively connected. Thus, based on the stored information, the edge computing gateway may determine the third type of sub-device and the fourth type of sub-device according to the received manufacturer information, device type, device model, and product serial number of each sub-device.
And for the third type of sub-equipment, the edge computing gateway is used as a client to establish communication connection with the third type of sub-equipment. Specifically, the method comprises the following steps: and connecting to the third type of sub-equipment based on the information related to the establishment of the communication connection in the capability information of the third type of sub-equipment. If the third type of sub-device is accessed to the edge computing gateway through the ethernet interface, the information related to establishing the communication connection in the capability information of the third type of sub-device includes: the type of communication protocol used, the IP address, the port number of the connection. If the third type of sub-device is accessed to the edge computing gateway through the RS485 interface, the information related to establishing the communication connection in the capability information of the third type of sub-device includes: the type of communication protocol used, RS485 address information. Referring to fig. 4, fig. 4 is a schematic diagram illustrating an edge computing gateway establishing a communication connection with a camera in an embodiment.
And for the fourth type of sub-equipment, establishing communication connection with the fourth type of sub-equipment by taking the edge computing gateway as a server side. Specifically, the method comprises the following steps: and the edge computing gateway sends the information related to the establishment of the communication connection in the local terminal information to the fourth class of sub-equipment, and the fourth class of sub-equipment is connected to the edge computing gateway based on the information related to the establishment of the communication connection in the edge computing gateway terminal information. The information related to establishing the communication connection in the local terminal information comprises: the edge calculates the IP address of the gateway. Referring to fig. 5, fig. 5 is a schematic diagram illustrating an edge computing gateway establishing a communication connection with an advertisement screen in an embodiment.
Step S40, after receiving the self-checking message of the intelligent terminal, the edge computing gateway obtains the state information of each sub-device based on the communication connection, and detects whether each sub-device is abnormal based on the state information of each sub-device;
in this embodiment, after the edge computing gateway establishes communication connection with each sub-device, constructors can be reminded in the form of sound and light, so that the constructors can use the intelligent terminal to send self-checking messages to the edge computing gateway. After receiving the self-checking message of the intelligent terminal, the edge computing gateway acquires the state information of each sub-device based on the communication connection, and detects whether each sub-device is abnormal or not based on the state information of each sub-device. Wherein the status information includes communication status information and functional status information. The edge computing gateway judges whether the communication state of each sub-device is normal or not according to the communication state information of each sub-device, and if the communication state of each sub-device is normal, the edge computing gateway judges whether the function state of each sub-device is normal or not according to the function state information of each sub-device.
In one embodiment, the step of detecting whether each sub-device is abnormal based on the status information of each sub-device includes:
and inputting the state information of each sub-device into an abnormality detection model, and determining whether each sub-device has abnormality according to the output of the abnormality detection model.
In this embodiment, the neural network model may be trained in advance to obtain the anomaly detection model. After the edge computing gateway inputs the state information of each sub-device into the anomaly detection model, whether each sub-device is abnormal or not can be determined according to the output of the anomaly detection model.
And step S50, the edge computing gateway sends the identity information of the abnormal sub-equipment to the intelligent terminal.
In this embodiment, when it is determined that the sub-device is abnormal according to the state information of the sub-device, the identity information of the sub-device is sent to the intelligent terminal, so that a constructor at the intelligent terminal side can know which sub-device is abnormal, and the abnormal condition of the sub-device is processed.
In this embodiment, the edge computing gateway sends a search message to each sub-device; after receiving the search message, each sub-device reports the capability information of the sub-device to the edge computing gateway; the edge computing gateway establishes communication connection with each sub-device according to the capability information of each sub-device; after receiving the self-checking message of the intelligent terminal, the edge computing gateway acquires the state information of each sub-device based on the communication connection, and detects whether each sub-device is abnormal or not based on the state information of each sub-device; and the edge computing gateway sends the identity information of the abnormal sub-equipment to the intelligent terminal. Through this embodiment, can establish the communication connection of edge computing gateway and each sub-equipment automatically, need not artifical manual configuration, and carry out state detection to each sub-equipment automatically, ensure that the sub-equipment function is normal, replaced relying on artificial construction method completely of traditional multi-functional pole of wisdom, reduced construction cost, improved efficiency of construction and quality.
Further, in an embodiment, the sub-apparatus includes a camera, and after step S20, the method further includes:
the method comprises the steps that an edge computing gateway obtains images of all directions of an intelligent multifunctional rod to which the edge computing gateway belongs from an intelligent multifunctional rod cloud platform; the method comprises the steps that an edge computing gateway obtains real-time images shot by a camera, and the real-time images are compared with images of all directions of an intelligent multifunctional rod to which the edge computing gateway belongs to obtain installation direction information of the camera; the edge computing gateway sends the installation direction information of the camera to the intelligent multifunctional rod cloud platform.
In this embodiment, in order to guarantee that the multi-functional pole cloud platform of wisdom can the accurate camera on controlling the multi-functional pole of wisdom, need know the installation direction of camera on the multi-functional pole of wisdom. The method comprises the steps that an edge computing gateway obtains images of all directions of an intelligent multifunctional rod to which the edge computing gateway belongs from an intelligent multifunctional rod cloud platform; the edge computing gateway obtains real-time images shot by the camera, compares the real-time images with images of all directions of the intelligent multifunctional rod to which the edge computing gateway belongs, specifically, can obtain installation direction information of the camera through an AI image recognition comparison algorithm, and then sends the installation direction information of the camera to the intelligent multifunctional rod cloud platform.
Further, in an embodiment, after the step S50, the method further includes:
and the edge computing gateway determines the abnormal type of the abnormal sub-equipment and sends a solution corresponding to the abnormal type to the intelligent terminal.
In this embodiment, when the abnormal sub-device is determined, the edge computing gateway further determines the abnormal type of the abnormal sub-device, and then sends a solution corresponding to the abnormal type to the intelligent terminal, so that a constructor at the intelligent terminal side can repair the abnormality more quickly. Solutions corresponding to various exception types can be preset.
In a third aspect, an embodiment of the present invention further provides an automatic configuration system.
Referring to fig. 6, fig. 6 is a schematic diagram of an automatic configuration system according to an embodiment of the present invention. As shown in fig. 6, in one embodiment, the automatic configuration system includes:
the edge computing gateway 10 is used for sending search messages to each sub-device;
the sub-device 20 is configured to, after receiving the search message, report capability information of the device to the edge computing gateway;
the edge computing gateway 10 is used for establishing communication connection with each sub-device according to the capability information of each sub-device;
the edge computing gateway 10 is configured to obtain state information of each piece of sub-equipment based on the communication connection after receiving a self-check message of the intelligent terminal, and detect whether each piece of sub-equipment is abnormal based on the state information of each piece of sub-equipment;
and the edge computing gateway 10 is used for sending the identity information of the abnormal sub-equipment to the intelligent terminal.
Further, in an embodiment, the sub-device includes a camera, and the edge computing gateway 10 is further configured to:
acquiring images of all directions of a smart multifunctional pole to which an edge computing gateway belongs from a smart multifunctional pole cloud platform; acquiring a real-time image shot by a camera, and comparing the real-time image with images of all directions of the intelligent multifunctional rod to which the edge computing gateway belongs to obtain the installation direction information of the camera; the installation direction information of the camera is sent to the intelligent multifunctional rod cloud platform.
Further, in an embodiment, the sub-devices include a first type sub-device connected to an ethernet port of the edge computing gateway and a second type sub-device connected to an RS485 port of the edge computing gateway, and the edge computing gateway 10 is configured to:
based on a plurality of configured Ethernet protocols, sending a search message corresponding to each Ethernet protocol to each first-type sub-device; and sending the search message corresponding to each RS485 protocol to each second-class sub-device based on the configured multiple RS485 protocols.
Further, in an embodiment, the capability information of the first-class sub-device includes a type of a used communication protocol, an IP address, a connected port number, vendor information, a device type and a device model number, and a product serial number; the capability information of the second type of sub-device comprises the type of the used communication protocol, RS485 address information, manufacturer information, the type of the device, the model number of the device and a product serial number.
Further, in an embodiment, the edge computing gateway 10 is configured to:
determining a third type of sub-equipment and a fourth type of sub-equipment according to the manufacturer information, the equipment type, the equipment model and the product serial number of each sub-equipment; connecting to the third type of sub-equipment based on information related to the establishment of the communication connection in the capability information of the third type of sub-equipment; and sending information related to the establishment of the communication connection in the local terminal information to the fourth class of sub-equipment, wherein the fourth class of sub-equipment is connected to the edge computing gateway based on the information related to the establishment of the communication connection in the edge computing gateway terminal information.
Further, in an embodiment, the edge computing gateway 10 is configured to:
and inputting the state information of each sub-device into an abnormality detection model, and determining whether each sub-device has abnormality according to the output of the abnormality detection model.
Further, in an embodiment, the edge computing gateway 10 is further configured to:
and determining the abnormal type of the sub-equipment with the abnormality, and sending a solution corresponding to the abnormal type to the intelligent terminal.
The specific embodiment of the automatic configuration system is basically the same as the implementation of the automatic configuration method, and is not described herein again.
In a fourth aspect, the embodiment of the present invention further provides a readable storage medium.
The readable storage medium of the present invention has stored thereon an auto-configuration program, wherein the auto-configuration program, when executed by a processor, implements the steps of the auto-configuration method as described above.
The method for implementing the automatic configuration program when executed may refer to various embodiments of the automatic configuration method of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for causing a terminal device to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.