File processing system, method, device, equipment and medium

The main database server selects the target database server according to the file type and uses the message center server to transmit the parsing results, which solves the problem of parsing failure caused by random selection, realizes efficient file parsing and result statistics, and ensures the smooth progress of subsequent operations.

CN114201454BActive Publication Date: 2025-09-26CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111533225.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-15
Publication Date
2025-09-26
Estimated Expiration
2041-12-15

AI Technical Summary

Technical Problem

In the prior art, the main database server randomly selects a sub-database server when distributing file parsing tasks, which may cause parsing failure and fail to effectively count the parsing results of each sub-database server, affecting the smooth progress of subsequent work processes.

Method used

The main database server determines the target database server based on the correspondence between the file type and the database server, and distributes the file parsing task through the message center server. The target database server performs the parsing and returns the results. The message center server forwards the results to the main database server, and the main database server saves and counts the parsing results of each target database server.

Benefits of technology

The success rate of file parsing is improved, and intuitive statistics of the parsing results of each target database server are achieved, ensuring the smooth progress of subsequent work processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114201454B_ABST
    Figure CN114201454B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data verification technology, and in particular to a file processing system, method, apparatus, device, and medium. A main database server can determine at least one target database server to parse the file based on the target file type of the file to be parsed and the pre-saved correspondence between the file type and at least one database server. Each target database server parses the file, thereby improving the success rate of file parsing. After each target database server parses the file, it also sends the parsing result to the message center server, which forwards the parsing result to the main database server, so that the main database server can save the parsing result of each target database server on the file, more intuitively count the parsing result of each target database server, and ensure the smooth progress of subsequent operation processes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data verification technology, and in particular to a file processing system, method, apparatus, device and medium. Background Art

[0002] File processing systems need to process a large number of files daily, including documents from various exchanges, market information files, and files sent by various clients. These systems include database servers. Upon receiving these files, the database servers must parse them for subsequent processing and use in business processes. For example, this file processing system could be a bank custody system.

[0003] However, with the increasing volume of file processing systems and the increasing automation of these systems, the number of files that database servers need to parse has increased, making the parsing speed of existing single database servers incapable of keeping up with the speed at which files are received. Therefore, a solution has been proposed to expand the single database server solution in a file processing system to include a master database server and at least one slave database server. Upon receiving a file to be parsed, the master database server distributes the file to at least one slave database server, which then parses the file. This reduces the load on each database server and increases the speed of file parsing.

[0004] However, in the prior art, when the main database server distributes the file to be parsed to other sub-database servers for parsing, it only randomly selects a sub-database server to parse the file, and may select a sub-database server that cannot parse the file, which ultimately leads to parsing failure. In addition, only the parsing result of each sub-database server can be viewed from the sub-database server, and the parsing result of each sub-database server on the file cannot be well counted. Summary of the Invention

[0005] The present application provides a file processing system, method, apparatus, device and medium to solve the problem in the prior art that the sub-database server selected cannot parse files and cannot count the parsing results of the sub-database server, resulting in the inability to perform subsequent operation processes.

[0006] An embodiment of the present application provides a file processing system, the system comprising:

[0007] The main database server is configured to determine, based on a target file type of a file to be parsed and a pre-stored correspondence between file types and at least one database server, at least one target database server corresponding to the target file type; and send a file parsing message carrying first identification information of each target database server to the message center server;

[0008] The message center server is configured to receive the file parsing message; and send the file parsing message to a target database server of each first identification information according to each first identification information carried in the file parsing message;

[0009] Any of the target database servers is configured to receive the file parsing message, obtain the file according to the second identification information of the file carried in the file parsing message, and parse the file; and send the file parsing result carrying its own first identification information to the message center server;

[0010] The message center server is further configured to receive the file parsing result sent by the target database server, and send the file parsing result to the main database server;

[0011] The main database server is further configured to receive the file parsing result and, based on the first identification information of the target database server carried in the file parsing result, store the parsing result in correspondence with the first identification information.

[0012] Furthermore, the master database server is further configured to determine, for each target database server, a target file download address corresponding to the target file type according to a pre-stored correspondence between the file type and the file download address; and distribute the file to the target file download address;

[0013] The target database server is specifically used to obtain the target file type of the file carried in the file parsing message, determine the target file download path corresponding to the target file type based on the pre-saved correspondence between the file type and the file download path; and obtain the file based on the target file download path and the second identification information.

