File downloading method, device, equipment, storage medium and program product

By introducing a file sub-server in the backend server and using nginx to build a communication channel, the problem of high memory consumption caused by downloading large files was solved, achieving the effect of reducing memory usage and improving system stability.

CN118972382BActive Publication Date: 2025-12-26CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411158624.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2025-12-26
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

In the housing provident fund management system, as the user base expands, the backend server experiences high memory usage when processing large file download requests, leading to problems such as memory overflow and application crashes.

Method used

Set up a file sub-server in the backend server to handle large file download requests, reducing the burden on application objects. Utilize nginx to build a simple file server and establish a communication channel between the Java application and the file sub-server.

Benefits of technology

It reduces the memory usage of application objects, avoids memory overflow and application crashes, improves system stability and reliability, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972382B_ABST
    Figure CN118972382B_ABST
Patent Text Reader

Abstract

The application discloses a file downloading method and device, equipment, storage medium and program product, and relates to the technical field of data processing. The method comprises the following steps: a mobile terminal sends a downloading request to an application object in a back-end server, the downloading request is used for requesting to download a target file, and the target file is stored in a file sub-server; the application object sends the downloading request to the file sub-server through a communication channel; the file sub-server sends the target file to the mobile terminal in response to the downloading request; and the mobile terminal receives the target file sent by the file sub-server. According to the embodiment of the application, part of the processing request of the application object during file downloading can be shared, so that the memory usage of the application object is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of data processing, and particularly relates to a file downloading method and device, equipment, a storage medium and a program product. BACKGROUND

[0002] In order to improve the operation efficiency of housing accumulation fund management, by using digital technology to optimize the housing accumulation fund management operation system, accurate and efficient business auditing and rapid and safe fund settlement are realized, and the Construction and Supervision Front-end Application is initiated by the Housing Accumulation Fund Supervision Department of the Ministry of Housing and Urban-Rural Development. The Construction and Supervision Front-end Application has functions of instant messaging, data report, operation and maintenance work order and message push, however, with the expansion of the scale of the supervision mobile terminal users, the number of installed Construction and Supervision Front-end Applications also increases, and when users use the instant messaging and operation and maintenance work order functions of the Construction and Supervision Front-end Application, if a large file (such as a file exceeding 30M) is sent, the application in the backend server needs to process a large number of request concurrent file download, which causes the application memory usage rate to be high, and even causes memory overflow, application downtime and the like. SUMMARY

[0003] The embodiments of the application provide a file downloading method, device, equipment, storage medium and program product, which can share part of the processing request of an application object during file downloading, so as to reduce the memory usage rate of the application object.

[0004] In a first aspect, the embodiments of the application provide a file downloading method applied to a backend server, the backend server comprising an application object and a file sub-server, a communication channel being connected between the application object and the file sub-server, and the method comprising:

[0005] The application object receives a download request sent by a mobile terminal, the download request being used to request to download a target file, and the target file being stored in the file sub-server;

[0006] The application object sends the download request to the file sub-server through the communication channel;

[0007] The file sub-server sends the target file to the mobile terminal in response to the download request, so that the mobile terminal receives the target file.

[0008] In a second aspect, the embodiments of the application provide a file downloading method applied to a mobile terminal, and the method comprising:

[0009] sending a download request to an application object in a backend server, the backend server comprising the application object and a file sub-server, a communication channel being connected between the application object and the file sub-server, the download request being used to request downloading a target file, the target file being stored in the file sub-server, so that the application object sends the download request to the file sub-server through the communication channel; the file sub-server sends the target file to the mobile terminal in response to the download request.

[0010] receiving the target file sent by the file sub-server.

[0011] In a third aspect, an embodiment of the present application provides a file downloading apparatus, applied to a backend server, the backend server comprising an application object and a file sub-server, a communication channel being connected between the application object and the file sub-server, the apparatus comprising:

[0012] the application object, configured to receive a download request sent by a mobile terminal, the download request being used to request downloading a target file, the target file being stored in the file sub-server;

[0013] the application object, further configured to send the download request to the file sub-server through the communication channel;

