CN114513498B - File transmission verification method, device, computer equipment and storage medium - Google Patents

File transmission verification method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN114513498B
CN114513498B CN202111634955.9A CN202111634955A CN114513498B CN 114513498 B CN114513498 B CN 114513498B CN 202111634955 A CN202111634955 A CN 202111634955A CN 114513498 B CN114513498 B CN 114513498B
Authority
CN
China
Prior art keywords
checked
metering monitoring
files
file
metering
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
CN202111634955.9A
Other languages
Chinese (zh)
Other versions
CN114513498A (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.)
Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangzhou Power Supply Bureau of Guangdong Power Grid 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 Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangzhou Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority to CN202111634955.9A priority Critical patent/CN114513498B/en
Publication of CN114513498A publication Critical patent/CN114513498A/en
Application granted granted Critical
Publication of CN114513498B publication Critical patent/CN114513498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a file transfer verification method, a file transfer verification device, a file transfer verification computer device, a file transfer verification storage medium and a file transfer verification computer program product. And receiving to-be-checked metering monitoring files sent by the metering monitoring points according to a preset time period through a secure file transmission protocol, determining a first to-be-checked file list at a first time point according to the currently received metering monitoring files, determining a second to-be-checked file list at a second time point after a preset time interval according to the currently received metering monitoring files, and comparing the first to-be-checked file list with the second to-be-checked file list to obtain the same to-be-checked metering monitoring files serving as the metering monitoring files passing the check. Compared with the traditional mode of independently checking each file, the method and the device form file lists based on the received files at two time points respectively, and take the intersection of metering monitoring files to be checked in the two lists obtained by comparison as metering monitoring files passing the checking, so that the checking efficiency of the metering files is improved.

Description

