[go: up one dir, main page]

CN114416133A - Embedded file data updating method and system - Google Patents

Embedded file data updating method and system Download PDF

Info

Publication number
CN114416133A
CN114416133A CN202111658964.1A CN202111658964A CN114416133A CN 114416133 A CN114416133 A CN 114416133A CN 202111658964 A CN202111658964 A CN 202111658964A CN 114416133 A CN114416133 A CN 114416133A
Authority
CN
China
Prior art keywords
update
path
directory
updating
mapping
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
CN202111658964.1A
Other languages
Chinese (zh)
Other versions
CN114416133B (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.)
Wuhan Zmvision Technology Co ltd
Original Assignee
Wuhan Zmvision 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 Wuhan Zmvision Technology Co ltd filed Critical Wuhan Zmvision Technology Co ltd
Priority to CN202111658964.1A priority Critical patent/CN114416133B/en
Publication of CN114416133A publication Critical patent/CN114416133A/en
Application granted granted Critical
Publication of CN114416133B publication Critical patent/CN114416133B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides an embedded file data updating method and a system, comprising the following steps: after the system is initialized, running a selector to check the abstract digital directory to obtain a mapping path, and calling an application starting script under the mapping path to finish application starting; and the application starting script calls a decompressor to run in the background to obtain an update package, and the update package is decompressed based on the abstract digital directory under an update path to finish data update. The invention divides the updating program into two parts of a selector and a decompressor by adding mathematical logic calculation on the basis of storing the updating file by the embedded file system, avoids the abnormality of the file system during updating iteration by a dynamic mapping mode and ensures the sequence, compatibility and stability of the updating data.

Description

