[go: up one dir, main page]

CN116303288A - Batch file processing method, device, equipment and medium in financial business system - Google Patents

Batch file processing method, device, equipment and medium in financial business system Download PDF

Info

Publication number
CN116303288A
CN116303288A CN202310295020.5A CN202310295020A CN116303288A CN 116303288 A CN116303288 A CN 116303288A CN 202310295020 A CN202310295020 A CN 202310295020A CN 116303288 A CN116303288 A CN 116303288A
Authority
CN
China
Prior art keywords
batch
file
date
missing
files
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310295020.5A
Other languages
Chinese (zh)
Inventor
卫敏
李博文
王岩
刘倩倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202310295020.5A priority Critical patent/CN116303288A/en
Publication of CN116303288A publication Critical patent/CN116303288A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method, a device, equipment, a medium and a program product for processing batch files in a financial business system, and relates to the technical field of big data. The method comprises the following steps: when a batch file set in a receiving catalog is in batch file missing, acquiring a first batch date corresponding to the missing file according to a preset reference file set; acquiring a second batch date which is closest to the first batch date according to the receiving catalog; determining batch files corresponding to the second batch date in the batch file set according to the second batch date; and generating a replacement file of the missing file in the receiving directory according to the batch file corresponding to the second batch date in the batch file set, and correcting the second batch date in the replacement file to be the first batch date. The method and the device can avoid the problem that batch business processing is interrupted so as to influence loading of other batch files, and ensure that the whole verification of batch business processing can be normally performed.

Description

金融业务系统中批量文件的处理方法、装置、设备和介质Batch file processing method, device, equipment and medium in financial business system

技术领域technical field

本申请涉及大数据技术领域,特别是涉及一种金融业务系统中批量文件的处理方法、装置、计算机设备、存储介质和计算机程序产品。The present application relates to the field of big data technology, in particular to a method, device, computer equipment, storage medium and computer program product for processing batch files in a financial business system.

背景技术Background technique

在一些金融业务系统中,例如,信贷业务系统,会涉及到针对批量文件的处理,即对批量业务中相关文件的处理。以信贷业务系统的批量业务处理为例,在批量业务处理中会加载上下游文件,一般需要从指定的接收目录获取批量文件,通过指定的文件结构与临时表的对照关系,将批量文件导入临时表,并调用作业调度模块,将批量文件从临时表处理到正式表。在针对批量文件进行调度之前,会对加载的批量文件进行验证、检测。In some financial business systems, such as credit business systems, processing of batch files is involved, that is, processing of related files in batch business. Taking the batch business processing of the credit business system as an example, upstream and downstream files are loaded during batch business processing. Generally, batch files need to be obtained from the specified receiving directory, and the batch files are imported into the temporary through the comparison relationship between the specified file structure and the temporary table. table, and call the job scheduling module to process batch files from the temporary table to the official table. Before scheduling batch files, the loaded batch files will be verified and tested.

目前的技术在批量业务的处理过程中,在批量文件到达检查这一步骤时,如果发生批量文件缺失的情况,会一直批量循环该批量文件,直至批量文件到达,而这种情况会导致批量业务处理中断,即便通过人工来跳过该步骤,也会存在影响其它批量文件的加载,进而影响批量业务处理的整体验证的问题。In the current technology, in the process of batch business processing, when the batch file arrives at the step of inspection, if the batch file is missing, the batch file will be circulated in batches until the batch file arrives, and this situation will lead to batch business Processing interruption, even if this step is manually skipped, will still affect the loading of other batch files, thereby affecting the overall verification of batch business processing.

发明内容Contents of the invention

基于此,有必要针对上述技术问题,提供一种金融业务系统中批量文件的处理方法、装置、计算机设备、存储介质和计算机程序产品。Based on this, it is necessary to provide a method, device, computer equipment, storage medium and computer program product for processing batch files in a financial business system aiming at the above technical problems.

第一方面,本申请提供了一种金融业务系统中批量文件的处理方法。所述方法包括:In a first aspect, the present application provides a batch file processing method in a financial business system. The methods include:

在金融业务系统的接收目录中的批量文件集合出现批量文件缺失时,根据预设的参照文件集合获取对应于缺失文件的第一批量日期;所述参照文件集合包含所述批量文件集合中应包含的各批量文件;When batch files are missing in the batch file collection in the receiving directory of the financial business system, the first batch date corresponding to the missing file is obtained according to the preset reference file collection; the reference file collection includes what should be included in the batch file collection Each batch of files;

根据所述接收目录,获取与所述第一批量日期相距最近的第二批量日期;Obtaining the second batch date closest to the first batch date according to the receiving catalog;

根据所述第二批量日期,确定所述批量文件集合中与所述第二批量日期对应的批量文件;determining batch files corresponding to the second batch date in the batch file set according to the second batch date;

根据所述批量文件集合中与所述第二批量日期对应的批量文件,在所述接收目录中生成所述缺失文件的替换文件,并将所述替换文件中的所述第二批量日期修正为所述第一批量日期。Generate a replacement file for the missing file in the receiving directory according to the batch file corresponding to the second batch date in the batch file set, and correct the second batch date in the replacement file as The first batch date.

在其中一个实施例中,所述方法还包括:根据当前批量场次,确定所述接收目录;获取所述接收目录中的批量文件集合;将所述批量文件集合与所述参照文件集合进行文件对比,得到第一文件对比结果;根据所述第一文件对比结果,确定所述接收目录中的批量文件集合是否出现批量文件缺失。In one of the embodiments, the method further includes: determining the receiving directory according to the current batch session; obtaining the batch file collection in the receiving directory; comparing the batch file collection with the reference file collection , to obtain a first file comparison result; according to the first file comparison result, determine whether batch files are missing in the batch file collection in the receiving directory.

在其中一个实施例中,所述将所述批量文件集合与所述参照文件集合进行文件对比,包括:针对预先划分的多个批量日期范围,将所述批量文件集合与所述参照文件集合中对应于同一批量日期范围的批量文件子集和参照文件子集进行文件比对。In one of the embodiments, the file comparison between the batch file set and the reference file set includes: comparing the batch file set with the reference file set for a plurality of pre-divided batch date ranges File comparison is performed between the batch file subset and the reference file subset corresponding to the same batch date range.

在其中一个实施例中,所述方法还包括:获取所述接收目录中的批量文件集合对应的文件筛选条件;根据所述文件筛选条件,从文件源中筛选出对应的多个文件;根据所述对应的多个文件,构成所述参照文件集合。In one of the embodiments, the method further includes: obtaining the file filtering conditions corresponding to the batch file collection in the receiving directory; according to the file filtering conditions, filtering out a plurality of corresponding files from the file source; according to the The plurality of corresponding files constitute the reference file set.

在其中一个实施例中,所述根据预设的参照文件集合获取对应于缺失文件的第一批量日期,包括:获取所述参照文件集合中与所述缺失文件对应的参照文件的文件名;从所述文件名中获取所述参照文件的批量日期,并将所述参照文件的批量日期确定为所述第一批量日期。In one of the embodiments, the obtaining the first batch date corresponding to the missing file according to the preset reference file set includes: obtaining the file name of the reference file corresponding to the missing file in the reference file set; The batch date of the reference file is obtained from the file name, and the batch date of the reference file is determined as the first batch date.

在其中一个实施例中,所述方法还包括:若根据所述接收目录对所述第一批量日期相距最近的第二批量日期的获取失败,则在所述接收目录中生成对应于所述缺失文件的空文件,并将所述空文件的文件名设置为所述缺失文件的文件名。In one of the embodiments, the method further includes: if the acquisition of the second batch date that is closest to the first batch date according to the receiving list fails, generating in the receiving list corresponding to the missing file and set the filename of the empty file to the filename of the missing file.

在其中一个实施例中,所述方法还包括:对所述批量文件集合的所述批量文件缺失的处理完成后,再次触发对所述接收目录中的批量文件集合的缺失文件检测及处理,直至所述接收目录中的批量文件集合未出现批量文件缺失,将所述接收目录中的批量文件集合应用于作业调度。In one of the embodiments, the method further includes: after the batch file missing processing of the batch file set is completed, triggering the missing file detection and processing of the batch file set in the receiving directory again until The batch file set in the receiving directory has no batch file missing, and the batch file set in the receiving directory is applied to job scheduling.

第二方面,本申请提供了一种金融业务系统中批量文件的处理装置。所述装置包括:In a second aspect, the present application provides a device for processing batch files in a financial business system. The devices include:

第一日期获取模块,用于在金融业务系统的接收目录中的批量文件集合出现批量文件缺失时,根据预设的参照文件集合获取对应于缺失文件的第一批量日期;所述参照文件集合包含所述批量文件集合中应包含的各批量文件;The first date acquisition module is used to obtain the first batch date corresponding to the missing file according to the preset reference file set when the batch file set in the receiving directory of the financial business system is missing; the reference file set includes Each batch file that should be included in the batch file collection;

第二日期获取模块,用于根据所述接收目录,获取与所述第一批量日期相距最近的第二批量日期;A second date obtaining module, configured to obtain the second batch date closest to the first batch date according to the receiving catalog;

文件确定模块,用于根据所述第二批量日期,确定所述批量文件集合中与所述第二批量日期对应的批量文件;A file determination module, configured to determine, according to the second batch date, the batch files corresponding to the second batch date in the batch file set;

