CN114172875A - Remote upgrading method and system for network camera and readable storage medium - Google Patents

Remote upgrading method and system for network camera and readable storage medium Download PDF

Info

Publication number
CN114172875A
CN114172875A CN202111472394.7A CN202111472394A CN114172875A CN 114172875 A CN114172875 A CN 114172875A CN 202111472394 A CN202111472394 A CN 202111472394A CN 114172875 A CN114172875 A CN 114172875A
Authority
CN
China
Prior art keywords
upgrading
equipment
upgrade
connectable
packet
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
CN202111472394.7A
Other languages
Chinese (zh)
Other versions
CN114172875B (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.)
Shenzhen Xiaopai Technology Co ltd
Original Assignee
Shenzhen Xiaopai Technology 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 Shenzhen Xiaopai Technology Co ltd filed Critical Shenzhen Xiaopai Technology Co ltd
Priority to CN202111472394.7A priority Critical patent/CN114172875B/en
Publication of CN114172875A publication Critical patent/CN114172875A/en
Application granted granted Critical
Publication of CN114172875B publication Critical patent/CN114172875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method, a system and a readable storage medium for remotely upgrading a network camera, wherein an original upgrading packet is downloaded from a remote server through first upgrading equipment for upgrading; the first upgrading equipment finishes upgrading and sends a first search request for first connectable equipment; the first upgrading device receives a first search response sent by the first connectable device based on the first search request; according to the first search response, the first upgrading equipment determines second upgrading equipment in the first connectable equipment; and the first upgrading equipment sends a first restructuring upgrading packet generated based on the original upgrading packet to the second upgrading equipment so that the second upgrading equipment completes upgrading based on the first restructuring upgrading packet. Through realizing the propagation type one-to-one upgrading between the devices, the pressure of the bandwidth can be reduced and the processing capacity of the processor can be improved while the repeated redundant connection between the devices and the main server is reduced.

Description

