CN107220141B - Data file checking method and device - Google Patents

Data file checking method and device Download PDF

Info

Publication number
CN107220141B
CN107220141B CN201710385030.2A CN201710385030A CN107220141B CN 107220141 B CN107220141 B CN 107220141B CN 201710385030 A CN201710385030 A CN 201710385030A CN 107220141 B CN107220141 B CN 107220141B
Authority
CN
China
Prior art keywords
data
key data
check code
key
verification
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.)
Active
Application number
CN201710385030.2A
Other languages
Chinese (zh)
Other versions
CN107220141A (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.)
Vidaa Netherlands International Holdings BV
Original Assignee
Hisense Visual 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201710385030.2A priority Critical patent/CN107220141B/en
Publication of CN107220141A publication Critical patent/CN107220141A/en
Application granted granted Critical
Publication of CN107220141B publication Critical patent/CN107220141B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1012Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using codes or arrangements adapted for a specific type of error
    • G06F11/102Error in check bits

Abstract

The invention discloses a data file checking method and device, and belongs to the technical field of data processing. The method comprises the following steps: generating a first check code of the key data based on the key data in the data file; verifying the key data according to the first check code and a second check code of the key data stored in advance; if the key data passes the verification, determining that the data file passes the verification; and if the key data check is not passed, determining that the data file check is not passed. According to the invention, the verification of the data file is realized by verifying the key data in the data file, the system-level recovery operation of the electronic equipment caused by the error of non-key data in the data file is avoided, the fault tolerance rate of the verification of the electronic equipment is improved, the computing resources consumed by the electronic equipment for generating the verification code based on the key data are less, and the efficiency of loading and verifying the data file by the electronic equipment system is improved.

Description