[0014] Furthermore, the target database server is also used to send a parsing result carrying the first identification information of the target database service to the message center server if the target database server fails to obtain the file from the target file download path, wherein the parsing result is a parsing failure result.

[0015] Furthermore, the main database server is further configured to obtain a pre-configured storage location corresponding to each target database server for the parsing result corresponding to the target database server, and save the parsing result to the storage location.

[0016] Furthermore, the master database server is further configured to send a post-parsing task trigger message to the message center server if it is identified that each parsing result corresponding to the file is successfully parsed, wherein the post-parsing task trigger message carries first identification information of at least one target database server;

[0017] The message center server is further configured to receive the post-parsed task trigger message and, based on first identification information of at least one target database server carried in the post-parsed task trigger message, send the post-parsed task trigger message to the target database server of the first identification information;

[0018] Any of the target database servers is further configured to receive the post-parsing task triggering message and respond to subsequent tasks corresponding to the target file type pre-stored for the file based on the parsed file.

[0019] Furthermore, the target database server is further configured to send the processing result of the subsequent task to the message center server if it is recognized that the subsequent task processing is completed;

[0020] The message center server is further configured to receive the processing result and send the processing result to the main database server;

[0021] The main database server is further configured to receive the processing result; and store the processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server in correspondence with each other.

[0022] Furthermore, the main database server is further configured to determine a target file type of the file according to the name of the file.

[0023] The present invention also provides a method for processing a file, the method comprising:

[0024] Determining at least one target database server corresponding to the target file type according to a target file type of the file to be parsed and a pre-stored correspondence between the file type and at least one database server;

[0025] Sending a file parsing message carrying the first identification information of each target database server to the message center server;

[0026] The file parsing result sent by the message center server is received, and according to the first identification information of the target database server carried in the file parsing result, the parsing result and the first identification information are stored in correspondence with each other.

[0027] Furthermore, the storing the parsing result and the first identification information in correspondence with each other includes:

[0028] For each analysis result corresponding to the target database server, a pre-configured storage location corresponding to the target database server is obtained, and the analysis result is saved in the storage location.

[0029] Furthermore, the method further comprises:

[0030] If it is identified that each parsing result corresponding to the file is successfully parsed, a post-parsing task trigger message is sent to the message center server, wherein the post-parsing task trigger message carries first identification information of at least one target database server.

[0031] Furthermore, the method further comprises:

[0032] receiving a processing result sent by the message center server, wherein the processing result carries first identification information of the target database;

[0033] The processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server are correspondingly saved.

[0034] Furthermore, the method for determining the target file type of the file to be parsed includes:

[0035] Determine the target file type of the file according to the name of the file.

[0036] The present application also provides a file processing device, comprising:

[0037] a determination module, configured to determine at least one target database server corresponding to the target file type according to a target file type of the file to be parsed and a pre-stored correspondence between the file type and at least one database server;

[0038] a sending processing module, configured to send a file parsing message carrying the first identification information of each target database server to a message center server;

[0039] The receiving and processing module is used to receive the file parsing result sent by the message center server, and according to the first identification information of the target database server carried in the file parsing result, store the parsing result and the first identification information in correspondence with each other.

[0040] Furthermore, the receiving and processing module is specifically configured to obtain a pre-configured storage location corresponding to each target database server for the parsing result corresponding to the target database server, and save the parsing result to the storage location.

[0041] Furthermore, the sending processing module is also used to send a post-parsing task trigger message to the message center server if it is identified that each parsing result corresponding to the file is successfully parsed, wherein the post-parsing task trigger message carries the first identification information of at least one target database server.

[0042] Furthermore, the receiving and processing module is also used to receive the processing result sent by the message center server, wherein the processing result carries the first identification information of the target database; and save the processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server.

[0043] Furthermore, the determination module is further configured to determine a target file type of the file according to the name of the file.

[0044] An embodiment of the present application further provides an electronic device, comprising a processor, wherein the processor is configured to implement the steps of any of the above-described file processing methods when executing a computer program stored in a memory.

[0045] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the steps of any of the above-described file processing methods when executed by a processor.

[0046] An embodiment of the present application further provides a computer program product, which includes: computer program code, which, when executed on a computer, enables the computer to execute the steps of any of the above-mentioned file processing methods.

[0047] In an embodiment of the present application, the main database server can determine at least one target database server for parsing the file based on the target file type of the file to be parsed and the pre-saved correspondence between the file type and at least one database server, and the main database server sends a file parsing message to each target database server through the message center server, and each target database server parses the file, thereby improving the success rate of file parsing; and after each target database server parses the file, it will also send the parsing result to the message center server, and the message center server forwards the parsing result to the main database server, so that the main database server can save the parsing result of each target database server on the file, more intuitively count the parsing result of each target database server, and ensure the smooth progress of subsequent operation processes. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0049] Figure 1 A schematic diagram of the structure of a file processing system provided in an embodiment of the present application;

