Data processing method and apparatus
Patent Information
- Application Number
- CN202110742301.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-30
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2041-06-30
AI Technical Summary
[0007]本发明实施例提供了一种数据处理方法及装置,以至少解决相关技术中客户端的不同功能模块对于同一数据,需要独立获取处理,耗时耗力,数据处理的效率低的技术问题
[0018] In this embodiment of the invention, multiple data processing requests from multiple functional modules are received, wherein each data processing request includes information about the target data that the functional modules need to process. The processors corresponding to each functional module synchronously respond to the multiple data processing requests, process the target data, and obtain processed data. A verifier corresponding to the processed data synchronously verifies the processed data. The verified processed data is then sent to the corresponding functional module. This achieves the goal of a unified processing module processing the data processing requests from multiple functional modules and verifying the data processing requests through an integrated verification module. This improves the efficiency of data processing requests from multiple functional modules, saves time and manpower, and enhances display quality. Furthermore, it solves the technical problem in related technologies where different functional modules on the client side need to independently acquire and process the same data, resulting in time-consuming, labor-intensive, and inefficient data processing.
Smart Images

Figure CN115543680B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and more specifically, to a data processing method and apparatus. Background Technology
[0002] In management systems, Excel data processing is a frequently used function, making Excel file uploading, downloading, data parsing, and data validation rather tedious issues. Figure 1 This is a schematic diagram of existing data processing technologies, such as... Figure 1 As shown, in existing technology, the client browser module requests the corresponding module's backend service to download the corresponding template. The template is uploaded to the corresponding module's data parsing method, and after data validation, it returns independently formatted result information and stores the data in its own module's database. Other functional modules similarly request their own independent services to process the data.
[0003] Because the various modules on the management side are relatively independent but share common functions, the data processing logic and format of each module are independent, resulting in a chaotic overall processing situation. This directly reduces data processing efficiency and increases operating costs.
[0004] Currently, there are many Excel processing tools available, most of which offer convenient and general processing methods, perfectly adequate for single-module independent processing logic. However, the management side requires unified processing and automatic matching of various functional modules, providing services with a consistent processing method and format. Existing technologies do not offer a clear solution to this requirement.
[0005] For example, when a user accesses different module management pages of a management system via a browser to import data from an Excel file, they first need to download the corresponding Excel template, then populate it with business data, and finally send it to the backend. Functional module one typically handles this by first performing preliminary validation of the Excel file format and size, then performing independent logical reading and parsing, followed by logical validation of the independent business data relationships, and finally returning the data processing result in its own format. Functional modules two, three, four, etc., all involve their own independent logical processing, and the processing methods vary from person to person, leading to different levels of problems and resulting in low processing efficiency and high time and effort consumption.
[0006] There is currently no effective solution to the above problems. Summary of the Invention
[0007] This invention provides a data processing method and apparatus to at least solve the technical problem in related technologies that different functional modules of a client need to independently acquire and process the same data, which is time-consuming, labor-intensive, and results in low data processing efficiency.
[0008] According to one aspect of the present invention, a data processing method is provided, comprising: receiving multiple data processing requests from multiple functional modules, wherein the data processing requests include information about target data to be processed by the functional modules; synchronously responding to the multiple data processing requests through processors corresponding to the multiple functional modules, processing the target data to obtain processed data; synchronously verifying the processed data through a verifier corresponding to the processed data; and sending the verified processed data to the corresponding functional module.
[0009] Optionally, receiving multiple data processing requests from multiple functional modules includes: receiving download requests from multiple functional modules; responding to the multiple download requests through processors corresponding to the multiple functional modules, and sending data templates to the corresponding functional modules; and receiving data processing requests uploaded by multiple functional modules based on the data templates.
[0010] Optionally, after synchronously verifying the parsed processing data according to the verifier corresponding to the processing data, the method further includes: determining the database corresponding to the functional module; and storing the verified processing data in the database.
[0011] Optionally, the target data is tabular data. According to the processors corresponding to the multiple functional modules, multiple data processing requests are responded to synchronously. The target data of the data processing requests is processed to obtain the processed data, including: reading the tabular data according to the parsing tool of the processor corresponding to the functional module; matching each column of the tabular data with the target object; converting the tabular data into data in a preset format to obtain the processed data, so as to parse and process the tabular data.
[0012] Optionally, synchronously verifying the parsed processed data according to the verifier corresponding to the processed data includes: determining one or more verification methods that the processed data needs to be verified; verifying the processed data according to the verifier corresponding to the verification method; and determining that the processed data has completed verification if all corresponding verifiers pass the verification.
[0013] Optionally, the verification method includes at least one of the following: single-attribute content format verification, dual-attribute content relationship verification, multi-attribute content relationship verification, multi-row data idempotency verification, and database data duplication verification.
[0014] Optionally, when there are multiple verification methods for the processed data, verifying the processed data according to the verifier corresponding to the verification method includes: simultaneously verifying the processed data using multiple verification methods through multiple verifiers.
[0015] According to another aspect of the present invention, a data processing apparatus is also provided, comprising: a receiving module, configured to receive multiple data processing requests from multiple functional modules, wherein the data processing request includes information about target data to be processed by the functional modules; a response module, configured to synchronously respond to the multiple data processing requests through processors corresponding to the multiple functional modules, process the target data, and obtain processed data; a verification module, configured to synchronously verify the processed data through a verifier corresponding to the processed data; and a sending module, configured to send the verified processed data to the corresponding functional module.
[0016] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, performs the data processing method described in any one of the foregoing embodiments.
[0017] According to another aspect of the present invention, a computer storage medium is also provided, the computer storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer storage medium is located to perform any of the data processing methods described above.
[0018] In this embodiment of the invention, multiple data processing requests from multiple functional modules are received, wherein each data processing request includes information about the target data that the functional modules need to process. The processors corresponding to each functional module synchronously respond to the multiple data processing requests, process the target data, and obtain processed data. A verifier corresponding to the processed data synchronously verifies the processed data. The verified processed data is then sent to the corresponding functional module. This achieves the goal of a unified processing module processing the data processing requests from multiple functional modules and verifying the data processing requests through an integrated verification module. This improves the efficiency of data processing requests from multiple functional modules, saves time and manpower, and enhances display quality. Furthermore, it solves the technical problem in related technologies where different functional modules on the client side need to independently acquire and process the same data, resulting in time-consuming, labor-intensive, and inefficient data processing. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0020] Figure 1 This is a schematic diagram of data processing using existing technologies;
[0021] Figure 2 This is a flowchart of a data processing method according to Embodiment 1 of the present invention;
[0022] Figure 3 This is a flowchart detailing the steps of the data processing method according to Embodiment 1 of the present invention;
[0023] Figure 4 This is a schematic diagram of data processing according to Embodiment 2 of the present invention;
[0024] Figure 5 This is a schematic diagram of a data processing device according to Embodiment 3 of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] According to an embodiment of the present invention, a method embodiment of a data processing method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0028] Figure 2 This is a flowchart of a data processing method according to Embodiment 1 of the present invention, as follows: Figure 2 As shown, the method includes the following steps:
[0029] Step S102: Receive multiple data processing requests from multiple functional modules, wherein the data processing request includes information about the target data that the functional module needs to process;
[0030] Step S104: Through the processors corresponding to the multiple functional modules, multiple data processing requests are responded to synchronously to process the target data and obtain processed data.
[0031] Step S106: Synchronously verify the processed data using the verifier corresponding to the processed data.
[0032] Step S208: Send the verified processing data to the corresponding functional module.
[0033] Through the above steps, multiple data processing requests from multiple functional modules are received, where each data processing request includes information about the target data that the functional modules need to process. The processors corresponding to each functional module synchronously respond to these multiple data processing requests, process the target data, and obtain processed data. A validator corresponding to the processed data synchronously verifies the processed data. The verified processed data is then sent to the corresponding functional module. This achieves the goal of a unified processing module handling data processing requests from multiple functional modules and verifying these requests through an integrated verification module. This improves the efficiency of data processing requests from multiple functional modules, saves time and manpower, and enhances display quality. Furthermore, it solves the technical problem in related technologies where different functional modules on the client side need to independently acquire and process the same data, resulting in time-consuming, labor-intensive, and inefficient data processing.
[0034] The above steps can be performed by a backend server, and the above functional modules can be user client functional modules. In related technologies, user client functional modules need to request a separate processor to upload and download data to obtain the target data. Furthermore, developers need to edit separate processing and verification programs for data processing and verification. This results in time-consuming, labor-intensive, and resource-wasting processes with low efficiency.
[0035] This implementation uses an integrated public upload / download module to receive multiple data processing requests from multiple functional modules. This public upload / download module includes multiple independent processors. Upon receiving a data processing request from a functional module, it calls the corresponding processor to upload or download the corresponding processed data based on the target data.
[0036] By packaging the verification methods of the pre-defined verification procedures in the existing technology into a verifier, the corresponding verifier is called when verifying the processed data, thus avoiding the problem of low efficiency caused by manually inputting verification procedures.
[0037] The above-mentioned data processing verifier synchronously verifies the processed data, which can be executed by a unified verification module. This module integrates verifiers for various verification methods, and calls the appropriate verifier to verify the processed data based on the verification requirements. When multiple verification methods are required, multiple verifiers corresponding to these methods can be invoked to synchronously verify the processed data, thereby improving the efficiency of data processing verification.
[0038] The verified processing data is sent to the corresponding functional module to complete the response to the functional module's request for red pigment processing.
[0039] Optional, Figure 3 This is a flowchart detailing the steps of the data processing method according to Embodiment 1 of the present invention, as follows: Figure 3 As shown, step S202, receiving multiple data processing requests from multiple functional modules includes: step S2022, receiving download requests from multiple functional modules; step S2024, responding to multiple download requests through the processors corresponding to the multiple functional modules and sending data templates to the corresponding functional modules; step S2026, receiving data processing requests uploaded by multiple functional modules according to the data templates.
[0040] The above download request is used to download a unified template for data processing requests. The data processing request is then uploaded according to this template so that the target data contained in the data processing request can be processed subsequently.
[0041] Optionally, in step S206, after synchronously verifying the parsed processing data according to the verifier corresponding to the processing data, the method further includes: step S212, determining the database corresponding to the functional module; and step S214, storing the verified processing data in the database.
[0042] After verifying the processed data, the system automatically matches the database corresponding to the functional module and stores the processed data in the database for subsequent tracing or to generate processing logs.
[0043] Optionally, if the target data is tabular data, then step S204 involves synchronously responding to multiple data processing requests according to the processors corresponding to the multiple functional modules, processing the target data of the data processing requests, and obtaining processed data, including: step S2042, reading the tabular data according to the parsing tool of the processor corresponding to the functional module; step S2044, matching each column of the tabular data with the target object, converting the tabular data into data in a preset format, and obtaining processed data for parsing and processing the tabular data.
[0044] The target data mentioned above is tabular data, and the data template can also be a template for tabular data. When processing the data, a parsing tool is invoked to process the target data. This parsing tool is a packaged parsing tool generated from existing parsing methods. The same parsing method is used in the independent processing of each functional module; therefore, multiple functional modules can be parsed and processed using the same parsing tool, simplifying the system structure. Furthermore, the parsing tool can process the target data from multiple data processing requests in parallel, thereby improving the processing efficiency of the target data.
[0045] When a parsing tool parses target data, it reads the table data, matches each column of the table data with the target object, and converts the table data into data in a preset format to obtain processed data for further parsing. For example, using the EasyExcel parsing tool to read an Excel spreadsheet file, matching each column of the Excel spreadsheet file with a JavaBean object (i.e., the target object), and converting the Excel spreadsheet file content into data in a preset JSON format, this process is the data parsing process.
[0046] Optionally, step S206, synchronously verifying the parsed processed data according to the verifier corresponding to the processed data, includes: step S2062, determining one or more verification methods that the processed data needs to be verified; step S2064, verifying the processed data according to the verifier corresponding to the verification method; and step S2066, determining that the processed data has been verified if all corresponding verifiers pass the verification.
[0047] When data processing requires multiple validation methods, all validators must pass the validation process for the data to be considered validated. Conversely, if at least one validator fails the validation, the data is considered to have failed validation and needs to be processed again.
[0048] The above verification methods include at least one of the following: single-attribute content format verification, dual-attribute content relationship verification, multi-attribute content relationship verification, multi-row data idempotency verification, and database data duplication verification.
[0049] Optionally, when multiple verification methods are used to verify the processed data, step S2064, which verifies the processed data according to the verifier corresponding to each verification method, includes step S20642, where multiple verifiers simultaneously verify the processed data using multiple verification methods. That is, multiple verifiers can simultaneously verify the processed data to improve the verification efficiency of the processed data.
[0050] Example 2
[0051] This embodiment provides a unified file upload, download, parsing, and verification method. Through a unified data processing management workflow, it automatically matches functional modules for data processing, improving efficiency and reducing operating costs. By managing data processing uniformly through a specific mode, it provides a unified data parser, automatically matches the logical verification of each module, and uniformly returns data processing results. Using a processor at the same level avoids problems at different levels, significantly improving data processing efficiency and effectively reducing operating costs.
[0052] Figure 4 This is a schematic diagram of data processing according to Embodiment 2 of the present invention, as shown below. Figure 4 As shown, the unified file upload, download, parsing, and verification process is as follows:
[0053] 1. The client browser's various functional modules request the public upload and download service to download the template.
[0054] 2. The client browser's various functional modules request the public upload and download service to upload files.
[0055] 3. The files of each functional module are parsed and processed by a unified data parser, and the data is verified by a unified data validator. The data is automatically matched and verified according to different module types and then placed into the database of the corresponding module. At the same time, the data verification results are returned to the client in a unified data format.
[0056] 4. Public upload and download service principle: Processors for various functional modules are generated based on the factory pattern.
[0057] 5. Unified Data Parser Principle: A parsing tool that is further extracted and encapsulated based on existing parsing tools. It uses the EasyExcel parsing tool to read Excel files, matches each column of data in the Excel file with corresponding JavaBean objects, and converts the Excel file content into JSON data. This process is the data parsing process.
[0058] 6. Unified Data Validator Principle: This is an annotation-based tool developed based on the Chain of Responsibility pattern and Java reflection. After data parsing, annotations are added to the properties of each JavaBean. Each property annotation can receive a validator to complete the data validation logic for the property content. The property annotations in this solution provide multi-level and multi-dimensional data validation, including single-property content format validation, dual-property content relationship validation, multi-property content relationship validation, multi-row data idempotency validation, and database data duplication validation. Simultaneously, each validator operates independently and does not affect others. It is integrated into the entire data validation chain using the Chain of Responsibility pattern to complete its own logic processing. Finally, the Java reflection mechanism triggers the validators in the entire chain to execute verification, and the validation result is returned in a unified format.
[0059] This is a unified Excel upload, download, parsing, and verification technology solution based on the factory pattern, chain of responsibility pattern, and Java reflection mechanism. It provides a unified data parser and data processor, along with a set of annotation-based processing tools. It standardizes business processing logic: the unified data parser and data processor ensure standardized logic verification and data processing, avoiding unnecessary processing that could lead to vulnerabilities. It significantly improves economic efficiency: the use of annotation-based processing tools combined with the unified processor drastically reduces development time, thereby lowering operating costs and improving economic efficiency. It is well-encapsulated and highly portable: it can be used with other business management systems, is well-encapsulated, and easy to port. Simply copy the unified data parser processor source code of this technology solution. Package the unified data parser processor into a JAR file and use it in your project using Maven. Replicate the data processing mode of this technology solution using the same mechanism principles.
[0060] Example 3
[0061] Figure 5 This is a schematic diagram of a data processing apparatus according to Embodiment 3 of the present invention, as shown below. Figure 5 As shown, according to another aspect of the present invention, a data processing apparatus is also provided, including: a receiving module 52, a response module 54, a verification module 56, and a sending module 58. The apparatus will be described in detail below.
[0062] The receiving module 52 is used to receive multiple data processing requests from multiple functional modules, wherein the data processing requests include information about the target data that the functional modules need to process; the response module 54, connected to the receiving module 52, is used to synchronously respond to the multiple data processing requests through the processors corresponding to the multiple functional modules, process the target data, and obtain processed data; the verification module 56, connected to the response module 54, is used to synchronously verify the processed data through the verifier corresponding to the processed data; and the sending module 58, connected to the verification module 56, is used to send the verified processed data to the corresponding functional module.
[0063] The aforementioned device receives multiple data processing requests from multiple functional modules, each request including information about the target data to be processed by the functional modules. The processors corresponding to each functional module synchronously respond to these requests, processing the target data to obtain processed data. A corresponding verifier synchronously verifies the processed data. The verified processed data is then sent to the corresponding functional module. This approach achieves the goal of a unified processing module handling data processing requests from multiple functional modules and verifying these requests through an integrated verification module. This improves the efficiency of data processing requests from multiple functional modules, saves time and manpower, and enhances display quality. Furthermore, it solves the technical problem in related technologies where different functional modules on the client side need to independently acquire and process the same data, resulting in time-consuming, labor-intensive, and inefficient data processing.
[0064] The aforementioned receiving module includes: a first receiving unit for receiving download requests from multiple functional modules; a sending unit for responding to multiple download requests and sending data templates to the corresponding functional modules through the processors corresponding to the multiple functional modules; and a second receiving unit for receiving data processing requests uploaded by multiple functional modules based on the data templates.
[0065] The aforementioned device further includes: a storage module, used to determine the database corresponding to the functional module; and to store the verified processed data in the database.
[0066] The target data is tabular data. The response module includes: a reading unit, used to read the tabular data according to the parsing tool of the processor corresponding to the functional module; and a parsing and processing unit, used to match each column of the tabular data with the target object, convert the tabular data into data in a preset format, and obtain processed data for parsing and processing the tabular data.
[0067] The aforementioned verification module includes: a determination unit, used to determine one or more verification methods that need to be verified for the processed data; a verification unit, used to verify the processed data according to the verification device corresponding to the verification method; and, if all corresponding verification devices pass the verification, to determine that the processed data has completed the verification.
[0068] The above verification methods include at least one of the following: single-attribute content format verification, dual-attribute content relationship verification, multi-attribute content relationship verification, multi-row data idempotency verification, and database data duplication verification.
[0069] When multiple verification methods are used to verify data, the data is verified according to the verification method and the corresponding verification device. This includes: using multiple verification devices to simultaneously verify the data using multiple verification methods.
[0070] Example 4
[0071] According to another aspect of the present invention, a processor is also provided, which is used to run a program, wherein the program performs the following steps when it runs.
[0072] The system receives multiple data processing requests from multiple functional modules, where each data processing request includes information about the target data that the functional module needs to process. It then synchronously responds to these requests through the processors corresponding to each functional module, processes the target data, and obtains processed data. Finally, it synchronously verifies the processed data using a verifier corresponding to the processed data and sends the verified processed data to the corresponding functional module.
[0073] As an optional implementation, receiving multiple data processing requests from multiple functional modules includes: receiving download requests from multiple functional modules; responding to multiple download requests through processors corresponding to each of the multiple functional modules and sending data templates to the corresponding functional modules; and receiving data processing requests uploaded by multiple functional modules based on the data templates.
[0074] As an optional implementation, after synchronously verifying the parsed processed data according to the verifier corresponding to the processed data, the method further includes: determining the database corresponding to the functional module; and storing the verified processed data in the database.
[0075] As an optional implementation, the target data is tabular data. According to the processors corresponding to the multiple functional modules, multiple data processing requests are responded to synchronously. The target data of the data processing requests is processed to obtain the processed data, which includes: reading the tabular data according to the parsing tool of the processor corresponding to the functional module; matching each column of the tabular data with the target object; converting the tabular data into data in a preset format to obtain the processed data for parsing and processing the tabular data.
[0076] As an optional implementation, synchronously verifying the parsed processed data according to the verifier corresponding to the processed data includes: determining one or more verification methods that the processed data needs to be verified; verifying the processed data according to the verifier corresponding to the verification method; and determining that the processed data has completed verification if all corresponding verifiers pass the verification.
[0077] As an optional implementation method, the verification method includes at least one of the following: single-attribute content format verification, dual-attribute content relationship verification, multi-attribute content relationship verification, multi-row data idempotency verification, and database data duplication verification.
[0078] As an optional implementation method, when there are multiple verification methods for processing data, verifying the processed data according to the verifier corresponding to the verification method includes: simultaneously verifying the processed data using multiple verification methods through multiple verifiers.
[0079] Example 5
[0080] According to another aspect of the present invention, a computer storage medium is also provided, the computer storage medium including a stored program, wherein the program controls the device where the computer storage medium is located to perform the following steps when it is running.
[0081] The system receives multiple data processing requests from multiple functional modules, where each data processing request includes information about the target data that the functional module needs to process. It then synchronously responds to these requests through the processors corresponding to each functional module, processes the target data, and obtains processed data. Finally, it synchronously verifies the processed data using a verifier corresponding to the processed data and sends the verified processed data to the corresponding functional module.
[0082] As an optional implementation, receiving multiple data processing requests from multiple functional modules includes: receiving download requests from multiple functional modules; responding to multiple download requests through processors corresponding to each of the multiple functional modules and sending data templates to the corresponding functional modules; and receiving data processing requests uploaded by multiple functional modules based on the data templates.
[0083] As an optional implementation, after synchronously verifying the parsed processed data according to the verifier corresponding to the processed data, the method further includes: determining the database corresponding to the functional module; and storing the verified processed data in the database.
[0084] As an optional implementation, the target data is tabular data. According to the processors corresponding to the multiple functional modules, multiple data processing requests are responded to synchronously. The target data of the data processing requests is processed to obtain the processed data, which includes: reading the tabular data according to the parsing tool of the processor corresponding to the functional module; matching each column of the tabular data with the target object; converting the tabular data into data in a preset format to obtain the processed data for parsing and processing the tabular data.
[0085] As an optional implementation, synchronously verifying the parsed processed data according to the verifier corresponding to the processed data includes: determining one or more verification methods that the processed data needs to be verified; verifying the processed data according to the verifier corresponding to the verification method; and determining that the processed data has completed verification if all corresponding verifiers pass the verification.
[0086] As an optional implementation method, the verification method includes at least one of the following: single-attribute content format verification, dual-attribute content relationship verification, multi-attribute content relationship verification, multi-row data idempotency verification, and database data duplication verification.
[0087] As an optional implementation method, when there are multiple verification methods for processing data, verifying the processed data according to the verifier corresponding to the verification method includes: simultaneously verifying the processed data using multiple verification methods through multiple verifiers.
[0088] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0089] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0090] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0091] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0092] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0093] If the integrated unit is implemented as 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, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0094] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A data processing method, characterized in that, include: The public upload and download module receives multiple data processing requests from multiple functional modules, wherein the data processing requests include information about the target data that the functional modules need to process; Through the public upload and download module, corresponding processors are generated for the multiple functional modules based on the factory pattern, and multiple data processing requests are responded to synchronously to process the target data to obtain processed data. The multiple processors correspond one-to-one with the multiple functional modules, and the multiple processors are independent of each other. The processed data is synchronously verified by integrating multiple independent verifiers based on the chain of responsibility pattern in the unified data verifier. The unified data verifier integrates multiple verification methods. The verified processing data is sent to the corresponding functional module.
2. The method according to claim 1, characterized in that, Receiving multiple data processing requests from multiple functional modules includes: Receive download requests from multiple functional modules; The processors corresponding to the various functional modules respond to the various download requests and send data templates to the corresponding functional modules. Receive data processing requests uploaded by multiple functional modules based on the data template.
3. The method according to claim 1, characterized in that, After synchronously verifying the processed data through multiple independent validators integrated based on the chain of responsibility pattern in a unified data validator, the method further includes: Determine the database corresponding to the aforementioned functional module; The verified processed data is stored in the database.
4. The method according to claim 3, characterized in that, The target data is tabular data. Through the public upload / download module, based on a factory pattern, corresponding processors are generated for the multiple functional modules, synchronously responding to multiple data processing requests to process the target data and obtain processed data, including: The table data is read using the parsing tool of the processor corresponding to the functional module; Each column of the table data is matched with the target object, and the table data is converted into data in a preset format to obtain the processed data, which is then used to parse and process the table data.
5. The method according to claim 4, characterized in that, The synchronous verification of the processed data, achieved through multiple independent verifiers integrated using the chain-of-responsibility model within a unified data verifier, includes: Determine one or more verification methods that the processed data needs to be verified; The processed data is verified according to the verifier corresponding to the verification method; If all corresponding validators pass the verification, the processed data is determined to have completed the verification.
6. The method according to claim 5, characterized in that, The verification method includes at least one of the following: Single-attribute content format validation, dual-attribute content relationship validation, multi-attribute content relationship validation, multi-row data idempotency validation, and database data duplication validation.
7. The method according to claim 5, characterized in that, When there are multiple verification methods for the processed data, verifying the processed data according to the verifier corresponding to the verification method includes: The processed data is simultaneously verified using multiple verifiers through various verification methods.
8. A data processing apparatus, characterized in that, include: The receiving module is used to receive multiple data processing requests from multiple functional modules through the public upload and download module, wherein the data processing request includes information about the target data that the functional module needs to process; The response module is used to generate corresponding processors for the multiple functional modules based on the factory pattern through the public upload and download module, synchronously respond to multiple data processing requests, process the target data, and obtain processed data. The multiple processors correspond one-to-one with the multiple functional modules, and the multiple processors are independent of each other. The verification module is used to synchronously verify the processed data through multiple independent verifiers integrated in the unified data verifier based on the chain of responsibility pattern. The unified data verifier integrates multiple verification methods. The sending module is used to send the verified processed data to the corresponding functional module.
9. A processor, characterized in that, The processor is used to run a program, wherein the program executes the data processing method according to any one of claims 1 to 7 when it runs.
10. A computer storage medium, characterized in that, The computer storage medium includes a stored program, wherein, when the program is executed, it controls the device where the computer storage medium is located to perform the data processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Electronic receipt processing method, related device and computer storage medium
CN112286883A