File comparison method and device and computer equipment

By setting a file comparison method in downstream devices, the batch file changes of upstream devices are automatically verified, which solves the problem of inefficient manual verification in the prior art, and realizes efficient and low-cost file program change detection.

CN120387435APending Publication Date: 2025-07-29INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410701486.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In the prior art, batch files sent by upstream equipment to downstream equipment may change, resulting in inconsistent data, manual verification by business personnel is inefficient and prone to errors, and cannot detect changes in file programs in time.

Method used

By setting up a file comparison method in the downstream equipment, selecting the first batch of files, and comparing it with the second batch of files that meet the set conditions, generating information to indicate whether the file program has changed, improving verification efficiency and saving labor costs.

Benefits of technology

Automatic verification of batch files of upstream equipment has been realized, verification efficiency has been improved, labor costs have been reduced, and changes in file programs have been discovered in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387435A_ABST
    Figure CN120387435A_ABST
Patent Text Reader

Abstract

The invention discloses a file comparison method and device and computer equipment, which can be applied to the technical field of financial science and technology, and can also be applied to the technical field of intelligent operation and maintenance and the technical field of software testing. The file comparison method comprises the steps that a first batch file is selected under a first file path, and the first file path is used for storing batch files which are sent by upstream equipment and are not loaded by downstream equipment; whether a second batch of files exist in the first file path or not is judged, the second batch of files and the first batch of files have the same purpose, and a first time interval between generation times meets a set condition; if the second batch of files exist, comparing the content of the second batch of files with the content of the first batch of files; if the content of the second batch file is different from that of the first batch file, first information is generated, and the first information is used for representing that the file program changes in the first time interval. The batch file verification efficiency can be improved, and the labor cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the technical field of fintech, and also relates to the technical fields of intelligent operation and maintenance and software testing. In particular, it relates to a file comparison method, apparatus, and computer device. Background Art

[0002] In financial services, an upstream device may send batch files to a downstream device. The downstream device may process the batch files sent by the upstream device. In the prior art, the batch files sent by the upstream device to the downstream device may have changes such as data format changes. To avoid abnormal operations of the downstream device, business personnel need to manually verify each batch file sent by the upstream device. After passing the verification, the downstream device can process the batch files sent by the upstream device.

[0003] However, the time when the upstream device sends batch files to the downstream device is uncertain, and the size of the batch files is also uncertain. Moreover, the number of batch files sent by the upstream device to the downstream device is large. This makes it inefficient and error-prone for business personnel to detect whether the batch files sent by the upstream device to the downstream device have changed through manual verification. Summary of the Invention

[0004] Embodiments of this specification provide a file comparison method, apparatus, and computer device, which can verify the batch files sent by the upstream device through file comparison, improve the verification efficiency, and save labor costs.

[0005] Embodiments of this specification provide a file comparison method, including:

[0006] Select a first batch file under a first file path, where the first file path is used to store batch files sent by the upstream device and not yet loaded by the downstream device, and the batch files are generated by a file program of the upstream device;

[0007] Determine whether there is a second batch file under the first file path, where the second batch file has the same purpose as the first batch file and the first time interval between the generation times satisfies a set condition;

[0008] If there is a second batch file, compare the content of the second batch file with the content of the first batch file;

[0009] If the content of the second batch file is different from the content of the first batch file, generate a first piece of information, where the first piece of information is used to indicate that the file program has changed within the first time interval.

[0010] Embodiments of this specification also provide a file comparison apparatus, including:

[0011] A selection unit for selecting a first batch of files under a first file path, where the first file path is used to store batch files sent by an upstream device and not yet loaded by a downstream device, and the batch files are generated by a file program of the upstream device;

[0012] A judgment unit for judging whether there is a second batch of files under the first file path, where the second batch of files has the same purpose as the first batch of files and the first time interval between the generation times satisfies a set condition;

[0013] A comparison unit for comparing the content of the second batch of files with the content of the first batch of files if there is a second batch of files;

[0014] A generation unit for generating a first piece of information if the content of the second batch of files is different from the content of the first batch of files, where the first piece of information is used to indicate that the file program has changed during the first time interval.

[0015] An embodiment of this specification also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above file comparison method is implemented.

[0016] An embodiment of this specification also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above file comparison method is implemented.

[0017] An embodiment of this specification also provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the above file comparison method is implemented.

