Batch file processing method and device, storage medium and electronic equipment

By assembling and encrypting various types of financial business data and generating batch files, the problem of poor generation of batch files in the prior art is solved, the security and universality of the files are improved, and the labor and time cost is reduced.

CN119539948AActive Publication Date: 2025-02-28CHINA TELECOM BESTPAY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411619957.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-28
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

The generation method of generating batch files in the prior art is poor, resulting in poor results in generating batch files. Especially in the payment industry, there is a risk of plain display of file contents, and each payment business needs to generate corresponding batch files, which greatly increases the labor and time cost.

Method used

By determining the various types of financial services to be batched, obtaining each type of financial business data, assemble and process according to the target rules, obtaining the assembled business data, encrypting it, and generating batch files. The target rule includes file header, total data length, total data content length, extended data bits, and valid data content.

Benefits of technology

It improves the security and universality of batch files, reduces the labor and time cost of generating batch files for each business, and thus improves the effectiveness of generating batch files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539948A_ABST
    Figure CN119539948A_ABST
Patent Text Reader

Abstract

The invention discloses a batch file processing method and device, a storage medium and electronic equipment, and relates to the technical field of file processing. The method comprises the steps of determining various types of financial services to be subjected to batch processing operation, and obtaining data of each type of financial services to obtain multiple pieces of service data; according to a target rule, assembling the multiple pieces of business data to obtain assembled business data; and performing encryption processing on the assembled service data to obtain a batch processing file. By means of the method and device, the problem that in the related technology, the generation mode of generating the batch files is not good, and consequently the effect of generating the batch files is poor is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of file processing, and in particular to a batch file processing method and device, a storage medium and an electronic device. Background Art

[0002] With the rapid development of the Internet industry, Internet financial companies have higher and higher standards for fund security, information transmission security, sensitive information security, etc., and are paying more and more attention to the security of large quantities of fund-related documents.

[0003] In the enterprise batch file technology in the related art, most enterprises still simply encrypt the batch files, but the contents of the files are still displayed in plain text, which still poses certain risks to the payment industry, and each payment business needs to generate a corresponding batch file, which greatly increases the manpower and time costs. Therefore, the generation method of batch files in the related art is not good, resulting in poor results in generating batch files.

[0004] With regard to the problem that the generation method of batch files in the related art is not good, resulting in poor effect of generating batch files, no effective solution has been proposed yet. Summary of the invention

[0005] The main purpose of the present application is to provide a batch file processing method and device, a storage medium and an electronic device to solve the problem that the generation method of batch files in the related art is not good, resulting in poor effect of generating batch files.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for processing a batch file is provided. The method comprises: determining multiple types of financial services to be batch processed, and obtaining data of each type of financial services to obtain multiple business data; assembling the multiple business data according to the target rule to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: file header, total data length, total data content length, extended data bits and valid data content, the file header indicates the type information of the business data, the total data length indicates the sum of the length of the extended data bits and the length of the valid data content, the total data content length indicates the length of the valid data content, the extended data bits indicate the type information of the business, and the valid data content indicates the content information of the business data; encrypting the assembled business data to obtain a batch file, wherein the batch file is used to process the multiple types of financial services.

[0007] Furthermore, if the multiple types of financial services include a first type of financial services and a second type of financial services, the multiple business data are assembled and processed according to the target rules to obtain the assembled business data, including: classifying the multiple business data to obtain first type of business data and second type of business data, wherein the first type of business data is the data of the first type of financial services, and the second type of business data is the data of the second type of financial services; according to the target rules, the first type of business data is assembled and processed to obtain assembled first type of business data; according to the target rules, the second type of business data is assembled and processed to obtain assembled second type of business data; based on the assembled first type of business data and the assembled second type of business data, the assembled business data is obtained.

[0008] Furthermore, according to the target rule, the first type of business data is assembled and processed to obtain the assembled first type of business data, including: according to the target rule, obtaining the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the valid data content of the first type of business data; obtaining the assembled first type of business data based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the valid data content of the first type of business data.

[0009] Furthermore, according to the target rule, obtaining the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the valid data content of the first type of business data includes: according to the target rule, according to the type information of the financial business corresponding to the first type of business data, determining the file header of the first type of business data; assembling the first type of business data to obtain the valid data content of the first type of business data, and obtaining the length information of the valid data content of the first type of business data to obtain the total length of the data content of the first type of business data; determining the extended data bits of the first type of business data based on the first type of financial business and the second type of financial business; determining the total data length of the first type of business data based on the length information of the extended data bits of the first type of business data and the length information of the valid data content of the first type of business data.

[0010] Furthermore, after encrypting the assembled business data to obtain a batch file, the method also includes: decrypting the batch file to obtain a decrypted batch file; parsing the decrypted batch file according to the target rule to obtain a file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data; processing the multiple types of financial services based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data.

[0011] Further, based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the effective data content of the first type of business data, processing the multiple types of financial services includes: processing the first type of financial service based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data and the effective data content of the first type of business data; determining the file header of the second type of business data, the total data length of the second type of business data, the total length of the data content of the second type of business data, the extended data bits of the second type of business data and the effective data content of the second type of business data according to the extended data bits of the first type of business data; processing the second type of financial service based on the file header of the second type of business data, the total data length of the second type of business data, the total length of the data content of the second type of business data, the extended data bits of the second type of business data and the effective data content of the second type of business data.

[0012] Furthermore, based on the file header of the first type of business data, the total data length of the first type of business data, the total data content length of the first type of business data and the valid data content of the first type of business data, processing the first type of financial business includes: determining whether the total data content length of the first type of business data is equal to a preset length; if the total data content length of the first type of business data is not equal to the preset length, it indicates that a parsing error has occurred in the first type of business data, and processing of the first type of financial business is prohibited; if the total data content length of the first type of business data is equal to the preset length, processing of the first type of financial business is allowed based on the file header of the first type of business data, the total data length of the first type of business data and the valid data content of the first type of business data.