[0050] Figure 2 A schematic diagram of the interaction process between the primary database server, target database server, and message center server provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of a file parsing process applied to a target database server according to an embodiment of the present application;

[0052] Figure 4 A schematic diagram of a file parsing process applied to a primary database server according to an embodiment of the present application;

[0053] Figure 5 A schematic diagram of a file processing flow provided in an embodiment of the present application;

[0054] Figure 6 A schematic diagram of the structure of a file processing device provided in an embodiment of the present application;

[0055] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] To make the objectives, technical solutions, and advantages of this application more clear, this application will be further described in detail below with reference to the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0057] In order to improve the success rate of file parsing, more intuitively summarize the parsing results of each target database server, and ensure the smooth progress of subsequent operation processes, the embodiments of the present application provide a file processing system, method, device, equipment and medium.

[0058] The acquisition, storage, use, and processing of data in this application's technical solution comply with relevant national laws and regulations.

[0059] Example 1:

[0060] Figure 1 This is a schematic diagram of the structure of a file processing system provided in an embodiment of the present application. The system includes a main database server 101, a message center server 102, and at least one target database server 103, wherein:

[0061] The main database server 101 is configured to determine, based on a target file type of a file to be parsed and a pre-stored correspondence between a file type and at least one database server, at least one target database server corresponding to the target file type; and send a file parsing message carrying first identification information of each target database server to a message center server;

[0062] The message center server 102 is configured to receive the file parsing message; and send the file parsing message to a target database server of each first identification information according to each first identification information carried in the file parsing message;

[0063] Any of the target database servers 103 is configured to receive the file parsing message, obtain the file according to the second identification information of the file carried in the file parsing message, and parse the file; and send the file parsing result carrying its own first identification information to the message center server;

[0064] The message center server 102 is further configured to receive the file parsing result sent by the target database server and send the file parsing result to the main database server;

[0065] The main database server 101 is further configured to receive the file parsing result and, based on the first identification information of the target database server carried in the file parsing result, store the parsing result in correspondence with the first identification information.

[0066] To reduce the load on the main database server when parsing a file to be parsed, in an embodiment of the present application, the file processing system includes at least one sub-database server. The main database server pre-stores the file types that can be parsed by each sub-database server and the main database server. Files of the same file type can be parsed by multiple database servers. The main database server stores a correspondence between each file type and at least one database server.

[0067] Based on this, in an embodiment of the present application, the primary database server is pre-configured with a file parsing and distribution configuration table, which pre-stores a correspondence between file types and at least one database server. Based on the file parsing and distribution configuration table, the primary database server determines at least one target database server corresponding to the target file type of the file to be parsed. After determining the target database server, the primary database server sends a file parsing message carrying first identification information for each target database server to the message center server.

[0068] In an embodiment of the present application, after the message center server receives a file parsing message from the primary database server that carries the first identification information of each target database server, the message center server sends the file parsing message to the target database server corresponding to each first identification information, based on each piece of first identification information carried in the file parsing message. It should be noted that the target database server can be a sub-database server in the file processing system or a primary database server.

[0069] For each target database server, after receiving the file parsing message sent by the message center server, the target database server obtains the file with the second identification information according to the second identification information of the file to be parsed carried in the file parsing message.

[0070] Each target database server stores a file parsing method corresponding to the file type that it can parse. When the target database server obtains the file, it obtains the target file type corresponding to the file, and determines the file parsing method corresponding to the target file type from the pre-stored correspondence between the file type and the file parsing method, and uses the file parsing method to parse the file to obtain the parsing result, and generates a parsing data landing table in accordance with a pre-defined format, and stores the parsing result in the parsing data landing table. In this embodiment of the present application, the correspondence between the file type and the file parsing method can be stored in a pre-configured local file parsing table. The target database server can also send the parsing result and its own first identification information to the message center server.

[0071] In order for the primary database server to collect statistics on the parsing results of each target database server for the file, in an embodiment of the present application, after receiving the parsing results sent by each target database server and carrying the first identification information of each target database server, the message center server forwards each parsing result to the primary database server. The primary database server stores each parsing result in association with the first identification information of each target database server.