[0014] the file sub-server, configured to send the target file to the mobile terminal in response to the download request, so that the mobile terminal receives the target file.

[0015] In a fourth aspect, an embodiment of the present application provides a file downloading apparatus, applied to a mobile terminal, the apparatus comprising:

[0016] a first sending module, configured to send a download request to an application object in a backend server, the backend server comprising the application object and a file sub-server, a communication channel being connected between the application object and the file sub-server, the download request being used to request downloading a target file, the target file being stored in the file sub-server, so that the application object sends the download request to the file sub-server through the communication channel; the file sub-server sends the target file to the mobile terminal in response to the download request.

[0017] a first receiving module, configured to receive the target file sent by the file sub-server.

[0018] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing computer program instructions; the processor implements the file downloading method in any one of the above aspects when executing the computer program instructions.

[0019] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores computer program instructions. The computer program instructions are executed by a processor to implement the file downloading method according to any one of the preceding aspects.

[0020] In a seventh aspect, an embodiment of the present application provides a computer program product, and instructions in the computer program product are executed by a processor of an electronic device to cause the electronic device to perform the file downloading method according to any one of the preceding aspects.

[0021] The file downloading method, device, apparatus, storage medium and program product provided in the embodiments of the present application can be used to send a downloading request to an application object in a mobile terminal, and then the application object sends the downloading request to a file sub-server in a back-end server through a communication channel. In this way, the file sub-server can send a target file to the mobile terminal in response to the downloading request. Thus, in the embodiments of the present application, the file sub-server is arranged in the back-end server, and the file sub-server is used to send a file to the mobile terminal, so that the application object can share part of the processing request in the file downloading, thereby reducing the memory usage of the application object. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced. For those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0023] Figure 1 FIG. 1 is a flowchart of a file downloading system provided by an embodiment of the present application;

[0024] Figure 2 FIG. 2 is a flowchart of a file downloading method provided by an embodiment of the present application;

[0025] Figure 3 FIG. 3 is a flowchart of an application scenario provided by an embodiment of the present application;

[0026] Figure 4 FIG. 4 is a structural diagram of a file downloading device provided by an embodiment of the present application;

[0027] Figure 5 FIG. 5 is a structural diagram of another file downloading device provided by an embodiment of the present application;

[0028] Figure 6 FIG. 6 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0029] The features and exemplary embodiments of the various aspects of the present application will be described in detail below with reference to the drawings. For the purpose of clarity, the description is divided into the following sections: technical scheme, advantages, and specific embodiments. It should be understood that the specific embodiments described herein are merely intended to explain the present application, and are not intended to limit the present application. The present application can be implemented without some of the specific details described below. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.

[0030] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between such entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.

[0031] In order to improve the operation efficiency of housing accumulation fund management, the housing accumulation fund management operation system is optimized by using digital technology, the accurate and efficient business audit and the rapid and safe fund settlement are realized, and the front-end application of supervision is initiated by the Housing and Construction Department. The front-end application of supervision has functions such as instant messaging, data report, operation and maintenance work order and message push. However, with the expansion of the scale of the supervision mobile terminal users, the number of installed supervision front-end applications also increases. When users use the instant messaging and operation and maintenance work order functions of the front-end application of supervision, if a large file (such as a file exceeding 30M) is sent, the application in the back-end server needs to process a large number of request concurrent file downloads, which causes the application memory usage rate to be high, and even causes memory overflow, application downtime and other situations.

[0032] In the technical scheme of the present application, the acquisition, storage, use, processing and other aspects of data comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, some industry existing schemes of software, components, models and the like may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical scheme of the present application, but it does not mean that the applicant has or will necessarily use the scheme.

[0033] To solve the problems in the prior art, the embodiments of the present application provide a file downloading method, device, equipment, storage medium and program product. First, the file downloading system provided by the embodiments of the present application is introduced.

[0034] Figure 1 An architecture diagram of a file downloading system to which the embodiments of the present application are applicable is shown. As shown in the figure, the file downloading system 100 can include a mobile terminal 101 and a backend server 102. Figure 1