Remote upgrading method and system for network camera and readable storage medium
Technical Field
The invention relates to the field of remote upgrading, in particular to a method and a system for remotely upgrading a network camera and a readable storage medium.
Background
Nowadays, with the development of society, the trend is more and more rapid, the convergence effect of cities is more and more obvious, the social security requirement brought by the convergence effect is more and more vigorous, and the security industry is developed rapidly by the convergence effect, so that the IPC (Internet Protocol Camera) is used as the most basic security equipment at the forefront, and the IPC is used as the Internet of things equipment and is an essential basic function for remote upgrading. At present, an IPC batch remote upgrade scheme mostly executes a process of "downloading an upgrade package from a remote server > checking an upgrade package > upgrading" for each device, and although the process is the simplest process for one device, for a plurality of devices in a local area network, each device needs to download the upgrade package from the remote server, which is redundant. Therefore, how to reduce the repeated work that each device needs to download the upgrade package from the remote server in the IPC batch upgrade process, and optimize the upgrade process becomes a problem to be solved urgently at present.
Disclosure of Invention
The invention mainly aims to provide a method, a system and a readable storage medium for remotely upgrading a network camera, which aim to solve the problem of redundancy repetition in the IPC batch upgrading process and optimize the upgrading process.
In order to achieve the above object, the present invention provides a method for remotely upgrading a network camera, which comprises the steps of:
the first upgrading equipment downloads an original upgrading packet from a remote server for upgrading;
the first upgrading equipment finishes upgrading and sends a first search request for first connectable equipment;
the first upgrading device receives a first search response sent by the first connectable device based on the first search request;
according to the first search response, the first upgrading equipment determines second upgrading equipment in the first connectable equipment;
and the first upgrading equipment sends a first restructuring upgrading packet generated based on the original upgrading packet to the second upgrading equipment so that the second upgrading equipment completes upgrading based on the first restructuring upgrading packet.
Optionally, after the step of sending, by the first upgrade device, the first reassembled upgrade package generated based on the original upgrade package to the second upgrade device, the method includes:
the second upgrading equipment finishes upgrading and sends out a second search request for second connectable equipment;
the second upgrading device receives a second search response sent by the second connectable device based on the second search request;
according to the second search response, the second upgrading equipment determines third upgrading equipment in the second connectable equipment;
and the second upgrading equipment sends a second reorganized upgrading packet generated based on the first reorganized upgrading packet to the third upgrading equipment so that the third upgrading equipment can finish upgrading based on the second reorganized upgrading packet.
Optionally, the sending, by the first upgrade apparatus, the upgrade package to a second upgrade apparatus, so that after the second upgrade apparatus completes the upgrade based on the upgrade package, the method further includes:
the second upgrading equipment finishes upgrading, and the first upgrading equipment continues to send a third search request for third connectable equipment;
the first upgrading device receives a third search response sent by the third connectable device based on the third search request;
according to the third search response, the first upgrading equipment determines fourth upgrading equipment in the third connectable equipment;
and the first upgrading equipment sends the first restructuring upgrading packet generated based on the original upgrading packet to the fourth upgrading equipment so that the fourth upgrading equipment completes upgrading based on the first restructuring upgrading packet.
Optionally, the step of downloading, by the first upgrade device, the original upgrade package from the remote server to perform upgrade includes:
the first upgrading equipment negotiates an original encryption key with a remote server;
the first upgrading equipment downloads an original upgrading packet from a remote server;
and the first upgrading equipment decrypts the original upgrading packet by using the original encryption key and upgrades the original upgrading packet.
Optionally, the step of completing the upgrade by the first upgrade device and sending a first search request for the first connectable device includes:
the first upgrading equipment finishes upgrading, and first connectable equipment with network connection is determined to exist in the connection range of the local area network;
the first upgrade device sends a first search request to the first connectable device, where the first search request includes a broadcast search packet.
Optionally, the first search response includes a device model and a current version number;
the step of determining, by the first upgrade apparatus, a second upgrade apparatus among the first connectable apparatuses according to the first search response includes:
judging whether the equipment model of the first connectable equipment is the same as that of the first upgrading equipment or not;
if so, judging whether the current version number of the first connectable device is lower than the current version number of the first upgrading device;
and if so, determining the first connectable equipment as second upgrading equipment.
Optionally, the sending, by the first upgrade device, the first rebuilt upgrade package to the second upgrade device, so that before the step of completing the upgrade by the second upgrade device based on the second rebuilt upgrade package, the method includes:
the first upgrading equipment initiates a connection request to the second upgrading equipment;
and the first upgrading equipment receives the connection response of the second upgrading equipment and establishes connection.
Optionally, the sending, by the first upgrade device, the first rebuilt upgrade package to the second upgrade device, so that the second upgrade device completes the upgrade based on the second rebuilt upgrade package, including:
the first upgrading equipment and the second upgrading equipment negotiate a second encryption key;
the first upgrading equipment reads and generates the first restructuring upgrading packet and uses the second encryption key for encryption processing;
and the first upgrading equipment sends the encrypted first restructuring upgrading packet to the second upgrading equipment so that the second upgrading equipment decrypts the first restructuring upgrading packet based on the second encryption key and finishes upgrading.
In addition, in order to achieve the above object, the present invention further provides a remote upgrading system for a network camera, including: the system comprises a memory, a processor and a network camera remote upgrading program which is stored on the memory and can run on the processor, wherein the network camera remote upgrading program realizes the steps of the network camera remote upgrading method when being executed by the processor.
In addition, to achieve the above object, the present invention further provides a readable storage medium, on which the network camera remote upgrade program is stored, and when being executed by a processor, the network camera remote upgrade program implements the steps of the network camera remote upgrade method as described above.
According to the method, the system and the readable storage medium for remotely upgrading the network camera, provided by the embodiment of the invention, the original upgrading packet is downloaded from the remote server through the first upgrading device for upgrading; the first upgrading equipment finishes upgrading and sends a first search request for first connectable equipment; the first upgrading device receives a first search response sent by the first connectable device based on the first search request; according to the first search response, the first upgrading equipment determines second upgrading equipment in the first connectable equipment; and the first upgrading equipment sends a first restructuring upgrading packet generated based on the original upgrading packet to the second upgrading equipment so that the second upgrading equipment completes upgrading based on the first restructuring upgrading packet. The first upgrading equipment can send the first restructuring upgrading packet generated by the first upgrading equipment based on the original upgrading packet to the second upgrading equipment so that the second upgrading equipment can be upgraded according to the first restructuring upgrading packet, repeated actions caused by the fact that the second upgrading equipment directly obtains the upgrading packet from the remote server are replaced, and the propagating one-to-one upgrading between the equipment can be further realized through a one-to-one propagating mode of the upgrading packet between the equipment, repeated redundant connection between the equipment and the server is reduced, the bandwidth influence on the upgrading server during IPC batch remote upgrading is reduced, the bandwidth pressure is relieved, and the processing capacity of the processor is improved.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a remote upgrading method for a web camera according to the present invention;
FIG. 3 is a flowchart illustrating a remote upgrading method for a web camera according to a second embodiment of the present invention;
FIG. 4 is a flowchart illustrating a remote upgrading method for a web camera according to a third embodiment of the present invention;
fig. 5 is a schematic view of a key interaction flow in the first, second, and third embodiments of the remote upgrading method for a network camera according to the present invention;
fig. 6 is a device upgrade topology diagram of a preferred embodiment of the remote upgrade method for a network camera according to the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal according to the embodiment of the present invention may be a Personal Computer (PC), or may be a terminal device having a display function, such as a tablet computer, a portable computer, or a server.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU (Central Processing Unit), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. 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 high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a network camera remote upgrade program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client and performing data communication with the client; and the processor 1001 may be configured to call the network camera remote upgrade program stored in the memory 1005, and perform the following operations:
the first upgrading equipment downloads an original upgrading packet from a remote server for upgrading;
the first upgrading equipment finishes upgrading and sends a first search request for first connectable equipment;
the first upgrading device receives a first search response sent by the first connectable device based on the first search request;
according to the first search response, the first upgrading equipment determines second upgrading equipment in the first connectable equipment;
and the first upgrading equipment sends a first restructuring upgrading packet generated based on the original upgrading packet to the second upgrading equipment so that the second upgrading equipment completes upgrading based on the first restructuring upgrading packet.
Further, the processor 1001 may call the network camera remote upgrade program stored in the memory 1005, and also perform the following operations:
the second upgrading equipment finishes upgrading and sends out a second search request for second connectable equipment;
the second upgrading device receives a second search response sent by the second connectable device based on the second search request;
according to the second search response, the second upgrading equipment determines third upgrading equipment in the second connectable equipment;
and the second upgrading equipment sends a second reorganized upgrading packet generated based on the first reorganized upgrading packet to the third upgrading equipment so that the third upgrading equipment can finish upgrading based on the second reorganized upgrading packet.
Further, the processor 1001 may call the network camera remote upgrade program stored in the memory 1005, and also perform the following operations:
the second upgrading equipment finishes upgrading, and the first upgrading equipment continues to send a third search request for third connectable equipment;
the first upgrading device receives a third search response sent by the third connectable device based on the third search request;
according to the third search response, the first upgrading equipment determines fourth upgrading equipment in the third connectable equipment;
and the first upgrading equipment sends the first restructuring upgrading packet generated based on the original upgrading packet to the fourth upgrading equipment so that the fourth upgrading equipment completes upgrading based on the first restructuring upgrading packet.
Further, the processor 1001 may call the network camera remote upgrade program stored in the memory 1005, and also perform the following operations:
the first upgrading equipment negotiates an original encryption key with a remote server;
the first upgrading equipment downloads an original upgrading packet from a remote server;
and the first upgrading equipment decrypts the original upgrading packet by using the original encryption key and upgrades the original upgrading packet.
Further, the processor 1001 may call the network camera remote upgrade program stored in the memory 1005, and also perform the following operations:
the first upgrading equipment finishes upgrading, and first connectable equipment with network connection is determined to exist in the connection range of the local area network;
the first upgrade device sends a first search request to the first connectable device, where the first search request includes a broadcast search packet.
Further, the first search response includes the device model and the current version number, and the processor 1001 may call the network camera remote upgrade program stored in the memory 1005, and further perform the following operations:
judging whether the equipment model of the first connectable equipment is the same as that of the first upgrading equipment or not;
if so, judging whether the current version number of the first connectable device is lower than the current version number of the first upgrading device;
and if so, determining the first connectable equipment as second upgrading equipment.
Further, the processor 1001 may call the network camera remote upgrade program stored in the memory 1005, and also perform the following operations:
the first upgrading equipment initiates a connection request to the second upgrading equipment;
and the first upgrading equipment receives the connection response of the second upgrading equipment and establishes connection.
Further, the processor 1001 may call the network camera remote upgrade program stored in the memory 1005, and also perform the following operations:
the first upgrading equipment and the second upgrading equipment negotiate a second encryption key;
the first upgrading equipment reads and generates the first restructuring upgrading packet and uses the second encryption key for encryption processing;
and the first upgrading equipment sends the encrypted first restructuring upgrading packet to the second upgrading equipment so that the second upgrading equipment decrypts the first restructuring upgrading packet based on the second encryption key and finishes upgrading.
Based on the hardware structure, the invention provides various embodiments of the remote upgrading method of the network camera.
Referring to fig. 2, fig. 2 is a flowchart illustrating a remote upgrading method for a network camera according to a first embodiment of the present invention.
In this embodiment, the method for remotely upgrading a network camera includes:
step S10, the first upgrade device downloads the original upgrade package from the remote server for upgrade;
in this embodiment, the remote server may be configured to provide an upgrade package to the IPC device that needs to be upgraded remotely, where the upgrade package provided by the remote server is the original upgrade package, and the original upgrade package may be used for version upgrade of the device after being acquired by the first upgrade device.
When a plurality of IPC devices in the same local area network need to be upgraded to a new version, the first IPC device which is successfully connected with the remote server and downloads the original upgrade package from the remote server is the first upgrade device, wherein the IPC device which is used as the first upgrade device can be directly appointed in the plurality of IPC devices, or the plurality of IPC devices can all send connection requests to the remote server, and the IPC device which is firstly connected with the remote server becomes the first upgrade device.
Further, the step S10 may include:
step S11, the first upgrade device negotiates an original encryption key with the remote server;
the original encryption key is used for encoding and decoding an original upgrade package and can be determined by the first upgrade device and the remote server through a mode of establishing a key protocol.
Step S12, the first upgrade device downloads original upgrade package from remote server;
step S13, the first upgrade device decrypts the original upgrade package using the original encryption key, and performs upgrade.
In this embodiment, based on the original upgrade package obtained from the remote server, the first upgrade device may perform version upgrade first. Specifically, when a plurality of network cameras needing to be upgraded exist in the same local area network, the first network camera which is successfully connected with the server and acquires the original upgrade package from the first network camera starts to upgrade the version.
Step S20, the first upgrade device completes the upgrade and sends a first search request for the first connectable device;
the first search request can be automatically sent out by the first upgrading device after the local upgrading is finished, and is used for searching the IPC devices which can be connected with the first upgrading device within the same local area network range at the current time, and all the IPC devices which can be connected with the first upgrading device within the same local area network range at the current time can respond to the first search request.
The first connectable device is an IPC device that can be connected with the first upgrade device in the same local area network at the current time, and it can be understood that the first connectable device may be multiple IPC devices.
Further, the step S20 may include:
step S21, the first upgrade device finishes the upgrade, and determines the first connectable device with network connection in the local area network connection range;
step S22, the first upgrade apparatus sends a first search request to the first connectable device, where the first search request includes a broadcast search package.
The broadcast search packet is a broadcast packet with a search function sent by the first upgrade apparatus, and may broadcast a search signal to all the first connectable devices.
In this embodiment, after the first upgrade device is successfully upgraded to the new version, a first search request is sent to other devices in the local area network that need to be upgraded, specifically, after the first network camera completes the upgrade, the other network cameras that need to be upgraded are searched in the local area network, and the search mode may be a mode of searching by sending a broadcast search packet.
Step S30, the first upgrade device receiving a first search response sent by the first connectable device based on the first search request;
the first search reply is a reply returned by the first connectable device to the first upgrade device after receiving the first search request issued by the first upgrade device, the reply being receivable by the first upgrade device. The first search response may include a device model number and a current version number.
Specifically, after the first network camera that completes the upgrade searches for other network cameras that need to be upgraded in the local area network, the first network camera receives responses sent by the other network cameras that need to be upgraded.
Step S40, according to the first search response, the first upgrade device determines a second upgrade device among the first connectable devices;
the second upgrading equipment is an IPC equipment to be upgraded, which has the same model as the first upgrading equipment and is lower in version than the first upgrading equipment, in the same local area network, and the first upgrading equipment and the second upgrading equipment are connected in a one-to-one mode so as to realize one-to-one transmission of the upgrading packet between the first upgrading equipment and the second upgrading equipment.
Further, the step S40 may include:
step S41, determining whether the device model of the first connectable device is the same as the device model of the first upgrade device;
step S42, if yes, judging whether the current version number of the first connectable device is lower than the current version number of the first upgrading device;
step S43, if yes, determining the first connectable device as a second upgrade device.
In this embodiment, since the first upgrade apparatus is connected to only one apparatus at a time, although there are multiple first connectable apparatuses in the same lan, the first upgrade apparatus finally needs to determine a unique apparatus among the multiple first connectable apparatuses by sending the first search request and receiving the first search response, use it as the second upgrade apparatus, establish connection with the second upgrade apparatus, and transmit the upgrade package, so that the upgrade process of the second upgrade apparatus does not need to repeat connection with the server and acquisition of the upgrade package, thereby reducing the pressure of bandwidth.
Further, no matter the IPC device receives the search request or receives the search response, the IPC device always has a final sequence for the received objects, in this embodiment, the first upgrade device always performs condition judgment on the first connectable device corresponding to the first search response received first according to the sequence of the received responses, and if the first upgrade device meets the above conditions, the first connectable device with the same device model and a lower current version number is determined as the second upgrade device by the first upgrade device.
Specifically, the first network camera completing the upgrade determines, according to the received responses sent by the other network cameras needing to be upgraded, the network camera to which the one-to-one upgrade packet transmission is to be performed, among the other network cameras needing to be upgraded, through the judgment of the preset condition.
Step S50, the first upgrade device sends the first rebuilt upgrade package generated based on the original upgrade package to the second upgrade device, so that the second upgrade device completes upgrade based on the first rebuilt upgrade package.
Further, the step S50 may include, before the step, that:
step S48, the first upgrade device initiates a connection request to the second upgrade device;
the connection request may be a private Protocol TCP (Transmission Control Protocol) connection request.
Step S49, the first upgrade device receives the connection response of the second upgrade device, and establishes a connection.
In this embodiment, the connection is performed in a manner of establishing a private protocol, so that a leakage risk can be prevented, and data transmission between the first upgrade device and the second upgrade device can be performed safely.
Further, the step S50 may include:
step S51, the first upgrade device negotiates a second encryption key with the second upgrade device;
in this embodiment, when negotiating the second encryption key, the first upgrade device and the second upgrade device may Exchange keys using a key Exchange method based on an ECDH (Elliptic Curve differential-Hellman key Exchange) algorithm.
Step S52, the first upgrade device reads and generates the first rebuilt upgrade package, and performs encryption processing using the second encryption key;
the first restructured upgrade package may be an upgrade package formed by the first upgrade device reading uboot, kernel, and rootfs from the local FLASH, and encrypting the uboot, kernel, and rootfs by using a second encryption key.
Step S53, the first upgrade device sends the encrypted first re-assembly upgrade package to the second upgrade device, so that the second upgrade device decrypts the first re-assembly upgrade package based on the second encryption key and completes the upgrade.
In this embodiment, the upgrade package sent by the first upgrade device to the second upgrade device is not the original upgrade package that the first upgrade device initially obtained from the remote server, but is obtained by the first upgrade device after reading from the local FLASH and performing encryption processing, and the upgrade of the device to a new version can be achieved regardless of whether the original upgrade package or the first re-assembled upgrade package.
Specifically, after the first network camera which finishes upgrading determines the equipment to be upgraded which is to be subjected to upgrade package transmission with the first network camera, the first network camera sends the restructured upgrade package read from the local computer to the equipment to be upgraded so that the first network camera finishes equipment upgrading.
The embodiment of the invention provides a remote upgrading method of a network camera, which comprises the steps of downloading an original upgrading packet from a remote server through first upgrading equipment, and upgrading; the first upgrading equipment finishes upgrading and sends a first search request for first connectable equipment; the first upgrading device receives a first search response sent by the first connectable device based on the first search request; according to the first search response, the first upgrading equipment determines second upgrading equipment in the first connectable equipment; and the first upgrading equipment sends a first restructuring upgrading packet generated based on the original upgrading packet to the second upgrading equipment so that the second upgrading equipment completes upgrading based on the first restructuring upgrading packet. The first upgrading equipment can send the first restructuring upgrading packet generated based on the original upgrading packet to the second upgrading equipment, so that the second upgrading equipment can be upgraded according to the first restructuring upgrading packet, repeated actions generated by the second upgrading equipment directly obtaining the upgrading packet from a remote server are replaced, a one-to-one propagation mode is carried out through the upgrading packet between the equipment, propagation type one-to-one upgrading between the equipment can be further realized, repeated redundant connection is reduced, the management operation difficulty of the equipment can be reduced, the pressure of bandwidth can be reduced, the processing capacity of a processor is improved, and leakage risks in the transmission process of the upgrading packet can be effectively prevented by carrying out one-to-one encryption transmission on the upgrading packet.
Further, referring to fig. 3, a second embodiment of the remote network camera upgrading method according to the present invention is proposed, and based on the first embodiment, after the step S50, the method includes:
step a10, the second upgrade device finishes upgrading and sends out a second search request for the second connectable device;
in this embodiment, the second search request may be automatically sent by the second upgrade device after the local upgrade is completed, so as to search for the IPC devices that can establish a connection with the second upgrade device within the same local area network range at the current time, and all the IPC devices that can establish a connection with the second upgrade device within the same local area network range at the current time can respond to the second search request.
The second connectable device is an IPC device that can be connected with the second upgrade device in the same local area network at the current time, and it can be understood that the second connectable device may be multiple IPC devices.
A step a20, the second upgrade apparatus receiving a second search reply issued by the second connectable device based on the second search request;
the second search reply is a reply returned by the second connectable device to the second upgrade device after receiving the second search request issued by the second upgrade device, the reply being receivable by the second upgrade device. The second search response may include a device model number and a current version number.
Step a30, according to the second search response, the second upgrade device determines a third upgrade device in the second connectable device;
the third upgrading equipment is an IPC equipment to be upgraded in the same local area network, the type of the IPC equipment is the same as that of the second upgrading equipment, and the version of the IPC equipment is lower than that of the second upgrading equipment.
Further, the second upgrade device always performs condition judgment on the second connectable device corresponding to the first received second search response according to the sequence of the received responses, that is, whether the device models of the second connectable device and the second upgrade device are the same or not is judged, if yes, whether the current version number of the second connectable device is lower than the version number of the second upgrade device is judged, and if yes, the second upgrade device determines the second connectable device with the same device model and a lower current version number as the third upgrade device.
Step a40, the second upgrade device sends the second re-assembly upgrade package generated based on the first re-assembly upgrade package to the third upgrade device, so that the third upgrade device completes the upgrade based on the second re-assembly upgrade package.
The second re-assembly upgrade package may be an upgrade package formed by the second upgrade device reading uboot, kernel, and rootfs from the local FLASH and encrypting them with an encryption key, where the encryption key may be obtained by exchanging keys between the second upgrade device and the third upgrade device using a key interaction method based on the ECDH algorithm.
In this embodiment, the second upgrade device completes the upgrade and sends a second search request for a second connectable device; the second upgrading device receives a second search response sent by the second connectable device based on the second search request; according to the second search response, the second upgrading equipment determines third upgrading equipment in the second connectable equipment; and the second upgrading equipment sends a second reorganized upgrading packet generated based on the first reorganized upgrading packet to the third upgrading equipment so that the third upgrading equipment can finish upgrading based on the second reorganized upgrading packet. Because the equipment which is upgraded successfully can read the related data from the local FLASH to obtain the restructuring upgrading packet, and then transmits the restructuring upgrading packet to other equipment which needs to be upgraded in the same local area network one to one so as to complete the upgrading of the equipment waiting for upgrading, the cardinality of the equipment which sends the restructuring upgrading packet is continuously increased, the speed and the efficiency of the propagation type one to one upgrading are ensured to a certain extent, the searching and propagating processes of the upgrading packet are automatically interlocked, and the operation and the management of the remote upgrading are simplified.
Further, referring to fig. 4, a third embodiment of the remote network camera upgrading method according to the present invention is proposed, and based on the first embodiment, after the step S50, the method further includes:
step b10, the second upgrade device finishes upgrading, the first upgrade device continues to send a third search request for a third connectable device;
in this embodiment, the third search request may be automatically sent by the first upgrade apparatus after the upgrade package transmission with the second upgrade apparatus is completed, so as to search for the IPC apparatuses that can establish a connection with the first upgrade apparatus within the same local area network range at the current time, and all the IPC apparatuses that can establish a connection with the first upgrade apparatus within the same local area network range at the current time can respond to the third search request.
The third connectable device is an IPC device that can be connected to the first upgrade device in the same local area network at the present time after the first upgrade device completes the transmission of the upgrade package with the second upgrade device, and it can be understood that the third connectable device may be a plurality of IPC devices.
A step b20, in which the first upgrade apparatus receives a third search response issued by the third connectable device based on the third search request;
the third search response is a response returned by the third connectable device to the first upgrade device after receiving the third search request issued by the first upgrade device, the response being receivable by the first upgrade device. The third search response may include the device model and the current version number.
Step b30, according to the third search response, the first upgrade device determines a fourth upgrade device in the third connectable devices;
the fourth upgrading equipment is an IPC equipment to be upgraded, which has the same model as the first upgrading equipment and is lower in version than the first upgrading equipment, in the same local area network, and the first upgrading equipment and the fourth upgrading equipment are connected in a one-to-one mode so as to realize one-to-one transmission of the upgrading packet between the first upgrading equipment and the fourth upgrading equipment.
Further, the first upgrade device always performs condition judgment on the third connectable device corresponding to the first received third search response according to the sequence of the received responses, that is, whether the device models of the third connectable device and the first upgrade device are the same or not is judged, if yes, whether the current version number of the third connectable device is lower than the version number of the first upgrade device is judged, and if yes, the first upgrade device determines the third connectable device with the same device model and a lower current version number as the fourth upgrade device.
Step b40, the first upgrade device sends the first rebuilt upgrade package generated based on the original upgrade package to the fourth upgrade device, so that the fourth upgrade device completes upgrade based on the first rebuilt upgrade package.
The first re-assembly upgrade package may be an upgrade package formed by the first upgrade device reading uboot, kernel, and rootfs from the local FLASH and encrypting the uboot, the kernel, and the rootfs by using an encryption key, where the encryption key may be obtained by exchanging keys by the first upgrade device and the fourth upgrade device using a key interaction method based on an ECDH algorithm.
In this embodiment, the second upgrade device completes the upgrade, and the first upgrade device continues to send a third search request for a third connectable device; the first upgrading device receives a third search response sent by the third connectable device based on the third search request; according to the third search response, the first upgrading equipment determines fourth upgrading equipment in the third connectable equipment; and the first upgrading equipment sends the first restructuring upgrading packet generated based on the original upgrading packet to the fourth upgrading equipment so that the fourth upgrading equipment completes upgrading based on the first restructuring upgrading packet. Because each device after successful upgrade automatically starts the next one-to-one upgrade package after completing the one-to-one upgrade package transmission, the transmission times are not limited, the speed and efficiency of the device transmission one-to-one upgrade are ensured to a certain extent, and the repeated automatic transmission of the same device also plays a role in simplifying the upgrade process.
Further, referring to fig. 5, fig. 5 is a key interaction flow diagram in the first, second, and third embodiments of the network camera remote upgrade method of the present invention:
step c10, two devices A and B exist, the two devices use the same key interaction algorithm and two auxiliary parameters g and p for key calculation by default;
step c20, the device a generates a random number as the local private key PriA, and generates the public key PubA of the device a by g ^ PriA mod p ═ PubA;
step c30, device A sends public key PubA to device B through private protocol;
step c40, the device B generates a random number as the local private key PriB, and generates the public key PubB of the device B by g ^ PriB mod p ═ PubB;
step c50, device B sends public key PubB to device A through private protocol;
step c60, device B generates a symmetric key KB by K ═ PubA ^ PriB mod p using PubA and PriB;
step c70, device a generates a symmetric key KA by K ═ PubB ^ PriA mod p using PubB and PriA;
in step c80, KA equals KB, that is, both parties obtain the same key, which is the key used for encrypting the upgrade package.
The device is preferably an IPC device, i.e. a webcam.
The first upgrade device in the first embodiment of the present invention may be regarded as the device a in the key interaction process, and the second upgrade device may be regarded as the device B in the key interaction process. The first upgrading device and the second upgrading device may negotiate to obtain the second encryption password based on the key interaction method.
The second upgrade device in the second embodiment of the present invention may also be regarded as the device a in the key interaction process, and the third upgrade device may also be regarded as the device B in the key interaction process.
The first upgrade device in the third embodiment of the present invention may also be regarded as the device a in the key interaction process, and the fourth upgrade device may also be regarded as the device B in the key interaction process.
Through the embodiment, one-to-one confidential transmission of the recombined upgrade package between the first upgrade device and the second upgrade device in the first embodiment, between the second upgrade device and the third upgrade device in the second embodiment, and between the first upgrade device and the fourth upgrade device in the third embodiment can be realized, and the security of remote upgrade of the device is enhanced.
Further, referring to fig. 6, fig. 6 is a device upgrade topology diagram of a preferred embodiment of the remote upgrade method for a network camera according to the present invention.
In this embodiment, the device a may be used as the first upgrade device in the present invention, and acquires the original upgrade package from the remote server at time 1 and performs upgrade;
furthermore, the device B may be used as the second upgrade device in the present invention, and after the device a finishes upgrading, the first re-assembly upgrade package is transmitted to the device B at time 2, so that the device B finishes upgrading;
further, the device C may be used as the third upgrade device in the present invention, the device D may be used as the fourth upgrade device in the present invention, and after the device B finishes the upgrade, the second upgrade patch is transmitted to the device C at time 3, so that the device C finishes the upgrade; meanwhile, after the upgrade package transmission between the device A and the device B is finished, the device A transmits the first restructured upgrade package to the device D at time 3 so that the device D can finish upgrading;
further, at time 4, the device C, the device B, the device D, and the device a transmit the reassembled upgrade package read from the local FLASH to the device E, the device F, the device G, and the device H, respectively, wherein the upgrade package transmission processes between the device C and the device E, between the device B and the device F, and between the device D and the device G may be regarded as extensions of the second embodiment of the present invention, and the upgrade package transmission process between the device a and the device H may be regarded as extensions of the third embodiment of the present invention.
Based on the second and third embodiments of the present invention, the transmission process of the re-assembly upgrade package can repeatedly occur between the upgraded IPC device and the IPC device to be upgraded until all the IPC devices of the same type in the same lan are completely upgraded.
It can be understood that each IPC device which has completed the upgrade can repeatedly connect with a single IPC device to be upgraded for many times, and the transmission of the reorganized upgrade package is performed, so that the IPC device to be upgraded completes the upgrade.
The invention also provides a remote upgrading system of the network camera, which comprises the following components: the remote upgrading method comprises a memory, a processor and a network camera remote upgrading program stored on the memory and capable of running on the processor, wherein the network camera remote upgrading program realizes the steps of the network camera remote upgrading method according to any one of the above embodiments when being executed by the processor.
The invention also provides a readable storage medium, on which the network camera remote upgrading program is stored, and when being executed by a processor, the network camera remote upgrading program realizes the steps of the network camera remote upgrading method according to any one of the above embodiments.
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.
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 apparatus 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 apparatus. 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 apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. 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 enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network 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.

