CN114339108A - Upgrading method of network hard disk video recorder and upgrading packet output device - Google Patents

Upgrading method of network hard disk video recorder and upgrading packet output device Download PDF

Info

Publication number
CN114339108A
CN114339108A CN202111646478.8A CN202111646478A CN114339108A CN 114339108 A CN114339108 A CN 114339108A CN 202111646478 A CN202111646478 A CN 202111646478A CN 114339108 A CN114339108 A CN 114339108A
Authority
CN
China
Prior art keywords
folder
upgrading
file
script
hard disk
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
CN202111646478.8A
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.)
Tiandy Technologies Co Ltd
Original Assignee
Tiandy 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 Tiandy Technologies Co Ltd filed Critical Tiandy Technologies Co Ltd
Priority to CN202111646478.8A priority Critical patent/CN114339108A/en
Publication of CN114339108A publication Critical patent/CN114339108A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an upgrading method of a network hard disk video recorder, which comprises the following steps: step one, acquiring a mirror image of a new file system and a mirror image of an old file system; secondly, making a file upgrading script according to the mirror image of the new file system and the mirror image of the old file system, and summarizing and outputting an automatic upgrading package; and step three, the user acquires an automatic upgrade package and executes the automatic upgrade package to finish the upgrade of the network hard disk video recorder, the automatic upgrade package is manufactured by utilizing the mirror image of the new file system and the mirror image of the old file system, the user acquires and executes the automatic upgrade package to finish the upgrade of the network hard disk video recorder after releasing the automatic upgrade package to the market, the time from outputting one upgrade package manually needs 4 hours to outputting one upgrade package automatically needs only about 10 minutes, and the output efficiency of the upgrade package is greatly improved.

Description