[0013] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a batch file processing device is provided. The device comprises: a first acquisition unit, which is used to determine multiple types of financial services to be batch processed, and obtain data of each type of financial services to obtain multiple business data; a first processing unit, which is used to assemble the multiple business data according to the target rule to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total length of data, a total length of data content, an extended data bit and valid data content, the file header indicates the type information of the business data, the total length of data indicates the sum of the length of the extended data bit and the length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bit indicates the type information of the business, and the valid data content indicates the content information of the business data; a second processing unit, which is used to encrypt the assembled business data to obtain a batch file, wherein the batch file is used to process the multiple types of financial services.

[0014] Further, if the multiple types of financial services include a first type of financial services and a second type of financial services, the first processing unit includes: a first processing sub-unit, used to classify and process the multiple business data to obtain first type of business data and second type of business data, wherein the first type of business data is the data of the first type of financial services, and the second type of business data is the data of the second type of financial services; a second processing sub-unit, used to assemble and process the first type of business data according to the target rule to obtain assembled first type of business data; a third processing sub-unit, used to assemble and process the second type of business data according to the target rule to obtain assembled second type of business data; a first determination sub-unit, used to obtain the assembled business data based on the assembled first type of business data and the assembled second type of business data.

[0015] Furthermore, the second processing sub-unit includes: a first acquisition module, used to acquire the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the valid data content of the first type of business data according to the target rule; a first determination module, used to obtain the assembled first type of business data based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the valid data content of the first type of business data.

[0016] Furthermore, the first acquisition module includes: a first determination submodule, used to determine the file header of the first type of business data according to the target rule and the type information of the financial business corresponding to the first type of business data; a first processing submodule, used to assemble the first type of business data to obtain the valid data content of the first type of business data, and obtain the length information of the valid data content of the first type of business data to obtain the total length of the data content of the first type of business data; a second determination submodule, used to determine the extended data bits of the first type of business data based on the first type of financial business and the second type of financial business; a third determination submodule, used to determine the total data length of the first type of business data based on the length information of the extended data bits of the first type of business data and the length information of the valid data content of the first type of business data.

[0017] Furthermore, the device also includes: a third processing unit, which is used to decrypt the batch file after encrypting the assembled business data to obtain a batch file, so as to obtain a decrypted batch file; a fourth processing unit, which is used to parse the decrypted batch file according to the target rule to obtain a file header of the first type of business data, a total data length of the first type of business data, a total length of the data content of the first type of business data, an extended data bit of the first type of business data, and a valid data content of the first type of business data; and a fifth processing unit, which is used to process the multiple types of financial services based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bit of the first type of business data, and the valid data content of the first type of business data.

[0018] Further, the fifth processing unit includes: a fourth processing subunit, used to process the first type of financial business based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data and the effective data content of the first type of business data; a second determination subunit, used to determine the file header of the second type of business data, the total data length of the second type of business data, the total length of the data content of the second type of business data, the extended data bits of the second type of business data and the effective data content of the second type of business data according to the extended data bits of the first type of business data; a fifth processing subunit, used to process the second type of financial business based on the file header of the second type of business data, the total data length of the second type of business data, the total length of the data content of the second type of business data, the extended data bits of the second type of business data and the effective data content of the second type of business data.

[0019] Furthermore, the fourth processing sub-unit includes: a first judgment module, used to judge whether the total length of the data content of the first type of business data is equal to a preset length; a first processing module, used to indicate that a parsing error occurs on the first type of business data and prohibit processing of the first type of financial business if the total length of the data content of the first type of business data is not equal to the preset length; and a second processing module, used to allow processing of the first type of financial business based on the file header of the first type of business data, the total length of the data of the first type of business data and the valid data content of the first type of business data if the total length of the data content of the first type of business data is equal to the preset length.

[0020] In order to achieve the above object, according to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a program, wherein the program executes any one of the above batch file processing methods.

[0021] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is provided, which includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the batch file processing methods described above.

[0022] Through the present application, the following steps are adopted: determining multiple types of financial services to be batch processed, and obtaining data of each type of financial services to obtain multiple business data; assembling the multiple business data according to the target rule to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total data length, a total data content length, an extended data bit, and a valid data content, the file header indicates the type information of the business data, the total data length indicates the sum of the length of the extended data bit and the length of the valid data content, the total data content length indicates the length of the valid data content, the extended data bit indicates the type information of the business, and the valid data content indicates the content information of the business data; encrypting the assembled business data to obtain a batch file, wherein the batch file is used to process multiple types of financial services, and solves the problem that the generation method of batch files in the related art is not good, resulting in poor effect of generating batch files. By assembling and processing data of various types of financial businesses according to specific rules (i.e., target rules) to obtain assembled business data, and then encrypting the assembled business data to obtain a batch file, compared with most of the existing batch files that need to generate corresponding business batch files for each business, this solution can assemble specific identifiers according to extended data bits in a single batch file to indicate that a single file has several business types that need to be processed, thereby improving the security and versatility of the batch file, reducing the manpower and time costs brought about by generating batch files for each business, and thereby improving the effect of generating batch files. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0024] Figure 1is a flowchart of a batch file processing method provided in an embodiment of the present application;

[0025] Figure 2 is a flow chart of a batch file parsing method based on special rules in this embodiment;

[0026] Figure 3 This is a schematic diagram of the file data generation rule in this embodiment. Figure 1 ;

[0027] Figure 4 This is a schematic diagram of the file data generation rule in this embodiment. Figure 2 ;

[0028] Figure 5 is a schematic diagram of parsing file data in this embodiment;

[0029] Figure 6 is a flowchart of file parsing in this embodiment;