[0018] The technical solution of the embodiment of this specification can select a first batch of files under the first file path. The first file path is used to save the batch files sent by the upstream device and not yet loaded by the downstream device. The batch files are generated by the file program of the upstream device. It can be determined whether there is a second batch of files under the first file path. The second batch of files has the same purpose as the first batch of files, and the first time interval between the generation times meets the set conditions. If there is a second batch of files, the content of the second batch of files can be compared with the content of the first batch of files. If the content of the second batch of files is different from the content of the first batch of files, a first piece of information can be generated. The first piece of information is used to indicate that the file program has changed within the first time interval. In this way, by comparing the first batch of files with a specific second batch of files, the verification of the first batch of files can be realized. Verifying the batch files of the upstream device by means of file comparison can improve the verification efficiency and save labor costs. In addition, when the content of the first batch of files is different from the content of the second batch of files, a first piece of information can also be generated. The first piece of information can indicate that the application program of the upstream device has changed within the first time interval. In this way, by means of file comparison, it can also be used to assist in judging the change situation of the application program of the upstream device. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. The following drawings are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0020] Figure 1 It is a schematic flow chart of the file comparison method in the embodiment of this specification;

[0021] Figure 2 It is a schematic flow chart of the file comparison method in the embodiment of this specification;

[0022] Figure 3 It is a schematic structural diagram of the file comparison device in the embodiment of this specification. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0023] Next, the technical solutions in the embodiments of this specification will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. The specific embodiments described herein are only used to explain the present disclosure, rather than limiting the present disclosure. Based on the described embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present disclosure. In addition, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0024] An embodiment of this specification provides a file comparison system. The file comparison system may include an upstream device and a downstream device. The upstream device may include a server, a distributed service cluster including multiple servers, etc. The downstream device may include a server, a distributed server cluster including multiple servers, etc. The upstream device may generate a batch of files through a file program and send the generated batch of files to the downstream device. For example, the upstream device may read data from a first data table through a file program and generate a batch of files based on the read data. The downstream device may receive the batch of files sent by the upstream device and thus process the received batch of files. For example, the downstream device may load the batch of files and read the data in the batch of files into a second data table. In this way, through the batch of files, the data consistency between the upstream device and the downstream device can be ensured. For example, the data in the first data table and the second data table can be made consistent. The batch of files may include multiple pieces of data, such as multiple transaction records, customer data (such as customer names, account numbers), etc. The multiple pieces of data in the batch of files can be processed uniformly in one task, thereby improving the processing efficiency.

[0025] Due to various reasons, the file program in the upstream device may be modified, so that the batch of files sent by the upstream device to the downstream device may change. For example, the data format changes, or the number of fields changes. However, the upstream device may not timely inform the downstream device of such changes. For example, in a test scenario, the version of the file program needs to be upgraded and iterated. The batch of files generated by different versions of the file program may change.

[0026] In the prior art, in order to avoid data inconsistency between upstream devices and downstream devices, business personnel need to manually verify the batch files sent by upstream devices. After passing the verification, the downstream devices can process the batch files sent by the upstream devices. If the verification fails, it means that the file program of the upstream device may have been modified. However, the time for the upstream device to send batch files to the downstream device is uncertain, and the size of the batch files is also uncertain. Moreover, the number of batch files sent by the upstream device to the downstream device is large. It is inefficient and error-prone for business personnel to detect whether the batch files sent by the upstream device to the downstream device have changed through manual verification. For example, in a test environment, the daily cut-off time of the upstream device may not be continuous. Specifically, for example, the host date of the upstream device may switch from May 24th to May 27th, rather than from May 24th to May 25th. Due to the discontinuous and unpredictable daily cut-off time, business personnel often need to manually verify the batch files under all host dates, resulting in a large number of batch files that need to be manually verified.

[0027] In some embodiments, after generating a batch file through a file program, an upstream device may send the batch file to a downstream device. The downstream device may receive the batch file and store the received batch file in a first file path. The first file path is used to save batch files sent by the upstream device and not yet loaded by the downstream device. The first file path may store one or more batch files. After meeting the processing conditions, the downstream device may select a batch file from the first file path as a first batch file; it may determine whether there is a second batch file in the first file path, where the second batch file has the same purpose as the first batch file and the first time interval between the generation times meets the set conditions; if there is a second batch file, it may compare the content of the second batch file with that of the first batch file; if the content of the second batch file is different from that of the first batch file, it may generate a first message, where the first message is used to indicate that the file program has changed within the first time interval; if the content of the second batch file is the same as that of the first batch file, it may load the content in the first batch file; it may update local data according to the loaded content; it may move the first batch file from the first file path to a second file path, where the second file path is used to save batch files sent by the upstream device and already loaded by the downstream device. Additionally, if there is no second batch file, the downstream device may determine whether there is a third batch file in the second file path, where the third batch file has the same purpose as the first batch file and the second time interval between the generation times meets the set conditions; if there is no third batch file, it may generate a second message, where the second message indicates that the first batch file is a newly added file; if there is a third batch file, it may compare the content of the third batch file with that of the first batch file; if the content of the third batch file is different from that of the first batch file, it may generate a third message, where the third message is used to indicate that the file program has changed within the second time interval. In this way, the downstream device can verify the first batch file by comparing it with a specific second batch file or third batch file. Verifying the batch file of the upstream device by file comparison can improve the verification efficiency and save labor costs.

