Batch file online processing method and device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202610745737.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本申请的主要目的在于提供一种批量文件的转联机处理方法、批量文件的转联机处理装置、计算机可读存储介质和电子设备,以至少解决现有技术中批量文件的转联机处理方法的处理效率较低的问题
[0015] The technical solution of this application involves acquiring batch files, each containing multiple business data entries; parsing each business data entry to obtain multiple business type identifiers, with each business data entry corresponding to one business type identifier; matching the online service code of each business type identifier from a preset mapping rule library, which includes the mapping relationship between business type identifiers and online service codes; and distributing the business data corresponding to each business type identifier to the corresponding online microservice engine for processing based on the online service code. This solution, by acquiring and parsing each business data entry in the batch files, dynamically identifying business type identifiers, and combining this with the mapping relationship between business type identifiers and online service codes in the preset mapping rule library, achieves intelligent distribution and processing of multiple business types, improving processing efficiency and thus solving the problem of low processing efficiency in existing batch file to online processing methods.
Smart Images

Figure CN122596025A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a batch file transfer machine processing method, a batch file transfer machine processing device, a computer-readable storage medium, and an electronic device. Background Technology
[0002] When processing large volumes of transaction data, batch file transfer to online transactions has become an essential function in core banking systems. With the continuous expansion and diversification of banking services, the system needs to be able to efficiently and accurately process batch files from different channels and involving various business scenarios. These files contain various transaction instructions ranging from transfers and loans to wealth management products.
[0003] Existing batch file transfer methods are mainly limited by issues such as high business coupling and insufficient scalability, resulting in low processing efficiency. Summary of the Invention
[0004] The main objective of this application is to provide a batch file transfer machine processing method, a batch file transfer machine processing device, a computer-readable storage medium, and an electronic device, so as to at least solve the problem of low processing efficiency in the prior art batch file transfer machine processing methods.
[0005] To achieve the above objectives, according to one aspect of this application, a method for batch file conversion to online processing is provided, comprising: acquiring a batch file, the batch file including multiple pieces of business data; parsing each piece of business data in the batch file to obtain multiple business type identifiers, each piece of business data corresponding to one business type identifier; matching the online service code of each business type identifier from a preset mapping rule library, the preset mapping rule library including the mapping relationship between the business type identifier and the online service code; and distributing the business data corresponding to each business type identifier to a corresponding online microservice engine for processing according to the online service code.
[0006] Optionally, each piece of business data in the batch file is parsed to obtain multiple business type identifiers, with each piece of business data corresponding to one business type identifier. This includes: parsing the fields of each piece of business data in the batch file to extract the business type identifier field; and converting the business type identifier field into the business type identifier.
[0007] Optionally, matching the online service code of each business type identifier from a preset mapping rule base includes: loading the preset mapping rule base; for each business type identifier of each piece of business data, matching it in the preset mapping rule base to obtain the online service code corresponding to the business type identifier.
[0008] Optionally, after matching in the preset mapping rule base, the method further includes: if no matching is found for the online service code of the service type identifier, determining the current service data as unmatched data; skipping the processing of the unmatched data, and recording the information of the unmatched data, the information of the unmatched data including the service type identifier and error code of the unmatched data.
[0009] Optionally, based on the online service code, the business data corresponding to each business type identifier is distributed to the corresponding online microservice engine for processing, including: binding the matched online service code and the corresponding business data through an online engine proxy to form a task to be distributed; and sending the task to be distributed to the online microservice engine corresponding to the online service code for processing.
[0010] Optionally, before matching the online service codes of each service type identifier from the preset mapping rule base, the method further includes: obtaining historical service data, the service type identifier of the historical service data, and the online service code corresponding to the historical service data; constructing a mapping relationship between the service type identifier of the historical service data and the online service code corresponding to the historical service data based on the historical service data, the service type identifier of the historical service data, and the online service code corresponding to the historical service data; and storing the mapping relationship to obtain the preset mapping rule base.
[0011] Optionally, for each piece of business data, the business type identifier is matched in the preset mapping rule base to obtain the online service code corresponding to the business type identifier, including: constructing a hash table, the hash table being used to store the mapping relationship between the business type identifier and the online service code in the preset mapping rule base; using the business type identifier of each piece of business data as the key value of the hash table, and performing a hash lookup operation; based on the hash lookup operation, retrieving the online service code corresponding to the business type identifier from the hash table.
[0012] According to another aspect of this application, a batch file online processing apparatus is provided, comprising: a first acquisition unit for acquiring a batch file, the batch file including multiple pieces of business data; a parsing unit for parsing each piece of business data in the batch file to obtain multiple business type identifiers, each piece of business data corresponding to one business type identifier; a matching unit for matching the online service code of each business type identifier from a preset mapping rule base, the preset mapping rule base including the mapping relationship between the business type identifier and the online service code; and a distribution unit for distributing the business data corresponding to each business type identifier to a corresponding online microservice engine for processing according to the online service code.
[0013] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform any of the batch file transfer processing methods described above.
[0014] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including methods for performing any of the batch file transfer processing methods described above.
[0015] The technical solution of this application involves acquiring batch files, each containing multiple business data entries; parsing each business data entry to obtain multiple business type identifiers, with each business data entry corresponding to one business type identifier; matching the online service code of each business type identifier from a preset mapping rule library, which includes the mapping relationship between business type identifiers and online service codes; and distributing the business data corresponding to each business type identifier to the corresponding online microservice engine for processing based on the online service code. This solution, by acquiring and parsing each business data entry in the batch files, dynamically identifying business type identifiers, and combining this with the mapping relationship between business type identifiers and online service codes in the preset mapping rule library, achieves intelligent distribution and processing of multiple business types, improving processing efficiency and thus solving the problem of low processing efficiency in existing batch file to online processing methods. Attached Figure Description
[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1A hardware structure block diagram of a mobile terminal for performing a batch file transfer processing method according to an embodiment of this application is shown.
[0018] Figure 2 A flowchart illustrating a batch file transfer machine processing method according to an embodiment of this application is shown.
[0019] Figure 3 A structural block diagram of a batch file transfer processing apparatus according to an embodiment of this application is shown;
[0020] Figure 4 A system architecture diagram of a batch file transfer processing system according to an embodiment of this application is shown;
[0021] Figure 5 A flowchart of a method for a batch file transfer processing system provided according to an embodiment of this application is shown.
[0022] The above figures include the following reference numerals:
[0023] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation
[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] As described in the background section, existing batch file transfer processing methods are mainly limited by high business coupling, low processing efficiency, and insufficient scalability. To address the problem of low processing efficiency in existing batch file transfer processing methods, embodiments of this application provide a batch file transfer processing method, a batch file transfer processing device, a computer-readable storage medium, and an electronic device.
[0028] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0029] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a batch file transfer processing method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0030] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the batch file transfer processing method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] This embodiment provides a batch file transfer processing method that runs on a mobile terminal, computer terminal or similar computing device. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although the logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0032] Figure 2 This is a flowchart of a batch file transfer processing method according to an embodiment of this application. For example... Figure 2 As shown, the method includes the following steps:
[0033] Step S201: Obtain batch files, which include multiple business data entries;
[0034] Specifically, first, a batch file containing multiple business data entries needs to be obtained. This business data comes from various business operations of the bank, such as transfers, deposits, and loan repayments. The batch file can be obtained from internal databases, external partners, or file transfer protocol (FTP) servers.
[0035] Step S202: Parse each piece of business data in the batch file to obtain multiple business type identifiers, with each piece of business data corresponding to one business type identifier.
[0036] Specifically, each piece of business data in the batch files is parsed to extract a specific business type identifier. This process acts like a file reader, understanding the meaning of each record and determining which type of banking business it belongs to. The business type identifier is crucial in determining the subsequent processing path; it's like a data classification label, enabling the identification and differentiation of different business types, such as separately labeling corporate-to-personal transfers, corporate-to-corporate transfers, and credit card transactions.
[0037] Step S203: Match the online service code of each of the above-mentioned service type identifiers from the preset mapping rule library. The preset mapping rule library includes the mapping relationship between the above-mentioned service type identifiers and the above-mentioned online service codes.
[0038] Specifically, a pre-configured mapping rule base is used to find the corresponding online service code based on the parsed business type identifier. The pre-configured mapping rule base is a pre-configured database or data structure that stores the mapping relationship between all possible business type identifiers and online service codes. This approach intelligently determines which data should be sent to which type of online microservice engine, rather than requiring a pre-defined processing method or hard-coded online service for the entire batch of files, as in traditional methods. This significantly reduces business coupling and code complexity.
[0039] Step S204: Based on the above online service code, distribute the above business data corresponding to each of the above business type identifiers to the corresponding online microservice engines for processing.
[0040] Specifically, based on the matched online service code, data with specific business type identifiers is distributed to the corresponding online microservice engines for processing. This means that different types of business data are routed to the microservices most suitable for them, where specialized services handle them specifically, thereby improving the efficiency and accuracy of business processing. For example, business-to-personal transfer data is sent to the microservice handling personal account transactions, while business-to-business transactions are sent to the microservice handling inter-company transactions.
[0041] This embodiment extracts a unique business type identifier by parsing each piece of business data in a batch file, breaking the limitations of the traditional one-to-one online processing mechanism and supporting intelligent identification and dynamic processing of multiple business types. This significantly improves the system's adaptability and scalability, enabling the bank's core system to respond agilely to constantly changing business needs without frequent code modifications or system reconfiguration, reducing system maintenance complexity and costs. Secondly, by utilizing the mapping relationship between business type identifiers and online service codes stored in a preset mapping rule base, the system can quickly determine the online transaction type that each piece of business data should invoke, achieving precise matching of data to services. This avoids the hard-coding method of binding a single online service to the entire file, reducing system latency and improving processing speed and resource utilization. Furthermore, by distributing business data to the corresponding online microservice engines for processing, different business types can be executed in parallel in different microservices, significantly improving concurrent processing capabilities and overall throughput. At the same time, each microservice focuses on a specific business type, reducing the coupling between codes and improving code maintainability and reusability. In summary, by acquiring and parsing each piece of business data in batch files, dynamically identifying business type identifiers, and combining the mapping relationship between business type identifiers and online service codes in the preset mapping rule base, intelligent distribution and processing of multiple types of business are achieved, thereby improving processing efficiency.
[0042] In the specific implementation process, each piece of business data in the batch file is parsed to obtain multiple business type identifiers. Each piece of business data corresponds to one business type identifier. This includes: parsing the fields of each piece of business data in the batch file to extract the business type identifier field; and converting the business type identifier field into the business type identifier.
[0043] Specifically, the first step is to parse the fields of each business data entry in the batch file. This operation is similar to interpreting the sentence structure of a document, aiming to accurately extract specific fields representing the business type from the data records. These fields are usually defined during the batch file design phase and contain the key information needed to identify the business type. For example, when processing a batch file of bank transfer requests, field parsing focuses on specific fields indicating the nature of the transfer (such as business-to-personal or business-to-business), which are crucial for subsequent operations. After identifying the business type identifier fields, the next step is to convert these fields into understandable and usable business type identifiers. This conversion involves mapping the raw values of the fields to predefined identifiers, such as converting "PS" to "business-to-personal" and "PG" to "business-to-business," so that appropriate processing measures can be taken based on these identifiers. The conversion of business type identifier fields ensures data consistency and standardization, enabling the unified processing of various business types regardless of the specific representation of the data.
[0044] This embodiment performs detailed field parsing on each piece of business data, focusing particularly on the business type identifier field that reveals the essence of the business. This operation is like precisely locating the business logic behind each transaction in the file, whether it's a business-to-personal transfer, a business-to-business settlement, or a credit card repayment, all of which can be quickly identified. Converting the raw values parsed from the fields into a unified business type identifier not only standardizes the data representation but also lays a solid foundation for subsequent mapping rule matching and microservice distribution. Through this embodiment, business type identification can be completed with higher accuracy and a lower error rate, maintaining processing speed even with massive amounts of data. This ability to accurately identify and convert not only improves the efficiency of the entire processing flow but also greatly enhances the system's flexibility and scalability, enabling banks to quickly introduce and adjust new business types without incurring additional burdens, meeting ever-changing market demands.
[0045] In some embodiments of this application, matching the online service code of each of the above-mentioned service type identifiers from a preset mapping rule base includes: loading the preset mapping rule base; for each of the above-mentioned service data, matching the above-mentioned service type identifier in the preset mapping rule base to obtain the above-mentioned online service code corresponding to the above-mentioned service type identifier.
[0046] Specifically, the pre-defined mapping rule base stores the correspondence between business type identifiers and online service codes (OLCs). Before processing batch files, the pre-defined mapping rule base is loaded to ensure that all mapping relationships are available for subsequent data matching. The loading process involves reading mapping tables from the backend database, caching them in memory, or building indexes to ensure rapid access and use of these rules during matching, thus improving processing speed. As each piece of business data in the batch files is parsed and its business type identifier is extracted, the corresponding OLC for these identifiers is then searched in the pre-defined mapping rule base. This matching process is fast and accurate because the pre-defined mapping rule base is pre-loaded and ready to accept queries. By using the business type identifier as the query condition, the required OLC can be directly located, avoiding unnecessary searches and saving processing time. Upon successful matching, the OLC that should be invoked for each piece of business data is obtained. These codes guide how the data should be distributed to the correct microservice engine for processing, providing core information to ensure the correct execution of business logic. With OLCs, data can be intelligently directed to microservices designed specifically for handling that type of business, thereby achieving efficient and accurate business processing.
[0047] Further, for each of the aforementioned business data entries, the aforementioned business type identifier is matched in the aforementioned preset mapping rule base to obtain the aforementioned online service code corresponding to the aforementioned business type identifier, including: constructing a hash table, the hash table being used to store the mapping relationship between the aforementioned business type identifier and the aforementioned online service code in the aforementioned preset mapping rule base; using the aforementioned business type identifier of each of the aforementioned business data entries as the key value of the aforementioned hash table, and performing a hash lookup operation; based on the aforementioned hash lookup operation, retrieving the aforementioned online service code corresponding to the aforementioned business type identifier from the aforementioned hash table.
[0048] Specifically, a hash table is first constructed to store the mapping relationships between all business type identifiers and online service codes in the preset mapping rule base. The design principle of the hash table is to convert the business type identifier into a hash value through a specific hash function, and use this hash value as the lookup key to quickly locate the corresponding online service code. Compared with traditional linear search or binary search, the hash table has higher lookup efficiency, with a time complexity close to O(1), i.e., almost constant time, unaffected by the size of the data. For each piece of business data in the batch file, its business type identifier is extracted and used as the key to enter into the hash table for lookup. The hash lookup operation can quickly locate the mapping relationship stored in the hash table and obtain the online service code that matches the business type identifier. This process is like using a high-speed index to look up a term in a dictionary, providing a fast and accurate data matching solution. Based on the result of the hash lookup, the online service code corresponding to the business type identifier can be retrieved immediately, and this result will be used for subsequent business data distribution processing. The lookup mechanism optimized by the hash table ensures the efficiency of the matching process, maintaining a fast response even when processing large-scale datasets.
[0049] This embodiment achieves rapid location of the mapping relationship between business type identifiers and online service codes in the preset mapping rule base by constructing a hash table and using hash lookup. This greatly improves the efficiency and accuracy of batch file to online processing, reduces waiting time, and avoids unnecessary resource waste.
[0050] This embodiment enhances the intelligent processing capabilities of business data in batch files. By loading a preset mapping rule base and accurately matching business type identifiers, it can quickly and accurately determine the online service code that should be invoked for each piece of business data, thereby guiding the data to its destination for efficient processing. This process not only reduces processing time but also improves the rational allocation of resources, helping to enhance the processing efficiency and flexibility of the bank's core system.
[0051] Furthermore, after matching in the aforementioned preset mapping rule base, the method further includes: if no matching is found for the aforementioned online service code of the aforementioned business type identifier, the current business data is determined as unmatched data; the processing of the aforementioned unmatched data is skipped, and the information of the aforementioned unmatched data is recorded, including the business type identifier and error code of the unmatched data.
[0052] Specifically, when attempting to match the business type identifier of each piece of business data from the preset mapping rule base to find the corresponding online service code, this embodiment considers a special case where some business type identifiers fail to find a matching online service code in the preset mapping rule base. This situation can be caused by various reasons, such as the rule base not being updated, the business type identifier being entered incorrectly, or the service corresponding to the business type identifier not yet being implemented.
[0053] Faced with such a mismatch, the first step is to mark the business data for which no matching online service code can be found as mismatched data and record its relevant information, including its business type identifier and error code. This is done for subsequent error tracking, analysis, and repair, and also to ensure that the overall processing flow remains uninterrupted even if some data is problematic, guaranteeing the system's robustness and continuity. Next, further processing of the mismatched data will be skipped to avoid system anomalies or resource waste caused by invalid data processing instructions. Simultaneously, recording the information about the mismatched data preserves sufficient clues for subsequent manual processing, retries, or corrections. This method effectively isolates the impact of abnormal data on normal system operation, ensures the smooth progress of the processing flow, and provides the necessary information foundation for problem resolution.
[0054] When processing business data in batches, this embodiment ensures that even if a business type identifier is not recorded in the preset mapping rule base, it can be immediately identified and marked as unmatched data, rather than causing the entire processing flow to stall or become abnormal. Subsequently, the processing of these unmatched data is automatically skipped, avoiding unnecessary operations that waste valuable resources. At the same time, key information about the unmatched data, such as the business type identifier and error code, is recorded, providing a basis for subsequent error analysis and data repair. This mechanism not only reduces the risk of overall system performance degradation due to individual data anomalies but also simplifies the management process for abnormal data, improving system reliability and user experience.
[0055] In some embodiments of this application, the business data corresponding to each of the above-mentioned business type identifiers is distributed to the corresponding online microservice engine for processing according to the above-mentioned online service code, including: binding the matched online service code and the corresponding business data through the online engine proxy to form a task to be distributed; and sending the task to be distributed to the online microservice engine corresponding to the above-mentioned online service code for processing.
[0056] Specifically, the matched online service codes are bound to the corresponding business data, forming a series of tasks to be distributed. This process is equivalent to labeling each piece of business data, indicating which microservice engine it should reach, thereby ensuring that the data accurately reaches the correct processing destination. Then, these tasks to be distributed are sent to the online microservice engine capable of processing the corresponding online service codes.
[0057] This step ensures that every piece of business data reaches the correct destination, where it is handled by the microservice engine responsible for that type of transaction. This approach efficiently distributes the load, accelerates business data processing, and ensures that each transaction is executed correctly, significantly improving the accuracy and response time of batch file processing.
[0058] In some embodiments of this application, before matching the online service codes of each of the aforementioned service type identifiers from the preset mapping rule base, the method further includes: obtaining historical service data, the service type identifiers of the historical service data, and the online service codes corresponding to the historical service data; constructing a mapping relationship between the service type identifiers of the historical service data and the online service codes corresponding to the historical service data based on the historical service data, the service type identifiers of the historical service data, and the online service codes corresponding to the historical service data; and storing the mapping relationship to obtain the preset mapping rule base.
[0059] Specifically, before the batch file processing flow begins, previously processed business data is acquired, including the business type identifiers and their corresponding online service codes (OLCs). The collection of historical data forms the basis for building a pre-defined mapping rule base, reflecting the past behavior patterns and processing logic of the business system, and providing a reference for predicting and processing future data. In-depth analysis of the collected historical data identifies the correlation between different business type identifiers and their OLCs, thereby constructing a complete set of mapping rules. This process is similar to building a business processing dictionary, where each business type identifier is a keyword, and the corresponding OLC is an explanatory entry to guide future data processing. The constructed mapping relationships are stored to form a pre-defined mapping rule base. This pre-defined mapping rule base not only contains the logic of historical data processing but is also updated regularly to incorporate the latest business type identifiers and their corresponding OLCs, ensuring the timeliness and comprehensiveness of the processing logic.
[0060] By learning from and analyzing historical business data, a pre-defined mapping rule base was built and maintained. This rule base can intelligently associate business type identifiers with corresponding online service codes. This mechanism enables batch file-to-online processing methods to quickly and accurately identify the business type when faced with new business data and call the most suitable online microservice engine for processing, improving data processing efficiency and accuracy. Simultaneously, the dynamic updating feature of the rule base ensures timely adaptation to changes in the business environment, continuous optimization of processing logic, and reduction of processing errors caused by incorrect identification of business type identifiers. This lowers the overall system maintenance cost and enhances the system's flexibility and responsiveness.
[0061] This application also provides a batch file transfer processing apparatus. It should be noted that the batch file transfer processing apparatus of this application can be used to execute the batch file transfer processing method provided in this application. This apparatus is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0062] The following describes the batch file transfer processing device provided in the embodiments of this application.
[0063] Figure 3 This is a schematic diagram of a batch file transfer processing device according to an embodiment of this application. Figure 3As shown, the device includes a first acquisition unit 10, a parsing unit 20, a matching unit 30, and a distribution unit 40. The first acquisition unit is used to acquire a batch file, which includes multiple pieces of business data; the parsing unit is used to parse each piece of business data in the batch file to obtain multiple business type identifiers, with each piece of business data corresponding to one business type identifier; the matching unit is used to match the online service code of each business type identifier from a preset mapping rule base, which includes the mapping relationship between the business type identifier and the online service code; the distribution unit is used to distribute the business data corresponding to each business type identifier to the corresponding online microservice engine for processing according to the online service code.
[0064] This embodiment extracts a unique business type identifier by parsing each piece of business data in a batch file, breaking the limitations of the traditional one-to-one online processing mechanism and supporting intelligent identification and dynamic processing of multiple business types. This significantly improves the system's adaptability and scalability, enabling the bank's core system to respond agilely to constantly changing business needs without frequent code modifications or system reconfiguration, reducing system maintenance complexity and costs. Secondly, by utilizing the mapping relationship between business type identifiers and online service codes stored in a preset mapping rule base, the system can quickly determine the online transaction type that each piece of business data should invoke, achieving precise matching of data to services. This avoids the hard-coding method of binding a single online service to the entire file, reducing system latency and improving processing speed and resource utilization. Furthermore, by distributing business data to the corresponding online microservice engines for processing, different business types can be executed in parallel in different microservices, significantly improving concurrent processing capabilities and overall throughput. At the same time, each microservice focuses on a specific business type, reducing the coupling between codes and improving code maintainability and reusability. In summary, by acquiring and parsing each piece of business data in batch files, dynamically identifying business type identifiers, and combining the mapping relationship between business type identifiers and online service codes in the preset mapping rule base, intelligent distribution and processing of multiple types of business are achieved, thereby improving processing efficiency.
[0065] In the specific implementation process, the above-mentioned parsing unit includes a parsing module and a conversion module. The parsing module is used to parse the fields of each piece of business data in the batch file and extract the business type identifier field; the conversion module is used to convert the business type identifier field into the business type identifier.
[0066] This embodiment performs detailed field parsing on each piece of business data, focusing particularly on the business type identifier field that reveals the essence of the business. This operation is like precisely locating the business logic behind each transaction in the file, whether it's a business-to-personal transfer, a business-to-business settlement, or a credit card repayment, all of which can be quickly identified. Converting the raw values parsed from the fields into a unified business type identifier not only standardizes the data representation but also lays a solid foundation for subsequent mapping rule matching and microservice distribution. Through this embodiment, business type identification can be completed with higher accuracy and a lower error rate, maintaining processing speed even with massive amounts of data. This ability to accurately identify and convert not only improves the efficiency of the entire processing flow but also greatly enhances the system's flexibility and scalability, enabling banks to quickly introduce and adjust new business types without incurring additional burdens, meeting ever-changing market demands.
[0067] In some embodiments of this application, the matching unit includes a loading module and a matching module. The loading module is used to load the preset mapping rule library; the matching module is used to match the service type identifier of each piece of the above-mentioned service data in the preset mapping rule library to obtain the online service code corresponding to the service type identifier.
[0068] Furthermore, the matching module includes a construction submodule, an execution submodule, and a retrieval submodule. The construction submodule is used to construct a hash table, which stores the mapping relationship between the business type identifier and the online service code in the preset mapping rule base. The execution submodule is used to perform a hash lookup operation, using the business type identifier of each piece of business data as the key of the hash table. The retrieval submodule is used to retrieve the online service code corresponding to the business type identifier from the hash table based on the hash lookup operation.
[0069] This embodiment achieves rapid location of the mapping relationship between business type identifiers and online service codes in the preset mapping rule base by constructing a hash table and using hash lookup. This greatly improves the efficiency and accuracy of batch file to online processing, reduces waiting time, and avoids unnecessary resource waste.
[0070] This embodiment enhances the intelligent processing capabilities of business data in batch files. By loading a preset mapping rule base and accurately matching business type identifiers, it can quickly and accurately determine the online service code that should be invoked for each piece of business data, thereby guiding the data to its destination for efficient processing. This process not only reduces processing time but also improves the rational allocation of resources, helping to enhance the processing efficiency and flexibility of the bank's core system.
[0071] Furthermore, the aforementioned apparatus also includes a determining unit and a recording unit. The determining unit is used to determine the current service data as unmatched data if, after matching in the aforementioned preset mapping rule base, no matching is found for the aforementioned online service code that corresponds to the aforementioned service type identifier; the recording unit is used to skip the processing of the aforementioned unmatched data and record the information of the aforementioned unmatched data, including the service type identifier and error code of the unmatched data.
[0072] When processing business data in batches, this embodiment ensures that even if a business type identifier is not recorded in the preset mapping rule base, it can be immediately identified and marked as unmatched data, rather than causing the entire processing flow to stall or become abnormal. Subsequently, the processing of these unmatched data is automatically skipped, avoiding unnecessary operations that waste valuable resources. At the same time, key information about the unmatched data, such as the business type identifier and error code, is recorded, providing a basis for subsequent error analysis and data repair. This mechanism not only reduces the risk of overall system performance degradation due to individual data anomalies but also simplifies the management process for abnormal data, improving system reliability and user experience.
[0073] In some embodiments of this application, the distribution unit includes a binding module and a sending module. The binding module is used to bind the matched online service code and the corresponding business data through the online engine proxy to form a task to be distributed; the sending module is used to send the task to be distributed to the online microservice engine corresponding to the online service code for processing.
[0074] This embodiment ensures that every piece of business data reaches the correct destination, where it is handled by the microservice engine responsible for that type of transaction. This approach efficiently distributes the load, accelerates business data processing, and ensures that each transaction is executed correctly, significantly improving the accuracy and response time of batch file processing.
[0075] In some embodiments of this application, the above-described apparatus further includes a second acquisition unit, a construction unit, and a storage unit. The second acquisition unit is configured to acquire historical service data, the service type identifier of the historical service data, and the online service code corresponding to the historical service data before matching the online service code of each of the aforementioned service type identifiers from a preset mapping rule base. The construction unit is configured to construct a mapping relationship between the service type identifier of the historical service data and the online service code corresponding to the historical service data based on the historical service data, the service type identifier of the historical service data, and the online service code corresponding to the historical service data. The storage unit is configured to store the mapping relationship to obtain the preset mapping rule base.
[0076] By learning from and analyzing historical business data, a pre-defined mapping rule base was built and maintained. This rule base can intelligently associate business type identifiers with corresponding online service codes. This mechanism enables batch file-to-online processing methods to quickly and accurately identify the business type when faced with new business data and call the most suitable online microservice engine for processing, improving data processing efficiency and accuracy. Simultaneously, the dynamic updating feature of the rule base ensures timely adaptation to changes in the business environment, continuous optimization of processing logic, and reduction of processing errors caused by incorrect identification of business type identifiers. This lowers the overall system maintenance cost and enhances the system's flexibility and responsiveness.
[0077] The aforementioned batch file transfer processing device includes a processor and a memory. The first acquisition unit, parsing unit, matching unit, and distribution unit are all stored as program units in the memory, and the processor executes the aforementioned program units stored in the memory to achieve the corresponding functions. All of the above modules are located in the same processor; alternatively, the above modules may be located in different processors in any combination.
[0078] The memory may include non-permanent memory in computer-readable media, such as 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.
[0079] This application also provides a batch file transfer processing system, the system architecture diagram of which is shown below. Figure 4 As shown. The batch file transfer and online processing system includes a file receiving module, a file parsing module, a rule engine module, a transaction distribution module, and an online engine module. The file receiving module downloads files from the data sharing system via specified file message notifications. The file parsing module extracts file type and other information, and parses each data entry to obtain the business type of each entry. The rule engine module stores a dynamically configured business type rule base (including file type, business type identifier, and online service code mapping table). It obtains the online service code through element matching rules. If a data entry does not match a corresponding rule, a degradation strategy is triggered to skip the current entry and record the data information, error code, and error message to prevent file processing failure. The transaction distribution module calls the corresponding online transaction interface based on the matching result, supporting multi-threaded parallel processing. The online engine module handles the business process and supports timeout retry and fixed error code retry operations. The corresponding method flowchart for this system is shown below. Figure 5 As shown.
[0080] Step S101: Receive batch files and verify their format validity.
[0081] Step S102: Extract the file type and parse the data one by one to obtain the business type identifier field (parse one by one to obtain the business type of a single data item).
[0082] Step S103: Load the rule base (business type and online service code mapping library) that maps file type, business type identifier and online service code.
[0083] Step S104: Quickly match the target transaction type using a hash table and distribute the transaction. This involves distributing the transaction to the corresponding online microservice engine via an online microservice broker.
[0084] Step S105: Call the online interface of the online microservice and record the transaction log at the same time.
[0085] The key points of this embodiment are: (1) Dynamic business type identifier configuration rule base. Through a dynamically updatable rule base (such as a database, configuration file, or Apollo configuration middleware), the business type identifier is decoupled from the online transaction interface, realizing the separation of business logic and code. (2) Obtain business type identifier by parsing. Each piece of data in the batch file is parsed independently, and the target transaction interface is matched in real time based on the business type identifier, rather than the traditional whole file binding to a single transaction type. (3) Asynchronous parallel processing and load balancing. Asynchronous calls and multi-threading technology are used, combined with dynamic load distribution strategies (such as polling and weight allocation) to improve system throughput. (4) Abnormal degradation and self-healing capability. For unmatched or failed data, degradation strategies are automatically triggered to perform skip, retry, and other operations to avoid interruption of the overall process.
[0086] This embodiment achieves the following effects: dynamic load distribution significantly improves processing speed; adding new business type identifiers only requires configuring rules, drastically reducing development costs; dynamic configuration of business type identifiers enables rapid expansion of new business type identifiers and transactions, while the distributed cluster supports horizontal scaling and containerized deployment.
[0087] Compared to existing technologies, by decoupling business type identifiers and transaction interfaces through a dynamic rule base, the system can quickly adapt to new business type identifiers (such as banks adding direct debit payment products). Only configuration updates are needed, not code refactoring, solving the problems of long development cycles and high maintenance costs associated with traditional hard-coded solutions. Item-by-item parsing combined with asynchronous parallel processing allows different business data in large files to be simultaneously distributed to their corresponding transaction modules, avoiding overall file queuing and significantly improving throughput. Meanwhile, an anomaly degradation mechanism ensures that the failure of a single data item does not affect the overall process, guaranteeing high system availability.
[0088] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the batch file transfer processing method.
[0089] This invention provides a processor for running a program, wherein the program executes the batch file transfer processing method.
[0090] This invention provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the aforementioned batch file transfer processing method. The device described herein can be a server, PC, PAD, mobile phone, etc.
[0091] This application also provides a computer program product that, when executed on a data processing device, is adapted to perform the steps of initializing the transfer processing method for at least the aforementioned batch files.
[0092] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0093] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0096] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0097] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0098] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0099] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0101] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0102] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A batch file transfer processing method, characterized in that, include: Obtain a batch of files, wherein the batch of files includes multiple business data entries; Each piece of business data in the batch file is parsed to obtain multiple business type identifiers, and each piece of business data corresponds to one business type identifier; Match the online service code of each of the service type identifiers from a preset mapping rule base, wherein the preset mapping rule base includes the mapping relationship between the service type identifier and the online service code; Based on the online service code, the business data corresponding to each business type identifier is distributed to the corresponding online microservice engine for processing.
2. The method according to claim 1, characterized in that, Each piece of business data in the batch file is parsed to obtain multiple business type identifiers, with each piece of business data corresponding to one business type identifier, including: For each piece of business data in the batch file, perform field parsing to extract the business type identifier field; Convert the business type identifier field to the business type identifier.
3. The method according to claim 1, characterized in that, Matching the online service code of each service type identifier from the preset mapping rule base, including: Load the preset mapping rule library; For each piece of business data, the business type identifier is matched in the preset mapping rule base to obtain the online service code corresponding to the business type identifier.
4. The method according to claim 3, characterized in that, After performing matching in the preset mapping rule base, the method further includes: If no matching online service code for the service type identifier is found, the current service data is determined to be unmatched data; Skip the processing of the unmatched data and record the information of the unmatched data, including the service type identifier and error code of the unmatched data.
5. The method according to claim 1, characterized in that, Based on the online service code, the business data corresponding to each business type identifier is distributed to the corresponding online microservice engine for processing, including: The online engine agent binds the matched online service code and the corresponding business data to form a task to be distributed. The task to be distributed is sent to the online microservice engine corresponding to the online service code for processing.
6. The method according to claim 1, characterized in that, Before matching the online service code of each service type identifier from the preset mapping rule base, the method further includes: Obtain historical business data, the business type identifier of the historical business data, and the online service code corresponding to the historical business data; Based on the historical business data, the business type identifier of the historical business data, and the online service code corresponding to the historical business data, a mapping relationship is constructed between the business type identifier of the historical business data and the online service code corresponding to the historical business data; The mapping relationships are stored to obtain the preset mapping rule library.
7. The method according to claim 3, characterized in that, For each piece of business data, the business type identifier is matched in the preset mapping rule base to obtain the online service code corresponding to the business type identifier, including: Construct a hash table, which is used to store the mapping relationship between the business type identifier and the online service code in the preset mapping rule base; Use the business type identifier of each piece of business data as the key of the hash table and perform a hash lookup operation; Based on the hash lookup operation, the online service code corresponding to the service type identifier is retrieved from the hash table.
8. A batch file transfer processing device, characterized in that, include: The first acquisition unit is used to acquire batch files, wherein the batch files include multiple business data entries; The parsing unit is used to parse each piece of business data in the batch file to obtain multiple business type identifiers, and each piece of business data corresponds to one business type identifier; A matching unit is used to match the online service code of each of the service type identifiers from a preset mapping rule base, wherein the preset mapping rule base includes the mapping relationship between the service type identifier and the online service code; The distribution unit is used to distribute the business data corresponding to each business type identifier to the corresponding online microservice engine for processing according to the online service code.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the batch file transfer processing method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including a batch file transfer processing method for performing any one of claims 1 to 7.