[0072] In an embodiment of the present application, the primary database server can determine at least one target database server to parse the file based on the target file type of the file to be parsed and a pre-stored correspondence between the file type and at least one database server. The primary database server then sends a file parsing message to each target database server via a message center server, thereby avoiding the need to randomly select a database service area for parsing the file. After parsing the file, each target database server also sends the parsing result to the message center server, which then forwards the result to the primary database server. This allows the primary database server to save and store the parsing results of each target database server, ensuring the smooth execution of subsequent workflows.

[0073] Figure 2 A schematic diagram of the interaction process between the primary database server, the target database server, and the message center server provided in an embodiment of the present application, which includes:

[0074] S201: The main database server sends a file parsing message carrying first identification information of each target database server to the message center server.

[0075] S202: The message center server sends a file parsing message to each target database server with the first identification information according to the first identification information of each target database server carried in the file parsing message.

[0076] S203: The target database server sends the parsing result carrying its own first identification information to the message center server.

[0077] S204: The message center server sends the parsing result to the main database server.

[0078] Example 2:

[0079] In order to enable the target database server to obtain the file to be parsed, based on the above embodiment, in the embodiment of the present application, the main database server is further used to determine, for each target database server, a target file download address corresponding to the target file type based on a pre-stored correspondence between the file type and the file download address of the target database server; and distribute the file to the target file download address;

[0080] The target database server is specifically used to obtain the target file type of the file carried in the file parsing message, determine the target file download path corresponding to the target file type based on the pre-saved correspondence between the file type and the file download path; and obtain the file of the second identification information based on the target download path.

[0081] In this embodiment of the present application, the master database server pre-stores the file download path for each target database server for each file type. After determining the target database server, the pre-stored file download address corresponding to the target file type of the target database server is obtained, the file download address is used as the target file download address, and the file is distributed to the target file download address.

[0082] In order to enable the target database server to obtain the file to be parsed, in an embodiment of the present application, each database server stores the file download path corresponding to each file type of its own, so that the database server can determine the file download path according to the file type and download the file according to the file download path.

[0083] Based on this, in order for the target database server to determine the file download path for the file to be parsed, in an embodiment of the present application, the file parsing message also carries the target file type of the file to be parsed. Upon receiving the file parsing message, the target database server obtains the target file type of the file to be parsed carried in the file parsing message and determines the target file download path corresponding to the target file type based on a pre-stored correspondence between file types and file download paths.

[0084] In an embodiment of the present application, after the target database server determines the target file download path, it obtains the second identification information of the file carried in the file parsing message and downloads the file with the second identification information from the target file path.

[0085] It should be noted that the file to be parsed is received by the main database server in the file processing system. If the target database server is the main database server, the target database server obtains the file with the second identification information from the files stored in itself based on the second identification information of the file to be parsed.

[0086] In order to enable the main database server to count the parsing results of each target database server, on the basis of the above embodiments, in an embodiment of the present application, the target database server is further used to send a parsing result carrying the first identification information of the target database service to the message center server if the target database server fails to obtain the file from the target file download path, wherein the parsing result is a parsing failure result.

[0087] In an embodiment of the present application, if the target database server does not obtain the file with the second identification information from the target file download path, it sends a parsing failure result carrying the first identification information of the target database server to the message center server.

[0088] Figure 3 A schematic diagram of a file parsing process applied to a target database server provided in an embodiment of the present application includes:

[0089] S301: Receive a file parsing message sent by a message center server, wherein the file parsing message carries second identification information of a file to be parsed.

[0090] S302: Determine a target file download path corresponding to the target file type according to the target file type carried in the file parsing message and a pre-stored correspondence between file types and file download paths.

[0091] S303: Determine whether there is a file with the second identification information in the target file download path. If so, execute S304; if not, send a parsing result indicating parsing failure to the message center server.

[0092] S304: Obtain the file parsing method corresponding to the target file type of the file according to the pre-saved correspondence between the file type and the file parsing method.

[0093] S305: Parse the file according to the file parsing method to obtain a parsing result.

[0094] S306: Send the parsing result carrying the first identification information of the target database server to the message center server.

[0095] Example 3:

[0096] In order to count the parsing results of each target database server, based on the above embodiments, in an embodiment of the present application, the main database server is further used to obtain a pre-configured storage location corresponding to each target database server for the parsing result corresponding to the target database server, and save the parsing result to the storage location.

[0097] In order to store the parsing result of each target database server, in the embodiment of the present application, after receiving the parsing result of the file to be parsed from any target database server, the main database server saves the parsing result in the storage location corresponding to the target database server.