替换处理模块,用于根据所述批量文件集合中与所述第二批量日期对应的批量文件,在所述接收目录中生成所述缺失文件的替换文件,并将所述替换文件中的所述第二批量日期修正为所述第一批量日期。A replacement processing module, configured to generate a replacement file for the missing file in the receiving directory according to the batch file corresponding to the second batch date in the batch file collection, and replace the missing file in the replacement file The second batch date is corrected to the first batch date.

第三方面,本申请还提供了一种计算机设备。所述计算机设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

在金融业务系统的接收目录中的批量文件集合出现批量文件缺失时,根据预设的参照文件集合获取对应于缺失文件的第一批量日期;所述参照文件集合包含所述批量文件集合中应包含的各批量文件;When batch files are missing in the batch file collection in the receiving directory of the financial business system, the first batch date corresponding to the missing file is obtained according to the preset reference file collection; the reference file collection includes what should be included in the batch file collection Each batch of files;

根据所述接收目录,获取与所述第一批量日期相距最近的第二批量日期;Obtaining the second batch date closest to the first batch date according to the receiving catalog;

根据所述第二批量日期,确定所述批量文件集合中与所述第二批量日期对应的批量文件;determining batch files corresponding to the second batch date in the batch file set according to the second batch date;

根据所述批量文件集合中与所述第二批量日期对应的批量文件,在所述接收目录中生成所述缺失文件的替换文件,并将所述替换文件中的所述第二批量日期修正为所述第一批量日期。Generate a replacement file for the missing file in the receiving directory according to the batch file corresponding to the second batch date in the batch file set, and correct the second batch date in the replacement file as The first batch date.

第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

在金融业务系统的接收目录中的批量文件集合出现批量文件缺失时,根据预设的参照文件集合获取对应于缺失文件的第一批量日期;所述参照文件集合包含所述批量文件集合中应包含的各批量文件;When batch files are missing in the batch file collection in the receiving directory of the financial business system, the first batch date corresponding to the missing file is obtained according to the preset reference file collection; the reference file collection includes what should be included in the batch file collection Each batch of files;

根据所述接收目录,获取与所述第一批量日期相距最近的第二批量日期;Obtaining the second batch date closest to the first batch date according to the receiving catalog;

根据所述第二批量日期,确定所述批量文件集合中与所述第二批量日期对应的批量文件;determining batch files corresponding to the second batch date in the batch file set according to the second batch date;

根据所述批量文件集合中与所述第二批量日期对应的批量文件,在所述接收目录中生成所述缺失文件的替换文件,并将所述替换文件中的所述第二批量日期修正为所述第一批量日期。Generate a replacement file for the missing file in the receiving directory according to the batch file corresponding to the second batch date in the batch file set, and correct the second batch date in the replacement file as The first batch date.

第五方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

在金融业务系统的接收目录中的批量文件集合出现批量文件缺失时,根据预设的参照文件集合获取对应于缺失文件的第一批量日期;所述参照文件集合包含所述批量文件集合中应包含的各批量文件;When batch files are missing in the batch file collection in the receiving directory of the financial business system, the first batch date corresponding to the missing file is obtained according to the preset reference file collection; the reference file collection includes what should be included in the batch file collection Each batch of files;

根据所述接收目录,获取与所述第一批量日期相距最近的第二批量日期;Obtaining the second batch date closest to the first batch date according to the receiving catalog;

根据所述第二批量日期,确定所述批量文件集合中与所述第二批量日期对应的批量文件;determining batch files corresponding to the second batch date in the batch file set according to the second batch date;

根据所述批量文件集合中与所述第二批量日期对应的批量文件,在所述接收目录中生成所述缺失文件的替换文件,并将所述替换文件中的所述第二批量日期修正为所述第一批量日期。Generate a replacement file for the missing file in the receiving directory according to the batch file corresponding to the second batch date in the batch file set, and correct the second batch date in the replacement file as The first batch date.

上述金融业务系统中批量文件的处理方法、装置、计算机设备、存储介质和计算机程序产品中,在检测到接收目录中的批量文件集合出现批量文件缺失时,可以根据预设的参照文件集合获取对应于缺失文件的第一批量日期,其中,参照文件集合包含批量文件集合中应包含的各批量文件;接下来,可以在接收目录中的批量文件集合中获取与第一批量日期相距最近的第二批量日期;进而,可以确定批量文件集合中与第二批量日期对应的批量文件;最后,可以在批量文件集合中与第二批量日期对应的批量文件中,获取可以替换该确实文件的待替换文件,从而,根据待替换文件在接收目录中生成缺失文件的替换文件,并将替换文件中的第二批量日期修正为第一批量日期。在本申请提供的该方法中,可以在接收目录中生成缺失文件的替换文件,可以避免发生批量业务处理中断,进而影响其它批量文件的加载的问题,确保批量业务处理的整体验证可以正常进行。In the batch file processing method, device, computer equipment, storage medium, and computer program product in the above-mentioned financial business system, when it is detected that a batch file is missing in the batch file set in the receiving directory, the corresponding file can be obtained according to the preset reference file set. The date of the first batch of missing files, wherein, the reference file collection contains each batch of files that should be included in the batch file collection; Next, the second batch date that is closest to the first batch date can be obtained from the batch file collection in the receiving directory batch date; furthermore, the batch file corresponding to the second batch date in the batch file collection can be determined; finally, the file to be replaced that can replace the exact file can be obtained in the batch file corresponding to the second batch date in the batch file collection , so that a replacement file for the missing file is generated in the receiving directory according to the file to be replaced, and the date of the second batch in the replacement file is corrected to the date of the first batch. In the method provided by the present application, replacement files for missing files can be generated in the receiving directory, which can avoid the interruption of batch business processing, thereby affecting the loading of other batch files, and ensure that the overall verification of batch business processing can be carried out normally.

附图说明Description of drawings

图1为目前技术中的金融业务系统中批量文件的处理方法的流程示意图;Fig. 1 is the schematic flow chart of the processing method of batch file in the financial business system in the present technology;

图2为本申请中的金融业务系统中批量文件的处理方法的流程示意图;Fig. 2 is a schematic flow chart of a method for processing batch files in the financial business system in the present application;

图3为本申请中一个实施例提供的金融业务系统中批量文件的处理方法的流程示意图;FIG. 3 is a schematic flow diagram of a batch file processing method in a financial business system provided by an embodiment of the present application;

图4为本申请中一个实施例提供的判断接收目录中的批量文件集合是否出现批量文件缺失的步骤的流程示意图;FIG. 4 is a schematic flow diagram of the steps for judging whether batch files are missing in the batch file collection in the receiving directory provided by an embodiment of the present application;

图5为本申请中一个实施例提供的批量文件集合与参照文件集合进行文件对比的步骤的流程示意图;Fig. 5 is a schematic flow chart of the steps of file comparison between a batch file set and a reference file set provided by an embodiment of the present application;

图6为本申请中一个实施例提供的再次触发对接收目录中的批量文件集合的缺失文件检测及处理的步骤的流程示意图;FIG. 6 is a schematic flowchart of the steps of re-triggering missing file detection and processing steps for batch file collections in the receiving directory provided by an embodiment of the present application;

图7为本申请中另一个实施例提供的金融业务系统中批量文件的处理方法的流程示意图;FIG. 7 is a schematic flow diagram of a batch file processing method in a financial business system provided by another embodiment of the present application;

图8为本申请实施例提供的金融业务系统中批量文件的处理装置的结构框图;FIG. 8 is a structural block diagram of a batch file processing device in the financial business system provided by the embodiment of the present application;

图9为本申请实施例提供的计算机设备的内部结构图。FIG. 9 is an internal structural diagram of a computer device provided by an embodiment of the present application.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

在一些金融业务系统中,一般会通过批量的方式对系统内的相关文件进行处理,也可以称为批量处理系统。其中,以信贷业务系统的批量业务处理为例,批量业务处理可以包括批量代收代付业务等。具体地,信贷业务系统的批量可以分为晚间批量和早间批量。其中,晚间批量的执行主要实现功能为提供文本文件至上下游应用,该上下游应用可以是与信贷业务系统有业务交互需求的业务系统;早间批量的执行主要实现功能为表运算,加载上下游应用下传至信贷系统的文件及少部分供数。In some financial business systems, related files in the system are generally processed in a batch manner, which can also be called a batch processing system. Wherein, taking the batch business processing of the credit business system as an example, the batch business processing may include batch collection and payment business and the like. Specifically, the batches of the credit business system can be divided into evening batches and morning batches. Among them, the main function of night batch execution is to provide text files to upstream and downstream applications. The upstream and downstream applications can be business systems that have business interaction requirements with the credit business system; Files and a small number of supplies downloaded from downstream applications to the credit system.

其中,以早间批量加载上下游文件为例,如图1所示,完整的流程是从指定接收目录获取数据文本,通过指定的文件结构与临时表的对照关系,将数据导入临时表,并调用作业调度模块,将数据从临时表处理到正式表。目前的技术在批量业务的处理过程中,在批量文件到达检查这一步骤时,如果发生批量文件缺失的情况,会一直批量循环该批量文件,直至批量文件到达,而这种情况会导致批量业务处理中断,若通过人工来跳过该步骤,早间批量后续的文件分发,导入临时表,作业调度,备份更新这些步骤也不再执行。进而这一部分内容就无法得到有效验证,有产生生产问题的风险。同时,这部分跳过的内容也可能会影响其它的批量文件的加载,进而影响批量业务处理的整体验证。Among them, taking the batch loading of upstream and downstream files in the morning as an example, as shown in Figure 1, the complete process is to obtain the data text from the specified receiving directory, import the data into the temporary table through the comparison relationship between the specified file structure and the temporary table, and Call the job scheduling module to process the data from the temporary table to the formal table. In the current technology, in the process of batch business processing, when the batch file arrives at the step of inspection, if the batch file is missing, the batch file will be circulated in batches until the batch file arrives, and this situation will lead to batch business If the processing is interrupted, if this step is manually skipped, the subsequent batch file distribution in the morning, import of temporary tables, job scheduling, backup and update steps will not be performed any more. Furthermore, this part of the content cannot be effectively verified, and there is a risk of production problems. At the same time, this skipped content may also affect the loading of other batch files, thereby affecting the overall verification of batch business processing.

