Data exporting method and device, medium and equipment

By adopting multi-threaded concurrent execution and streaming processing of EasyExcel tools on the server, combined with object storage and WebSocket real-time notification, the problem of low efficiency in traditional Excel file export is solved, and efficient and secure data export and user experience improvement is achieved.

CN118964359AInactive Publication Date: 2024-11-15SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411156166.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional Excel file export method is resource consumption, inefficient and long response time due to synchronization operations, and cannot meet the current efficient, fast and stable business needs.

Method used

On the server, multi-threaded concurrent execution strategy is used to process data export requests, stream processing is performed through EasyExcel tool to export Excel files, and upload the files to the object storage service system, generate a download link and feedback progress information in real time through WebSocket connection.

Benefits of technology

It greatly improves the speed of data export, reduces user waiting time, improves CPU resource utilization, ensures persistent storage and security of data, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964359A_ABST
    Figure CN118964359A_ABST
Patent Text Reader

Abstract

The invention provides a data exporting method and device, a medium and equipment. The method comprises the following steps: receiving a data exporting request initiated by a client; for each received data export request, allocating a corresponding thread, and executing a data query operation corresponding to the data export request through the allocated thread; wherein each thread corresponding to each data export request adopts a concurrent execution strategy; exporting query data corresponding to each data exporting request as an Excel file; the Excel file is uploaded to an object storage service system to be stored; according to the storage position of the Excel file in the object storage service system, generating a downloading link corresponding to the query data; and the downloading link is issued to the client side, so that a user of the client side carries out downloading operation on the Excel file according to the downloading link. According to the invention, the efficiency and reliability of large data volume export can be improved, and reasonable utilization of resources is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data export technology, and in particular to a data export method and device, medium, and equipment. Background Art

[0002] With the rapid development of modern enterprise data management and Internet technology, the amount of data is growing explosively. Large-scale data processing has become one of the challenges that must be overcome in enterprise system design. Especially for data export functions, users expect to obtain large amounts of data in the form of spreadsheets such as Excel for reporting or further analysis. However, this process is often limited by the processing capabilities of existing tools and methods.

[0003] Traditional Excel file export is usually a synchronous operation, which requires a long time to wait for the server to complete the entire export task. This type of export method can no longer meet the current business needs of efficiency, speed and stability due to its resource consumption, low efficiency and long response time. Summary of the invention

[0004] In response to at least one of the above technical problems, an embodiment of the present invention provides a data export method, device, medium, and equipment.

[0005] According to the first aspect, the data export method provided by the embodiment of the present invention is executed by the server, and the method includes:

[0006] Receive data export requests initiated by clients;

[0007] For each data export request received, a corresponding thread is allocated, and the data query operation corresponding to the data export request is executed through the allocated thread; wherein each thread corresponding to each data export request adopts a concurrent execution strategy;

[0008] Export the query data corresponding to each data export request as an Excel file;

[0009] Upload the Excel file to the object storage service system for storage;

[0010] Generate a download link corresponding to the query data according to the storage location of the Excel file in the object storage service system;

[0011] The download link is sent to the client, so that the user of the client can download the Excel file according to the download link.

[0012] In one embodiment, before allocating a corresponding thread for each received data export request, the method further includes:

[0013] Establishing a WebSocket connection with the client;

[0014] Correspondingly, the method further includes: feeding back real-time progress information of processing the data export request to the client via the WebSocket connection, so that the client can visualize the real-time progress information.

[0015] In one embodiment, exporting the query data corresponding to each data export request as an Excel file includes: using an EasyExcel tool to stream process the query data and exporting the data as the Excel file;

[0016] And / or, the object storage service system is a MinIO object storage service system.

[0017] In one embodiment, the download link contains identity authentication information and a validity period, so that the client authenticates the user based on the identity authentication information, and allows the user to download the Excel file from the object storage service system based on the storage location in the download link within the validity period after the identity authentication is passed.

