CN115203697A - File detection method, device and equipment and readable storage medium - Google Patents

File detection method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN115203697A
CN115203697A CN202210878595.5A CN202210878595A CN115203697A CN 115203697 A CN115203697 A CN 115203697A CN 202210878595 A CN202210878595 A CN 202210878595A CN 115203697 A CN115203697 A CN 115203697A
Authority
CN
China
Prior art keywords
file
random number
identifier
program
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210878595.5A
Other languages
Chinese (zh)
Inventor
雷少波
燕伯峰
肖斌
白玉洁
樊浩研
宋俊亮
张洁羽
钱丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Electric Power Marketing Services And Operation Management Branch Of Inner Mongolia Power Group Co ltd
Original Assignee
Electric Power Marketing Services And Operation Management Branch Of Inner Mongolia Power Group 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 Electric Power Marketing Services And Operation Management Branch Of Inner Mongolia Power Group Co ltd filed Critical Electric Power Marketing Services And Operation Management Branch Of Inner Mongolia Power Group Co ltd
Priority to CN202210878595.5A priority Critical patent/CN115203697A/en
Publication of CN115203697A publication Critical patent/CN115203697A/en
Pending legal-status Critical Current

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/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection
    • G06F21/565Static detection by checking file integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application discloses a file detection method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring a random number with a time stamp; combining the random number and the filing program file to obtain a reference file; generating a reference identifier of a reference file by using a target algorithm; sending the random number to a terminal with a program file; receiving a real-time identifier fed back by a terminal; the real-time identification is an identification for generating a combined file by using a target algorithm, and the combined file is a file obtained by combining a random number and a program file; and comparing the reference identifier with the real-time identifier to obtain a record detection result of the program file. According to the application, the reference mark and the real-time mark are compared, and then the filing detection result of the query file can be obtained. That is, it is determined whether the program file matches the docket program file.

Description