本申请实施例提供的金融业务系统中批量文件的处理方法可以用于解决上述问题,如图2所示,在该方法中,可以基于预设的参照文件集合对接收目录中的批量文件集合进行检测,在检测到该批量文件集合出现批量文件缺失时,可以确定缺失文件,并可以根据预设的参照文件集合获取对应于缺失文件的第一批量日期,其中,参照文件集合包含批量文件集合中应包含的各批量文件;接下来,可以在接收目录中的批量文件集合中获取与第一批量日期相距最近的第二批量日期;进而,可以在批量文件集合中与第二批量日期对应的批量文件中,获取可以替换该缺失文件的待替换文件,从而,根据待替换文件在接收目录中生成缺失文件的替换文件,并将替换文件中的第二批量日期修正为第一批量日期,即生成缺失文件,对批量文件集合的批量文件缺失的处理完成后,再次触发对接收目录中的批量文件集合的缺失文件检测,检测文件完整性,便于后续的作业调度。因此,本申请的方法基于对接收目录中与缺失文件对应的替换文件的生成等处理,可以避免发生批量业务处理中断,进而影响其它批量文件的加载的问题,确保批量业务处理的整体验证可以正常进行。本申请的金融业务系统中批量文件的处理方法的详细情况可以参见以下各实施例中的相关描述。The batch file processing method in the financial business system provided by the embodiment of the present application can be used to solve the above problems, as shown in Figure 2, in this method, the batch file set in the receiving directory can be processed based on the preset reference file set Detection, when it is detected that batch files are missing in the batch file set, the missing files can be determined, and the first batch date corresponding to the missing files can be obtained according to the preset reference file set, wherein the reference file set includes the batch file set Each batch file that should be included; Next, the second batch date that is closest to the first batch date can be obtained from the batch file collection in the receiving directory; furthermore, the batch corresponding to the second batch date can be obtained in the batch file collection In the file, obtain the file to be replaced that can replace the missing file, thereby, generate a replacement file for the missing file in the receiving directory according to the file to be replaced, and correct the second batch date in the replacement file to the first batch date, that is, generate For missing files, after the batch file missing processing of the batch file collection is completed, the missing file detection of the batch file collection in the receiving directory is triggered again to detect the integrity of the files, which is convenient for subsequent job scheduling. Therefore, the method of the present application is based on the generation of replacement files corresponding to the missing files in the receiving directory, which can avoid the interruption of batch business processing, thereby affecting the loading of other batch files, and ensure that the overall verification of batch business processing can be normal. conduct. For details of the method for processing batch files in the financial business system of the present application, please refer to the relevant descriptions in the following embodiments.

在一个实施例中,如图3所示,提供了一种金融业务系统中批量文件的处理方法,本实施例以该方法应用于服务器进行举例说明,可以理解的是,该方法也可以应用于终端,还可以应用于包括终端和服务器的系统,并通过终端和服务器的交互实现。本实施例中,该方法包括以下步骤:In one embodiment, as shown in FIG. 3 , a method for processing batch files in a financial business system is provided. This embodiment uses the method applied to a server as an example for illustration. It can be understood that this method can also be applied to The terminal can also be applied to a system including a terminal and a server, and is realized through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

步骤S301,在金融业务系统的接收目录中的批量文件集合出现批量文件缺失时,根据预设的参照文件集合获取对应于缺失文件的第一批量日期。Step S301, when the batch file set in the receiving directory of the financial business system is missing a batch file, obtain the first batch date corresponding to the missing file according to the preset reference file set.

具体地,对于金融业务系统的接收目录中的批量文件集合的批量文件缺失的判断,首先,可以预先设置参照文件集合,该参照文件集合可以包含批量文件集合中应包含的各批量文件;其次,可以将批量文件集合的批量文件的文件名(file_name)与参照文件集合中的批量文件的文件名进行文件比对,从而,可以判断出批量文件集合是否出现批量文件缺失,并在批量文件集合出现批量文件缺失时,基于参照文件集合中的批量文件确定缺失文件;最后,基于对应于缺失文件的参照文件的文件名与该缺失文件的文件名相同,在对应于缺失文件的参照文件的文件名中获取对应于缺失文件的第一批量日期。Specifically, for the determination of the lack of batch files in the batch file set in the receiving directory of the financial business system, first, a reference file set can be preset, and the reference file set can contain each batch file that should be included in the batch file set; secondly, The file name (file_name) of the batch file in the batch file set can be compared with the file name of the batch file in the reference file set, so that it can be judged whether there is a batch file missing in the batch file set, and if it appears in the batch file set When batch files are missing, the missing files are determined based on the batch files in the reference file collection; finally, based on the file name of the reference file corresponding to the missing file is the same as the file name of the missing file, the file name of the reference file corresponding to the missing file Get the first batch date corresponding to the missing file in .

其中,在一些场景当中,对于批量文件缺失的判断,可能会需要结合批量组、批量场次等批量相关的属性来进行判断,批量相关的属性的详细介绍可以参见表1辅助信息表,在一些可能的实现方式中,接收目录(uds_recv_dir)中的批量文件可以是当前批量组的中的当前批量场次对应的批量文件,批量组(group_code)可以是针对一个特定金融业务系统的时区组,可以通过不同的时区码区分不同的时区,例如,1表示时区1,85表示时区2,70表示时区3等。每个批量组可以包括多个批量场次(batch_mode),不同的批量场次对应不同的批量应用,可以通过不同的场次编码区分不同的上下游应用中的批量应用,一个批量场次对应一个批量应用,可以将同一个批量应用的批量文件以文件名的形式存储在一个接收目录中,组成接收目录中的批量文件集合,批量文件集合为该接收目录中的所有批量文件的集合;该上下游应用可以是与信贷业务系统有业务交互需求的业务系统。批量文件缺失可以是由接收目录中的批量文件集合中的至少一个批量文件加载失败导致。第一批量日期为对应于缺失文件的文件名中包含的批量日期(batch_time);该批量日期可以是加载对应的批量文件的系统时间。有效场次(valid_flag)可以用于表示批量场次的有效性,例如,可以用“0”代表无效,用“1”代表有效;可以将各批量文件以文件名的形式进行存储,文件名为批量应用按一定规则对批量文件的命名;文件频度可以用于表示批量文件执行的频率,例如,可以用D表示每天执行的文件频度,M表示每月执行一次的文件频度。在一些可能的实现方式中,批量文件的格式为二进制(binary,bin),也称为二进制文件。Among them, in some scenarios, the judgment of missing batch files may need to be judged in combination with batch-related attributes such as batch group and batch session. For detailed introduction of batch-related attributes, please refer to the auxiliary information table in Table 1. In some possible In the implementation method, the batch file in the receiving directory (uds_recv_dir) can be the batch file corresponding to the current batch session in the current batch group, and the batch group (group_code) can be a time zone group for a specific financial business system, which can be passed through different The time zone code of the time zone distinguishes different time zones, for example, 1 means time zone 1, 85 means time zone 2, 70 means time zone 3, etc. Each batch group can include multiple batch sessions (batch_mode). Different batch sessions correspond to different batch applications. Different batch codes can be used to distinguish batch applications in different upstream and downstream applications. A batch session corresponds to a batch application. The batch files of the same batch application are stored in a receiving directory in the form of file names to form a batch file collection in the receiving directory, and the batch file collection is a collection of all batch files in the receiving directory; the upstream and downstream applications can be Business systems that have business interaction requirements with the credit business system. The missing batch file may be caused by at least one batch file in the batch file collection in the receiving directory failing to load. The first batch date is the batch date (batch_time) contained in the file name corresponding to the missing file; the batch date may be the system time when the corresponding batch file is loaded. The valid session (valid_flag) can be used to indicate the validity of the batch session. For example, "0" can be used to represent invalid, and "1" can be used to represent valid; each batch file can be stored in the form of a file name, and the file name is batch application Name batch files according to certain rules; file frequency can be used to indicate the frequency of batch file execution, for example, D can be used to indicate the frequency of file execution per day, and M can be used to indicate the frequency of file execution once a month. In some possible implementation manners, the format of the batch file is binary (binary, bin), also referred to as a binary file.

Figure BDA0004142841240000081
Figure BDA0004142841240000081

表1辅助信息表Table 1 Auxiliary information table

步骤S302,根据接收目录,获取与第一批量日期相距最近的第二批量日期。Step S302, according to the receiving list, obtain the second batch date closest to the first batch date.

