CN114911495A - Equipment upgrading method, device, equipment and storage medium - Google Patents

Equipment upgrading method, device, equipment and storage medium Download PDF

Info

Publication number
CN114911495A
CN114911495A CN202110168129.3A CN202110168129A CN114911495A CN 114911495 A CN114911495 A CN 114911495A CN 202110168129 A CN202110168129 A CN 202110168129A CN 114911495 A CN114911495 A CN 114911495A
Authority
CN
China
Prior art keywords
equipment
upgraded
upgrading
time period
upgrade
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.)
Pending
Application number
CN202110168129.3A
Other languages
Chinese (zh)
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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202110168129.3A priority Critical patent/CN114911495A/en
Publication of CN114911495A publication Critical patent/CN114911495A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • 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 

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for upgrading equipment. The invention reduces the influence on the operation of the key service of the equipment during upgrading by determining the time period which is most suitable for upgrading the equipment and carrying out upgrading operation on the equipment in the time period.

Description

Equipment upgrading method, device, equipment and storage medium
Technical Field
The present application relates to the field of device management technologies, and in particular, to a device upgrading method, apparatus, device, and storage medium.
Background
With the rapid progress of communication technology, various networks implemented based on communication technology have been developed rapidly, such as basic internet, mobile communication network, video security network, and various private networks. There are an increasing number of devices deployed in these networks, and therefore, software upgrades for various devices in the network are a task that often needs to be performed in network maintenance.
The software upgrading of the equipment mainly comprises the step of replacing the original version with the new version so as to solve the problems existing in the original version or add new functions. With the development of the technology, new technologies are continuously emerging, the updating and upgrading period of the software is faster and faster, and the size of the upgrading packet is larger and larger, so that the time required by upgrading is prolonged, and the upgrading stability is poor. And the increase of the upgrade package can also cause the problems of overlarge upgrade flow in the network and overhigh upgrade cost, and in addition, the time required by upgrade is overlong, which also influences the normal service development of the equipment.
At present, when some technical solutions upgrade a device in a local area network, if the device is upgraded while executing a key service program, or the device needs to execute the key service program during the upgrade process, it is easy to cause that the device cannot normally execute the key service program, which causes that a service is not normally executed and loses necessary records. For example, the camera recognizes that there is a moving object in the scene and records the video. If the video is upgraded in the process of recording or a moving object appears in a scene in the process of upgrading, the key video is lost.
Disclosure of Invention
The application aims to provide a device upgrading method, a device, equipment and a storage medium, so as to avoid the problem that key service records are lost due to upgrading.
In order to achieve the purpose, the technical scheme of the application is as follows:
an apparatus upgrading method, which is applied to a main upgrading apparatus in a network, the apparatus upgrading method includes:
acquiring version information and equipment heat map information of other equipment in a network, wherein the equipment heat map information records the heat of the equipment in each time period;
and determining equipment to be upgraded according to the version information of the equipment, determining an upgrading time period of the equipment to be upgraded according to the equipment heat map information, and upgrading the equipment to be upgraded in the corresponding upgrading time period.
Further, the upgrading the device to be upgraded in the corresponding upgrading time period includes:
and in the upgrading time period, detecting whether the equipment to be upgraded and the associated equipment thereof execute the key business program, and if the equipment to be upgraded or the associated equipment thereof do not execute the key business program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
Further, upgrading the device to be upgraded in the corresponding upgrading time period includes:
storing a key service program file of the equipment to be upgraded;
sending a file upgrading packet to equipment to be upgraded to upgrade the equipment to be upgraded, detecting whether equipment associated with the equipment to be upgraded executes a key service program or not in the upgrading operation process, if the associated equipment executes the key service program, interrupting the upgrading operation of the equipment to be upgraded, and sending a stored key service program file to the equipment to be upgraded so as to enable the equipment to be upgraded to start the key service operation;
and after a preset time period, detecting whether the equipment to be upgraded and the associated equipment thereof are executing the key service program again, and if the equipment to be upgraded or the associated equipment thereof do not execute the key service program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
Further, the detecting whether the device to be upgraded and the device associated with the device to be upgraded are executing the key service program includes:
and detecting a video image acquired by the equipment to be upgraded or the associated equipment thereof, and if the moving target is identified, judging that the equipment to be upgraded or the associated equipment thereof is executing the key business program.
Further, the main upgrade device is further provided with a storage card, the storage card is provided with an upgrade package storage partition for storing a file upgrade package, and the device upgrade method further includes:
acquiring version information of other equipment in a network, and judging whether the storage card stores a file upgrade package with the latest version;
and if the latest version of the file upgrading packet does not exist, acquiring the latest version of the file upgrading packet from the equipment corresponding to the latest version and storing the file upgrading packet in the memory card upgrading packet storage partition.
Further, the determining an upgrade time period of the device to be upgraded according to the device heat map information includes:
comparing the heat degree in each time period in the equipment heat degree graph with a heat degree threshold value, and if the heat degree in the time period is smaller than the heat degree threshold value, determining the time period as a time period to be upgraded;
the heat in each time segment in the device heat map refers to a ratio of a time length for executing the key service program in the time segment to a preset time segment.
The application also provides an equipment upgrading device, which is applied to the main upgrading equipment in the network, and the equipment upgrading device comprises:
the system comprises an information scanning module, a heat map information recording module and a heat map processing module, wherein the information scanning module is used for acquiring version information and equipment heat map information of other equipment in a network, and the equipment heat map information records the heat of the equipment in each time period;
and the equipment upgrading module is used for determining equipment to be upgraded according to the version information of the equipment, determining the upgrading time period of the equipment to be upgraded according to the equipment heat map information, and upgrading the equipment to be upgraded in the corresponding upgrading time period.
Further, when the device upgrading module upgrades the device to be upgraded in the corresponding upgrading time period, the following operations are performed:
storing a key service program file of the equipment to be upgraded;
detecting whether the equipment to be upgraded and the associated equipment thereof are executing the key business program or not in an upgrading time period, and if the equipment to be upgraded or the associated equipment thereof are not executing the key business program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded;
in the process of sending a file upgrading packet to equipment to be upgraded to carry out upgrading operation on the equipment to be upgraded, detecting whether associated equipment of the equipment to be upgraded is executing a key business program, if the associated equipment is executing the key business program, interrupting the upgrading operation of the equipment to be upgraded, and sending a stored key business program file to the equipment to be upgraded so as to enable the equipment to be upgraded to start the key business operation;
and after a preset time period, detecting whether the equipment to be upgraded and the associated equipment thereof execute the key service program, and if the equipment to be upgraded or the associated equipment thereof do not execute the key service program, sending a file upgrade packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
Further, the device is a camera, and the standby upgrading module detects whether the device to be upgraded and the associated device thereof are executing the key service program, and executes the following operations:
and detecting a video image acquired by the equipment to be upgraded or the associated equipment thereof, and if the moving target is identified, judging that the equipment to be upgraded or the associated equipment thereof is executing the key business program.
Furthermore, the device upgrading apparatus is further provided with a storage card, the storage card is provided with an upgrade package storage partition for storing a file upgrade package, and the information scanning module further executes the following operations:
acquiring version information of other equipment in a network, and judging whether the storage card stores a file upgrade package with the latest version;
and if the upgrade package does not exist, acquiring the latest version of the file upgrade package from the device corresponding to the latest version and storing the file upgrade package in the memory card upgrade package storage partition.
Further, when determining the upgrade time period of the device to be upgraded according to the device heat map information, the device upgrade module executes the following operations:
comparing the heat degree in each time period in the equipment heat degree graph with a heat degree threshold value, and if the heat degree in the time period is smaller than the heat degree threshold value, determining the time period as a time period to be upgraded;
the heat in each time segment in the device heat map refers to a ratio of a time length for executing the key service program in the time segment to a preset time segment.
The application also provides an electronic device, which comprises a processor and a memory for storing a plurality of computer instructions, wherein the computer instructions are executed by the processor to realize the steps of the device upgrading method.
The present application also contemplates a computer-readable storage medium having stored thereon computer instructions to be executed by a processor to perform the steps of the device upgrade method.
According to the equipment upgrading method, the device, the equipment and the storage medium, version information and equipment heat map information of other equipment in a network are obtained by scanning the other equipment in the network, the equipment to be upgraded is determined according to the version information of the equipment, the upgrading time period of the equipment to be upgraded is determined according to the equipment heat map information, and the equipment to be upgraded is upgraded in the upgrading time period of the equipment. The invention reduces the influence on the key service operation of the equipment during upgrading by determining the time period which is most suitable for upgrading the equipment to be upgraded and carrying out upgrading operation on the equipment in the time period.
Drawings
FIG. 1 is a flow chart of an apparatus method according to an embodiment of the present application;
FIG. 2 is a logic block diagram of an apparatus upgrading method according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of an apparatus upgrading apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
According to the device upgrading method, device, equipment and storage medium, the new version upgrading package is stored on the equipment in the local area network, and therefore the problem that the new version upgrading package cannot exist for a long time on the equipment in the local area network is solved. If one device in the local area network has an additional storage card, storing the new version upgrade package on the storage card; if no such device exists, the new version upgrade package is distributively stored on a plurality of devices within the local area network. In addition, the device heat map information is counted, the heat of the device in each time period is recorded, so that the time period in which the device does not provide the key service is known, the time period is adopted for upgrading operation, and the influence on normal development of the service, particularly the audio and video storage service is avoided.
In one embodiment, as shown in fig. 1, a device upgrade method is provided, which is applied to a master upgrade device in a network, and includes:
step S110, obtaining version information and equipment heat map information of other equipment in the network, wherein the equipment heat map information records the heat of the equipment in each time period.
The method includes the steps that firstly, a main upgrading device in the network is determined, and the main upgrading device is a device in the network. Taking a video security network as an example, a plurality of network cameras IPC in the video security network are devices in the network, and when the IPC is upgraded, one IPC is determined as a main upgrading device. For convenience of description, in the following embodiments, IPC1 is taken as a main upgrading device, and IPC2 is taken as an example of a device to be upgraded.
The determination of the master upgrade device, which device has an additional memory card, is typically made by designating the device as the master upgrade device. For example, in one hundred devices of IPC1-IPC100, wherein an additional SD card is arranged on one device IPC1, IPC1 is selected as the main upgrading device.
It is easy to understand that if each device is configured with an SD card, the cost of the network device is increased, and it is an easily tolerable scope to additionally provide an SD card on only one device in the network. The application is not limited to the type of the memory card on the main upgrading device, and the memory card can be an SD card, other memory cards such as a TF card and the like, or an additionally arranged nonvolatile memory.
And if no device with the additional memory card is configured in the network, selecting a device with the best performance as the main upgrading device, for example, the device with the highest processing capability of the processor or the device with the highest memory. At this time, the upgrade package is stored in a distributed storage manner in a plurality of devices in the network.
As the main upgrading device, the information of the devices in the network, such as the software version information, the software upgrading packet size information, the device heat map information, the total number of the devices, and the like of each device, is collected at regular time after the device is online, and a device information table, a latest software version table, a device heat map table, and the like are maintained. The equipment information table comprises an equipment IP, an equipment serial number, version information, a proper upgrading time period and upgrading mark information; the latest software version table comprises latest software version information and storage position information; the equipment heat graph records heat graph information of each piece of equipment, the equipment heat graph records the heat of the equipment in each time period, and the equipment heat graph is obtained by monitoring all weather and accumulating the heat in each time period counted under the scene corresponding to the current equipment. The heat in each time segment in the device heat map refers to a ratio of a time length for executing the key service program in the time segment to a preset time segment, or the number of times for starting the key service program in the time segment. For example, for the network cameras IPC, the time length of each network camera IPC executing the key service program in each time section in 24h is recorded, according to the sound and motion detection result, when the network camera IPC detects the motion target, it is considered that the network camera IPC is executing the key service program, the ratio of the time length of executing the key service program to the preset time period length is taken as the heat, and the length of each preset time period can be freely set, for example, 1 hour or 2 hours.
And as a main upgrading device, calculating available residual network bandwidth according to the current service to obtain the number of upgrading channels capable of providing equipment upgrading service at the same time, and opening an upgrading auxiliary partition in the SD card for storing the number of upgrading channels, an equipment information table, a latest software version table and an equipment heat chart. And simultaneously, opening an upgrade package storage partition in an SD card of the equipment, wherein the upgrade package storage partition is used for storing the latest version upgrade package of each software category. A partition is also opened up in the SD card for storing key service program files for different upgrade channels.
The main upgrading device scans the devices in the network periodically, updates a device information table, a latest software version table, a device heat chart and the like. If the device version is low, the upgrading mark is marked (for example, the latest version is A.3, and the device version is A.2), so that the quantity of all devices needing to be upgraded is counted.
The device heat map information of this embodiment indicates whether the device is executing the critical service program in each time period. Taking the network camera IPC as an example, when the network camera IPC does not detect a moving object (sound or movement), a key business program is not executed currently, and even if the IPC stores a video, the video does not have moving object information; when the IPC detects a moving object, a key service program is executed, and the stored video contains the information of the moving object and cannot be lost. Recognizing the moving object by the IPC as executing a key service program, wherein the time period corresponds to higher heat; and regarding that the network camera IPC does not recognize the moving object as not executing the key business program, and corresponding to the time period with lower heat, thereby forming the equipment heat map information. Regarding other devices, when the device executes the key business program, the device is regarded that the time period corresponds to higher heat; and when the key service program is not executed, the time period is regarded as corresponding to lower heat, so that the equipment heat map information is obtained.
In a preferred embodiment, the main upgrade device is further provided with a memory card, the memory card is provided with an upgrade package storage partition for storing a file upgrade package, and the device upgrade method further includes:
acquiring version information of other equipment in a network, and judging whether the latest version of the file upgrade package is stored in the memory card;
and if the latest version of the file upgrading packet does not exist, acquiring the latest version of the file upgrading packet from the equipment corresponding to the latest version and storing the file upgrading packet in the memory card upgrading packet storage partition.
Compared with the method that the upgrade package is stored on a plurality of devices in a distributed mode in the network, the method is more convenient to implement and is more convenient to issue the upgrade package. At present, some technical solutions may obtain a new version of an upgrade package from an upgrade server of an external network or obtain a new version of an upgrade package from other devices in a local area network when upgrading devices in the local area network. However, the embedded device generally only includes a processor CPU, a memory DDR and a Flash memory Flash, and the upgrade package does not exist on the embedded device for a long time, which results in that the device that needs to be upgraded cannot find the upgrade package of the new version on other devices in the lan. By adopting the method, the upgrade package is stored on the SD card or the equipment in a distributed manner, so that the upgrade package can be ensured to be always in the local area network, the equipment can be upgraded conveniently in the local area network, and an external network is not required.
Taking the SD card as an example, according to the latest software version table, it is compared whether the current SD card is the latest software version. If the version upgrading package is not stored or the SD card does not store the version upgrading package, finding any device with the latest version from the device information table, reading the version program from the Flash of the device, reversely making the version upgrading package, storing the version upgrading package to the position, corresponding to the version storage, in the reserved space of the SD card, checking the integrity, and reading again if the check is abnormal.
It should be noted that the master upgrade device scans other devices in the network to obtain version information and device hotmap information of other devices in the network, and may send the version information and the device hotmap information through a broadcast message or a unicast message, or obtain the version information and the device hotmap information when the device is discovered through some protocols. And when other equipment in the network receives the message of the main upgrading equipment, the information is fed back, the version information and the equipment heat map information of the equipment are fed back to the main upgrading equipment, and meanwhile, the information of the main upgrading equipment is recorded, so that the interaction with the main upgrading equipment is facilitated.
Step S120, determining equipment to be upgraded according to the version information of the equipment, determining upgrading time periods of the equipment to be upgraded according to the equipment heat map information, and upgrading the equipment to be upgraded in the corresponding upgrading time periods.
After acquiring the software version information of the devices in the network, the main upgrading device can know which devices need to be upgraded by comparing with the latest version information, and marks the devices needing to be upgraded as the devices to be upgraded.
And further determining an upgrading time period of the equipment to be upgraded according to the equipment heat map information, namely comparing the heat in each time period in the equipment heat map with a heat threshold, and if the heat in the time period is less than the heat threshold, determining the time period as the time period to be upgraded. In this embodiment, a time period corresponding to the lower heat map is set as a time period to be upgraded, and in this time period, the device does not execute the key service program, and can be upgraded by using this time period. Taking the webcam IPC1 as an example, in late night, a moving object is generally not detected, and it is considered that a key service program is not executed, and the key audio/video storage can be prevented from being influenced when upgrading is performed by using the period of time for upgrading.
And the main upgrading equipment sequences the equipment to be upgraded according to the upgrading time periods of all the equipment and sequentially upgrades the equipment. When upgrading, the main upgrading device is connected with the device to be upgraded, an upgrading packet is sent to the device to be upgraded, the device to be upgraded receives the upgrading packet and then upgrades the device to be upgraded, and then the upgrading is completed.
In a preferred example, the upgrading the device to be upgraded in the upgrade time period of the device includes:
and in the upgrading time period, detecting whether the equipment to be upgraded and the associated equipment thereof execute the key business program, and if the equipment to be upgraded or the associated equipment thereof do not execute the key business program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
In another preferred example, the upgrading the device to be upgraded in the corresponding upgrading time period includes:
storing a key service program file of the equipment to be upgraded;
sending a file upgrading packet to equipment to be upgraded to upgrade the equipment to be upgraded, detecting whether associated equipment of the equipment to be upgraded executes a key service program or not in the process of upgrading operation, if the associated equipment executes the key service program, interrupting the upgrading operation of the equipment to be upgraded, and sending a stored key service program file to the equipment to be upgraded so as to enable the equipment to be upgraded to start the key service operation;
and after a preset time period, detecting whether the equipment to be upgraded and the associated equipment thereof execute the key service program, and if the equipment to be upgraded or the associated equipment thereof do not execute the key service program, sending a file upgrade packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
In this example, the master upgrade first detects whether the device to be upgraded and its associated devices are executing critical business programs. The associated devices represent associations between devices, which may be business associations, such as association between a memory and a webcam IPC when storing videos. Or, the adjacent network cameras are regarded as related devices, for example, two network cameras IPC2 and IPC3 are arranged in the same corridor and are adjacent to each other to respectively shoot two sides of the corridor, so after the IPC3 detects the moving object, the IPC2 also detects the moving object approximately. Therefore, whether the equipment can be upgraded or not can be judged by knowing whether the equipment to be upgraded or the associated equipment thereof is executing the key business program or not. If the equipment to be upgraded or the associated equipment thereof is not executing the key business program, the equipment to be upgraded is considered to meet the upgrading condition, and therefore a file upgrading packet is sent to the equipment to be upgraded to upgrade the equipment to be upgraded.
For example, the network camera IPC2 to be upgraded or its neighboring network camera IPC3 detects a moving object, and it is considered that a critical business program is being executed, and it is not suitable for upgrading. If neither the IPC2 of the network camera to be upgraded nor the IPC3 of the adjacent network camera detects a moving object, the key business program is considered not to be executed, and the upgrading is suitable at this moment.
By the method of the example, firstly, when the upgrading time of the equipment to be upgraded is determined, the main upgrading equipment selects the idle time to upgrade. And when upgrading, further knowing whether the equipment to be upgraded and the linkage equipment thereof are executing the key service program, and avoiding interrupting the normal service of the equipment when the equipment executes the key service program through double determination, thereby ensuring the normal work of the equipment.
In this example, the main upgrade device stores a critical service program of the device to be upgraded, such as a program to perform video recording. Therefore, in the upgrading process, whether the associated equipment of the equipment to be upgraded executes the key service program is detected, if the associated equipment executes the key service program, the condition that the associated equipment does not meet the upgrading condition is judged, the equipment to be upgraded is interrupted to be upgraded, and the stored key service program file is sent to the equipment to be upgraded, so that the equipment to be upgraded starts the key service operation.
For example, IPC1 is an IPC2 upgrade, IPC3 is associated with IPC2, by detecting whether IPC3 is executing a key service program, if it is detected that IPC3 acquires a moving object, IPC3 is considered to be executing the key service program, IPC2 approximately needs to execute the key service program, at this time, it is considered that IPC3 of the associated device does not meet an upgrade condition, that is, IPC2 has a high probability that the IPC2 does not meet the upgrade condition, the upgrade of IPC2 is interrupted, the stored key service program file is sent to a temporary directory of IPC2, and IPC2 starts the key service program to execute the key service.
Thereafter, the master upgrade device is separated by a time period, which may be a preset time period, such as 1 minute, or delayed to the next suitable upgrade time period. And detecting whether the equipment to be upgraded and the associated equipment thereof are executing the key business program again, if the equipment to be upgraded or the associated equipment thereof do not execute the key business program, judging that the upgrading condition is met, and continuously sending a file upgrading packet to the equipment to be upgraded to carry out upgrading operation on the equipment to be upgraded.
Or, when IPC2 cannot be upgraded, the main upgrade device upgrades IPC4 of the next device to be upgraded in sequence, and after IPC4 is upgraded, the main upgrade device upgrades IPC2, which is not described herein again.
It should be noted that, in the present application, the upgrade package is preferentially stored in the memory card of the main upgrade device, and if the main upgrade device does not have a memory card, the upgrade package is stored in the backend server in the network, or the upgrade package is stored in a distributed manner by using multiple devices according to the remaining memory of the devices in the current network, so as to implement the technical scheme of the present application, which is not described herein again.
According to the method and the device, whether the key service is to be executed by the equipment in the upgrading process is judged through the linkage equipment, so that whether the upgrading is interrupted or not is determined, the key service is recovered, and important services can be prevented from being omitted when the equipment is upgraded. For the network camera IPC, the loss of key video is prevented.
In another embodiment, as shown in fig. 2, a specific embodiment of a device upgrade method is provided, which is applied to a master upgrade device in a network, and includes:
step S201, the main upgrade device scans all devices in the local area network and counts the upgrade related table information.
The main upgrading device collects information of devices in the network at regular time after being online, such as software version information, software upgrading packet size information, device heat map information, device total number and the like of each device, and maintains a device information table, a latest software version table, a device heat map and the like.
Step S202, judging whether the SD card has a software version, if so, entering step S205, otherwise, executing step S203.
The main upgrading device firstly judges whether the software version needing to be upgraded exists in the SD card, if the software version needing to be upgraded exists in the SD card, the main upgrading device judges the software version in the step S205, and if the software version needing to be upgraded does not exist in the SD card, the software version needing to be upgraded is downloaded.
And step S203, reversely making a version upgrading package.
That is, the main upgrading device reversely makes the version upgrading packet from the device with the latest version in the local area network, and downloads the version upgrading packet into the SD card for storage.
And step S204, storing the upgrade package to a position corresponding to the upgrade package in the SD card, and executing step S206.
And downloading the upgrade package from the latest version of equipment in the local area network and storing the upgrade package in a corresponding position.
Step S205, judging whether the version in the SD card is the latest version, if so, executing step S206, otherwise, executing step S203.
If the upgrade package stored in the SD card is not the latest version, the version upgrade package also needs to be made in reverse from the device of the latest version in the local area network.
And S206, counting whether the upgrading equipment is 0 or not, if not, executing the next step, otherwise, returning to the step S201.
That is, whether there is a device that needs to be upgraded in the local area network, if there is a device that needs to be upgraded, the next step of upgrading is executed, and if there is no device that needs to be upgraded, the process returns to step S201.
And step S207, traversing the equipment to select proper equipment for upgrading.
And selecting idle equipment for upgrading according to the upgrading time period. Since the device heat map has been maintained, it is easy to discover which devices can be upgraded and which devices are not properly upgraded at the present time period.
And step S208, determining whether the upgrading condition is met, if so, performing step S209, and otherwise, returning to step S207.
The method comprises the steps of firstly obtaining whether the equipment to be upgraded and the associated equipment thereof are executing the key business program, and if the equipment to be upgraded or the associated equipment thereof are not executing the key business program, sending a file upgrading packet to the equipment to be upgraded to upgrade the equipment to be upgraded.
And step S209, determining that the equipment executes upgrading and starts upgrading.
And when the equipment is determined not to be executing the key business program, the upgrading condition is considered to be met, and upgrading is executed.
Step S210, judging whether the upgrading process has a burst situation, if so, executing step S211, otherwise, executing upgrading to finish upgrading, and returning to step S206.
In the process of sending a file upgrading packet to equipment to be upgraded, detecting whether equipment associated with the equipment to be upgraded executes a key service program or not, and judging whether the equipment associated with the equipment to be upgraded has a sudden situation or not in the upgrading process, namely the situation that the associated equipment executes the key service program and does not meet upgrading conditions exists, and the equipment which is being upgraded does not meet the upgrading conditions at the moment, so that the key service needs to be executed.
And step S211, stopping upgrading and restarting the IPC service.
And when the emergency situation exists in the upgrading process, the upgrading of the equipment to be upgraded is stopped, and the stored key service program file is sent to the equipment to be upgraded so that the equipment to be upgraded starts the key service.
And step S212, judging whether upgrading is available in a short time, if so, returning to step S209, and otherwise, returning to step S207.
In the step, delaying a preset time, for example, 10-100 seconds, re-determining whether an upgrade condition is met, if so, continuing to upgrade the equipment, otherwise, selecting the next equipment to upgrade.
This embodiment still includes:
and step S213, manually executing the upgrade import upgrade package.
And step S214, updating the software version information of the upgrade package, and turning to step S204.
Through the steps S213 and S214, the upgrade patch is actively imported into the SD card by the upgrade personnel, which is convenient for the main upgrade device to upgrade for other devices.
In the embodiment, the SD card is used for storing the upgrade package, the most appropriate time period is selected by combining the equipment heat map information for upgrading the equipment, whether the upgrading is stopped or not is determined according to the working state of the associated equipment in the upgrading process, the key service is recovered, and the normal operation of the key service is ensured.
Another embodiment of the present application, as shown in fig. 3, further provides an apparatus upgrading device, applied to a main upgrading apparatus, where the apparatus upgrading device includes:
the system comprises an information scanning module, a heat map information recording module and a heat map processing module, wherein the information scanning module is used for acquiring version information and equipment heat map information of other equipment in a network, and the equipment heat map information records the heat of the equipment in each time period;
and the equipment upgrading module is used for determining equipment to be upgraded according to the version information of the equipment, determining the upgrading time period of the equipment to be upgraded according to the equipment heat map information, and upgrading the equipment to be upgraded in the corresponding upgrading time period.
For specific limitations of a device upgrading apparatus in the present application, refer to the above limitations on a device upgrading method, and are not described herein again. The modules in the device upgrading device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one example, when the device upgrading module upgrades the device to be upgraded in the corresponding upgrading time period, the following operations are performed:
storing a key service program file of equipment to be upgraded;
detecting whether the equipment to be upgraded and the associated equipment thereof execute the key business program or not in the upgrading time period, and if the equipment to be upgraded or the associated equipment thereof do not execute the key business program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded;
in the process of sending a file upgrading packet to equipment to be upgraded to carry out upgrading operation on the equipment to be upgraded, detecting whether associated equipment of the equipment to be upgraded is executing a key business program, if the associated equipment is executing the key business program, interrupting the upgrading operation of the equipment to be upgraded, and sending a stored key business program file to the equipment to be upgraded so as to enable the equipment to be upgraded to start the key business operation;
and after a preset time period, detecting whether the equipment to be upgraded and the associated equipment thereof execute the key service program, and if the equipment to be upgraded or the associated equipment thereof do not execute the key service program, sending a file upgrade packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
In another example, the device is a camera, and the standby upgrade module detects whether the device to be upgraded and its associated device are executing a key service program, and performs the following operations:
and detecting a video image acquired by the equipment to be upgraded or the associated equipment thereof, and if the moving target is identified, judging that the equipment to be upgraded or the associated equipment thereof is executing the key business program.
In another example, the device upgrade apparatus is further provided with a memory card provided with an upgrade package storage partition for storing a file upgrade package, and the information scanning module further performs the following operations:
acquiring version information of other equipment in a network, and judging whether the storage card stores a file upgrade package with the latest version;
and if the upgrade package does not exist, acquiring the latest version of the file upgrade package from the device corresponding to the latest version and storing the file upgrade package in the memory card upgrade package storage partition.
In another embodiment of the present application, an electronic device is provided, as shown in fig. 4, the electronic device provided in this embodiment includes a processor and a memory storing a plurality of computer instructions, and the computer instructions, when executed by the processor, implement the steps of the device upgrade method.
The processor in the electronic device may be one or more and the memory is used to store computer instructions, which may be one or more computer programs. The computer instructions of this embodiment are executed by the processor, so that the processor implements the device upgrading method in this embodiment.
The electronic device of this embodiment may further include an input device and an output device, and the processor, the memory, the input device and the output device in the electronic device may be directly or indirectly electrically connected to realize data transmission or interaction. For example, the components may be electrically connected to each other through one or more communication buses or signal lines, as illustrated in fig. 4 by bus connection.
The present application also proposes a computer-readable storage medium having stored thereon computer instructions to be executed by a processor for implementing the steps of the above-mentioned device upgrade method.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Small talk, C + +, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The processor may be an integrated circuit chip having data processing capabilities. The Processor may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (Network Processor), and the like. The various methods, steps and logic blocks disclosed in embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An equipment upgrading method is applied to a main upgrading device in a network, and is characterized in that the equipment upgrading method comprises the following steps:
acquiring version information and equipment heat map information of other equipment in a network, wherein the equipment heat map information records the heat of the equipment in each time period;
and determining equipment to be upgraded according to the version information of the equipment, determining an upgrading time period of the equipment to be upgraded according to the equipment heat map information, and upgrading the equipment to be upgraded in the corresponding upgrading time period.
2. The device upgrading method according to claim 1, wherein upgrading the device to be upgraded in the corresponding upgrading time period includes:
and in the upgrading time period, detecting whether the equipment to be upgraded and the associated equipment thereof execute the key business program, and if the equipment to be upgraded or the associated equipment thereof do not execute the key business program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
3. The device upgrading method according to claim 1, wherein upgrading the device to be upgraded in the corresponding upgrading time period includes:
storing a key service program file of the equipment to be upgraded;
sending a file upgrading packet to equipment to be upgraded to upgrade the equipment to be upgraded, detecting whether equipment associated with the equipment to be upgraded executes a key service program or not in the upgrading operation process, if the associated equipment executes the key service program, interrupting the upgrading operation of the equipment to be upgraded, and sending a stored key service program file to the equipment to be upgraded so as to enable the equipment to be upgraded to start the key service operation;
and after a preset time period, detecting whether the equipment to be upgraded and the associated equipment thereof are executing the key service program again, and if the equipment to be upgraded or the associated equipment thereof do not execute the key service program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
4. The device upgrading method according to claim 2 or 3, wherein the device is a camera, and the detecting whether the device to be upgraded and the device associated with the device to be upgraded are executing the key service program comprises:
and detecting a video image acquired by the equipment to be upgraded or the associated equipment thereof, and if the moving target is identified, judging that the equipment to be upgraded or the associated equipment thereof is executing the key business program.
5. The device upgrade method according to claim 1, wherein the main upgrade device is further provided with a memory card provided with an upgrade package storage partition for storing a file upgrade package, the device upgrade method further comprising:
acquiring version information of other equipment in a network, and judging whether the storage card stores a file upgrade package with the latest version;
and if the latest version of the file upgrading packet does not exist, acquiring the latest version of the file upgrading packet from the equipment corresponding to the latest version and storing the file upgrading packet in the memory card upgrading packet storage partition.
6. The device upgrading method according to claim 1, wherein determining an upgrading time period of the device to be upgraded according to the device heat map information includes:
comparing the heat degree in each time period in the equipment heat degree graph with a heat degree threshold value, and if the heat degree in the time period is smaller than the heat degree threshold value, determining the time period as a time period to be upgraded;
the heat in each time segment in the device heat map refers to a ratio of a time length for executing the key service program in the time segment to a preset time segment.
7. An apparatus upgrading device applied to a main upgrading device in a network, the apparatus upgrading device comprising:
the system comprises an information scanning module, a heat map information recording module and a heat map information processing module, wherein the information scanning module is used for acquiring version information and equipment heat map information of other equipment in a network, and the equipment heat map information recording equipment is used for recording the heat of the equipment in each time period;
and the equipment upgrading module is used for determining equipment to be upgraded according to the version information of the equipment, determining the upgrading time period of the equipment to be upgraded according to the equipment heat map information, and upgrading the equipment to be upgraded in the corresponding upgrading time period.
8. The device upgrading apparatus according to claim 7, wherein the device upgrading module, when upgrading the device to be upgraded in the corresponding upgrading time period, performs the following operations:
storing a key service program file of the equipment to be upgraded;
detecting whether the equipment to be upgraded and the associated equipment thereof execute the key business program or not in the upgrading time period, and if the equipment to be upgraded or the associated equipment thereof do not execute the key business program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded;
in the process of sending a file upgrading packet to equipment to be upgraded to perform upgrading operation on the equipment to be upgraded, detecting whether associated equipment of the equipment to be upgraded is executing a key service program, if the associated equipment is executing the key service program, interrupting the upgrading operation of the equipment to be upgraded, and sending a stored key service program file to the equipment to be upgraded so as to enable the equipment to be upgraded to start the key service operation;
and after a preset time period, detecting whether the equipment to be upgraded and the associated equipment thereof are executing the key service program again, and if the equipment to be upgraded or the associated equipment thereof do not execute the key service program, sending a file upgrading packet to the equipment to be upgraded so as to upgrade the equipment to be upgraded.
9. An electronic device comprising a processor and a memory storing computer instructions, wherein the computer instructions, when executed by the processor, perform the steps of the method of any one of claims 1 to 6.
10. A computer-readable storage medium having stored thereon computer instructions, wherein the computer instructions are executable by a processor to perform the steps of the method of any one of claims 1-6.
CN202110168129.3A 2021-02-07 2021-02-07 Equipment upgrading method, device, equipment and storage medium Pending CN114911495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110168129.3A CN114911495A (en) 2021-02-07 2021-02-07 Equipment upgrading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110168129.3A CN114911495A (en) 2021-02-07 2021-02-07 Equipment upgrading method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114911495A true CN114911495A (en) 2022-08-16