[0018] In one embodiment, before allocating a corresponding thread for each received data export request, the method further includes:

[0019] Authenticate the user;

[0020] If the identity authentication is passed, each data export request received is executed and a corresponding thread is allocated; if the identity authentication is not passed, an error message is fed back to the client.

[0021] In one embodiment, the method further comprises:

[0022] During the process of processing the data export request, if an exception occurs, an error message is generated and the error message is fed back to the client.

[0023] In one embodiment, the method further comprises:

[0024] If the number of currently unprocessed data export requests exceeds the processing capacity of the thread pool, the currently unprocessed data export requests will be saved in the message queue, and when a thread is idle, the data export requests will be taken out from the message queue for processing in the order in which the server receives the data export requests.

[0025] In a second aspect, the data export device provided by an embodiment of the present invention is deployed on a server, and the device includes:

[0026] A request receiving module, used to receive a data export request initiated by a client;

[0027] A thread processing module, for allocating a corresponding thread for each received data export request, and executing the data query operation corresponding to the data export request through the allocated thread; wherein each thread corresponding to each data export request adopts a concurrent execution strategy;

[0028] The file export module is used to export the query data corresponding to each data export request into an Excel file;

[0029] A file storage module, used to upload the Excel file to an object storage service system;

[0030] A link generation module, used to generate a download link corresponding to the query data according to the storage location of the Excel file in the object storage service system;

[0031] The link sending module is used to send the download link to the client, so that the user of the client can download the Excel file according to the download link.

[0032] In one embodiment, before allocating a corresponding thread for each received data export request, the thread processing module is further used to: establish a WebSocket connection with the client;

[0033] Correspondingly, the device further includes:

[0034] The progress feedback module is used to feed back the real-time progress information of processing the data export request to the client through the WebSocket connection, so that the client can visualize the real-time progress information.

[0035] In one embodiment, the file export module 130 is specifically used to: use the EasyExcel tool to stream the query data and export it as the Excel file; and / or the object storage service system is a MinIO object storage service system.

[0036] In one embodiment, the download link contains identity authentication information and a validity period, so that the client authenticates the user based on the identity authentication information, and allows the user to download the Excel file from the object storage service system based on the storage location in the download link within the validity period after the identity authentication is passed.

[0037] In one embodiment, before allocating a corresponding thread to each received data export request, the thread processing module 120 is also used to: authenticate the user; if the identity authentication is successful, execute the allocation of a corresponding thread to each received data export request; if the identity authentication is not successful, feedback an error message to the client.

[0038] In one embodiment, the apparatus further comprises:

[0039] The exception feedback module is used to: if an exception occurs during the processing of the data export request, generate error information and feed back the error information to the client.

[0040] In one embodiment, the apparatus further comprises:

[0041] The task scheduling module is used to save the currently unprocessed data export requests in the message queue if the number exceeds the processing capacity of the thread pool, and to take out the data export requests from the message queue for processing in the order in which the data export requests are received by the server when a thread is idle.

[0042] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method provided in the first aspect.

[0043] According to a fourth aspect, a computing device provided by an embodiment of the present invention includes a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided by the first aspect is implemented.

[0044] The data export method, device, medium, and equipment provided by the embodiment of the present invention, when receiving a data export request, the server allocates a corresponding thread, and executes the data query operation corresponding to the data export request through the allocated thread, and each thread corresponding to each data export request adopts a concurrent execution strategy. Then the query data corresponding to each data export request is exported as an Excel file, and then the Excel file is uploaded to the object storage service system for storage, and then a download link corresponding to the query data is generated, and the download link is sent to the client, so that the user of the client performs the download operation of the Excel file according to the download link. Due to the use of multi-threaded concurrent processing technology, the speed of data export is greatly improved, thereby reducing the user waiting time. Each thread in parallel executes tasks independently, which can achieve better CPU resource utilization and speed up task execution. Moreover, storing the exported file in the object storage service system instead of returning it directly to the user not only realizes the persistent storage of data, but also isolates data access from the server operating environment, reduces the risk of data leakage, and ensures the security and reliability of data access. It can be seen that the embodiment of the present invention can improve the efficiency and reliability of large data volume export, ensure the rational use of resources, and provide high-performance and high-availability services in data storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 Schematic diagram of a data export method according to an embodiment of the present invention;