[0030] Figure 7 is a schematic diagram of file processing interaction in this embodiment;

[0031] Figure 8 is a schematic diagram of a batch file processing device provided according to an embodiment of the present application;

[0032] Fig. 9 is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0033] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0034] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0037] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flowchart of a batch file processing method provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0038] Step S101, determining multiple types of financial services to be batch processed, and acquiring data of each type of financial services to obtain multiple pieces of service data.

[0039] For example, the above-mentioned multiple pieces of business data may include data of multiple business types.

[0040] Step S102, assembling and processing multiple business data according to the target rule to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total length of data, a total length of data content, extended data bits and valid data content, the file header indicates the type information of the business data, the total length of data indicates the sum of the length of the extended data bits and the length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bits indicate the type information of the business, and the valid data content indicates the content information of the business data.

[0041] For example, the data component of a batch file may include a data header, a total length of data, a total length of data content, an extended data bit, and valid data content. The data file header may occupy N bytes. The byte data header is the identification type of the current business, and is used to define the data header for each business separately. The data header is not repeated in the business. The total length of data may occupy 4 bytes, which is the effective length of the total data bytes excluding the data header, and is used to verify the integrity of the total data bytes after parsing. The total length of data content may occupy 4 bytes, which is the total number of rows of valid batch data, and is used to verify the integrity of the number of valid batch rows after parsing. The extended data bit may occupy a minimum of 4 bytes, which may be filled as a custom bit, and the bytes may be defined according to business needs, such as timestamp, encryption vector, unique identifier, serial number, etc. The valid data content may represent the actual content that the batch file needs to process and read.

[0042] Step S103, encrypting the assembled business data to obtain a batch file, wherein the batch file is used to process various types of financial business.

[0043] For example, after the business data is assembled, the assembled data is encrypted to obtain an encrypted batch file.

[0044] Through the above steps S101 to S103, the data of various types of financial services are assembled and processed according to specific rules (i.e., target rules) to obtain assembled business data, and then the assembled business data is encrypted to obtain a batch file. Compared with most of the existing batch files that need to generate corresponding business batch files for each business, this solution can assemble specific identifiers according to extended data bits in a single batch file to indicate that a single file has several business types that need to be processed, thereby improving the security and versatility of the batch files, reducing the manpower and time costs brought about by generating batch files for each business, and thereby improving the effect of generating batch files.

[0045] Optionally, in the batch file processing method provided in the embodiment of the present application, if the multiple types of financial services include a first type of financial services and a second type of financial services, then according to the target rules, the multiple business data are assembled and processed to obtain the assembled business data, including: classifying the multiple business data to obtain first type of business data and second type of business data, wherein the first type of business data is the data of the first type of financial services, and the second type of business data is the data of the second type of financial services; according to the target rules, the first type of business data is assembled and processed to obtain assembled first type of business data; according to the target rules, the second type of business data is assembled and processed to obtain assembled second type of business data; based on the assembled first type of business data and the assembled second type of business data, the assembled business data is obtained.

[0046] For example, the first type of business data and the second type of business data can be assembled respectively according to the file's composition structure including the data header, total data length, total data content length, extended data bits and valid data content (corresponding to the above-mentioned target rules), and the final assembled business data can be obtained based on the assembled first type of business data and second type of business data.

[0047] Through the above scheme, data can be assembled and processed quickly and accurately according to the composition structure of the file.

[0048] Optionally, in the batch file processing method provided in the embodiment of the present application, the first type of business data is assembled and processed according to the target rules, and the assembled first type of business data includes: according to the target rules, obtaining the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data; based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data, the assembled first type of business data is obtained.

[0049] For example, according to the special rules (corresponding to the above-mentioned target rules) set in the composition structure of the file including the data header, total data length, total length of the data content, extended data bits and valid data content, the data header, total data length, total length of the data content, extended data bits and valid data content of the first type of business data are obtained, and then the assembled first type of business data is determined based on the data header, total data length, total length of the data content, extended data bits and valid data content of the first type of business data.

[0050] Through the above solution, the first type of business data can be assembled and processed quickly and accurately.

[0051] Optionally, in the batch file processing method provided in the embodiment of the present application, obtaining the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the valid data content of the first type of business data according to the target rule includes: determining the file header of the first type of business data according to the type information of the financial business corresponding to the first type of business data according to the target rule; assembling the first type of business data to obtain the valid data content of the first type of business data, and obtaining the length information of the valid data content of the first type of business data to obtain the total length of the data content of the first type of business data; determining the extended data bits of the first type of business data based on the first type of financial business and the second type of financial business; determining the total data length of the first type of business data according to the length information of the extended data bits of the first type of business data and the length information of the valid data content of the first type of business data.

[0052] For example, the data file header can occupy N bytes. The byte data header is the identification type of the current business. It is used to define the data header separately for each business, and the data header is not repeated in the business. The total length of the data can occupy 4 bytes, which is the effective length of the total data bytes excluding the data header, and is used to verify the integrity of the total data bytes after parsing. The total length of the data content can occupy 4 bytes, which is the total number of rows of valid batch data, and is used to verify the integrity of the number of valid batch rows after parsing. The extended data bit can occupy the minimum 4 bytes, which can be filled as a custom bit, and the bytes are defined according to business needs, such as timestamp, encryption vector, unique identifier, serial number, etc. The effective data content can represent the actual content that the batch file needs to process and read, and then obtain the data header of the first type of business data, the total length of the data, the total length of the data content, the extended data bit and the effective data content.

[0053] Through the above scheme, the data header, total data length, total data content length, extended data bits and valid data content of the first type of business data can be quickly and accurately determined.