其中,可以将批量文件以文件名的形式存储在接收目录中,文件名可以包含表示批量相关属性的字段,可以包含但不限于时区码字段、场次编码字段和批量日期字段等,可以参见表1辅助信息表中的相关描述。因此,可以根据各批量文件对应的文件名,获取与第一批量日期相距最近的第二批量日期。批量日期相距越近,对应的批量文件的相关文本信息的相似程度就越高;所以,获取与第一批量日期相距最近的第二批量日期,该步骤的目的是为了获取接收目录中的批量文件集合中与该缺失文件的相关文本信息较为接近的批量文件。Among them, the batch file can be stored in the receiving directory in the form of a file name, and the file name can contain fields indicating batch-related attributes, including but not limited to time zone code fields, event code fields, and batch date fields, etc., see Table 1 The relevant description in the side information table. Therefore, the second batch date closest to the first batch date can be obtained according to the file name corresponding to each batch file. The closer the batch dates are, the higher the similarity of the relevant text information of the corresponding batch files; therefore, to obtain the second batch date closest to the first batch date, the purpose of this step is to obtain the batch files in the receiving directory A batch of files in the collection that are closer to the relevant text information of the missing file.

步骤S303,根据第二批量日期,确定批量文件集合中与第二批量日期对应的批量文件。Step S303, according to the second batch date, determine the batch files corresponding to the second batch date in the batch file set.

其中,可以将批量日期设置在文件名中,因此,根据第二批量日期,便可以在接收目录的批量文件集合中获取包含第二批量日期的文件名,进而,由包含第二批量日期的文件名可以在接收目录中的批量文件集合中筛选出批量日期为第二批量日期的所有批量文件,该批量文件可以包括一个或多个文件。Among them, the batch date can be set in the file name, therefore, according to the second batch date, the file name containing the second batch date can be obtained in the batch file collection of the receiving directory, and then the file containing the second batch date name can filter out all batch files whose batch date is the second batch date from the batch file collection in the receiving directory, and the batch file can include one or more files.

步骤S304,根据批量文件集合中与第二批量日期对应的批量文件,在接收目录中生成缺失文件的替换文件,并将替换文件中的第二批量日期修正为第一批量日期。Step S304, according to the batch files corresponding to the second batch date in the batch file collection, generate a replacement file for the missing file in the receiving directory, and correct the second batch date in the replacement file to the first batch date.

其中,与第二批量日期对应的批量文件可以包含单个或多个文件。对于其中的一种情况的处理方式,在批量文件集合中与第二批量日期对应的批量文件的个数为单个时,将该批量文件确定为该缺失文件的待替换文件,并根据该待替换文件在接收目录中生成缺失文件的替换文件,进而,在替换文件的文件名中,以及文本信息中,将第二批量日期修正为第一批量日期。对于其中的另一种情况的处理方式,在批量文件集合中与第二批量日期对应的批量文件的个数为多个时,在该多个批量文件中选择一个批量文件确定为该缺失文件的待替换文件,并根据该待替换文件在接收目录中生成缺失文件的替换文件,进而,在替换文件的文件名中,以及文本信息中,将第二批量日期修正为第一批量日期。Wherein, the batch files corresponding to the second batch date may include single or multiple files. For the processing method of one of the cases, when the number of batch files corresponding to the second batch date in the batch file collection is single, the batch file is determined as the file to be replaced for the missing file, and according to the file to be replaced The file generates a replacement file for the missing file in the receiving directory, and then, in the file name of the replacement file and in the text information, the date of the second batch is corrected to the date of the first batch. For the processing method of another case, when the number of batch files corresponding to the second batch date in the batch file collection is multiple, select a batch file from the multiple batch files to determine as the missing file The file to be replaced, and a replacement file for the missing file is generated in the receiving directory according to the file to be replaced, and then, in the file name and text information of the replacement file, the date of the second batch is corrected to the date of the first batch.

本实施例的方法,在检测到接收目录中的批量文件集合出现批量文件缺失时,可以根据预设的参照文件集合获取对应于缺失文件的第一批量日期,其中,参照文件集合包含批量文件集合中应包含的各批量文件;接下来,可以在接收目录中的批量文件集合中获取与第一批量日期相距最近的第二批量日期;进而,可以确定批量文件集合中与第二批量日期对应的批量文件;最后,可以在批量文件集合中与第二批量日期对应的批量文件中,获取可以替换该确实文件的待替换文件,从而,根据待替换文件在接收目录中生成缺失文件的替换文件,并将替换文件中的第二批量日期修正为第一批量日期。在本申请提供的该方法中,可以在接收目录中生成缺失文件的替换文件,可以避免发生批量业务处理中断,进而影响其它批量文件的加载的问题,确保批量业务处理的整体验证可以正常进行。In the method of this embodiment, when it is detected that batch files are missing in the batch file set in the receiving directory, the first batch date corresponding to the missing file can be obtained according to the preset reference file set, wherein the reference file set includes the batch file set Each batch of files that should be included in ; Next, the second batch date that is closest to the first batch date can be obtained from the batch file collection in the receiving directory; furthermore, the date corresponding to the second batch date in the batch file collection can be determined Batch files; finally, in the batch files corresponding to the second batch date in the batch file collection, obtain the file to be replaced that can replace the exact file, thereby generating a replacement file for the missing file in the receiving directory according to the file to be replaced, And correct the second batch date in the replacement file to the first batch date. In the method provided by the present application, replacement files for missing files can be generated in the receiving directory, which can avoid the interruption of batch business processing, thereby affecting the loading of other batch files, and ensure that the overall verification of batch business processing can be carried out normally.

在一个实施例中,如图4所示,本申请实施例提供的判断接收目录中的批量文件集合是否出现批量文件缺失的步骤,可以包括:In one embodiment, as shown in FIG. 4, the step of judging whether batch files are missing in the batch file collection in the receiving directory provided by the embodiment of the present application may include:

步骤S401,根据当前批量场次,确定接收目录。Step S401, determine the receiving list according to the current batch session.

在实际的批量业务处理中,可以包括多个批量场次,不同的批量场次对应不同的批量应用,该批量应用可以为该业务系统的上下游应用,该上下游应用可以是与该业务系统有业务交互需求的其它业务系统。可以将同一个批量应用的批量文件以文件名的形式存储在一个接收目录中,组成接收目录中的批量文件集合,批量文件集合为该接收目录中的所有批量文件的集合,因此,批量场次、批量应用和接收目录存在对应关系,根据当前批量场次,便可以确定对应的批量应用以及对应的接收目录。该当前批量场次可以为多个批量场次中的任意一个批量场次。In actual batch business processing, multiple batch sessions may be included, and different batch sessions correspond to different batch applications. The batch applications may be upstream and downstream applications of the business system, and the upstream and downstream applications may have business with the business system. Other business systems with interactive requirements. Batch files of the same batch application can be stored in a receiving directory in the form of file names to form a batch file collection in the receiving directory. The batch file collection is the collection of all batch files in the receiving directory. Therefore, batch sessions, There is a corresponding relationship between batch application and receiving directory, and the corresponding batch application and corresponding receiving directory can be determined according to the current batch session. The current batch session may be any batch session among multiple batch sessions.

步骤S402,获取接收目录中的批量文件集合。Step S402, acquiring batch file sets in the receiving directory.

步骤S403,将批量文件集合与参照文件集合进行文件对比,得到第一文件对比结果。Step S403, performing file comparison between the batch file set and the reference file set to obtain a first file comparison result.

如图5所示,基于批量文件集合中的批量文件的文件名和参照文件集合中的批量文件的文件名,将批量文件集合中的批量文件和参照文件集合中的批量文件进行对比,得到第一文件对比结果。该第一文件对比结果可以用于显示出批量文件集合中是否出现批量文件缺失,以及确定缺失文件。As shown in Figure 5, based on the file names of the batch files in the batch file collection and the file names of the batch files in the reference file collection, the batch files in the batch file collection and the batch files in the reference file collection are compared to obtain the first File comparison results. The first file comparison result can be used to display whether a batch of files is missing in the batch file collection, and to determine the missing files.

具体地,可以基于文件筛选条件,预先形成参照文件集合,并可以将各批量文件以文件名的形式存储在参照文件集合中;另外,也可以将同一个批量应用的批量文件以文件名的形式存储在一个接收目录中,组成接收目录中的批量文件集合;之后,在针对接收目录中的批量文件集合进行检测时,可以基于参照文件集合的文件名和批量文件集合的文件名进行文件比对,得到第一文件对比结果;进而,基于第一文件对比结果,判断接收目录中的批量文件组是否出现批量文件缺失。其中,该文件筛选条件可以是接收目录中的批量文件集合中的批量文件需要满足的条件,例如,批量场次条件、日期条件、文件频度条件等,基于该文件筛选条件,可以形成与接收目录中的批量文件集合对应的参照文件集合。Specifically, the reference file collection can be pre-formed based on the file screening conditions, and each batch of files can be stored in the reference file collection in the form of a file name; in addition, the batch files of the same batch application can also be stored in the form of a file name Stored in a receiving directory to form a batch file collection in the receiving directory; later, when detecting the batch file collection in the receiving directory, file comparison can be performed based on the file name of the reference file collection and the file name of the batch file collection, A first file comparison result is obtained; furthermore, based on the first file comparison result, it is judged whether batch files are missing in the batch file group in the receiving directory. Wherein, the file filtering condition can be a condition that the batch files in the batch file collection in the receiving directory need to meet, for example, batch session conditions, date conditions, file frequency conditions, etc. Based on the file filtering conditions, the receiving directory can be formed The reference file collection corresponding to the batch file collection in .

步骤S404,根据第一文件对比结果,确定接收目录中的批量文件集合是否出现批量文件缺失。Step S404, according to the result of the first file comparison, determine whether there is a batch file missing in the batch file set in the receiving directory.