File detection method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a file detection method, apparatus, device, and readable storage medium.
Background
With the continuous development of network technology, the electricity utilization information acquisition system is also continuously advanced. In the electricity consumption information acquisition system, various devices/terminals are continuously increased in functions in the operation process, so that products supplied for goods in early stage are continuously upgraded, and the program versions of field devices are various; the manufacturer modifies the software program of the device privately; the program version of the supply-time sample is inconsistent with that of the arrival-time sample, and the like.
That is to say, in the current electricity consumption information acquisition system, software/programs in the terminal have the situation inconsistent with the records, and the situation inconsistent with the records often accompanies with the function loss, influences the data acquisition, is not favorable for the terminal management, and the like.
In summary, how to effectively solve the problems of the program and the like in the power consumption information acquisition system terminal is a technical problem which needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The application aims to provide a file detection method, a file detection device, file detection equipment and a readable storage medium, whether a program in a terminal is a corresponding recorded program can be effectively detected, and stable operation of an electricity information acquisition system can be effectively guaranteed.
In order to solve the technical problem, the application provides the following technical scheme:
a file detection method, comprising:
acquiring a random number with a time stamp;
combining the random number and the filing program file to obtain a reference file;
generating a reference identifier of the reference file by using a target algorithm;
sending the random number to a terminal with a program file;
receiving a real-time identifier fed back by the terminal; the real-time identifier is an identifier for generating a merged file by using the target algorithm, and the merged file is a file obtained by merging the random number and the program file;
and comparing the reference identifier with the real-time identifier to obtain a record detection result of the program file.
Preferably, the generating, by using a target algorithm, a reference identifier of the reference file includes:
and generating the reference identification of the reference file by using a message digest algorithm.
Preferably, before the acquiring the random number with the time stamp, the method further includes:
acquiring a reference version number of the recorded program file and an actual version number of the program file;
judging whether the reference version number is the same as the actual version number;
if not, determining that the program file is inconsistent with the recorded program file;
if so, the step of obtaining a random number with a time stamp is performed.
Preferably, the step of combining the random number and the docket file to obtain a reference file comprises:
merging each random number and the corresponding filing program file according to file number information to obtain each reference file;
correspondingly, comparing the reference identifier with the real-time identifier to obtain a filing detection result of the program file, including:
and if the reference identifier corresponding to the same file number is consistent with the real-time identifier, determining that the program file corresponding to the file number passes the record detection.
Preferably, the step of combining the random number and the docket file to obtain a reference file includes:
and writing the random number into a designated position in the filing program file to obtain the reference file.
Preferably, the merging the random number and the docket file to obtain a reference file includes:
merging the random number and the recorded program files corresponding to the versions to obtain reference files of the versions;
correspondingly, comparing the reference identifier with the real-time identifier to obtain a filing detection result of the program file, including:
finding out a target reference identifier consistent with the real-time identifier from the reference identifiers;
and determining the record detection corresponding to the program file through the target reference identifier.
Preferably, the method further comprises the following steps:
judging whether the target reference mark corresponds to the latest version;
and if not, determining that the terminal fails to be upgraded.
A document sensing device comprising:
the random number acquisition module is used for acquiring a random number with a time stamp;
the file merging module is used for merging the random number and the filing program file to obtain a reference file;
the identification generation module is used for generating a reference identification of the reference file by using a target algorithm;
the communication module is used for sending the random number to a terminal with a program file; receiving a real-time identifier fed back by the terminal; the real-time identifier is an identifier for generating a merged file by using the target algorithm, and the merged file is a file obtained by merging the random number and the program file;
and the detection module is used for comparing the reference identifier with the real-time identifier to obtain a record detection result of the program file.
An electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the file detection method when executing the computer program.
A readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned file detection method.
By applying the method provided by the embodiment of the application, the random number with the time stamp is obtained; combining the random number and the filing program file to obtain a reference file; generating a reference identifier of a reference file by using a target algorithm; sending the random number to a terminal with a program file; receiving a real-time identifier fed back by a terminal; the real-time identification is an identification for generating a combined file by using a target algorithm, and the combined file is a file obtained by combining a random number and a program file; and comparing the reference identifier with the real-time identifier to obtain a record detection result of the program file.
By adopting the random number with the time stamp, the uniqueness of the random number can be ensured, and the random number collision can be avoided. And obtaining a reference file of the docketing program based on the random number, thereby obtaining a reference identifier based on the reference file. And correspondingly, sending the random number to a terminal corresponding to the program file. The terminal obtains a real-time identifier in the same way. Because the random number is unique and the algorithm for calculating the identification is the same, when the two files are completely consistent, the corresponding identifications are also the same. Therefore, the reference mark and the real-time mark are compared, and the filing detection result of the query file can be obtained. That is, it is determined whether the program file matches the docket program file.
Accordingly, embodiments of the present application further provide a file detection apparatus, a device, and a readable storage medium corresponding to the file detection method, which have the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or related technologies of the present application, the drawings needed to be used in the description of the embodiments or related technologies are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart illustrating an implementation of a document detection method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an embodiment of a file detection method;
FIG. 3 is a schematic diagram of an embodiment of a file detection method;
FIG. 4 is a schematic structural diagram of a document detecting apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description is given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all 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 application.
Referring to fig. 1, fig. 1 is a flowchart of a document detection method in an embodiment of the present application, where the method may be applied to a detection device (steps of the method may be implemented in detection software), and the method includes the following steps:
s101, acquiring a random number with a time stamp.
The random number may be generated by using a random function. It should be noted that, in the present application, the nonce index contains a timestamp, so that random number collision can be effectively avoided, i.e. uniqueness of the random number is guaranteed.
And S102, combining the random number and the filing program file to obtain a reference file.
Wherein, the recorded program file is a pre-recorded program file.
The random time number and the filing program file are combined to obtain a unique reference file.
That is, even if the same reference program file is used, the reference file is different depending on the random number. The conditions that corresponding record detection data is prepared in advance and the like can be effectively avoided.
Specifically, the random number and the docket file are combined, and only the random number may be added before or after the docket file. Preferably, in order to improve the security, a random number may be written in a designated position in the docket file to obtain the reference file. The designated position may be a predetermined position or a position randomly determined in the real-time detection process, and certainly, the designated position needs to inform the terminal needing to be detected, so that both sides write the random number in the same designated position.
In a specific embodiment of the present application, the filing detection may be performed on a plurality of program files in the same terminal. Combining the random numbers and the filing program files to obtain reference files, specifically combining the random numbers and the corresponding filing program files according to file number information to obtain the reference files; correspondingly, the reference identifier and the real-time identifier are compared in the above steps to obtain a filing detection result of the program file, and it may be specifically determined that the program file corresponding to the file number passes the filing detection if the reference identifier corresponding to the same file number is consistent with the real-time identifier. That is to say, when a plurality of program files exist in the same terminal and need to be subjected to filing detection, the program files can be numbered in advance, and thus, when the random number is combined with the filed program file, the random number and the filed program file are correspondingly combined according to the file number information, and a corresponding reference file can be obtained. For example, there are 5 program files numbered 01,02,03,04, and 05 in sequence, the five program files may correspond to one random number at the same time, or may correspond to different random numbers, and when corresponding to the same random number, the same random number is merged with the recorded program files corresponding to the five program files, respectively, to obtain 5 reference files; when the random numbers correspond to different random numbers, 5 random numbers are sequentially allocated to the recorded program files corresponding to the 5 program files respectively according to the file number information to be merged to obtain 5 reference files, and correspondingly, for the program files in the terminal, the operation of the program files is consistent with the operation in the detection equipment.
And S103, generating a reference identifier of the reference file by using a target algorithm.
The target algorithm may be any algorithm capable of generating an identifier of a file, such as a hash algorithm.
Specifically, in a specific embodiment of the present application, the step S103 may specifically be to generate the reference identifier of the reference file by using a message digest algorithm. For example, MD5 (Message Digest Algorithm, fifth edition) may be used to calculate the reference identifier, i.e. the reference identifier is an MD5 value.
And S104, sending the random number to a terminal with a program file.
The terminal can be specifically a device for collecting the electric quantity information of the electric meter, such as an electric power collection terminal/a metering automatic collection terminal. The program file may be specifically a power consumption information acquisition program.
Specifically, the random number may be transmitted to the terminal by communicating with the terminal in a wired or wireless communication manner.
And S105, receiving the real-time identification fed back by the terminal.
The real-time identification is an identification for generating a combined file by using a target algorithm, and the combined file is a file obtained by combining a random number and a program file.
After receiving the random number, the terminal may generate a real-time representation corresponding to the program file based on the random number in a manner of generating the reference identifier. That is, for the terminal, after receiving the random number, the following steps are performed:
step one, combining a received random number with a program file to obtain a combined file;
generating an identifier of the merged file by using a target algorithm;
and step three, sending the identifier generated in the step two to the detection equipment.
And S106, comparing the reference identifier with the real-time identifier to obtain a record detection result of the program file.
The filing program file is the filing file of the program file, and the reference mark corresponds to the filing program file, the real-time mark corresponds to the program file in the terminal, and the generation process of the mark is completely consistent, and in addition, a unique random number participates, so that under the normal condition, when the reference mark is consistent with the real-time mark, the program file in the terminal can be determined to be consistent with the filing program file, namely, the filing detection is passed; correspondingly, when the reference identifier is inconsistent with the real-time identifier, the program file in the terminal is determined to be inconsistent with the recorded program file, namely, the recorded program file does not pass the recorded detection.
By applying the method provided by the embodiment of the application, the random number with the time stamp is obtained; combining the random number and the filing program file to obtain a reference file; generating a reference identifier of a reference file by using a target algorithm; sending the random number to a terminal with a program file; receiving a real-time identifier fed back by a terminal; the real-time identification is an identification for generating a combined file by using a target algorithm, and the combined file is a file obtained by combining a random number and a program file; and comparing the reference identifier with the real-time identifier to obtain a record detection result of the program file.
By adopting the random number with the time stamp, the uniqueness of the random number can be ensured, and the random number collision can be avoided. And obtaining a reference file of the docketing program based on the random number, thereby obtaining a reference identifier based on the reference file. And correspondingly, sending the random number to a terminal corresponding to the program file. The terminal obtains a real-time identifier in the same way. Because the random number is unique and the algorithm for calculating the identification is the same, when the two files are completely consistent, the corresponding identifications are also the same. Therefore, the reference mark and the real-time mark are compared, and the filing detection result of the query file can be obtained. That is, it is determined whether the program file matches the docket program file.
It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improvements. In the preferred/improved embodiment, the same steps as those in the above embodiment or corresponding steps may be referred to each other, and corresponding advantageous effects may also be referred to each other, which are not described in detail in the preferred/improved embodiment herein.
In one embodiment of the present application, the filing detection may also be accelerated by means of the version number. In a specific implementation, before the random number with the time stamp is acquired, the following steps are performed:
step one, acquiring a reference version number of a recorded program file and an actual version number of the program file.
And when the reference version number is the recorded program file, the recorded version number is used as the reference version number. The reference version number may be obtained in a form that is read locally.
And obtaining the actual version number of the program file by carrying out communication interaction with the terminal.
And step two, judging whether the reference version number is the same as the actual version number.
And comparing whether the values of the version numbers are consistent or not, so that whether the reference version number is the same as the actual version number or not can be determined.
And step three, if not, determining that the program file is inconsistent with the recorded program file.
Usually, the version number is updated only when the program changes, so that the reference version number is inconsistent with the actual version number, and the inconsistency between the program file and the recorded program file can be determined.
And step four, if so, executing the step of acquiring the random number with the time stamp.
If the actual version number is consistent with the reference version number, the program file itself may be further checked to determine whether the program is consistent with the record, and specifically, the steps of the above embodiment may be executed.
For example, please refer to fig. 2, fig. 2 is a schematic diagram of an embodiment of a file detection method according to an embodiment of the present application; specifically, the comparison software/program firstly reads the version number of the terminal software, compares the version number with the version number of the filing software, judges that the terminal software is unqualified and finishes the comparison if the terminal software is inconsistent with the filing software, and continues to compare the filing files if the terminal software is consistent with the filing software. Comparing the software to generate a random number with a time stamp, calling the inspection and record-keeping software through an internal network, and calculating the MD5 value (corresponding to the reference mark in the text) of the random number added in front of each application program (namely a record-keeping program file); the comparison software transmits the random number to the terminal, the terminal calculates the MD5 value (corresponding to the real-time identifier in the above) of the random number added before each application program after receiving the comparison software instruction, then the calculated value is returned to the comparison software, the comparison software compares whether the two MD5 values are consistent, the recorded software is consistent with the field terminal software, otherwise, the recorded software is inconsistent with the field terminal software.
In one embodiment of the present application, it is also possible to check which version of the docket program file belongs to the same program file. Specifically, the step of executing combines the random number and the docket program file to obtain a reference file, which may specifically be to combine the random number and the docket program file corresponding to each version to obtain a reference file of each version; correspondingly, the step of comparing the reference mark with the real-time mark is executed to obtain the record detection result of the program file, and the step of refining is as follows:
step one, finding out a target reference mark consistent with a real-time mark from all reference marks;
and step two, determining the record detection corresponding to the program file through the target reference identifier.
That is, different versions of docket files are stored in the checking device, when calculating the reference identities. And obtaining different versions of reference identifications based on the random numbers. The reference identifier can be determined by using the same random number, or by using different random numbers, and it is only necessary to ensure that the reference identifier of the corresponding file is determined to be consistent with the random number used for determining the real-time identifier.
When the identification is compared, the target reference identification consistent with the real-time identification is found out from all the reference identifications, and further the record detection corresponding to the target reference identification of the program file can be determined. Certainly, if there is no identifier consistent with the real-time identifier in each reference identifier, that is, the program file is different from the recorded program file of each version, it is determined that the file does not pass the recording detection.
Further, it is also possible to determine whether the program file belongs to the latest version based on the comparison result, so as to know whether the program file fails to be upgraded. Specifically, whether the target reference identifier corresponds to the latest version or not can be judged; and if not, determining that the terminal fails to be upgraded.
For example, please refer to fig. 3, fig. 3 is a schematic diagram illustrating an embodiment of a file detection method according to an embodiment of the present application; specifically, in the comparison process, terminal software with an operating system (i.e., a plurality of program files are provided in the same terminal) can be compared one by randomly extracting application programs for comparison. When the applications are compared one by one, the corresponding generated MD5 values are different due to the different sizes of the applications, so that the corresponding software numbers are required to be provided when the docketing software is docketed to avoid the situation of comparison failure caused by the different positions of the applications, and when the comparison work is started, the corresponding software number configuration files are imported into the comparison software. And the comparison software automatically compares the configuration contents according to the corresponding software.
Corresponding to the above method embodiments, the present application further provides a file detection apparatus, and the file detection apparatus described below and the file detection method described above may be referred to correspondingly.
Referring to fig. 4, the apparatus includes the following modules:
a random number obtaining module 101, configured to obtain a random number with a timestamp;
a file merging module 102, configured to merge the random number and the filing program file to obtain a reference file;
the identifier generating module 103 is configured to generate a reference identifier of the reference file by using a target algorithm;
a communication module 104 for transmitting a random number to a terminal having a program file; receiving a real-time identifier fed back by a terminal; the real-time identification is an identification for generating a combined file by using a target algorithm, and the combined file is a file obtained by combining a random number and a program file;
and the detection module 105 is used for comparing the reference identifier with the real-time identifier to obtain a record detection result of the program file.
By applying the device provided by the embodiment of the application, the random number with the time stamp is obtained; combining the random number and the filing program file to obtain a reference file; generating a reference identifier of a reference file by using a target algorithm; sending the random number to a terminal with a program file; receiving a real-time identifier fed back by a terminal; the real-time identification is an identification for generating a combined file by using a target algorithm, and the combined file is a file obtained by combining a random number and a program file; and comparing the reference mark with the real-time mark to obtain a record detection result of the program file.
By adopting the random number with the time stamp, the uniqueness of the random number can be ensured, and the random number collision can be avoided. And obtaining a reference file of the docketing program based on the random number, thereby obtaining a reference identifier based on the reference file. And correspondingly, sending the random number to a terminal corresponding to the program file. The terminal obtains a real-time identifier in the same way. Because the random number is unique and the algorithm for calculating the identification is the same, when the two files are completely consistent, the corresponding identifications are also the same. Therefore, the reference mark and the real-time mark are compared, and the filing detection result of the query file can be obtained. That is, it is determined whether the program file matches the docket program file.
In a specific embodiment of the present application, the identifier generating module 103 is specifically configured to generate a reference identifier of a reference file by using a message digest algorithm.
In a specific embodiment of the present application, the method further includes:
the version comparison module is used for acquiring a reference version number of the recorded program file and an actual version number of the program file before acquiring the random number with the timestamp; judging whether the reference version number is the same as the actual version number; if not, determining that the program file is inconsistent with the recorded program file; if so, the step of obtaining a random number with a time stamp is performed.
In a specific embodiment of the present application, the file merging module 102 is specifically configured to merge each random number with a corresponding docket file according to file number information to obtain each reference file;
accordingly, the detecting module 105 is specifically configured to determine that the program file corresponding to the file number passes the filing detection if the reference identifier corresponding to the same file number is consistent with the real-time identifier.
In an embodiment of the present application, the file merging module 102 is specifically configured to write a random number into a specified location in a docket file to obtain a reference file.
In a specific embodiment of the present application, the file merging module 102 is specifically configured to merge a random number and a docket file corresponding to each version to obtain a reference file of each version;
correspondingly, the detection module 105 is specifically configured to find a target reference identifier that is consistent with the real-time identifier from the reference identifiers;
and determining the record detection corresponding to the program file through the target reference identifier.
In one embodiment of the present application, the method further includes:
the update detection module is used for judging whether the target reference mark corresponds to the latest version;
and if not, determining that the terminal fails to be upgraded.
Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device, and a file detection method described above and an electronic device described below may be referred to in correspondence.
Referring to fig. 5, the electronic device includes:
a memory 332 for storing a computer program;
a processor 322 for implementing the steps of the file detection method of the above-described method embodiments when executing the computer program.
Specifically, referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device provided in this embodiment, which may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, where the memory 332 stores one or more computer applications 342 or data 344. Memory 332 may be, among other things, transient or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a data processing device. Still further, the central processor 322 may be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
The electronic device 301 may also include one or more power sources 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341.
The steps in the file detection method described above may be implemented by the structure of the electronic device.
Corresponding to the above method embodiment, the present application embodiment further provides a readable storage medium, and a readable storage medium described below and a file detection method described above may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the file detection method of the above-mentioned method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. 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 application.