Data file checking method and device
Technical Field
The invention relates to the technical field of data processing, in particular to a data file checking method and device.
Background
In the use process of the electronic device, an unexpected shutdown phenomenon may occur, which may cause some data in a system of the electronic device to be not normally stored, and the electronic device may check the data file by default when starting and loading the data file next time. The data file is used for storing data required by system operation of the electronic device, some data may be data set by a user in the system operation process, and taking a television as an example, some data may be data set by the user for image quality.
In the related art, the electronic device usually performs an overall verification on the data file, that is, the entire content of the data file is verified. Specifically, the electronic device generates a new check code based on the entire data file, and compares the new check code with an original check code stored before the electronic device is accidentally turned off. If the new check code is the same as the original check code, the electronic device can determine that the data file passes the check, and further realize a corresponding service function based on the current data file, for example, a television, the service function can be an image quality display function; and if the new check code is different from the original check code, the electronic equipment can determine that the data file cannot be checked, so that factory settings are restored, and corresponding service functions are realized based on the factory settings.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
in the related art, the electronic device checks the whole data file to determine whether the data file passes the check, because the content of the whole data file is more, generating the check code based on the whole data file consumes more computing resources, the loading and checking of the data file consumes more time, and once any data of the data file is wrong, the electronic device determines that the data file fails to pass the check, and then performs corresponding recovery operation. Such a strict overall verification reduces the fault tolerance of the system operation and the efficiency with which the system loads and verifies data files.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a data file verification method and apparatus. The technical scheme is as follows:
in a first aspect, a data file verification method is provided, where the method includes:
generating a first check code of key data based on the key data in the data file;
verifying the key data according to the first verification code and a second verification code of the key data stored in advance;
if the key data passes the verification, determining that the data file passes the verification;
and if the key data check is not passed, determining that the data file check is not passed.
In a first implementation manner of the first aspect, the verifying the critical data according to the first check code and a second check code of the critical data stored in advance includes:
comparing the first check code with the second check code;
if the first check code is the same as the second check code, determining that the key data passes the check;
and if the first check code is not the same as the second check code, determining that the key data check is not passed.
In a second implementation form of the first aspect, the method further includes:
when the key data needs to be used, executing the steps of generating the first check code of the key data and checking the key data;
and if the key data passes the verification, determining to use the key data.
In a third implementation manner of the first aspect, before generating the first check code of the critical data based on the critical data in the data file, the method further includes:
and generating a second check code of the key data according to a specified algorithm and the key data, and storing the second check code to a specified position.
In a fourth implementation manner of the first aspect, the storing the second check code to a specified location includes:
storing the second check code into the data file based on the starting position of the key data; or the like, or, alternatively,
and storing the second check code into other local files except the data file.
In a fifth implementation manner of the first aspect, after storing the second check code to a specified location, the method further includes:
when a modification instruction for the key data is received, modifying the key data, and generating a third check code of the key data based on the modified data;
updating the second check code stored at the specified location to the third check code.
In a sixth implementation manner of the first aspect, the critical data and the non-critical data in the data file are divided according to the size of the influence on the operating state of the electronic device.
In a seventh implementation manner of the first aspect, the key data in the data file includes image quality data, frequency point data, satellite data, and channel data, and the non-key data in the data file includes volume setting data and personality application setting data.
In a second aspect, there is provided a data file checking apparatus, the apparatus including:
the generating module is used for generating a first check code of the key data based on the key data in the data file;
the verification module is used for verifying the key data according to the first verification code and a second verification code of the key data stored in advance;
the determining module is used for determining that the data file passes the verification if the key data passes the verification;
the determining module is further configured to determine that the data file fails to check if the key data fails to check.
In a first implementation manner of the second aspect, the check module is configured to compare the first check code with the second check code; if the first check code is the same as the second check code, determining that the key data passes the check; and if the first check code is not the same as the second check code, determining that the key data check is not passed.
In a second implementation manner of the second aspect, the apparatus further includes an execution module:
the execution module is configured to execute the steps of generating the first check code of the critical data and checking the critical data when the critical data needs to be used;
the determining module is further configured to determine to use the critical data if the critical data passes verification.
In a third implementation manner of the second aspect, the apparatus further includes a storage module:
the generating module is further used for generating a second check code of the key data according to a specified algorithm and the key data;
the storage module is used for storing the second check code to a specified position.
In a fourth implementation manner of the second aspect, the storage module is configured to store the second check code into the data file based on a start position of the critical data; or the like, or, alternatively,
the storage module is used for storing the second check code to other local files except the data file.
In a fifth implementation manner of the second aspect, the apparatus further includes a modification module and an update module:
the modification module is used for modifying the key data when receiving a modification instruction of the key data;
the generating module is further configured to generate a third check code of the key data based on the modified data;
the updating module is configured to update the second check code stored at the designated location to the third check code.
In a sixth implementation manner of the second aspect, the critical data and the non-critical data in the data file are divided according to the size of the influence on the operating state of the electronic device.
In a seventh implementation manner of the second aspect, the key data in the data file includes image quality data, frequency point data, satellite data, and channel data, and the non-key data in the data file includes volume setting data and personalized application setting data.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the process of verifying the data file, a first verification code is generated according to key data in the data file, verification is carried out on a second verification code corresponding to the key data, and when the verification is passed, the data file is determined to be successfully verified. The key data are data which have great influence on the running state of the electronic equipment, so that the normal running of the electronic equipment can be ensured by ensuring the successful verification of the key data, namely the data file can be considered to be successfully verified, meanwhile, the verification of non-key data is not needed, the system-level recovery operation of the electronic equipment caused by the error of the non-key data in the data file is avoided, and the fault tolerance rate of the verification of the electronic equipment is improved; in addition, compared with the prior art that the check code is generated based on all contents of the data file, the electronic equipment consumes less computing resources for generating the check code based on the key data, the time consumed for loading and checking the data file is shorter, and the efficiency of loading and checking the data file by the electronic equipment system is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a data file verification method according to an embodiment of the present invention;
fig. 2 is a flowchart of a data file verification method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data file provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data file verification apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data file verifying apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data file verifying apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data file verification apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device 800 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of a data file verification method according to an embodiment of the present invention. Referring to fig. 1, the method includes:
101. and generating a first check code of the key data based on the key data in the data file.
102. And verifying the key data according to the first check code and a second check code of the key data stored in advance.
103. And if the key data passes the verification, determining that the data file passes the verification, and if the key data does not pass the verification, determining that the data file does not pass the verification.
According to the method provided by the embodiment of the invention, in the process of verifying the data file, the first verification code is generated according to the key data in the data file, the verification is carried out on the first verification code corresponding to the key data, and the data file is determined to be successfully verified when the verification is passed. The key data are data which have great influence on the running state of the electronic equipment, so that the normal running of the electronic equipment can be ensured by ensuring the successful verification of the key data, namely the data file can be considered to be successfully verified, meanwhile, the verification of non-key data is not needed, the system-level recovery operation of the electronic equipment caused by the error of the non-key data in the data file is avoided, and the fault tolerance rate of the verification of the electronic equipment is improved; in addition, compared with the prior art that the check code is generated based on all contents of the data file, the electronic equipment consumes less computing resources for generating the check code based on the key data, the time consumed for loading and checking the data file is shorter, and the efficiency of loading and checking the data file by the electronic equipment system is improved.
Optionally, the verifying the key data according to the first check code and a second check code of the key data stored in advance includes:
comparing the first check code with the second check code;
if the first check code is the same as the second check code, determining that the key data passes the check;
and if the first check code is not the same as the second check code, determining that the key data check is not passed.
Optionally, the method further comprises:
when the key data needs to be used, executing the steps of generating the first check code of the key data and checking the key data;
if the critical data check passes, it is determined to use the critical data.
Optionally, before generating the first check code of the key data based on the key data in the data file, the method further includes:
and generating a second check code of the key data according to a specified algorithm and the key data, and storing the second check code to a specified position.
Optionally, the storing the second check code to the specified location comprises:
storing the second check code into the data file based on the starting position of the key data; or the like, or, alternatively,
and storing the second check code into other local files except the data file.
Optionally, after storing the second check code to the specified location, the method further includes:
when a modification instruction for the key data is received, modifying the key data, and generating a third check code of the key data based on the modified data;
and updating the second check code stored at the specified position into the third check code.
Optionally, the critical data and the non-critical data in the data file are divided according to the influence on the operating state of the electronic device.
Optionally, the key data in the data file includes image quality data, frequency point data, satellite data, and channel data, and the non-key data in the data file includes volume setting data and personality application setting data.
All the above-mentioned optional technical solutions can be combined arbitrarily to form the optional embodiments of the present invention, and are not described herein again.
Fig. 2 is a flowchart of a data file verification method according to an embodiment of the present invention. The method is performed by an electronic device, see fig. 2, the method comprising:
201. when the key data in the data file needs to be used, a first check code of the key data is generated based on the key data in the data file.
The data file is a file for storing data required by the operation of the electronic equipment system. The data in the data file may include key data and non-key data, where the key data and the non-key data may be divided according to the size of the influence on the operating state of the electronic device, and specifically, the data that has a large influence on the operating state of the electronic device may be divided into key data, and the data that has a small influence on the operating state of the electronic device may be divided into non-key data, where the size of the influence on the operating state of the electronic device by the data may be judged based on a preset standard, for example, the key data may include image quality data, frequency point data, satellite data, and channel data, and the non-key data may include volume setting data and personality application setting data (such as source list (source list) aliases and favorite channel aliases in the television).
Referring to fig. 3, fig. 3 is a schematic diagram of a data file according to an embodiment of the present invention, key data (including key data 1 and key data 2) and non-key data (including non-key data 1, non-key data 2, and non-key data 3) in the data file may be arranged in sequence, each of the key data or the non-key data may include a plurality of data items, for example, non-key data 1 may include 5 volume setting data items, key data 1 may include 1 picture quality data item and 1 channel data item, or key data 1 may include 10 picture quality data items. Of course, each key data may also include one data item, for example, the key data 1 may include 1 image quality data item, and the non-key data 1 may include 1 volume setting data item, which is not limited in the embodiment of the present invention. The different types of key data may have different data formats, for example, the channel data may adopt a data format in the form of a list; the frequency point data and the satellite data can adopt an ini configuration file (such as an initialization file); the image quality data may be in an ini profile manner or a list manner as required by the storage condition, which is not limited in the embodiment of the present invention.
The electronic device may change the data in the data file according to a setting operation of a user during operation, for example, when an operation of increasing the image quality by the user is detected, the electronic device may increase the image quality data in the data file from the first image quality to the second image quality or from a plurality of image qualities to the third image quality; when an operation of turning up the volume by the user is detected, the electronic device may turn up the numerical value of the volume setting data in the data file accordingly.
In the embodiment of the invention, the electronic equipment needs to use the key data in the data file when realizing the service function, taking the key data as the image quality data as an example, and the electronic equipment needs to read the image quality data in the data file when playing the video so as to realize the image quality presenting function. When the key data in the data file is needed to realize the corresponding service function, the electronic device can check the data file to ensure that the content of the data file is correct, so that the situation that the service function cannot be realized due to the fact that the electronic device loads the wrong data file is avoided. Considering that the non-critical data in the data file has little influence on the operating state of the electronic device, the electronic device may only verify the critical data in the data file, and the verification process includes steps 201 to 203.
In this step 201, the electronic device may generate a first check code of the key data according to a specified algorithm and the key data in the data file. The specified algorithm may be a CRC (Cyclic Redundancy Check) 32 algorithm, the first Check code may be a Check code of the key data 1 and a Check code of the key data 2 in fig. 3, for example, the electronic device may calculate a verification code of the key data 1 according to the specified algorithm based on at least one data item included in the key data 1.
The embodiment of the present invention is described by taking an example that the electronic device executes the step 201 when the electronic device needs to use the key data, and actually, the electronic device may execute the step 201 at different times. For example, the electronic device may execute the step 201 after the abnormal shutdown and restart to perform subsequent services, for example, when a user watches a television at home, a sudden power failure phenomenon (such as an unexpected power failure in the home) occurs, which causes some data in the television system not to be normally stored, and the television may default to check the data file in the next system startup and data loading process, that is, execute the step 201 and the subsequent steps 202 and 203. Of course, the electronic device may also perform the step 201 periodically to ensure that the subsequent service is performed successfully. The embodiment of the present invention does not limit the specific time when the electronic device executes the step 201.
202. And verifying the key data according to the first check code and a second check code of the pre-stored key data.
Under normal conditions, each time the electronic device generates the check code based on the key data in the current data file, the check code and the key data are correspondingly stored in real time, even if the key data are subsequently modified, a new check code is generated based on the modified key data, and the new check code and the modified key data are correspondingly stored, namely, the check code stored last time is updated to the check code generated this time, so that the matching between the current key data and the check code is ensured. If an abnormal condition occurs during the operation of the electronic device, for example, the electronic device does not completely store the modified key data after modifying the key data, or the electronic device is unexpectedly shut down when the electronic device does not store the new check code after performing a series of operations such as modifying the key data, storing the modified key data, generating a new check code based on the modified key data, and the like, the key data in the data file is part of the modified key data, but the check code is generated based on the key data before modification, and in this case, the check code is not matched with the key data in the data, that is, the content of the data file has an error. Therefore, the electronic device may determine whether the verification passes by judging whether the corresponding stored key data and the verification code are matched, specifically, the electronic device may generate a first verification code based on the current key data, compare the first verification code with a second verification code stored in advance, and determine whether the verification of the key data passes according to a comparison result.
Accordingly, in this embodiment of the present invention, the step 202 may include: the electronic equipment compares the first check code with the second check code; if the first check code is the same as the second check code, the electronic device can determine that the key data passes the check; if the first check code is not the same as the second check code, the electronic device may determine that the critical data check fails.
The second check code is a check code of key data which is stored before the electronic equipment generates the first check code. For example, before the electronic device generates the first check code of the critical data, the electronic device may generate a second check code of the critical data according to the specified algorithm and the critical data, and store the second check code to the specified location. The electronic device may store the second check code in the data file based on the start position of the key data, for example, the position of the check code of the key data in the data file in fig. 3 is immediately adjacent to the start position of the key data, in this case, in order to facilitate the electronic device to correctly identify the corresponding relationship between the key data and the check code, a key data start symbol and an end symbol may be added at the beginning and the end of the key data, respectively, for example, the start symbol is added at the start position of the key data 1, and the end symbol is added at the end position of the key data 1. Of course, the electronic device may also store the second check code in a file other than the data file locally, in this case, in order to facilitate the confirmation of the key data corresponding to the check code, the electronic device may store the second check code and the key data in the other file correspondingly, for example, the electronic device may store the check code of the key data 1 and the key data 1 in the other file correspondingly. Considering that a user may perform corresponding setting operation on the electronic device in the operation process of the electronic device, which may involve a case of modifying data, for the case, after the electronic device stores the second check code to a specified position, if a modification instruction for the key data is received, the key data may be modified, and a third check code for the key data is generated based on the modified data; and updating the second check code stored at the specified position into the third check code. The electronic equipment can generate a new check code based on the data modified each time, so that the check passing rate is improved, the data file check failure caused by the modification of the key data in the data file can be avoided, and further, the recovery operation caused by the check failure caused by the reasons is not needed.
The method comprises the steps of comparing a first check code generated by the electronic equipment based on current key data with a second check code stored before the electronic equipment generates the first check code, namely comparing check codes generated by the electronic equipment based on key data at different moments, judging whether the two check codes are the same, and determining whether the key data passes the check based on the judgment result, so that the electronic equipment can avoid the condition that the data file fails to check due to the fact that the key data in the data file is modified.
203. And if the key data passes the verification, determining that the data file passes the verification, and further using the key data in the data file.
In the embodiment of the invention, the electronic equipment can determine that the data file passes the verification through the verification of the key data, and if the electronic equipment determines that the data file passes the verification, the electronic equipment can determine to use the key data in the data file and realize the corresponding service function based on the key data in the current data file, for example, realize the image quality presentation function based on the image quality data in the data file. The verification of the data file is realized by verifying the key data in the data file instead of integrally verifying all contents of the data file, so that even if the non-key data in the data file is in error, the data file is verified to be passed as long as the key data is verified to be passed, and system-level recovery operation (such as factory setting recovery) is not required, and the fault tolerance rate of the verification of the electronic equipment is greatly improved.
204. And if the key data are not verified, determining that the data file is not verified, and further performing recovery operation.
In the embodiment of the invention, the electronic equipment can determine that the data file cannot be verified through key data verification, and if the electronic equipment determines that the data file cannot be verified, the electronic equipment can restore factory settings and realize corresponding service functions based on the factory settings.
According to the method provided by the embodiment of the invention, in the process of verifying the data file, the first verification code is generated according to the key data in the data file, the verification is carried out on the first verification code corresponding to the key data, and the data file is determined to be successfully verified when the verification is passed. The key data are data which have great influence on the running state of the electronic equipment, so that the normal running of the electronic equipment can be ensured by ensuring the successful verification of the key data, namely the data file can be considered to be successfully verified, meanwhile, the verification of non-key data is not needed, the system-level recovery operation of the electronic equipment caused by the error of the non-key data in the data file is avoided, and the fault tolerance rate of the verification of the electronic equipment is improved; in addition, compared with the prior art that the check code is generated based on all contents of the data file, the electronic equipment consumes less computing resources for generating the check code based on the key data, the time consumed for loading and checking the data file is shorter, and the efficiency of loading and checking the data file by the electronic equipment system is improved.
Fig. 4 is a schematic structural diagram of a data file verification apparatus according to an embodiment of the present invention. Referring to fig. 4, the apparatus includes:
a generating module 401, configured to generate a first check code of key data based on the key data in the data file;
a verification module 402, configured to verify the critical data according to the first verification code and a second verification code of the critical data that is stored in advance;
a determining module 403, configured to determine that the data file is verified if the key data is verified;
the determining module 403 is further configured to determine that the data file fails to check if the key data fails to check.
Optionally, the checking module 402 is configured to compare the first check code with the second check code; if the first check code is the same as the second check code, determining that the key data passes the check; and if the first check code is not the same as the second check code, determining that the key data check is not passed.
Optionally, referring to fig. 5, the apparatus further includes an executing module 404:
the executing module 404 is configured to execute the steps of generating the first check code of the critical data and checking the critical data when the critical data needs to be used;
the determining module 403 is further configured to determine to use the critical data if the critical data passes the verification.
Optionally, referring to fig. 6, the apparatus further comprises a storage module 405:
the generating module 401 is further configured to generate a second check code of the key data according to a specified algorithm and the key data;
the storage module 405 is configured to store the second check code to a specified location.
Optionally, the storing module 405 is configured to store the second check code into the data file based on the start position of the key data; or the like, or, alternatively,
the storage module 405 is configured to store the second check code in a file other than the data file.
Optionally, referring to fig. 7, the apparatus further includes a modification module 406 and an update module 407:
the modifying module 406 is configured to modify the critical data when a modification instruction for the critical data is received;
the generating module 401 is further configured to generate a third check code of the key data based on the modified data;
the updating module 407 is configured to update the second check code stored at the designated location to the third check code.
Optionally, the critical data and the non-critical data in the data file are divided according to the influence on the operating state of the electronic device.
Optionally, the key data in the data file includes image quality data, frequency point data, satellite data, and channel data, and the non-key data in the data file includes volume setting data and personality application setting data.
In the embodiment of the invention, in the process of verifying the data file, a first verification code is generated according to the key data in the data file, verification is carried out on a second verification code corresponding to the key data, and the data file is determined to be successfully verified when the verification is passed. The key data are data which have great influence on the running state of the electronic equipment, so that the normal running of the electronic equipment can be ensured by ensuring the successful verification of the key data, namely the data file can be considered to be successfully verified, meanwhile, the verification of non-key data is not needed, the system-level recovery operation of the electronic equipment caused by the error of the non-key data in the data file is avoided, and the fault tolerance rate of the verification of the electronic equipment is improved; in addition, compared with the prior art that the check code is generated based on all contents of the data file, the electronic equipment consumes less computing resources for generating the check code based on the key data, the time consumed for loading and checking the data file is shorter, and the efficiency of loading and checking the data file by the electronic equipment system is improved.
It should be noted that: the data file verifying apparatus provided in the foregoing embodiment is only illustrated by the division of the functional modules in the data file verification, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the data file verification apparatus and the data file verification method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
An embodiment of the present invention provides an electronic device 800, where the electronic device 800 may be configured to execute the data file verification method provided in each of the above embodiments. Referring to fig. 8, the electronic apparatus 800 includes a Central Processing Unit (CPU)801, a system memory 804 of a Random Access Memory (RAM)802 and a Read Only Memory (ROM)803, and a system bus 805 connecting the system memory 804 and the central processing unit 801. The electronic device 800 also includes a basic input/output system (I/O system) 806, which facilitates transfer of information between various devices within the computer, and a mass storage device 807 for storing an operating system 813, application programs 814, and other program modules 815.
The basic input/output system 806 includes a display 808 for displaying information and an input device 809 such as a mouse, keyboard, etc. for user input of information. Wherein the display 808 and the input device 809 are connected to the central processing unit 801 through an input output controller 810 connected to the system bus 805. The basic input/output system 806 may also include an input/output controller 810 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input-output controller 810 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 807 is connected to the central processing unit 801 through a mass storage controller (not shown) connected to the system bus 805. The mass storage device 807 and its associated computer-readable media provide non-volatile storage for the electronic device 800. That is, the mass storage device 807 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 804 and mass storage 807 described above may be collectively referred to as memory.
The electronic device 800 may also operate as a remote computer connected to a network via a network, such as the internet, in accordance with various embodiments of the present invention. That is, the electronic device 800 may be connected to the network 812 through the network interface unit 811 coupled to the system bus 805, or may be connected to another type of network or a remote computer system (not shown) using the network interface unit 811.
The memory also includes one or more programs stored in the memory and configured to be executed by one or more processors. The one or more programs include instructions for performing the data file verification method. The instruction is loaded and executed by a processor in the electronic equipment, so that the functions of each module in the data file checking device are realized.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method for verifying a data file, the method comprising:
dividing key data and non-key data in the data file according to the influence on the running state of the electronic equipment, adding a start symbol at the starting position of the key data, and adding an end symbol at the ending position of the key data;
generating a first check code of the key data based on the key data in the data file;
verifying the key data according to the first check code and a second check code of the key data stored in advance, wherein the second check code is stored in advance at the starting position of the key data with the start symbol attached;
if the key data passes the verification, determining that the data file passes the verification;
if the key data is not verified, determining that the data file is not verified;
the non-critical data does not need to be verified, and when the verification of the critical data is passed, the electronic equipment normally operates; when the electronic equipment is a television, the key data comprises image quality data, frequency point data, satellite data and channel data, and the non-key data comprises volume setting data and individual application setting data.
2. The method of claim 1, wherein the verifying the critical data according to the first check code and a second check code of the pre-stored critical data comprises:
comparing the first check code with the second check code;
if the first check code is the same as the second check code, determining that the key data passes the check;
and if the first check code is not the same as the second check code, determining that the key data check is not passed.
3. The method of claim 1, wherein before generating the first check code of the key data based on the key data in the data file, the method further comprises:
and generating a second check code of the key data according to a specified algorithm and the key data, and storing the second check code to a specified position.
4. The method of claim 3, wherein after storing the second parity code to the specified location, the method further comprises:
when a modification instruction for the key data is received, modifying the key data, and generating a third check code of the key data based on the modified data;
updating the second check code stored at the specified location to the third check code.
5. An apparatus for verifying a data file, the apparatus comprising:
the dividing module is used for dividing the key data and the non-key data in the data file according to the influence on the running state of the electronic equipment, adding a start symbol to the start position of the key data, and adding an end symbol to the end position of the key data;
the generating module is used for generating a first check code of the key data based on the key data in the data file;
a verification module, configured to verify the critical data according to the first verification code and a second verification code of the critical data stored in advance, where the second verification code is stored in advance at the start position of the critical data to which the start symbol is appended;
the determining module is used for determining that the data file passes the verification if the key data passes the verification;
the determining module is further configured to determine that the data file fails to be verified if the key data fails to be verified;
the non-critical data does not need to be verified, and when the verification of the critical data is passed, the electronic equipment normally operates; when the electronic equipment is a television, the key data comprises image quality data, frequency point data, satellite data and channel data, and the non-key data comprises volume setting data and individual application setting data.
6. The apparatus of claim 5, wherein the check module is configured to compare the first check code with the second check code; if the first check code is the same as the second check code, determining that the key data passes the check; and if the first check code is not the same as the second check code, determining that the key data check is not passed.
7. The apparatus of claim 5, further comprising a storage module to:
the generating module is further used for generating a second check code of the key data according to a specified algorithm and the key data;
the storage module is used for storing the second check code to a specified position.
8. The apparatus of claim 7, further comprising a modification module and an update module:
the modification module is used for modifying the key data when receiving a modification instruction of the key data;
the generating module is further configured to generate a third check code of the key data based on the modified data;
the updating module is configured to update the second check code stored at the designated location to the third check code.
CN201710385030.2A 2017-05-26 2017-05-26 Data file checking method and device Active CN107220141B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710385030.2A CN107220141B (en) 2017-05-26 2017-05-26 Data file checking method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710385030.2A CN107220141B (en) 2017-05-26 2017-05-26 Data file checking method and device