[0028] Please refer to Figure 1 and Figure 2 . Embodiments of this specification provide a file comparison method.

[0029] The method may be applied to a downstream device. The method may include the following steps.

[0030] Step 11: Select a first batch file from the first file path. The first file path is used to save batch files sent by the upstream device and not yet loaded by the downstream device, and the batch file is generated by the file program of the upstream device.

[0031] In some embodiments, the first file path is a file path in the downstream device. The first file path is used to store batch files sent by the upstream device and not yet loaded by the downstream device. There may be one or more batch files under the first file path. The batch files may be generated by a file program of the upstream device. The batch files may include multiple pieces of data, such as multiple transaction records, customer data (such as customer names, account numbers), etc. The multiple pieces of data in the batch files can be processed uniformly in one task, thereby improving processing efficiency. For example, the first file path may point to a first folder. The first folder is used to store batch files sent by the upstream device and not yet loaded by the downstream device. The first folder may be, for example, recv.

[0032] In some embodiments, the batch files under the first file path may have identification information. The identification information is used to identify the batch files. The identification information may include the names of the batch files, etc. The identification information may include usage sub-information and time sub-information. The usage sub-information is used to indicate the usage of the batch file. The usage can be determined according to the functions, purposes, application scenarios, etc. of the batch file. For example, if the data in the batch file is customer data, the usage of the batch file is customer information maintenance. Another example is that if the data in the batch file is transaction records, the usage of the batch file is transaction record synchronization. The usage sub-information may include the name or code of the usage, etc. The time sub-information is used to indicate the time when the file program generates the batch file. The time sub-information may include the code of the time, etc. For example, the identification information of a certain batch file is CRM_C_GROUP_SET_INF-20231231, where CRM_C_GROUP_SET_INF is the usage sub-information and 20231231 is the time sub-information. Another example is that the identification information of a certain batch file is CRM_C_GROUP_SET_INF-20231126, where CRM_C_GROUP_SET_INF is the usage sub-information and 20231126 is the time sub-information.

[0033] In some embodiments, the upstream device can generate batch files through a file program and send the generated batch files to the downstream device. The downstream device can receive the batch files and store the received batch files under the first file path. In this way, the downstream device can uniformly store the newly downloaded batch files from the upstream device under the first file path.

[0034] For example, an upstream device may have a first data table. The first data table is used to store data to be synchronized to a downstream device, such as AC records, customer data, etc. Then, the upstream device can read data from the first data table through a file program, generate a batch file based on the read data, and send the generated batch file to the downstream device.

[0035] In some embodiments, the first batch file is a batch file to be verified under a first file path.

[0036] After meeting the processing conditions, a first batch file can be selected under the first file path. The processing conditions may include reaching a set time. For example, a first batch file can be selected at the set time every day. Or, the processing conditions may further include that there is a batch file in the first file path whose generation time matches the current time of the downstream device. Among them, the generation time of the batch file can be determined according to the identification information of the batch file. For example, a time sub-information can be obtained from the identification information of the batch file, and the generation time of the batch file can be determined according to the time sub-information. The matching may include that the generation time and the current time are the same at the day granularity. That is, the generation time and the current time point to the same day. For example, a first batch file can be selected when there is a batch file generated on the same day in the first file path.

[0037] The time in the embodiments of this specification may include a date (such as year, month, day). Or, the time in the embodiments of this specification may include a date and may also include a time (such as hour, minute, second). Thus, time can be characterized at a finer granularity.

[0038] In some embodiments, after meeting the processing conditions, a batch file can be selected under the first file path, and the selected batch file can be used as the first batch file. Or, the first file path may include batch files that need to be verified and batch files that do not need to be verified. Then, list data can be provided. The list data may contain one or more identification information, and the one or more identification information is used to identify the batch files that do not need to be verified. In this way, after meeting the processing conditions, a batch file can be selected under the first file path; the identification information of the selected batch file can be matched in the list data; if the match fails, it means that the selected batch file is a batch file that needs to be verified, and the selected batch file can be used as the first batch file. If the match is successful, it means that the selected batch file is a batch file that does not need to be verified, and the selected batch file can be ignored. In some examples, if the match is successful, a batch file can be reselected under the first file path. The above steps are iteratively executed based on the reselected batch file until a first batch file is selected under the first file path. This can shield batch files that do not need to be verified and improve efficiency.