Claims (10)

1. A method for file detection, comprising:
acquiring a random number with a time stamp;
combining the random number and the filing program file to obtain a reference file;
generating a reference identifier of the reference file by using a target algorithm;
sending the random number to a terminal with a program file;
receiving a real-time identifier fed back by the terminal; the real-time identifier is an identifier for generating a merged file by using the target algorithm, and the merged file is a file obtained by merging the random number and the program file;
and comparing the reference identification with the real-time identification to obtain a record detection result of the program file.
2. The document detection method according to claim 1, wherein the generating the reference identifier of the reference document by using the target algorithm comprises:
and generating the reference identification of the reference file by using a message digest algorithm.
3. The file detection method according to claim 1, further comprising, before said obtaining the random number with the time stamp:
acquiring a reference version number of the recorded program file and an actual version number of the program file;
judging whether the reference version number is the same as the actual version number;
if not, determining that the program file is inconsistent with the recorded program file;
if so, the step of obtaining a random number with a time stamp is performed.
4. The method of claim 1, wherein combining the random number with the docket file to obtain a reference file comprises:
combining each random number with the corresponding filing program file according to file number information to obtain each reference file;
correspondingly, comparing the reference identifier with the real-time identifier to obtain a filing detection result of the program file, including:
and if the reference identifier corresponding to the same file number is consistent with the real-time identifier, determining that the program file corresponding to the file number passes the record detection.
5. The method of claim 1, wherein combining the random number with a docket file to obtain a reference file comprises:
and writing the random number into a designated position in the filing program file to obtain the reference file.
6. The document detection method according to any one of claims 1 to 5, wherein the merging the random number and the docket document to obtain a reference document comprises:
merging the random number and the filing program files corresponding to the versions to obtain reference files of the versions;
correspondingly, comparing the reference identifier with the real-time identifier to obtain a filing detection result of the program file, including:
finding out a target reference identifier consistent with the real-time identifier from the reference identifiers;
and determining the record detection corresponding to the program file through the target reference identifier.
7. The document detection method according to claim 6, further comprising:
judging whether the target reference mark corresponds to the latest version;
and if not, determining that the terminal fails to be upgraded.
8. A document sensing device, comprising:
the random number acquisition module is used for acquiring a random number with a time stamp;
the file merging module is used for merging the random number and the filing program file to obtain a reference file;
the identification generation module is used for generating a reference identification of the reference file by using a target algorithm;
the communication module is used for sending the random number to a terminal with a program file; receiving a real-time identifier fed back by the terminal; the real-time identifier is an identifier for generating a merged file by using the target algorithm, and the merged file is a file obtained by merging the random number and the program file;
and the detection module is used for comparing the reference identifier with the real-time identifier to obtain a record detection result of the program file.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the document detection method of any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the file detection method according to any one of claims 1 to 7.
CN202210878595.5A 2022-07-25 2022-07-25 File detection method, device and equipment and readable storage medium Pending CN115203697A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210878595.5A CN115203697A (en) 2022-07-25 2022-07-25 File detection method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210878595.5A CN115203697A (en) 2022-07-25 2022-07-25 File detection method, device and equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115203697A true CN115203697A (en) 2022-10-18