Embedded file data updating method and system
Technical Field
The invention relates to the technical field of embedded data processing, in particular to an embedded file data updating method and system.
Background
In embedded systems, especially low-cost embedded systems, updating of device files and data is a routine operation for device maintenance, and has high requirements on reliability and logicality of an updating method, otherwise unexpected loss is caused to batch products.
Generally, because system resources of an embedded system are limited, or a system firmware is flushed depending on a special upper computer environment, only application programs and data files are usually replaced, such an update mode that only non-system firmware is updated becomes a limited update, the limited update is usually completed by taking a directory or a partition as an object of integral replacement, for example, a directory needs to be additionally established during update, a new file and a program are downloaded and decompressed into the directory, a certain file mark is established after data verification is carried out to mark the new file and the program as a latest version, then two directories are exchanged, or a second directory is completely copied into a first directory, then one of the two directories is canceled or deleted, and an upgrade process is restarted and completed. These limited update methods based on directory or partition exchange, replication and marking during the update process are designed to be strictly atomic (where atomicity means that all the processes are executed and executed without interruption by any factor or all the processes are not executed) but the file system often does not strictly fulfill the purpose, such as exchanging directories, setting and revoking file marks and generally has no atomic feasibility for known file systems, and unexpected results will be encountered if an abnormal condition occurs while new and old files are alternated. In addition, the updating program is also a common application, and is also a risk point when updating the content containing the updating program, and in a limited updating system, the updating program is lack of an effective means for ensuring that the updating program is safe for the updating program under various abnormal conditions.
Therefore, when data is updated in the embedded file system, how to avoid confusion and abnormality of the data during updating becomes a problem to be solved urgently.
Disclosure of Invention
The invention provides a method and a system for updating embedded file data, which are used for solving the defect that the embedded file is easy to have abnormal updating when the data is updated in the prior art.
In a first aspect, the present invention provides an embedded file data updating method, including:
after the system is initialized, running a selector to check the abstract digital directory to obtain a mapping path, and calling an application starting script under the mapping path to finish application starting;
and the application starting script calls a decompressor to run in the background to obtain an update package, and the update package is decompressed based on the abstract digital directory under an update path to finish data update.
According to the embedded file data updating method provided by the invention, after the system is initialized, a selector is operated to check an abstract digital directory to obtain a mapping path, and an application start script under the mapping path is called to complete application start, wherein the method comprises the following steps:
determining the number of the abstract digital catalogues in the updating path, and if only one abstract digital catalog exists, mapping the abstract digital catalog into the mapping path by the selector;
and if the updating path comprises a plurality of abstract digital directories, the selector extracts the abstract digital directories and sequences the abstract digital directories, and checks the check file in the maximum value directory to obtain the mapping path.
According to the embedded file data updating method provided by the invention, the verifying the verification file in the maximum value directory to obtain the mapping path comprises the following steps:
if the verification is successful, deleting the minimum value directory, and mapping the maximum value directory to be the mapping path by the selector;
otherwise, deleting the maximum value directory, and mapping the maximum value directory minus 1 to the mapping path by the selector.
According to the embedded file data updating method provided by the invention, the initial value of the updating path only comprises one directory, and the name of the initial value of the updating path is the preset abstract number minimum value.
According to the embedded file data updating method provided by the invention, the application startup script calls a decompressor to run in the background to obtain an update package, and the update package is decompressed based on the abstract digital directory under an update path to complete data updating, which comprises the following steps:
if the decompressor obtains no available updating data packet, the updating program is quitted;
and if the decompressor acquires that the available update data packet exists, acquiring the update packet, and decompressing by taking the maximum value directory plus 1 as the directory name under the update path.
According to the embedded file data updating method provided by the invention, if the file system is an unreliable log file system, the updating path is divided into an even updating path and an odd updating path;
the even update path is used for storing abstract even directories, and the odd update path is used for storing abstract odd directories.
In a second aspect, the present invention further provides an embedded file data updating system, including:
the selector module is used for running the selector to check the abstract digital directory to obtain a mapping path after the system is initialized, and calling an application starting script under the mapping path to finish application starting;
and the decompressor module is used for calling the decompressor to run in a background by the application starting script, acquiring an update package, decompressing the update package based on the abstract digital directory under an update path and finishing data update.
In a third aspect, the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above embedded file data updating methods.
In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the embedded file data updating method according to any one of the above.
In a fifth aspect, the present invention also provides a computer program product comprising a computer program, which when executed by a processor, implements the steps of the embedded file data updating method according to any one of the above.
According to the embedded file data updating method and system provided by the invention, the updating program is divided into two parts, namely the selector and the decompressor, by adding mathematical logic calculation on the basis of storing the updating file in the embedded file system, and the abnormality of the file system during updating iteration is avoided in a dynamic mapping mode, so that the sequence, compatibility and stability of the updating data are ensured.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of an embedded file data updating method provided by the present invention;
FIG. 2 is a system component diagram of the embedded file data update method provided by the present invention;
FIG. 3 is a flow chart of selector operation provided by the present invention;
FIG. 4 is a flow chart of the decompressor provided by the present invention;
FIG. 5 is a schematic structural diagram of an embedded file data update system provided by the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. 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.
Fig. 1 is a schematic flow chart of an embedded file data updating method provided by the present invention, as shown in fig. 1, including:
step S1, after the system is initialized, operating a selector to check the abstract digital directory to obtain a mapping path, and calling an application start script under the mapping path to finish application start;
and step S2, the application startup script calls a decompressor to run in the background to obtain an update package, and the update package is decompressed based on the abstract digital directory under an update path to complete data update.
It can be understood that the present invention adds mathematical logic on the basis of the embedded file system storing the update file, and ensures the sequentiality and atomicity of the new and old replacements through digital calculation, i.e. ensures that a complete update process is visible and completely successful, or the update process is transparent and completely ineffective.
Specifically, the updating program is divided into two functional parts with complementary functions, one part realizes the fixed basic content as a system program part and is named as a selector CHOOSER, and the other part realizes the business logic content as an application program part and is named as a decompressor unparker. In the present invention, the execution items that both the selector CHOOSER and the decompressor unparker need to know and comply with are defined as a contract, which is a basic requirement for ensuring compatibility of the update procedure.
On the basis, the invention also introduces an abstract number naming and a mapping path, wherein the abstract number naming refers to that the name comprises any letter or number sequence which can be extracted according to convention, and satisfies the forms which can be compared, accumulated and have the minimum value; the mapping path refers to a link or reference to a certain path A and named as B, which is equivalent to an alias, and some file systems support the characteristic by themselves, and is called symbolic link, and in the unsupported file system, the mapping path can be indirectly realized by transferring dynamically generated character string path parameters to a function needing the path.
The update package downloaded in the updating process refers to a set of all updatable programs, libraries, driving modules, scripts, configurations and data, and has a directory structure organized according to convention after being expanded; a check file CHECKLST is stored in an update package root directory and is used for detecting the validity of all files in a package, and if the file does not exist after decompression due to any condition or the data of the file is referred to and does not accord with the check, all data packages are considered invalid; in addition, an application start script STARTAPP with a default name exists in the update package, system start ready is completed through calling of the script, and operation switching is performed to the application.
Specifically, after the embedded file system is initialized, the selector CHOOSER starts to operate, checks the abstract digital directory to obtain the mapping path, and further calls an application start script STARTAPP under the mapping path to complete application start. The application start script STARTAPP calls a decompressor unparker to run in the background, checks whether an update is available to obtain an update package, mathematically calculates the abstract digital directory on an update path UPATH to obtain a target digital directory, decompresses the update package under the directory, and executes an update program.
The relationship among the selector, decompressor, mapping link and abstract digital directory involved in the present invention is shown in fig. 2, the selector belongs to the system program, and in the firmware partition, it belongs to the non-updatable content; the decompressor belongs to an application program and belongs to updatable content in an abstract digital directory of a common partition; the abstract digital directory may contain a plurality of directories, but the mapping link only points to a valid and latest directory, the obsolete abstract digital directory is deleted by the selector, and the new abstract digital directory is generated by the decompressor.
According to the invention, mathematical logic calculation is added on the basis that the embedded file system stores the update file, the update program is divided into two parts with complementary functions of the selector and the decompressor, and the file system is prevented from being abnormal during update iteration in a dynamic mapping mode, so that the sequence, compatibility and stability of the update data are ensured.
Based on the above embodiment, after the system is initialized, the operating selector checks the abstract digital directory to obtain the mapping path, and invokes the application start script under the mapping path to complete application start, including:
determining the number of the abstract digital directories in the updating path, wherein if only one abstract digital directory exists, the selector maps the abstract digital directory to be the mapping path;
and if the updating path comprises a plurality of abstract digital directories, the selector extracts the abstract digital directories and sequences the abstract digital directories, and checks the check file in the maximum value directory to obtain the mapping path.
The verifying the check file in the maximum value directory to obtain the mapping path includes:
if the verification is successful, deleting the minimum value directory, and mapping the maximum value directory to be the mapping path by the selector;
otherwise, deleting the maximum value directory, and mapping the maximum value directory minus 1 to the mapping path by the selector.
Specifically, after the system is initialized, the selector CHOOSER checks the update path update, establishes an agreed mapping path REAL to point to the selected abstract digital directory, and all applications can only see the mapping path REAL, which is transparent to the digital path where the applications are located.
Checking the number of the abstract digital directories, if the update path UPATH only has one abstract digital directory, directly mapping the directory to REAL by a selector CHOOSER, avoiding detection to accelerate the common starting process, and here, simply deriving to prove that the directory is completely checked before; if the update path UPATH includes more than one abstract number directory, the selector CHOOSER extracts the abstract numbers of the directories and sorts the abstract numbers, verifies the verification file CHECKLST of the maximum MAX directory, if the verification passes, deletes the minimum MIN directory first, and then maps the maximum MAX directory as the mapping path REAL, otherwise, deletes the maximum MAX directory first and then maps the maximum MAX-1 as the mapping path REAL, and similarly, it can be proved through simple derivation that when the maximum MAX is incomplete, MAX-1 must exist and the verification is complete, and the execution flow of the corresponding selector CHOOSER is shown in fig. 3.
It should be noted that the activity of the selector CHOOSER is not disturbed by external factors, repeatedly interrupts its process, and has no influence on its operation result, and after several starts, the number of directories under the update path UPATH will be converged into one, which can be proved by simple derivation to be the latest sequence in the complete and effective update package. After the mapping path REAL is established, the selector CHOOSER hands over the control right to the application layer according to the appointed calling application start script STARTAPP, and the decompressor unparker belongs to the common application program called by the application start script STARTAPP, so that the selector CHOOSER and the decompressor unparker do not add and delete the digital directory under the update at the same time, and do not generate mutual interference. The selector CHOOSER is realized by belonging to a part of a system program, is not updated, only completes the conventional inherent function, scans an abstract digital directory on an update path UPATH, calculates a check value, clears a eliminated directory, maps an effective directory, and calls an application start script STARTAPP, and the operation ensures the basic update compatibility.
The invention avoids the vulnerability of the file system in the atom switching process by adopting a dynamic mapping mode, separates the main compatibility logic in the updating process into a selector CHOOSER as a firmware part, and ensures the compatibility and the stability of the updating process.
Based on any of the above embodiments, the initial value of the update path only includes one directory, and the name of the initial value of the update path is the preset abstract number minimum value.
Specifically, the update path UPATH referred to in the present invention is agreed, and as the file system is just shipped, there is only one directory under the path, and the name of the directory is the minimum value of the agreed abstract number, and the hierarchical structure of the directory and the update package are completely consistent, so the directory must be completely verified before shipping.
The invention avoids the possible confusion in the edition updating iteration in the forms of abstract digital calculation and integral verification, strictly ensures the sequence, ensures that the system cannot be substantially damaged by external impacts such as accidental power failure and the like through special design, and ensures that any external influence is transparent to all application programs.
Based on any of the above embodiments, the application startup script invokes the decompressor to perform background operation to obtain the update package, and decompresses the update package based on the abstract digital directory in the update path to complete data update, including:
if the decompressor obtains no available updating data packet, the updating program is quitted;
and if the decompressor acquires that the available update data packet exists, acquiring the update packet, and decompressing by taking the maximum value directory plus 1 as the directory name under the update path.
Specifically, as shown in fig. 4, the update package is configured to be downloaded only by the decompressor unparker, and is expanded under the update path UPATH by using the abstract number containing the convention rule as the directory name, and the value is the maximum value MAX of the abstract number accumulated by one under the update path UPATH. The single start of the decompressor unparker only runs once, that is, at most, a directory is newly added under the update path UPATH, and the start of the decompressor unparker is only responsible for decompressing and expanding the update packet, and is not responsible for the completeness of the data of the update packet after decompression, after all, the process termination can be caused by accidents at any time during the decompression process.
The method comprises the steps that a to-be-applied starting script STARTAPP calls a decompressor UNPACKER to run in a background, available updates are checked, the realization of the decompressor UNPACKER belongs to a part of an application program, only one convention needs to be decompressed under an update path UPATH, the update can be continuously performed by self, and the sufficient degree of freedom of product function expansion is ensured.
In the updating process, the main transactional logic is separated into a decompressor UNPACKER as an application part, so that the freedom and the expandability of an updating mode are ensured; meanwhile, the system has self-cleaning capability, and can continuously clean invalid garbage of the system, including normally eliminated files and data, and also including updated defective goods generated by accidents, so that the system is constantly kept in an updated state.
Based on any of the above embodiments, if the file system is an unreliable journaling file system, dividing the update path into an even update path and an odd update path;
the even update path is used for storing abstract even directories, and the odd update path is used for storing abstract odd directories.
Optionally, if the file system does not belong to a reliable journaling file system, the update path UPATH may be split into an UPATH _ EVEN (EVEN number) and an UPAHT _ ODD (ODD number) in separate partitions, and only the abstract EVEN directory and the abstract ODD directory are expanded and placed, respectively, and due to the accumulative replacement, both are not destroyed at the same time and can be repaired in a format.
The above-mentioned arrangement shows that the rules proposed by the present invention are strict, the structure is clear, and the verification and implementation are easy, for example, the workload of compiling codes for completing the selector CHOOSER and the decompressor PACKER by using SHELL scripts in the embedded LINUX system is only about one hundred lines, and the present invention is particularly suitable for updating low-cost products and quickly forming schemes.
The embedded file data updating system provided by the invention is described below, and the embedded file data updating system described below and the embedded file data updating method described above can be referred to correspondingly.
Fig. 5 is a schematic structural diagram of an embedded file data updating system provided by the present invention, as shown in fig. 5, including: a selector module 51 and a decompressor module 52, wherein:
the selector module 51 is configured to, after the system is initialized, run a selector to check the abstract digital directory to obtain a mapping path, and call an application start script under the mapping path to complete application start; the decompressor module 52 is configured to invoke the decompressor to perform background operation by the application start script, acquire an update packet, decompress the update packet based on the abstract digital directory in an update path, and complete data update.
According to the invention, mathematical logic calculation is added on the basis that the embedded file system stores the update file, the update program is divided into two parts with complementary functions of the selector and the decompressor, and the file system is prevented from being abnormal during update iteration in a dynamic mapping mode, so that the sequence, compatibility and stability of the update data are ensured.
Based on the above embodiment, the selector module 51 includes: a determination sub-module 511 and a decision sub-module 512, wherein:
the determining submodule 511 is configured to determine the number of the abstract digital directories in the update path, and if there is only one abstract digital directory, the selector maps the abstract digital directory to the mapping path; the judgment sub-module 512 is configured to, if the update path includes a plurality of abstract digital directories, extract the plurality of abstract digital directories and sort the abstract digital directories, check a check file in a maximum value directory, and obtain the mapping path.
The judgment sub-module 512 is specifically configured to:
if the verification is successful, deleting the minimum value directory, and mapping the maximum value directory to be the mapping path by the selector; otherwise, deleting the maximum value directory, and mapping the maximum value directory minus 1 to the mapping path by the selector.
Based on any of the above embodiments, the initial value of the update path only includes one directory, and the name of the initial value of the update path is the preset abstract number minimum value.
Based on any of the above embodiments, the decompressor module 52 includes: a first decompression submodule 521 and a second decompression submodule 522, wherein:
the first decompression sub-module 521 is configured to exit the update procedure if the decompressor obtains no available update data packet; the second decompressing submodule 522 is configured to, if the decompressor obtains that there is an available update packet, obtain the update packet, and decompress the update packet by using the maximum directory plus 1 as the directory name in the update path.
Based on any of the above embodiments, the system further includes a path updating module 53, where the path updating module 53 is configured to:
if the file system is an unreliable log file system, dividing the updating path into an even updating path and an odd updating path; the even update path is used for storing abstract even directories, and the odd update path is used for storing abstract odd directories.
Fig. 6 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 6: a processor (processor)610, a communication Interface (Communications Interface)620, a memory (memory)630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call logic instructions in the memory 630 to perform an embedded file data update method comprising: after the system is initialized, running a selector to check the abstract digital directory to obtain a mapping path, and calling an application starting script under the mapping path to finish application starting; and the application starting script calls a decompressor to run in the background to obtain an update package, and the update package is decompressed based on the abstract digital directory under an update path to finish data update.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. 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 and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, a computer is capable of executing the embedded file data updating method provided by the above methods, and the method includes: after the system is initialized, running a selector to check the abstract digital directory to obtain a mapping path, and calling an application starting script under the mapping path to finish application starting; and the application starting script calls a decompressor to run in the background to obtain an update package, and the update package is decompressed based on the abstract digital directory under an update path to finish data update.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the embedded file data updating method provided by the above methods, the method including: after the system is initialized, running a selector to check the abstract digital directory to obtain a mapping path, and calling an application starting script under the mapping path to finish application starting; and the application starting script calls a decompressor to run in the background to obtain an update package, and the update package is decompressed based on the abstract digital directory under an update path to finish data update.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An embedded file data updating method is characterized by comprising the following steps:
after the system is initialized, running a selector to check the abstract digital directory to obtain a mapping path, and calling an application starting script under the mapping path to finish application starting;
and the application starting script calls a decompressor to run in the background to obtain an update package, and the update package is decompressed based on the abstract digital directory under an update path to finish data update.
2. The method for updating embedded file data according to claim 1, wherein after the system is initialized, the running selector checks the abstract digital directory to obtain a mapping path, and invokes an application start script under the mapping path to complete application start, including:
determining the number of the abstract digital directories in the updating path, wherein if only one abstract digital directory exists, the selector maps the abstract digital directory to be the mapping path;
and if the updating path comprises a plurality of abstract digital directories, the selector extracts the abstract digital directories and sequences the abstract digital directories, and checks the check file in the maximum value directory to obtain the mapping path.
3. The method according to claim 2, wherein the verifying the check file in the maximum value directory to obtain the mapping path includes:
if the verification is successful, deleting the minimum value directory, and mapping the maximum value directory to be the mapping path by the selector;
otherwise, deleting the maximum value directory, and mapping the maximum value directory minus 1 to the mapping path by the selector.
4. The embedded file data updating method of claim 2, wherein the initial value of the update path comprises only one directory, and the initial value name of the update path is a preset abstract number minimum value.
5. The method for updating embedded file data according to claim 2, wherein the application start script calls a decompressor to perform background operation to obtain an update package, and decompresses the update package based on the abstract digital directory in an update path to complete data updating, comprising:
if the decompressor obtains no available updating data packet, the updating program is quitted;
and if the decompressor acquires that the available update data packet exists, acquiring the update packet, and decompressing by taking the maximum value directory plus 1 as the directory name under the update path.
6. The embedded file data updating method of any one of claims 1 to 5, wherein if the file system is an unreliable journaling file system, the update path is divided into an even update path and an odd update path;
the even update path is used for storing abstract even directories, and the odd update path is used for storing abstract odd directories.
7. An embedded file data updating system, comprising:
the selector module is used for running the selector to check the abstract digital directory to obtain a mapping path after the system is initialized, and calling an application starting script under the mapping path to finish application starting;
and the decompressor module is used for calling the decompressor to run in a background by the application starting script, acquiring an update package, decompressing the update package based on the abstract digital directory under an update path and finishing data update.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the embedded file data updating method according to any one of claims 1 to 6 are implemented when the processor executes the program.
9. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the embedded file data update method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the embedded file data updating method according to any one of claims 1 to 6.
CN202111658964.1A 2021-12-30 2021-12-30 Method and system for updating embedded file data Active CN114416133B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111658964.1A CN114416133B (en) 2021-12-30 2021-12-30 Method and system for updating embedded file data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111658964.1A CN114416133B (en) 2021-12-30 2021-12-30 Method and system for updating embedded file data