[0046] Figure 2 It is a structural block diagram of a data export device in one embodiment of the present invention. DETAILED DESCRIPTION

[0047] In a first aspect, an embodiment of the present invention provides a data export method, see Figure 1 The method comprises the following steps S110 to S160:

[0048] S110, receiving a data export request initiated by a client;

[0049] It can be seen that when a user initiates a data export request on the client, the server can receive the data export request.

[0050] In one embodiment, before allocating a corresponding thread for each received data export request in S120, the method may further include:

[0051] Authenticate the user;

[0052] If the identity authentication is passed, each data export request received is executed and a corresponding thread is allocated; if the identity authentication is not passed, an error message is fed back to the client.

[0053] That is, before executing S120, the user's identity is authenticated first, and S120 is executed only if the identity is passed, otherwise an error message is fed back to the user. The user of the client can initiate a data export request again or seek help from the operation and maintenance personnel.

[0054] S120, for each received data export request, assign a corresponding thread, and execute the data query operation corresponding to the data export request through the assigned thread; wherein each thread corresponding to each data export request adopts a concurrent execution strategy;

[0055] That is to say, for each data export request, a separate idle thread will be selected from the thread pool to process the data export request, and each thread can be executed in parallel. That is, the server adopts a multi-threaded processing strategy to concurrently execute data query tasks. Each data export request is processed by an independent thread, so that the server can process multiple data export requests at the same time, thereby solving the performance bottleneck problem of single-threaded sequential execution. Since the threads operate independently and do not interfere with each other, the optimal allocation and utilization of system resources can be ensured.

[0056] S130, exporting the query data corresponding to each data export request into an Excel file;

[0057] The step of exporting the query data corresponding to each data export request as an Excel file in S130 may include: using an EasyExcel tool to perform streaming processing on the query data and exporting the data as the Excel file.

[0058] In each thread, the EasyExcel tool is used to stream query data and export it to an Excel file. Compared with the traditional file generation method, the EasyExcel tool uses memory optimization and event-driven writing methods to speed up data writing while maintaining relatively low memory usage. This method uses a memory buffer to optimize file writing performance, while reducing the number of system I / O operations to avoid memory overflow problems caused by excessive data volume.

[0059] S140, uploading the Excel file to the object storage service system for storage;

[0060] It can be seen that the generated Excel file is not directly returned to the user, but uploaded to the object storage service system for storage. The object storage service system can be the MinIO object storage service system. The MinIO object storage service system provides an S3-compatible API to ensure the security and reliability of file transfer and storage. After being uploaded to the MinIO object storage service system, the file enjoys high availability and durability, so that even if the backend service is unstable, the user can access the completed export file at any time through the download link.

[0061] S150. Generate a download link corresponding to the query data according to the storage location of the Excel file in the object storage service system;

[0062] It can be seen that the download link includes the storage location of the Excel file in the object storage service system.

[0063] S160: Send the download link to the client, so that the user of the client can download the Excel file according to the download link.

[0064] In one embodiment, the download link may include identity authentication information and a validity period, so that the client can authenticate the user based on the identity authentication information, and allow the user to download the Excel file from the object storage service system based on the storage location in the download link within the validity period after the identity authentication is passed.

[0065] As can be seen, the download link includes authentication information and validity period, so that only users who have passed the authentication can access and download the Excel file in the object storage service system within the validity period. If the authentication fails and / or the access time exceeds the validity period, the user cannot access and download the Excel file in the object storage service system, thereby ensuring data security.