Upgrading method of network hard disk video recorder and upgrading packet output device
Technical Field
The invention relates to the technical field of upgrading of network hard disk video recorders, in particular to an upgrading method and an upgrading packet output device of a network hard disk video recorder.
Background
A Network Video Recorder (NVR) is an embedded device combining software and hardware, program bugs may exist in the software, an upgrade package is needed to upgrade the software, the difference of a new file system and an old file system is compared in the process of outputting the upgrade package, the difference items of configuration files are manually edited into a 'configuration file upgrade script', then the configuration file upgrade script is made into the upgrade package, the old version file system is burnt, the upgrade work of the upgrade package is executed, the upgraded configuration files are exported and compared with the new version file system, and if the configuration files are consistent, the upgrade package is considered to be successfully made.
The problems in the prior art are that the acquisition and the production of a 'configuration file upgrading script' of a new file system and an old file system, the upgrading and the upgrading of the old file system after the programming of the old version are performed are compared, the processes are purely manual, the time consumption is long, the production of the 'configuration file upgrading script' is trivial, problems are easy to occur, once problems occur, the subsequent processes need to be repeated once again, an effective upgrading package is output on average through statistics, the time consumption is about 4 hours, the cost is high, and the efficiency is low.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides an upgrading method of a network hard disk video recorder, which is characterized in that an automatic upgrading packet is manufactured by utilizing the mirror image of a new file system and the mirror image of an old file system, and after the automatic upgrading packet is released to the market, a user can finish the upgrading of the network hard disk video recorder by acquiring and executing the automatic upgrading packet, thereby greatly improving the output efficiency of the upgrading packet.
The technical scheme of the invention is as follows:
an upgrading method of a network hard disk video recorder comprises the following steps:
step one, acquiring a mirror image of a new file system and a mirror image of an old file system;
secondly, making a file upgrading script according to the mirror image of the new file system and the mirror image of the old file system, and summarizing and outputting an automatic upgrading package;
and step three, the user acquires the automatic upgrading packet and executes the automatic upgrading packet to finish upgrading the network hard disk video recorder.
Preferably, the second step includes:
step a, disassembling the mirror image of a new file system to a first folder, and disassembling the mirror image of an old file system to a second folder;
step b, comparing the files in the first folder with the files in the second folder one by one to manufacture a file upgrading script;
and c, traversing the first folder and the second folder, and summarizing the file upgrading script to obtain an automatic upgrading package.
Preferably, the method further comprises the following steps:
simulating an upgrade process of the automatic upgrade package on the second folder;
and comparing the second file folder after upgrading with the first file folder, and outputting an automatic upgrading package if the second file folder is not different from the first file folder.
Preferably, step b comprises:
judging whether the file is a configuration file, if so, comparing fields of the configuration file one by one to obtain an upgrade script of the configuration file;
if not, making a common file upgrading script.
Preferably, the configuration file upgrade script includes:
if the configuration files of the first folder and the second folder have the first field but have different values, generating a first field value replacing command;
if the configuration file in the second folder has a second field and the configuration file in the first folder does not have the second field, generating a second field deleting command;
if the configuration file in the first folder has a third field and the configuration file in the second folder does not have the third field, generating a third field insertion command;
and traversing the fields of the file to obtain the configuration file upgrading script.
Preferably, the common file upgrade script includes:
if the first file exists in the second folder and the first file does not exist in the first folder, generating a command for deleting the first file;
if the second file exists in the first folder and the second file does not exist in the second folder, copying the second file to the upgrade patch manufacturing area;
and traversing the first folder and the second folder to obtain the common file upgrading script.
An output device of an upgrade package of a network hard disk video recorder is based on the upgrade method of the network hard disk video recorder, and comprises the following steps:
an acquisition module that acquires an image of the new file system and an image of the old file system;
the disassembling module is used for disassembling the mirror image of the new file system into a first folder and the mirror image of the old file system into a second folder;
the script making module is used for comparing the first folder with the second folder, making a file upgrading script and summarizing the file upgrading script to obtain an automatic upgrading package;
the checking module simulates the upgrading process of the automatic upgrading package and checks based on the first folder;
and the output module outputs the verified automatic upgrade package.
Preferably, the script making module includes:
a general file unit which makes a general file upgrade script;
and a configuration file unit which makes a configuration file upgrade script.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method for upgrading a network hard disk video recorder.
The invention has the beneficial effects that:
the invention provides an upgrading method of a network hard disk video recorder, which is characterized in that an automatic upgrading packet is manufactured by utilizing a mirror image of a new file system and a mirror image of an old file system, and after the automatic upgrading packet is released to the market, a user can complete the upgrading of the network hard disk video recorder by acquiring and executing the automatic upgrading packet, so that the output efficiency of the upgrading packet is greatly improved.
The invention compares the acquisition of new and old file systems, the manufacture of upgrading scripts and the upgrading results, the processes are preposed to the development stage of an upgrading package, the manufacture of braking scripts generates an automatic upgrading package, a user can realize the upgrading of the network hard disk video recorder only by executing the process of the automatic upgrading package, the output time of the upgrading package is 4 hours from the manual output of one upgrading package, and the time from the compression to the automatic output of one upgrading package is only about 10 minutes.
Drawings
Fig. 1 is a flowchart of an upgrading method for a network hard disk video recorder provided by the present invention.
Fig. 2 is a flowchart for manufacturing an automatic upgrade package of a network hard disk recorder according to an embodiment of the present invention.
Fig. 3 is a flowchart of an upgrading method for a network hard disk recorder according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of an output device of an upgrade package of a network hard disk recorder according to the present invention.
Detailed Description
The present invention is described in terms of particular embodiments, other advantages and features of the invention will become apparent to those skilled in the art from the following disclosure, and it is to be understood that the described embodiments are merely exemplary of the invention and that it is not intended to limit the invention to the particular embodiments disclosed. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "in" and the like refer to directions or positional relationships based on the directions or positional relationships illustrated in the drawings, which are for convenience of description only, and do not indicate or imply that a device or element must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Furthermore, it should be noted that, in the description of the present invention, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly and may be, for example, fixedly connected, detachably connected, or integrally connected; may be a mechanical connection; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
As shown in fig. 1-2, an upgrading method for a network hard disk recorder includes:
s100, acquiring the mirror image of the new file system and the mirror image of the old file system.
S200, file upgrading scripts are manufactured according to the mirror image of the new file system and the mirror image of the old file system, and an automatic upgrading package is collected and output.
The specific process comprises the following steps:
s210, disassembling the mirror image of the new file system to a first folder, and disassembling the mirror image of the old file system to a second folder;
and S220, comparing the files in the first folder with the files in the second folder one by one to manufacture a file upgrading script.
And judging whether the file is a configuration file, if so, comparing the fields of the configuration file one by one to obtain an upgrade script of the configuration file.
Wherein, the configuration file upgrading script includes:
if the configuration files of the first folder and the second folder have the first field but have different values, generating a first field value replacing command;
if the configuration file in the second folder has a second field and the configuration file in the first folder does not have the second field, generating a second field deleting command;
if the configuration file in the first folder has a third field and the configuration file in the second folder does not have the third field, generating a third field insertion command;
and traversing the fields of the file to obtain the configuration file upgrading script.
If not, making a common file upgrading script.
Wherein, the common file upgrading script comprises:
if the first file exists in the second folder and the first file does not exist in the first folder, generating a command for deleting the first file;
if the second file exists in the first folder and the second file does not exist in the second folder, copying the second file to the upgrade patch manufacturing area;
and traversing the first folder and the second folder to obtain the common file upgrading script.
And S230, traversing the first folder and the second folder, and summarizing the file upgrading script to obtain an automatic upgrading package.
S240, simulating an upgrading process of the automatic upgrading package on the second folder;
and S250, comparing the upgraded second folder with the upgraded first folder, and outputting an automatic upgrade package if the second folder is not different from the first folder.
S300, the user obtains the automatic upgrading packet and executes the automatic upgrading packet to finish upgrading of the network hard disk video recorder.
In a classic embodiment, the process of making the automatic upgrade package is shown in FIG. 3 and includes:
s110, starting a key to make an automatic upgrade package command.
And S120, acquiring new and old file system images.
S130, executing an image disassembling command, and disassembling the images of the new and old file systems into respective folders, wherein the folders are files forming the images.
S140, comparing the contents of the files of the new and old file system folders one by one.
Firstly, judging whether the file is a configuration file, if so, opening the configuration files with the same name of a new file system folder and an old file system folder, and comparing the fields one by one.
If the new configuration file and the old configuration file all have the same field but different values, generating a replacing command;
if the new configuration file does not exist, and the old configuration file exists, a deleting command is generated;
and if the new configuration file is available and the old configuration file is not available, generating an insert command.
And S141, judging whether comparison of all fields is finished or not, and if so, carrying out the next step.
For the situation that the file is not the configuration file, if the new file system does not exist and the old file system exists, generating a file deleting command;
and if the new file system exists and the old file system does not exist, copying the file to an upgrade package manufacturing area for later use.
And S142, judging whether the comparison of all the files is finished or not, and if so, carrying out the next step.
S150, summarizing all commands to generate a 'configuration file upgrading script', summarizing all files in an upgrading packet manufacturing area and the 'configuration file upgrading script' to automatically generate an upgrading packet.
And S160, performing a simulation upgrade package upgrade process on the old file system folder.
S170, comparing the new file system with the upgraded old file system, and judging whether the files are different. If there is a difference, the automation script is modified and steps S140-S160 are re-executed to output the correct upgrade package. If there is no difference, the process is finished, and the generated upgrade package can be released to the market.
An output device of an upgrade package of a network hard disk video recorder based on the upgrade method of the network hard disk video recorder is shown in fig. 4, and comprises an acquisition module 100, a disassembly module 200, a script making module 300, a verification module 400 and an output module 500
The obtaining module 100 obtains a mirror image of a new file system and a mirror image of an old file system, the disassembling module 200 disassembles the mirror image of the new file system into a first folder, the mirror image of the old file system into a second folder, the script making module 300 compares the first folder with the second folder, a file upgrading script is made and collected to obtain an automatic upgrading package, the checking module 400 simulates an upgrading process of the automatic upgrading package and checks based on the first folder, and the output module 500 outputs the checked automatic upgrading package.
The script creating module 300 includes a normal file unit 310 and a configuration file unit 320, where the normal file unit 310 creates a normal file upgrade script, and the configuration file unit 320 creates a configuration file upgrade script.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method for upgrading a network hard disk video recorder.
Compared with the prior art, the technical scheme provided by the embodiment of the invention at least has the following advantages or beneficial effects:
the invention provides an upgrading method of a network hard disk video recorder, which is characterized in that an automatic upgrading packet is manufactured by utilizing a mirror image of a new file system and a mirror image of an old file system, and after the automatic upgrading packet is released to the market, a user can complete the upgrading of the network hard disk video recorder by acquiring and executing the automatic upgrading packet, so that the output efficiency of the upgrading packet is greatly improved. The invention compares the acquisition of new and old file systems, the manufacture of upgrading scripts and the upgrading results, the processes are preposed to the development stage of an upgrading package, the manufacture of braking scripts generates an automatic upgrading package, a user can realize the upgrading of the network hard disk video recorder only by executing the process of the automatic upgrading package, the output time of the upgrading package is 4 hours from the manual output of one upgrading package, and the time from the compression to the automatic output of one upgrading package is only about 10 minutes.
The above descriptions are only examples of the present invention, and common general knowledge of known specific structures, characteristics, and the like in the schemes is not described herein too much, and it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Without departing from the invention, several changes and modifications can be made, which should also be regarded as the protection scope of the invention, and these will not affect the effect of the invention and the practicality of the patent.