[0054] Optionally, in the batch file processing method provided in the embodiment of the present application, after encrypting the assembled business data to obtain the batch file, the method further includes: decrypting the batch file to obtain a decrypted batch file; parsing the decrypted batch file according to the target rule to obtain a file header of a first type of business data, a total data length of the first type of business data, a total length of the data content of the first type of business data, extended data bits of the first type of business data, and valid data content of the first type of business data; based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data, multiple types of financial services are processed.

[0055] For example, the batch file can be decrypted first, and then the decrypted batch file can be parsed to obtain the data file header, total data length, total data content length, extended data bits and valid data content of the first type of business data, and the financial business can be processed based on the data file header, total data length, total data content length, extended data bits and valid data content of the first type of business data obtained by parsing.

[0056] Through the above solution, financial business can be processed quickly and accurately based on the parsed file data.

[0057] Optionally, in the batch file processing method provided in the embodiment of the present application, based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the effective data content of the first type of business data, processing multiple types of financial services includes: processing the first type of financial services based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data and the effective data content of the first type of business data; determining the file header of the second type of business data, the total data length of the second type of business data, the total length of the data content of the second type of business data, the extended data bits of the second type of business data and the effective data content of the second type of business data according to the extended data bits of the first type of business data; processing the second type of financial services based on the file header of the second type of business data, the total data length of the second type of business data, the total length of the data content of the second type of business data, the extended data bits of the second type of business data and the effective data content of the second type of business data.

[0058] For example, when processing financial services, the data file header, total data length, total data content length, extended data bits and valid data content of the second type of business data can be determined based on the extended data bits of the first type of business data, and the second type of financial services can be processed based on the data file header, total data length, total data content length, extended data bits and valid data content of the second type of business data.

[0059] Through the above solution, the data structure information of the second type of service data can be easily obtained according to the extended data bits of the first type of service data.

[0060] Optionally, in the batch file processing method provided in the embodiment of the present application, processing the first type of financial business based on the file header of the first type of business data, the total data length of the first type of business data, the total data content length of the first type of business data and the valid data content of the first type of business data includes: determining whether the total data content length of the first type of business data is equal to a preset length; if the total data content length of the first type of business data is not equal to the preset length, it indicates that a parsing error has occurred in the first type of business data, and processing of the first type of financial business is prohibited; if the total data content length of the first type of business data is equal to the preset length, processing of the first type of financial business is allowed based on the file header of the first type of business data, the total data length of the first type of business data and the valid data content of the first type of business data.

[0061] For example, whether the first type of business data is parsed correctly can be determined based on the total length of the data content of the first type of business data. If it is determined that the parsing of the first type of business data is incorrect, the first type of business data can be re-parsed, and the corresponding financial business cannot be processed at this time; if it is determined that the parsing of the first type of business data is correct, the corresponding financial business can be processed.

[0062] Through the above solution, it is possible to quickly and accurately determine whether the data is parsed correctly based on the total length of the data content of the business data.

[0063] In this embodiment, in the enterprise-level file batch processing business, the security and reliability issues such as anti-leakage and anti-tampering, especially for the required batch files, batch files related to financial business or batch files related to sensitive data, business data, etc., as well as the processing flow of the overall batch file versatility are solved. It only needs to modify various business scenarios according to specific encryption rules to adapt to any business scenario, thereby solving the problem that enterprise-level batch files need to perform additional parsing of various different businesses between different businesses.

[0064] The main problem solved by this embodiment is the generation and parsing of specific rules in batch file components and file parsing, solving the defects of the actual content of batch files that do not meet the security, universality, and tamper-proof requirements, and reducing the manpower and time costs of generating batch files for each business. For example, Figure 2 is a flowchart of a batch file parsing method based on special rules in this embodiment, and the batch file parsing method based on special rules is as follows Figure 2 shown.

[0065] (1) Instructions for batch file assembly:

[0066] The data components of a batch file include the data header, total data length, total data content length, extended data bits, and valid data content.

[0067] 1) Data file header: occupies N bytes. The byte data header is the identification type of the current service. It is used to define the data header separately for each service. The data header is not repeated in the service.

[0068] 2) Total data length: occupies 4 bytes, which is the effective length of the total data bytes excluding the data header, and is used to verify the integrity of the total data bytes after parsing.

[0069] 3) Total length of data content: occupies 4 bytes, the total number of rows of valid batch data, used to verify the integrity of the number of valid batch rows after parsing.

[0070] 4) Extended data bit: occupies the minimum 4 bytes. This bit can be filled as a custom bit and the bytes can be defined according to business needs, such as timestamp, encryption vector, unique identifier, serial number, etc.

[0071] 5) Valid data content: The batch file needs to process the actual content that is read.

[0072] It should be noted that each batch file may contain generation rules for multiple different businesses, and the business is divided and the corresponding parsing rules are performed according to the data header data.

[0073] The byte length of the extended data bits and valid data content bits is not limited. When grouping files, a special method is used to calculate the number of bytes to ensure that the valid data content bytes are consistent with the total length of the data content and the total data bytes are consistent with the total data length.

[0074] (2) File composition rules:

[0075] Define the byte length and service header data according to the service type, and finally convert them into hexadecimal. If the bytes are insufficient, fill them with 00.

[0076] 1)Total length of data:

[0077] In addition to the file header, the total length of the data content, the extended data bits, and the effective data content are assembled, and the total bytes are calculated and the decimal is converted into hexadecimal.

[0078] 2)Total length of data content:

[0079] After the effective data content is assembled, the total number of bytes of the effective content data is calculated, and finally the decimal is converted into hexadecimal.

[0080] 3) Extended data bit:

[0081] This bit is a free extension bit and can be defined according to the specific business. If no definition is required, a minimum of 4 bits 00 are filled. It can also be used as an identifier for multiple businesses in a single file.

[0082] 4) Effective content data:

[0083] This bit is valid business data content. The content data is processed according to custom rules. The number of bytes occupied by each valid data bit is strictly defined and conforms to the data type format. The minimum is 4 bytes, and any digits less than the specified number are filled with 00.