本实施例的方法,可以根据预设的参照文件集合,确定所述接收目录中的批量文件集合是否出现批量文件缺失,该文件比对的方法可以使得检测结果更准确,检测更高效。The method of this embodiment can determine whether batch files are missing in the batch file set in the receiving directory according to the preset reference file set, and the file comparison method can make the detection result more accurate and the detection more efficient.

在一个实施例中,步骤S403中的将批量文件集合与参照文件集合进行文件对比,可以包括:In one embodiment, the file comparison between the batch file set and the reference file set in step S403 may include:

针对预先划分的多个批量日期范围,将批量文件集合与参照文件集合中对应于同一批量日期范围的批量文件子集和参照文件子集进行文件比对。For the multiple pre-divided batch date ranges, the batch file collection is compared with the batch file subset and the reference file subset corresponding to the same batch date range in the reference file collection.

具体地,可以预先划分多个批量日期范围,进一步地,可以根据多个批量日期范围,将批量文件集合划分为分别对应于不同批量日期范围的多个批量文件子集;将参照文件集合划分为分别对应于不同批量日期范围的多个参照文件子集。以下以两个批量日期范围、两个批量文件子集和两个参照文件子集为例进行说明:Specifically, a plurality of batch date ranges may be pre-divided, and further, according to the plurality of batch date ranges, the batch file set may be divided into a plurality of batch file subsets respectively corresponding to different batch date ranges; the reference file set may be divided into Subsets of multiple reference files, each corresponding to a different batch date range. The following is an example of two batch date ranges, two batch file subsets, and two reference file subsets:

对于满足不同条件的批量日期范围的批量文件子集,对于其中一种情况的处理方式,分别在批量文件集合和参照文件集合中获取满足第一批量日期范围(例如,月初或月末)的批量文件子集,即第一批量文件子集和参照文件子集,即第一参照文件子集;进而,将第一批量文件子集和第一参照文件子集进行文件比对。对于另外一种情况的处理方式,分别在批量文件集合和参照文件集合中获取满足第二批量日期范围(例如,非月初和月末)的批量文件子集,即第二批量文件子集和参照文件子集,即第二参照文件子集;进而,将第二批量文件子集和第二参照文件子集进行文件比对。For batch file subsets of batch date ranges that meet different conditions, for the processing method of one of the cases, obtain batch files that meet the first batch date range (for example, the beginning of the month or the end of the month) in the batch file collection and the reference file collection respectively The subset is the first batch file subset and the reference file subset is the first reference file subset; furthermore, file comparison is performed between the first batch file subset and the first reference file subset. For the processing method of another case, obtain batch file subsets that satisfy the second batch date range (for example, not the beginning of the month and the end of the month) in the batch file collection and the reference file collection, that is, the second batch file subset and the reference file The subset is the second reference file subset; furthermore, file comparison is performed between the second batch file subset and the second reference file subset.

本实施例的方法,预先划分多个批量日期范围,将批量文件集合和参照文件集合分别划分为多个批量文件子集和多个参照文件子集,进而,分别对对应于同一批量日期范围的批量文件子集和参照文件子集进行文件比对,该比对方法更加高效,准确性更高,更加简便。The method of this embodiment divides multiple batch date ranges in advance, divides the batch file collection and the reference file collection into multiple batch file subsets and multiple reference file subsets respectively, and further, respectively corresponding to the same batch date range The batch file subset and the reference file subset are compared, and this comparison method is more efficient, more accurate, and more convenient.

在一个实施例中,本申请实施例提供的构成预设的参照文件集合的步骤,可以包括:In one embodiment, the step of forming a preset reference file set provided in the embodiment of the present application may include:

获取接收目录中的批量文件集合对应的文件筛选条件;根据文件筛选条件,从文件源中筛选出对应的多个文件;根据对应的多个文件,构成参照文件集合。Obtain the file filtering conditions corresponding to the batch file collection in the receiving directory; filter out corresponding multiple files from the file source according to the file filtering conditions; and form a reference file set according to the corresponding multiple files.

其中,该文件筛选条件可以是接收目录中的批量文件集合中的批量文件需要满足的条件,例如,批量场次条件、日期条件、文件频度条件等。文件源可以包括该批量业务处理中的各批量组的所有批量文件;该多个文件即为该文件源中满足文件筛选条件的所有批量文件,将该多个文件汇总构成参照文件集合,该参照文件集合的文件筛选条件和该接收目录中的批量文件集合对应的文件筛选条件相同,存在对应关系。Wherein, the file filtering condition may be a condition that the batch files in the batch file collection in the receiving directory need to meet, for example, a batch session condition, a date condition, a file frequency condition, and the like. The file source can include all batch files of each batch group in the batch business processing; the multiple files are all batch files that meet the file filtering conditions in the file source, and the multiple files are aggregated to form a reference file set. The file filtering condition of the file collection is the same as the file filtering condition corresponding to the batch file collection in the receiving directory, and there is a corresponding relationship.

在一些可能的实现方式中,对于批量场次条件,可以设置一个批量场次,作为当前批量场次;对于日期条件,可以设置两个批量日期范围,即第一批量日期范围(例如,月初或月末)和第二批量日期范围(例如非月初或月末);对于文件频度条件,可以设置为每天执行一次的第一文件频度和每月执行一次的第二文件频度。In some possible implementations, for batch conditions, one batch session can be set as the current batch session; for date conditions, two batch date ranges can be set, namely the first batch date range (for example, the beginning of the month or the end of the month) and The second batch date range (for example, not the beginning of the month or the end of the month); for the file frequency condition, it can be set as the first file frequency executed once a day and the second file frequency executed once a month.

具体地,可以将批量场次条件,例如当前批量场次设置为第一筛选条件,在文件源中筛选出满足当前批量场次的多个批量文件,构成参照文件集合;进而,在该参照文件集合中筛选出同时满足第一批量日期范围、第一文件频度和第二文件频度的多个批量文件,构成第一参照文件子集;在该参照文件集合中筛选出同时满足第二批量日期范围和第一文件频度的多个批量文件,构成第二参照文件子集。Specifically, batch conditions, such as the current batch session, can be set as the first screening condition, and a plurality of batch files satisfying the current batch session can be screened out from the file source to form a reference file set; furthermore, the reference file set can be filtered A plurality of batch files satisfying the first batch date range, the first file frequency and the second file frequency are selected to form the first reference file subset; in the reference file set, the second batch date range and the second batch date range are selected at the same time. A plurality of batch files of the first file frequency constitute a second reference file subset.

本实施例的方法,可以预先设置参照文件集合,便于后续对批量文件集合中的文件进行检测,更加高效,准确性更高,更加简便。The method of this embodiment can pre-set a reference file set to facilitate subsequent detection of files in the batch file set, which is more efficient, more accurate, and more convenient.

在一个实施例中,步骤S301中的根据预设的参照文件集合获取对应于缺失文件的第一批量日期,可以包括:In one embodiment, obtaining the first batch date corresponding to the missing file according to the preset reference file set in step S301 may include:

获取参照文件集合中与缺失文件对应的参照文件的文件名;从文件名中获取参照文件的批量日期,并将参照文件的批量日期确定为第一批量日期。Obtain the file name of the reference file corresponding to the missing file in the reference file collection; obtain the batch date of the reference file from the file name, and determine the batch date of the reference file as the first batch date.

其中,可以将批量文件以文件名的形式存储在接收目录中。在一些可能的实现方式中,在对参照文件集合和接收目录中的批量文件集合进行文件比对时,可以基于各批量文件的文件名进行比对,以此,判断批量文件集合中是否出现批量文件缺失,并确定缺失文件;另外,可以将批量文件的批量日期设置在文件名中,缺失文件和参照文件集合中与之对应的参照文件的文件名相同,批量日期相同,因此,可以将参照文件的批量日期确定为对应于缺失文件的第一批量日期。Wherein, the batch files can be stored in the receiving directory in the form of file names. In some possible implementations, when comparing the reference file set and the batch file set in the receiving directory, the comparison can be performed based on the file names of each batch file, so as to determine whether there is a batch file in the batch file set. The file is missing, and the missing file is determined; in addition, the batch date of the batch file can be set in the file name, and the file name and batch date of the missing file and the corresponding reference file in the reference file collection are the same, so you can set the reference file The batch date of the file is determined to correspond to the first batch date of the missing file.

本实施例的方法,可以根据参照文件的文件名确定对应于缺失文件的第一批量日期,更加准确。The method of this embodiment can determine the first batch date corresponding to the missing file according to the file name of the reference file, which is more accurate.

在一个实施例中,本申请实施例提供的方法还可以包括:In one embodiment, the method provided in the embodiment of this application may also include:

若根据接收目录对第一批量日期相距最近的第二批量日期的获取失败,则在接收目录中生成对应于缺失文件的空文件,并将空文件的文件名设置为缺失文件的文件名。If the acquisition of the second batch date closest to the first batch date fails according to the receiving directory, an empty file corresponding to the missing file is generated in the receiving directory, and the file name of the empty file is set as the file name of the missing file.

在一些可能的实现方式中,导致批量业务处理中断的原因可以为接收目录中的批量文件集合出现批量文件缺失。若根据接收目录对第一批量日期相距最近的第二批量日期的获取失败,则无法在接收目录中形成缺失文件的替换文件,无法解决批量业务处理中断的问题,在这种情况下,可以通过建立空文件,确保批量业务处理的正常进行。In some possible implementation manners, the reason for interrupting the batch service processing may be that the batch files in the batch file collection in the receiving directory are missing. If the acquisition of the second batch date closest to the first batch date fails according to the receiving directory, a replacement file for the missing file cannot be formed in the receiving directory, and the problem of interruption of batch business processing cannot be solved. In this case, you can pass Create an empty file to ensure the normal progress of batch business processing.