Claims (10)

1. A remote upgrading method for a network camera is characterized by comprising the following steps:
the first upgrading equipment downloads an original upgrading packet from a remote server for upgrading;
the first upgrading equipment finishes upgrading and sends a first search request for first connectable equipment;
the first upgrading device receives a first search response sent by the first connectable device based on the first search request;
according to the first search response, the first upgrading equipment determines second upgrading equipment in the first connectable equipment;
and the first upgrading equipment sends a first restructuring upgrading packet generated based on the original upgrading packet to the second upgrading equipment so that the second upgrading equipment completes upgrading based on the first restructuring upgrading packet.
2. The method for remotely upgrading a network camera according to claim 1, wherein after the step of the first upgrading device sending the first rebuilt upgrade package generated based on the original upgrade package to the second upgrading device, the method comprises:
the second upgrading equipment finishes upgrading and sends out a second search request for second connectable equipment;
the second upgrading device receives a second search response sent by the second connectable device based on the second search request;
according to the second search response, the second upgrading equipment determines third upgrading equipment in the second connectable equipment;
and the second upgrading equipment sends a second reorganized upgrading packet generated based on the first reorganized upgrading packet to the third upgrading equipment so that the third upgrading equipment can finish upgrading based on the second reorganized upgrading packet.
3. The method for remotely upgrading a network camera according to claim 1, wherein the first upgrading device sends the upgrade package to a second upgrading device, so that after the second upgrading device completes the upgrading step based on the upgrade package, the method further comprises:
the second upgrading equipment finishes upgrading, and the first upgrading equipment continues to send a third search request for third connectable equipment;
the first upgrading device receives a third search response sent by the third connectable device based on the third search request;
according to the third search response, the first upgrading equipment determines fourth upgrading equipment in the third connectable equipment;
and the first upgrading equipment sends the first restructuring upgrading packet generated based on the original upgrading packet to the fourth upgrading equipment so that the fourth upgrading equipment completes upgrading based on the first restructuring upgrading packet.
4. The method for remotely upgrading a network camera according to claim 1, wherein the first upgrading device downloads an original upgrading package from a remote server, and the step of upgrading comprises:
the first upgrading equipment negotiates an original encryption key with a remote server;
the first upgrading equipment downloads an original upgrading packet from a remote server;
and the first upgrading equipment decrypts the original upgrading packet by using the original encryption key and upgrades the original upgrading packet.
5. The method for remotely upgrading a network camera according to claim 1, wherein the step of completing the upgrade by the first upgrade device and sending the first search request for the first connectable device comprises:
the first upgrading equipment finishes upgrading, and first connectable equipment with network connection is determined to exist in the connection range of the local area network;
the first upgrade device sends a first search request to the first connectable device, where the first search request includes a broadcast search packet.
6. The remote upgrade method for network cameras according to claim 1, wherein the first search response includes a device model number, a current version number;
the step of determining, by the first upgrade apparatus, a second upgrade apparatus among the first connectable apparatuses according to the first search response includes:
judging whether the equipment model of the first connectable equipment is the same as that of the first upgrading equipment or not;
if so, judging whether the current version number of the first connectable device is lower than the current version number of the first upgrading device;
and if so, determining the first connectable equipment as second upgrading equipment.
7. The method for remotely upgrading a network camera according to claim 1, wherein the first upgrading device sends the first rebuilt upgrade package to the second upgrading device, so that before the step of upgrading the second upgrading device based on the second rebuilt upgrade package is completed, the method comprises the following steps:
the first upgrading equipment initiates a connection request to the second upgrading equipment;
and the first upgrading equipment receives the connection response of the second upgrading equipment and establishes connection.
8. The method for remotely upgrading the network camera according to claim 1, wherein the first upgrading device sends the first rebuilt upgrading packet to the second upgrading device, so that the second upgrading device completes the upgrading based on the second rebuilt upgrading packet, and the method comprises the following steps:
the first upgrading equipment and the second upgrading equipment negotiate a second encryption key;
the first upgrading equipment reads and generates the first restructuring upgrading packet and uses the second encryption key for encryption processing;
and the first upgrading equipment sends the encrypted first restructuring upgrading packet to the second upgrading equipment so that the second upgrading equipment decrypts the first restructuring upgrading packet based on the second encryption key and finishes upgrading.
9. A remote upgrading system for a network camera, the remote upgrading system for a network camera comprising: a memory, a processor and a webcam remote upgrade program stored on the memory and executable on the processor, the webcam remote upgrade program when executed by the processor implementing the steps of the webcam remote upgrade method according to any one of claims 1 to 8.
10. A readable storage medium, characterized in that the readable storage medium has the network camera remote upgrade program stored thereon, which when executed by a processor implements the steps of the network camera remote upgrade method according to any one of claims 1 to 8.
CN202111472394.7A 2021-12-03 2021-12-03 Remote upgrading method and system for network camera and readable storage medium Active CN114172875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111472394.7A CN114172875B (en) 2021-12-03 2021-12-03 Remote upgrading method and system for network camera and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111472394.7A CN114172875B (en) 2021-12-03 2021-12-03 Remote upgrading method and system for network camera and readable storage medium

