Financial data processing method, device, equipment and storage medium
Through the combination of streaming processing methods and dynamic plug-in rules, the maintenance and flexibility problems in multi-data source processing in the financial field are solved, and real-time and flexibility of data processing are achieved.
Patent Information
- Application Number
- CN202210119184.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-08
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-02-08
AI Technical Summary
Existing multi-data source processing technology has low maintainability and poor flexibility in the financial field, resulting in complex business logic and difficulty in dynamically adding or deleting processing rules.
The streaming processing method is used to obtain financial data from multiple databases, perform sorting and combination processing, repair and fill data based on preset and external verification formats, and dynamically plug and unplug processing rules to achieve real-time processing and merging of data.
Under a common data processing framework, processing rules for different data sources can be dynamically added and deleted, smoothing the data processing pressure on the server and ensuring real-time and flexibility of data processing.
Smart Images

Figure CN114547005B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial data processing, and in particular to a method, device, equipment and storage medium for processing financial data. Background Art
[0002] Private equity funds refer to securities investment funds that raise funds from specific investors in a non-public manner and invest in specific targets. Private equity funds are recruited by means other than mass communication. The initiator gathers funds from multiple non-public entities to establish an investment fund and invest in securities. Private equity data refers to data related to private equity funds, including fund net value, fund products, fund managers, and fund companies. In order to ensure the validity and timeliness of private equity data, it is necessary to obtain private equity fund data from multiple data sources, and then aggregate and process it to form the final data. Stream processing is a data processing method, because data is like running water, and whatever data is received is processed, so it is called stream processing.
[0003] Existing multi-data source processing technologies often use the method of pulling target data at a fixed time, and hard-code the processing methods of various data sources in a main process, which is not very flexible. In addition, because multiple different processing logics are added to the same process, the business logic is complicated and the maintainability is not high. Summary of the invention
[0004] The main purpose of the present invention is to solve the technical problems of low maintainability and poor flexibility in the processing of multiple data sources in the financial field.
[0005] A first aspect of the present invention provides a method for processing financial data, comprising the steps of:
[0006] Obtain financial data from N databases, sort the financial data corresponding to the N databases according to the preset database sorting, and perform sorting and combination processing on the financial data to obtain a financial data set, wherein N is a positive integer;
[0007] Based on the preset verification message queue, the queue determines whether the financial data in the financial data set satisfies the preset main verification format;
[0008] If the main verification format is not satisfied, then query the external sub-verification format to determine whether the financial data satisfies the external sub-verification format;
[0009] If the external sub-verification format is satisfied, the financial data is marked as data for pre-setting and filling the message queue;
[0010] If the external sub-verification format is not satisfied, the financial data is repaired to obtain repaired financial data, and the repaired financial data is marked as data of the verification message queue;
[0011] If the main verification format is satisfied, the financial data transmission is marked as data preset to fill the message queue;
[0012] Based on the filling message queue, performing queue filling processing on the financial data to obtain filled financial data;
[0013] Marking the filling financial data transmission as data of a preset merged message queue;
[0014] According to the preset merging trigger algorithm, all the filled financial data in the merged message queue are merged and processed to obtain processing result data.
[0015] Optionally, in a first implementation of the first aspect of the present invention, the repairing the financial data to obtain the repaired financial data includes:
[0016] Performing repair processing on the financial data to obtain repair transfer data and repair results;
[0017] Determine whether the repair result is successful;
[0018] If the repair is not successful, the repair transit data is marked as a discarded state, and the processing of the repair transit data is stopped;
[0019] If the repair is successful, the repair transfer data is determined as the repaired financial data.
[0020] Optionally, in a second implementation of the first aspect of the present invention, before acquiring the financial data from N databases, sorting the financial data according to the preset database, and performing sorting and combination processing on the financial data corresponding to the N databases to obtain the financial data set, the method further includes:
[0021] Monitor the log data of N databases;
[0022] Determine whether the log data has changed;
[0023] If there is a change in the log data, the change in the log data is analyzed to obtain log change data, the log change data is converted into log message queue data, and the log message queue data is added to the preset verification message queue.
[0024] Optionally, in a third implementation of the first aspect of the present invention, after adding the log message queue data to the preset verification message queue, before obtaining the financial data of N databases, sorting the financial data corresponding to the N databases according to the preset database sorting, and performing sorting and combination processing to obtain the financial data set, the method further includes:
[0025] Trigger the data pull instruction of financial data from N databases
[0026] According to the data pulling instruction, the storage addresses of N databases are accessed to obtain the financial data of the N databases.
[0027] Optionally, in a fourth implementation of the first aspect of the present invention, the merging of all the filled financial data in the merged message queue according to the preset merging trigger algorithm to obtain the processing result data includes:
[0028] Read the queued-to-be-processed value in the merged message queue;
[0029] Determine whether the queued value reaches a preset trigger threshold;
[0030] If the trigger threshold is reached, all the filled financial data in the merged message queue are merged and processed according to the database sorting to obtain processing result data.
[0031] Optionally, in a fifth implementation manner of the first aspect of the present invention, performing queue filling processing on the financial data based on the filling message queue to obtain the filled financial data includes:
[0032] Based on the filling message queue, determining whether there is a vacant data position in the financial data;
[0033] If there is no vacant data bit, the financial data is determined as filled financial data;
[0034] If there are vacant data bits, the financial data is filled to obtain filled financial data;
[0035] The filling financial data is marked as the data filling the message queue.
[0036] Optionally, in a sixth implementation manner of the first aspect of the present invention, the filling processing on the financial data to obtain the filled financial data includes:
[0037] Performing queue filling processing on the financial data to obtain filling transfer data and filling results;
[0038] Determine whether the filling result is a successful filling result;
[0039] If the filling result is a filling success result, the filling transfer data is determined as filling financial data;
[0040] If the filling result is not a filling success result, the filling transit data is marked as a discarded state, and the processing of the filling transit data is stopped.
[0041] A second aspect of the present invention provides a financial data processing device, the financial data processing device comprising:
[0042] An acquisition module, used to acquire financial data from N databases, sort and combine the financial data corresponding to the N databases according to the preset database sorting, and obtain a financial data set, wherein N is a positive integer;
[0043] A main verification judgment module, used for judging whether the financial data in the financial data set meets the preset main verification format based on the preset verification message queue;
[0044] A sub-check determination module, used for querying an external sub-check format if the main check format is not satisfied, and determining whether the financial data satisfies the external sub-check format;
[0045] A first marking module, configured to mark the financial data as data for pre-setting a filling message queue if the external sub-check format is satisfied;
[0046] A repair module, configured to repair the financial data if the external sub-verification format is not satisfied, obtain repaired financial data, and mark the repaired financial data as data of the verification message queue;
[0047] A second marking module, configured to mark the financial data transmission as data preset to fill the message queue if the primary verification format is satisfied;
[0048] A filling module, used for performing queue filling processing on the financial data based on the filling message queue to obtain filled financial data;
[0049] A third marking module, used for marking the filling financial data transmission as data of a preset merged message queue;
[0050] The merging module is used to merge all the filled financial data in the merge message queue according to a preset merge trigger algorithm to obtain processing result data.
[0051] A third aspect of the present invention provides a financial data processing device, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via lines; the at least one processor calls the instructions in the memory so that the financial data processing device executes the above-mentioned financial data processing method.
[0052] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned method for processing financial data.
[0053] In an embodiment of the present invention, a method for data stream processing for multiple data sources is provided. The advantage of this method is that, under a common data processing framework, processing rules for different data sources can be dynamically added and deleted without modifying the existing processing logic and code, thereby realizing dynamic plug-in and pull-out of rules. At the same time, the use of a streaming data processing method can smooth the pressure of data processing on the server and ensure the real-time performance of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A schematic diagram of an embodiment of a method for processing financial data in an embodiment of the present invention;
[0055] Figure 2 Schematic diagram of a processing flow of a method for processing financial data in an embodiment of the present invention;
[0056] Figure 3 A schematic diagram of an embodiment of a device for processing financial data in an embodiment of the present invention;
[0057] Figure 4 A schematic diagram of another embodiment of a device for processing financial data in an embodiment of the present invention;
[0058] Figure 5 The figure is a schematic diagram of an embodiment of a financial data processing device in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] Embodiments of the present invention provide a method, apparatus, device and storage medium for processing financial data.
[0060] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0061] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 An embodiment of a method for processing financial data in an embodiment of the present invention includes:
[0062] 101. Obtain financial data from N databases, sort and combine the financial data corresponding to the N databases according to the preset database sorting, and obtain a financial data set, where N is a positive integer;
[0063] In this embodiment, reference can be made to Figure 2 The flowchart of the method for processing financial data is shown. In the initial process, there are databases A, B, and C. The financial data of databases A, B, and C are pulled. According to the sorting of databases A, B, and C, the financial data are sorted and combined to obtain a financial data set of {A: financial data; B: financial data; C: financial data}.
[0064] Furthermore, before 101, you can also perform the following steps:
[0065] 1011. Monitor the log data of N databases;
[0066] 1012. Determine whether the log data has changed;
[0067] 1013. If the log data has changed, the change of the log data is analyzed to obtain log change data, the log change data is converted into log message queue data, and the log message queue data is added to the preset verification message queue.
[0068] In steps 1011-1013, all changes in database records will be reflected in the database change log. By monitoring the database change log, the data information to be concerned can be obtained in real time. When it is found that the log data of a database has a few more lines, the data with the extra lines is the log change data. This log change data is converted into message queue data to obtain log message queue data, and then the log message queue data is added to the preset verification message queue to verify the queue data later.
[0069] Furthermore, after 1013 and before 102, the following steps may be performed:
[0070] 1014. Triggering the data fetching instruction of financial data from N databases
[0071] 1015. According to the data pulling instruction, access the storage addresses of N databases to obtain the financial data of the N databases.
[0072] In steps 1014-1015, after changes in N database logs have been discovered, a data pull instruction is triggered. Based on the data pull instruction, the storage addresses of N databases are queried, and financial data is obtained from the storage addresses, which is the entity data of the financial data.
[0073] 102. Based on the preset verification message queue, the queue determines whether the financial data in the financial data set meets the preset main verification format;
[0074] In this embodiment, reference can be made to Figure 2 The master data verifier in the example actually processes the financial data set in a message queue manner, processing the financial data set in the order of A, B, and C. It first verifies the data type and then the data format to determine whether it satisfies the master verification format in the master data verifier.
[0075] The message queue is an excellent application decoupling tool. The data monitoring converter only needs to send messages to the message queue and does not need to know the results after the message is consumed. The task responsibility is single and the structure is clear.
[0076] 103. If the main verification format is not satisfied, query the external sub-verification format to determine whether the financial data satisfies the external sub-verification format;
[0077] In this embodiment, reference can be made to Figure 2 The main data validator in the example is connected to a sub-validator. This is to increase scalability and extensibility. The sub-validation format is queried from the sub-validator to determine whether the financial data meets the sub-validation format.
[0078] 104. If the external sub-verification format is satisfied, the financial data is marked as data for pre-setting the filling message queue;
[0079] In this embodiment, it is obvious that the financial data meets the sub-check format and is marked as data for filling the message queue, and enters the filling message queue for queue processing.
[0080] 105. If the external sub-verification format is not satisfied, the financial data is repaired to obtain the repaired financial data, and the repaired financial data is marked as data of the verification message queue;
[0081] In this embodiment, reference can be made to Figure 2 In the repair process, after the financial data is repaired, new data is generated. The new data is not in the verification message queue. That is to say, the repaired financial data needs to be further marked as data in the verification message queue and returned to the verification message queue for verification.
[0082] Furthermore, in “repairing the financial data to obtain repaired financial data”, the following steps may be performed:
[0083] 1051. Perform repair processing on the financial data to obtain repair transit data and repair results;
[0084] 1052. Determine whether the repair result is successful;
[0085] 1053. If the repair is not successful, the repair transit data is marked as a discarded state, and processing of the repair transit data is stopped;
[0086] 1054. If the repair is successful, the repaired transit data is determined as the repaired financial data.
[0087] In steps 1051-1054, after the financial data is repaired, two repair results, repair failure and repair success, are generated. If the repair result is judged to be repair success, the repair transit data is determined to be the repaired financial data. However, if the repair result is failure, the repair transit data is marked as a discarded state and processing is stopped. In this state, the repair transit data can be re-entered into the verification message queue for verification after confirmation by the user.
[0088] 106. If the main verification format is satisfied, the financial data transmission is marked as data for pre-setting the filling message queue;
[0089] In this embodiment, if the main verification format is met, the financial data transmission is marked as data preset to fill the message queue. Here, the data is still in the processing system, so it is sent to the filling message queue of the processing system for sorting.
[0090] 107. Based on the filling message queue, queue filling processing is performed on the financial data to obtain the filled financial data;
[0091] In this embodiment, reference can be made to Figure 2 The queue message in front of the main data filler is the filling message queue, which processes the financial data into queue filling to generate filling financial data.
[0092] Further, 107 may perform the following steps:
[0093] 1071. Based on the filling message queue, determine whether there are any missing data bits in the financial data;
[0094] 1072. If there is no vacant data bit, the financial data is determined as filled financial data;
[0095] 1073. If there are any vacant data bits, fill the financial data to obtain filled financial data;
[0096] 1074. Mark the filled financial data as data for filling the message queue.
[0097] In steps 1071-1074, first read whether there are vacant data bits in the financial data, and if the data bits of the financial data are filled with data, the financial data is determined as filled financial data. If there are vacant data bits, the financial data is filled to obtain filled financial data, and the filled financial data is marked as data to fill the message queue.
[0098] Further, 1074 can perform the following steps:
[0099] 10741. Perform queue filling processing on financial data to obtain filling transfer data and filling results;
[0100] 10742. Determine whether the filling result is a successful filling result;
[0101] 10743. If the filling result is a filling success result, the filling transfer data is determined as filling financial data;
[0102] 10744. If the filling result is not a successful filling result, the filling transit data is marked as a discarded state and the processing of the filling transit data is stopped.
[0103] In steps 10741-10744, the financial data is filled and processed, and after filling, filling transfer data and filling results are obtained. The filling results include two situations: filling success result and filling failure result.
[0104] If the filling result is a successful filling result, the filling transit data will be determined as the filling financial data. However, if the filling result is not a successful filling result, the filling transit data will be marked as a discarded state and processing will be stopped. In this state, the filling transit data can be re-entered into the filling message queue for verification after confirmation by the user.
[0105] 108. Mark the filling financial data transmission as data of the preset merged message queue;
[0106] 109. According to the preset merging trigger algorithm, all the filled financial data in the merged message queue are merged and processed to obtain the processing result data.
[0107] In steps 108-109, after the financial data is marked as data in the merged message queue, the filled financial data is merged in the merged message queue. The merge process requires a trigger condition. When the trigger condition is met, the data in the merged message queue is merged to obtain the processing result data.
[0108] Furthermore, at 109, the following steps may be performed:
[0109] 1091. Read the queued pending value in the merged message queue;
[0110] 1092. Determine whether the queued value reaches a preset trigger threshold;
[0111] 1093. If the trigger threshold is reached, all the filled financial data in the merged message queue are merged and processed according to the database sorting to obtain the processing result data.
[0112] In steps 1091-1093, there are 100 databases in total, which are numbered according to databases 1-100. The queued value to be processed in the merged message queue is 80, and the trigger threshold is 85. The queued value to be processed 80 does not reach the trigger threshold 85. When the queued processing value 85 reaches the trigger threshold 85, the filled financial data in the merged message queue is sorted and merged according to the sorting number of databases 1-100 to obtain the processing result data.
[0113] In an embodiment of the present invention, a method for data stream processing for multiple data sources is provided. The advantage of this method is that, under a common data processing framework, processing rules for different data sources can be dynamically added and deleted without modifying the existing processing logic and code, thereby realizing dynamic plug-in and pull-out of rules. At the same time, the use of a streaming data processing method can smooth the pressure of data processing on the server and ensure the real-time performance of data processing.
[0114] The above describes the method for processing financial data in the embodiment of the present invention. The following describes the device for processing financial data in the embodiment of the present invention. Figure 3 , an embodiment of a financial data processing device in an embodiment of the present invention, the financial data processing device comprises:
[0115] The acquisition module 301 is used to acquire financial data from N databases, and to sort and combine the financial data corresponding to the N databases according to the preset database sorting to obtain a financial data set, wherein N is a positive integer;
[0116] A main verification judgment module 302 is used to judge whether the financial data in the financial data set meets the preset main verification format based on the preset verification message queue;
[0117] The sub-check determination module 303 is used to query an external sub-check format if the main check format is not satisfied, and determine whether the financial data satisfies the external sub-check format;
[0118] A first marking module 304, configured to mark the financial data as data for pre-setting a filling message queue if the external sub-check format is satisfied;
[0119] A repair module 305 is used to repair the financial data if the external sub-verification format is not satisfied, obtain the repaired financial data, and mark the repaired financial data as data of the verification message queue;
[0120] A second marking module 306, configured to mark the financial data transmission as data preset to fill the message queue if the primary verification format is satisfied;
[0121] A filling module 307, configured to perform queue filling processing on the financial data based on the filling message queue to obtain filled financial data;
[0122] A third marking module 308, configured to mark the filling financial data transmission as data of a preset merged message queue;
[0123] The merging module 309 is used to merge all the filled financial data in the merge message queue according to a preset merge trigger algorithm to obtain processing result data.
[0124] In an embodiment of the present invention, a method for data stream processing for multiple data sources is provided. The advantage of this method is that, under a common data processing framework, processing rules for different data sources can be dynamically added and deleted without modifying the existing processing logic and code, thereby realizing dynamic plug-in and pull-out of rules. At the same time, the use of a streaming data processing method can smooth the pressure of data processing on the server and ensure the real-time performance of data processing.
[0125] See also Figure 4 According to another embodiment of the financial data processing device in the embodiment of the present invention, the financial data processing device includes:
[0126] The acquisition module 301 is used to acquire financial data from N databases, and to sort and combine the financial data corresponding to the N databases according to the preset database sorting to obtain a financial data set, wherein N is a positive integer;
[0127] A main verification judgment module 302 is used to judge whether the financial data in the financial data set meets the preset main verification format based on the preset verification message queue;
[0128] The sub-check determination module 303 is used to query an external sub-check format if the main check format is not satisfied, and determine whether the financial data satisfies the external sub-check format;
[0129] A first marking module 304, configured to mark the financial data as data for pre-setting a filling message queue if the external sub-check format is satisfied;
[0130] A repair module 305 is used to repair the financial data if the external sub-verification format is not satisfied, obtain the repaired financial data, and mark the repaired financial data as data of the verification message queue;
[0131] A second marking module 306, configured to mark the financial data transmission as data preset to fill the message queue if the primary verification format is satisfied;
[0132] A filling module 307, configured to perform queue filling processing on the financial data based on the filling message queue to obtain filled financial data;
[0133] A third marking module 308, configured to mark the filling financial data transmission as data of a preset merged message queue;
[0134] The merging module 309 is used to merge all the filled financial data in the merge message queue according to a preset merge trigger algorithm to obtain processing result data.
[0135] The repair module 305 is specifically used for:
[0136] Performing repair processing on the financial data to obtain repair transfer data and repair results;
[0137] Determine whether the repair result is successful;
[0138] If the repair is not successful, the repair transit data is marked as a discarded state, and the processing of the repair transit data is stopped;
[0139] If the repair is successful, the repair transfer data is determined as the repaired financial data.
[0140] The financial data processing device further includes a monitoring module 310, and the monitoring module 310 is specifically used for:
[0141] Monitor the log data of N databases;
[0142] Determine whether the log data has changed;
[0143] If there is a change in the log data, the change in the log data is analyzed to obtain log change data, the log change data is converted into message queue data, and the message queue data is added to a preset verification message queue.
[0144] The financial data processing device further includes a trigger module 311, and the trigger module 311 is specifically used for:
[0145] Trigger the data pull instruction of financial data from N databases
[0146] According to the data pulling instruction, the storage addresses of N databases are accessed to obtain the financial data of the N databases.
[0147] The merging module 309 is specifically used for:
[0148] Read the queued-to-be-processed value in the merged message queue;
[0149] Determine whether the queued value reaches a preset trigger threshold;
[0150] If the trigger threshold is reached, all the filled financial data in the merged message queue are merged and processed according to the database sorting to obtain processing result data.
[0151] The filling module 307 is specifically used for:
[0152] Based on the filling message queue, determining whether there is a vacant data position in the financial data;
[0153] If there is no vacant data bit, the financial data is determined as filled financial data;
[0154] If there are vacant data bits, the financial data is filled to obtain filled financial data;
[0155] The filling financial data is marked as the data filling the message queue.
[0156] The filling module 307 is also specifically used for:
[0157] Performing queue filling processing on the financial data to obtain filling transfer data and filling results;
[0158] Determine whether the filling result is a successful filling result;
[0159] If the filling result is a filling success result, the filling transfer data is determined as filling financial data;
[0160] If the filling result is not a filling success result, the filling transit data is marked as a discarded state, and the processing of the filling transit data is stopped.
[0161] In an embodiment of the present invention, a method for data stream processing for multiple data sources is provided. The advantage of this method is that, under a common data processing framework, processing rules for different data sources can be dynamically added and deleted without modifying the existing processing logic and code, thereby realizing dynamic plug-in and pull-out of rules. At the same time, the use of a streaming data processing method can smooth the pressure of data processing on the server and ensure the real-time performance of data processing.
[0162] above Figure 3 and Figure 4 The financial data processing device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The financial data processing device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0163] Figure 51 is a schematic diagram of the structure of a financial data processing device provided by an embodiment of the present invention. The financial data processing device 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the financial data processing device 500. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the financial data processing device 500.
[0164] The financial data-based processing device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, Free BSD, etc. Those skilled in the art will appreciate that Figure 5 The structure of the financial data processing device shown does not constitute a limitation on the financial data processing device, and may include more or less components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0165] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the method for processing financial data.
[0166] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0167] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0168] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing financial data, characterized in that: Includes steps: Obtain financial data from N databases, sort the financial data corresponding to the N databases according to the preset database sorting, and perform sorting and combination processing on the financial data to obtain a financial data set, wherein N is a positive integer; Based on the preset verification message queue, the queue determines whether the financial data in the financial data set satisfies the preset main verification format; If the main verification format is not satisfied, then query the external sub-verification format to determine whether the financial data satisfies the external sub-verification format; If the external sub-verification format is satisfied, the financial data is marked as data for pre-setting and filling the message queue; If the external sub-verification format is not satisfied, the financial data is repaired to obtain repaired financial data, and the repaired financial data is marked as data of the verification message queue; If the main verification format is satisfied, the financial data transmission is marked as data preset to fill the message queue; Based on the filling message queue, performing queue filling processing on the financial data to obtain filled financial data; Marking the filling financial data transmission as data of a preset merged message queue; According to the preset merging trigger algorithm, all the filled financial data in the merged message queue are merged and processed to obtain processing result data.
2. The method for processing financial data according to claim 1, characterized in that: The repairing of the financial data to obtain the repaired financial data includes: Performing repair processing on the financial data to obtain repair transfer data and repair results; Determine whether the repair result is successful; If the repair is not successful, the repair transit data is marked as a discarded state, and the processing of the repair transit data is stopped; If the repair is successful, the repair transfer data is determined as the repaired financial data.
3. The method for processing financial data according to claim 1, characterized in that: Before obtaining the financial data from the N databases, sorting the financial data according to the preset database, and performing sorting and combination processing on the financial data corresponding to the N databases to obtain the financial data set, the method further includes: Monitor the log data of N databases; Determine whether the log data has changed; If there is a change in the log data, the change in the log data is analyzed to obtain log change data, the log change data is converted into log message queue data, and the log message queue data is added to the preset verification message queue.
4. The method for processing financial data according to claim 3, characterized in that: After adding the log message queue data to the preset verification message queue, before obtaining the financial data of N databases, sorting the financial data corresponding to the N databases according to the preset database sorting, and performing sorting and combination processing to obtain the financial data set, the method further includes: Trigger the data pull instruction of financial data from N databases According to the data pulling instruction, the storage addresses of N databases are accessed to obtain the financial data of the N databases.
5. The method for processing financial data according to claim 1, characterized in that: According to the preset merging trigger algorithm, all the filled financial data of the merged message queue are merged and processed to obtain the processing result data including: Read the queued-to-be-processed value in the merged message queue; Determine whether the queued value reaches a preset trigger threshold; If the trigger threshold is reached, all the filled financial data in the merged message queue are merged and processed according to the database sorting to obtain processing result data.
6. The method for processing financial data according to claim 1, characterized in that: The performing queue filling processing on the financial data based on the filling message queue to obtain the filled financial data comprises: Based on the filling message queue, determining whether there is a vacant data position in the financial data; If there is no vacant data bit, the financial data is determined as filled financial data; If there are vacant data bits, the financial data is filled to obtain filled financial data; The filling financial data is marked as the data filling the message queue.
7. The method for processing financial data according to claim 6, characterized in that: The filling processing of the financial data to obtain the filled financial data includes: Performing queue filling processing on the financial data to obtain filling transfer data and filling results; Determine whether the filling result is a successful filling result; If the filling result is a filling success result, the filling transfer data is determined as filling financial data; If the filling result is not a filling success result, the filling transit data is marked as a discarded state, and the processing of the filling transit data is stopped.
8. A financial data processing device, characterized in that: The financial data processing device comprises: An acquisition module, used to acquire financial data from N databases, sort and combine the financial data corresponding to the N databases according to the preset database sorting, and obtain a financial data set, wherein N is a positive integer; A main verification judgment module, used for judging whether the financial data in the financial data set meets the preset main verification format based on the preset verification message queue; A sub-check determination module, used for querying an external sub-check format if the main check format is not satisfied, and determining whether the financial data satisfies the external sub-check format; A first marking module, configured to mark the financial data as data for pre-setting a filling message queue if the external sub-check format is satisfied; A repair module, configured to repair the financial data if the external sub-verification format is not satisfied, obtain repaired financial data, and mark the repaired financial data as data of the verification message queue; A second marking module, configured to mark the financial data transmission as data preset to fill the message queue if the primary verification format is satisfied; A filling module, used for performing queue filling processing on the financial data based on the filling message queue to obtain filled financial data; A third marking module, used for marking the filling financial data transmission as data of a preset merged message queue; The merging module is used to merge all the filled financial data in the merge message queue according to a preset merge trigger algorithm to obtain processing result data.
9. A financial data processing device, characterized in that: The financial data processing device comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the financial data processing device to execute the financial data processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing financial data according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Financial data processing method and device
CN110020952A
Machine data collection method and device, equipment and medium
CN110995869A
Converting merge buffer system-kill errors to process-kill errors
US20060075301A1
Systems, devices, and methods for parallel processing of financial data sets
US20170249701A1