Claims (9)

1. An upgrading method of a network hard disk video recorder is characterized by comprising the following steps:
step one, acquiring a mirror image of a new file system and a mirror image of an old file system;
secondly, making a file upgrading script according to the mirror image of the new file system and the mirror image of the old file system, and summarizing and outputting an automatic upgrading package;
and step three, the user acquires the automatic upgrading packet and executes the automatic upgrading packet to finish upgrading the network hard disk video recorder.
2. The method for upgrading a network hard disk video recorder according to claim 1, wherein the second step comprises:
step a, disassembling the mirror image of the new file system to a first folder, and disassembling the mirror image of the old file system to a second folder;
step b, comparing the files in the first folder with the files in the second folder one by one to manufacture a file upgrading script;
and c, traversing the first folder and the second folder, and summarizing the file upgrading script to obtain an automatic upgrading package.
3. The method for upgrading a network hard disk video recorder according to claim 2, further comprising:
simulating an upgrade process of the automatic upgrade package on the second folder;
and comparing the second updated folder with the first folder, and if the second updated folder is not different from the first updated folder, outputting the automatic updating package.
4. The method for upgrading a network hard disk video recorder according to claim 3, wherein the step b comprises:
judging whether the file is a configuration file or not, if so, comparing fields of the configuration file one by one to obtain a configuration file upgrading script;
if not, making a common file upgrading script.
5. The method for upgrading a network hard disk recorder according to claim 4, wherein the configuration file upgrading script comprises:
if the configuration files of the first folder and the second folder have first fields, but the values of the first fields are different from the values of the second fields, a first field value replacing command is generated;
if the configuration file in the second folder has a second field and the configuration file in the first folder does not have the second field, generating a second field deleting command;
if the configuration file in the first folder has a third field and the configuration file in the second folder does not have the third field, generating a third field insertion command;
and traversing the fields of the file to obtain the configuration file upgrading script.
6. The method for upgrading a network hard disk recorder according to claim 5, wherein the common file upgrade script comprises:
if a first file exists in the second folder and the first file does not exist in the first folder, generating a first file deleting command;
if a second file exists in the first folder and the second file does not exist in the second folder, copying the second file to an upgrade patch manufacturing area;
and traversing the first folder and the second folder to obtain a common file upgrading script.
7. An output device of an upgrade package of a network hard disk video recorder based on the upgrade method of the network hard disk video recorder of claim 6, comprising:
an acquisition module that acquires an image of the new file system and an image of the old file system;
the disassembling module is used for disassembling the mirror image of the new file system to a first folder and the mirror image of the old file system to a second folder;
the script making module is used for comparing the first folder with the second folder, making a file upgrading script and summarizing the file upgrading script to obtain an automatic upgrading packet;
the checking module simulates the upgrading process of the automatic upgrading packet and checks based on the first folder;
and the output module outputs the verified automatic upgrade package.
8. The apparatus for outputting the upgrade package of network hard disk recorder as claimed in claim 7, wherein the script making module comprises:
a general file unit which makes a general file upgrade script;
and a configuration file unit which makes a configuration file upgrade script.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202111646478.8A 2021-12-29 2021-12-29 Upgrading method of network hard disk video recorder and upgrading packet output device Pending CN114339108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111646478.8A CN114339108A (en) 2021-12-29 2021-12-29 Upgrading method of network hard disk video recorder and upgrading packet output device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111646478.8A CN114339108A (en) 2021-12-29 2021-12-29 Upgrading method of network hard disk video recorder and upgrading packet output device