[0098] Specifically, in an embodiment of the present application, a file parsing status record synchronization subtable is pre-stored in the master database server. Each database server has a corresponding storage location in the file parsing status record synchronization subtable, which is used to store the file parsing results of each database server. For each parsing result sent by the message center server, the master database server determines the target database server corresponding to the parsing result based on the first identification information carried in the parsing result, searches the pre-stored file parsing status record synchronization subtable for the storage location corresponding to the target database server, and stores the parsing result in the storage location.

[0099] Example 4:

[0100] In order to ensure the smooth progress of subsequent operation processes, based on the above embodiments, in an embodiment of the present application, the main database server is further configured to send a post-parsing task trigger message to the message center server if it is identified that each parsing result corresponding to the file is successfully parsed, wherein the post-parsing task trigger message carries the first identification information of the at least one target database server;

[0101] The message center server is further configured to receive the post-parsed task trigger message and, based on the first identification information of the at least one target database server carried in the post-parsed task trigger message, send the post-parsed task trigger message to each target database server of the first identification information;

[0102] Any of the target database servers is further configured to receive the post-parsed task triggering message and respond to a subsequent task corresponding to the pre-saved target file type of the file based on the parsed file.

[0103] In an embodiment of the present application, in order to ensure the smooth progress of subsequent operation processes, after the main database server receives the parsing results corresponding to each target database server, and each parsing result is successfully parsed, the main database server sends a post-parsing task trigger message to the message center server, wherein the post-parsing task trigger message carries the first identification information of each target database server.

[0104] After receiving the post-parsed task trigger message sent by the main database server, the message center server sends the post-parsed task trigger message to the target database server of each first identification information according to each first identification information carried in the post-parsed task trigger message.

[0105] Each database server stores a subsequent task corresponding to each file type. When the target database server receives a post-parsed task trigger message, it determines the subsequent task corresponding to the target file type based on the pre-stored correspondence between the file type and the subsequent task, as well as the target file type and the second identification information of the file carried in the post-parsed task trigger message. It also determines the parsed file based on the second identification information and responds to the subsequent task based on the parsed file.

[0106] Example 5:

[0107] In order to count the processing results of subsequent tasks of each target database server, based on the above embodiments, in an embodiment of the present application, the target database server is further configured to send the processing results of the subsequent tasks to the message center server if it is recognized that the subsequent tasks are completed;

[0108] The message center server is further configured to receive the processing result and send the processing result to the main database server;

[0109] The main database server is further configured to receive the processing result; and store the processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server in correspondence with each other.

[0110] In an embodiment of the present application, in order to store the processing results of subsequent tasks of each target database server, each target database server that receives the parsed task trigger message, after identifying that the subsequent task processing is completed, sends the processing results of the subsequent task to the message center server, wherein the processing result carries the first identification information of the target database server.

[0111] After receiving the processing result, the message center server sends the processing result to the main database server, and the main database server stores the processing result and the first identification information of the target database server corresponding to the processing result in a corresponding manner.

[0112] Example 6:

[0113] In order to confirm the file type of the file to be parsed, based on the above embodiments, in an embodiment of the present application, the main database server is further used to determine the target file type of the file according to the name of the file.

[0114] In an embodiment of the present application, after the main database server receives a file to be parsed, the main database server scans the directory of the file, generates summary information corresponding to the file, and determines the target file type of the file based on the name of the file. In this embodiment of the present application, when the main database server determines the target file type of the file to be parsed, it does so based on the file name suffix. For example, if the file name suffix is ​​".doc", the target file type of the file is determined to be a text document, etc. In addition, the main database server is pre-configured with a source data registration table for storing file information. After determining the summary information and target file type of the file to be parsed, the main database server stores the second identification information, target file type, and summary information of the file in the source data registration table.

[0115] Figure 4 A schematic diagram of a file parsing process applied to a primary database server provided in an embodiment of the present application includes:

[0116] S401: Determine the summary information and target file type of the file to be parsed, and store the second identification information, target file type and summary information of the file in the source data registration table in correspondence.

[0117] S402: Determine a target database server for file parsing according to a pre-saved file parsing distribution configuration table.

[0118] S403: Distribute the file to the file download address of the target database service.

[0119] S404: Sending a file parsing message carrying the first identification information of the target database server to the message center server.

[0120] S405: Receive the file parsing result returned by the message center server, and according to the first identification information of the target database server carried in the file parsing result, save the parsing result in correspondence with the first identification information.

