Disclosure of Invention
The invention aims to overcome the technical defects, and provides a configuration-free network access method, a configuration-free network access system, electronic equipment and a storage medium, which solve the technical problem that in the prior art, a professional is required to manually configure NVR on site and then a camera side can access the network.
In order to achieve the technical purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a configuration-free network access method, including the following steps:
when equipment is installed and connected with a network, an MQTT service login request is sent to an Internet of things platform through an HTTPS protocol so as to acquire an account number and a password of MQTT service connection returned by the Internet of things platform;
based on an account number and a password of the MQTT service connection returned by the Internet of things platform, establishing a communication long link with the Internet of things platform, and acquiring NVR configuration parameters issued by the Internet of things platform;
and issuing the acquired NVR configuration parameters to an NVR software system so that the NVR software system performs system parameter configuration, and establishing a communication long link with the Internet of things platform through a GB/T28181 protocol after the configuration is completed so that the Internet of things platform updates the equipment to be in an online state.
In some embodiments, the sending, by HTTPS protocol, an MQTT service login request to an internet of things platform to obtain an account number and a password of an MQTT service connection returned by the internet of things platform includes:
and automatically establishing connection with the Internet of things platform through an HTTPS protocol, sending equipment information and ciphertext to the Internet of things platform, requesting to acquire an account number and a password of the MQTT service login, and acquiring the account number and the password of the MQTT service connection returned by the Internet of things platform after the equipment information and the ciphertext pass verification.
In some embodiments, the establishing a long communication link with the internet of things platform based on the account number and the password of the MQTT service connection returned by the internet of things platform includes:
and establishing connection with the MQTT service of the Internet of things platform through an MQTT protocol, sending an account number and a password of the MQTT service connection returned by the Internet of things platform to the MQTT service of the Internet of things platform, and establishing a long communication link with the MQTT service of the Internet of things platform after the account number and the password pass verification.
In some embodiments, the requesting the internet of things platform to obtain the NVR configuration parameters includes:
after a communication long link is established with the MQTT service of the Internet of things platform, the NVR configuration parameters are acquired from the Internet of things platform by requesting the MQTT service.
In some embodiments, the issuing the obtained NVR configuration parameters to the NVR software system includes:
and after the obtained NVR configuration parameters are stored, the NVR configuration parameters are issued to the NVR software system through an interface of the NVR software system.
In some embodiments, the NVR configuration parameters at least include SIP server IP, port, account password, GB28181 version information.
In a second aspect, the present invention further provides a configuration-free network access device, including:
the MQTT service account password acquisition module is used for sending an MQTT service login request to an Internet of things platform through an HTTPS protocol when equipment is installed and connected with a network so as to acquire an account and a password of MQTT service connection returned by the Internet of things platform;
the NVR configuration parameter acquisition module is used for establishing a communication long link with the Internet of things platform based on an account number and a password of the MQTT service connection returned by the Internet of things platform and acquiring NVR configuration parameters issued by the Internet of things platform;
the NVR configuration parameter issuing module is used for issuing the obtained NVR configuration parameters to an NVR software system so that the NVR software system can carry out system parameter configuration, and after the configuration is completed, a communication long link is established with the Internet of things platform through a GB/T28181 protocol so that the Internet of things platform can update equipment to be in an on-line state.
In a third aspect, the present invention further provides a configuration-free network access system, including an internet of things platform, an NVR software system, and the configuration-free network access device as described above, where the internet of things platform and the NVR software system are both in communication connection with the configuration-free network access device, and the internet of things platform is also in communication connection with the NVR software system, where,
the internet of things platform is used for issuing an account number and a password connected with the MQTT service and NVR configuration parameters to the configuration-free network access device and updating the state of equipment;
the NVR software system is used for receiving NVR configuration parameters issued by the configuration-free network access device and carrying out system parameter configuration by utilizing the NVR configuration parameters; and after configuration is completed, a communication long link is established with the Internet of things platform through a GB/T28181 protocol, so that the Internet of things platform updates the equipment state.
In a fourth aspect, the present invention also provides an electronic device, including: a processor and a memory;
the memory has stored thereon a computer readable program executable by the processor;
the processor, when executing the computer readable program, implements the steps in the configuration-free networking method as described above.
In a fifth aspect, the present invention also provides a computer readable storage medium storing one or more programs executable by one or more processors to implement the steps in the configuration-free networking method as described above.
Compared with the prior art, the configuration-free networking method, device, system, electronic equipment and storage medium provided by the invention have the advantages that firstly, when the equipment is installed and connected with a network, an MQTT service login request is sent to an Internet of things platform through an HTTPS protocol so as to acquire an account number and a password of MQTT service connection returned by the Internet of things platform; based on an account number and a password of the MQTT service connection returned by the Internet of things platform, establishing a communication long link with the Internet of things platform, and acquiring NVR configuration parameters issued by the Internet of things platform; finally, the obtained NVR configuration parameters are issued to the NVR software system, so that the NVR software system carries out system parameter configuration, and after the configuration is completed, a communication long link is established with the Internet of things platform through a GB/T28181 protocol, so that the Internet of things platform updates the equipment to be in an on-line state; the camera is not configured into the network, so that the use effect of plug and play is achieved.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a configuration-free networking method, a configuration-free networking device, a configuration-free networking system, electronic equipment and a storage medium, which can be used in NVR. The methods, apparatus, systems, devices, or computer readable storage media of the present invention may be integrated with or relatively independent of the systems described above.
In this embodiment, a configuration-free networking method is provided, which may be executed by an NVR, and in particular, may be executed by one or more processors of the NVR. Fig. 1 is a flowchart of a configuration-free network access method provided in an embodiment of the present invention, referring to fig. 1, the configuration-free network access method includes the following steps:
s100, when equipment is installed and connected with a network, an MQTT service login request is sent to an Internet of things platform through an HTTPS protocol so as to acquire an account number and a password of MQTT service connection returned by the Internet of things platform;
s200, establishing a communication long link with the Internet of things platform based on an account number and a password of the MQTT service connection returned by the Internet of things platform, and acquiring NVR configuration parameters issued by the Internet of things platform;
s300, the obtained NVR configuration parameters are issued to the NVR software system, so that the NVR software system performs system parameter configuration, and after the configuration is completed, a communication long link is established with the Internet of things platform through a GB/T28181 protocol, so that the Internet of things platform updates the equipment to be in an on-line state.
In the embodiment, firstly, when equipment is installed and connected with a network, an MQTT service login request is sent to an Internet of things platform through an HTTPS protocol to acquire an account number and a password of MQTT service connection returned by the Internet of things platform; based on an account number and a password of the MQTT service connection returned by the Internet of things platform, establishing a communication long link with the Internet of things platform, and acquiring NVR configuration parameters issued by the Internet of things platform; finally, the obtained NVR configuration parameters are issued to the NVR software system, so that the NVR software system carries out system parameter configuration, and after the configuration is completed, a communication long link is established with the Internet of things platform through a GB/T28181 protocol, so that the Internet of things platform updates the equipment to be in an on-line state; the camera is not configured into the network, so that the use effect of plug and play is achieved.
In some embodiments, in step S100, before the NVR device leaves the factory, the configuration-free networking program is integrated with the NVR software system into the NVR firmware when the NVR software system is developed, and the firmware is burned into the NVR device; when equipment is installed and connected with a network, the configuration-free network access device is started together with an NVR software system, and the NVR equipment adds the found camera into the NVR software system by searching the camera in the local area network; meanwhile, when the NVR equipment leaves the factory, the equipment information list is sent to an operator of the platform of the Internet of things; an operator of the Internet of things platform imports the equipment information list into the Internet of things platform to finish the addition of NVR equipment; the configuration-free networking device automatically establishes connection with the Internet of things platform through an HTTPS protocol, encrypts the equipment serial number, manufacturer information and a time stamp in a salified encryption mode to generate a ciphertext, sends the equipment information and the ciphertext to the Internet of things platform and requests the Internet of things platform to acquire an account number and a password of an MQTT service login, and after verification is passed, acquires the account number and the password of the MQTT service connection returned by the Internet of things platform, and when the sent equipment information and the ciphertext are incorrect, prompts a request failure warning and does not continue the next flow.
In some embodiments, in step S200, after receiving the account number and the password of the MQTT service connection returned by the internet of things platform, the configuration-free access network device firstly establishes a connection with the MQTT service of the internet of things platform through the MQTT protocol, secondly sends the account number and the password of the MQTT service connection returned by the internet of things platform to the MQTT service of the internet of things platform, and finally establishes a long communication link with the MQTT service of the internet of things platform after the account number and the password pass verification; after the configuration-free networking device establishes a communication long link with the MQTT service of the Internet of things platform, the network-free networking device acquires NVR configuration parameters from the Internet of things platform by requesting the MQTT service, and after the request passes, the Internet of things platform issues the NVR configuration parameters to the configuration-free networking device through the MQTT service; the NVR configuration parameters at least comprise IP of the SIP server, a port, an account password and GB28181 version information.
In some embodiments, in step S300, after the configuration-free network access device acquires the NVR configuration parameters, the acquired NVR configuration parameters are stored in the NVR device, then the NVR configuration parameters are issued to the NVR software system through an interface of the NVR software system, and after the NVR software system acquires the NVR configuration parameters, the NVR software system utilizes the SIP server IP, port, account password, and GB28181 version information of the NVR configuration parameters to perform system parameter configuration on the NVR device; after the NVR software system completes parameter configuration, logging in a video cloud of the Internet of things platform through a GB/T28181 protocol, and establishing a communication long link; after the internet of things platform receives heartbeat sent by the NVR equipment through the SIP communication protocol, updating the state of the NVR equipment into an on-line state; specifically, after the NVR software system logs into the video cloud of the internet of things platform through the SIP of the GB/T28181 protocol, the NVR device sends a heartbeat message to the internet of things platform through the SIP every N seconds, and after the internet of things platform receives the heartbeat message, the state of the NVR device is updated to be in an on-line state and the same heartbeat message is replied to the NVR device.
Based on the above configuration-free network access method, the embodiment of the present invention further provides a configuration-free network access system 400 correspondingly, referring to fig. 2, where the configuration-free network access system 400 includes a configuration-free network access device 410, an nvr software system 420, and an internet of things platform 430; the internet of things platform 430 and the NVR software system 420 are both communicatively connected to the configuration-free network device 410, and the internet of things platform 430 is also communicatively connected to the NVR software system 420.
The internet of things platform 430 is configured to issue an account number and a password of the MQTT service connection and NVR configuration parameters to the configuration-free access device, and update a state of the device.
The NVR software system 420 is configured to receive an NVR configuration parameter issued by the configuration-free network access device, and perform system parameter configuration by using the NVR configuration parameter; and after configuration is completed, a communication long link is established with the Internet of things platform through a GB/T28181 protocol, so that the Internet of things platform updates the equipment state.
Based on the above-mentioned camera configuration-free network access method, the embodiment of the present invention further provides a camera configuration-free network access device 410, referring to fig. 3, where the configuration-free network access device 410 includes an MQTT service account password module 411, an NVR configuration parameter module 412, and an NVR configuration parameter module 413.
The MQTT service account password obtaining module 411 is configured to send an MQTT service login request to an internet of things platform through an HTTPS protocol when the device is installed and connected to a network, so as to obtain an account and a password of an MQTT service connection returned by the internet of things platform.
The module 412 for obtaining NVR configuration parameters is configured to establish a long communication link with the internet of things platform based on the account number and the password of the MQTT service connection returned by the internet of things platform, and obtain the NVR configuration parameters issued by the internet of things platform.
And the NVR configuration parameter issuing module 413 is configured to issue the acquired NVR configuration parameters to an NVR software system, so that the NVR software system performs system parameter configuration, and after the configuration is completed, establishes a long communication link with the Internet of things platform through a GB/T28181 protocol, so that the Internet of things platform updates the equipment to be in an online state.
In the embodiment, firstly, when equipment is installed and connected with a network, an MQTT service login request is sent to an Internet of things platform through an HTTPS protocol to acquire an account number and a password of MQTT service connection returned by the Internet of things platform; based on an account number and a password of the MQTT service connection returned by the Internet of things platform, establishing a communication long link with the Internet of things platform, and acquiring NVR configuration parameters issued by the Internet of things platform; finally, the obtained NVR configuration parameters are issued to the NVR software system, so that the NVR software system carries out system parameter configuration, and after the configuration is completed, a communication long link is established with the Internet of things platform through a GB/T28181 protocol, so that the Internet of things platform updates the equipment to be in an on-line state; the camera is not configured into the network, so that the use effect of plug and play is achieved.
As shown in fig. 4, the present invention further provides an electronic device based on the configuration-free network access method, where the electronic device may be a mobile terminal, a desktop computer, a notebook computer, a palm computer, a server, and other computing devices. The electronic device includes a processor 10, a memory 20, and a display 30. Fig. 4 shows only some of the components of the electronic device, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead.
The memory 20 may in some embodiments be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. The memory 20 may also be an external storage device of the electronic device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like. Further, the memory 20 may also include both internal storage units and external storage devices of the electronic device. The memory 20 is used for storing application software installed in the electronic device and various data, such as program codes for installing the electronic device. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores a configuration-free networking program 40, and the configuration-free networking program 40 is executable by the processor 10 to implement the configuration-free networking method according to the embodiments of the present invention.
The processor 10 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for executing program code or processing data stored in the memory 20, such as a configuration-free approach or the like.
The display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like in some embodiments. The display 30 is used for displaying information on the configuration-free access network and for displaying a visual user interface. The components 10-30 of the electronic device communicate with each other via a system bus.
In some embodiments, the following steps are implemented when processor 10 executes configuration-free networking program 40 in memory 20:
when equipment is installed and connected with a network, an MQTT service login request is sent to an Internet of things platform through an HTTPS protocol so as to acquire an account number and a password of MQTT service connection returned by the Internet of things platform;
based on an account number and a password of the MQTT service connection returned by the Internet of things platform, establishing a communication long link with the Internet of things platform, and acquiring NVR configuration parameters issued by the Internet of things platform;
and issuing the acquired NVR configuration parameters to the NVR software system so as to enable the NVR software system to carry out system parameter configuration, and establishing a communication long link with the Internet of things platform through a GB/T28181 protocol after completing configuration so as to enable the Internet of things platform to update the equipment to be in an online state.
In some embodiments, the following steps are implemented when processor 10 executes configuration-free networking program 40 in memory 20:
and automatically establishing connection with the Internet of things platform through an HTTPS protocol, sending a fixed account number and a fixed password to the Internet of things platform, requesting to acquire the account number and the password of the MQTT service login, and acquiring the account number and the password of the MQTT service connection returned by the Internet of things platform after the fixed account number and the password pass verification.
In some embodiments, the following steps are implemented when processor 10 executes configuration-free networking program 40 in memory 20:
and establishing connection with the MQTT service of the Internet of things platform through an MQTT protocol, sending an account number and a password of the MQTT service connection returned by the Internet of things platform to the MQTT service of the Internet of things platform, and establishing a communication long link with the MQTT service of the Internet of things platform after the account number and the password pass verification.
In some embodiments, the following steps are implemented when processor 10 executes configuration-free networking program 40 in memory 20:
after a communication long link is established with the MQTT service of the Internet of things platform, the NVR configuration parameters are acquired from the Internet of things platform by requesting the MQTT service.
In some embodiments, the following steps are implemented when processor 10 executes configuration-free networking program 40 in memory 20:
and after the obtained NVR configuration parameters are stored, the NVR configuration parameters are issued to the NVR software system through an interface of the NVR software system.
In some embodiments, the following steps are implemented when processor 10 executes configuration-free networking program 40 in memory 20:
the NVR configuration parameters at least comprise SIP server IP, port, account password and GB28181 version information.
In summary, according to the configuration-free networking method, device, system, electronic equipment and storage medium provided by the invention, firstly, when the equipment is installed and connected with a network, an MQTT service login request is sent to an Internet of things platform through an HTTPS protocol so as to obtain an account number and a password of MQTT service connection returned by the Internet of things platform; based on an account number and a password of the MQTT service connection returned by the Internet of things platform, establishing a communication long link with the Internet of things platform, and acquiring NVR configuration parameters issued by the Internet of things platform; finally, the obtained NVR configuration parameters are issued to the NVR software system, so that the NVR software system carries out system parameter configuration, and after the configuration is completed, a communication long link is established with the Internet of things platform through a GB/T28181 protocol, so that the Internet of things platform updates the equipment to be in an on-line state; the camera is not configured into the network, so that the use effect of plug and play is achieved.
Of course, those skilled in the art will appreciate that implementing all or part of the above-described methods may be implemented by a computer program for instructing relevant hardware (e.g., a processor, a controller, etc.), where the program may be stored in a computer-readable storage medium, and where the program may include the steps of the above-described method embodiments when executed. The storage medium may be a memory, a magnetic disk, an optical disk, or the like.
The above-described embodiments of the present invention do not limit the scope of the present invention. Any other corresponding changes and modifications made in accordance with the technical idea of the present invention shall be included in the scope of the claims of the present invention.