[0035] The mobile terminal 101 can be a front-end device used by a user to achieve accurate and efficient business auditing and fund settlement, such as a personal computer, a mobile phone, a tablet and the like. The mobile terminal can include a construction supervision front-end application, which has functions of instant messaging, data report, operation and maintenance work order and message pushing, and can send a download request for downloading a large file to the backend server.

[0036] The backend server 102 can be a backend device used to achieve accurate and efficient business auditing and fund settlement, such as a cloud server. The backend server can process a download request generated when the instant messaging and operation and maintenance work order functions of the construction supervision front-end application in the mobile terminal are processed, and send a download file to the mobile terminal.

[0037] The backend server 102 can specifically include an application object 1021 and a file sub-server 1022, and the application object 1021 and the file sub-server 1022 are connected through a communication channel. The application object, i.e. a software application program, is a kind of program in a computer system, which is designed to help users perform specific tasks or meet specific needs. In the embodiments of the present application, the application object can refer to a software application program written in Java language. The file sub-server is a simple file server built in the backend server by using the nginx application, and a communication channel is built between the Java application and the file sub-server, so that the application object and the file sub-server can use the communication channel for file downloading. In the embodiments of the present application, since the nginx application is convenient and fast to build, occupies few resources, and is suitable for building a simple file server with low cost, the operation cost can be reduced.

[0038] The mobile terminal 101 and the backend server 102 are connected in communication. Specifically, Ethernet or wireless network connection mode can be used for communication. Of course, the communication mode is not limited to this, but can also be other network connection communication modes, which are not limited here.

[0039] The file downloading method provided by the embodiments of the present application is introduced as follows.

[0040] Figure 2 ​A flowchart of a file downloading method provided by an embodiment of the present application is shown. Optionally, the method of the embodiment of the present application can be applied to the mobile terminal and the backend server shown above. Figure 1 As shown in FIG. 2, a file downloading method 200 can include the following steps S201-S205. Figure 2 As shown in FIG. 2, a file downloading method 200 can include the following steps S201-S205.

[0041] S201, the mobile terminal sends a download request to an application object in the backend server, the download request being used to request downloading a target file, the target file being stored in a file sub-server,

[0042] S202, the application object receives the download request sent by the mobile terminal.

[0043] S203, the application object sends the download request to the file sub-server through a communication channel.

[0044] S204, the file sub-server sends the target file to the mobile terminal in response to the download request.

[0045] S205, the mobile terminal receives the target file sent by the file sub-server.

[0046] The file downloading method of the embodiment of the present application can be used to send a download request to an application object in a backend server by a mobile terminal, and then the application object sends the download request to a file sub-server in the backend server through a communication channel. In this way, the file sub-server can send a target file to the mobile terminal in response to the download request. Thus, in the embodiment of the present application, a file sub-server is arranged in the backend server, and the file sub-server is used to send files to the mobile terminal, so that part of the processing request of the application object during file downloading can be shared, thereby reducing the memory usage of the application object.

[0047] In S201, the download request can be used to request downloading a target file. The target file is stored in the file sub-server. For example, the target file is a file whose size exceeds 30 megabytes in the file sub-server.

[0048] The mobile terminal sends the download request to the application object in the backend server, for example, the mobile terminal can send the download request to the application object in the backend server through wireless communication.

[0049] In S202, the application object receives the download request sent by the mobile terminal, for example, the application object can receive the download request sent by the mobile terminal through wireless communication.

[0050] In S203, the communication channel, for example, can be a file downloading channel constructed between the application object and the file sub-server by using nginx application.

[0051] In S204, the sending of the target file to the mobile terminal can be exemplarily direct sending of the target file to the mobile terminal, or sending of the target file to the mobile terminal at a preset download speed.

[0052] In S205, the mobile terminal receives the target file sent by the file sub-server, which can be exemplarily direct receiving of the target file sent by the file sub-server, or receiving of the target file sent by the file sub-server at a preset download speed.

[0053] As an implementation manner of the present application, to ensure that the target file is downloadable, before S201, the method can further include:

[0054] The mobile terminal receives a target operation of clicking to download the target file in a display operation interface of the mobile terminal by a user;