[0039] If the identification information of the selected batch of files matches a certain identification information in the list data, it means that the matching is successful. If the identification information of the selected batch of files does not match all the identification information in the list data, it means that the matching fails. Among them, the so-called matching may include: the identification information of the selected batch of files is the same as the identification information in the list data. The non-matching may include: the identification information of the selected batch of files is different from the identification information in the list data. Or, the identification information may include usage sub-information and time sub-information. Then the matching may also include: the usage sub-information of the selected batch of files is the same as the usage sub-information in the list data. The non-matching may also include: the usage sub-information of the selected batch of files is different from the usage sub-information in the list data. In this way, it is possible to determine whether the identification information matches only based on the usage sub-information.

[0040] Batch files can be randomly selected under the first file path. Or, batch files can also be selected under the first file path following certain rules. For example, it can be detected whether there are batch files in the first file path whose generation time matches the current time of the downstream device; if so, the batch files whose generation time matches the current time of the downstream device can be obtained; if not, batch files can be randomly selected under the first file path. Of course, other methods can also be used to select batch files.

[0041] Step 12: Determine whether there is a second batch of files under the first file path, where the second batch of files has the same usage as the first batch of files and the first time interval between the generation times meets the set conditions.

[0042] In some embodiments, the second batch of files is the batch of files corresponding to the first batch of files under the first file path and can be used to verify the first batch of files. The generation times of the second batch of files and the first batch of files are different. The interval between the generation time of the second batch of files and the generation time of the first batch of files can be used as the first time interval. The first time interval can meet the set conditions. The set conditions may include that the interval is less than or equal to the set threshold. The set threshold can be determined according to the change cycle of the file program. For example, the set threshold can be the change cycle of the file program. The change cycle may include the version release cycle of the file program. For example, the change cycle can be 7 days, 14 days, 1 month, etc. In this way, by comparing the first batch of files with the second batch of files, it can be assisted to judge whether the version of the file program has changed, such as whether a new version has been released.

[0043] It should be noted that in practice, there can be multiple sets of test environments. Different test environments can have different set conditions, so that different batch files can be selected for file comparison in different test environments. For this reason, the downstream device can provide a set of set conditions. The set of set conditions includes one or more set conditions. Different set conditions can have different set thresholds. Each set condition corresponds to a test environment identifier. The test environment identifier is used to identify the test environment.

[0044] The terminal device for business personnel can display a selection interface. Multiple test environment identifiers can be provided for business personnel to select under the selection interface. The business personnel can select a target test environment identifier in the selection interface. The terminal device can obtain the target test environment identifier selected by the business personnel and send the target test environment identifier to the downstream device. The downstream device can receive the target test environment identifier; it can select the set condition corresponding to the target test environment identifier in the set of set conditions as the set condition for judging whether there is a second batch file under the first file path and the set condition for judging whether there is a third batch file under the second file path.

[0045] In some embodiments, the second batch file is a batch file that meets specific matching conditions under the first file path. For example, a batch file that has the same use as the first batch file and the first time interval between the generation times meets the set conditions. For this reason, the second batch file can be searched for under the first file path. If found, it can be judged that there is a second batch file under the first file path. If not found, it can be judged that there is no second batch file under the first file path.

[0046] For each batch file under the first file path, it can be judged whether the use of the batch file is the same as that of the first batch file according to the use sub - information of the batch file and the first batch file; it can be judged whether the first time interval between the generation time of the batch file and the first batch file meets the set conditions according to the time sub - information of the batch file and the first batch file; if the use is the same and the first time interval meets the set conditions, it is considered that the batch file can be used to verify the first batch file, and the batch file can be used as the second batch file, so that it can be judged that there is a second batch file under the first file path; if the use is different and / or the first time interval does not meet the set conditions, the batch file can be ignored.

[0047] It is possible to traverse a batch of files in the first file path. For the traversed batch of files, it is possible to determine whether the purpose of the batch of files is the same as that of the first batch of files; if so, it is possible to calculate the first time interval between the generation times of the batch of files and the first batch of files, and it is possible to determine whether the first time interval meets the set conditions; if so, the batch of files can be used as the second batch of files. Or for each batch of files traversed, it is also possible to first calculate the first time interval between the generation times of the batch of files and the first batch of files, and it is possible to determine whether the first time interval meets the set conditions; if so, it is possible to determine whether the purpose of the batch of files is the same as that of the first batch of files; if so, the batch of files can be used as the second batch of files.