[0084] After the overall data is assembled, the hexadecimal bytes are converted into binary data and saved, and finally encryption methods can be used for file encryption and transmission.

[0085] and, Figure 3 This is a schematic diagram of the file data generation rule in this embodiment. Figure 1 , Figure 4 This is a schematic diagram of the file data generation rule in this embodiment. Figure 2 ,like Figure 3 and Figure 4 As shown, the batch file data component includes the data header, the total length of the data, the total length of the data content, the extended data bit, and the valid data content.

[0086] (3) Batch file parsing rules:

[0087] It involves file decryption, hexadecimal conversion, file header parsing, total data length parsing, total data content length parsing, valid extension bit data parsing, and data content parsing.

[0088] 1) File decryption:

[0089] After obtaining the batch encrypted file, first perform special decryption on the file to obtain the original batch file.

[0090] 2) Convert hexadecimal:

[0091] Since the original batch file performs binary data conversion, you first need to convert the binary data into hexadecimal.

[0092] 3) Parse the file header:

[0093] Hexadecimal data is parsed according to the rules of the group file. The number of bytes occupied can be defined according to different services. The file header hexadecimal data is converted into actual file header content, and the file header business type is determined and routed to the parsing method of the current business.

[0094] 4) Total length of parsed data:

[0095] According to the assembly rules, the 4-byte total length data is obtained and converted into decimal. This data content will verify the integrity of the overall byte data after the total length of the data content, the extended data bits, and the effective content data are parsed.

[0096] 5) Parse the total length of the data content:

[0097] According to the assembly rules, obtain the total length data of the parsed data content with a length of 4 bytes, convert the hexadecimal into decimal, and verify the byte data integrity of the valid content data.

[0098] 6) Parse the valid extension bit data:

[0099] Parse the corresponding data according to the assembly definition rules. If there is no special extended data assembly, 4 bytes are fixedly parsed.

[0100] 7) Analyze data content:

[0101] Parse the actual valid content of the file and parse the corresponding content according to the assembly rules of different businesses.

[0102] For example, Figure 5 is a schematic diagram of parsing file data in this embodiment, such as Figure 5 As shown, the file can be parsed.

[0103] It should be noted that after all data contents are parsed, the number of bytes is compared with the total length of the data and the total length of the content data to ensure the integrity of the data bytes.

[0104] For example, Figure 6 is a flowchart of file parsing in this embodiment. The file parsing process is as follows Figure 6 shown.

[0105] Compared with the prior art, the beneficial effects of this embodiment are as follows:

[0106] (1) This embodiment perfectly solves the problem of batch file content security.

[0107] (2) Compared with the method in which most existing batch processing files need to generate corresponding business batch processing files for each business, this embodiment can assemble specific identifiers according to extended data bits in a single batch processing file to indicate that a single file has several business types that need to be processed.

[0108] (3) After the overall data analysis is completed, the byte count of the total data and the valid content data needs to be compared to solve the data verification problem.

[0109] For example, Figure 7 This is a schematic diagram of the file processing interaction in this embodiment, and this embodiment uses the scenario of fund-related batch file delivery and fee deduction as an example. It includes the following process steps:

[0110] 1. The party sending the deduction fee generates a batch file based on the transaction data of the deduction.

[0111] 2. Upload the assembled batch files to the storage middleware for storage, and notify the service provider to pick up and parse them.

[0112] 3. The service provider downloads the batch file from the designated storage middleware and decrypts the batch file.

[0113] 4. Convert the decrypted batch file content from binary to hexadecimal.

[0114] 5. Parse the file header according to custom rules to obtain the business type.

[0115] Read 4 bytes according to the fixed parsing length to get the total length of the data.

[0116] The fixed parsing length reads 4 bytes to obtain the total length of the data content.

[0117] Parse the extended data bits, and read and process the byte data according to the rules for custom data.

[0118] Routed to the corresponding business processing logic to parse the valid data content.

[0119] 6. Check the total length of data bytes and the total length of content.

[0120] For example, suppose the message sender currently needs to send the following data:

[0121] Two types of business data need to be batch processed. The first type of business needs to send 100 data for processing, and the second type of business needs to send 10 data for processing. Table 1 represents the data of the delivery and deduction business, and Table 2 represents the business data of the business.

[0122] Table 1

[0123] Bank card number Phone number Deduction amount (cents) Banking Channel 64460000000001 13022222222 61111 681000 64460000000002 13033333333 51234 600001 64460000000003 13044444444 9999991 871234 99+… … … …

[0124] Table 2

[0125] Store Number Total turnover (cents) Profit (cents) Number of consumption transactions 1 191111 123311 101 2 245551 141200 145 3 544221 444223 164 9+… … … …

[0126] 1. Start the assembly and delivery fee deduction business first

[0127] (1) First classify the service data and define the byte size of the data header. In this embodiment, the data header is defined as 2 bytes, and the service type is 12345, which is converted into hexadecimal 30 39.

[0128] (2) Assemble the valid content data and define the data byte size. The deduction service is divided into five attributes. The bank card number is defined as 8 bytes, the mobile phone number is defined as 8 bytes, the deduction amount is defined as 8 bytes, and the bank channel is defined as 4 bytes. The corresponding data is converted into corresponding hexadecimal data for splicing.

[0129] For example, bank card number 00 00 3A A0 43 66F8 01

[0130] Mobile phone number 00 00 00 03 08 2f 57 8e

[0131] Deduction amount00 00 00 00 00 00EE B7

[0132] Bank channel 00 0A 64 28

[0133] Assembled data: 00 00 3AA0 43 66F8 01 00 00 00 03 08 2f 57 8e 00 00 0000 00 00EE B7 00 0A64 28