[0121] Example 7:

[0122] Figure 5 A schematic diagram of a file processing process provided in an embodiment of the present application includes:

[0123] S501: Determine at least one target database server corresponding to the target file type according to a target file type of a file to be parsed and a pre-stored correspondence between file types and at least one database server.

[0124] S502: Sending a file parsing message carrying the first identification information of each target database server to the message center server.

[0125] S503: Receive the file parsing result sent by the message center server, and according to the first identification information of the target database server carried in the file parsing result, save the parsing result and the first identification information in correspondence with each other.

[0126] In a possible implementation, storing the parsing result and the first identification information in correspondence with each other includes:

[0127] For each analysis result corresponding to the target database server, a pre-configured storage location corresponding to the target database server is obtained, and the analysis result is saved in the storage location.

[0128] In one possible implementation, the method further includes:

[0129] If it is identified that each parsing result corresponding to the file is successfully parsed, a post-parsing task trigger message is sent to the message center server, wherein the post-parsing task trigger message carries first identification information of at least one target database server.

[0130] In one possible implementation, the method further includes:

[0131] receiving a processing result sent by the message center server, wherein the processing result carries first identification information of the target database;

[0132] The processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server are correspondingly saved.

[0133] In a possible implementation, the method for determining the target file type of the file to be parsed includes:

[0134] Determine the target file type of the file according to the name of the file.

[0135] Example 8:

[0136] Figure 6 A schematic diagram of the structure of a file processing device provided in an embodiment of the present application, the device comprising:

[0137] Determining module 601, configured to determine at least one target database server corresponding to the target file type according to the target file type of the file to be parsed and a pre-stored correspondence between the file type and at least one database server;

[0138] A sending processing module 602 is configured to send a file parsing message carrying the first identification information of each target database server to a message center server;

[0139] The receiving and processing module 603 is configured to receive the file parsing result sent by the message center server, and store the parsing result and the first identification information of the target database server carried in the file parsing result in correspondence with each other.

[0140] In a possible implementation, the receiving and processing module 603 is specifically configured to obtain, for each parsing result corresponding to the target database server, a pre-configured storage location corresponding to the target database server, and save the parsing result to the storage location.

[0141] In a possible implementation, the sending processing module 602 is also used to send a post-parsing task trigger message to the message center server if it is identified that each parsing result corresponding to the file is successfully parsed, wherein the post-parsing task trigger message carries the first identification information of at least one target database server.

[0142] In a possible implementation, the receiving and processing module 603 is further used to receive a processing result sent by a message center server, wherein the processing result carries the first identification information of the target database; and save the processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server accordingly.

[0143] In a possible implementation, the determining module 601 is further configured to determine a target file type of the file according to the name of the file.

[0144] Example 9:

[0145] Based on the above embodiment, an embodiment of the present invention further provides an electronic device, Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, it includes: a processor 71, a communication interface 72, a memory 73 and a communication bus 74, wherein the processor 71, the communication interface 72, and the memory 73 communicate with each other through the communication bus 74;

[0146] The memory 73 stores a computer program. When the program is executed by the processor 71, the processor 71 performs the following steps:

[0147] Determining at least one target database server corresponding to the target file type according to a target file type of the file to be parsed and a pre-stored correspondence between the file type and at least one database server;

[0148] Sending a file parsing message carrying the first identification information of each target database server to the message center server;

[0149] receiving a file parsing result sent by the message center server, and according to the first identification information of the target database server carried in the file parsing result, storing the parsing result in correspondence with the first identification information;

[0150] In a possible implementation, storing the parsing result and the first identification information in correspondence with each other includes:

[0151] For each analysis result corresponding to the target database server, a pre-configured storage location corresponding to the target database server is obtained, and the analysis result is saved in the storage location.

[0152] In one possible implementation, the method further includes:

[0153] If it is identified that each parsing result corresponding to the file is successfully parsed, a post-parsing task trigger message is sent to the message center server, wherein the post-parsing task trigger message carries first identification information of at least one target database server.

[0154] In one possible implementation, the method further includes:

[0155] receiving a processing result sent by the message center server, wherein the processing result carries first identification information of the target database;

[0156] The processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server are correspondingly saved.

[0157] In a possible implementation, the method for determining the target file type of the file to be parsed includes:

[0158] Determine the target file type of the file according to the name of the file.

[0159] Since the principle of solving the problem by the above electronic device is similar to that of the file processing method, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0160] The communication bus mentioned in the above-mentioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 72 is used for communication between the above-mentioned electronic device and other devices. The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0161] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processing processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0162] Example 10:

[0163] Based on the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program executable by a processor. When the program is executed on the processor, the processor implements the following steps:

[0164] Determining at least one target database server corresponding to the target file type according to a target file type of the file to be parsed and a pre-stored correspondence between the file type and at least one database server;

[0165] Sending a file parsing message carrying the first identification information of each target database server to the message center server;

[0166] receiving a file parsing result sent by the message center server, and according to the first identification information of the target database server carried in the file parsing result, storing the parsing result in correspondence with the first identification information;

[0167] In a possible implementation, storing the parsing result and the first identification information in correspondence with each other includes:

[0168] For each analysis result corresponding to the target database server, a pre-configured storage location corresponding to the target database server is obtained, and the analysis result is saved in the storage location.

[0169] In one possible implementation, the method further includes:

[0170] If it is identified that each parsing result corresponding to the file is successfully parsed, a post-parsing task trigger message is sent to the message center server, wherein the post-parsing task trigger message carries first identification information of at least one target database server.

[0171] In one possible implementation, the method further includes:

[0172] receiving a processing result sent by the message center server, wherein the processing result carries first identification information of the target database;

[0173] The processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server are correspondingly saved.

[0174] In a possible implementation, the method for determining the target file type of the file to be parsed includes:

[0175] Determine the target file type of the file according to the name of the file.

[0176] Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the payment method, the implementation of the above-mentioned computer-readable storage medium can refer to the embodiment of the method, and the repeated parts will be omitted.

[0177] Example 11:

[0178] An embodiment of the present application further provides a computer program product, which, when executed by a computer, implements the file processing method described in any of the above method embodiments applied to an electronic device.

[0179] The above embodiments may be implemented in whole or in part through software, hardware, firmware, or any combination thereof, and may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions that, when loaded and executed on a computer, fully or partially generate the processes or functions described in the embodiments of the present application.

[0180] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can 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 can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0181] 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 present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.

[0182] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.