Publications (2)

Publication Number Publication Date
CN107220141A CN107220141A (en) 2017-09-29
CN107220141B true CN107220141B (en) 2021-06-22

Family

ID=59946859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710385030.2A Active CN107220141B (en) 2017-05-26 2017-05-26 Data file checking method and device

Country Status (1)

Country Link
CN (1) CN107220141B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108196975B (en) * 2017-11-21 2021-09-17 深信服科技股份有限公司 Data verification method and device based on multiple checksums and storage medium
CN108766351A (en) * 2018-07-25 2018-11-06 昆山国显光电有限公司 Display panel and offset data transfer check method
CN108962141A (en) * 2018-07-25 2018-12-07 昆山国显光电有限公司 Display panel and offset data transfer check method
CN111274311A (en) * 2018-12-05 2020-06-12 聚好看科技股份有限公司 Data synchronization method and device for cross-machine-room database
CN109889325B (en) * 2019-01-21 2023-06-02 Oppo广东移动通信有限公司 Verification method, verification device, electronic equipment and medium
CN110175010A (en) * 2019-05-05 2019-08-27 深圳市华星光电技术有限公司 The configuration method and image processing apparatus of image processing apparatus
CN111178794A (en) * 2019-12-18 2020-05-19 惠州市德赛西威汽车电子股份有限公司 Method for checking bill of material information
CN113065168B (en) * 2021-04-08 2023-09-19 天地伟业技术有限公司 Method, device and storage medium for storing and checking authenticity of video data
CN113343624A (en) * 2021-06-28 2021-09-03 中国电子科技集团公司第五十八研究所 Analog circuit based on EEPROM and encryption method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101482887B (en) * 2009-02-18 2013-01-09 北京数码视讯科技股份有限公司 Anti-tamper verification method for key data in database
CN102917056B (en) * 2012-10-19 2015-08-05 山东中磁视讯股份有限公司 A kind of mobile learning system and using method
CN105512564B (en) * 2014-10-15 2019-01-25 阿里巴巴集团控股有限公司 A kind of anti-tamper verification method of data and device
CN104504347A (en) * 2015-01-20 2015-04-08 网易宝有限公司 Data consistency matching processing method and device