Publications (2)

Publication Number Publication Date
CN114416133A true CN114416133A (en) 2022-04-29
CN114416133B CN114416133B (en) 2024-07-02

Family

ID=81269575

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111658964.1A Active CN114416133B (en) 2021-12-30 2021-12-30 Method and system for updating embedded file data

Country Status (1)

Country Link
CN (1) CN114416133B (en)

Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996018947A1 (en) * 1994-12-13 1996-06-20 Novell, Inc. Method and apparatus to update or change a network directory
US6075943A (en) * 1997-08-13 2000-06-13 International Business Machines Corporation System and method for client server software installation
US6470345B1 (en) * 2000-01-04 2002-10-22 International Business Machines Corporation Replacement of substrings in file/directory pathnames with numeric tokens
US20030066062A1 (en) * 2001-09-28 2003-04-03 Brannock Kirk D. Method for atomically updating a plurality of files
US20050240815A1 (en) * 2004-04-13 2005-10-27 Sony Corporation Modular imaging of computer software for system install and restore
US20070300068A1 (en) * 2006-06-21 2007-12-27 Rudelic John C Method and apparatus for flash updates with secure flash
CN102422266A (en) * 2009-05-13 2012-04-18 国际商业机器公司 System and method for building and updating a runtime environment
CN102934089A (en) * 2010-06-17 2013-02-13 微软公司 Error detection for files
WO2013026332A1 (en) * 2011-08-23 2013-02-28 腾讯科技(深圳)有限公司 Software installation and upgrade method and device
CN104484199A (en) * 2014-12-08 2015-04-01 东软集团股份有限公司 Aircraft IFE system data update method and device
CN105279254A (en) * 2015-10-12 2016-01-27 江苏中威科技软件系统有限公司 Layout data stream file system, operation apparatus for system and realization method for apparatus
CN106569820A (en) * 2016-10-28 2017-04-19 汉柏科技有限公司 Method and device for replacing with busybox with high version and synchronously producing root file system
CN108121554A (en) * 2017-12-20 2018-06-05 浙江亿邦通信科技股份有限公司 A kind of upgrade method and upgrade-system of open air embedded device system
CN108427571A (en) * 2018-02-07 2018-08-21 深圳市雁联计算系统有限公司 A kind of dynamic link library update method and server
CN110704085A (en) * 2019-09-29 2020-01-17 苏州浪潮智能科技有限公司 RAID executable file updating method, device, equipment and storage medium
CN111654548A (en) * 2020-06-05 2020-09-11 网易(杭州)网络有限公司 Method, device and system for downloading patch file and electronic equipment
CN112380170A (en) * 2020-11-25 2021-02-19 北京珞安科技有限责任公司 Correlation method and device for file updating operation and computer equipment
CN112711429A (en) * 2020-12-24 2021-04-27 浪潮金融信息技术有限公司 Method, system and medium for remotely upgrading hardware driver
CN112783537A (en) * 2020-12-31 2021-05-11 浙江万胜智能科技股份有限公司 Embedded linux operating system upgrading method and system based on MTD storage equipment
CN113110944A (en) * 2021-03-31 2021-07-13 北京达佳互联信息技术有限公司 Information searching method, device, server, readable storage medium and program product
CN113312073A (en) * 2021-06-15 2021-08-27 上海益世界信息技术集团有限公司广州分公司 Installation package file processing method and related device
CN113778477A (en) * 2020-07-17 2021-12-10 北京沃东天骏信息技术有限公司 File processing method and device, computer readable storage medium and electronic device