[0134] All data can be connected in this format to get the complete valid content data bytes.

[0135] (3) Assemble the effective content data length. For example, the effective data length is 100 bits, which is converted into hexadecimal 00 000064.

[0136] (4) Assemble the extended data bit. The current batch file needs to process two different businesses in a single file, so it is necessary to define the judgment compliance. Simply convert the number of remaining business types to be processed into hexadecimal. For example, if there is business data business this time, convert 1 to hexadecimal 00 00 00 01.

[0137] (5) Assemble the total data length. The total data length is calculated based on the total number of valid content bytes + the total number of extended data bytes. For example, 104 bits is converted to hexadecimal 00 00 00 68.

[0138] (6) Finally, all the data are concatenated 30 39 00 00 00 68 00 00 00 1 00 00 00 64 00 003AA0 43 66F8 01 00 00 00 03 08 2f 57 8e 00 00 00 00 00 00EE B7 00 0A64 28 to obtain the disk delivery data of the disk delivery and fee deduction service.

[0139] Since there is a second business that needs to be assembled in this embodiment, just proceed in the same way as the first business process, splice the data header of the second business to the end of the total data of the first business, and finally convert all hexadecimal data into binary to generate a complete batch file.

[0140] 2. Encrypt the assembled batch file and upload it to the storage middleware for download by the service provider.

[0141] 3. The service provider downloads the batch file and decrypts it to get the original file.

[0142] 4. Convert the decrypted batch file content from binary to hexadecimal.

[0143] 5. Parse the file from the beginning according to the custom rules to obtain the corresponding data content.

[0144] Read 2 bytes and convert them into decimal to obtain the business type of the file header, read 4 bytes to obtain the total data length, read 4 bytes of effective content data length, read 4 bytes to obtain the extended data bit (if it is not 0, it means that there are other business types that need to be read), and finally start reading effective data. According to the group disk data rules, the byte reading bank card number definition 8 bytes, mobile phone number definition 8 bytes, deduction amount definition 8 bytes, bank channel definition 4 bytes. Since there are 2 types of business in this embodiment, it is determined whether the first business has been fully read according to the effective content data length of the first business. After reading, the data header of the second business is read and routed to the business logic corresponding to the second business.

[0145] 6. After all data are processed, determine whether the business type data is complete based on the total data length, and then end.

[0146] In addition, it should be noted that if a batch file has only a single type of business to be processed, the extended data bit can default to 00 00 00 00; if a batch file has multiple business types to be processed, the extended data bit can be defined in a custom way, but it is necessary to clearly state how many business types need to be processed, or it can be directly expressed in numbers.

[0147] For example, in various types of files, business one data can be expressed as: (business one data header + business one data total length + business one data content total length + business one data extension data bits (00 00 00 01 indicates that other businesses are included) + business one valid data content); business two data can be expressed as: (business two data header + business two data total length + business two data content total length + business two data extension data bits (00 00 00 00 indicates no other businesses) + business two valid data content); and after the business one data is spliced, the business two data is spliced ​​with the byte of business two data after the last byte of business one. If the third, fourth and other businesses are similar, the third one is spliced ​​after the last byte code of the second one. Moreover, as long as the extended data bits are 00 00 00 01, it means that other service types are followed by the last byte code of this service. For example, if the third service is included, the extended data bits of the second service are also 00 00 00 01. If there is no fourth service, the extended data bits of the third service are 00 0000 00.

[0148] In summary, the batch file processing method provided in the embodiment of the present application determines multiple types of financial services to be batch processed and obtains data of each type of financial services to obtain multiple business data; assembles the multiple business data according to the target rule to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total length of data, a total length of data content, an extended data bit and a valid data content, the file header indicates the type information of the business data, the total length of data indicates the sum of the length of the extended data bit and the length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bit indicates the type information of the business, and the valid data content indicates the content information of the business data; encrypts the assembled business data to obtain a batch file, wherein the batch file is used to process multiple types of financial services, and solves the problem that the generation method of batch files in the related art is not good, resulting in poor effect of generating batch files. By assembling and processing data of various types of financial businesses according to specific rules (i.e., target rules) to obtain assembled business data, and then encrypting the assembled business data to obtain a batch file, compared with most of the existing batch files that need to generate corresponding business batch files for each business, this solution can assemble specific identifiers according to extended data bits in a single batch file to indicate that a single file has several business types that need to be processed, thereby improving the security and versatility of the batch file, reducing the manpower and time costs brought about by generating batch files for each business, and thereby improving the effect of generating batch files.

[0149] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0150] The present application also provides a batch file processing device. It should be noted that the batch file processing device of the present application can be used to execute the batch file processing method provided by the present application. The batch file processing device provided by the present application is introduced below.

[0151] Figure 8 Schematic diagram of a batch file processing device provided according to an embodiment of the present application. Figure 8 As shown, the device includes: a first acquisition unit 801, a first processing unit 802 and a second processing unit 803.

[0152] Specifically, the first acquisition unit 801 is used to determine multiple types of financial services to be batch processed, and acquire data of each type of financial services to obtain multiple pieces of service data;

[0153] The first processing unit 802 is used to assemble the multiple business data according to the target rule to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total length of data, a total length of data content, an extended data bit, and valid data content, the file header indicates type information of the business data, the total length of data indicates the sum of the length of the extended data bit and the length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bit indicates the type information of the business, and the valid data content indicates the content information of the business data;

[0154] The second processing unit 803 is used to encrypt the assembled business data to obtain a batch file, wherein the batch file is used to process various types of financial business.