[0055] The mobile terminal sends a query request to the application object in response to the target operation, the query request being used to query whether the target file is downloadable;

[0056] The application object queries queue state information of a download queue in the application object in response to the query request, the queue state information being used to indicate whether the download queue is full;

[0057] The application object generates a download flag according to the queue state information, the download flag being used to represent whether the target file is downloadable;

[0058] The application object sends the download flag to the mobile terminal;

[0059] S201 can specifically include:

[0060] The mobile terminal sends a download request to the application object in the backend server in a case where the download flag represents that the target file is downloadable.

[0061] The target operation can be an operation of clicking to download the target file in a display operation interface of the mobile terminal by a user.

[0062] The query request can be used to query whether the target file is downloadable.

[0063] The queue state information can be used to indicate whether the download queue is full.

[0064] The download flag can be used to represent whether the target file is downloadable. For example, the download flag includes a first flag and a second flag, wherein the first flag is used to represent that the target file is downloadable, and the second flag is used to represent that the target file is not downloadable.

[0065] The generating of the download flag according to the queue state information can specifically include: in a case where the queue state information indicates that the download queue is not full, adding the download request to the download queue and generating a first flag, the first flag being used to represent that the target file is downloadable; in a case where the queue state information indicates that the download queue is full, not adding the download request to the download queue and generating a second flag, the second flag being used to represent that the target file is not downloadable; and the download flag including the first flag and the second flag.

[0066] In some embodiments, the mobile terminal polls for a new download flag in a case where the download flag represents that the target file is not downloadable, until the new download flag represents that the target file is downloadable.

[0067] In the embodiments of the present application, the mobile terminal queries the queue state information of the download queue in the application object by sending a query request to the application object, and sends the download flag representing whether the target file is downloadable to the mobile terminal, so that the mobile terminal sends a download request to the application object in the backend server only in a case where the download flag represents that the target file is downloadable, thereby ensuring that the target file is downloadable.

[0068] As another implementation method of the present application, in order to enhance the reliability of the download flag, the query request can include user authentication information, and before the application object sends the download flag to the mobile terminal, the method can further include:

[0069] The application object responds to the query request, authenticates the user authentication information, and generates an authentication result, the authentication result being used to indicate whether the user authentication information is authenticated.

[0070] The application object sends the download flag to the mobile terminal, specifically including:

[0071] The application object sends the download flag to the mobile terminal in a case where the authentication result indicates that the user authentication information is authenticated.

[0072] The user authentication information can be data and credentials for verifying the identity of a user, for example, a username, a password, biometric information, etc.

[0073] The authentication of the user authentication information and the generation of the authentication result can be, for example, comparing and authenticating a username and a password input by the user with a password stored in a database to generate the authentication result.

[0074] The authentication result can be used to indicate whether the user authentication information is authenticated.

[0075] In the embodiments of the present application, the user authentication information is authenticated to generate an authentication result, and the application object sends the download flag to the mobile terminal only when the authentication result indicates that the user authentication information is authenticated, so as to enhance the reliability of the download flag.

[0076] In some embodiments, the application object sends the download flag to the mobile terminal when the authentication result indicates that the user authentication information is authenticated, and specifically can include:

[0077] The application object generates a first download token when the authentication result indicates that the user authentication information is authenticated.

[0078] The application object sends the first download token and the download flag to the mobile terminal.

[0079] The S202 can specifically include:

[0080] The application object receives a download request sent by the mobile terminal, and the download request includes a second download token.

[0081] The application object verifies the second download token according to the first download token to generate a verification result, and the verification result is used to indicate whether the second download token is consistent with the first download token.

[0082] The S203 can specifically include:

[0083] The application object sends the download request to the file sub-server through the communication channel when the verification result indicates that the second download token is consistent with the first download token.

[0084] The first download token can be an authorization credential with a validity period, which allows the user to access a specific system or service within a certain time.

[0085] The download request can include the second download token, and theoretically, the second download token is consistent with the first download token.

[0086] The verification result can be used to indicate whether the second download token is consistent with the first download token.