Publications (1)

Publication Number Publication Date
CN114339108A true CN114339108A (en) 2022-04-12

Family

ID=81016036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111646478.8A Pending CN114339108A (en) 2021-12-29 2021-12-29 Upgrading method of network hard disk video recorder and upgrading packet output device

Country Status (1)

Country Link
CN (1) CN114339108A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739278A (en) * 2009-12-17 2010-06-16 中国电力科学研究院 Enterprise-level application software updating method and system
CN104391728A (en) * 2014-12-12 2015-03-04 北京奇虎科技有限公司 Software upgrading delta pack acquiring method, corresponding upgrading method and device
CN105589725A (en) * 2016-01-11 2016-05-18 武汉虹信通信技术有限责任公司 Upgrade patch manufacture method of electronic equipment, upgrade method and upgrade patch
CN105589706A (en) * 2014-10-29 2016-05-18 Tcl集团股份有限公司 Upgrade package generation method and device
CN106021119A (en) * 2016-08-03 2016-10-12 网易(杭州)网络有限公司 Configuration file calibration method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739278A (en) * 2009-12-17 2010-06-16 中国电力科学研究院 Enterprise-level application software updating method and system
CN105589706A (en) * 2014-10-29 2016-05-18 Tcl集团股份有限公司 Upgrade package generation method and device
CN104391728A (en) * 2014-12-12 2015-03-04 北京奇虎科技有限公司 Software upgrading delta pack acquiring method, corresponding upgrading method and device
CN105589725A (en) * 2016-01-11 2016-05-18 武汉虹信通信技术有限责任公司 Upgrade patch manufacture method of electronic equipment, upgrade method and upgrade patch
CN106021119A (en) * 2016-08-03 2016-10-12 网易(杭州)网络有限公司 Configuration file calibration method and device