[0066] That is, when the download link is returned, the server will generate a time-sensitive download link to ensure that legitimate users can access the exported file within the legal validity period, effectively avoiding the risk of file leakage and illegal access.

[0067] In one embodiment, before allocating a corresponding thread for each received data export request in S120, the method further includes:

[0068] Establishing a WebSocket connection with the client;

[0069] Correspondingly, the method further includes: feeding back real-time progress information of processing the data export request to the client via the WebSocket connection, so that the client can visualize the real-time progress information.

[0070] That is to say, after receiving the data export request sent by the client, the server establishes a WebSocket connection with the client. In the subsequent process of performing corresponding operations on the data export request, real-time progress information can be fed back to the client through the WebSocket connection, so that the client will be visualized as a progress bar or the like based on the real-time progress information, so that the user can understand the processing progress of the server in a timely manner. Since the user can understand the progress of each data export task in real time, the uncertainty and anxiety during waiting are reduced. Moreover, the above download link can also be sent back from the server to the client through the WebSocket connection.

[0071] In one embodiment, the method provided by the embodiment of the present invention may further include: if an exception occurs during the processing of the data export request, an error message is generated, and the error message is fed back to the client.

[0072] It can be seen that during the entire export process, if an exception or export failure occurs, the server will capture the relevant exception information and send an error message through the WebSocket connection, that is, the WebSocket channel. After receiving the exception feedback, the user can choose to resubmit the request or contact the maintenance personnel for processing.

[0073] In one embodiment, the method provided by the embodiment of the present invention may further include:

[0074] If the number of currently unprocessed data export requests exceeds the processing capacity of the thread pool, the currently unprocessed data export requests will be saved in the message queue, and when a thread is idle, the data export requests will be taken out from the message queue for processing in the order in which the server receives the data export requests.

[0075] It can be seen that in addition to processing export tasks in real time, the server also has the ability to schedule tasks. When the amount of data is particularly large, the data export requests that cannot be processed in time will be placed in the message queue. When there are idle threads later, the data export requests in the message queue will be processed in the order in which they are received by the server. In this way, a large amount of system resources will not be occupied immediately for processing, and resource squeeze can be prevented during peak hours, ensuring the stability and high availability of the server.

[0076] Among them, Excel files can use a secure transmission protocol for data transmission and encrypt and store data in the MinIO object storage service system to prevent data from being maliciously tampered with or stolen during transmission and storage.

[0077] In actual scenarios, horizontal expansion or functional expansion can be performed according to actual needs. For example, new Excel export templates or export fields can be added according to business needs without large-scale modifications. In addition, the use of technologies such as distributed storage and message queues makes the various modules on the server loosely coupled, making the server easier to maintain and upgrade, and more adaptable to future business development.

[0078] Among them, the EasyExcel tool is a Java-based open source project for reading and writing Excel in a simple and memory-saving way. It greatly reduces the use of memory during processing, and there will be no memory overflow when processing very large Excel files. The model conversion is encapsulated in the upper layer, making it easier and more convenient to use. EasyExcel is a Java-based, fast, simple Excel processing tool that solves the memory overflow problem of large files.

[0079] Among them, the WebSocket protocol is a full-duplex communication protocol based on TCP, which allows two-way, real-time data transmission between the client and the server. It simplifies the data exchange between the client and the server and provides two-way communication capabilities. It is suitable for application scenarios that require real-time data updates.

[0080] Among them, MinIO object storage service system is a high-performance, scalable, cloud-native object storage system developed based on Go language. It aims to provide a simple and easy-to-use distributed storage solution suitable for storing large-capacity unstructured data, such as pictures, videos, log files, backup data, and container / virtual machine images.