[0087] In the embodiments of the present application, the application object verifies whether the second download token in the download request is consistent with the first download token generated when the authentication result indicates that the user authentication information is authenticated, so as to enhance the security and reliability of the file download.

[0088] In some embodiments, the S204 can specifically include:

[0089] The file sub-server sends the target file to the mobile terminal according to a preset download speed in response to the download request.

[0090] The S205 can specifically include:

[0091] The mobile terminal receives the target file sent by the file sub-server at a preset download speed.

[0092] The preset download speed may, for example, be a parameter value configured by the nginx application to limit the user download speed.

[0093] In the embodiments of the present application, the target file is sent to the mobile terminal at a preset download speed to limit the user download speed, which can effectively reduce the bandwidth proportion occupied during downloading, thereby further reducing the memory usage of the application object and improving the availability of non-download services.

[0094] To facilitate the understanding of the file download method in the embodiments of the present application, the actual application process of the file download method is described as follows:

[0095] In the present application, a simple file server (i.e. the above-mentioned file sub-server) can be constructed by using the nginx application, and a file download channel (i.e. the above-mentioned communication channel) can be constructed between the Java application (i.e. the above-mentioned application object) and the file server, to solve the problem of high memory occupation of the java virtual machine when downloading large files (i.e. the above-mentioned target file) concurrently. At the same time, since the nginx application is easy and fast to build and occupies less resources, it is suitable for building a simple file server with low cost.

[0096] As shown in Figure 3 The embodiments of the present application can include the following steps:

[0097] 1. The user clicks the download button on the front-end (i.e. the above-mentioned mobile terminal) interface to request to send the user authentication information to the gateway (equivalent to the above-mentioned application object), and query whether the current request can download the file (equivalent to the above-mentioned query request).

[0098] 2. After the gateway authenticates the user identity, a temporary download token (i.e. the above-mentioned first download token) is generated. It is judged whether the download queue is full. If not, the request is added to the download queue, and a downloadable flag and a download token are returned. If it is full, it is not added to the download queue, and a non-downloadable flag and a download token are returned.

[0099] 3. The front end judges according to the return of the downloadable flag. If it is downloadable, the download request is sent to the gateway with the download token.

[0100] 4. The gateway checks and verifies the validity of the download token. If valid, it will request the nginx file server (equivalent to the file sub-server mentioned above) through the established channel to download the file (equivalent to the target file mentioned above).

[0101] 5. The nginx file server will provide a speed-limited download service based on the configured download speed and return the file to the front end.

[0102] 6. If the gateway verifies that the download token is invalid, it returns an invalid error message to the front end. The front end does not prompt the user and will re-initiate the download request, returning to step 1.

[0103] 7. The front-end determines whether the download is possible based on the returned download flag. If the download is not possible, the front-end will put the download task in the background and periodically poll step 1.

[0104] In this embodiment, by configuring nginx rate limiting and speed control strategies, user download speeds are restricted, Java application memory usage is reduced, and system reliability is improved. Simultaneously, since nginx consumes few resources, operating costs are lowered. Rate limiting and speed control can effectively reduce the proportion of bandwidth used during downloads, improving the availability of non-download services.

[0105] Based on the file download method provided in the above embodiments, this application also provides specific implementations of a file download device. Please refer to the following embodiments.

[0106] like Figure 4 As shown in the embodiment of this application, a file download device 400 is provided and applied to a backend server. The backend server includes an application object 401 and a file sub-server 402, and a communication channel connects the application object and the file sub-server. The device 400 may include:

[0107] Application object 401 is used to receive download requests sent by mobile terminals. The download request is used to request the download of a target file, which is stored in the file sub-server.

[0108] Application object 401 is also used to send download requests to the file sub-server via a communication channel;

[0109] File subserver 402 is used to send the target file to the mobile terminal in response to a download request, so that the mobile terminal can receive the target file.

