Data downloading method and device based on server push event, equipment and medium
By adopting a method based on server push events in large data downloads, the problems of low efficiency and poor user experience in the existing technology are solved, a more intuitive and smooth download experience is achieved, and the efficiency of users and the system is improved.
Patent Information
- Application Number
- CN202411102502.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-10-15
AI Technical Summary
The existing technology is inefficient when downloading large amounts of data, and the user experience is poor. Users have to wait for a long time and cannot accurately know the download completion time, which increases the operational burden and uncertainty and affects the efficiency of the business system.
Using the data download method based on server push events, the business front-end page receives user download instructions, generates download request information and sends it to the back-end server. The back-end server retrieves data from the business service and generates download links based on the preset configuration information, and pushes events through the server It is pushed to the front-end page in real time, and the user downloads the file according to the link.
It improves the user experience, provides a more intuitive and smooth download process, reduces user waiting time and operation restrictions, and improves the download success rate and system efficiency.
Smart Images

Figure CN118784642A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and medium for downloading data based on server push events. Background Art
[0002] In the prior art, the download process of business data is highly dependent on the interaction between the business front-end page and the back-end service. When a user requests a download, the business front-end page will initiate a request to the back-end service and wait for the service response. In order to optimize the download experience, some strategies are usually adopted, such as controlling the size or amount of downloaded data, or extending the timeout response time of the business front-end page download service interface through special settings. Another common practice is that the business back-end service generates a download link and interacts with the user through the front-end page to guide the user to a dedicated download page for file download.
[0003] However, for downloading large amounts of data, users have to face long waits, during which they cannot accurately know when the file download is complete, which increases the user's workload. Users may need to actively try to obtain download file links, or periodically check whether new download links are generated. This uncertainty reduces the user experience. Secondly, long waits may also cause response timeouts, making it impossible for users to successfully download the required files, further affecting the efficiency of the business system. In addition, during the download process, users are often unable to perform other operations. This limitation also greatly reduces the user experience. Therefore, the existing technology has problems of low efficiency and poor user experience when processing large data downloads. Summary of the invention
[0004] In order to solve the above-mentioned problems in the prior art, namely, low efficiency and poor user experience when processing large amounts of data download, the present application provides a data download method, device, equipment and medium based on server push events.
[0005] In a first aspect, the present application provides a data download method based on a server push event, which is applied to a business front-end page, comprising:
[0006] Receive download instructions from users;
[0007] Generate download request information according to the download instruction, and determine the server push event link corresponding to the download request information;
[0008] Sending the download request information and the server push event link to the backend server;
[0009] Receiving a target business data file download link sent by the backend server through a server push event;
[0010] According to the target business data file download link, the target business data file is downloaded, where the target business data file is used to indicate a file associated with the target business data file download link.
[0011] Optionally, downloading the target business data file according to the target business data file download link includes:
[0012] Generate a timely message prompting the user to download the target business data file according to the target business data file download link;
[0013] Receive a download key for the target business data file download link;
[0014] According to the download key of the target business data file download link, the target business data file associated with the target business data file download link is downloaded.
[0015] In a second aspect, the present application provides a data download method based on a server push event, which is applied to a background server and includes:
[0016] Get the download request information and server push event link sent by the business front-end page;
[0017] Determine the target business data to be retrieved from the business service according to the download request information and the preset configuration information, wherein the preset configuration information is part of the configuration information in the configuration information-business data association table;
[0018] Send a request to retrieve target business data to the business service;
[0019] Obtain the target business data sent by the business service, and generate a download link for the target business data file;
[0020] The target business data file download link is sent to the business front-end page through a server push event.
[0021] Optionally, the acquiring the target business data sent by the business service and generating a target business data file download link includes:
[0022] Obtaining target business data sent by the business service;
[0023] Encrypting the target service data to obtain encrypted target service data;
[0024] A target business data file is generated based on the encrypted target business data, thereby generating a download link for the target business data file.
[0025] Optionally, sending the target business data file download link to the business front-end page through a server push event includes:
[0026] In the process of sending the target business data file download link to the business front-end page through the server push event, obtaining the connection status of the server push event in real time;
[0027] If the connection status of the server push event is connected, completing the sending of the target business data file download connection;
[0028] If the connection status of the server push event is not connected, the target business data file download link is automatically resent to the business front-end page until the sending of the target business data file download link is completed.
[0029] Optionally, the determining, according to the download request information and preset configuration information, target business data retrieved from the business service includes:
[0030] Receive the configuration information-business data association table sent by the general download configuration management page;
[0031] Determining the business data corresponding to the preset configuration information according to the preset configuration information and the configuration information-business data association table;
[0032] According to the download request information and the business data corresponding to the preset configuration information, the target business data retrieved from the business service is determined.
[0033] In a third aspect, the present application provides a data download method based on a server push event, which is applied to a general download configuration management page, including:
[0034] Get the configuration information of all business terminals sent by the business administrator;
[0035] Associating all the configuration information of the business end with the business data with the configuration information identifier to obtain a configuration information-business data association table;
[0036] The configuration information-business data association table is sent to the backend server.
[0037] In a fourth aspect, the present application provides a data download device based on a server push event, which is applied to a business front-end page, including:
[0038] A receiving module, used for receiving a download instruction from a user;
[0039] A generating module, used for generating download request information according to the download instruction;
[0040] A determination module, used to determine the server push event link corresponding to the download request information;
[0041] A sending module, used for sending the download request information and the server push event link to a backend server;
[0042] The receiving module is used to receive a target business data file download link sent by the backend server through a server push event;
[0043] The processing module is used to download a target business data file according to a target business data file download link, where the target business data file is used to indicate a file associated with the target business data file download link.
[0044] Optionally, the generating module is further used to generate a timely message prompting the user to download the target business data file according to the download link of the target business data file;
[0045] The receiving module is further used to receive a download key of the target business data file download link;
[0046] The processing module is further configured to download the target business data file associated with the target business data file download link according to the download key of the target business data file download link.
[0047] In a fifth aspect, the present application provides a data downloading device based on a server push event, which is applied to a background server, including:
[0048] The acquisition module is used to obtain the download request information and server push event link sent by the business front-end page;
[0049] A determination module, used to determine target business data retrieved from a business service according to the download request information and preset configuration information, wherein the preset configuration information is part of the configuration information in a configuration information-business data association table;
[0050] The sending module is used to send a target business data retrieval request to the business service;
[0051] The acquisition module is used to acquire the target business data sent by the business service;
[0052] A generation module, used to generate a download link for a target business data file;
[0053] The sending module is also used to send the target business data file download link to the business front-end page through a server push event.
[0054] Optionally, the data downloading device based on server push events further includes: a processing module;
[0055] The acquisition module is further used to acquire the target business data sent by the business service;
[0056] The processing module is used to encrypt the target service data to obtain encrypted target service data;
[0057] The generating module is further used to generate a target business data file according to the encrypted target business data, thereby generating a download link for the target business data file.
[0058] Optionally, the acquisition module is further used to acquire the connection status of the server push event in real time during the process of sending the target business data file download link to the business front-end page through the server push event;
[0059] The sending module is further configured to complete the sending of the target business data file download connection if the connection status of the server push event is connected;
[0060] The sending module is further used to automatically resend the target business data file download link to the business front-end page if the connection status of the server push event is not connected, until the sending of the target business data file download link is completed.
[0061] Optionally, the data downloading device based on server push events further includes: a receiving module;
[0062] The receiving module is used to receive the configuration information-business data association table sent by the general download configuration management page;
[0063] The determination module is further used to determine the business data corresponding to the preset configuration information according to the preset configuration information and the configuration information-business data association table;
[0064] The determination module is further used to determine the target business data to be retrieved from the business service according to the download request information and the business data corresponding to the preset configuration information.
[0065] In a sixth aspect, the present application provides a data download device based on a server push event, which is applied to a general download configuration management page, including:
[0066] The acquisition module is used to obtain the configuration information of all business terminals sent by the business administrator;
[0067] A processing module, used to associate the configuration information of all business terminals with the business data with the configuration information identifier to obtain a configuration information-business data association table;
[0068] The sending module is used to send the configuration information-business data association table to the background server.
[0069] In a seventh aspect, the present application provides a data downloading device based on a server push event, comprising:
[0070] Memory;
[0071] processor;
[0072] Wherein, the memory stores computer-executable instructions;
[0073] The processor executes the computer-executable instructions stored in the memory to implement the data download method based on server push events as described in the first to third aspects and various possible implementations of the first to third aspects.
[0074] In an eighth aspect, the present application provides a computer storage medium having computer execution instructions stored thereon, wherein the computer execution instructions are executed by a processor to implement the data download method based on server push events as described in the above-mentioned first to third aspects and various possible implementation methods of the first to third aspects.
[0075] The present application provides a data download method based on server push events. First, a business front-end page receives a download instruction from a user, generates download request information, determines a server push event link corresponding to the download request information, and sends the download request information and the server push event link to a background server; then, the background server determines the target business data to be retrieved from the business service according to the download request information and preset configuration information, sends a target business data retrieval request to the business service, obtains the target business data sent by the business service, generates a target business data file download link, and sends the target business data file download link to the business front-end page through a server push event; finally, the business front-end page downloads the target business data file according to the target business data file download link, and the target business data file is used to indicate a file associated with the target business data file download link; this method provides users with a more intuitive and smooth download experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0077] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0078] Figure 1 An interactive diagram of the data download method based on server push events provided by this application;
[0079] Figure 2 This is a schematic diagram of the structure of the data download device based on server push events provided by this application Figure 1 ;
[0080] Figure 3 This is a schematic diagram of the structure of the data download device based on server push events provided by this application Figure 2 ;
[0081] Figure 4 This is a schematic diagram of the structure of the data download device based on server push events provided by this application Figure 3 ;
[0082] Figure 5 It is a structural diagram of a data download device based on server push events provided by this application. DETAILED DESCRIPTION
[0083] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0084] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0085] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0086] In the prior art, the download process of business data is closely dependent on the interaction between the front-end and the back-end. After the user triggers a download request, the front-end page sends a request to the back-end service and waits for a response. In order to improve the user experience, the download process is often optimized by limiting the amount of data, extending the timeout, or generating a download link to guide the user to a dedicated download page.
[0087] However, for large-scale data downloads, existing technologies face significant challenges: users need to wait for a long time and cannot know exactly when the download will be completed, which increases the operational burden and uncertainty and reduces the user experience; long waits can easily lead to response timeouts, affecting the success rate of file downloads and further dragging down the efficiency of business system operations; at the same time, user activities are restricted during the download process, further weakening the user experience. In summary, existing technologies are inefficient when processing large-scale data downloads and provide poor user experience.
[0088] Based on the above problems, the present application provides a data download method based on server push events, which sends configuration information-business data association table to the background server through the general download configuration management page, and the business front-end page receives the user's download instruction, generates a request and specifies the server push event link to send to the background server. The background server retrieves data from the business service according to the request and preset configuration information, generates a file download link after processing, and pushes it to the front-end page in real time with the help of the server push event. The user then downloads the file according to the link. The whole process is intuitive and smooth, which greatly improves the user experience.
[0089] In the following, the application scenarios of the solutions provided in this application are first illustrated.
[0090] Figure 1 This is an interactive diagram of the data download method based on server push events provided by this application. The execution entities of this embodiment include: business services, business front-end pages, back-end servers, and general download configuration management pages. Figure 1 As shown, the data download method based on server push events provided in this embodiment includes:
[0091] S101: The general download configuration management page obtains configuration information of all business terminals sent by the business administrator.
[0092] Among them, the general download configuration management page is a web interface designed to provide a centralized platform for managing, viewing and downloading business-side configuration information.
[0093] Configuration information is used to indicate the configuration information of the business end. The configuration information includes: business system identification, business module identification, business data request interface and download configuration field information.
[0094] It is understandable that the configuration information on the business side requires the business administrator to manually connect to the general download configuration management page. Therefore, when the general download configuration management page needs to obtain the configuration information of all business sides, it needs to wait for the intervention of the business administrator. The business administrator will log in to the general download configuration management page, manually select or enter the configuration information to be uploaded through the operation interface provided by the interface, and then trigger an upload or synchronization process. This process ensures that only authorized administrators can access and modify the configuration information, thereby enhancing the security of the system and the accuracy of the data. Since the configuration information on the business side requires the business administrator to manually connect and upload to the general download configuration management page, the general download configuration management page must rely on the active operation of the business administrator when obtaining this configuration information.
[0095] S102: The general download configuration management page associates the configuration information of all service terminals with the service data with the configuration information identifier to obtain a configuration information-service data association table.
[0096] The general download configuration management page integrates an efficient association mechanism to closely link the configuration information scattered on various business terminals with the business data with configuration information identifiers. This mechanism allows the general download configuration management page to automatically identify and capture business data with configuration information identifiers, and then accurately match and associate the business data with configuration information identifiers with the configuration information of the business terminal. In this way, the general download configuration management page can build a comprehensive configuration information-business data association table. The configuration information-business data association table not only clearly shows which business data each configuration information is associated with, but also ensures that the backend server can quickly and accurately retrieve and apply the required configuration information, thereby optimizing business processes and improving the overall flexibility and maintainability of the backend server.
[0097] S103: The business front-end page receives a download instruction from the user.
[0098] The user's download instruction is used to indicate an instruction to download service data.
[0099] As you can understand, the business front-end page allows users to initiate download instructions by designing intuitive download buttons and download options. When the user clicks the download button, the business front-end page triggers the event handler, verifies the user's selection, and sends the download instruction to the business service. At the same time, the business front-end page will update the status in real time, such as displaying a loading animation, to give users feedback that the operation is in progress.
[0100] S104: The business front-end page generates download request information according to the download instruction, and determines a server push event link corresponding to the download request information.
[0101] Among them, the Server Sent Events (SSE) link is a mechanism that allows business services to actively push information to the business front-end page, without the need for the business front-end page to constantly poll the business service. In this scenario, the Server Sent Events link can be used to provide real-time feedback to users on download progress, estimated completion time, or status information related to the download process.
[0102] After the user triggers the download command, the business front-end page will dynamically generate a download request message based on the user's operation (such as clicking the download button) and the context information of the business front-end page (such as file ID, user permissions, etc.). The download request message not only specifies the file to be downloaded, but may also include authentication information, request headers, and download request parameters. Next, the business front-end page will determine a server-sent event (i.e., server push event) link associated with this download request. Therefore, the business front-end page will ensure that while initiating the download request message, it is also prepared to receive the server push event push, so as to provide users with a smoother and more instant download experience.
[0103] S105: The service front-end page sends the download request information and the server push event link to the back-end server.
[0104] After the user triggers the download operation, the business front-end page will construct a download request information (such as the file ID requested for download, user authentication information, etc.), and at the same time determine a server push event link associated with it. This server push event link is used to receive the download progress of the business data later. Subsequently, the business front-end page will send this download request information and the server push event link as part of the request (either through the request header, query parameters, or fields in the request body) to the back-end server. The back-end server is responsible for processing the download request information, starting the file download process, and pushing download status updates such as progress percentage, remaining time, etc. to the business front-end page in real time through the server push event link, thereby providing users with a more intuitive and smooth download experience.
[0105] S106: The general download configuration management page sends the configuration information-business data association table to the backend server.
[0106] On the general download configuration management page, the business administrator sets configuration information according to business needs (for example, setting the file download URL, allowed download time period, and required user verification level), and manages and saves the configuration information together with the corresponding business data (for example, user ID, resource category ID).
[0107] Once the configuration information-business data association table is successfully created and saved, the general download configuration management page will automatically or according to the preset trigger conditions (such as scheduled tasks, user requests), send the configuration information-business data association table to the backend server through the internal interface or message queue in a safe and reliable manner. After receiving the configuration information-business data association table, the backend server will parse the configuration information and the business data associated with the configuration information to ensure that when the user initiates a download request, the correct business data download service can be provided. This process greatly improves the flexibility and manageability of the download service, providing users with a safer and more efficient download experience.
[0108] S107: The backend server determines the target business data to be retrieved from the business service according to the download request information and preset configuration information, wherein the preset configuration information is part of the configuration information in the configuration information-business data association table.
[0109] Among them, the preset configuration information can be set by the business user directly through the download instruction during the download process, or can be automatically parsed and generated by the business front-end page according to the download instruction and context information.
[0110] The target business data is used to indicate the business data that meets the needs of business users.
[0111] Optionally, the specific implementation of this step may be:
[0112] The backend server receives the configuration information-business data association table sent by the general download configuration management page;
[0113] The backend server determines the business data corresponding to the preset configuration information according to the preset configuration information and the configuration information-business data association table;
[0114] The backend server determines the target business data to be retrieved from the business service according to the download request information and the business data corresponding to the preset configuration information.
[0115] It is understandable that when the backend server receives a download request, it will determine and extract the corresponding business data based on the preset configuration information provided by the user and the configuration information-business data association table. The configuration information-business data association table is a mapping table that records the correspondence between different preset configuration information and business data. When the backend server receives the download instruction and parses the preset configuration information, it will query the configuration information-business data association table to find the business data that matches the preset configuration information.
[0116] The backend server will combine the download request information with the business data corresponding to the preset configuration information to further determine from which business service the target business data needs to be retrieved.
[0117] During this process, the backend server will perform logical judgment and data mapping operations to ensure that the data range, format and processing requirements to be retrieved can be accurately identified. For example, if the download request requires sales data within a certain time period, and the preset configuration information has specified the specific sales department and product line, the backend server will use this information to construct a query request for the business service, which will clearly specify the time range, department ID, and product line ID key parameters to be retrieved.
[0118] S108: The backend server sends a target business data retrieval request to the business service.
[0119] After parsing the download request and determining the required target business data, the backend server constructs a special target business data retrieval request, which contains a clear business service identifier and data query parameters, and then sends the target business data retrieval request to the corresponding business service.
[0120] S109 The business service sends the target business data to the backend server.
[0121] After the business service processes the target business data retrieval request from the backend server, the business service organizes the target business data according to the query results. The data may exist in a structured format (such as JSON, XML) or a binary stream. Subsequently, the business service sends the target business data back to the backend server as a response.
[0122] S110: The backend server generates a target business data file download link according to the target business data.
[0123] Optionally, the specific implementation of this step is:
[0124] The backend server obtains the target business data sent by the business service;
[0125] The backend server encrypts the target business data to obtain encrypted target business data;
[0126] The backend server generates a target business data file based on the encrypted target business data, thereby generating a download link for the target business data file.
[0127] After receiving the target business data sent by the business service, the backend server will use an encryption algorithm to encrypt the target business data in order to ensure the security of the target business data. In this process, the backend server will perform encryption operations on the target business data based on the encryption strategy (such as using encryption algorithms such as AES and RSA) and combined with the key management mechanism to obtain the encrypted target business data. Encryption processing ensures that data is not easily stolen or tampered with by unauthorized parties during transmission and storage, further improving data security.
[0128] After successfully encrypting the target business data, the backend server will further organize the encrypted target business data into the form of a file. This process may involve encapsulating the encrypted data in a specific format (such as a binary file, a ZIP compression package) and adding file header information or metadata. After the target business data file is generated, the backend server will store the target business data file in an accessible location. Next, the backend server will generate a unique target business data file download link for the target business data file. The target business data file download link usually contains the file's storage location information, access permission verification mechanism (such as a token, a timestamp), and encryption key information.
[0129] S111: The backend server sends a target business data file download link to the business front-end page via a server push event.
[0130] The backend server is a system that provides a wide range of file transfer functions. It pushes the download link of the target business data file to the business front-end page in real time through the server-sent event (i.e., server push event) technology, effectively enhancing the user experience. Using the server push event technology, the target business data file download link is pushed from the backend server to the business front-end page in real time and unidirectionally, without the business front-end page constantly sending requests to the backend server to query the status. This method not only reduces network traffic and latency, but also enables users to instantly obtain the target business data file download link and start the download process, greatly improving the response speed and efficiency of the backend server. In short, the backend server implemented by the server push event technology can efficiently and real-time push the business data file download link to the business front-end page, optimize the file transfer process, and improve the user experience.
[0131] Optionally, the specific implementation of this step is:
[0132] When the backend server sends the target business data file download link to the business front-end page through a server push event, the backend server obtains the connection status of the server push event in real time;
[0133] If the connection status of the server push event is connected, the background server completes sending the target business data file download connection;
[0134] If the connection status of the server push event is not connected, the background server automatically resends the target business data file download link to the business front-end page until the sending of the target business data file download link is completed.
[0135] In the process of sending the target business data file download link to the business front-end page through the server push event, the system backend server will obtain the current status of the server push event connection in real time. If the server push event connection status is detected as connected, it means that the communication channel between the business front-end page and the backend server is active. At this time, the backend server will immediately complete the sending of the target business data file download link to ensure that the user can successfully receive and start the download process. However, if the connection status of the server push event is displayed as unconnected, the backend server will automatically trigger the retry mechanism and resend the target business data file download link to the business front-end page. This process will be repeated until the server push event connection is successfully established and the target business data file download link is sent, thereby ensuring that even in the case of network fluctuations or short disconnections, users can eventually obtain the required download link.
[0136] S112: The business front-end page downloads the target business data file according to the target business data file download link.
[0137] The target business data file is used to indicate a file associated with the target business data file download link.
[0138] After receiving the download link of the target business data file, the business front-end page will immediately start the download process. This process involves identifying and parsing the information in the download link of the target business data file, such as the file location, name and verification parameters. Subsequently, the business front-end page is responsible for receiving the target business data file associated with the download link of the target business data file and saving it as a local file.
[0139] Optionally, the specific implementation of this step is:
[0140] The business front-end page generates a timely message prompting the user to download the target business data file according to the download link of the target business data file;
[0141] The business front-end page receives the download key of the target business data file download link;
[0142] The service front-end page downloads the target service data file associated with the target service data file download link according to the download key of the target service data file download link.
[0143] After obtaining the download link of the target business data file, the business front-end page will immediately generate a timely message to prompt the user that there is a target business data file available for download. At the same time, the business front-end page will also receive the download key corresponding to the download link of the target business data file. The download key is key information to ensure the security of the download process. After the user confirms the download, the business front-end page will use the download key and the download link of the target business data file to initiate a verified download request to the back-end server. After receiving the verified download request and verifying the validity of the download key, the back-end server will allow the download request to pass and send the associated target business data file to the business front-end page through a secure channel. The business front-end page will then save the target business data file as a local file, thus completing the entire download process. This process not only improves the user experience, but also enhances the security of data downloads.
[0144] The data download method, device, equipment and storage medium based on server push events provided in this embodiment are as follows: first, the general download configuration management page obtains the configuration information of all business terminals sent by the business administrator, associates the configuration information of all business terminals with the business data with the configuration information identifier, obtains the configuration information-business data association table, and sends the configuration information-business data association table to the background server; then, the business front-end page receives the user's download instruction, generates download request information, and determines the server push event link corresponding to the download request information, and sends the download request information and the server push event link to the background server; secondly, the background server receives the download request information according to the download request information. and preset configuration information, determine the target business data to be retrieved from the business service, the preset configuration information is part of the configuration information in the configuration information-business data association table, and send a target business data retrieval request to the business service, obtain the target business data sent by the business service, generate a target business data file download link, and send the target business data file download link to the business front-end page through a server push event; finally, the business front-end page downloads the target business data file according to the target business data file download link, and the target business data file is used to indicate a file associated with the target business data file download link; this method provides users with a more intuitive and smooth download experience.
[0145] Figure 2 This is a schematic diagram of the structure of the data download device based on server push events provided by this application Figure 1 For example, the execution subject of this application can be a business front-end page, such as Figure 2As shown, the present application provides a data downloading device based on a server push event, and the data downloading device 200 based on a server push event includes:
[0146] Receiving module 201, used for receiving a download instruction from a user;
[0147] A generating module 202, configured to generate download request information according to the download instruction;
[0148] Determination module 203, used to determine the server push event link corresponding to the download request information;
[0149] The sending module 204 is used to send the download request information and the server push event link to the backend server;
[0150] The receiving module 201 is used to receive a target business data file download link sent by the backend server via a server push event;
[0151] The processing module 205 is used to download a target business data file according to a target business data file download link, where the target business data file is used to indicate a file associated with the target business data file download link.
[0152] Optionally, the generating module 202 is further configured to generate a timely message prompting the user to download the target service data file according to the target service data file download link;
[0153] The receiving module 201 is further used to receive a download key of the target business data file download link;
[0154] The processing module 205 is further configured to download the target business data file associated with the target business data file download link according to the download key of the target business data file download link.
[0155] Figure 3 This is a schematic diagram of the structure of the data download device based on server push events provided by this application Figure 2 For example, the execution subject of this application may be a backend server. Figure 3 As shown, the present application provides a data downloading device based on a server push event, and the data downloading device 300 based on a server push event includes:
[0156] The acquisition module 301 is used to acquire the download request information and the server push event link sent by the business front-end page;
[0157] A determination module 302, configured to determine target business data retrieved from a business service according to the download request information and preset configuration information, wherein the preset configuration information is part of the configuration information in a configuration information-business data association table;
[0158] The sending module 303 is used to send a target business data retrieval request to the business service;
[0159] The acquisition module 301 is used to acquire the target business data sent by the business service;
[0160] A generating module 304, used to generate a download link for a target business data file;
[0161] The sending module 303 is further used to send the target business data file download link to the business front-end page through a server push event.
[0162] Optionally, the data downloading device based on server push events further includes: a processing module 305;
[0163] The acquisition module 301 is further used to acquire the target business data sent by the business service;
[0164] The processing module 305 is used to encrypt the target service data to obtain encrypted target service data;
[0165] The generating module 304 is further used to generate a target business data file according to the encrypted target business data, thereby generating a download link for the target business data file.
[0166] Optionally, the acquisition module 301 is further used to acquire the connection status of the server push event in real time during the process of sending the target business data file download link to the business front-end page through the server push event;
[0167] The sending module 303 is further configured to complete the sending of the target business data file download connection if the connection status of the server push event is connected;
[0168] The sending module 303 is further configured to automatically resend the target business data file download link to the business front-end page if the connection status of the server push event is not connected, until the sending of the target business data file download link is completed.
[0169] Optionally, the data downloading device based on server push events further includes: a receiving module 306;
[0170] The receiving module 306 is used to receive the configuration information-business data association table sent by the general download configuration management page;
[0171] The determination module 302 is further configured to determine the business data corresponding to the preset configuration information according to the preset configuration information and the configuration information-business data association table;
[0172] The determination module 302 is further configured to determine target business data to be retrieved from the business service according to the download request information and the business data corresponding to the preset configuration information.
[0173] Figure 4 This is a schematic diagram of the structure of the data download device based on server push events provided by this application Figure 3 For example, the execution subject of this application can be a general download configuration management page. Figure 4 As shown, the present application provides a data downloading device based on a server push event, and the data downloading device 400 based on a server push event includes:
[0174] The acquisition module 401 is used to acquire the configuration information of all service terminals sent by the service administrator;
[0175] Processing module 402, used to associate configuration information of all service terminals with service data with configuration information identifiers to obtain a configuration information-service data association table;
[0176] The sending module 403 is used to send the configuration information-business data association table to the background server.
[0177] Figure 5 This is a schematic diagram of the structure of the data download device based on server push events provided by this application. Figure 5 As shown, the present application provides a data downloading device based on server push events. The data downloading device 500 based on server push events includes: a receiver 501 , a transmitter 502 , a processor 503 and a memory 504 .
[0178] Receiver 501, used for receiving instructions and data;
[0179] A transmitter 502, used for sending instructions and data;
[0180] Memory 504, used to store computer-executable instructions;
[0181] The processor 503 is used to execute the computer-executable instructions stored in the memory 504 to implement the various steps performed by the data download method based on server push events in the above embodiment. For details, please refer to the relevant description in the above embodiment of the data download method based on server push events.
[0182] Optionally, the memory 504 may be independent or integrated with the processor 503 .
[0183] When the memory 504 is independently provided, the electronic device further includes a bus for connecting the memory 504 and the processor 503 .
[0184] The present application also provides a computer storage medium, in which computer-readable storage medium is stored computer execution instructions. When a processor executes the computer execution instructions, a data download method based on server push events as executed by the above-mentioned data download device based on server push events is implemented.
[0185] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data download method based on server push events, characterized in that: Applied to the business front-end page, the method includes: Receive download instructions from users; Generate download request information according to the download instruction, and determine the server push event link corresponding to the download request information; Sending the download request information and the server push event link to the backend server; Receiving a target business data file download link sent by the backend server through a server push event; According to the target business data file download link, the target business data file is downloaded, where the target business data file is used to indicate a file associated with the target business data file download link.
2. The data download method based on server push events according to claim 1, characterized in that: The downloading of the target business data file according to the target business data file download link comprises: Generate a timely message prompting the user to download the target business data file according to the target business data file download link; Receive a download key for the target business data file download link; According to the download key of the target business data file download link, the target business data file associated with the target business data file download link is downloaded.
3. A data download method based on server push events, characterized in that: Applied to a backend server, the method comprises: Get the download request information and server push event link sent by the business front-end page; Determine the target business data to be retrieved from the business service according to the download request information and the preset configuration information, wherein the preset configuration information is part of the configuration information in the configuration information-business data association table; Send a request to retrieve target business data to the business service; The target business data sent by the business service is obtained, and a target business data file download link is generated; and the target business data file download link is sent to the business front-end page through a server push event.
4. The data download method based on server push events according to claim 3, characterized in that: The step of obtaining the target business data sent by the business service and generating a download link for the target business data file includes: Obtaining target business data sent by the business service; Encrypting the target service data to obtain encrypted target service data; A target business data file is generated based on the encrypted target business data, thereby generating a download link for the target business data file.
5. The data download method based on server push events according to claim 3, characterized in that: The step of sending the target business data file download link to the business front-end page through a server push event includes: In the process of sending the target business data file download link to the business front-end page through the server push event, obtaining the connection status of the server push event in real time; If the connection status of the server push event is connected, completing the sending of the target business data file download connection; If the connection status of the server push event is not connected, the target business data file download link is automatically resent to the business front-end page until the sending of the target business data file download link is completed.
6. The data download method based on server push events according to claim 3, characterized in that: The step of determining the target business data to be retrieved from the business service according to the download request information and the preset configuration information includes: Receive the configuration information-business data association table sent by the general download configuration management page; Determining the business data corresponding to the preset configuration information according to the preset configuration information and the configuration information-business data association table; According to the download request information and the business data corresponding to the preset configuration information, the target business data retrieved from the business service is determined.
7. A data download method based on server push events, characterized in that: Applied to the general download configuration management page, the method includes: Get the configuration information of all business terminals sent by the business administrator; Associating all the configuration information of the business end with the business data with the configuration information identifier to obtain a configuration information-business data association table; The configuration information-business data association table is sent to the backend server.
8. A data downloading device based on server push events, characterized in that: include: A receiving module, used for receiving a download instruction from a user; A generating module, used for generating download request information according to the download instruction; A determination module, used to determine the server push event link corresponding to the download request information; A sending module, used for sending the download request information and the server push event link to a backend server; The receiving module is further used to receive a target business data file download link sent by the backend server through a server push event; The processing module is used to download a target business data file according to a target business data file download link, where the target business data file is used to indicate a file associated with the target business data file download link.
9. A data download device based on server push events, characterized in that: include: Memory; processor; Wherein, the memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the data download method based on server push events as described in claim 1 or 2, any one of claims 3 to 6, and claim 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer execution instructions, which, when executed by a processor, are used to implement the data download method based on server push events as described in claim 1 or 2, any one of claims 3 to 6, and claim 7.