[0048] It is possible to determine whether the purpose of the batch of files is the same as that of the first batch of files according to the purpose sub-information of the batch of files and the purpose sub-information of the first batch of files. For example, it is possible to determine whether the purpose sub-information of the batch of files is the same as the purpose sub-information of the first batch of files. If they are the same, it is considered that the purpose of the batch of files is the same as that of the first batch of files. If they are different, it is considered that the purpose of the batch of files is different from that of the first batch of files. In addition, it is possible to calculate the first time interval between the generation times of the batch of files and the first batch of files according to the time sub-information of the batch of files and the time sub-information of the first batch of files.

[0049] Step 13: If there is a second batch of files, compare the content of the second batch of files with the content of the first batch of files.

[0050] In some embodiments, the number of the second batch of files can be one or more. Then, for each second batch of files, the content of the second batch of files can be compared with the content of the first batch of files. For example, the second batch of files can include multiple pieces of data, and each piece of data can have a position identifier in the second batch of files. The first batch of files can include multiple pieces of data, and each piece of data can also have a position identifier in the first batch of files. The position identifier can include a line position identifier, such as a line position number. Then, the data corresponding to the same position identifier in the first batch of files and the second batch of files can be compared. If all the data corresponding to the same position identifier are the same, it can be considered that the content of the second batch of files is the same as the content of the first batch of files. If one or more pieces of data corresponding to the same position identifier are different, it can be considered that the content of the second batch of files is different from the content of the first batch of files. The difference can include differences in one or more dimensions. For example, the difference can include different data formats, different numbers of fields, different precisions of data, different numerical sizes of data, etc.

[0051] Step 14: If the content of the second batch of files is different from the content of the first batch of files, generate a first piece of information, and the first piece of information is used to indicate that the file program has changed within the first time interval.

[0052] In some embodiments, if the content of the second batch file is different from that of the first batch file, the verification result of the first batch file can be considered as failed, and thus the first information can be generated. The first information is used to indicate that the verification result of the first batch file fails. The first information can also be used to indicate that the file program has changed within the first time interval. For example, the version of the file program has changed within the first time interval, such as a new version of the file program is released. Of course, the first information can also be used to represent other information. For example, the first information can also be used to represent at least one of the following: the first file path, the identification information of the first batch file, and the different content between the second batch file and the first batch file. In some examples, the downstream device can also send the first information to the terminal device for business personnel. The terminal device can receive and display the first information. In this way, through the first information, it is convenient for business personnel to know the name of the batch file that fails the verification, the file path where it is located, and the specific different content. It is also convenient for business personnel to understand the change situation of the file program. This makes the test of the file program more targeted.

[0053] In some embodiments, if the content of the second batch file is the same as that of the first batch file, the verification result of the first batch file can be considered as passed, and thus the first batch file can be processed. Specifically, the content in the first batch file can be loaded; the local data can be updated according to the loaded content; the first batch file can be moved from the first file path to the second file path. For example, the data in the second data table can be updated according to the loaded content. In this way, through the batch file, the data consistency between the upstream device and the downstream device can be ensured. The second file path is the file path in the downstream device. The second file path is used to save the batch file sent by the upstream device and has been loaded by the downstream device. After the batch file under the first file path is loaded, the batch file can be moved to the second file path. There can be one or more batch files under the second file path. For example, the second file path can point to the second folder. The second folder is used to save the batch file sent by the upstream device and has been loaded by the downstream device. The first folder can be his, for example.

[0054] The first batch of files can be directly saved to the second file path. Alternatively, the generation time of the first batch of files can be obtained according to the time sub-information of the first batch of files. It is possible to check whether there is a folder in the second file path that matches the generation time. If there is, the first batch of files can be moved to this folder. If not, a folder that matches the generation time can be created in the second file path, and the first batch of files can be moved to this folder. The folder that matches the generation time includes a folder named after the generation time. This facilitates the classified management of batch files.

[0055] In some embodiments, if there is no second batch of files, it is possible to check whether there is a third batch of files in the second file path. If there is no third batch of files, the second information can be generated. If there is a third batch of files, the contents of the third batch of files can be compared with the contents of the first batch of files. If the contents of the third batch of files are different from the contents of the first batch of files, the third information can be generated. If the contents of the third batch of files are the same as the contents of the first batch of files, the contents in the first batch of files are loaded; according to the loaded contents, the local data is updated; the first batch of files is moved from the first file path to the second file path.