[0081] In the embodiment of the present invention, multi-level security measures are taken to ensure the confidentiality and integrity of user data. First, after the user submits a data export request, the server will first authenticate the user, and only after the authentication is passed can the subsequent steps be executed. Secondly, the Excel file is saved in the object storage service system instead of being directly returned to the user. In addition, the download link carries the authentication information and the validity period, which further ensures that the authenticated user can access and download the Excel file within the validity period.

[0082] It is understandable that in addition to providing efficient and secure data export functions, the present invention also focuses on optimizing user experience. Through the real-time communication mechanism, users can clearly understand the progress of data export tasks, thereby reducing the anxiety of waiting; at the same time, by storing Excel files in the object storage service system and providing a secure download link, legitimate users can access and download Excel files anytime and anywhere within the validity period, which is convenient and fast. In addition, an exception and error handling mechanism is also provided to promptly feedback abnormal situations in the export process to users, helping users to deal with problems in a timely manner, and improving users' trust and satisfaction with the system.

[0083] Based on the above access, the embodiment of the present invention can provide users with a reliable, efficient and user-friendly large data volume Excel file export function, significantly improving the operability and performance of large-scale data processing, while ensuring that users can obtain real-time feedback and obtain export results on demand.

[0084] Based on the above analysis, the embodiments of the present invention have the following effects:

[0085] (1) Improve export efficiency: By using multi-threaded concurrent processing technology, the speed of data export is greatly improved, thereby reducing user waiting time. Each thread in parallel executes tasks independently, which can achieve better CPU resource utilization and speed up task execution.

[0086] (2) Reduce resource consumption: Using the EasyExcel tool for streaming processing reduces memory usage and avoids memory overflow errors when processing large amounts of data, thereby reducing the need for additional resources and enhancing the robustness of the system.

[0087] (3) Enhanced data security: Storing exported files in the object storage service system not only achieves persistent storage of data, but also isolates data access from the server operating environment, reduces the risk of data leakage, and ensures the security and reliability of data access.

[0088] (4) Improve user experience: Through WebSocket connection, users can obtain real-time progress feedback and timely error notifications of export tasks, which effectively improves the transparency and sense of participation of users during the use process and reduces users' doubts and retention during the operation.

[0089] In summary, the embodiments of the present invention utilize a combination of modern software technologies such as multi-threaded processing, EasyExcel tool export, MinIO storage, and WebSocket real-time notification, which can improve the efficiency, reliability, and user experience of exporting large amounts of data, ensure the rational use of resources, and provide high-performance, high-availability services in terms of data storage.

[0090] In a second aspect, an embodiment of the present invention provides a data export device, which is deployed on a server. Figure 2 , the device 100 comprises:

[0091] A request receiving module 110, configured to receive a data export request initiated by a client;

[0092] The thread processing module 120 is used to allocate a corresponding thread for each received data export request, and execute the data query operation corresponding to the data export request through the allocated thread; wherein each thread corresponding to each data export request adopts a concurrent execution strategy;

[0093] The file export module 130 is used to export the query data corresponding to each data export request into an Excel file;

[0094] The file storage module 140 is used to upload the Excel file to the object storage service system;

[0095] A link generation module 150, configured to generate a download link corresponding to the query data according to a storage location of the Excel file in the object storage service system;

[0096] The link sending module 160 is used to send the download link to the client, so that the user of the client can download the Excel file according to the download link.

[0097] In one embodiment, before allocating a corresponding thread for each received data export request, the thread processing module is further used to: establish a WebSocket connection with the client;

[0098] Correspondingly, the device further includes:

[0099] The progress feedback module is used to feed back the real-time progress information of processing the data export request to the client through the WebSocket connection, so that the client can visualize the real-time progress information.

[0100] In one embodiment, the file export module 130 is specifically used to: use the EasyExcel tool to stream the query data and export it as the Excel file; and / or the object storage service system is a MinIO object storage service system.

[0101] In one embodiment, the download link contains identity authentication information and a validity period, so that the client authenticates the user based on the identity authentication information, and allows the user to download the Excel file from the object storage service system based on the storage location in the download link within the validity period after the identity authentication is passed.