File transmission verification method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a file transmission verification method, a device, a computer device, a storage medium, and a computer program product.
Background
With the rapid development of informatization, more and more data analysis demands need to acquire data of a plurality of systems for centralized analysis so as to support enterprises to better make decisions. Accordingly, various data interaction modes are generated. In the power industry, it is often necessary to use a metering monitoring point monitoring file for analysis to better serve the power consumer. And when receiving the monitoring file of the metering monitoring point, the file needs to be checked. At present, the checking mode of the monitoring files is usually carried out by comparing single files one by one. However, when a large number of monitoring files are transmitted, the verification time is prolonged and the efficiency is reduced due to the one-by-one verification of the single files.
Therefore, the current transmission inspection method for the electric power metering monitoring file has the defect of low inspection efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a file transfer verification method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve verification efficiency.
In a first aspect, the present application provides a method for checking file transmission, where the method includes:
receiving a metering monitoring file to be checked sent by a metering monitoring point according to a preset time period according to a secure file transmission protocol;
at a first time point, determining a first file list to be checked according to a first number of currently received metering monitoring files to be checked;
at a second time point, determining a second file list to be checked according to a second number of currently received metering monitoring files to be checked; the second time point is separated from the first time point by a preset time value;
and obtaining a comparison result of the metering monitoring files to be checked in the second file list to be checked and the metering monitoring files to be checked in the first file list to be checked, and taking the same metering monitoring files to be checked as metering monitoring files passing the check.
In one embodiment, the determining, at the first time point, the first to-be-verified file list according to the first number of to-be-verified metering monitoring files received currently includes:
at a first time point, according to the receiving time of a first number of metering monitoring files to be checked which are received currently, sequencing the metering monitoring files to be checked in ascending order;
and acquiring a preset number of metering monitoring files to be checked from the first number of metering monitoring files to be checked after ascending sequence sequencing based on the ranking, and taking the preset number of metering monitoring files to be checked as a first file list to be checked.
In one embodiment, the obtaining a preset number of to-be-verified metering monitoring files from the first number of to-be-verified metering monitoring files after the ascending order, as a first to-be-verified file list, includes:
and if the first number of the currently received metering monitoring files to be checked is smaller than the preset number, acquiring the first number of the metering monitoring files to be checked as a first file list to be checked.
In one embodiment, the determining, at the second time point, the second list of files to be verified according to the second number of the metering monitoring files to be verified that are currently received includes:
at a second time point, according to the receiving time of the second number of metering monitoring files to be checked which are received currently, sequencing the second number of metering monitoring files to be checked in ascending order;
and acquiring a preset number of metering monitoring files to be checked from the second number of metering monitoring files to be checked after the ascending order is sequenced, and taking the metering monitoring files to be checked as a second file list to be checked.
In one embodiment, the obtaining a preset number of to-be-verified metering monitoring files includes:
and if the second number of the currently received metering monitoring files to be checked is smaller than the preset number, acquiring the second number of the metering monitoring files to be checked as a second file list to be checked.
In one embodiment, the determining that the comparison result is the same metering monitoring file to be verified, as the metering monitoring file passing verification, includes:
and taking the comparison result as a metering monitoring file to be checked, wherein the file size is the same and/or the file modification time is the same, as the metering monitoring file passing the check.
In one embodiment, after the comparing result is the same metering monitoring file to be checked, the method further includes:
storing the metering monitoring file passing the verification into a database;
and storing the metering monitoring files in the database into a backup database, and backing up the metering monitoring files.
In a second aspect, the present application provides a file transfer verification apparatus, the apparatus including:
the receiving module is used for receiving the metering monitoring file to be checked sent by the metering monitoring point according to a preset time period according to a secure file transmission protocol;
the first determining module is used for determining a first file list to be checked according to a first number of to-be-checked metering monitoring files received currently at a first time point;
the second determining module is used for determining a second file list to be checked according to the second number of the to-be-checked metering monitoring files received currently at a second time point; the second time point is separated from the first time point by a preset time value;
and the verification module is used for obtaining the comparison result of the metering monitoring files to be verified in the second file list to be verified and the metering monitoring files to be verified in the first file list to be verified, and taking the same metering monitoring files to be verified as metering monitoring files passing verification.
In a third aspect, the present application provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when the processor executes the computer program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of the method described above.
The file transmission verification method, the file transmission verification device, the computer equipment, the storage medium and the computer program product are used for receiving to-be-verified measurement monitoring files sent by measurement monitoring points according to a preset time period through a secure file transmission protocol, determining a first to-be-verified file list according to a first number of currently received to-be-verified measurement monitoring files at a first time point, determining a second to-be-verified file list according to a second number of currently received to-be-verified measurement monitoring files at a second time point with a preset time value, comparing the first to-be-verified file list with the second to-be-verified file list, and taking the same to-be-verified measurement monitoring files obtained through comparison as to-be-verified measurement monitoring files. Compared with the traditional mode of separately checking each file, the method and the device form corresponding file lists based on the received files at two time points, compare the two file lists, and take the intersection of the metering monitoring files to be checked in the two lists obtained by comparison as the metering monitoring file passing the checking, so that the checking efficiency of the metering files is improved.
Drawings
FIG. 1 is a diagram of an application environment for a file transfer verification method in one embodiment;
FIG. 2 is a flow diagram of a file transfer verification method according to one embodiment;
FIG. 3 is a flow chart of a file transfer verification method according to another embodiment;
FIG. 4 is a block diagram of a file transfer verification device in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The file transmission verification method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the metering monitoring point 102 communicates with the server 104 over a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The metering monitoring point 102 can continuously send metering monitoring files to be checked to the server 104, the server 104 can form a plurality of lists of files to be checked based on the metering monitoring files received at different time points respectively, and accordingly the server 104 can obtain metering monitoring files passing the check based on comparison results among the lists of the files to be checked. The server 104 may receive the metering monitoring files sent by the metering monitoring points 102, and check the metering monitoring files by taking each metering monitoring point 102 as a unit. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a file transfer verification method is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
step S202, receiving a metering monitoring file to be checked sent by a metering monitoring point according to a preset time period according to a security file transmission protocol.
Among them, SFTP (Secure File Transfer Protocol ) is a standard protocol that is more secure than FTP (File Transfer Protocol ), and SFTP can provide a secure encryption method for transferring files, compared to FTP, since this transfer scheme uses encryption/decryption technology, it is ensured that data is securely transferred using private and secure data streams. File transfer between the server 104 and the metering monitoring point 102 may be performed by the SFTP method described above, and the server 104 may also be an SFTP server. The metering monitoring point 102 may be a metering device disposed in the power grid system, and is configured to collect metering data of the power device and generate a corresponding metering monitoring file. There may be multiple metering monitoring points 102 and each metering monitoring point 102 may send the collected metering monitoring file to the server 104. The server 104 may receive the metering monitoring file to be verified sent by the metering monitoring point 102 at a preset time period based on the SFTP. That is, the server 104 may continually receive metering monitoring files sent by the metering monitoring point 102.
Step S204, at a first time point, determining a first file list to be checked according to a first number of to-be-checked metering monitoring files received currently.
The server 104 may continuously receive the metering monitoring file sent by the metering monitoring point 102, and after the receiving time reaches a certain level, the server 104 may start processing the metering monitoring file. For example, at a first point in time, the server 104 may generate a first list of files to be verified based on the currently received metering monitoring files to be verified. For example, the server 104 may generate the first to-be-verified file list from all metering monitoring files received at the first time point and before by performing corresponding processing on the metering monitoring files. The number of all the metering monitoring files to be checked received from the first time point can be used as the first number.
Step S206, at a second time point, determining a second file list to be checked according to a second number of currently received measurement and monitoring files to be checked; the second time point is separated from the first time point by a preset time value.
The server 104 may suspend scanning for a period of time after generating the first to-be-verified file list at the first time point based on the received to-be-verified metering monitoring file, for example, after a preset time value is set, and then reach the second time point. The preset time value may be set according to an actual situation, for example, may be two minutes, where the time may be a sleep time of a scanning program in the server 104, that is, the server 104 may process the to-be-checked metering monitoring file through the scanning program, and then the server 104 may generate the first to-be-checked file list at a first time point, sleep the scanning program for a specified time, for example, 2 minutes, and process the to-be-checked metering monitoring file through the scanning program after reaching a second time point. In addition, the server 104 may still continuously receive the metering monitoring file from the first time point to the second time point according to the above-mentioned preset time period, i.e. the second time point is a node where the server 104 performs verification. The server 104 may generate a second list of files to be verified at a second point in time based on the metering monitoring files to be verified received for it by the second point in time. For example, the server 104 may generate the second file list to be checked from all metering monitoring files received at the second time point and before performing corresponding processing on the metering monitoring files. The number of all the metering monitoring files to be checked received at the second time point may be used as the second number, and all the metering monitoring files to be checked received at the second time point may include the metering monitoring files to be checked acquired at the first time point.
Step S208, a comparison result of the metering monitoring files to be checked in the second file list to be checked and the metering monitoring files to be checked in the first file list to be checked is obtained, and the metering monitoring files to be checked with the same comparison result are taken as metering monitoring files passing the checking.
Wherein the server 104 may generate a first list of files to be verified at a first point in time and may generate a second list of files to be verified at a second point in time. After the server 104 generates the list, the metering monitoring file to be checked in the second file list to be checked and the metering monitoring file to be checked in the first file list to be checked can be compared, so as to obtain a corresponding comparison result. According to the above comparison manner, the comparison result may include two results of the same file and different files, and the server 104 may use the measurement monitoring file to be checked, which is the same as the measurement monitoring file passing the verification. For example, the server 104 may evaluate, through a certain index, whether the metering monitoring file to be checked in the second file to be checked list is the same as the metering monitoring file to be checked in the first file to be checked list, so that the server 104 may use the metering monitoring file to be checked in the intersection of the first file to be checked list and the second file to be checked list as the metering monitoring file to be checked.
In addition, server 104 may also store and backup metering monitoring files that pass the verification. For example, in one embodiment, after the comparison result is the same metering monitoring file to be verified, the metering monitoring file passing verification further includes: storing the metering monitoring file passing the verification into a database; and storing the metering monitoring files in the database into a backup database, and backing up the metering monitoring files. In this embodiment, after the server 104 verifies that the metering and monitoring file passes, the metering and monitoring file passing the verification may be stored in the database to perform a batch warehousing operation. The server 104 may also store the metering monitoring file in the database in the backup database, for example, move the metering monitoring file in the database that passes the verification to the backup disc, so as to facilitate the subsequent data verification. The server 104 moves the metering monitoring file retained in the server 104 to the database by storing and backing up the data passing the verification, so that the processing pressure of the server 104 is reduced, and the safety of the metering monitoring file is ensured.
In the file transmission verification method, the to-be-verified metering monitoring files sent by the metering monitoring points are received according to the preset time period through the secure file transmission protocol, a first to-be-verified file list is determined at a first time point according to the currently received first number of to-be-verified metering monitoring files, a second to-be-verified file list is determined at a second time point with a preset time value, the first to-be-verified file list and the second to-be-verified file list are compared, and the same to-be-verified metering monitoring files obtained through comparison are used as metering monitoring files passing verification. Compared with the traditional mode of separately checking each file, the method and the device form corresponding file lists based on the received files at two time points, compare the two file lists, and take the intersection of the metering monitoring files to be checked in the two lists obtained by comparison as the metering monitoring file passing the checking, so that the checking efficiency of the metering files is improved.
In one embodiment, determining the first list of files to be verified based on the first number of metering monitoring files to be verified currently received includes: at a first time point, according to the receiving time of the first number of metering monitoring files to be checked, which are received currently, sequencing the first number of metering monitoring files to be checked in ascending order; and acquiring a preset number of metering monitoring files to be checked from the first number of metering monitoring files to be checked after ascending sequence sequencing based on the ranking, and taking the preset number of metering monitoring files to be checked as a first file list to be checked.
In this embodiment, the server 104 may generate, at a first time point, a first to-be-verified file list based on the received to-be-verified metering monitoring file. The server 104 may sort the first number of to-be-verified metering monitoring files according to the receiving time of the first number of to-be-verified metering monitoring files received at the first time point, for example, the server 104 sorts the to-be-verified metering monitoring files received up to the first time point in ascending order according to the receiving time of the to-be-verified metering monitoring files. The server 104 may obtain a preset number of to-be-verified metering monitoring files based on the ranking from the first number of to-be-verified metering monitoring files after the ascending order, and use the preset number of to-be-verified metering monitoring files as the first to-be-verified file list. Specifically, the server 104 may sort all the received metering monitoring files to be checked in ascending order according to the file update time at the first time point T1 through the scanning program, to obtain a file forming file list with a specified data size, for example, the server 104 obtains the preset number of metering monitoring files to be checked according to the sorted metering monitoring files to be checked to form the file list.
In addition, when the first number of metering monitoring files to be verified received at the first time point is smaller than the preset number, the server 104 may change the acquired number. For example, in one embodiment, a preset number of metering monitoring files to be checked are obtained from a first number of metering monitoring files to be checked after being sequenced in an ascending order, and the metering monitoring files to be checked are used as a first file list to be checked, which includes: and if the first number of the currently received metering monitoring files to be checked is smaller than the preset number, acquiring the first number of the metering monitoring files to be checked as a first file list to be checked. In this embodiment, when the server 104 detects that the first number of to-be-verified metering and monitoring files currently received at the first time point is smaller than the preset number, the first number of to-be-verified metering and monitoring files may be obtained as the first to-be-verified file list. Specifically, when the preset number is 2000, the server 104 may use the first number as the preset number when the first number is less than 2000, and generate the first to-be-verified file list according to the to-be-verified metering monitoring files of the first number.
Through the above embodiment, the server 104 may sort the first number of to-be-checked metering monitoring files received at the first time point, and generate the first to-be-checked file list based on the sorted result, so that the server 104 may perform file checking based on the first to-be-checked file list, thereby improving the checking efficiency of the metering monitoring files.
In one embodiment, at a second point in time, determining a second list of files to be verified based on the currently received second number of files to be verified, including: at a second time point, according to the receiving time of the second number of metering monitoring files to be checked, which are received currently, sorting the second number of metering monitoring files to be checked in ascending order; and acquiring a preset number of metering monitoring files to be checked from the second number of metering monitoring files to be checked after the ascending order is sequenced, and taking the metering monitoring files to be checked as a second file list to be checked.
In this embodiment, the second time point may be a time point separated from the first time point by a predetermined time value. During the first point in time to the second point in time, the server 104 may still continue to receive the metering monitoring file to be verified. The server 104 may sort the second number of metering monitoring files to be verified in ascending order at a second point in time according to the time of receipt of the second number of metering monitoring files to be verified that have been received so far. The server 104 may obtain a preset number of metering monitoring files to be checked from the second number of metering monitoring files to be checked after the ascending order, and use the preset number of metering monitoring files to be checked as a second list of files to be checked. Specifically, the server 104 may sort all the received metering monitoring files to be checked in ascending order according to the file update time at the second time point T2 through the scanning program, to obtain a file forming file list with a specified data size, for example, the server 104 obtains the preset number of metering monitoring files to be checked according to the sorted metering monitoring files to be checked to form the file list. Wherein the preset number may be the same number as the preset number of the first time point; the server 104 may sequentially obtain a preset number of to-be-verified metering monitoring files from the sequenced to-be-verified metering monitoring files, to form a second to-be-verified file list.
In addition, when the second number of to-be-verified metering monitoring files received at the second time point is smaller than the preset number, the server 104 may change the acquired number. For example, in one embodiment, the obtaining a preset number of to-be-verified metering monitoring files from the second number of to-be-verified metering monitoring files after the ascending order, as the second to-be-verified file list, includes: and if the second number of the currently received metering monitoring files to be checked is smaller than the preset number, acquiring the second number of the metering monitoring files to be checked as a second file list to be checked. In this embodiment, when the server 104 detects that the second number of the to-be-verified metering and monitoring files currently received at the second time point is smaller than the preset number, the second number of the to-be-verified metering and monitoring files may be obtained as the second to-be-verified file list. Specifically, when the preset number is 2000, the server 104 may use the second number as the preset number when the second number is less than 2000, and generate a second file list to be verified according to the second number of to-be-verified metering monitoring files.
Through the above embodiment, the server 104 may sort the second number of to-be-checked metering monitoring files received at the second time point, and generate the second to-be-checked file list based on the sorted result, so that the server 104 may perform file checking based on the second to-be-checked file list, thereby improving the checking efficiency of the metering monitoring files.
In one embodiment, the to-be-verified metering monitoring file with the same comparison result is used as the metering monitoring file passing verification, and the to-be-verified metering monitoring file comprises: and taking the metering monitoring file to be checked, which has the same file size and/or the same file modification time as the metering monitoring file passing the verification, as the metering monitoring file passing the verification.
In this embodiment, the server 102 may compare the metering monitoring file to be checked in the first file to be checked list with the metering monitoring file to be checked in the second file to be checked list, and use the same metering monitoring file to be checked as the metering monitoring file passing the check. The server 104 may compare by the set comparison conditions. The server 104 may obtain to-be-checked measurement monitoring files in the comparison result, where the to-be-checked measurement monitoring files correspond to at least one of the files with the same size and the same file modification time, and the to-be-checked measurement monitoring files pass the check, and the server 104 may also use to-be-checked measurement monitoring files in the two file lists, where the to-be-checked measurement monitoring files correspond to the files with the same size and the same file modification time, as the to-be-checked measurement monitoring files pass the check. For example, the server 104 may compare the files in the file lists acquired at the first time point T1 and the second time point T2, and use the to-be-verified metering monitor file having the same modification time as the file sizes in the two file lists as the metering monitor file passing verification. That is, the server 104 may use the intersection file in the first to-be-checked file list and the second to-be-checked file list as the metering monitoring file passing the check.
Through the embodiment, the server 104 can verify whether the file sizes and the file modification times in the two file lists to be verified are the same, so that batch verification of the metering monitoring files to be verified is realized, and the verification efficiency of the metering monitoring files is improved.
In one embodiment, as shown in fig. 3, fig. 3 is a flow chart of a file transfer verification method in another embodiment. The method comprises the following steps: (1) The data files continue to be accessed from the source system to the corresponding directory of SFTP server 104, e.g., from metering monitoring point 102 to server 104. (2) The server 104 sorts all files according to the ascending order of the file update time at the first time point T1 by the scanning program, and obtains a file list with a specified data size, for example, 2000 files, and if the server 104 detects that the number of files is less than 2000 files, all files are obtained. (3) The server 104 sleeps the scanner for a specified time, such as 2 minutes. (4) The server 104 sorts all files according to the ascending order of the file update time through a scanning program at a second time point T2 which is a preset time value after the first time point, and obtains a file list with a specified data size, for example, the number of to-be-checked metering monitoring files obtained at the second time point can be 2000, and if the server 104 detects that the number of files is less than 2000, all the files are obtained. (5) The server 104 compares the files acquired at the time point T1 and the time point T2 in batches through a program to acquire to-be-checked metering monitoring files with the same file size and modification time at the two time points to form a file list, namely the server 104 can acquire intersections of the first to-be-checked file list and the second to-be-checked file list acquired from the time points T1 and T2 respectively, so that the server 104 can take the extracted metering monitoring files as metering monitoring files passing verification. (6) The server 104 may also perform batch warehousing operations on the batch of verified metering monitoring files through a data warehousing program, and after warehousing is completed, the server 104 may also move the data files to a backup disc, so as to facilitate subsequent data verification.
Through the above embodiment, the server 104 forms corresponding file lists based on the received files at two time points respectively, compares the two file lists, and uses the intersection of the metering monitoring files to be checked in the two lists obtained by comparison as the metering monitoring file passing the check, thereby improving the checking efficiency of the metering file.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a file transmission verification device for realizing the above related file transmission verification method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the file transmission verification device or devices provided below may refer to the limitation of the file transmission verification method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 4, there is provided a file transfer verification apparatus, including: a receiving module 500, a first determining module 502, a second determining module 504, and a checking module 506, wherein:
and the receiving module 500 is used for receiving the metering monitoring file to be checked sent by the metering monitoring point according to a preset time period according to a secure file transmission protocol.
The first determining module 502 is configured to determine, at a first time point, a first to-be-verified file list according to a first number of to-be-verified metering monitoring files currently received.
A second determining module 504, configured to determine, at a second time point, a second list of files to be verified according to a second number of to-be-verified metering monitoring files currently received; the second time point is separated from the first time point by a preset time value.
The verification module 506 is configured to obtain a comparison result of the to-be-verified metering and monitoring file in the second to-be-verified file list and the to-be-verified metering and monitoring file in the first to-be-verified file list, and take the same to-be-verified metering and monitoring file as the metering and monitoring file passing the verification.
In one embodiment, the first determining module 502 is specifically configured to sort the first number of to-be-verified metering monitoring files in ascending order according to the receiving time of the first number of to-be-verified metering monitoring files currently received at a first time point; and acquiring a preset number of metering monitoring files to be checked from the first number of metering monitoring files to be checked after ascending sequence sequencing based on the ranking, and taking the preset number of metering monitoring files to be checked as a first file list to be checked.
In one embodiment, the first determining module 502 is specifically configured to obtain the first number of to-be-verified metering monitoring files as the first to-be-verified file list if the first number of currently received to-be-verified metering monitoring files is smaller than the preset number.
In one embodiment, the second determining module 504 is specifically configured to sort the second number of to-be-verified metering monitoring files in ascending order according to the receiving time of the second number of to-be-verified metering monitoring files currently received at a second time point; and acquiring a preset number of metering monitoring files to be checked from the second number of metering monitoring files to be checked after the ascending order is sequenced, and taking the metering monitoring files to be checked as a second file list to be checked.
In an embodiment, the second determining module 504 is specifically configured to obtain the second number of to-be-verified metering monitoring files as the second to-be-verified file list if the second number of currently received to-be-verified metering monitoring files is smaller than the preset number.
In one embodiment, the verification module 506 is specifically configured to use the metering monitoring file to be verified, which has the same file size and/or the same file modification time, as the metering monitoring file passing the verification.
In one embodiment, the method further comprises: the storage backup module is used for storing the metering monitoring file passing the verification into the database; and storing the metering monitoring files in the database into a backup database, and backing up the metering monitoring files.
The above-mentioned respective modules in the file transfer verification apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store metering monitoring file data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a file transfer verification method.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, including a memory and a processor, where the memory stores a computer program, and the processor implements the file transfer verification method described above when executing the computer program.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements the above-described file transfer verification method.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the file transfer verification method described above.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method for verifying file transfer, the method comprising:
receiving a metering monitoring file to be checked sent by a metering monitoring point according to a preset time period according to a secure file transmission protocol;
at a first time point, determining a first to-be-checked file list according to a first number of to-be-checked metering monitoring files received currently, including: processing all the metering monitoring files to be checked received at the first time point and before, and generating a first file list to be checked from the processed metering monitoring files to be checked; the first quantity is the quantity of all metering monitoring files to be checked received from a first time point;
at a second time point, determining a second file list to be checked according to a second number of to-be-checked metering monitoring files received currently, including: processing all the metering monitoring files to be checked received at the second time point and before, and generating a second file list to be checked from the processed metering monitoring files to be checked; the second time point is separated from the first time point by a preset time value; the second number is the number of all metering monitoring files to be checked, which are received at a second time point, and all metering monitoring files to be checked, which are received at the second time point, comprise metering monitoring files to be checked, which are received at the first time point and before;
and obtaining a comparison result of the metering monitoring files to be checked in the second file list to be checked and the metering monitoring files to be checked in the first file list to be checked, and taking the same metering monitoring files to be checked as metering monitoring files passing the check.
2. The method of claim 1, wherein determining the first list of files to be verified based on the first number of metering monitoring files to be verified currently received at the first point in time comprises:
at a first time point, according to the receiving time of a first number of metering monitoring files to be checked which are received currently, sequencing the metering monitoring files to be checked in ascending order;
and acquiring a preset number of metering monitoring files to be checked from the first number of metering monitoring files to be checked after ascending sequence sequencing based on the ranking, and taking the preset number of metering monitoring files to be checked as a first file list to be checked.
3. The method according to claim 2, wherein the obtaining a preset number of metering monitoring files to be checked from the first number of metering monitoring files to be checked after the ascending order as the first list of files to be checked includes:
and if the first number of the currently received metering monitoring files to be checked is smaller than the preset number, acquiring the first number of the metering monitoring files to be checked as a first file list to be checked.
4. The method of claim 1, wherein determining a second list of files to be checked based on the currently received second number of metering monitoring files to be checked at the second point in time comprises:
at a second time point, according to the receiving time of the second number of metering monitoring files to be checked which are received currently, sequencing the second number of metering monitoring files to be checked in ascending order;
and acquiring a preset number of metering monitoring files to be checked from the second number of metering monitoring files to be checked after the ascending order is sequenced, and taking the metering monitoring files to be checked as a second file list to be checked.
5. The method of claim 4, wherein the obtaining a preset number of metering monitoring files to be verified comprises:
and if the second number of the currently received metering monitoring files to be checked is smaller than the preset number, acquiring the second number of the metering monitoring files to be checked as a second file list to be checked.
6. The method according to claim 1, wherein said comparing the results of the comparison to the same metering monitoring file to be verified as the metering monitoring file passing the verification comprises:
and taking the comparison result as a metering monitoring file to be checked, wherein the file size is the same and/or the file modification time is the same, as the metering monitoring file passing the check.
7. The method according to any one of claims 1 to 6, wherein after the comparing the comparison result to the same measurement monitoring file to be verified, the method further comprises:
storing the metering monitoring file passing the verification into a database;
and storing the metering monitoring files in the database into a backup database, and backing up the metering monitoring files.
8. A file transfer verification apparatus, said apparatus comprising:
the receiving module is used for receiving the metering monitoring file to be checked sent by the metering monitoring point according to a preset time period according to a secure file transmission protocol;
the first determining module is used for determining a first to-be-checked file list according to a first number of to-be-checked metering monitoring files received at the first time point, and particularly used for processing all to-be-checked metering monitoring files received at the first time point and before, and generating the first to-be-checked file list from the processed to-be-checked metering monitoring files; the first quantity is the quantity of all metering monitoring files to be checked received from a first time point;
the second determining module is used for determining a second file list to be checked according to a second number of currently received metering monitoring files to be checked at a second time point, and particularly used for processing all metering monitoring files to be checked received at the second time point and before, and generating the processed metering monitoring files to be checked into the second file list to be checked; the second time point is separated from the first time point by a preset time value; the second number is the number of all metering monitoring files to be checked, which are received at a second time point, and all metering monitoring files to be checked, which are received at the second time point, comprise metering monitoring files to be checked, which are received at the first time point and before;
and the verification module is used for obtaining the comparison result of the metering monitoring files to be verified in the second file list to be verified and the metering monitoring files to be verified in the first file list to be verified, and taking the same metering monitoring files to be verified as metering monitoring files passing verification.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202111634955.9A 2021-12-29 2021-12-29 File transmission verification method, device, computer equipment and storage medium Active CN114513498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111634955.9A CN114513498B (en) 2021-12-29 2021-12-29 File transmission verification method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111634955.9A CN114513498B (en) 2021-12-29 2021-12-29 File transmission verification method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114513498A CN114513498A (en) 2022-05-17
CN114513498B true CN114513498B (en) 2024-04-02