[0155] In summary, the batch file processing device provided in the embodiment of the present application determines multiple types of financial services to be batch processed through the first acquisition unit 801, and obtains data of each type of financial services to obtain multiple business data; the first processing unit 802 assembles the multiple business data according to the target rule to obtain the assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total length of data, a total length of data content, an extended data bit and a valid data content, the file header indicates the type information of the business data, the total length of data indicates the sum of the length of the extended data bit and the length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bit indicates the type information of the business, and the valid data content indicates the content information of the business data; the second processing unit 803 encrypts the assembled business data to obtain a batch file, wherein the batch file is used to process multiple types of financial services, and solves the problem that the generation method of batch files in the related art is not good, resulting in poor effect of generating batch files. By assembling and processing data of various types of financial businesses according to specific rules (i.e., target rules) to obtain assembled business data, and then encrypting the assembled business data to obtain a batch file, compared with most of the existing batch files that need to generate corresponding business batch files for each business, this solution can assemble specific identifiers according to extended data bits in a single batch file to indicate that a single file has several business types that need to be processed, thereby improving the security and versatility of the batch file, reducing the manpower and time costs brought about by generating batch files for each business, and thereby improving the effect of generating batch files.

[0156] Optionally, in the batch file processing device provided in the embodiment of the present application, if the multiple types of financial services include a first type of financial services and a second type of financial services, the first processing unit includes: a first processing sub-unit, used to classify and process multiple business data to obtain first type of business data and second type of business data, wherein the first type of business data is the data of the first type of financial services, and the second type of business data is the data of the second type of financial services; a second processing sub-unit, used to assemble and process the first type of business data according to target rules to obtain assembled first type of business data; a third processing sub-unit, used to assemble and process the second type of business data according to target rules to obtain assembled second type of business data; a first determination sub-unit, used to obtain assembled business data based on the assembled first type of business data and the assembled second type of business data.

[0157] Optionally, in the batch file processing device provided in the embodiment of the present application, the second processing sub-unit includes: a first acquisition module, used to acquire, according to a target rule, a file header of the first type of business data, a total data length of the first type of business data, a total data content length of the first type of business data, extended data bits of the first type of business data, and valid data content of the first type of business data; and a first determination module, used to obtain the assembled first type of business data based on the file header of the first type of business data, the total data length of the first type of business data, the total data content length of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data.

[0158] Optionally, in the batch file processing device provided in the embodiment of the present application, the first acquisition module includes: a first determination submodule, which is used to determine the file header of the first type of business data according to the target rule and the type information of the financial business corresponding to the first type of business data; a first processing submodule, which is used to assemble the first type of business data to obtain the valid data content of the first type of business data, and obtain the length information of the valid data content of the first type of business data to obtain the total length of the data content of the first type of business data; a second determination submodule, which is used to determine the extended data bits of the first type of business data based on the first type of financial business and the second type of financial business; and a third determination submodule, which is used to determine the total data length of the first type of business data based on the length information of the extended data bits of the first type of business data and the length information of the valid data content of the first type of business data.

[0159] Optionally, in the batch file processing device provided in the embodiment of the present application, the device also includes: a third processing unit, which is used to encrypt the assembled business data to obtain the batch file, and then decrypt the batch file to obtain a decrypted batch file; a fourth processing unit, which is used to parse the decrypted batch file according to the target rule to obtain a file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data; a fifth processing unit, which is used to process multiple types of financial services based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data.

[0160] Optionally, in the batch file processing device provided in the embodiment of the present application, the fifth processing unit includes: a fourth processing sub-unit, used to process the first type of financial business based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, and the valid data content of the first type of business data; a second determination sub-unit, used to determine the file header of the second type of business data, the total data length of the second type of business data, the total length of the data content of the second type of business data, the extended data bits of the second type of business data, and the valid data content of the second type of business data according to the extended data bits of the first type of business data; and a fifth processing sub-unit, used to process the second type of financial business based on the file header of the second type of business data, the total data length of the second type of business data, the total length of the data content of the second type of business data, the extended data bits of the second type of business data, and the valid data content of the second type of business data.

[0161] Optionally, in the batch file processing device provided in the embodiment of the present application, the fourth processing sub-unit includes: a first judgment module, used to judge whether the total length of the data content of the first type of business data is equal to a preset length; a first processing module, used to indicate that a parsing error occurs in the first type of business data if the total length of the data content of the first type of business data is not equal to the preset length, and prohibit processing of the first type of financial business; a second processing module, used to allow processing of the first type of financial business based on the file header of the first type of business data, the total data length of the first type of business data and the valid data content of the first type of business data if the total length of the data content of the first type of business data is equal to the preset length.

[0162] The batch file processing device includes a processor and a memory. The first acquisition unit 801, the first processing unit 802 and the second processing unit 803 are all stored in the memory as program units. The processor executes the program units stored in the memory to implement corresponding functions.

[0163] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the effect of generating batch files can be improved by adjusting kernel parameters.

[0164] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0165] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the batch file processing method is implemented.

[0166] An embodiment of the present invention provides a processor, which is used to run a program, wherein the batch file processing method is executed when the program is running.

[0167] like Fig. 9 As shown, an embodiment of the present invention provides an electronic device, the device includes a processor, a memory and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program: determining multiple types of financial services to be batch processed, and obtaining data of each type of financial services to obtain multiple business data; assembling the multiple business data according to the target rule to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total length of data, a total length of data content, an extended data bit and valid data content, the file header indicates the type information of the business data, the total length of data indicates the sum of the length of the extended data bit and the length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bit indicates the type information of the business, and the valid data content indicates the content information of the business data; encrypting the assembled business data to obtain a batch file, wherein the batch file is used to process multiple types of financial services.

[0168] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0169] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: determining multiple types of financial services to be batch processed, and obtaining data for each type of financial service to obtain multiple business data; assembling the multiple business data according to target rules to obtain assembled business data, wherein the target rules indicate that the assembled business data at least includes: a file header, a total length of data, a total length of data content, extended data bits, and valid data content, the file header indicates type information of the business data, the total length of data indicates the sum of the length of the extended data bits and the length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bits indicate the type information of the business, and the valid data content indicates the content information of the business data; encrypting the assembled business data to obtain a batch file, wherein the batch file is used to process multiple types of financial services.