[0110] The file downloading apparatus of the embodiment of the present application, the mobile terminal can send a downloading request to the application object in the back-end server, and then the application object sends the downloading request to the file sub-server in the back-end server through the communication channel; in this way, the file sub-server can send the target file to the mobile terminal in response to the downloading request. In this way, in the embodiment of the present application, the file sub-server is arranged in the back-end server, and the file sub-server is used to send the file to the mobile terminal, so that part of the processing request of the application object in the file downloading can be shared, thereby reducing the memory usage of the application object.

[0111] As an implementation manner of the present application, in order to ensure that the target file is downloadable,

[0112] The application object 401 is further configured to receive a query request sent by the mobile terminal in response to a target operation, the query request being used to query whether the target file is downloadable, and the target operation being an operation of clicking the target file for downloading in a display operation interface of the mobile terminal.

[0113] The application object 401 is further configured to query queue state information of a downloading queue in the application object in response to the query request, the queue state information being used to indicate whether the downloading queue is full.

[0114] The application object 401 is further configured to generate a downloading flag according to the queue state information, the downloading flag being used to represent whether the target file is downloadable.

[0115] The application object 401 is further configured to send the downloading flag to the mobile terminal, so that the mobile terminal sends a downloading request to the application object when the downloading flag represents that the target file is downloadable.

[0116] As another implementation method of the present application, in order to protect the security of the downloading flag, the query request can include user authentication information,

[0117] The application object 401 is further configured to authenticate the user authentication information in response to the query request, and generate an authentication result, the authentication result being used to indicate whether the user authentication information is authenticated.

[0118] The application object 401 is specifically configured to send the downloading flag to the mobile terminal when the authentication result indicates that the user authentication information is authenticated.

[0119] In some embodiments, the application object 401 is specifically configured to generate a first downloading token when the authentication result indicates that the user authentication information is authenticated; and send the first downloading token and the downloading flag to the mobile terminal.

[0120] The application object 401 is specifically configured for receiving a download request sent by the mobile terminal, the download request comprising a second download token; verifying the second download token according to the first download token, and generating a verification result, the verification result being used to indicate whether the second download token is consistent with the first download token;

[0121] The application object 401 is specifically configured for sending the download request to the file sub-server through the communication channel in a case where the verification result indicates that the second download token is consistent with the first download token.

[0122] In some embodiments, the file sub-server 402 is specifically configured for sending the target file to the mobile terminal according to a preset download speed in response to the download request, so that the mobile terminal receives the target file at the download speed.

[0123] As shown in FIG. 5, Figure 5 Another file downloading device 500 provided by the embodiment of the present application is applied to a mobile terminal, and the device 500 can comprise the following modules: a first sending module 501 and a first receiving module 502.

[0124] The first sending module 501 is used for sending a download request to an application object in a back-end server, the back-end server comprising the application object and a file sub-server, a communication channel being connected between the application object and the file sub-server, the download request being used to request to download a target file, the target file being stored in the file sub-server, so that the application object sends the download request to the file sub-server through the communication channel; and the file sub-server sends the target file to the mobile terminal in response to the download request.

[0125] The first receiving module 502 is used for receiving the target file sent by the file sub-server.

[0126] The file downloading device of the embodiment of the present application can send a download request to an application object in a back-end server by a mobile terminal, and then the application object sends the download request to a file sub-server in the back-end server through a communication channel; in this way, the file sub-server can send a target file to the mobile terminal in response to the download request. In this way, in the embodiment of the present application, the file sub-server is arranged in the back-end server, and the file sub-server is used to send a file to the mobile terminal, so that part of the processing request of the application object in the file downloading can be shared, thereby reducing the memory usage of the application object.

[0127] As an implementation manner of the present application, in order to ensure that the target file is downloadable, the device 500 can further comprise:

[0128] A second receiving module is used for receiving a target operation of clicking to download the target file by a user in a display operation interface of the mobile terminal.

[0129] The second sending module is configured to send a query request to the application object in response to the target operation, the query request being used to query whether the target file is downloadable, so that the application object queries queue state information of a download queue in the application object in response to the query request, the queue state information being used to indicate whether the download queue is full; the application object generates a download flag according to the queue state information, the download flag being used to indicate whether the target file is downloadable; and the application object sends the download flag to the mobile terminal.