[0056] The third batch of files is a batch of files corresponding to the first batch of files in the second file path and can be used to verify the first batch of files. The number of the third batch of files can be one or more. The generation time of the third batch of files is different from that of the first batch of files. The interval between the generation time of the third batch of files and the generation time of the first batch of files can be used as the second time interval. The second time interval can meet the set conditions. The set conditions include that the interval is less than or equal to the set threshold. The set threshold can be determined according to the change cycle of the file program. For example, the set threshold can be the change cycle of the file program. The change cycle can include the version release cycle of the file program. For example, the change cycle can be 7 days, 14 days, 1 month, etc. By comparing the first batch of files with the third batch of files, it can be assisted to judge whether the version of the file program has changed, such as whether a new version has been released.

[0057] The first file path is used to save the batch of files sent by the upstream device and not yet loaded by the downstream device, and the second file path is used to save the batch of files sent by the upstream device and already loaded by the downstream device. By preferentially searching for the second batch of files in the first file path and then searching for the third batch of files in the second file path, it is possible to search in the order of the impact on the downstream device's business from high to low, which is conducive to preferentially discovering the unloaded batch of files that meet the comparison requirements.

[0058] The third batch of files is the batch of files that meet specific matching conditions under the second file path. For example, batch files that have the same use as the first batch of files and whose second time interval between the generation times meets the set conditions. To this end, the third batch of files can be searched for under the second file path. If found, it can be determined that there are third batch of files under the second file path. If not found, it can be determined that there are no third batch of files under the second file path.

[0059] Specifically, the batch of files under the second file path can be traversed. For each batch of files traversed, it can be determined whether the use of the batch of files is the same as that of the first batch of files based on the use sub-information of the batch of files and the first batch of files; it can be determined whether the second time interval between the generation time of the batch of files and the first batch of files meets the set conditions based on the time sub-information of the batch of files and the first batch of files; if the uses are the same and the second time interval meets the set conditions, it is considered that the batch of files can be used to verify the first batch of files, and the batch of files can be used as the third batch of files, so that it can be determined that there are third batch of files under the second file path; if the uses are different, and / or, the second time interval does not meet the set conditions, the batch of files can be ignored.

[0060] It can be determined whether the use of the batch of files is the same as that of the first batch of files based on the use sub-information of the batch of files and the use sub-information of the first batch of files. For example, it can be determined whether the use sub-information of the batch of files is the same as the use sub-information of the first batch of files. If they are the same, it is considered that the use of the batch of files is the same as that of the first batch of files. If they are different, it is considered that the use of the batch of files is different from that of the first batch of files. In addition, the second time interval between the generation time of the batch of files and the first batch of files can be calculated based on the time sub-information of the batch of files and the time sub-information of the first batch of files.

[0061] If there is no third batch file, it means that no batch file for verifying the first batch file is found under the first file path and the second file path, and the second information can be generated. The second information is used to indicate that the first batch file is a newly added batch file. In some examples, the downstream device can also send the second information to the terminal device for business personnel. The terminal device can receive and display the second information. In this way, through the second information, it is convenient for business personnel to know the newly generated batch file by the upstream device. In some examples, if there is no third batch file, the first batch file can be processed. Specifically, the content in the first batch file can be loaded; the loaded content can be stored locally; the first batch file can be moved from the first file path to the second file path. For example, since the first batch file is a batch file newly issued by the file program of the upstream device and there is no corresponding second data table for the first batch file in the downstream device, a new second data table can be created, and the loaded content can be stored in the newly created second data table.

[0062] If there is a third batch file, the content of the third batch file can be compared with the content of the first batch file. Specifically, the number of the third batch files can be one or more. Then, for each third batch file, the content of the third batch file can be compared with the content of the first batch file. For example, the third batch file can include multiple pieces of data, and each piece of data can have a position identifier in the third batch file. The first batch file can include multiple pieces of data, and each piece of data can also have a position identifier in the first batch file. The position identifier can include a row position identifier, such as a row position number, etc. Then, the data corresponding to the same position identifier in the first batch file and the third batch file can be compared. If all the data corresponding to the same position identifier are the same, it can be considered that the content of the third batch file is the same as the content of the first batch file. If one or more pieces of data corresponding to the same position identifier are different, it can be considered that the content of the third batch file is different from the content of the first batch file. The difference can include differences in one or more dimensions. For example, the difference can include different data formats, different numbers of fields, different precisions of data, different numerical sizes of data, etc.