[0170] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0171] The present application 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 the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0172] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0174] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0175] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0176] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0177] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0178] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt 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.) that contain computer-usable program code.

[0179] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for processing batch files, characterized in that: include: Determine multiple types of financial businesses to be batch processed, and obtain data of each type of financial business to obtain multiple business data; According to the target rule, the multiple pieces of business data are assembled to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total length of data, a total length of data content, an extended data bit, and valid data content, the file header indicates type information of the business data, the total length of data indicates the sum of the length of the extended data bit and the length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bit indicates type information of the business, and the valid data content indicates content information of the business data; The assembled business data is encrypted to obtain a batch file, wherein the batch file is used to process the multiple types of financial business.

2. The method according to claim 1, characterized in that If the multiple types of financial services include the first type of financial services and the second type of financial services, the multiple pieces of business data are assembled according to the target rule, and the assembled business data includes: Classify the multiple pieces of business data to obtain first-type business data and second-type business data, wherein the first-type business data is data of the first-type financial business, and the second-type business data is data of the second-type financial business; According to the target rule, assembling the first type of business data to obtain assembled first type of business data; According to the target rule, assembling the second type of business data to obtain assembled second type of business data; The assembled business data is obtained based on the assembled business data of the first type and the assembled business data of the second type.

3. The method according to claim 2, characterized in that According to the target rule, the first type of business data is assembled and processed, and the assembled first type of business data includes: According to the target rule, obtaining a file header of the first type of business data, a total length of data of the first type of business data, a total length of data content of the first type of business data, an extended data bit of the first type of business data, and valid data content of the first type of business data; The assembled first type of business data is obtained based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the valid data content of the first type of business data.

4. The method according to claim 3, characterized in that: According to the target rule, obtaining the file header of the first type of business data, the total data length of the first type of business data, the total data content length of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data includes: Determining, according to the target rule and based on the type information of the financial business corresponding to the business data of the first type, a file header of the business data of the first type; Performing assembly processing on the first type of service data to obtain valid data content of the first type of service data, and acquiring length information of the valid data content of the first type of service data to obtain a total length of the data content of the first type of service data; Determining, according to the first type of financial service and the second type of financial service, an extended data bit of the service data of the first type; The total data length of the first type of service data is determined according to the length information of the extended data bits of the first type of service data and the length information of the valid data content of the first type of service data.

5. The method according to claim 2, characterized in that: After encrypting the assembled business data to obtain a batch file, the method further includes: Decrypting the batch file to obtain a decrypted batch file; According to the target rule, the decrypted batch file is parsed to obtain a file header of the first type of business data, a total length of data of the first type of business data, a total length of data content of the first type of business data, an extended data bit of the first type of business data, and valid data content of the first type of business data; The multiple types of financial services are processed based on the file header of the first type of business data, the total data length of the first type of business data, the total length of the data content of the first type of business data, the extended data bits of the first type of business data and the valid data content of the first type of business data.

6. The method according to claim 5, characterized in that Processing the multiple types of financial services based on the file header of the first type of business data, the total data length of the first type of business data, the total data content length of the first type of business data, the extended data bits of the first type of business data, and the valid data content of the first type of business data includes: Processing the first type of financial service based on the file header of the first type of service data, the total data length of the first type of service data, the total data content length of the first type of service data, and the valid data content of the first type of service data; Determine, according to the extended data bits of the first type of service data, a file header of the second type of service data, a total length of data of the second type of service data, a total length of data content of the second type of service data, an extended data bit of the second type of service data, and valid data content of the second type of service data; The second type of financial service is processed based on the file header of the second type of service data, the total data length of the second type of service data, the total data content length of the second type of service data, the extended data bits of the second type of service data and the valid data content of the second type of service data.

7. The method according to claim 6, characterized in that Processing the first type of financial service based on the file header of the first type of service data, the total data length of the first type of service data, the total data content length of the first type of service data, and the valid data content of the first type of service data includes: Determining whether the total length of the data content of the first type of service data is equal to a preset length; If the total length of the data content of the first type of business data is not equal to the preset length, it indicates that the parsing of the first type of business data is wrong, and the processing of the first type of financial business is prohibited; If the total length of the data content of the first type of business data is equal to the preset length, the first type of financial business is allowed to be processed based on the file header of the first type of business data, the total length of the data of the first type of business data and the valid data content of the first type of business data.

8. A batch file processing device, characterized in that: include: A first acquisition unit is used to determine multiple types of financial services to be batch processed, and acquire data of each type of financial services to obtain multiple pieces of service data; A first processing unit is configured to assemble the plurality of pieces of business data according to a target rule to obtain assembled business data, wherein the target rule indicates that the assembled business data at least includes: a file header, a total length of data, a total length of data content, an extended data bit, and valid data content, the file header indicates type information of the business data, the total length of data indicates the sum of a length of the extended data bit and a length of the valid data content, the total length of data content indicates the length of the valid data content, the extended data bit indicates type information of the business, and the valid data content indicates content information of the business data; The second processing unit is used to encrypt the assembled business data to obtain a batch file, wherein the batch file is used to process the multiple types of financial business.

9. A computer-readable storage medium, characterized in that: The storage medium stores a program, wherein the program executes the batch file processing method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the batch file processing method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data transmission method, device and equipment and storage medium

    CN112491989A

  • Service processing method and device, equipment and storage medium

    CN112860706A

  • Batch file processing method and device in financial service system, equipment and medium

    CN116303288A

  • Data processing method and device, equipment and medium

    CN117424890A

  • Classification of source data by neural network processing

    US20190273510A1