Publications (2)

Publication Number Publication Date
CN114172875A true CN114172875A (en) 2022-03-11
CN114172875B CN114172875B (en) 2024-06-25

Family

ID=80483019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111472394.7A Active CN114172875B (en) 2021-12-03 2021-12-03 Remote upgrading method and system for network camera and readable storage medium

Country Status (1)

Country Link
CN (1) CN114172875B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170249137A1 (en) * 2015-03-24 2017-08-31 Huawei Technologies Co., Ltd. Method for Upgrading Terminal System, Terminal, and System
CN110099208A (en) * 2018-01-31 2019-08-06 浙江宇视科技有限公司 A kind of method and device across the cross-domain upgrading video camera of grade in video monitoring system
CN110908692A (en) * 2019-12-15 2020-03-24 湖南龙之翔智能科技有限公司 Remote upgrading method and system for intelligent electric meter
CN110972081A (en) * 2019-11-29 2020-04-07 歌尔科技有限公司 Wrist strap equipment and upgrading method and system thereof
CN112035145A (en) * 2020-09-08 2020-12-04 Oppo广东移动通信有限公司 Equipment upgrading method and related device
WO2021031889A1 (en) * 2019-08-16 2021-02-25 中兴通讯股份有限公司 Upgrade method, communication device and computer-readable storage medium
CN112585905A (en) * 2019-11-12 2021-03-30 华为技术有限公司 Equipment upgrading method and related equipment
CN112835608A (en) * 2021-02-24 2021-05-25 珠海奔图电子有限公司 Firmware upgrading method, image forming apparatus and system
WO2021136258A1 (en) * 2019-12-30 2021-07-08 华为技术有限公司 Method and apparatus for upgrading software

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170249137A1 (en) * 2015-03-24 2017-08-31 Huawei Technologies Co., Ltd. Method for Upgrading Terminal System, Terminal, and System
CN110099208A (en) * 2018-01-31 2019-08-06 浙江宇视科技有限公司 A kind of method and device across the cross-domain upgrading video camera of grade in video monitoring system
WO2021031889A1 (en) * 2019-08-16 2021-02-25 中兴通讯股份有限公司 Upgrade method, communication device and computer-readable storage medium
CN112585905A (en) * 2019-11-12 2021-03-30 华为技术有限公司 Equipment upgrading method and related equipment
CN110972081A (en) * 2019-11-29 2020-04-07 歌尔科技有限公司 Wrist strap equipment and upgrading method and system thereof
CN110908692A (en) * 2019-12-15 2020-03-24 湖南龙之翔智能科技有限公司 Remote upgrading method and system for intelligent electric meter
WO2021136258A1 (en) * 2019-12-30 2021-07-08 华为技术有限公司 Method and apparatus for upgrading software
CN112035145A (en) * 2020-09-08 2020-12-04 Oppo广东移动通信有限公司 Equipment upgrading method and related device
CN112835608A (en) * 2021-02-24 2021-05-25 珠海奔图电子有限公司 Firmware upgrading method, image forming apparatus and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
*** 等: "《电动汽车工程手册 第6卷》", 机械工业出版社, pages: 558 *