Family

ID=81548073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111634955.9A Active CN114513498B (en) 2021-12-29 2021-12-29 File transmission verification method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114513498B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115150391B (en) * 2022-07-25 2023-05-09 中电金信软件有限公司 File transmission method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339200A (en) * 2020-02-28 2020-06-26 中国平安人寿保险股份有限公司 Data verification method and data verification system based on database synchronization
CN111737255A (en) * 2020-06-02 2020-10-02 通号城市轨道交通技术有限公司 Method and system for storing interlocking monitoring data
WO2021051618A1 (en) * 2019-09-20 2021-03-25 平安科技(深圳)有限公司 Abnormality early warning method, device, server and storage medium
CN113505076A (en) * 2021-07-26 2021-10-15 中国工商银行股份有限公司 File coverage detection method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021051618A1 (en) * 2019-09-20 2021-03-25 平安科技(深圳)有限公司 Abnormality early warning method, device, server and storage medium
CN111339200A (en) * 2020-02-28 2020-06-26 中国平安人寿保险股份有限公司 Data verification method and data verification system based on database synchronization
CN111737255A (en) * 2020-06-02 2020-10-02 通号城市轨道交通技术有限公司 Method and system for storing interlocking monitoring data
CN113505076A (en) * 2021-07-26 2021-10-15 中国工商银行股份有限公司 File coverage detection method and device