[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device 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.

[0184] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A file processing system, characterized in that: The system comprises: The main database server is configured to determine, based on a target file type of a file to be parsed and a pre-stored correspondence between file types and at least one database server, at least one target database server corresponding to the target file type; and send a file parsing message carrying first identification information of each target database server to the message center server; The message center server is configured to receive the file parsing message; and send the file parsing message to a target database server of each first identification information according to each first identification information carried in the file parsing message; Any of the target database servers is configured to receive the file parsing message, obtain the file according to the second identification information of the file carried in the file parsing message, and parse the file; and send the file parsing result carrying its own first identification information to the message center server; The message center server is further configured to receive the file parsing result sent by the target database server, and send the file parsing result to the main database server; The main database server is further configured to receive the file parsing result and, based on the first identification information of the target database server carried in the file parsing result, store the parsing result in correspondence with the first identification information; The master database server is further configured to determine, for each target database server, a target file download address corresponding to the target file type according to a pre-stored correspondence between the file type and the file download address; and distribute the file to the target file download address; The target database server is specifically configured to obtain a target file type of the file carried in the file parsing message, determine a target file download path corresponding to the target file type based on a pre-stored correspondence between file types and file download paths, and obtain the file based on the target file download path and the second identification information; If the target database server is the primary database server, the target database server obtains the file with the second identification information from files stored in the target database server according to the second identification information.

2. The system according to claim 1, wherein: The target database server is further configured to send a parsing result carrying the first identification information of the target database service to the message center server if the target database server fails to obtain the file from the target file download path, wherein the parsing result is a parsing failure result.

3. The system according to claim 1, wherein: The master database server is further configured to obtain a pre-configured storage location corresponding to each target database server for the parsing result corresponding to the target database server, and save the parsing result to the storage location.

4. The system according to claim 3, characterized in that The primary database server is further configured to send a post-parsing task trigger message to the message center server if it is identified that each parsing result corresponding to the file is successfully parsed, wherein the post-parsing task trigger message carries first identification information of at least one target database server; The message center server is further configured to receive the post-parsed task trigger message and, based on first identification information of at least one target database server carried in the post-parsed task trigger message, send the post-parsed task trigger message to the target database server of the first identification information; Any of the target database servers is further configured to receive the post-parsing task triggering message and respond to subsequent tasks corresponding to the target file type pre-stored for the file based on the parsed file.

5. The system according to claim 4, characterized in that The target database server is further configured to send the processing result of the subsequent task to the message center server if it is recognized that the subsequent task processing is completed; The message center server is further configured to receive the processing result and send the processing result to the main database server; The main database server is further configured to receive the processing result; and store the processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server in correspondence with each other.

6. The system according to claim 1, wherein: The main database server is further configured to determine a target file type of the file according to the name of the file.

7. A file processing method, characterized in that: The method comprises: Determining at least one target database server corresponding to the target file type according to a target file type of the file to be parsed and a pre-stored correspondence between the file type and at least one database server; Sending a file parsing message carrying the first identification information of each target database server to the message center server; receiving a file parsing result sent by the message center server, and according to the first identification information of the target database server carried in the file parsing result, storing the parsing result in correspondence with the first identification information; After determining at least one target database server corresponding to the target file type according to the target file type of the file to be parsed and the pre-stored correspondence between the file type and the at least one database server, the method further includes: For each target database server, determining a target file download address corresponding to the target file type according to a pre-stored correspondence between the file type and the file download address; Distributing the file to the target file download address, so that the target database server obtains the target file type of the file carried in the file parsing message, determines the target file download path corresponding to the target file type based on a pre-stored correspondence between file types and file download paths; and obtains the file based on the target file download path and the second identification information; If the target database server is a master database server, the target database server obtains the file containing the second identification information from files stored in the target database server according to the second identification information.

8. The method according to claim 7, characterized in that The storing the analysis result and the first identification information in correspondence with each other includes: For each analysis result corresponding to the target database server, a pre-configured storage location corresponding to the target database server is obtained, and the analysis result is saved in the storage location.

9. The method according to claim 8, characterized in that The method further comprises: If it is identified that each parsing result corresponding to the file is successfully parsed, a post-parsing task trigger message is sent to the message center server, wherein the post-parsing task trigger message carries first identification information of at least one target database server.

10. The method according to claim 9, characterized in that The method further comprises: receiving a processing result sent by the message center server, wherein the processing result carries first identification information of the target database; The processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server are correspondingly saved.

11. The method according to claim 7, characterized in that The method for determining the target file type of the file to be parsed includes: Determine the target file type of the file according to the name of the file.

12. A file processing device, characterized in that: The device comprises: a determination module, configured to determine at least one target database server corresponding to the target file type according to a target file type of the file to be parsed and a pre-stored correspondence between the file type and at least one database server; a sending processing module, configured to send a file parsing message carrying the first identification information of each target database server to a message center server; a receiving and processing module, configured to receive the file parsing result sent by the message center server, and store the parsing result in correspondence with the first identification information of the target database server carried in the file parsing result; The sending processing module is further configured to determine, for each target database server, a target file download address corresponding to the target file type based on a pre-stored correspondence between file types and file download addresses; distribute the file to the target file download address, so that the target database server obtains the target file type of the file carried in the file parsing message, determines a target file download path corresponding to the target file type based on a pre-stored correspondence between file types and file download paths; and obtain the file based on the target file download path and the second identification information; If the target database server is a master database server, the target database server obtains the file containing the second identification information from files stored in the target database server according to the second identification information.

13. The device according to claim 12, characterized in that The receiving and processing module is specifically configured to obtain, for each target database server, a pre-configured storage location corresponding to the target database server, and save the analysis result to the storage location.

14. The device according to claim 13, characterized in that The sending processing module is further used to send a post-parsing task trigger message to the message center server if it is identified that each parsing result corresponding to the file is successfully parsed, wherein the post-parsing task trigger message carries first identification information of at least one target database server.

15. The device according to claim 14, characterized in that The receiving and processing module is further configured to receive a processing result sent by a message center server, wherein the processing result carries the first identification information of a target database; and save the processing result, the first identification information of the target database server corresponding to the processing result, and the parsing result corresponding to the target database server in correspondence.

16. The device according to claim 12, characterized in that The determining module is further configured to determine a target file type of the file according to the name of the file.

17. An electronic device, characterized in that: The electronic device includes a processor, and the processor is used to implement the steps of the file processing method according to any one of claims 7 to 11 when executing a computer program stored in a memory.

18. A computer-readable storage medium, characterized in that It stores a computer program, which, when executed by a processor, implements the steps of the file processing method according to any one of claims 7 to 11.

19. A computer program product, characterized in that The computer program product comprises: computer program code, which, when executed on a computer, enables the computer to execute the steps of the file processing method according to any one of claims 7 to 11.

Citation Information

Patent Citations

  • File analysis method and network device

    CN109298937A

  • File analysis method, system, device and equipment

    CN112765103A