Also Published As

Publication number Publication date
CN114172875B (en) 2024-06-25

Similar Documents

Publication Publication Date Title
KR102555806B1 (en) Method, apparatus, device and storage medium for establishing wireless connection
KR102124510B1 (en) Methods for downloading an app and executing an app
US20180124051A1 (en) Response Method and System in Virtual Network Computing Authentication, and Proxy Server
CN110071933B (en) Secure socket layer acceleration method, device, equipment and readable storage medium
WO2013191802A2 (en) Provisioning of a virtual machine by using a secured zone of a cloud environment
CN114124452B (en) Terminal authentication method, related equipment and authentication system
CN103685554A (en) Upgrading method, device and system
WO2021227457A1 (en) Blockchain-based electronic data evidence preservation method and system, and storage medium and terminal
WO2011076146A1 (en) Method for downloading application data, digital television reception terminal and system
CN113259479B (en) Data processing method and equipment
CN103873692A (en) Method, device and system for resource sharing
CN112566113B (en) Key generation and terminal network distribution method, device and equipment
CN114281573A (en) Workflow data interaction method and device, electronic device and readable storage medium
CN110971703A (en) Service request method, device, server and storage medium based on connection pool
US20170353872A1 (en) Method and device for device configuration
CN109951487A (en) A kind of portal authentication method and device
JP6261577B2 (en) Wireless communication apparatus, wireless communication method, and wireless communication control program
CN108898026A (en) Data ciphering method and device
CN111737084A (en) Information monitoring method and device, intelligent equipment, computer equipment and medium
CN114172875A (en) Remote upgrading method and system for network camera and readable storage medium
CN111461718A (en) Access method, device and system of block chain node
JPWO2013098925A1 (en) Information processing apparatus, information processing system, information processing method, and program
US20230069676A1 (en) Blockchain-based mining method, mining device, computer equipment and storage medium
CN113014610B (en) Remote access method, device and system
CN114826591A (en) Cross-device data transmission method, system and terminal

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