CN112799945A - Batch file verification method and device - Google Patents

Batch file verification method and device Download PDF

Info

Publication number
CN112799945A
CN112799945A CN202110124846.6A CN202110124846A CN112799945A CN 112799945 A CN112799945 A CN 112799945A CN 202110124846 A CN202110124846 A CN 202110124846A CN 112799945 A CN112799945 A CN 112799945A
Authority
CN
China
Prior art keywords
batch
file
information
files
verified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110124846.6A
Other languages
Chinese (zh)
Other versions
CN112799945B (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110124846.6A priority Critical patent/CN112799945B/en
Publication of CN112799945A publication Critical patent/CN112799945A/en
Application granted granted Critical
Publication of CN112799945B publication Critical patent/CN112799945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a batch file checking method and a device, wherein the method comprises the following steps: acquiring file information of batch files to be verified; the batch file information to be verified comprises: time information of the batch; verifying the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information. The invention provides a batch file verification method and a batch file verification device, relates to batch file verification in the financial field, verifies batch files to be verified according to file information of the batch files and pre-acquired reference file information, and provides a quality control method and practice for verifying host batch file system information. The quality control of batch files in cross-application and cross-service logic can be completed in the dimension beyond the service function test and the technical application test.

Description

Batch file verification method and device
Technical Field
The invention relates to a test technology, in particular to a batch file checking method and device.
Background
In the batch test process of the host, aiming at the test of batch programs, a common test method is as follows: technical testers perform data preparation- > host batch program operation- > generate a data result file- > obtain a result file, and identify whether data in the result file meets the technical test design expectation; or, the service tester performs data preparation- > host batch program operation- > generates a data result file- > a downstream platform system loads a file- > a data presentation system- > inputs a query condition through the service, and judges whether the presentation result meets the overdue design of the service test.
The two methods in the prior art can make up for blind spots in respective testing processes due to different emphasis. However, due to the diversity and complexity of the test scenarios and the difference from the batch run of the production environment, the following problems may still exist in the test flow: the batch flow of version realization, single scene test is correct, but continuous operation has problems; the developer modifies a program and result file, but not in the modification specification, creating a condition of missed testing.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a batch file checking method, which comprises the following steps:
acquiring file information of batch files to be verified; the batch file information to be verified comprises: time information of the batch;
verifying the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information.
In the embodiment of the present invention, the batch time information includes: the method comprises the steps that batch definition time and batch updating time of batch files to be verified are obtained;
the batch execution time information comprises: and starting execution time and execution duration of the batch corresponding to the batch file to be verified.
In the embodiment of the present invention, the verifying the batch files to be verified according to the file information and the pre-obtained reference file information includes:
filtering the batch files to be verified according to the batch updating time and the time for starting batch execution;
and determining the suspicious time batch files in the filtered batch files to be verified according to the batch definition time, the batch update time and the batch execution duration to serve as batch file verification results.
In the embodiment of the present invention, the batch file information to be verified further includes: file length information of the batch files to be verified and file space information of the batch files to be verified;
the reference file information further includes: batch file reference length information and batch file reference space information.
In the embodiment of the present invention, verifying the batch files to be verified according to the file information and the pre-obtained reference file information includes:
determining the batch files with suspicious lengths in the batch files to be verified according to the file length information of the batch files to be verified and the reference length information of the batch files, and taking the batch files as batch file verification results;
and determining the space suspicious batch files in the batch files to be verified according to the file space information of the batch files to be verified and the reference space information of the batch files, and taking the space suspicious batch files as the batch file verification result.
In the embodiment of the present invention, the obtaining of the file information of the batch files to be verified includes:
and when the batch is executed, acquiring the time for starting the batch to be executed.
In the embodiment of the present invention, after verifying the batch files to be verified according to the file information and the pre-obtained reference file information, the verifying includes:
and filtering the generated batch file verification results according to a pre-stored exception file list.
Meanwhile, the invention also provides a batch file checking device, which comprises:
the file information acquisition module is used for acquiring file information of the batch files to be verified; the batch file information to be verified comprises: time information of the batch;
the verification module is used for verifying the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information.
In the embodiment of the present invention, the verification module includes:
the time filtering unit is used for filtering the batch files to be verified according to the batch updating time and the time for starting batch execution;
and the time checking unit is used for determining the suspicious time batch files in the filtered batch files to be checked according to the batch definition time, the batch updating time and the batch execution duration and taking the suspicious time batch files as the batch file checking result.
In the embodiment of the present invention, verifying the batch files to be verified according to the file information and the pre-obtained reference file information includes:
the length checking unit is used for determining the batch files with suspicious lengths in the batch files to be checked according to the file length information of the batch files to be checked and the reference length information of the batch files, and the batch files are used as batch file checking results;
and the space checking unit is used for determining a space suspicious batch file in the batch files to be checked according to the file space information of the batch files to be checked and the reference space information of the batch files, and the space suspicious batch files are used as a batch file checking result.
Meanwhile, the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the method when executing the computer program.
Meanwhile, the invention also provides a computer readable storage medium, and a computer program for executing the method is stored in the computer readable storage medium.
The batch file verification method provided by the invention comprises the steps of obtaining file information of a batch file to be verified; the batch file information to be verified comprises: time information of the batch; verifying the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information. A quality control method and practice relating to verification of host batch file system information is provided. By the invention, the quality control of cross-application and cross-service logic aiming at batch files can be completed in the dimension except the service function test and the technical application test. Therefore, batch files are checked without depending on specific business logic and technical logic, cross-application logic check is only performed before and after batch, and the common problem of multiple applications can be transversely found. The quality control of each batch can be completed without manual intervention.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a batch file verification method provided by the present invention;
FIG. 2 is a block diagram of a system architecture of a quality control method and practice for host batch file system information verification according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an internal structure of a file information report printing module according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an internal structure of a date acquisition module according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an internal structure of a standardized module for outputting a file report according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an internal structure of a file date difference checking module according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating an internal structure of a file length check module according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating an internal structure of a file space check module according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of an internal structure of an exception document summarization and output module according to an embodiment of the present disclosure;
FIG. 10 is a process flow diagram of an embodiment of the invention;
FIG. 11 is a block diagram of a batch file verification apparatus provided in the present invention;
fig. 12 is a schematic diagram of an electronic device provided in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make up the blind spot in the respective testing process of the existing batch test, the problem possibly existing in the testing process due to the diversity and complexity of the testing scene and the difference with the batch running of the production environment, the batch process realized by the version, the single scene test is correct, but the continuous running has the problem, the developer modifies a certain program and a result file, but the problem is not reflected in the modification description and the condition of test omission is generated, the invention provides a batch file checking method, as shown in fig. 1, which comprises the following steps:
step S101, acquiring file information of batch files to be verified; the batch file information to be verified comprises: time information of the batch;
step S102, verifying the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information.
According to the batch file verification method provided by the invention, suspicious files in the batch files to be verified are screened and checked directly according to the batch time information of the batch files to be verified and the batch execution time information in the reference file information, so that a dimension beyond a service function test and a technical application test is provided, and the quality control of cross-application and cross-service logic aiming at the batch files is completed.
In the embodiment of the present invention, the batch time information includes: the method comprises the steps that batch definition time and batch updating time of batch files to be verified are obtained;
the batch execution time information comprises: and starting execution time and execution duration of the batch corresponding to the batch file to be verified.
The invention calculates the date difference value of the update date minus the definition date of each file by checking the time difference of the batch files, if the difference value is larger than the batch execution time length which is the period of one batch operation, the file is not initialized at the start of the batch, the batch operation with the residual data of the previous batch is possible, and the phenomenon can cause the problems of repeated data processing of the batch and the like.
Specifically, in the embodiment of the present invention, the verifying the batch files to be verified according to the file information and the pre-obtained reference file information includes:
filtering the batch files to be verified according to the batch updating time and the time for starting batch execution;
and determining the suspicious time batch files in the filtered batch files to be verified according to the batch definition time, the batch update time and the batch execution duration to serve as batch file verification results.
In the embodiment of the invention, the batch files to be verified are filtered according to the batch updating time and the batch execution starting time, the date difference value of the updating date minus the definition date of each file is calculated according to the batch definition time, the batch updating time and the batch execution duration, if the difference value is greater than the batch execution duration which is the period of one batch operation, the difference value indicates that the file is not initialized at the batch starting time, the file may be a batch which is operated with the residual data of the previous batch, and the phenomenon may cause the problems of batch repeated data processing and the like.
Further, in the embodiment of the present invention, the batch file information to be verified further includes: file length information of the batch files to be verified and file space information of the batch files to be verified;
the reference file information further includes: batch file reference length information and batch file reference space information.
Wherein, verifying the batch files to be verified according to the file information and the pre-acquired reference file information comprises:
determining the batch files with suspicious lengths in the batch files to be verified according to the file length information of the batch files to be verified and the reference length information of the batch files, and taking the batch files as batch file verification results;
and determining the space suspicious batch files in the batch files to be verified according to the file space information of the batch files to be verified and the reference space information of the batch files, and taking the space suspicious batch files as the batch file verification result.
Through the file length checking module, the files with the changed file lengths in the batch compared with the last batch can be scanned after the batch execution is finished, and the files are used for focus test attention.
Through the file space checking module, files with larger fluctuation of the file space of the batch and files with larger absolute values of the file space can be scanned out compared with the previous batch after the batch execution is finished. The method is used for predicting the volume of the concerned files, the surge of the special date traffic and the like.
Further, in the embodiment of the present invention, after verifying the batch files to be verified according to the file information and the pre-obtained reference file information, the method includes:
and filtering the generated batch file verification results according to a pre-stored exception file list.
It is often necessary for certain suspicious files to have a technical tester to confirm individually whether the results are at risk. If the file appears repeatedly, the test resources are wasted. Therefore, in the embodiment of the invention, the exception files are pre-registered, the exception file list is pre-registered and stored, and the files which are confirmed to be correct are filtered by utilizing the file list, so that the workload of test confirmation is reduced.
The embodiment of the invention aims to provide a quality control method and device aiming at host batch file system information verification. As shown in fig. 2, the quality control apparatus for checking host batch file system information provided in this embodiment is provided.
Wherein, the device includes: the system comprises a file information report printing module 1, a date acquisition module 2, a file report output standardization module 3, a file date difference checking module 4, a file length checking module 5, a file space checking module 6, an exception file registration module 7 and an exception file summarizing and output module 8.
In the embodiment of the invention, the host machines are operated in batch in the production environment, and the batch is completed in the same day. The batch takes approximately 3 days to run in the test environment. The file information report printing module 1 prints file information of all files with specified naming specifications (with wildcards), such as length, size, usage rate, definition date, update date, and the like. The file report form standardization module 3 arranges the report form file format into a standard format and simultaneously performs a round of data cleaning. The file space checking module 6 outputs the file with abnormal space change and abnormal space. The length change file is output by the file length check module 5. Through the date acquisition module 2, the natural date and the batch date of the test environment batch start can be acquired. Further, the file date difference check module 4 outputs a file which is not defined according to the development specification defined and used later. And filtering the manually defined problem-free file from the execution result through an exception file filtering module 7, and accumulating and saving the unfiltered contents into an abnormal output file.
Specifically, the functions of the modules in this embodiment are described as follows:
the file information report printing module 1 is used for defining the range of the collection files and the information collection and printing of the definition files. And is in communication connection with the file report output standardization module 3.
And the date acquisition module 2 is used for acquiring natural dates, system dates and batch dates used in the tool and is in communication connection with the file report output standardization module 3, the file date difference checking module 4 and the abnormal file summarizing and output module 8.
And the file report output standardization module 3 is used for standardizing and arranging file report information and then checking file space, file length change and file date difference. Therefore, the system is in communication connection with the file information report printing module 1, the file date difference checking module 4, the file length checking module 5 and the file space checking module 6.
The file date difference checking module 4 is used for scanning files with file update dates larger than the file definition dates (namely, date differences). And the data acquisition module is in communication connection with the file report output standardization module 3, the date acquisition module 2 and the exception file registration module 7.
And the file length checking module 5 is used for scanning the files with variable lengths. And the data acquisition module is in communication connection with the file report output standardization module 3, the date acquisition module 2 and the exception file registration module 7.
And the file space checking module 6 is used for scanning files with large space, small space and abnormal fluctuation of space. And the data acquisition module is in communication connection with the file report output standardization module 3, the date acquisition module 2 and the exception file registration module 7.
And an exception file registration module 7 for registering an exception file list. If some files appear in the inspection result every time, but the files do not belong to the abnormal files after being confirmed, the part of files are registered in the exception file list, and the abnormal file summary does not contain the part of files. The system is in communication connection with a file length checking module 5, a file space checking module 6, a file date difference checking module 4 and an abnormal file summarizing and outputting module 8.
And the abnormal file summarizing and outputting module 8 is used for summarizing the abnormal files output by each round of the checking modules, and the output needs to use file lists with various dates and filtered files. Therefore, the date acquisition module 2 and the exception file registration module 7 are connected in communication.
Fig. 3 is a schematic diagram of the internal structure of the summarized file information report printing module 1 in the embodiment.
As shown in fig. 3, the file information report printing module 1 includes: a definition file range unit 11, a definition output content unit 12 and a report printing unit 13. Wherein:
and a file range defining unit 11 for defining the tool to be included in a printed file list and supporting wildcard matching.
And the definition output content unit 12 is used for defining the content of the file report printing output by the tool, such as the full name of the file, the space of the file, the length of the file, the definition date of the file and the like.
The report printing unit 13 prints the list according to the file range and the file output content.
Fig. 4 is a schematic view of the internal structure of the date acquisition module 2.
As shown in fig. 4, in the embodiment of the present invention, the date acquiring module 2 includes: the natural date acquisition unit 21, the solar day conversion unit 22, the filter condition splicing unit 23, the batch date acquisition unit 24, and the date acquisition module 2 are automatically turned up at the start of the batch.
Wherein: a natural date acquiring unit 21 for acquiring a natural date at the start of the batch. (e.g., 20200125). In the output result of the report printing unit 13, the dates of the documents are all the sun dates. Therefore, the solar-day conversion unit 22 is required to convert the natural date of the batch just started to the solar day. (e.g., 20200125- >2020025, i.e., 2020, day 25). The date of the solar day at the start of the batch of the previous unit is then spliced into a filter code by the filter condition splicing unit 23. The batch date acquiring unit 24 acquires the batch date of the current batch.
In other words, in the embodiment of the present invention, the batch definition time and the batch update time of the batch files to be verified and the time for starting execution of the batch corresponding to the batch files to be verified are converted, and the natural date of the file is converted into the sun date to be spliced into the filter code.
In addition, because the batch running time of the test environment exceeds one day, the system date is not switched along with the natural day, and the system date is arranged according to a special test plan. In the batch start phase, the batch of the batch is equal to the system date. This date is used to facilitate validation of the batch of exception data generation when the file is finally exported.
Fig. 5 is a schematic diagram of the internal structure of the file report output standardizing module 3.
As shown in fig. 5, the schema file report output standardization module 3 includes: an effective information screening unit 31, a changed file screening unit 32, an output format standardizing unit 33, and an output deduplication unit 34. Wherein
The effective information screening unit 31 is configured to filter non-data contents such as a line break and an empty line in the file report, and only effective data is saved as a result.
And a changed file screening unit 32, configured to screen out, according to the last update date of all the files, the files with the natural date being greater than or equal to the current time by using the filtering condition generated by the condition splicing unit 23, where the files are changed in the current batch.
And an output format standardizing unit 33 for standardizing spaces between columns of the file.
And an output deduplication unit 34 for performing deduplication on the results.
Fig. 6 is a schematic diagram of the internal structure of the file date difference checking module 4, which includes, as shown in fig. 6: a date difference calculating unit 41 and a date difference screening unit 42.
Wherein the date difference of the part of the file update date minus the definition date is calculated by the date difference calculating unit 41. Assume a test environment run period of 5 days for a single batch. Therefore, the date difference screening unit 42 sets, as the scanning result of the file date difference checking module, a file whose date difference is greater than 5 days, which belongs to a file whose file definition is not performed at the start of the batch.
Fig. 7 is a schematic diagram of the internal structure of the file length check module 5.
As shown in fig. 7, the recipe file length check module 5 includes: a file length reference initializing unit 50, a file length information extracting unit 51, a file length comparing unit 52, and a file length reference information synchronizing unit 53.
The file length reference initializing unit 50 is configured to retain the file length reference information, and is used only once when the tool is first brought online, and is updated by the file length reference information synchronizing unit 53 from the second time.
That is, in the embodiment of the present invention, the batch file reference length information includes: the length information of the batch on-line for the first time and the length information of the batch after the last execution.
A file length information extraction unit 51 for extracting a file name and a file length from the result of the output deduplication unit 34. The comparison with the reserved reference information of the file length is performed by the file length comparison unit 52. And comparing the result of the file length change to obtain a scanning result of the file length checking module.
The file length reference information synchronizing section 53 writes the current check result into file length reference information, and uses the file length reference information as reference information for the next time of alignment.
Fig. 8 is a schematic diagram of the internal structure of the file space check module 6.
As shown in fig. 8, the file space checking module 6 includes: a file space reference initialization unit 60, a file space information extraction unit 61, a file space fluctuation unit 62, a file space reference information synchronization unit 63, and a file space abnormality check unit 64.
The file space reference initialization unit 60 is configured to retain the file space reference information, and is used only once when the tool is first brought online, and is updated by the file space reference information synchronization unit 63 at the second time.
The batch file reference space information comprises: the space information of the batch on-line for the first time and the space information of the batch after the last execution.
A file space information extracting unit 61 for extracting a file name and a file space from the result of the output deduplication unit 34. The file space fluctuation unit 62 compares the file space reference information with the reserved file space reference information and judges the fluctuation space. The result of the file space fluctuation is one of the scanning results of the file space check module.
The file space reference information synchronizing unit 63 writes the current check result into the file space reference information, and uses it as reference information for the next time of alignment.
The document space anomaly checking unit 64 scans the document space anomaly, such as a document larger than the threshold, as the second result of the document space checking module, such as a document with a small margin threshold, as the third result of the document space checking module.
The exception file registration module is used for registering exception file names, exception types and user names of the inspection results. The exception types comprise date difference, length variation, space fluctuation, large space exception, small space exception and the like. When a certain file exists in the tool scanning result every time, the file is not correct after being actually confirmed, but still appears in the next scanning result.
For example, some files are identified as undefined per batch, used directly for rolling the results of each batch, but will appear in the results of the date difference scan each time. For example, some error result files are always empty without errors, so that the file space is always empty without problems.
Fig. 9 is a schematic diagram of the internal structure of the exception document summarization and output module 8.
As shown in fig. 9, the exception document summarization and output module 8 includes: a date difference file filtering and summarizing unit 81, a length change file filtering and summarizing unit 82, a spatial fluctuation file filtering and summarizing unit 83, a spatial abnormal file filtering and summarizing unit 84, and a file monitoring result loading unit 85.
The date difference file filtering and summarizing unit 81 compares the date difference with the result file, removes the file date difference exception file registered in the exception file registration unit, and saves the result as the current batch of file date difference regular file list. The length change file list, the space fluctuation file list and the space abnormal file list are respectively matched with exceptional files of corresponding types, the exceptional files are deleted from the original list after being matched, and the rest files are respectively stored as corresponding result files and stored in the length change file filtering and summarizing unit 82, the space fluctuation file filtering and summarizing unit 83 and the space abnormal file filtering and summarizing unit 84.
The file monitoring result loading unit 85 loads different types of result files into different data tables. The loading is marked by the batch date generated by the use unit 34.
Fig. 10 is a flowchart of a process of verifying batch files by the quality control device for verifying host batch file system information according to the present invention, and the process includes the following steps:
step S01: acquiring a date; and the host starts to execute in batches and triggers a date acquisition operation.
The invention is used for monitoring the quality of the whole process of the host batch flow. The quality control device for checking the host batch file system information is divided into two parts, wherein the first part is automatically called up when the batch execution is started.
The date acquisition module 2 acquires the calendar date, which is the natural date when the batch is executed, by the natural date acquisition unit 21. It is converted to a solar day by the solar day conversion unit 22 and this date is spliced into the filter terms by the filter term splicing unit 23 for use by the second part of the quality control device for host batch file system information verification.
Meanwhile, at this time, the batch date of the current batch is also obtained through the batch date obtaining unit 24, and is used by the second part of the quality control device for checking the batch file system information of the industrial and host computers.
Step S02: receiving a user-defined scope of the inspection file;
the invention is used for monitoring the quality of the whole process of the host batch flow. The part of the tool execution is split into two parts, this and the following steps are the second part of the tool practice, and are automatically called up after the batch execution is finished.
The user defines a file list to be checked by the definition file range unit 11 in the file report printing module 1.
For example: NGFPRAS, NGFLOAN
The representative user wants to check all files with filenames beginning with NGFPRAS, all files beginning with NGFLOAN.
The content of the output file report printing of the tool is defined through the definition output content unit 12, and the content is generally not changed after being primarily defined.
For example: file name, file space, file usage, file length, file definition date, file update date, etc.
And after the definition of the file checking range and the file output content is finished, the waiting tool outputs file list report information through the report printing unit.
For example:
Figure BDA0002923249320000111
step S03: the output of the file report is standardized; after the information of the file list report is finished, the format and the data of the result are standardized through the file report output standardization module. In the effective information filtering unit 31, contents such as an empty line, a line break, a page break in the report are filtered to obtain a continuous data file. Then, the condition of the filter condition splicing unit 23 is used for filtering in the changed file screening unit 32, so as to obtain the list of files used in batch at this time. The spaces between columns of the file are normalized by the output format normalizing unit 33. And finally, the result is subjected to deduplication through a deduplication unit.
Example (c): assume that processing is done for three files:
Figure BDA0002923249320000121
the natural date is 2020-01-27, and is converted into 20200127 by unit 33, at this time, after passing unit 42, because of the condition date of last update date of ngfpras.a2 file, the filtered result only retains files ngfpras.a1 and ngfpras.a 3.
And an output format standardization unit 33 for defining the filtered data format. E.g., bits 1 through 45 are file names, bits 46 are empty, bits 47 through 57 are file spaces, etc.
Step S04: checking the file date; the previous step has completed the standardization of the result file, which is checked by this step for date difference. First, the date difference calculating unit 51 calculates the date difference of the update date minus the definition date for each file. The date difference filter unit 52 is further used, and if the difference is greater than the period of a batch run (e.g., 5 days), it indicates that the file is not initialized at the start of the batch. It is possible to run a batch with the residual data of the previous batch. Such phenomena may cause problems with batch repeat processing of data.
For example. The date difference is calculated for ngfpras.a1, ngfpras.a3 files as follows:
Figure BDA0002923249320000122
and screening files according to the date difference, wherein the date difference is more than 5 days. The result is that the ngfpras.a3 file is a suspect file.
Step S05: checking the change of the file length;
for the batch update file generated in step S03, in this step, through the file length check module, after the batch execution is completed, a file whose file length is changed in this batch compared to the last batch may be scanned. For stress testing concerns.
Step S06: checking a file space;
for the batch update files generated in step S03, in this step, through the file space check module, after the batch execution is completed, the files with the file space fluctuating greatly and the files with the file space absolute value larger in this batch than the files with the file space fluctuating greatly in the last batch can be scanned. The method is used for predicting the volume of the concerned files, the surge of the special date traffic and the like. Meanwhile, a file with a file space of 0 all the time can be generated for paying attention to the test coverage.
Step S07: registering exception files;
there may be a large number of files for the results generated, such files often requiring a skilled tester to confirm individually whether the results are at risk. If the file appears repeatedly, the test resources are wasted. Therefore, the exception file registration module registers the exception file list, filters the files which are confirmed to be correct, and reduces the workload of test confirmation.
Step S08: the suspicious list results generated in step S04, step S05, and step S06 are filtered through the exception file list set in step S07 in this step, and a check result file list for each check item is generated.
Meanwhile, the present invention also provides a batch file verification apparatus, as shown in fig. 11, which includes:
a file information obtaining module 1101, configured to obtain file information of a batch of files to be verified; the batch file information to be verified comprises: time information of the batch;
the verification module 1102 is configured to verify the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information.
In this embodiment of the present invention, the checking module 1102 includes:
the time filtering unit is used for filtering the batch files to be verified according to the batch updating time and the time for starting batch execution;
and the time checking unit is used for determining the suspicious time batch files in the filtered batch files to be checked according to the batch definition time, the batch updating time and the batch execution duration and taking the suspicious time batch files as the batch file checking result.
In the embodiment of the present invention, verifying the batch files to be verified according to the file information and the pre-obtained reference file information includes:
the length checking unit is used for determining the batch files with suspicious lengths in the batch files to be checked according to the file length information of the batch files to be checked and the reference length information of the batch files, and the batch files are used as batch file checking results;
and the space checking unit is used for determining a space suspicious batch file in the batch files to be checked according to the file space information of the batch files to be checked and the reference space information of the batch files, and the space suspicious batch files are used as a batch file checking result.
The invention provides a batch file verification device, and provides a quality control method and practice for host batch file system information verification. By the invention, the quality control of cross-application and cross-service logic aiming at batch files can be completed in the dimension except the service function test and the technical application test. The batch file checking and checking realized by the device of the invention does not depend on specific service logic and technical logic, and cross-application logic checking is only carried out before and after batch, so that the common problem of a plurality of applications can be transversely found. And the quality control of each batch can be completed without manual intervention aiming at the inspection algorithm.
It should be noted that the batch file verification method and apparatus disclosed by the present disclosure may be used for verification processing of batch files in the financial field, and may also be used for processing of batch files in any field other than the financial field.
The present embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, and the like, but is not limited thereto. In this embodiment, the electronic device may refer to the embodiments of the method and the apparatus, and the contents thereof are incorporated herein, and repeated descriptions are omitted.
Fig. 12 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention. As shown in fig. 12, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. Notably, this diagram is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the bulk file verification function may be integrated into the central processor 100. The central processor 100 may be configured to control as follows:
the batch file verification method comprises the following steps:
acquiring file information of batch files to be verified; the batch file information to be verified comprises: time information of the batch;
verifying the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information.
In the embodiment of the present invention, the batch time information includes: the method comprises the steps that batch definition time and batch updating time of batch files to be verified are obtained;
the batch execution time information comprises: and starting execution time and execution duration of the batch corresponding to the batch file to be verified.
In the embodiment of the present invention, the verifying the batch files to be verified according to the file information and the pre-obtained reference file information includes:
filtering the batch files to be verified according to the batch updating time and the time for starting batch execution;
and determining the suspicious time batch files in the filtered batch files to be verified according to the batch definition time, the batch update time and the batch execution duration to serve as batch file verification results.
In the embodiment of the present invention, the batch file information to be verified further includes: file length information of the batch files to be verified and file space information of the batch files to be verified;
the reference file information further includes: batch file reference length information and batch file reference space information.
In the embodiment of the present invention, verifying the batch files to be verified according to the file information and the pre-obtained reference file information includes:
determining the batch files with suspicious lengths in the batch files to be verified according to the file length information of the batch files to be verified and the reference length information of the batch files, and taking the batch files as batch file verification results;
and determining the space suspicious batch files in the batch files to be verified according to the file space information of the batch files to be verified and the reference space information of the batch files, and taking the space suspicious batch files as the batch file verification result.
In the embodiment of the present invention, the obtaining of the file information of the batch files to be verified includes:
and when the batch is executed, acquiring the time for starting the batch to be executed.
In the embodiment of the present invention, after verifying the batch files to be verified according to the file information and the pre-obtained reference file information, the verifying includes:
and filtering the generated batch file verification results according to a pre-stored exception file list.
In another embodiment, the batch file verification apparatus may be configured separately from the central processor 100, for example, the batch file verification apparatus may be configured as a chip connected to the central processor 100, and the batch file verification function is realized by the control of the central processor.
As shown in fig. 12, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in fig. 12; furthermore, the electronic device 600 may also comprise components not shown in fig. 12, which may be referred to in the prior art.
As shown in fig. 12, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
An embodiment of the present invention further provides a computer-readable program, where when the program is executed in an electronic device, the program enables a computer to execute the batch file verification method in the electronic device according to the above embodiment.
The embodiment of the present invention further provides a storage medium storing a computer-readable program, where the computer-readable program enables a computer to execute the batch file verification described in the above embodiment in an electronic device.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings. The many features and advantages of the embodiments are apparent from the detailed specification, and thus, it is intended by the appended claims to cover all such features and advantages of the embodiments that fall within the true spirit and scope thereof. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the embodiments of the invention to the exact construction and operation illustrated and described, and accordingly, all suitable modifications and equivalents may be resorted to, falling within the scope thereof.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for verifying batch files is characterized by comprising the following steps:
acquiring file information of batch files to be verified; the batch file information to be verified comprises: time information of the batch;
verifying the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information.
2. The batch file verification method of claim 1,
the batch time information comprises: the method comprises the steps that batch definition time and batch updating time of batch files to be verified are obtained;
the batch execution time information comprises: and starting execution time and execution duration of the batch corresponding to the batch file to be verified.
3. The batch file verification method of claim 2, wherein the verifying the batch files to be verified according to the file information and the pre-acquired reference file information comprises:
filtering the batch files to be verified according to the batch updating time and the time for starting batch execution;
and determining the suspicious time batch files in the filtered batch files to be verified according to the batch definition time, the batch update time and the batch execution duration to serve as batch file verification results.
4. The batch file verification method of claim 1,
the batch file information to be verified further comprises: file length information of the batch files to be verified and file space information of the batch files to be verified;
the reference file information further includes: batch file reference length information and batch file reference space information.
5. The batch file verification method of claim 4, wherein verifying the batch files to be verified according to the file information and pre-acquired reference file information comprises:
determining the batch files with suspicious lengths in the batch files to be verified according to the file length information of the batch files to be verified and the reference length information of the batch files, and taking the batch files as batch file verification results;
and determining the space suspicious batch files in the batch files to be verified according to the file space information of the batch files to be verified and the reference space information of the batch files, and taking the space suspicious batch files as the batch file verification result.
6. The batch file verification method of claim 1, wherein the obtaining of the file information of the batch files to be verified comprises:
and when the batch is executed, acquiring the time for starting the batch to be executed.
7. The batch file verification method of claim 4, wherein after verifying the batch files to be verified according to the file information and the pre-obtained reference file information, the method comprises:
and filtering the generated batch file verification results according to a pre-stored exception file list.
8. An apparatus for verifying a batch of files, said apparatus comprising:
the file information acquisition module is used for acquiring file information of the batch files to be verified; the batch file information to be verified comprises: time information of the batch;
the verification module is used for verifying the batch files to be verified according to the file information and pre-acquired reference file information; the reference file information includes: and carrying out batch execution time information.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 7.
CN202110124846.6A 2021-01-29 2021-01-29 Batch file verification method and device Active CN112799945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110124846.6A CN112799945B (en) 2021-01-29 2021-01-29 Batch file verification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110124846.6A CN112799945B (en) 2021-01-29 2021-01-29 Batch file verification method and device

Publications (2)

Publication Number Publication Date
CN112799945A true CN112799945A (en) 2021-05-14
CN112799945B CN112799945B (en) 2024-03-15

Family

ID=75812767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110124846.6A Active CN112799945B (en) 2021-01-29 2021-01-29 Batch file verification method and device

Country Status (1)

Country Link
CN (1) CN112799945B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113570255A (en) * 2021-07-30 2021-10-29 上海通联金融服务有限公司 Quality detection method for batch processing files

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679146A (en) * 2017-09-25 2018-02-09 南方电网科学研究院有限责任公司 The method of calibration and system of electric network data quality
CN107977206A (en) * 2017-11-14 2018-05-01 北京思特奇信息技术股份有限公司 A kind of batch service data file processing method and device
CN110297711A (en) * 2019-05-16 2019-10-01 平安科技(深圳)有限公司 Batch data processing method, device, computer equipment and storage medium
CN112114903A (en) * 2020-09-28 2020-12-22 中国银行股份有限公司 File loading method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107679146A (en) * 2017-09-25 2018-02-09 南方电网科学研究院有限责任公司 The method of calibration and system of electric network data quality
CN107977206A (en) * 2017-11-14 2018-05-01 北京思特奇信息技术股份有限公司 A kind of batch service data file processing method and device
CN110297711A (en) * 2019-05-16 2019-10-01 平安科技(深圳)有限公司 Batch data processing method, device, computer equipment and storage medium
CN112114903A (en) * 2020-09-28 2020-12-22 中国银行股份有限公司 File loading method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113570255A (en) * 2021-07-30 2021-10-29 上海通联金融服务有限公司 Quality detection method for batch processing files

Also Published As

Publication number Publication date
CN112799945B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
US7613916B2 (en) Method for burning chips
CN102289484A (en) Method for scanning multimedia files of storage equipment based on android system
CN112650685A (en) Automatic testing method and device, electronic equipment and computer storage medium
CN110780883A (en) Method call chain tracking method, electronic device, and computer-readable storage medium
CN112799945A (en) Batch file verification method and device
US20110099150A1 (en) Method for a cloning process to enable cloning a larger System drive to a smaller system
CN112116274A (en) Automatic generation method and device of survey report
CN113986759A (en) Business processing flow acquisition method, business architecture flow verification method and system
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN112712610A (en) Vehicle diagnosis log processing method and device, terminal device and readable storage medium
CN111723007A (en) Test case merging method, system, equipment and medium
CN111142965A (en) Language configuration method and device, electronic equipment and storage medium
CN113297076B (en) Service change identification method and device based on call chain diagram
CN115543227B (en) Cross-system data migration method, system, electronic device and storage medium
US11868766B2 (en) Method and system for identifying duplicate cascading style sheets (CSS) selector declarations
CN113052463B (en) Workflow verification method, workflow verification device, computer equipment and storage medium
CN110908960B (en) Electronic equipment and content detection and removal method thereof
CN112905459B (en) Service interface testing method and device, electronic equipment and storage medium
CN110895511B (en) Authentication method and equipment of operating system and storage medium
CN115016974A (en) Method and device for checking host computer specification in batches
CN111125117A (en) Account checking processing method and device
CN111738733A (en) Method and device for processing suspicious account operation
CN115328722A (en) Data analysis method and device, storage medium and terminal
CN112035162A (en) Configuration file batch modification method and device
CN114760504A (en) Live broadcast server testing method and device, storage medium and electronic equipment

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