[0130] The third receiving module is configured to receive the download flag sent by the application object.

[0131] The first sending module 501 is specifically configured to send a download request to the application object in the back-end server when the download flag indicates that the target file is downloadable.

[0132] In some embodiments, the first receiving module 502 is specifically configured to receive the target file sent by the file sub-server at a preset download speed.

[0133] Figure 6 A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application is shown.

[0134] The electronic device can include a processor 601 and a memory 602 having computer program instructions stored therein.

[0135] Specifically, the processor 601 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement one or more embodiments of the present application.

[0136] The memory 602 can include a mass storage for data or instructions. By way of example and not limitation, the memory 602 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 602 can include removable or non-removable (or fixed) media. Where appropriate, the memory 602 can be internal or external to the integrated gateway disaster recovery device. In some embodiments, the memory 602 is a non-volatile solid-state memory.

[0137] In particular embodiments, the memory 602 can include read-only memory (ROM), random-access memory (RAM), magnetic disk storage mediums, optical storage mediums, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Accordingly, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software that, when executed (by one or more processors), is operable to perform the operations described with reference to the methods according to an aspect of the present disclosure.

[0138] The processor 601 implements any one of the file download methods in the above embodiments by reading and executing computer program instructions stored in the memory 602.

[0139] In one example, the electronic device can further include a communication interface 603 and a bus 610. Wherein, as shown, the processor 601, the memory 602, the communication interface 603 are connected through the bus 610 and complete the communication between each other. Figure 6

[0140] The communication interface 603 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.

[0141] The bus 610 includes hardware, software or both to couple components of the electronic device to each other. By way of example, and not limitation, the bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or combination of two or more of these. Where appropriate, the bus 610 can include one or more buses. Although the present application describes and illustrates a particular bus, the present application contemplates any suitable bus or interconnect.

[0142] The electronic device can perform the file download method in the embodiments of the present application, thereby realizing the file download method and device described in combination with Figure 2 , Figure 4 and Figure 5 described in the embodiments of the present application.

[0143] ​In addition, in combination with the file downloading method in the above embodiments, an embodiment of the present application can provide a computer readable storage medium for implementation. The computer readable storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement any of the file downloading methods in the above embodiments.

[0144] In combination with the file downloading method in the above embodiments, an embodiment of the present application can provide a computer program product, instructions in the computer program product are executed by a processor of an electronic device to make the electronic device execute the file downloading method in any of the above embodiments.

[0145] It should be noted that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order of the steps, after understanding the spirit of the present application.

[0146] The functional blocks shown in the structural block diagrams described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are program or code segments used to perform the required tasks. The program or code segments can be stored in a machine readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine readable medium" can include any medium capable of storing or transmitting information. Examples of the machine readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via a computer network such as the Internet, an intranet, etc.

[0147] It should also be noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be executed simultaneously.

[0148] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0149] The above only is a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described herein. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements shall be covered within the protection scope of the present application.

Claims

1. A file download method characterized by, The method is applied to a backend server, the backend server comprises an application object and a file sub-server, a communication channel is connected between the application object and the file sub-server, and the method comprises the following steps: The application object receives a download request sent by a mobile terminal, the download request is used to request to download a target file, and the target file is stored in the file sub-server; The application object sends the download request to the file sub-server through the communication channel; The file sub-server sends the target file to the mobile terminal in response to the download request, so that the mobile terminal receives the target file.

2. The method of claim 1, wherein, Before the application object receives the download request sent by the mobile terminal, the method further comprises the following steps: The application object receives a query request sent by the mobile terminal in response to a target operation, the query request is used to query whether a target file can be downloaded, and the target operation is an operation of clicking to download the target file in a display operation interface of the mobile terminal; The application object queries queue state information of a download queue in the application object in response to the query request, and the queue state information is used to indicate whether the download queue is full; The application object generates a download flag according to the queue state information, and the download flag is used to represent whether the target file can be downloaded; The application object sends the download flag to the mobile terminal, so that the mobile terminal sends the download request to the application object when the download flag represents that the target file can be downloaded.