Family

ID=82762236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110168129.3A Pending CN114911495A (en) 2021-02-07 2021-02-07 Equipment upgrading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114911495A (en)

Similar Documents

Publication Publication Date Title
CN108810116B (en) Message processing method and related product
CN109992427B (en) DPI association rule backfill processing method, device, equipment and medium
US11032584B2 (en) Picture storage method, apparatus and video monitoring system
EP2911351A1 (en) Method and device for updating routing search tree
CN110610610B (en) Vehicle access management method and device and storage medium
CN111787256B (en) Management method, device, medium and electronic equipment for pre-alarm video
CN110996056B (en) Video storage method and device of cascade monitoring system
CN113507471A (en) Method, device, router and storage medium for acquiring terminal system type
CN110098884A (en) Determine exception clock
CN107241216A (en) Maintain the method and device of the stable transmission of critical data
CN114911495A (en) Equipment upgrading method, device, equipment and storage medium
JP5962117B2 (en) Video selection method in an environment with multiple image compression methods
US20230013850A1 (en) Image capturing apparatus, control method, and computer-readable storage medium
CN115297447B (en) Long short message merging method, system, equipment and storage medium
CN103795577A (en) Log processing method and device of log server
CN112434711B (en) Data management method and device and electronic equipment
CN114651236A (en) Resource deleting method, device, equipment and storage medium
CN112365904B (en) Method, device, equipment and medium for prolonging storage time of alarm video
CN113709408B (en) Data acquisition method and device and video processing equipment
CN108093002B (en) Synchronization method and device of information to be synchronized based on data state determination
US11647272B2 (en) Image capturing apparatus, control method, and computer-readable storage medium
CN107484150B (en) EV-DO network connection method, device and terminal
CN108965214B (en) Data processing method, device and computer storage medium
CN117377002A (en) Dynamic network selection method and device
CN114245052A (en) Video data storage method and device, storage medium and electronic device

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