本实施例的方法,若根据接收目录对第一批量日期相距最近的第二批量日期的获取失败,可以通过建立空文件,确保批量业务处理的正常进行。In the method of this embodiment, if the acquisition of the second batch date closest to the first batch date fails according to the receiving directory, an empty file can be created to ensure normal processing of the batch business.

在一个实施例中,如图6所示,本申请实施例提供的方法还可以包括:In one embodiment, as shown in Figure 6, the method provided in the embodiment of the present application may further include:

对批量文件集合的批量文件缺失的处理完成后,再次触发对接收目录中的批量文件集合的缺失文件检测及处理,直至接收目录中的批量文件集合未出现批量文件缺失,将接收目录中的批量文件集合应用于作业调度。After the batch file missing processing of the batch file collection is completed, the missing file detection and processing of the batch file collection in the receiving directory will be triggered again until no batch file missing occurs in the batch file collection in the receiving directory, and the batch files in the receiving directory will be received. File collections are used for job scheduling.

其中,批量文件集合中可以存在多个缺失文件,针对多个缺失文件进行补全处理后,得到处理后的批量文件集合,并根据处理后的批量文件集合对接收目录中的批量文件集合进行更新,进而再次将接收目录中的批量文件集合与参照文件集合进行文件对比,得到第二文件对比结果,该第二文件对比结果用于显示更新后的接收目录中的批量文件集合是否出现批量文件缺失,在接收目录中的批量文件集合出现批量文件缺失时,可以再次根据预设的参照文件集合获取对应于缺失文件的第一批量日期,并在接收目录中获取与第一批量日期相距最近的第二批量日期以及与第二批量日期对应的批量文件;从而可以根据批量文件集合中与第二批量日期对应的批量文件,在接收目录中生成缺失文件的替换文件,并将替换文件中的第二批量日期修正为第一批量日期;直至接收目录中的批量文件集合未出现批量文件缺失;在接收目录中的批量文件集合未出现批量文件缺失时,将接收目录中的批量文件集合应用于作业调度。Among them, there may be multiple missing files in the batch file collection, and after completing the multiple missing files, the processed batch file collection is obtained, and the batch file collection in the receiving directory is updated according to the processed batch file collection , and then compare the batch file set in the receiving directory with the reference file set again to obtain the second file comparison result, which is used to show whether batch files are missing in the batch file set in the updated receiving directory , when batch files are missing in the batch file set in the receiving directory, the first batch date corresponding to the missing file can be obtained again according to the preset reference file set, and the first batch date closest to the first batch date can be obtained in the receiving directory. The second batch date and the batch file corresponding to the second batch date; thus, according to the batch file corresponding to the second batch date in the batch file collection, a replacement file for the missing file can be generated in the receiving directory, and the second batch file in the replacement file can be generated. The batch date is corrected to the first batch date; until there is no batch file missing in the batch file collection in the receiving directory; when there is no batch file missing in the batch file collection in the receiving directory, apply the batch file collection in the receiving directory to job scheduling .

本实施例的方法,进一步判断处理后的批量文件集合是否出现批量文件缺失,更加准确,确保后续工作调度的正常进行。The method of this embodiment further judges whether batch files are missing in the processed batch file collection, which is more accurate and ensures normal progress of follow-up work scheduling.

在一些实施例中,如图7所示,提供了另一种金融业务系统中批量文件的处理方法,包括以下步骤:In some embodiments, as shown in FIG. 7 , another batch file processing method in a financial business system is provided, including the following steps:

步骤S701,根据当前批量场次,确定金融业务系统的接收目录。Step S701, according to the current batch session, determine the receiving directory of the financial business system.

在实际的批量业务处理中,可以包括多个批量场次,不同的批量场次对应不同的批量应用,该批量应用可以为该金融业务系统的上下游应用,该上下游应用可以是与该金融业务系统有业务交互需求的其它金融业务系统。可以将同一个批量应用的批量文件以文件名的形式存储在一个接收目录中,组成接收目录中的批量文件集合,批量文件集合为该接收目录中的所有批量文件的集合,因此,批量场次、批量应用和接收目录存在对应关系,根据当前批量场次,便可以确定对应的批量应用以及对应的接收目录。该当前批量场次可以为多个批量场次中的任意一个批量场次。In actual batch business processing, multiple batch sessions may be included, and different batch sessions correspond to different batch applications. The batch applications may be upstream and downstream applications of the financial business system, and the upstream and downstream applications may be related to the financial business system. Other financial business systems with business interaction requirements. Batch files of the same batch application can be stored in a receiving directory in the form of file names to form a batch file collection in the receiving directory. The batch file collection is the collection of all batch files in the receiving directory. Therefore, batch sessions, There is a corresponding relationship between batch application and receiving directory, and the corresponding batch application and corresponding receiving directory can be determined according to the current batch session. The current batch session may be any batch session among multiple batch sessions.

步骤S702,获取接收目录中的批量文件集合。Step S702, acquiring batch file sets in the receiving directory.

步骤S703,获取接收目录中的批量文件集合对应的文件筛选条件。Step S703, acquiring the file filtering condition corresponding to the batch file set in the receiving directory.

步骤S704,根据文件筛选条件,从文件源中筛选出对应的多个文件。Step S704, according to the file filtering condition, a plurality of corresponding files are filtered out from the file source.

步骤S705,根据对应的多个文件,构成参照文件集合。Step S705, constructing a reference file set according to the corresponding multiple files.

其中,该文件筛选条件可以是接收目录中的批量文件集合中的批量文件需要满足的条件,例如,批量场次条件、日期条件、文件频度条件等。文件源可以包括该批量业务处理中的各批量组的所有批量文件;该多个文件即为该文件源中满足文件筛选条件的所有批量文件,将该多个文件汇总构成参照文件集合,该参照文件集合的文件筛选条件和该接收目录中的批量文件集合对应的文件筛选条件相同,存在对应关系。Wherein, the file filtering condition may be a condition that the batch files in the batch file collection in the receiving directory need to meet, for example, a batch session condition, a date condition, a file frequency condition, and the like. The file source can include all batch files of each batch group in the batch business processing; the multiple files are all batch files that meet the file filtering conditions in the file source, and the multiple files are aggregated to form a reference file set. The file filtering condition of the file collection is the same as the file filtering condition corresponding to the batch file collection in the receiving directory, and there is a corresponding relationship.

在一些可能的实现方式中,对于批量场次条件,可以设置一个批量场次,作为当前批量场次;对于日期条件,可以设置两个批量日期范围,即第一批量日期范围(例如,月初或月末)和第二批量日期范围(例如非月初或月末);对于文件频度条件,可以设置为每天执行一次的第一文件频度和每月执行一次的第二文件频度。In some possible implementations, for batch conditions, one batch session can be set as the current batch session; for date conditions, two batch date ranges can be set, namely the first batch date range (for example, the beginning of the month or the end of the month) and The second batch date range (for example, not the beginning of the month or the end of the month); for the file frequency condition, it can be set as the first file frequency executed once a day and the second file frequency executed once a month.

具体地,可以将批量场次条件,例如当前批量场次设置为第一筛选条件,在文件源中筛选出满足当前批量场次的多个批量文件,构成参照文件集合;进而,在该参照文件集合中筛选出同时满足第一批量日期范围、第一文件频度和第二文件频度的多个批量文件,构成第一参照文件子集;在该参照文件集合中筛选出同时满足第二批量日期范围和第一文件频度的多个批量文件,构成第二参照文件子集。Specifically, batch conditions, such as the current batch session, can be set as the first screening condition, and a plurality of batch files satisfying the current batch session can be screened out from the file source to form a reference file set; furthermore, the reference file set can be filtered A plurality of batch files satisfying the first batch date range, the first file frequency and the second file frequency are selected to form the first reference file subset; in the reference file set, the second batch date range and the second batch date range are selected at the same time. A plurality of batch files of the first file frequency constitute a second reference file subset.

步骤S706,针对预先划分的多个批量日期范围,将批量文件集合与参照文件集合中对应于同一批量日期范围的批量文件子集和参照文件子集进行文件比对,得到第一文件对比结果。Step S706, for multiple pre-divided batch date ranges, compare the batch file set with the batch file subset corresponding to the same batch date range and the reference file subset in the reference file set to obtain a first file comparison result.

具体地,可以预先划分多个批量日期范围,进一步地,可以根据多个批量日期范围,将批量文件集合划分为分别对应于不同批量日期范围的多个批量文件子集;将参照文件集合划分为分别对应于不同批量日期范围的多个参照文件子集。以下以两个批量日期范围、两个批量文件子集和两个参照文件子集为例进行说明:Specifically, a plurality of batch date ranges may be pre-divided, and further, according to the plurality of batch date ranges, the batch file set may be divided into a plurality of batch file subsets respectively corresponding to different batch date ranges; the reference file set may be divided into Subsets of multiple reference files, each corresponding to a different batch date range. The following is an example of two batch date ranges, two batch file subsets, and two reference file subsets:

对于满足不同条件的批量日期范围的批量文件子集,对于其中一种情况的处理方式,分别在批量文件集合和参照文件集合中获取满足第一批量日期范围(例如,月初或月末)的批量文件子集,即第一批量文件子集和参照文件子集,即第一参照文件子集;进而,将第一批量文件子集和第一参照文件子集进行文件比对。对于另外一种情况的处理方式,分别在批量文件集合和参照文件集合中获取满足第二批量日期范围(例如,非月初和月末)的批量文件子集,即第二批量文件子集和参照文件子集,即第二参照文件子集;进而,将第二批量文件子集和第二参照文件子集进行文件比对。For batch file subsets of batch date ranges that meet different conditions, for the processing method of one of the cases, obtain batch files that meet the first batch date range (for example, the beginning of the month or the end of the month) in the batch file collection and the reference file collection respectively The subset is the first batch file subset and the reference file subset is the first reference file subset; furthermore, file comparison is performed between the first batch file subset and the first reference file subset. For the processing method of another case, obtain batch file subsets that satisfy the second batch date range (for example, not the beginning of the month and the end of the month) in the batch file collection and the reference file collection, that is, the second batch file subset and the reference file The subset is the second reference file subset; furthermore, file comparison is performed between the second batch file subset and the second reference file subset.

步骤S707,根据第一文件对比结果,确定接收目录中的批量文件集合是否出现批量文件缺失。Step S707, according to the result of the first file comparison, determine whether there is a batch file missing in the batch file set in the receiving directory.

其中,该第一文件对比结果可以用于显示出批量文件集合中是否出现批量文件缺失,以及确定缺失文件。Wherein, the first file comparison result can be used to display whether a batch of files is missing in the batch file collection, and to determine the missing files.

步骤S708,在金融业务系统的接收目录中的批量文件集合出现批量文件缺失时,获取参照文件集合中与缺失文件对应的参照文件的文件名。Step S708, when a batch file is missing in the batch file set in the receiving directory of the financial business system, obtain the file name of the reference file corresponding to the missing file in the reference file set.

步骤S709,从文件名中获取参照文件的批量日期,并将参照文件的批量日期确定为第一批量日期。Step S709, obtaining the batch date of the reference file from the file name, and determining the batch date of the reference file as the first batch date.

其中,可以将批量文件以文件名的形式存储在接收目录中。在一些可能的实现方式中,在对参照文件集合和接收目录中的批量文件集合进行文件比对时,可以基于各批量文件的文件名进行比对,以此,判断批量文件集合中是否出现批量文件缺失,并确定缺失文件;另外,可以将批量文件的批量日期设置在文件名中,缺失文件和参照文件集合中与之对应的参照文件的文件名相同,批量日期相同,因此,可以将参照文件的批量日期确定为对应于缺失文件的第一批量日期。Wherein, the batch files can be stored in the receiving directory in the form of file names. In some possible implementations, when comparing the reference file set and the batch file set in the receiving directory, the comparison can be performed based on the file names of each batch file, so as to determine whether there is a batch file in the batch file set. The file is missing, and the missing file is determined; in addition, the batch date of the batch file can be set in the file name, and the file name and batch date of the missing file and the corresponding reference file in the reference file collection are the same, so you can set the reference file The batch date of the files is determined to correspond to the first batch date of the missing files.

步骤S710,对批量文件集合的批量文件缺失的处理完成后,再次触发对接收目录中的批量文件集合的缺失文件检测及处理,直至接收目录中的批量文件集合未出现批量文件缺失,将接收目录中的批量文件集合应用于作业调度。Step S710, after the batch file missing processing of the batch file set is completed, the missing file detection and processing of the batch file set in the receiving directory is triggered again until no batch file missing occurs in the batch file set in the receiving directory, and the receiving directory The batch file collection in should be used for job scheduling.

本实施例的方法,在检测到接收目录中的批量文件集合出现批量文件缺失时,可以根据预设的参照文件集合获取对应于缺失文件的第一批量日期,其中,参照文件集合包含批量文件集合中应包含的各批量文件;接下来,可以在接收目录中的批量文件集合中获取与第一批量日期相距最近的第二批量日期;进而,可以确定批量文件集合中与第二批量日期对应的批量文件;最后,可以在批量文件集合中与第二批量日期对应的批量文件中,获取可以替换该确实文件的待替换文件,从而,根据待替换文件在接收目录中生成缺失文件的替换文件,并将替换文件中的第二批量日期修正为第一批量日期。在本申请提供的该方法中,可以在接收目录中生成缺失文件的替换文件,可以避免发生批量业务处理中断,进而影响其它批量文件的加载的问题,确保批量业务处理的整体验证可以正常进行。In the method of this embodiment, when it is detected that batch files are missing in the batch file set in the receiving directory, the first batch date corresponding to the missing file can be obtained according to the preset reference file set, wherein the reference file set includes the batch file set Each batch of files that should be included in ; Next, the second batch date that is closest to the first batch date can be obtained from the batch file collection in the receiving directory; furthermore, the date corresponding to the second batch date in the batch file collection can be determined Batch files; finally, in the batch files corresponding to the second batch date in the batch file collection, obtain the file to be replaced that can replace the exact file, thereby generating a replacement file for the missing file in the receiving directory according to the file to be replaced, And correct the second batch date in the replacement file to the first batch date. In the method provided by the present application, replacement files for missing files can be generated in the receiving directory, which can avoid the interruption of batch business processing, thereby affecting the loading of other batch files, and ensure that the overall verification of batch business processing can be carried out normally.

应该理解的是,虽然如上的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flow charts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be executed at different times, The execution order of these steps or stages is not necessarily performed sequentially, but may be executed in turn or alternately with other steps or at least a part of steps or stages in other steps.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的金融业务系统中批量文件的处理方法的金融业务系统中批量文件的处理装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个金融业务系统中批量文件的处理装置实施例中的具体限定可以参见上文中对于金融业务系统中批量文件的处理方法的限定,在此不再赘述。Based on the same inventive concept, the embodiment of the present application also provides a batch file processing device in a financial business system for implementing the above-mentioned method for processing batch files in a financial business system. The solution to the problem provided by the device is similar to the implementation described in the above method, so the specific limitations in the embodiment of the batch file processing device in one or more financial business systems provided below can be referred to above for The limitation of the batch file processing method in the financial business system will not be repeated here.

在一个实施例中,如图8所示,提供了一种金融业务系统中批量文件的处理装置,包括:第一日期获取模块801、第二日期获取模块802、文件确定模块803和替换处理模块804,其中:In one embodiment, as shown in Figure 8, a batch file processing device in a financial business system is provided, including: a first date acquisition module 801, a second date acquisition module 802, a file determination module 803 and a replacement processing module 804, of which:

第一日期获取模块801,用于在金融业务系统的接收目录中的批量文件集合出现批量文件缺失时,根据预设的参照文件集合获取对应于缺失文件的第一批量日期;所述参照文件集合包含所述批量文件集合中应包含的各批量文件;The first date acquisition module 801 is used to obtain the first batch date corresponding to the missing file according to the preset reference file set when the batch file set in the receiving directory of the financial business system is missing; the reference file set Include each batch of files that should be included in the batch of files;

第二日期获取模块802,用于根据所述接收目录,获取与所述第一批量日期相距最近的第二批量日期;The second date acquisition module 802 is configured to acquire the second batch date closest to the first batch date according to the receiving catalog;

文件确定模块803,用于根据所述第二批量日期,确定所述批量文件集合中与所述第二批量日期对应的批量文件;A file determination module 803, configured to determine, according to the second batch date, the batch files corresponding to the second batch date in the batch file set;

替换处理模块804,用于根据所述批量文件集合中与所述第二批量日期对应的批量文件,在所述接收目录中生成所述缺失文件的替换文件,并将所述替换文件中的所述第二批量日期修正为所述第一批量日期。The replacement processing module 804 is configured to generate a replacement file for the missing file in the receiving directory according to the batch file corresponding to the second batch date in the batch file set, and replace all the missing files in the replacement file The date of the second batch is corrected to the date of the first batch.

第一日期获取模块801,还用于:根据当前批量场次,确定所述接收目录;获取所述接收目录中的所述批量文件集合;将所述批量文件集合与所述参照文件集合进行文件对比,得到第一文件对比结果;根据第一文件对比结果,确定所述接收目录中的所述批量文件集合是否出现批量文件缺失。The first date acquisition module 801 is also used to: determine the receiving directory according to the current batch session; obtain the batch file set in the receiving directory; compare the batch file set with the reference file set , to obtain a first file comparison result; according to the first file comparison result, determine whether batch files are missing in the batch file collection in the receiving directory.

进一步地,第一日期获取模块801,还用于:针对预先划分的多个批量日期范围,将所述批量文件集合与所述参照文件集合中对应于同一批量日期范围的批量文件子集和参照文件子集进行文件比对。Further, the first date acquisition module 801 is also configured to: for multiple pre-divided batch date ranges, combine the batch file set and the batch file subset corresponding to the same batch date range in the reference file set and reference A subset of files is compared for files.

在一个实施例中,金融业务系统中批量文件的处理装置还可以包括筛选模块805,筛选模块805,用于获取所述接收目录中的所述批量文件集合对应的文件筛选条件;根据所述文件筛选条件,从文件源中筛选出对应的多个文件;根据对应的多个文件,构成所述参照文件集合。In one embodiment, the batch file processing device in the financial business system may also include a screening module 805, which is used to obtain the file screening conditions corresponding to the batch file collection in the receiving directory; according to the file The filtering condition is to filter out corresponding multiple files from the file source; and form the reference file set according to the corresponding multiple files.