[0063] If the content of the third batch of files is different from that of the first batch of files, it can be considered that the verification result of the first batch of files fails, and thus the third information can be generated. The third information is used to indicate that the verification result of the first batch of files fails. The third information can also be used to indicate that the file program has changed during the second time interval. For example, the version of the file program has changed during the second time interval, such as a new version of the file program has been released. Of course, the third information can also be used to represent other information. For example, the third information can also be used to represent the different content between the third batch of files and the first batch of files. In some examples, if the content of the third batch of files is different from that of the first batch of files, the batch of files with the most recent generation time can be selected from the third batch of files and the first batch of files; if the batch of files with the most recent generation time is the first batch of files, it means that the batch of files with the most recent generation time is the batch of files that have not been loaded, and thus the third information can be generated. The third information is used to indicate that the file program has changed during the second time interval. Of course, the third information can also be used to represent other information. For example, the third information can also be used to represent at least one of the following: the first file path, the identification information of the first batch of files, and the different content between the third batch of files and the first batch of files. If the batch of files with the most recent generation time is the third batch of files, it means that the batch of files with the most recent generation time is the batch of files that have been recorded, and thus the third information does not need to be generated. Of course, according to needs, if the batch of files with the most recent generation time is the third batch of files, the third information can also be generated. In some examples, the downstream device can also send the third information to the terminal device for business personnel. The terminal device can receive and display the third information. In this way, through the third information, it is convenient for business personnel to know the name of the batch of files that failed the verification, the file path where they are located, and the specific different content. It is also convenient for business personnel to understand the change situation of the file program. This makes the test for the file program more targeted.

[0064] In some embodiments, steps 11 - 14 can be iteratively executed until there are no batch files to be verified under the first file path, that is, the first batch of files cannot be obtained under the first file path.

[0065] The technical solution of the embodiment of this specification can select a first batch of files under the first file path. The first file path is used to store the batch files sent by the upstream device and not yet loaded by the downstream device. The batch files are generated by the file program of the upstream device. It can determine whether there is a second batch of files under the first file path. The second batch of files has the same purpose as the first batch of files, and the first time interval between the generation times meets the set conditions. If there is a second batch of files, the content of the second batch of files can be compared with the content of the first batch of files. If the content of the second batch of files is different from the content of the first batch of files, a first piece of information can be generated. The first piece of information is used to indicate that the file program has changed within the first time interval. In this way, by comparing the first batch of files with a specific second batch of files, the verification of the first batch of files can be realized. Verifying the batch files of the upstream device by means of file comparison can improve the verification efficiency and save labor costs. In addition, when the content of the first batch of files is different from the content of the second batch of files, a first piece of information can also be generated. The first piece of information can indicate that the application program of the upstream device has changed within the first time interval. In this way, by means of file comparison, it can also be used to assist in judging the change situation of the application program of the upstream device.

[0066] Please refer to Figure 3 This specification embodiment also provides a file comparison device, including the following units.

[0067] A selection unit 21, configured to select a first batch of files under the first file path. The first file path is used to store the batch files sent by the upstream device and not yet loaded by the downstream device. The batch files are generated by the file program of the upstream device.

[0068] A judgment unit 22, configured to judge whether there is a second batch of files under the first file path. The second batch of files has the same purpose as the first batch of files, and the first time interval between the generation times meets the set conditions.

[0069] A comparison unit 23, configured to, if there is a second batch of files, compare the content of the second batch of files with the content of the first batch of files.

[0070] A generation unit 24, configured to, if the content of the second batch of files is different from the content of the first batch of files, generate a first piece of information. The first piece of information is used to indicate that the file program has changed within the first time interval.

[0071] This specification embodiment also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above file comparison method is implemented.

[0072] An embodiment of this specification also provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the above file comparison method.

[0073] An embodiment of this specification also provides a computer program product including a computer program, which when executed by a processor, implements the above file comparison method.

[0074] Those skilled in the art can understand that this specification can be provided as a method, a system, or a computer program product. Therefore, this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0075] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. The computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0076] Each functional unit in the embodiments of this specification can be integrated into one processing unit, or each functional unit can exist physically alone, or two or more functional units can be integrated into one processing unit.

[0077] Those skilled in the art can understand that the descriptions of the embodiments in this specification each have their own emphases. For parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. Additionally, it can be understood that after reading this specification document, those skilled in the art can, without creative effort, think of combining some or all of the embodiments listed in this specification arbitrarily, and these combinations are also within the scope of disclosure and protection of this specification.