Patent Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996018947A1 (en) * 1994-12-13 1996-06-20 Novell, Inc. Method and apparatus to update or change a network directory
US6075943A (en) * 1997-08-13 2000-06-13 International Business Machines Corporation System and method for client server software installation
US6470345B1 (en) * 2000-01-04 2002-10-22 International Business Machines Corporation Replacement of substrings in file/directory pathnames with numeric tokens
US20030066062A1 (en) * 2001-09-28 2003-04-03 Brannock Kirk D. Method for atomically updating a plurality of files
US20050240815A1 (en) * 2004-04-13 2005-10-27 Sony Corporation Modular imaging of computer software for system install and restore
US20070300068A1 (en) * 2006-06-21 2007-12-27 Rudelic John C Method and apparatus for flash updates with secure flash
CN102422266A (en) * 2009-05-13 2012-04-18 国际商业机器公司 System and method for building and updating a runtime environment
CN102934089A (en) * 2010-06-17 2013-02-13 微软公司 Error detection for files
WO2013026332A1 (en) * 2011-08-23 2013-02-28 腾讯科技(深圳)有限公司 Software installation and upgrade method and device
CN104484199A (en) * 2014-12-08 2015-04-01 东软集团股份有限公司 Aircraft IFE system data update method and device
CN105279254A (en) * 2015-10-12 2016-01-27 江苏中威科技软件系统有限公司 Layout data stream file system, operation apparatus for system and realization method for apparatus
CN106569820A (en) * 2016-10-28 2017-04-19 汉柏科技有限公司 Method and device for replacing with busybox with high version and synchronously producing root file system
CN108121554A (en) * 2017-12-20 2018-06-05 浙江亿邦通信科技股份有限公司 A kind of upgrade method and upgrade-system of open air embedded device system
CN108427571A (en) * 2018-02-07 2018-08-21 深圳市雁联计算系统有限公司 A kind of dynamic link library update method and server
CN110704085A (en) * 2019-09-29 2020-01-17 苏州浪潮智能科技有限公司 RAID executable file updating method, device, equipment and storage medium
CN111654548A (en) * 2020-06-05 2020-09-11 网易(杭州)网络有限公司 Method, device and system for downloading patch file and electronic equipment
CN113778477A (en) * 2020-07-17 2021-12-10 北京沃东天骏信息技术有限公司 File processing method and device, computer readable storage medium and electronic device
CN112380170A (en) * 2020-11-25 2021-02-19 北京珞安科技有限责任公司 Correlation method and device for file updating operation and computer equipment
CN112711429A (en) * 2020-12-24 2021-04-27 浪潮金融信息技术有限公司 Method, system and medium for remotely upgrading hardware driver
CN112783537A (en) * 2020-12-31 2021-05-11 浙江万胜智能科技股份有限公司 Embedded linux operating system upgrading method and system based on MTD storage equipment
CN113110944A (en) * 2021-03-31 2021-07-13 北京达佳互联信息技术有限公司 Information searching method, device, server, readable storage medium and program product
CN113312073A (en) * 2021-06-15 2021-08-27 上海益世界信息技术集团有限公司广州分公司 Installation package file processing method and related device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
吴建明WUJIANMING: "嵌入式Linux的OTA更新, 基础知识和实现", Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/158673802> *
李权: "高可靠性的嵌入式软件现场更新方法", 计算机应用, vol. 30, no. 8, 31 August 2010 (2010-08-31), pages 2228 - 2231 *
魏薇, 孙世新: "XFS日志文件系统的关键技术研究", 电脑开发与应用, no. 03, 30 March 2005 (2005-03-30), pages 27 - 29 *