第一日期获取模块801,进一步用于:获取所述参照文件集合中与所述缺失文件对应的参照文件的文件名;从所述文件名中获取参照文件的批量日期,并将参照文件的批量日期确定为所述第一批量日期。The first date obtaining module 801 is further configured to: obtain the file name of the reference file corresponding to the missing file in the reference file set; obtain the batch date of the reference file from the file name, and obtain the batch date of the reference file The date is determined as the first batch date.

在一个实施例中,第二日期获取模块802,还用于:若根据所述接收目录对所述第一批量日期相距最近的所述第二批量日期的获取失败,则在所述接收目录中生成对应于所述缺失文件的空文件,并将空文件的文件名设置为所述缺失文件的文件名。In one embodiment, the second date acquisition module 802 is further configured to: if the acquisition of the second batch date closest to the first batch date fails according to the receiving list, then in the receiving list An empty file corresponding to the missing file is generated, and the filename of the empty file is set to the filename of the missing file.

替换处理模块804,进一步用于:对所述批量文件集合的批量文件缺失的处理完成后,再次触发对所述接收目录中的所述批量文件集合的所述缺失文件检测及处理,直至所述接收目录中的批量文件集合未出现批量文件缺失,将所述接收目录中的所述批量文件集合应用于作业调度。The replacement processing module 804 is further configured to: after the batch file missing processing of the batch file set is completed, trigger the missing file detection and processing of the batch file set in the receiving directory again until the The batch file set in the receiving directory has no batch file missing, and the batch file set in the receiving directory is applied to job scheduling.

在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储批量业务处理中的批量文件等数据。该计算机设备的网络接口用于与外部的设备通过网络连接通信。该计算机程序被处理器执行时以实现一种金融业务系统中批量文件的处理方法。In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure may be as shown in FIG. 9 . The computer device includes a processor, memory and a network interface connected by a system bus. Wherein, the processor of the computer device is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs and databases. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store data such as batch files in batch business processing. The network interface of the computer device is used to communicate with external devices through a network connection. When the computer program is executed by the processor, a batch file processing method in the financial business system is realized.

本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 9 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation on the computer equipment on which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.

在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, there is also provided a computer device, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all It is information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that realizing all or part of the processes in the methods of the above embodiments can be completed by instructing related hardware through computer programs, and the computer programs can be stored in a non-volatile computer-readable storage medium , when the computer program is executed, it may include the procedures of the embodiments of the above-mentioned methods. Wherein, any reference to storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile and volatile storage. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive variable memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc. The volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory. As an illustration and not a limitation, the RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto. The processors involved in the various embodiments provided by this application can be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.

以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above examples only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be determined by the appended claims.

Claims (11)

1. A method for processing batch files in a financial business system, the method comprising:
when a batch file set in a receiving catalog of a financial service system is in batch file missing, acquiring a first batch date corresponding to the missing file according to a preset reference file set; the reference file set comprises all batch files to be contained in the batch file set;
Acquiring a second batch date which is closest to the first batch date according to the receiving catalog;
determining a batch file corresponding to the second batch date in the batch file set according to the second batch date;
and generating a replacement file of the missing file in the receiving directory according to the batch file corresponding to the second batch date in the batch file set, and correcting the second batch date in the replacement file to the first batch date.
2. The method according to claim 1, wherein the method further comprises:
determining the receiving catalogue according to the current batch number;
acquiring a batch file set in the receiving catalog;
comparing the batch file set with the reference file set to obtain a first file comparison result;
and determining whether the batch file deletion occurs to the batch file set in the receiving directory according to the first file comparison result.
3. The method of claim 2, wherein the comparing the batch file set to the reference file set comprises:
and comparing the batch file set with a batch file subset and a reference file subset corresponding to the same batch date range in the reference file set aiming at a plurality of batch date ranges divided in advance.
4. The method according to claim 1, wherein the method further comprises:
acquiring file screening conditions corresponding to batch file sets in the receiving catalogue;
screening a plurality of corresponding files from the file sources according to the file screening conditions;
and forming the reference file set according to the corresponding files.
5. The method of claim 1, wherein the obtaining a first batch date corresponding to the missing file according to the preset reference file set comprises:
acquiring file names of reference files corresponding to the missing files in the reference file set;
and acquiring the batch date of the reference file from the file name, and determining the batch date of the reference file as the first batch date.
6. The method according to claim 1, wherein the method further comprises:
if the acquisition of the second batch date which is closest to the first batch date according to the receiving catalog fails, generating an empty file corresponding to the missing file in the receiving catalog, and setting the file name of the empty file as the file name of the missing file.
7. The method according to any one of claims 1 to 6, further comprising:
and triggering detection and processing of missing files of the batch file set in the receiving directory again after the processing of the batch file missing of the batch file set is completed until the batch file set in the receiving directory is not missing, and applying the batch file set in the receiving directory to job scheduling of the financial service system.
8. A device for processing batch files in a financial business system, the device comprising:
the first date acquisition module is used for acquiring a first batch date corresponding to the missing file according to a preset reference file set when the batch file set in the receiving catalog is missing; the reference file set comprises all batch files to be contained in the batch file set;
a second date obtaining module, configured to obtain, according to the receiving directory, a second batch date that is closest to the first batch date;
the file determining module is used for determining batch files corresponding to the second batch date in the batch file set according to the second batch date;
And the replacement processing module is used for generating a replacement file of the missing file in the receiving catalog according to the batch file corresponding to the second batch date in the batch file set, and correcting the second batch date in the replacement file to the first batch date.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1-7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1-7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-7.
CN202310295020.5A 2023-03-23 2023-03-23 Batch file processing method, device, equipment and medium in financial business system Pending CN116303288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310295020.5A CN116303288A (en) 2023-03-23 2023-03-23 Batch file processing method, device, equipment and medium in financial business system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310295020.5A CN116303288A (en) 2023-03-23 2023-03-23 Batch file processing method, device, equipment and medium in financial business system

Publications (1)

Publication Number Publication Date
CN116303288A true CN116303288A (en) 2023-06-23

Family

ID=86781350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310295020.5A Pending CN116303288A (en) 2023-03-23 2023-03-23 Batch file processing method, device, equipment and medium in financial business system

Country Status (1)

Country Link
CN (1) CN116303288A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119539948A (en) * 2024-11-13 2025-02-28 天翼电子商务有限公司 Batch file processing method and device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100117856A1 (en) * 2008-11-11 2010-05-13 Itron, Inc. System and method of high volume import, validation and estimation of meter data
CN109445972A (en) * 2018-09-21 2019-03-08 深圳供电局有限公司 Data recovery method, device, equipment and storage medium
CN111399862A (en) * 2020-03-13 2020-07-10 深圳忆联信息系统有限公司 Batch installation method and device of Windows missing driver and computer equipment
CN113688147A (en) * 2021-09-07 2021-11-23 中国银行股份有限公司 Data processing method and system
CN114416662A (en) * 2022-01-25 2022-04-29 中国农业银行股份有限公司 File comparison method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100117856A1 (en) * 2008-11-11 2010-05-13 Itron, Inc. System and method of high volume import, validation and estimation of meter data
CN109445972A (en) * 2018-09-21 2019-03-08 深圳供电局有限公司 Data recovery method, device, equipment and storage medium
CN111399862A (en) * 2020-03-13 2020-07-10 深圳忆联信息系统有限公司 Batch installation method and device of Windows missing driver and computer equipment
CN113688147A (en) * 2021-09-07 2021-11-23 中国银行股份有限公司 Data processing method and system
CN114416662A (en) * 2022-01-25 2022-04-29 中国农业银行股份有限公司 File comparison method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119539948A (en) * 2024-11-13 2025-02-28 天翼电子商务有限公司 Batch file processing method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
CN112286939B (en) Method, device and equipment for generating hash of global state in block chain type account book
CN111414427B (en) A data processing method and device suitable for quasi-real-time service
CN116303288A (en) Batch file processing method, device, equipment and medium in financial business system
CN108363727A (en) A kind of date storage method and device based on ZFS file system
US12271687B2 (en) Table column operations for spreadsheets
CN116910039A (en) Abnormal data detection methods, devices, equipment, storage media and program products
CN116302608A (en) Service data processing method, device, computer equipment and storage medium
US20220245097A1 (en) Hashing with differing hash size and compression size
CN113127359A (en) Method and device for obtaining test data
CN117389960A (en) File parsing method, apparatus, device, storage medium and program product
CN115905340A (en) User portrait verification method, device, computer equipment and storage medium
CN116756129A (en) Data complement method and device, storage medium and electronic equipment
CN117331984A (en) Data comparison method, device, computer equipment and storage medium
CN105653525B (en) Method and system for importing data between account sets
CN115842804A (en) Domain name detection method and device, computer equipment and storage medium
CN116126674A (en) Interface testing method and device
CN114513498A (en) File transmission checking method and device, computer equipment and storage medium
CN112766875A (en) Receipt data processing method and device, computer equipment and storage medium
US20250232110A1 (en) Table column operations for spreadsheets
US12174806B2 (en) Hashing for deduplication through skipping selected data
US11995060B2 (en) Hashing a data set with multiple hash engines
CN119004544A (en) PE file information integrity verification method and device, storage medium and equipment
CN117785900A (en) Data updating method, device, computer equipment and storage medium
CN117273896A (en) Data processing method, device, system and computer readable storage medium
CN116167072A (en) Data processing method, device, computer equipment and storage medium

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