Also Published As

Publication number Publication date
CN114513498A (en) 2022-05-17

Similar Documents

Publication Publication Date Title
CN108399151B (en) Data comparison system and method
CN114513498B (en) File transmission verification method, device, computer equipment and storage medium
CN115237617A (en) Interface component determination method, device, equipment, storage medium and program product
CN118152243A (en) Data verification method, device, computer equipment, storage medium and program product
CN116644250B (en) Page detection method, page detection device, computer equipment and storage medium
CN111522873B (en) Block generation method, device, computer equipment and storage medium
Arslan et al. Automatic performance analysis of cloud based load testing of web-application & its comparison with traditional load testing
CN117289107A (en) Chip reliability test method, device, computer equipment and storage medium
CN117435335A (en) Computing power dispatching method, computing power dispatching device, computer equipment and storage medium
CN115858322A (en) Log data processing method and device and computer equipment
CN115860099A (en) Neural network model compression method and device, computer equipment and storage medium
CN114629690A (en) Equipment safety baseline compliance detection method and device and computer equipment
CN114492994A (en) Power information processing system, method and device based on power big data
US11921787B2 (en) Identity-aware data management
CN118646649A (en) Node parameter management method, device, computer equipment, storage medium and product
CN117938514A (en) Token processing method, device, server, storage medium and program product
CN118170833A (en) Resource information transfer method, device, computer equipment and storage medium
CN116975072A (en) Data processing method, device, computer equipment and storage medium
CN116880927A (en) Rule management method, device, computer equipment and storage medium
CN117493828A (en) Abnormal data identification method, device, computer equipment and storage medium
CN117290327A (en) Distributed file verification method, device, computer equipment and storage medium
CN117454369A (en) API safety detection method, device, computer equipment and storage medium
CN117170844A (en) Offline propagation method and device of distributed lock, computer equipment and storage medium
CN117648310A (en) Data degradation processing method, device, equipment and medium
CN117077096A (en) Cross-department server application method, computer equipment, storage medium and product

Legal Events

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