Also Published As

Publication number Publication date
CN114416133B (en) 2024-07-02

Similar Documents

Publication Publication Date Title
US9043778B2 (en) Method and system for upgrading software
US10114630B2 (en) Management of software and operating system updates required for the process of creating a virtual machine facsimile of an existing physical or virtual machine
CN107748668A (en) A kind of method and device of application program updating
CN111104151B (en) Shell script-based Git code simplification management method
CN111008034A (en) Patch generation method and device
US20220244938A1 (en) Method and system for code maintenance
CN111464603A (en) Server capacity expansion method and system
CN111433739A (en) Program upgrading method and embedded device
CN113961221A (en) Service management method based on registration center
MX2014008561A (en) Installation engine and package format for parallelizable, reliable installations.
CN108664255B (en) Software upgrading method and device
CN114091010B (en) A method, device, electronic device and storage medium for adaptive optimization of encryption
JP2011186823A (en) Virus-checking system, virus-checking device and program
CN111949290B (en) Hot patch management method and device, electronic equipment and storage medium
CN114416133A (en) Embedded file data updating method and system
CN113377400A (en) Software upgrading method and device, storage medium and electronic equipment
CN108304699A (en) A kind of method and device that security software is protected
CN113312073B (en) Installation package file processing method and related device
JP6210010B2 (en) Information processing program, apparatus and method
CN111857543B (en) Method, apparatus and computer program product for data migration
EP3340048A1 (en) System and method for content - application split
CN115437748A (en) Virtual machine starting method and device and electronic equipment
CN105765908A (en) Method, client and system for multi-site automatic update
CN114003260B (en) Application heat updating method and device
CN116185462B (en) A method, system, computer and readable storage medium for upgrading front-end applications

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
CB02 Change of applicant information

Country or region after: China

Address after: 430073 No. 006, 20th floor, business project (China Pharmaceutical Technology Trading Market), No. 1, xiyaojian Road, north of Gaoxin Avenue and Heying Road, East Lake New Technology Development Zone, Wuhan City, Hubei Province

Applicant after: Wuhan Zhuomu Technology Co.,Ltd.

Address before: 430073 No. 006, 20th floor, business project (China Pharmaceutical Technology Trading Market), No. 1, xiyaojian Road, north of Gaoxin Avenue and Heying Road, East Lake New Technology Development Zone, Wuhan City, Hubei Province

Applicant before: WUHAN ZMVISION TECHNOLOGY Co.,Ltd.

Country or region before: China

CB02 Change of applicant information
GR01 Patent grant