Also Published As

Publication number Publication date
CN107220141A (en) 2017-09-29

Similar Documents

Publication Publication Date Title
CN107220141B (en) Data file checking method and device
CN110716895B (en) Target data archiving method, device, computer equipment and medium
CN105138347A (en) Difference upgrade patch generating method, software upgrading method and corresponding apparatus
US20190079746A1 (en) Software updating methods and systems
US20130138934A1 (en) Loading configuration information
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN112817625A (en) System upgrading method and device, electronic equipment and storage medium
CN108737153B (en) Block chain disaster recovery system, method, server and computer-readable storage medium
WO2021169124A1 (en) Method and apparatus for installing software package to target host, and computer device
CN108322540A (en) Customized data lead-in method, terminal and computer readable storage medium
AU2021204593A1 (en) Methods and apparatuses for installing device application
US8719622B2 (en) Recording and preventing crash in an appliance
US11354107B2 (en) Communicating a data image for installing an operating system
WO2021243342A1 (en) Action recommendation for application failure
CN107077342B (en) Firmware module operation authority
CN111399888B (en) Audio processing chip processing method and device and electronic equipment
US11386153B1 (en) Flexible tagging and searching system
CN111090537A (en) Cluster starting method and device, electronic equipment and readable storage medium
CN106484442B (en) Server system and method for updating startup mapping file
CN112379973B (en) Heavy load method and device
CN115964721A (en) Program verification method and electronic equipment
CN115827069A (en) Starting control method, system and device for server mainboard
CN116610336A (en) Firmware upgrading method, system, device and readable storage medium
US11429537B2 (en) Method, device, and computer program product for managing storage system
US11748482B2 (en) Information processing apparatus, and information processing method

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

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Video Technology Co.,Ltd.

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant before: QINGDAO HISENSE ELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221013

Address after: 83 Intekte Street, Devon, Netherlands

Patentee after: VIDAA (Netherlands) International Holdings Ltd.

Address before: 266555, No. 218, Bay Road, Qingdao economic and Technological Development Zone, Shandong

Patentee before: Hisense Video Technology Co.,Ltd.