Asynchronous modular report generation and archiving method and system
Through the asynchronous modular report generation and archiving system, the problems of high maintenance costs and inconvenient data query are solved in the traditional paper archiving method, efficient generation and archiving of data files are achieved, cost reduction and query convenience is improved.
Patent Information
- Application Number
- CN202310938927.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-02-14
AI Technical Summary
The traditional paper archiving method has high maintenance costs and inconvenient data query. Especially when facing large-scale data groups, the stability is poor and the media is prone to damage.
The asynchronous modular report generation and archiving system is adopted, including the data file access layer, the data file generation layer and the data file storage layer. Through encrypted storage and standardized archiving settings, efficient generation and archiving of data files are achieved.
It reduces the maintenance cost of data file archives, improves the convenience of data query, and ensures data stability and security.
Smart Images

Figure CN119441136A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an asynchronous modular report generation and archiving method and system. Background Art
[0002] With the popularization of Internet technology and the development of modern enterprises, the office systems of many enterprises usually involve the generation and archiving of files. In particular, important businesses will generate a large amount of historical data information for different groups. In actual enterprise applications, how to save and manage historical data generated in different periods has always been a problem that has been continuously studied; therefore, data file generation and archiving services for large-scale users are of great significance.
[0003] The traditional method of building business archiving services is to generate data in their respective systems, then print it out, and then physically document it in paper form. Although this method meets the requirements of file archiving, the maintenance cost increases due to long-term archiving services. When faced with large-scale data groups, the stability is extremely poor, the media is easily damaged, and it is not easy to query and use. Summary of the invention
[0004] The present invention provides an asynchronous modular report generation and archiving method and system, so as to enable different business systems to use standardized archiving settings to configure data files that meet business logic requirements, reduce the archiving and maintenance costs of data files, and improve the convenience of data query.
[0005] According to one aspect of the present invention, an asynchronous modular report generation and archiving system is provided, the system comprising: a data file access layer, a data file generation layer, and a data file storage layer, wherein:
[0006] The data file access layer is connected to the data file generation layer, and is used to determine the request parameters and request type corresponding to the data access request when receiving the data access request, and send the request parameters to the data file generation layer when the request type is ungenerated file access; wherein the request parameters include at least one of an organizational structure, a report type, a report number, a reporting period code, and a report template;
[0007] The data file generation layer is connected to the data file storage layer, and is used to receive the request parameters sent by the data file access layer, generate a target data file corresponding to the request parameters based on the request parameters, and send the target data file to the data file storage layer;
[0008] The data file storage layer is connected to the data file access layer, and is used to receive the target data file sent by the data file generation layer, encrypt and store the data file, and feed the data file back to the data file access layer.
[0009] According to another aspect of the present invention, an asynchronous modular report generation and archiving method is provided, which is applied to a data processing system, wherein the data processing system comprises a data file access layer, a data file generation layer, and a data file storage layer, wherein the data file access layer is connected to the data file generation layer and the data file storage layer respectively, and the data file generation layer is connected to the data file storage layer, wherein the method comprises:
[0010] When receiving a data access request through the data file access layer, determining request parameters and request type corresponding to the data access request, and when the request type is ungenerated file access, sending the request parameters to the data file generation layer; wherein the request parameters include at least one of an organizational structure, a report type, a report number, a reporting period code, and a report template;
[0011] Receiving the request parameters sent by the data file access layer through the data file generation layer, generating a target data file corresponding to the request parameters based on the request parameters, and sending the target data file to the data file storage layer;
[0012] The target data file sent by the data file generation layer is received through the data file storage layer, the data file is encrypted and stored, and the data file is fed back to the data file access layer.
[0013] The technical solution of the embodiment of the present invention includes a data file access layer, a data file generation layer, and a data file storage layer, wherein the data file access layer is used to determine the request parameters and request type corresponding to the data access request when receiving the data access request, and send the request parameters to the data file generation layer when the request type is ungenerated file access; the data file generation layer generates a target data file corresponding to the request parameters based on the request parameters, and sends the target data file to the data file storage layer; the data file storage layer is used to encrypt and store data files, and feed the data files back to the data file access layer. The technical solution of the embodiment of the present invention solves the problems of high maintenance cost and inconvenient data query of the current paper archiving method, and realizes that different business systems can use standardized archiving settings to configure data files that meet business logic requirements.
[0014] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 This is an architecture diagram of an asynchronous modular report generation and archiving system provided in the first embodiment of the present invention;
[0017] Figure 2 An architecture diagram of an asynchronous modular report generation and archiving system provided in Embodiment 2 of the present invention;
[0018] Figure 3 The ungenerated and unarchived flow chart provided in the second embodiment of the present invention;
[0019] Figure 4 A generated unarchived access flow chart provided in Embodiment 2 of the present invention;
[0020] Figure 5 A flow chart of the scheduled archiving service provided in the second embodiment of the present invention;
[0021] Figure 6 This is a flow chart of an asynchronous modular report generation and archiving method provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. 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 of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "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.
[0024] Embodiment 1
[0025] Figure 1 This is an architecture diagram of an asynchronous modular report generation and archiving system provided by the first embodiment of the present invention. This embodiment is applicable to the case of generating and archiving data files. Figure 1 As shown, the system includes:
[0026] The data file access layer 110 is connected to the data file generation layer, and is used to determine the request parameters and request type corresponding to the data access request when receiving the data access request, and send the request parameters to the data file generation layer when the request type is ungenerated file access.
[0027] The request parameters include at least one of an organizational structure, a report type, a report number, a reporting period code, and a report template; the request type may be, but is not limited to, an ungenerated file access request, a generated file access request, and an archived file access request.
[0028] It can be understood that when a user needs to access a data file, a corresponding access request can be sent to the data access layer, and the data file access layer parses the data access request to determine the request parameters and request type corresponding to the data access request. If the request type is an ungenerated file access request, it means that the data file accessed by the user is not generated, so the request parameters corresponding to the data access request are sent to the data file generation layer.
[0029] The data file generation layer 120 is connected to the data file storage layer, and is used to receive the request parameters sent by the data file access layer, and generate a target data file corresponding to the request parameters based on the request parameters, and send the target data file to the data file storage layer;
[0030] Specifically, after receiving the request parameters, the data file generation layer can generate a corresponding data table as the target data file according to the organizational structure, report type, report number, reporting period code and report template in the request parameters, and send the target data file to the data file storage layer.
[0031] The data file storage layer 130 is connected to the data file access layer, and is used to receive the target data file sent by the data file generation layer, encrypt and store the data file, and feed the data file back to the data file access layer. It can be understood that the data file storage layer can save the data file generated by the data network internal component generation layer, mainly encrypt and store the data file, and feed the data file back to the data file access layer. This process can realize the storage and management of temporarily generated data files, and can also save data query time for the data access layer.
[0032] In this embodiment, the data access layer is also used to: if the request type is generated file access, send the request parameters to the data file storage layer, so that the data file storage layer searches for the generated data file matching the request parameters and feeds back to the data file access layer.
[0033] It can be understood that if the request type is access to a generated file, it means that the data file that needs to be accessed has already been generated, and the request parameters can be sent directly to the data file storage layer. The data file storage layer searches the storage space for a data file that matches the data file access request based on one or more of the request parameters, that is, the generated data file, and feeds the data file back to the data file access layer.
[0034] In an embodiment of the present invention, the asynchronous modular report generation and archiving system also includes: a cloud file archiving layer; wherein the cloud file archiving layer is connected to the data file storage layer, and is used to obtain the data files stored in the data file layer according to a preset period, and encrypt the data files to obtain cloud files and store the cloud files. The preset period is a pre-set archiving period, and the cloud file archiving layer accesses the data file storage layer according to the pre-set period, and can archive the data files in the data file storage layer, such as encrypting the data files to obtain the corresponding cloud files, and store the cloud files. This has the advantage that an external system can access the cloud files through the cloud file archiving layer, provided that the external system is authorized.
[0035] In an embodiment of the present invention, the asynchronous modular report generation and archiving system also includes: a scheduled archiving service layer, wherein the scheduled archiving service layer is connected to the data file storage layer, and is used to obtain the data files to be archived from the data file storage layer based on the archiving cycle and the archiving range, and save the data files to be archived to the scheduled archiving service layer.
[0036] The archiving scope includes an organizational structure scope and / or a report number scope.
[0037] Specifically, scheduled archiving refers to archiving data files in the data file storage layer according to a preset cycle, and the archiving scope determines which data files are archived. It can be understood that there are many data files in the data file storage layer, and some of them do not need to be archived. In this case, the data files can be screened according to the archiving scope. For example, if the organizational structure corresponding to the data file belongs to the organizational structure range in the archiving scope, or the report number corresponding to the data file belongs to the report number range in the archiving scope, the data file can be used as a data file to be archived. Furthermore, the data file to be archived is encrypted with Base64 and stored in the scheduled archiving service layer. At the same time, the file information of the data file to be archived is stored, so that the corresponding data file can be directly found according to the file information at a later time.
[0038] In an embodiment of the present invention, a system setting layer is also included, wherein the system setting layer is connected to the scheduled archiving service layer, and is used to set the archiving period and the archiving range, and send the archiving period and the archiving range to the scheduled archiving service layer, so that the scheduled archiving service layer archives the data files to be archived based on the archiving period and the archiving range. The system setting layer can be used to customize some system parameters or rules, such as setting the archiving period or the archiving range. Based on the above settings, the archiving service layer archives data files according to different requirements to meet the personalized archiving requirements of users, and the flexibility of archiving is also high.
[0039] In an embodiment of the present invention, the data file access layer includes a queue generation unit, wherein the queue generation unit is used to generate task information to be generated corresponding to each request parameter when the data file access layer receives at least two data access requests, and to establish a task queue to be generated based on each task information to be generated, and to send the task queue to be generated to the data file generation layer.
[0040] In actual applications, the data file access layer may receive multiple data file access requests. In order to facilitate the processing of data access requests, the request parameters corresponding to the data file access request can be determined first, and the task information to be generated can be generated based on the request parameters. Then, the task information to be generated can be added to the queue in chronological order or other set priority order, that is, the task queue to be generated, and the task queue to be generated can be sent to the data file generation unit.
[0041] In an embodiment of the present invention, the data file generation layer includes a queue processing unit and a data generation unit, wherein the queue processing unit is connected to the data generation unit, and is used to receive the task queue to be generated, determine each task information to be generated contained in the task queue to be generated, and send each task information to be generated to the data generation unit;
[0042] The data generating unit is used to receive each of the to-be-generated task information sent by the queue processing unit, and asynchronously generate the target data file corresponding to each of the to-be-generated task information, and record the execution status corresponding to the to-be-generated task information;
[0043] The execution status corresponding to the task information to be generated includes: successful execution or execution error.
[0044] Specifically, when a queue of tasks to be generated is received, a target data file corresponding to each task to be generated can be generated by a data generation unit. In order to improve efficiency, a consumer model is used to consume the queue of tasks to be generated, and at least one data generation unit is used to process the tasks to be generated. In this way, each task can be processed efficiently to generate the corresponding target data file.
[0045] In an embodiment of the present invention, the scheduled archiving service layer includes a task determination unit to be archived and an archiving unit, wherein the task determination unit to be archived is connected to the archiving unit and is used to obtain parameter information corresponding to each of the data files in the data file storage layer, determine the files to be archived from each of the data files based on a comparison result between the parameter information and the archiving range, establish a task queue to be archived based on the parameter information corresponding to each of the files to be archived, and send the task queue to be archived to the archiving unit; the archiving unit is used to receive the task queue to be archived, determine the files to be archived based on the task queue to be archived, and archive the files to be archived.
[0046] The parameter information includes at least one of an organizational structure range and a report number range.
[0047] In actual applications, there are situations where multiple data files need to be archived; at this time, in order to facilitate the archiving processing of the files to be archived, you can first determine which are the files to be archived based on the parameter information corresponding to each data file in the data file storage layer and the comparison result between the parameter information and the archiving range; after determining the archived files, you can generate the to-be-archived task information based on the parameter information of the to-be-archived files and add it to the queue, that is, the to-be-archived task queue, and send the to-be-archived task queue to the archiving unit, so that the archiving unit can process the archiving tasks, that is, encrypt and store each to-be-archived file.
[0048] The technical solution of the embodiment of the present invention includes a data file access layer, a data file generation layer, and a data file storage layer, wherein the data file access layer is used to determine the request parameters and request type corresponding to the data access request when receiving the data access request, and send the request parameters to the data file generation layer when the request type is ungenerated file access; the data file generation layer generates a target data file corresponding to the request parameters based on the request parameters, and sends the target data file to the data file storage layer; the data file storage layer is used to encrypt and store data files, and feed the data files back to the data file access layer. The technical solution of the embodiment of the present invention solves the problems of high maintenance cost and inconvenient data query of the current paper archiving method, and realizes that different business systems can use standardized archiving settings to configure data files that meet business logic requirements.
[0049] Embodiment 2
[0050] Figure 2 This is an architecture diagram of an asynchronous modular report generation and archiving system provided in Example 2 of the present invention. This example is a preferred example of the above example, and its specific implementation method can refer to the technical solution of this example. Among them, the technical terms that are the same or corresponding to the above example are not repeated here.
[0051] like Figure 2As shown, the system in the embodiment of the present invention includes four layers: data file access layer, data file generation layer, generated file storage layer, cloud file archiving layer and scheduled archiving service layer. The function of the data file access layer is to face the external business users, for the anti-counterfeiting code of the archived or unarchived data, including two types of archiving access and generating access. The function of the data file generation layer is to freely select parameters according to different business scenarios to generate data files required by the business, and the parameters generally include time and organization or other matters required by the business. The generated file storage layer is a place to manage and store temporarily generated data documents, and can save query time for the data file access layer. The cloud file archiving layer is to meet the document archiving storage requirements of the external system, and the archived files can be backed up here for disposal at the same time. The archiving service layer is the core layer of the present invention. Its function is to actively or passively generate data files from data in a predefined format, and store the data in various places, so that the data file access layer, data file generation layer, archive file storage layer and cloud file archiving layer are integrated together to realize the complex archiving data file requirements.
[0052] (1) Data file access layer: There are three types of data file access layer, as follows:
[0053] a) Ungenerated and unarchived file access: New business data has never generated a data file in the system. When a customer accesses this data for the first time, it is considered as ungenerated and unarchived file access. Figure 3 As shown, the flowchart is not generated and archived.
[0054] b) Generated but unarchived file access: data that has not reached the set time of the scheduled archiving service, after the customer's access, the file has been generated in the generated file storage layer. This type of access belongs to the generated but unarchived file access. Figure 4 As shown, the unarchived access flow chart has been generated.
[0055] c) Generated archived file access: The start time of automatic archiving has passed, and the data access file is generated and stored in the generated file storage layer and the cloud file archiving layer. This type of customer access request is called generated archived file access.
[0056] (2) Data file generation layer: The client's request parameters are transferred from the data file access layer to the data file generation layer. In this layer, data files are dynamically generated based on specific parameters, including organizational structure, report type, report number, reporting period code, and report template settings. The data file exists in Excel format. The files generated by the data file are unique. If they are forcibly regenerated, the files that have already been generated will be replaced.
[0057] (3) Generate file storage layer: After the data file is generated, it is encrypted and stored in the database, and the corresponding file information is saved according to the generated parameters. The files here can be queried by the data file access layer to improve query efficiency and avoid generating the same data file multiple times.
[0058] (4) Cloud file archiving layer: After data files are generated, they are encrypted and stored in the cloud file archiving layer at a fixed time period. The file services here can be provided to external systems to call or modify files. In the same parameter settings, files are unique, and repeated archiving can replace existing archive files with the same archiving parameters.
[0059] (5) Scheduled archiving service layer: As the core scheduled archiving service layer, the service supports custom settings for scheduled time and archiving service parameter ranges, including organizational ranges, report number ranges, generated file processing methods, and file storage settings. The specific service method is to first obtain the service settings, and then generate archiving tasks based on the organizational structure, reporting period, and report coding. According to each archiving task, the archiving cloud is archived, and the generated data files are archived. For data files that have not been generated, data is generated and then archived. This model solves the problems of data inconsistency caused by large-scale data interaction or serious server memory consumption caused by multiple data file generation, thereby improving the efficiency of data processing. Secondly, since this layer also belongs to the service docking layer, it can be docked with various service providers or business systems, increase the types and methods of sending services, and improve the high availability of notification services. Such as Figure 5 The following is a flowchart of the scheduled archiving service.
[0060] The data input form of the embodiment of the present invention is divided into: web page entry, API entry, and the data output form is: Excel data file.
[0061] First, if Figure 3 As shown, the user request is sent to the data access layer, which integrates a specific data format, detects which type of access it belongs to, whether the data file has been archived, and whether it has been generated. For ungenerated data files, the file generation parameters are transferred to the file generation layer. For generated data files, the generated data files are directly returned to the client.
[0062] Combining the description of the message flow process and the description of the present invention in the content of the invention, it can be seen that the present invention has many rule definitions, and these rule definitions work between the various layers of the present invention. The following article introduces the specific implementation method from the rule definition. In addition, the scheduled archiving service as a module will give a separate implementation process.
[0063] 1. Loading service settings
[0064] This service allows you to customize service settings, including the scope of organizations for scheduled archiving, the scope of report templates, the scope of reporting periods, the time for scheduled archiving execution, whether the original generated files need to be overwritten, and whether the generated files should be archived directly.
[0065] 2. Loading third-party archive storage components
[0066] This service uses a third-party archive storage component. Service initialization requires loading and setting the parameters of the cloud archive component, including URL, AppID, and AppSecret. The system supports the extension of other third-party components as archive storage components.
[0067] 3. Scheduled Archiving Core Components
[0068] This service is the core service layer of the present invention and uses all previously loaded service settings. Functional flow includes data file access layer, data file generation layer, data file storage layer, and cloud file archiving layer. The detailed description is as follows:
[0069] 1. Query the list to be generated
[0070] The task starts at a defined time, queries the organizational scope, reporting period scope, report template number range, filters or overwrites the generated files, and filters or overwrites the archived files.
[0071] 2. Generate a queue of data files to be generated
[0072] The list to be generated obtained in the previous step is converted into task information for generating data files. In order to manage these task information in a traceable manner and facilitate tracing and troubleshooting after errors occur, these task information are stored in the queue of data files to be generated. The data in the queue includes the status of pending execution, error generation, and successful execution.
[0073] 3. Generate data file service
[0074] Generate data uniformly for the data in the queue of data files to be generated. To improve efficiency, you can use multiple data file generation services and use the consumer model to consume the data in the queue at the same time. Each task information is sent to the data file generation layer. After the generation is completed, it is saved to the data file storage layer along with the task information. Finally, change the task status to completed. For files that generate errors, prompt the error information in time. After troubleshooting the errors, continue this process.
[0075] 4. Generate a queue of data files to be archived
[0076] The list to be generated obtained in the first step is converted into task information for generating data files. The parameter settings to be archived are queried to obtain the task information to be archived. In order to manage these task information in a traceable manner and facilitate tracing and troubleshooting after errors occur, these task information are stored in the queue of data files to be archived. The data in the queue includes the status of pending execution, error generation, and successful execution.
[0077] 5. Scheduled archiving service
[0078] For the data in the queue of files to be archived, archive the data files uniformly. To improve efficiency, you can use multiple scheduled archiving services and use the consumer model to consume the data in the queue at the same time. For each task information, query the task file from the data file storage layer and use the API of the third-party cloud storage component to save it to the cloud archive storage layer. Finally, change the task status to completed. For files that generate errors, prompt the error information in time, and continue this process after troubleshooting the errors.
[0079] 4. Data Access Layer
[0080] The data access layer accepts data access from customers, including web data access and archived API access.
[0081] 5. Data file storage layer
[0082] The generated files will be stored in the data file storage layer. The file storage method is Base64 encrypted. At the same time, the task information related to the file is also stored. The file is unique in the storage layer. There is only one copy of the data file with the same parameters. If a new file is generated, it will overwrite the previously generated file.
[0083] Under the current software environment trend of microservice framework, the technical solution of the embodiment of the present invention utilizes the service-oriented deployment of various modules to make them have better scalability and reconfiguration, and is separated from specific business scenarios, so that the archiving service can have good compatibility with various business fields. Ultimately, in the face of any similar business scenario, only a configuration method with simple logic, high reusability and outstanding performance is needed to handle large-scale data file generation and archiving service tasks.
[0084] Embodiment 3
[0085] Figure 6 This is a flowchart of an asynchronous modular report generation and archiving method provided by the third embodiment of the present invention. This embodiment is applicable to the case of generating and archiving data. Figure 6 As shown, the method includes:
[0086] S210: When receiving a data access request through the data file access layer, determine the request parameters and request type corresponding to the data access request, and when the request type is ungenerated file access, send the request parameters to the data file generation layer.
[0087] The request parameters include at least one of an organizational structure, a report type, a report number, a reporting period code, and a report template.
[0088] It can be understood that when a user needs to access a data file, a corresponding access request can be sent to the data access layer, and the data file access layer parses the data access request to determine the request parameters and request type corresponding to the data access request. If the request type is an ungenerated file access request, it means that the data file accessed by the user is not generated, so the request parameters corresponding to the data access request are sent to the data file generation layer.
[0089] S220: Receive the request parameters sent by the data file access layer through the data file generation layer, generate a target data file corresponding to the request parameters based on the request parameters, and send the target data file to the data file storage layer.
[0090] Specifically, after receiving the request parameters, the data file generation layer can generate a corresponding data table as the target data file according to the organizational structure, report type, report number, reporting period code and report template in the request parameters, and send the target data file to the data file storage layer.
[0091] S330, receiving the target data file sent by the data file generation layer through the data file storage layer, encrypting and storing the data file, and feeding back the data file to the data file access layer.
[0092] It can be understood that the data file storage layer can store the data files generated by the data network internals generation layer, mainly encrypting and storing the data files, and feeding the data files back to the data file access layer. This process can save and manage temporarily generated data files, and can also save data query time for the data access layer.
[0093] On the basis of the above technical solution, the data processing system further includes a timed archiving service layer, and the timed archiving service layer is connected to the data file storage layer, wherein the method includes:
[0094] Obtaining the data files to be archived from the data file storage layer based on the archiving cycle and the archiving range through the scheduled archiving service layer, and saving the data files to be archived to the scheduled archiving service layer;
[0095] The archiving scope includes: organizational structure scope and / or report number scope.
[0096] Specifically, scheduled archiving refers to archiving data files in the data file storage layer according to a preset cycle, and the archiving scope determines which data files are archived. It can be understood that there are many data files in the data file storage layer, and some of them do not need to be archived. In this case, the data files can be screened according to the archiving scope. For example, if the organizational structure corresponding to the data file belongs to the organizational structure range in the archiving scope, or the report number corresponding to the data file belongs to the report number range in the archiving scope, the data file can be used as a data file to be archived. Furthermore, the data file to be archived is encrypted with Base64 and stored in the scheduled archiving service layer. At the same time, the file information of the data file to be archived is stored, so that the corresponding data file can be directly found according to the file information at a later time.
[0097] The technical solution of the embodiment of the present invention includes a data file access layer, a data file generation layer, and a data file storage layer, wherein the data file access layer is used to determine the request parameters and request type corresponding to the data access request when receiving the data access request, and send the request parameters to the data file generation layer when the request type is ungenerated file access; the data file generation layer generates a target data file corresponding to the request parameters based on the request parameters, and sends the target data file to the data file storage layer; the data file storage layer is used to encrypt and store data files, and feed the data files back to the data file access layer. The technical solution of the embodiment of the present invention solves the problems of high maintenance cost and inconvenient data query of the current paper archiving method, and realizes that different business systems can use standardized archiving settings to configure data files that meet business logic requirements.
[0098] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0099] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An asynchronous modular report generation and archiving system, characterized in that: include: Data file access layer, data file generation layer, data file storage layer, among which, The data file access layer is connected to the data file generation layer, and is used to determine the request parameters and request type corresponding to the data access request when receiving the data access request, and send the request parameters to the data file generation layer when the request type is ungenerated file access; wherein the request parameters include at least one of an organizational structure, a report type, a report number, a reporting period code, and a report template; The data file generation layer is connected to the data file storage layer, and is used to receive the request parameters sent by the data file access layer, generate a target data file corresponding to the request parameters based on the request parameters, and send the target data file to the data file storage layer; The data file storage layer is connected to the data file access layer, and is used to receive the target data file sent by the data file generation layer, encrypt and store the data file, and feed the data file back to the data file access layer.
2. The system according to claim 1, characterized in that The data access layer is also used for: If the request type is access to a generated file, the request parameters are sent to the data file storage layer, so that the data file storage layer searches for a generated data file that matches the request parameters and feeds back to the data file access layer.
3. The system according to claim 2, characterized in that Also includes: Cloud file archiving layer; The cloud file archiving layer is connected to the data file storage layer, and is used to obtain the data files stored in the data file layer according to a preset period, encrypt the data files to obtain cloud files, and store the cloud files.
4. The system according to claim 1, characterized in that It also includes a scheduled archiving service layer, where: The scheduled archiving service layer is connected to the data file storage layer, and is used to obtain the data files to be archived from the data file storage layer based on the archiving cycle and the archiving range, and save the data files to be archived to the scheduled archiving service layer; The archiving scope includes the organizational structure scope and / or the report number scope.
5. The system according to claim 1, characterized in that The data file access layer includes a queue generation unit, wherein: The queue generation unit is used to generate task information to be generated corresponding to each request parameter when the data file access layer receives at least two data access requests, establish a task queue to be generated based on each task information to be generated, and send the task queue to be generated to the data file generation layer.
6. The system according to claim 5, characterized in that The data file generation layer includes a queue processing unit and a data generation unit, wherein: The queue processing unit is connected to the data generating unit, and is used to receive the task queue to be generated, determine each task information to be generated contained in the task queue to be generated, and send each task information to the data generating unit; The data generating unit is used to receive each of the to-be-generated task information sent by the queue processing unit, and asynchronously generate the target data file corresponding to each of the to-be-generated task information, and record the execution status corresponding to the to-be-generated task information; The execution status corresponding to the task information to be generated includes: successful execution or execution error.
7. The system according to claim 4, characterized in that The scheduled archiving service layer includes a task determination unit to be archived and an archiving unit, wherein: The to-be-archived task determination unit is connected to the archiving unit and is used to obtain parameter information corresponding to each of the data files in the data file storage layer, determine the to-be-archived files from each of the data files based on a comparison result between the parameter information and the archiving range, establish a to-be-archived task queue based on the parameter information corresponding to each of the to-be-archived files, and send the to-be-archived task queue to the archiving unit; The archiving unit is used to receive the to-be-archived task queue, determine the to-be-archived file based on the to-be-archived task queue, and perform archiving processing on the to-be-archived file; The parameter information includes at least one of an organizational structure range and a report number range.
8. The system according to claim 4, characterized in that Also included is a system settings layer, where The system setting layer is connected to the scheduled archiving service layer, and is used to set the archiving period and the archiving range, and send the archiving period and the archiving range to the scheduled archiving service layer, so that the scheduled archiving service layer archives the data files to be archived based on the archiving period and the archiving range.
9. An asynchronous modular report generation and archiving method, characterized in that: Applied to a data processing system, the data processing system includes a data file access layer, a data file generation layer, and a data file storage layer, the data file access layer is connected to the data file generation layer and the data file storage layer respectively, the data file generation layer is connected to the data file storage layer, wherein the method includes: When receiving a data access request through the data file access layer, determining request parameters and request type corresponding to the data access request, and when the request type is ungenerated file access, sending the request parameters to the data file generation layer; wherein the request parameters include at least one of an organizational structure, a report type, a report number, a reporting period code, and a report template; Receiving the request parameters sent by the data file access layer through the data file generation layer, generating a target data file corresponding to the request parameters based on the request parameters, and sending the target data file to the data file storage layer; The target data file sent by the data file generation layer is received through the data file storage layer, the data file is encrypted and stored, and the data file is fed back to the data file access layer.
10. The method according to claim 9, characterized in that Applied to a data processing system, the data processing system further includes a timed archiving service layer, the timed archiving service layer is connected to the data file storage layer, wherein the method includes: Obtaining the data files to be archived from the data file storage layer based on the archiving cycle and the archiving range through the scheduled archiving service layer, and saving the data files to be archived to the scheduled archiving service layer; The archiving scope includes: organizational structure scope and / or report number scope.