[0102] In one embodiment, before allocating a corresponding thread to each received data export request, the thread processing module 120 is also used to: authenticate the user; if the identity authentication is successful, execute the allocation of a corresponding thread to each received data export request; if the identity authentication is not successful, feedback an error message to the client.

[0103] In one embodiment, the apparatus further comprises:

[0104] The exception feedback module is used to: if an exception occurs during the processing of the data export request, generate error information and feed back the error information to the client.

[0105] In one embodiment, the apparatus further comprises:

[0106] The task scheduling module is used to save the currently unprocessed data export requests in the message queue if the number exceeds the processing capacity of the thread pool, and to take out the data export requests from the message queue for processing in the order in which the data export requests are received by the server when a thread is idle.

[0107] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0108] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.

[0109] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0110] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0111] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0112] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0113] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0114] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0115] In a fourth aspect, an embodiment of the present specification provides a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any embodiment of the specification.

[0116] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0117] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0118] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0119] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data export method, characterized in that: Executed by the server, the method includes: Receive data export requests initiated by clients; For each data export request received, a corresponding thread is allocated, and the data query operation corresponding to the data export request is executed through the allocated thread; wherein each thread corresponding to each data export request adopts a concurrent execution strategy; Export the query data corresponding to each data export request as an Excel file; Upload the Excel file to the object storage service system for storage; Generate a download link corresponding to the query data according to the storage location of the Excel file in the object storage service system; The download link is sent to the client, so that the user of the client can download the Excel file according to the download link.

2. The method according to claim 1, characterized in that Before allocating a corresponding thread for each received data export request, the method further includes: Establishing a WebSocket connection with the client; Correspondingly, the method further includes: feeding back real-time progress information of processing the data export request to the client via the WebSocket connection, so that the client can visualize the real-time progress information.

3. The method according to claim 1, characterized in that Exporting the query data corresponding to each data export request as an Excel file includes: using an EasyExcel tool to stream process the query data and exporting the data as the Excel file; And / or, the object storage service system is a MinIO object storage service system.

4. The method according to claim 1, characterized in that: The download link contains identity authentication information and a validity period, so that the client authenticates the user according to the identity authentication information, and allows the user to download the Excel file from the object storage service system according to the storage location in the download link within the validity period after the identity authentication is passed.

5. The method according to claim 1, characterized in that Before allocating a corresponding thread for each received data export request, the method further includes: Authenticate the user; If the identity authentication is passed, each data export request received is executed and a corresponding thread is allocated; if the identity authentication is not passed, an error message is fed back to the client.

6. The method according to claim 1, characterized in that Also includes: During the process of processing the data export request, if an exception occurs, an error message is generated and the error message is fed back to the client.

7. The method according to claim 1, characterized in that Also includes: If the number of currently unprocessed data export requests exceeds the processing capacity of the thread pool, the currently unprocessed data export requests will be saved in the message queue, and when a thread is idle, the data export requests will be taken out from the message queue for processing in the order in which the server receives the data export requests.

8. A data export device, characterized in that: Deployed on the server, the device includes: A request receiving module, used to receive a data export request initiated by a client; A thread processing module, for allocating a corresponding thread for each received data export request, and executing the data query operation corresponding to the data export request through the allocated thread; wherein each thread corresponding to each data export request adopts a concurrent execution strategy; The file export module is used to export the query data corresponding to each data export request into an Excel file; A file storage module, used to upload the Excel file to an object storage service system; A link generation module, used to generate a download link corresponding to the query data according to the storage location of the Excel file in the object storage service system; The link sending module is used to send the download link to the client, so that the user of the client can download the Excel file according to the download link.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data export system and working method thereof

    CN106776829A

  • Data exporting method and device, electronic equipment, storage medium and program product

    CN115495496A

  • Report exporting method and device

    CN115600567A