[0078] Although this specification is depicted through embodiments, those of ordinary skill in the art know that the above embodiments are only used to help understand the core idea of this specification. Those skilled in the art can understand that this specification has many variations and changes. It is hoped that the appended claims will cover these variations and changes without departing from the spirit of this specification.

Claims

1. A file comparison method, characterized in that, Including: Select a first batch of files under the first file path, where the first file path is used to save the batch of files sent by the upstream device and not yet loaded by the downstream device, and the batch of files is generated by the file program of the upstream device; Determine whether there is a second batch of files under the first file path, where the second batch of files has the same purpose as the first batch of files and the first time interval between the generation times meets the set conditions; If there is a second batch of files, compare the content of the second batch of files with that of the first batch of files; If the content of the second batch of files is different from that of the first batch of files, generate a first piece of information, which is used to indicate that the file program has changed within the first time interval.

2. The method according to claim 1, wherein The step of selecting a first batch of files under the first file path includes: After meeting the processing conditions, select a batch of files under the first file path, match the identification information of the selected batch of files in the list data, and if the match fails, use the selected batch of files as the first batch of files; Among them, the list data includes the identification information of the batch of files that do not need to be verified.

3. The method according to claim 1, wherein The batch of files under the first file path has identification information, which is used to identify the batch of files and includes usage sub-information and time sub-information. The usage sub-information is used to indicate the purpose of the batch of files, and the time sub-information is used to indicate the time when the file program generates the batch of files; The step of determining whether there is a second batch of files under the first file path includes: For each batch of files under the first file path, according to the usage sub-information of the batch of files and the first batch of files, determine whether the purpose of the batch of files is the same as that of the first batch of files, and according to the time sub-information of the batch of files and the first batch of files, determine whether the first time interval between the generation times of the batch of files and the first batch of files meets the set conditions; if the purposes are the same and the first time interval meets the set conditions, use the batch of files as the second batch of files.

4. The method according to claim 1, wherein The method further includes: If there is no second batch of files, determine whether there is a third batch of files under the second file path, where the second file path is used to save the batch of files sent by the upstream device and already loaded by the downstream device, and the third batch of files has the same purpose as the first batch of files and the second time interval between the generation times meets the set conditions; If there is no third batch of files, generate a second piece of information, which indicates that the first batch of files is a newly added file.

5. The method according to claim 1, wherein The method further includes: If there is no second batch of files, determine whether there is a third batch of files under the second file path, where the second file path is used to save the batch of files sent by the upstream device and already loaded by the downstream device, and the third batch of files has the same purpose as the first batch of files and the second time interval between the generation times meets the set conditions; If there is a third batch of files, compare the content of the third batch of files with that of the first batch of files; If the content of the third batch of files is different from that of the first batch of files, generate a third piece of information, which is used to indicate that the file program has changed within the second time interval.

6. The method according to claim 4 or 5, characterized in that The batch files under the second file path have identification information, which is used to identify the batch files and includes usage sub-information and time sub-information. The usage sub-information is used to represent the usage of the batch files, and the time sub-information is used to represent the time when the file program generates the batch files; The determination of whether there is a third batch file under the second file path includes: For each batch file under the second file path, according to the usage sub-information of this batch file and the first batch file, determine whether the usage of this batch file is the same as that of the first batch file. According to the time sub-information of this batch file and the first batch file, determine whether the second time interval between the generation time of this batch file and the first batch file meets the set conditions; if the usage is the same and the second time interval meets the set conditions, use this batch file as the third batch file.

7. The method according to claim 5, wherein The generation of the third information includes: Select the batch file with the most recent generation time from the third batch file and the first batch file; If the batch file with the most recent generation time is the first batch file, generate the third information.

8. The method according to claim 1, characterized in that If the content of the second batch file is the same as that of the first batch file, the method further includes: Load the content in the first batch file; Update the local data according to the loaded content; Move the first batch file from the first file path to the second file path.

9. A file comparison device, characterized in that, Includes: A selection unit for selecting a first batch file under the first file path. The first file path is used to store batch files sent by the upstream device and not yet loaded by the downstream device. The batch files are generated by the file program of the upstream device; A judgment unit for judging whether there is a second batch file under the first file path. The second batch file has the same usage as the first batch file and the first time interval between the generation times meets the set conditions; A comparison unit for comparing the content of the second batch file with the first batch file if there is a second batch file; A generation unit for generating a first information if the content of the second batch file is different from that of the first batch file. The first information is used to indicate that the file program has changed within the first time interval.

10. A computer device, characterized in that, Includes: A processor; A memory for storing instructions executable by the processor; The processor realizes the method according to any one of claims 1-8 by executing the instructions.