Family

ID=83583266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210878595.5A Pending CN115203697A (en) 2022-07-25 2022-07-25 File detection method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115203697A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672920A (en) * 2021-08-06 2021-11-19 安天科技集团股份有限公司 Method and device for identifying sample tampering behavior and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672920A (en) * 2021-08-06 2021-11-19 安天科技集团股份有限公司 Method and device for identifying sample tampering behavior and electronic equipment

Similar Documents

Publication Publication Date Title
CN110088744B (en) Database maintenance method and system
CN107453889A (en) The method for uploading and device of a kind of journal file
CN110222535B (en) Processing device, method and storage medium for block chain configuration file
CN111813788A (en) Information query method and device and information synchronization method and device
CN114201408A (en) Regression testing method, device, computer equipment and storage medium
CN111353143A (en) Sensitive authority detection method and device and storage medium
CN111475517A (en) Data updating method and device, computer equipment and storage medium
CN115203697A (en) File detection method, device and equipment and readable storage medium
CN110063042A (en) A kind of response method and its terminal of database failure
CN110619022A (en) Node detection method, device, equipment and storage medium based on block chain network
CN111752838A (en) Question checking method and device, server and storage medium
CN108763053B (en) Method for generating buried point name and terminal equipment
CN115757107A (en) Embedded point detection method, device, server and storage medium
CN110348984B (en) Automatic credit card data input method and related equipment under different transaction channels
CN112612773A (en) Database synchronization test method and device, computer equipment and storage medium
CN112395619A (en) Vulnerability scanning method and device
CN112463620A (en) Coverage rate testing method and device in android software integration test
CN113037521A (en) Method for identifying state of communication equipment, communication system and storage medium
CN115357458B (en) Method and device for testing TISDM display information
CN112306551B (en) Historical configuration information acquisition method, system and device
CN117093401A (en) Method, device and equipment for processing code exception
CN117857576A (en) Data synchronization method and server
CN115422073A (en) mock service processing method, device, equipment and storage medium
CN116501644A (en) Method and device for determining code coverage rate and electronic equipment
CN116860601A (en) Collaborative debugging method, device, gateway, server and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination