CN106874770B - Firmware guiding method and device for currency detector - Google Patents

Firmware guiding method and device for currency detector Download PDF

Info

Publication number
CN106874770B
CN106874770B CN201710040811.8A CN201710040811A CN106874770B CN 106874770 B CN106874770 B CN 106874770B CN 201710040811 A CN201710040811 A CN 201710040811A CN 106874770 B CN106874770 B CN 106874770B
Authority
CN
China
Prior art keywords
file
firmware
backup
directory
preset
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.)
Expired - Fee Related
Application number
CN201710040811.8A
Other languages
Chinese (zh)
Other versions
CN106874770A (en
Inventor
吴志江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201710040811.8A priority Critical patent/CN106874770B/en
Publication of CN106874770A publication Critical patent/CN106874770A/en
Application granted granted Critical
Publication of CN106874770B publication Critical patent/CN106874770B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/575Secure boot
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency

Abstract

The invention provides a firmware guiding method and a firmware guiding device of a currency detector, which are characterized in that when the currency detector is started, a firmware guiding device is used for acquiring a backup firmware file in a firmware backup file directory, loading a corresponding mapping firmware file generated according to the backup firmware file into a working file directory, operating the mapping firmware file in the working file directory to start the currency detector, backing up an original firmware file to obtain a backup firmware file, mapping the backup firmware file into the working directory to start the currency detector, performing double protection on the firmware file of the currency detector, reducing the damage probability of the original firmware file, ensuring the normal starting and operation of the currency detector, improving the starting stability of the currency detector and effectively meeting the requirement of people on the stability of the currency detector.

Description

Firmware guiding method and device for currency detector
Technical Field
The invention relates to the technical field of communication, in particular to a firmware guiding method and device of a currency detector.
Background
The firmware refers to a device "driver" stored in the device, and through the firmware, the operating system can realize the operation of a specific machine according to the standard device driver, for example, the banknote detector, the optical drive, the recorder and the like have internal firmware.
In the using process of the currency detector, important firmware programs stored in the currency detector can be damaged or lost due to manual misoperation or defects of equipment programs, so that the currency detector cannot be started or operated normally, and the requirement of people on equipment stability cannot be met effectively.
Disclosure of Invention
In view of this, the embodiment of the present invention provides a method for guiding firmware of a banknote validator, so as to solve the problem that the existing banknote validator cannot be normally started due to the firmware being damaged or lost, and cannot effectively meet the requirement of people on the stability of the banknote validator.
In a first aspect, an embodiment of the present invention provides a firmware booting method for a banknote validator, where the method includes:
when the currency detector is started, obtaining backup firmware files in a firmware backup file directory;
loading a corresponding mapping firmware file generated according to the backup firmware file into a working file directory;
and operating the mapping firmware file in the working file directory to start a currency detector.
In a second aspect, an embodiment of the present invention provides a firmware guiding apparatus for a banknote validator, where the apparatus includes a file acquiring unit, a file loading unit, and a file operating unit.
The file acquisition unit is used for acquiring backup firmware files in a firmware backup file directory when the currency detector is started;
the file loading unit is used for loading the corresponding mapping firmware file generated according to the backup firmware file into a working file directory;
and the file operation unit is used for operating the mapping firmware file in the working file directory to start the currency detector.
In the embodiment of the invention, when the currency detector is started, the firmware guiding device is used for acquiring the backup firmware file in the firmware backup file directory, loading the corresponding mapping firmware file generated according to the backup firmware file into the working file directory, operating the mapping firmware file in the working file directory to start the currency detector, backing up the original firmware file to obtain the backup firmware file, and mapping the backup firmware file into the working directory to start the currency detector, thereby carrying out double protection on the firmware file of the currency detector, reducing the damage probability of the original firmware file, ensuring the normal start and operation of the currency detector, improving the starting stability of the currency detector, and effectively meeting the requirement of people on the stability of the currency detector.
Drawings
Fig. 1 is a flowchart of an implementation of a firmware booting method of a banknote validator according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of determining whether a backup firmware exists in a firmware backup file directory
A specific implementation flow chart of a file method;
FIG. 3 is a block diagram of a method for verifying whether a backup firmware file is corrupted according to an embodiment of the present invention
A volume implementation flow chart;
FIG. 4 is a block diagram of a method for verifying whether a firmware file is backed up via a file management list according to an embodiment of the present invention
A flow chart of a specific implementation of a corrupted method;
FIG. 5 is a block diagram of a method for loading a mapping firmware file into a working file directory according to an embodiment of the present invention
A specific implementation flow chart of the method;
fig. 6 is a block diagram of a firmware guiding device of a banknote validator according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
It should be understood that, in the embodiments of the present invention, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the internal logic of the processes, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
The following detailed description of the implementation of the present invention is made with reference to specific embodiments:
fig. 1 shows an implementation flow of a firmware booting method of a banknote validator provided by an embodiment of the invention, which is detailed as follows:
in step S101, upon the start of the banknote validator, the backup firmware files in the firmware backup file directory are acquired.
Specifically, the Nand-flash memory has the advantages of large capacity, high rewriting speed and the like, and is suitable for storing a large amount of data.
In the embodiment of the invention, a Nand-flash memory is arranged in the currency detector, a firmware backup file directory is stored in the Nand-flash memory, a backup file of an original firmware file, namely a backup firmware file, is stored under the firmware backup file directory, and when a user starts the currency detector, a firmware guiding device acquires the backup firmware file in the firmware backup file directory.
Further, the step S101 is specifically: when the currency detector is started, the backup firmware files with the preset number in the firmware backup file directory are obtained.
The preset number of backup firmware files is specifically determined according to the number of the firmware required by the currency detector, and if the number of the firmware used by the currency detector is 5, the number of the corresponding backup firmware files is 5; if the number of firmware used by the bill validator is 3, the number of corresponding backup firmware files is 3.
Further, in order to avoid the problem that the banknote checking machine cannot be normally started due to the loss of the backup firmware file caused by other reasons, before step S101, a specific implementation process for determining whether the backup firmware file exists in the firmware backup file directory as shown in fig. 2 is further included.
In step S201, it is determined whether a backup firmware file exists in the firmware backup file directory.
In the embodiment of the present invention, whether a backup firmware file exists in the firmware backup file directory may be determined by a keyword or a file management list, where the keyword includes a name of an original firmware file.
Specifically, whether a file name in the firmware backup file directory contains a file of the keyword is detected according to the keyword, and if so, the file containing the keyword is determined to be a backup firmware file.
Optionally, the file names in the firmware backup file directory are extracted, the file names are compared with the file names of the corresponding directories in the file management list one by one, whether a file named as a backup firmware file in the file management list exists in the firmware backup file directory is determined, and if the file exists, it is determined that the backup firmware file exists in the firmware backup file directory.
Further, the step S201 specifically includes: and determining whether a preset number of backup firmware files exist in the firmware backup file directory, for example, determining whether 5 backup firmware files exist in the firmware backup file directory.
In step S202, if the firmware backup file directory does not have the backup firmware file, the firmware package of the preset version is searched from the preset directory of the banknote checking machine according to the preset priority.
In the embodiment of the invention, the file system used in the currency detector is a linux file system, the memory is a Nand-flash memory, wherein a plurality of file directories such as a firmware backup file directory, a firmware upgrade file directory, a factory backup file directory, a working file directory and the like are stored in the Nand-flash memory, wherein the firmware backup file directory, the firmware upgrade file directory and the working file directory are readable and writable file directories, and the factory backup file directory is a read-only file directory.
The factory backup file directory is set as a read-only file directory, so that the original firmware file stored in the factory backup file directory can be prevented from being damaged, the factory backup file directory can be used for multiple times, and the safety and the recoverability of the firmware file of the currency detector are guaranteed.
Specifically, the firmware backup file directory stores backup firmware files generated according to original firmware files or upgraded firmware files.
The firmware upgrade file directory stores upgrade firmware packages of different versions upgraded based on the original firmware file.
The factory backup file directory stores original firmware packages of original versions.
Here, the preset directories include a firmware upgrade file directory and a factory backup file directory; the firmware packages with the preset versions are specifically upgrade firmware packages with different versions and original firmware packages with original versions.
Here, the preset priority is set to preferentially traverse and search the upgrade firmware package in the firmware upgrade file directory, and then traverse and search the original firmware package of the original version in the factory backup file directory, if the required upgrade firmware package is searched in the firmware upgrade file directory, the original firmware package of the original version does not need to be searched in the factory backup file directory, otherwise, the original firmware package of the original version needs to be searched in the factory backup file directory.
Further, the step S202 is specifically: and if the firmware backup file directory does not have the backup firmware files with the preset number, searching a firmware package with a preset version from a preset directory of the currency detector according to the preset priority.
Here, when the firmware of the banknote validator is upgraded, if a part of the backup firmware files in the firmware backup file directory may be lost due to human misoperation or a defect of the program itself, it is determined that a preset number of backup firmware files do not exist in the firmware backup file directory, for example, 5 firmware files are used in the banknote validator, and correspondingly, the number of the backup firmware files in the firmware backup file directory should also be 5, and when the number of the backup firmware files is less than 5, it is determined that the backup firmware files do not exist in the firmware backup file directory. At this time, the firmware guiding device searches the upgrade firmware package of the latest version from the firmware upgrade file directory, and if the upgrade firmware package of the latest version or the upgrade firmware package of other versions cannot be searched in the firmware upgrade file directory, the original firmware package of the original version is searched in the factory backup file directory; when the original firmware package of the original version cannot be found in the factory backup file directory, a prompt message is sent to report an error, such as a program error, a corresponding firmware package cannot be found, and the like, wherein the prompt message may be displayed at a screen end or prompted by voice.
In step S203, the found firmware package of the preset version is decompressed to generate a corresponding backup firmware file, and the corresponding backup firmware file is loaded into the firmware backup file directory.
In the embodiment of the present invention, in order to ensure that the firmware backup file directory stores backup firmware files, and avoid the situation that files are lost or damaged due to directly using the firmware packages in the upgrade firmware directory and the factory firmware backup file directory, when a firmware package of a preset version is found from the preset directory, for example, when an upgrade firmware package of a latest version or an original firmware package of an original version is found, the firmware package of the preset version is decompressed to generate corresponding backup firmware files, and the decompressed backup firmware files are loaded into the firmware backup file directory.
Further, step S203 specifically includes: and decompressing the found firmware packages of the preset versions to generate backup firmware files corresponding to the preset number, and loading the backup firmware files of the preset number into the firmware backup file directory.
For example, when the number of the firmware used by the banknote validator is 5, the found firmware package of the preset version is decompressed to generate corresponding 5 backup firmware files, and the 5 backup firmware files are loaded into the firmware backup file directory.
Further, in order to avoid that the banknote validator cannot be normally started due to the backup firmware file being damaged, a specific flow for checking whether the backup firmware file is damaged is also included before step S101, as shown in fig. 3.
In step S301, it is checked whether the backup firmware file is corrupted through the file management list.
In the embodiment of the present invention, the file management list records file data in all directory files, such as file names, file sizes, file addresses, and the like, where the file address is a directory to which the file belongs, and the file address can be used to know which file directory the file is stored in.
Specifically, the name, the file size, and the check value of the backup firmware file are recorded in the file management list in step S301, and step S301 is implemented by a specific flow as shown in fig. 4.
In step S401, the actual file size of the backup firmware file is acquired.
In the embodiment of the present invention, if a file is lost or corrupted, the actual file size of the file may change, for example, the file size of the correctly used backup firmware file is 20M, and when part of the file data in the backup firmware file is lost or corrupted, the actual file size of the backup firmware file may be greater than or less than 20M.
Further, step S401 specifically includes: and respectively acquiring the actual file sizes of the backup firmware files of the preset number.
In step S402, it is determined whether the actual file size matches the corresponding file size recorded in the file management list, based on the name of the backup firmware file.
In the embodiment of the present invention, after the actual file size of the backup firmware file is obtained, the actual file size is compared with the file sizes with the same file name recorded in the file management list to determine whether the sizes of the two files are consistent.
Further, in step S402, it is specifically determined whether the actual file sizes of the preset number of backup firmware files are consistent with the corresponding file sizes recorded in the file management list according to the names of the backup firmware files.
In step S403, if the actual file size matches the corresponding file size recorded in the file management list, it is determined whether the backup firmware file is corrupted by the check value in the file management list.
In the embodiment of the present invention, if the actual file size of the backup firmware file is consistent with the corresponding file size recorded in the file management list, it is necessary to determine whether the backup firmware file is damaged or not through the check value recorded in the file management list.
And when the check value in the backup firmware file is consistent with the check value recorded in the file management list, judging that the backup firmware file is not damaged and has file integrity.
And when the check value in the backup firmware file is inconsistent with the check value recorded in the file management list, judging that the backup firmware file is damaged and has no file integrity.
Further, if the actual file size is not consistent with the corresponding file size recorded in the file management list, it is determined that the backup firmware file is damaged and has no file integrity.
Further, the step S403 is specifically: if the actual file size of the backup firmware files in the preset number is consistent with the corresponding file size recorded in the file management list, respectively determining whether the backup firmware files in the preset number are damaged or not according to the check values in the file management list, and when any one backup firmware file in the backup firmware files in the preset number is damaged, judging that the backup firmware files in the preset number are damaged.
Further, the step S301 is specifically: and checking whether the preset number of backup firmware files are damaged or not through the file management list.
For example, when the number of the firmware used by the bill validator is 5, the file management list is used to check whether the 5 backup files stored in the Nand-flash memory are damaged or not, and the integrity is not provided.
In step S302, if the backup firmware file is damaged, the damaged backup firmware file is deleted, and a firmware package with a preset version is searched from a preset directory of the banknote validator according to a preset priority.
In the embodiment of the invention, in order to avoid the situation that the banknote checking machine cannot be normally started due to interference or wrong use caused by the damaged backup file in the Nand-flash memory, after the backup firmware file is determined to be damaged, the damaged backup firmware file is deleted, and the firmware package of the preset version is searched from the preset directory stored in the Nand-flash memory in the banknote checking machine according to the preset priority.
Further, the step S302 specifically includes: if the backup firmware files of which the number is less than or equal to the preset number are damaged in the backup firmware files of the preset number stored in the firmware backup file directory, deleting all the backup firmware files of the preset number, and searching the firmware package of the preset version from the preset directory of the currency detector according to the preset priority.
In step S303, the found firmware package of the preset version is decompressed to generate a corresponding backup firmware file, and the corresponding backup firmware file is loaded into the firmware backup file directory.
Further, the step S303 is specifically: and decompressing the found firmware packages of the preset versions to generate backup firmware files corresponding to the preset number, and loading the backup firmware files of the preset number into the firmware backup file directory.
In the embodiment of the invention, whether the backup firmware file in the firmware backup file directory is damaged is checked, and if the backup firmware file is damaged, the backup firmware file generated according to the firmware package of the preset version is reloaded, so that the working firmware file is ensured to be correct and complete when the currency detector is started, the currency detector can be ensured to be started normally, and the safety and the recoverability of the boot firmware are ensured.
In step S102, the corresponding mapping firmware file generated according to the backup firmware file is loaded into the working file directory.
In the embodiment of the present invention, the backup firmware files and the mapping firmware files correspond to each other one to one, that is, the contents of the backup firmware files and the contents of the mapping firmware files are consistent and are only stored in different file directories with different names respectively.
Specifically, a specific flow of loading the mapping firmware file into the working file directory in step S102 is shown in fig. 5.
In step S501, a corresponding mapping firmware file is generated from the backup firmware file.
In the embodiment of the invention, after the backup firmware file is determined not to be damaged, the corresponding mapping firmware file is generated according to the backup firmware file.
Specifically, the step S501 specifically includes: and generating a corresponding preset number of mapping firmware files according to the preset number of backup firmware files, for example, if there are 5 backup firmware files, generating 5 mapping firmware files correspondingly.
In step S502, the original mapped firmware file in the working file directory is deleted.
In the embodiment of the invention, in order to improve the starting efficiency of the currency detector and ensure the starting stability of the currency detector, when the currency detector is started, if the original mapping firmware file is detected to be stored in the working file directory, the original firmware file is deleted so as to reload the correct mapping firmware file.
Further, step S502 specifically includes: and deleting a preset number of original mapping firmware files in the working file directory.
In step S503, the corresponding mapping firmware file generated from the backup firmware file is loaded into the working file directory.
In the embodiment of the invention, when the currency detector is started, the mapping firmware file generated according to the backup firmware file is loaded into the working directory every time, so that the integrity and consistency of the mapping firmware file in the working directory can be ensured, and the stability of normal startup of the currency detector is further improved.
Further, the step S503 is specifically: and loading the mapping firmware files of the corresponding preset number generated according to the backup firmware files of the preset number into the working file directory.
In step S103, the mapping firmware file in the working file directory is executed to start the banknote validator.
In the embodiment of the invention, the banknote detector is started by operating the mapping firmware file in the working file directory, so that the damage probability of the original firmware file is further reduced, and the starting stability of the banknote detector is improved while the firmware file is protected.
Further, the step S103 is specifically: and running a preset number of mapping firmware files in the working file directory to start the currency detector.
In the embodiment of the invention, when the currency detector is started, the firmware guiding device is used for acquiring the backup firmware file in the firmware backup file directory, loading the corresponding mapping firmware file generated according to the backup firmware file into the working file directory, operating the mapping firmware file in the working file directory to start the currency detector, backing up the original firmware file to obtain the backup firmware file, and mapping the backup firmware file into the working directory to start the currency detector, thereby carrying out double protection on the firmware file of the currency detector, reducing the damage probability of the original firmware file, ensuring the normal start and operation of the currency detector, improving the starting stability of the currency detector, and effectively meeting the requirement of people on the stability of the currency detector.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the embodiments described above may be implemented by using a program to instruct the relevant hardware, and the corresponding program may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk or optical disk.
Fig. 6 shows a specific structural block diagram of a firmware guiding device 6 of a banknote validator provided by an embodiment of the invention, and for convenience of explanation, only the parts related to the embodiment of the invention are shown.
The firmware guiding device 6 of the banknote detector provided by the embodiment of the invention comprises a file acquisition unit 61, a file loading unit 62 and a file operation unit 63.
The file acquisition unit 61 is used for acquiring backup firmware files in a firmware backup file directory when the currency detector is started;
a file loading unit 62, configured to load a corresponding mapping firmware file generated according to the backup firmware file into a working file directory;
a file operating unit 63, configured to operate the mapping firmware file in the working file directory to start a banknote validator.
Further, the apparatus further comprises:
a file determining unit for determining whether a backup firmware file exists in the firmware backup file directory;
the first firmware package searching unit is used for searching a firmware package of a preset version from a preset directory of the currency detector according to a preset priority if the firmware backup file directory does not contain the backup firmware file;
and the first firmware package processing unit is used for decompressing the found firmware package with the preset version to generate a corresponding backup firmware file and loading the corresponding backup firmware file into the firmware backup file directory.
Further, the apparatus further comprises:
the file checking unit is used for checking whether the backup firmware file is damaged or not through a file management list;
the second firmware package searching unit is used for deleting the damaged backup firmware file and searching a firmware package with a preset version from a preset directory of the currency detector according to a preset priority if the backup firmware file is damaged;
and the second firmware package processing unit is used for decompressing the found firmware package with the preset version to generate a corresponding backup firmware file and loading the corresponding backup firmware file into the firmware backup file directory.
Specifically, the file loading unit 62 includes:
the file generation subunit is used for generating a corresponding mapping firmware file according to the backup firmware file;
the file deleting subunit is used for deleting the original mapping firmware file in the working file directory;
and the file loading subunit is used for loading the corresponding mapping firmware file generated according to the backup firmware file into the working file directory.
Specifically, the file verification unit includes:
a file size obtaining subunit, configured to obtain an actual file size of the backup firmware file;
a file consistency judging subunit, configured to judge, according to the name of the backup firmware file, whether the actual file size is consistent with the corresponding file size recorded in the file management list;
and the file checking subunit is used for determining whether the backup firmware file is damaged or not according to the checking value in the file management list if the actual file size is consistent with the corresponding file size recorded in the file management list.
In the embodiment of the invention, when the currency detector is started, the firmware guiding device is used for acquiring the backup firmware file in the firmware backup file directory, loading the corresponding mapping firmware file generated according to the backup firmware file into the working file directory, operating the mapping firmware file in the working file directory to start the currency detector, backing up the original firmware file to obtain the backup firmware file, and mapping the backup firmware file into the working directory to start the currency detector, thereby carrying out double protection on the firmware file of the currency detector, reducing the damage probability of the original firmware file, ensuring the normal start and operation of the currency detector, improving the starting stability of the currency detector, and effectively meeting the requirement of people on the stability of the currency detector.
Those of ordinary skill in the art will appreciate that the various illustrative elements and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing embodiments of the apparatuses, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the above-described division of units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The above functions, if implemented in the form of software functional units and sold or used as a separate product, may be stored in a computer-readable storage medium. 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 above-described apparatus 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.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of the state or the alternative within the technical scope of the present invention, and the state or the alternative should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method of firmware booting of a banknote validator, the method comprising:
when the currency detector is started, a backup firmware file in a firmware backup file directory is obtained, wherein the backup firmware file is a backup file of an original firmware file stored in the firmware backup file directory;
loading a corresponding mapping firmware file generated according to the backup firmware file into a working file directory;
running the mapping firmware file in the working file directory to start a currency detector;
before the step of obtaining the backup firmware files in the firmware backup file directory, the method further includes:
checking whether the backup firmware file is damaged or not through a file management list;
if the backup firmware file is damaged, deleting the damaged backup firmware file, and searching a firmware package of a preset version from a preset directory of the currency detector according to a preset priority, wherein the preset directory is a firmware upgrading file directory and a factory backup file directory, the preset priority is set to be firstly used for traversing and searching upgrading firmware packages in the firmware upgrading file directory, and then traversing and searching an original firmware package of an original version in the factory backup file directory;
and decompressing the found firmware packet of the preset version to generate a corresponding backup firmware file, and loading the corresponding backup firmware file into the firmware backup file directory.
2. The method of claim 1, wherein prior to the step of obtaining the backup firmware files in the firmware backup file directory, further comprising:
determining whether a backup firmware file exists in the firmware backup file directory;
if the firmware backup file directory does not have the backup firmware file, searching a firmware package of a preset version from a preset directory of the currency detector according to a preset priority;
and decompressing the found firmware packet of the preset version to generate a corresponding backup firmware file, and loading the corresponding backup firmware file into the firmware backup file directory.
3. The method of claim 1, wherein the step of loading the corresponding mapped firmware file generated from the backup firmware file into a working file directory comprises:
generating a corresponding mapping firmware file according to the backup firmware file;
deleting the original mapping firmware file in the working file directory;
and loading the corresponding mapping firmware file generated according to the backup firmware file into the working file directory.
4. The method of claim 1, wherein a name, a file size, and a check value of the backup firmware file are recorded in the file management list; the step of verifying whether the backup firmware file is corrupted through the file management list includes:
acquiring the actual file size of the backup firmware file;
judging whether the actual file size is consistent with the corresponding file size recorded in the file management list or not according to the name of the backup firmware file;
and if the actual file size is consistent with the corresponding file size recorded in the file management list, determining whether the backup firmware file is damaged or not according to the check value in the file management list.
5. A firmware boot arrangement for a banknote validator, said arrangement comprising:
the file acquisition unit is used for acquiring backup firmware files in a firmware backup file directory when the currency detector is started, wherein the backup firmware files are backup files of original firmware files stored in the firmware backup file directory;
the file loading unit is used for loading the corresponding mapping firmware file generated according to the backup firmware file into a working file directory;
the file operation unit is used for operating the mapping firmware file in the working file directory to start a currency detector;
the firmware boot apparatus further includes: the file checking unit is used for checking whether the backup firmware file is damaged or not through a file management list;
the second firmware package searching unit is used for deleting the damaged backup firmware files and searching firmware packages of preset versions from a preset directory of the currency detector according to a preset priority, wherein the preset directory is a firmware upgrading file directory and a factory backup file directory, the preset priority is set to be preferentially used for searching upgrading firmware packages in the firmware upgrading file directory in a traversing manner, and then original firmware packages of original versions in the factory backup file directory are searched in a traversing manner;
and the second firmware package processing unit is used for decompressing the found firmware package with the preset version to generate a corresponding backup firmware file and loading the corresponding backup firmware file into the firmware backup file directory.
6. The apparatus of claim 5, wherein the apparatus further comprises:
a file determining unit for determining whether a backup firmware file exists in the firmware backup file directory;
the first firmware package searching unit is used for searching a firmware package of a preset version from a preset directory of the currency detector according to a preset priority if the firmware backup file directory does not contain the backup firmware file;
and the first firmware package processing unit is used for decompressing the found firmware package with the preset version to generate a corresponding backup firmware file and loading the corresponding backup firmware file into the firmware backup file directory.
7. The apparatus of claim 5, wherein the file loading unit comprises:
the file generation subunit is used for generating a corresponding mapping firmware file according to the backup firmware file;
the file deleting subunit is used for deleting the original mapping firmware file in the working file directory;
and the file loading subunit is used for loading the corresponding mapping firmware file generated according to the backup firmware file into the working file directory.
8. The apparatus according to claim 5, wherein a name, a file size, and a check value of the backup firmware file are recorded in the file management list, and the file checking unit includes:
a file size obtaining subunit, configured to obtain an actual file size of the backup firmware file;
a file consistency judging subunit, configured to judge, according to the name of the backup firmware file, whether the actual file size is consistent with the corresponding file size recorded in the file management list;
and the file checking subunit is used for determining whether the backup firmware file is damaged or not according to the checking value in the file management list if the actual file size is consistent with the corresponding file size recorded in the file management list.
CN201710040811.8A 2017-01-19 2017-01-19 Firmware guiding method and device for currency detector Expired - Fee Related CN106874770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710040811.8A CN106874770B (en) 2017-01-19 2017-01-19 Firmware guiding method and device for currency detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710040811.8A CN106874770B (en) 2017-01-19 2017-01-19 Firmware guiding method and device for currency detector

Publications (2)

Publication Number Publication Date
CN106874770A CN106874770A (en) 2017-06-20
CN106874770B true CN106874770B (en) 2020-04-07

Family

ID=59157913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710040811.8A Expired - Fee Related CN106874770B (en) 2017-01-19 2017-01-19 Firmware guiding method and device for currency detector

Country Status (1)

Country Link
CN (1) CN106874770B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101228508A (en) * 2005-07-21 2008-07-23 国际商业机器公司 Methods, apparatus and program products for downloading a boot image of file from a boot file server in a secure manner
CN103425549A (en) * 2012-05-22 2013-12-04 鸿富锦精密工业(深圳)有限公司 Firmware managing method and system of embedded controller
CN106254638A (en) * 2016-07-28 2016-12-21 湖南汇网通信息技术有限公司 Intelligent terminal based on lucidification disposal starts method, system and intelligent self-service system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101228508A (en) * 2005-07-21 2008-07-23 国际商业机器公司 Methods, apparatus and program products for downloading a boot image of file from a boot file server in a secure manner
CN103425549A (en) * 2012-05-22 2013-12-04 鸿富锦精密工业(深圳)有限公司 Firmware managing method and system of embedded controller
CN106254638A (en) * 2016-07-28 2016-12-21 湖南汇网通信息技术有限公司 Intelligent terminal based on lucidification disposal starts method, system and intelligent self-service system

Also Published As

Publication number Publication date
CN106874770A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
US9286164B2 (en) Electronic device to restore MBR, method thereof, and computer-readable medium
EP2605139A2 (en) Mount-time reconciliation of data availability
CN104915226B (en) A kind of network device software starting method, apparatus and the network equipment
US10228993B2 (en) Data dump for a memory in a data processing system
CN107506221A (en) Application program updating method, apparatus and equipment
CN109086078B (en) Android system upgrading method and device, server and mobile terminal
CN110162429B (en) System repair method, server and storage medium
CN106775610A (en) A kind of electronic equipment starts method and a kind of electronic equipment
US20160162278A1 (en) System and method for applying an update to a device system via a system snapshot
US11934680B2 (en) Systems and methods for booting from NAND flash using squashfs to maximize memory
CN106815051A (en) A kind of firmware upgrade method of embedded device, device and currency examination device
CN105867962A (en) System upgrading method and device
US20150039872A1 (en) Multiple Signed Filesystem Application Packages
CN105550071A (en) System file upgrading and detecting method and communication device
CN107656765A (en) A kind of method, system and the terminal device of equipment initialization
CN112882746B (en) Application program updating method and device, storage medium and computer equipment
CN113032183A (en) System management method, device, computer equipment and storage medium
CN106874770B (en) Firmware guiding method and device for currency detector
CN112306368B (en) Method and device for expanding user data partition by EMMC (enhanced multi-media card)
CN106933604B (en) System upgrading method and device
CN106445737A (en) Multi-backup starting method
CN113190244A (en) Method and device for upgrading wireless module, computer equipment and storage medium
CN113076122A (en) Resource file management method, device, equipment and storage medium
CN112052125A (en) Dump processing method and device for operating system kernel and electronic equipment
CN114237976A (en) Data acquisition method and 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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200407

Termination date: 20220119

CF01 Termination of patent right due to non-payment of annual fee