Similar Documents

Publication Publication Date Title
CN107391628B (en) Data synchronization method and device
CN105045663B (en) The method and system of rapid deployment virtual machine
US20120296878A1 (en) File set consistency verification system, file set consistency verification method, and file set consistency verification program
CN107493290A (en) The method that Android intelligent television system software carries out OTA upgradings
CN109032838B (en) Automatic verification method for consistency of backup and recovery data of virtual machine
CN111142907A (en) Partition upgrading method for off-line keyword recognition system
WO2021169280A1 (en) Virtual disk check code generation method, apparatus and device, and storage medium
CN101800840B (en) Set top box upgrading method
WO2016177075A1 (en) Method of checking associative relationship of service data, device and readable storage medium utilizing same
CN109445800B (en) Version automatic deployment method and system based on distributed system
CN114339108A (en) Upgrading method of network hard disk video recorder and upgrading packet output device
CN108664255B (en) Software upgrading method and device
CN117076204A (en) Remote replication task recovery method, device, equipment and medium
CN112202909A (en) Online upgrading method and system for computer storage system
CN109710290A (en) A kind of method of embedded type terminal equipment flash disk upgrading
CN112256978B (en) Data processing method, device and medium based on data model
CN111221556B (en) Remote upgrade RSU mirror image method and system
CN113590161A (en) Memory-controllable NB-IOT module differential upgrading method and system
CN112232768A (en) Merchant data processing method based on full life cycle management
CN114153709B (en) Server test behavior analysis method, device and storage medium
CN112445761B (en) File checking method and device and storage medium
CN110704322B (en) Software testing method and system
US20220207438A1 (en) Automatic creation and execution of a test harness for workflows
CN113297011A (en) Self-recovery method and system for master-slave MCU upgrading failure
CN109919808B (en) Trademark intelligent declaration method, medium, computer equipment and system

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