3. The method of claim 2, wherein, The query request comprises user authentication information, Before the application object sends the download flag to the mobile terminal, the method further comprises the following steps: The application object authenticates the user authentication information in response to the query request, generates an authentication result, and the authentication result is used to indicate whether the user authentication information is authenticated; The application object sends the download flag to the mobile terminal, comprising: The application object sends the download flag to the mobile terminal when the authentication result indicates that the user authentication information is authenticated.

4. The method of claim 3, wherein, The application object sends the download flag to the mobile terminal when the authentication result indicates that the user authentication information is authenticated, comprising: The application object generates a first download token when the authentication result indicates that the user authentication information is authenticated; The application object sends the first download token and the download flag to the mobile terminal; The application object receives the download request sent by the mobile terminal, comprising: The application object receives the download request sent by the mobile terminal, and the download request comprises a second download token; The application object verifies the second download token according to the first download token, generates a verification result, and the verification result is used to indicate whether the second download token is consistent with the first download token; The application object sends the download request to the file sub-server through the communication channel, comprising: The application object sends the download request to the file sub-server through the communication channel when the verification result indicates that the second download token is consistent with the first download token.

5. The method of claim 1, wherein, The file sub-server sends the target file to the mobile terminal in response to the download request, including: The file sub-server sends the target file to the mobile terminal at a preset download speed in response to the download request, so that the mobile terminal receives the target file at the download speed.

6. A file download method characterized by, The method applied to a mobile terminal, including: sending a download request to an application object in a backend server, the backend server including the application object and a file sub-server, a communication channel being connected between the application object and the file sub-server, the download request being used to request to download a target file, the target file being stored in the file sub-server, so that the application object sends the download request to the file sub-server through the communication channel; the file sub-server sends the target file to the mobile terminal in response to the download request; receiving the target file sent by the file sub-server.

7. The method of claim 6, wherein, Before the method sends the download request to the application object in the backend server, the method further includes: receiving a target operation of clicking to download a target file by a user in a display operation interface of the mobile terminal; sending a query request to the application object in response to the target operation, the query request being used to query whether the target file is downloadable, so that the application object queries queue state information of a download queue in the application object in response to the query request, the queue state information being used to indicate whether the download queue is full; the application object generates a download flag according to the queue state information, the download flag being used to represent whether the target file is downloadable; and the application object sends the download flag to the mobile terminal; receiving the download flag sent by the application object; The method of sending the download request to the application object in the backend server includes: sending the download request to the application object in the backend server when the download flag represents that the target file is downloadable.

8. The method of claim 6, wherein, The method of receiving the target file sent by the file sub-server includes: receiving the target file sent by the file sub-server at a preset download speed.

9. A file download apparatus characterized by comprising: The apparatus applied to a backend server, the backend server including an application object and a file sub-server, a communication channel being connected between the application object and the file sub-server, the apparatus including: the application object, configured to receive a download request sent by a mobile terminal, the download request being used to request to download a target file, the target file being stored in the file sub-server; the application object, further configured to send the download request to the file sub-server through the communication channel; the file sub-server, configured to send the target file to the mobile terminal in response to the download request, so that the mobile terminal receives the target file.

10. A file download apparatus characterized by comprising: The apparatus applied to a mobile terminal, including: The first sending module is configured to send a download request to an application object in a backend server, the backend server comprising the application object and a file sub-server, a communication channel being connected between the application object and the file sub-server, the download request being configured to request to download a target file, the target file being stored in the file sub-server, so that the application object sends the download request to the file sub-server through the communication channel; and the file sub-server sends the target file to the mobile terminal in response to the download request. The first receiving module is configured to receive the target file sent by the file sub-server.

11. An electronic device, comprising: The device comprises a processor and a memory storing computer program instructions; and the processor executes the computer program instructions to implement the file downloading method according to any one of claims 1-8.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the file downloading method according to any one of claims 1-8.

13. A computer program product, characterised in that, The instructions in the computer program product are executed by a processor of an electronic device, so that the electronic device executes the file downloading method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Information processing system, method and device

    CN108632209A

  • File downloading method, device and equipment and storage medium

    CN111835856A