CN114157655A - Task downloading method, system, computer equipment and readable storage medium - Google Patents

Task downloading method, system, computer equipment and readable storage medium Download PDF

Info

Publication number
CN114157655A
CN114157655A CN202111423770.3A CN202111423770A CN114157655A CN 114157655 A CN114157655 A CN 114157655A CN 202111423770 A CN202111423770 A CN 202111423770A CN 114157655 A CN114157655 A CN 114157655A
Authority
CN
China
Prior art keywords
task
downloaded
downloading
state
file stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111423770.3A
Other languages
Chinese (zh)
Inventor
孙梦瑶
莫金友
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Anheng Information Security Technology Co Ltd
Original Assignee
Hangzhou Anheng Information Security Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Anheng Information Security Technology Co Ltd filed Critical Hangzhou Anheng Information Security Technology Co Ltd
Priority to CN202111423770.3A priority Critical patent/CN114157655A/en
Publication of CN114157655A publication Critical patent/CN114157655A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to a task downloading method, a system, a computer device and a readable storage medium, wherein the task downloading method comprises the following steps: responding to a task to be downloaded to initiate a task downloading request so as to receive the expected consumption time of the corresponding file stream generated by the background database; comparing the expected consumption time with a response time threshold, and when the expected consumption time is greater than the response time threshold, exporting the task to be downloaded to a task bar, wherein a task list is configured in the task bar; determining the task state of a task to be downloaded in a task list; and when the task state is the completed state, downloading the corresponding task to be downloaded. By the method and the device, the problem that the task being downloaded can be interrupted due to the fact that the page routing is switched or the page is refreshed when the response time of the background database for generating the file stream and returning is too long is solved, the user can switch the page routing at will while the downloading task is carried out, the task cannot be interrupted, and the experience of the user is improved.

Description

Task downloading method, system, computer equipment and readable storage medium
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a task downloading method, system, computer device, and readable storage medium.
Background
With the development of computer technology, people have stepped into the network era, and the rapid development of internet technology has penetrated every corner of people's life. The internet is a vast provider of information and service resources that provides a variety of simple and fast means of communication and information retrieval.
Among many applications on the internet, downloading is a common application. Downloading is a network activity that transfers files over a network, saving information on the internet or other electronic computers to a local terminal.
In the task downloading process, a foreground webpage is generally required to initiate an http request for a task to be downloaded, then a background database generates a corresponding file stream, the file stream is returned through an http interface after the generation is finished, the foreground takes the file stream and then processes the file stream to complete task downloading, however, in some scenes, the time for the background to generate the file stream is longer, the time for the http interface to wait for response data is also longer, when the downloading task is still in progress, a user needs to switch a page route to do other operations, and going to a new page can cancel the http request of the task being downloaded, so that the downloading task is interrupted, and the user experience is influenced.
Disclosure of Invention
The embodiment of the application provides a task downloading method, a task downloading system, computer equipment and a readable storage medium, which are used for at least solving the problem that in the process of downloading tasks in the related art, when the response time of generating a file stream and returning by a background database is too long, the page routing is switched or the page is refreshed, so that the task being downloaded is interrupted.
In a first aspect, an embodiment of the present application provides a task downloading method, which is applied to a foreground, and includes:
responding to a task to be downloaded to initiate a task downloading request so as to receive the expected consumption time of the corresponding file stream generated by the background database;
comparing the received predicted consumption time with a preset response time threshold, and when the predicted consumption time is greater than the response time threshold, exporting the task to be downloaded to a task bar, wherein a task list is configured in the task bar;
determining the task state of the task to be downloaded in the task list according to the situation of the file stream generation; and when the task state is the finished state, downloading the corresponding task to be downloaded.
In some embodiments, the step of exporting the task to be downloaded to the taskbar specifically includes:
triggering risk export operation and sending a risk export request to the background database so as to enable the background database to make corresponding preparation for generating the file stream;
and receiving a response success value returned by the background database based on an HTTP interface, and displaying the task to be downloaded in the task list.
In some embodiments, the foreground is provided with a foreground page, the task bar is displayed below the foreground page in an icon manner, the task list includes task names, start times and task states of the tasks to be downloaded, and the task states further include an un-started state, a generating failure state and a downloaded state.
In some embodiments, after downloading the corresponding task to be downloaded, the method further includes:
and when the task to be downloaded is downloaded, initiating a state modification request to the background database so as to inform the background database that the task state related to modification is downloaded.
In some embodiments, the step of downloading the task to be downloaded specifically includes:
acquiring a file stream generated by the background database;
and processing the acquired file stream through the blob to complete the downloading of the related task to be downloaded.
In some embodiments, the step of determining the task state of the task to be downloaded in the task list according to the file stream generation condition specifically includes:
and polling the task list based on a time interval to acquire the latest condition generated by the file stream of the task to be downloaded so as to update the task state of the task to be downloaded in real time.
In a second aspect, an embodiment of the present application provides a task downloading system, including a foreground, further including:
the receiving module is used for responding to a task to be downloaded and initiating a task downloading request so as to receive the expected consumption time of the corresponding file stream generated by the background database;
a derivation module; the task downloading device is used for comparing the received predicted consumption time with a preset response time threshold value, and when the predicted consumption time is larger than the response time threshold value, the task to be downloaded is exported to a task bar, wherein a task list is configured in the task bar;
the downloading module is used for determining the task state of the task to be downloaded in the task list according to the situation of the file stream generation; and when the task state is the finished state, downloading the corresponding task to be downloaded.
In some embodiments, the foreground is provided with a foreground page, the task bar is displayed below the foreground page in an icon manner, the task list includes task names, start times and task states of the tasks to be downloaded, and the task states further include an un-started state, a generating failure state and a downloaded state.
In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the task downloading method according to the first aspect is implemented.
In a fourth aspect, the present application provides a readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the task downloading method as described in the first aspect.
Compared with the prior art, the task downloading method provided by the embodiment of the application has the advantages that the task bar is placed in the foreground page, the task list is configured in the task bar, the task list is updated to show the task to be downloaded with the expected consumption time of the corresponding file stream generated by the background database being greater than the response time threshold, the task state of the task to be downloaded is determined according to the file stream generation condition, and corresponding operation is performed according to different task states, so that the problem that the task being downloaded is interrupted due to switching of page routing or refreshing of the page when the response time of the file stream generated and returned by the background database is too long in the process of downloading the task is solved, the user can switch the page routing at will while the downloading task is performed, the task cannot be interrupted after the page is refreshed, and the user operation platform is not affected, the experience of the user is improved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of a task download method according to a first embodiment of the present application;
FIG. 2 is a block diagram of a task download system according to a second embodiment of the present application;
fig. 3 is a hardware configuration diagram of a computer device according to a third embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
The invention provides a task downloading method. Applied to the foreground, fig. 1 is a flowchart of a task downloading method according to an embodiment of the present application, and as shown in fig. 1, the flowchart includes the following steps:
step S101, responding to a task to be downloaded to initiate a task downloading request so as to receive the expected consumption time of a background database for generating a corresponding file stream;
in the downloading process based on the web application, firstly, the foreground initiates a task downloading request for a task to be downloaded, then the background database provides the http interface for responding, and usually, the background database judges the expected consumption time for generating the corresponding file stream according to the network environment, the file size of the task to be downloaded and the like, and returns the expected consumption time for generating the file stream to the background database through the http interface.
Step S102, comparing the received estimated consumption time with a preset response time threshold, and when the estimated consumption time is greater than the response time threshold, exporting the task to be downloaded to a task bar, wherein a task list is configured in the task bar;
in this embodiment, a response time threshold is preset, and by comparing the expected consumption time of the background database for generating the file stream with the response time threshold, it is determined whether the response time of the http interface is longer in the downloading task, and usually most of the time for downloading and exporting the file does not exceed 10 seconds, it should be noted that, in this embodiment, the response time threshold is set to 60 seconds, and if the response time exceeds 60 seconds, the response time is longer, so as to export the relevant task to be downloaded to the task bar, it can be understood that, in this embodiment, when the expected consumption time is less than or equal to the response time threshold, the background database generates the file stream and returns the generated file stream to the foreground through the http interface, and processes the file stream through blob, and finishing the task downloading.
Step S103, determining the task state of the task to be downloaded in the task list according to the file stream generation condition; and when the task state is the finished state, downloading the corresponding task to be downloaded.
After the task to be downloaded whose expected consumption time is greater than the response time threshold is exported to the taskbar, the task list configured in the taskbar still needs to be updated to show the task to be downloaded exported to the taskbar in the task list, it can be understood that a user determines whether to download the task to be downloaded by observing the task state of the task to be downloaded in the task list, where the task state of the task to be downloaded is determined according to the state of generating a corresponding file stream by the background database, and it needs to be noted that, in this embodiment, the task state of the task to be downloaded in the task list is updated in real time in a polling manner.
In this embodiment, a task list is placed in the foreground page, the task list is configured in the task list, the task list is updated to show the task to be downloaded whose expected consumption time of the corresponding file stream generated by the background database is greater than the response time threshold, meanwhile, the task state of the task to be downloaded is determined according to the file stream generation condition, and corresponding operations are performed according to different task states, when the task state of the task to be downloaded is completed, the task to be downloaded is downloaded, so as to solve the problem that the task being downloaded is interrupted because the page route is switched or the page is refreshed when the response time returned by the background database generating the file stream is too long in the task downloading process, and realize that the user can switch the page route at will while the downloading task is performed, and after the page is refreshed, the task cannot be interrupted, the user operation platform is not influenced, and the experience of the user is improved.
In some embodiments, the step of exporting the task to be downloaded to the taskbar specifically includes:
triggering risk export operation and sending a risk export request to the background database so as to enable the background database to make corresponding preparation for generating the file stream;
and receiving a response success value returned by the background database based on an HTTP interface, and displaying the task to be downloaded in the task list.
Wherein, exporting the task to be downloaded to the task bar, actually operating, for example, clicking a "risk export" button, initiating a risk export request for the relevant task to be downloaded, responding through the http interface, and returning in a data format { "error _ code": 200, "message": and the success indicates that the interface response is successful, and simultaneously represents that the background database receives a task export instruction and starts a task, wherein the task is to prepare to generate a corresponding file stream for the task to be downloaded, update the task list, and display the task to be downloaded which is just exported to the task bar in the task list.
In some embodiments, the foreground is provided with a foreground page, the task bar is displayed below the foreground page in an icon manner, the task list includes task names, start times and task states of the tasks to be downloaded, and the task states further include an un-started state, a generating failure state and a downloaded state.
The taskbar is displayed on the foreground page in an icon mode, the taskbar can be dragged at will, it needs to be noted that the taskbar is a global taskbar, that is, a dom element of the taskbar is placed in an outermost component of a project (the actual project structure is as follows: app. vue project entry file- > layout. vue global page layout- > vue-router project route), the taskbar is placed in the layout component, so that jumping to any page taskbar always exists, shared taskbar data can be managed and updated through vuex state management, a taskbar icon is clicked to expand a taskbar list, and the taskbar list can also be dragged to prevent the page dom element from being blocked.
It should be noted that the task whose task state is not started may support cancellation of the downloading operation, the task whose task state is being generated indicates that the background database is generating the file stream corresponding to the task, and the task whose task state is failed to be generated may retry, that is, resume the generating operation.
In some of these embodiments, the response time threshold is 60 seconds.
In some embodiments, after downloading the corresponding task to be downloaded, the method further includes:
and when the task to be downloaded is downloaded, initiating a state modification request to the background database so as to inform the background database that the task state related to modification is downloaded.
It can be understood that the task state is that a completed task to be downloaded does not complete a download operation, the task state is that the task is completed and only represents that the background database has generated a corresponding file stream, when the foreground acquires the file stream and performs corresponding processing, the task completes the download operation, at this time, the foreground initiates a state modification request to the background database to notify the background database to change the relevant task state to be downloaded, it should be noted that although the task whose task state is downloaded is not displayed in the taskbar, the background database has this state.
In some embodiments, the step of downloading the task to be downloaded specifically includes:
acquiring a file stream generated by the background database;
after the background database generates the corresponding file stream, the background database modifies the task state of the corresponding task to be downloaded in the task list to be completed, and returns the file stream to the foreground through the HTTP interface, so that the foreground acquires the file stream.
And processing the acquired file stream through the blob to complete the downloading of the related task to be downloaded.
In some embodiments, all the tasks to be downloaded in the task list are started, generated to complete according to the ordering rule one by one.
The sorting rule includes a plurality of sorting modes, for example, the sorting may be performed according to the order in which the tasks to be downloaded are exported to the task bar, or the sorting may be performed according to the expected time consumption of the file stream generated by the background database.
In some embodiments, the task list and the user information are bound, and the user information is used for logging in the foreground, it can be understood that each user information corresponds to one foreground account, the export task triggered by each user can only be seen in the taskbar of the currently logged-in account, and other users can only see the task queue in the taskbar corresponding to their own account.
In some embodiments, the step of determining the task state of the task to be downloaded in the task list according to the file stream generation condition specifically includes:
and polling the task list based on a time interval to acquire the latest condition generated by the file stream of the task to be downloaded so as to update the task state of the task to be downloaded in real time.
The polling is to send an HTTP request to the background database by the foreground according to a specific time interval, then the background database returns the latest condition of the file stream generated by the task to be downloaded to the foreground based on the HTTP interface, and updates the task state of the task to be downloaded in the task list in real time.
A second embodiment of the present application further provides a task downloading system, which is used to implement the first embodiment and the preferred embodiment, and the description of the system that has been already described is omitted. As used hereinafter, the terms "module," "unit," "subunit," and the like may implement a combination of software and/or hardware for a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
A second embodiment of the present application provides a task downloading system, which includes a foreground, fig. 2 is a block diagram of a structure of the task downloading system according to the second embodiment of the present application, and as shown in fig. 2, the system further includes:
the receiving module 10 is configured to initiate a task downloading request in response to a task to be downloaded, so as to receive expected consumption time of a background database for generating a corresponding file stream;
the export module 20 is configured to compare the received expected consumption time with a preset response time threshold, and export the task to be downloaded to a task bar when the expected consumption time is greater than the response time threshold, where the task bar is configured with a task list;
wherein the response time threshold is 60 seconds.
The downloading module 30 is configured to determine a task state of a task to be downloaded in the task list according to the situation of generating the file stream; and when the task state is the finished state, downloading the corresponding task to be downloaded.
In this embodiment, a task list is placed in the foreground page, the task list is configured in the task list, the task list is updated to show the task to be downloaded whose expected consumption time of the corresponding file stream generated by the background database is greater than the response time threshold, meanwhile, the task state of the task to be downloaded is determined according to the file stream generation condition, and corresponding operations are performed according to different task states, when the task state of the task to be downloaded is completed, the task to be downloaded is downloaded, so as to solve the problem that the task being downloaded is interrupted because the page route is switched or the page is refreshed when the response time returned by the background database generating the file stream is too long in the task downloading process, and realize that the user can switch the page route at will while the downloading task is performed, and after the page is refreshed, the task cannot be interrupted, the user operation platform is not influenced, and the experience of the user is improved.
In some embodiments, after the downloading module 30, the system further includes:
and the modification module is used for initiating a modification state request to the background database when the task to be downloaded is completely downloaded so as to inform the background database that the task state related to modification is downloaded.
In some embodiments, all the tasks to be downloaded in the task list are started, generated to complete according to the ordering rule one by one.
In some embodiments, the foreground is provided with a foreground page, the task bar is displayed below the foreground page in an icon manner, the task list includes task names, start times and task states of the tasks to be downloaded, and the task states further include an un-started state, a generating failure state and a downloaded state.
In some of these embodiments, the derivation module 20 includes:
the request unit is used for triggering risk export operation and sending a risk export request to the background database so as to enable the background database to make corresponding preparation for generating the file stream;
and the receiving unit is used for receiving a response success value returned by the background database based on the HTTP interface and displaying the task to be downloaded in the task list.
In some of these embodiments, the download module 30 includes:
the acquisition unit is used for acquiring the file stream generated by the background database;
and the processing unit is used for processing the acquired file stream through the blob so as to complete the downloading of the related task to be downloaded.
In some embodiments, the downloading module 30 specifically includes:
and the polling unit is used for polling the task list based on a time interval to acquire the latest condition generated by the file stream of the task to be downloaded so as to update the task state of the task to be downloaded in real time.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
In addition, the task downloading method described in the embodiment of the present application with reference to fig. 1 may be implemented by a computer device. Fig. 3 is a hardware configuration diagram of a computer device according to a third embodiment of the present application.
The computer device may comprise a processor 31 and a memory 32 in which computer program instructions are stored.
Specifically, the processor 31 may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of the embodiments of the present Application.
Memory 32 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 32 may include a Hard Disk Drive (Hard Disk Drive, abbreviated to HDD), a floppy Disk Drive, a Solid State Drive (SSD), flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 32 may include removable or non-removable (or fixed) media, where appropriate. The memory 32 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 32 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, Memory 32 includes Read-Only Memory (ROM) and Random Access Memory (RAM). The ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), Electrically rewritable ROM (EAROM), or FLASH Memory (FLASH), or a combination of two or more of these, where appropriate. The RAM may be a Static Random-Access Memory (SRAM) or a Dynamic Random-Access Memory (DRAM), where the DRAM may be a Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), an Extended data output Dynamic Random-Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), and the like.
Memory 32 may be used to store or cache various data files for processing and/or communication use, as well as possibly computer program instructions for execution by processor 32.
The processor 31 may implement any one of the task downloading methods in the above embodiments by reading and executing computer program instructions stored in the memory 32.
In some of these embodiments, the computer device may also include a communication interface 33 and a bus 30. As shown in fig. 3, the processor 31, the memory 32, and the communication interface 33 are connected via the bus 30 to complete mutual communication.
The communication interface 33 is used for implementing communication between modules, devices, units and/or equipment in the embodiment of the present application. The communication interface 33 may also enable communication with other components such as: the data communication is carried out among external equipment, image/data acquisition equipment, a database, external storage, an image/data processing workstation and the like.
Bus 30 comprises hardware, software, or both coupling the components of the computer device to each other. Bus 30 includes, but is not limited to, at least one of the following: data Bus (Data Bus), Address Bus (Address Bus), Control Bus (Control Bus), Expansion Bus (Expansion Bus), and Local Bus (Local Bus). By way of example, and not limitation, Bus 30 may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (Front Side Bus), an FSB (FSB), a Hyper Transport (HT) Interconnect, an ISA (ISA) Bus, an InfiniBand (InfiniBand) Interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a microchannel Architecture (MCA) Bus, a PCI (Peripheral Component Interconnect) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a Video Electronics Bus (audio Association) Bus, abbreviated VLB) bus or other suitable bus or a combination of two or more of these. Bus 30 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The computer device may execute the task downloading method in the embodiment of the present application based on the acquired computer program, thereby implementing the task downloading method described in conjunction with fig. 1.
In addition, in combination with the task downloading method in the foregoing embodiments, embodiments of the present application may provide a readable storage medium to implement. The readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the task downloading methods in the above embodiments.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A task downloading method is applied to a foreground and is characterized by comprising the following steps:
responding to a task to be downloaded to initiate a task downloading request so as to receive the expected consumption time of the corresponding file stream generated by the background database;
comparing the received predicted consumption time with a preset response time threshold, and when the predicted consumption time is greater than the response time threshold, exporting the task to be downloaded to a task bar, wherein a task list is configured in the task bar;
determining the task state of the task to be downloaded in the task list according to the situation of the file stream generation; and when the task state is the finished state, downloading the corresponding task to be downloaded.
2. The task downloading method according to claim 1, wherein the step of exporting the task to be downloaded to a taskbar specifically comprises:
triggering risk export operation and sending a risk export request to the background database so as to enable the background database to make corresponding preparation for generating the file stream;
and receiving a response success value returned by the background database based on an HTTP interface, and displaying the task to be downloaded in the task list.
3. The task downloading method according to claim 1, wherein a foreground page is provided on the foreground, the task bar is displayed below the foreground page in an icon manner, the task list includes task names, start times, and task states of the tasks to be downloaded, and the task states further include an un-started state, a generating failure state, and a downloaded state.
4. The task downloading method according to claim 1, wherein after downloading the corresponding task to be downloaded, the method further comprises:
and when the task to be downloaded is downloaded, initiating a state modification request to the background database so as to inform the background database that the task state related to modification is downloaded.
5. The task downloading method according to claim 1, wherein the step of downloading the task to be downloaded specifically comprises:
acquiring a file stream generated by the background database;
and processing the acquired file stream through the blob to complete the downloading of the related task to be downloaded.
6. The task downloading method according to claim 1, wherein the step of determining the task state of the task to be downloaded in the task list according to the situation of file stream generation specifically comprises:
and polling the task list based on a time interval to acquire the latest condition generated by the file stream of the task to be downloaded so as to update the task state of the task to be downloaded in real time.
7. A task downloading system comprises a foreground and is characterized by further comprising:
the receiving module is used for responding to a task to be downloaded and initiating a task downloading request so as to receive the expected consumption time of the corresponding file stream generated by the background database;
a derivation module; the task downloading device is used for comparing the received predicted consumption time with a preset response time threshold value, and when the predicted consumption time is larger than the response time threshold value, the task to be downloaded is exported to a task bar, wherein a task list is configured in the task bar;
the downloading module is used for determining the task state of the task to be downloaded in the task list according to the situation of the file stream generation; and when the task state is the finished state, downloading the corresponding task to be downloaded.
8. The task downloading system of claim 7, wherein the foreground is provided with a foreground page, the task bar is displayed below the foreground page in an icon manner, the task list includes task names, start times and task states of the tasks to be downloaded, and the task states further include an un-started state, a generating failure state and a downloaded state.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the task downloading method according to any one of claims 1 to 6 when executing the computer program.
10. A readable storage medium on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method of task downloading according to any one of claims 1 to 6.
CN202111423770.3A 2021-11-26 2021-11-26 Task downloading method, system, computer equipment and readable storage medium Withdrawn CN114157655A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111423770.3A CN114157655A (en) 2021-11-26 2021-11-26 Task downloading method, system, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111423770.3A CN114157655A (en) 2021-11-26 2021-11-26 Task downloading method, system, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114157655A true CN114157655A (en) 2022-03-08

Family

ID=80458043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111423770.3A Withdrawn CN114157655A (en) 2021-11-26 2021-11-26 Task downloading method, system, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114157655A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107689979A (en) * 2017-04-26 2018-02-13 平安科技(深圳)有限公司 A kind of download request processing method and processing equipment
WO2018113724A1 (en) * 2016-12-21 2018-06-28 广州优视网络科技有限公司 Method and apparatus for download acceleration based on reading and writing separation mode, terminal device and storage medium
CN108965407A (en) * 2018-07-02 2018-12-07 广东飞企互联科技股份有限公司 A kind of processing implementation method of mobile Internet file download
CN109862065A (en) * 2018-12-06 2019-06-07 北京字节跳动网络技术有限公司 Document down loading method, device and electronic equipment
CN111245890A (en) * 2019-12-25 2020-06-05 曙光信息产业(北京)有限公司 Method and device for downloading files in webpage
EP3720086A1 (en) * 2019-04-03 2020-10-07 Citrix Systems Inc. Selecting a mode of delivery to provide access to a file systems and methods

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018113724A1 (en) * 2016-12-21 2018-06-28 广州优视网络科技有限公司 Method and apparatus for download acceleration based on reading and writing separation mode, terminal device and storage medium
CN107689979A (en) * 2017-04-26 2018-02-13 平安科技(深圳)有限公司 A kind of download request processing method and processing equipment
CN108965407A (en) * 2018-07-02 2018-12-07 广东飞企互联科技股份有限公司 A kind of processing implementation method of mobile Internet file download
CN109862065A (en) * 2018-12-06 2019-06-07 北京字节跳动网络技术有限公司 Document down loading method, device and electronic equipment
EP3720086A1 (en) * 2019-04-03 2020-10-07 Citrix Systems Inc. Selecting a mode of delivery to provide access to a file systems and methods
CN111245890A (en) * 2019-12-25 2020-06-05 曙光信息产业(北京)有限公司 Method and device for downloading files in webpage

Similar Documents

Publication Publication Date Title
CN107832329B (en) Page resource obtaining method and terminal equipment
US10666758B2 (en) Browser resource pre-pulling method, terminal and storage medium
JP6132973B2 (en) Methods and devices for updating clients
US20170168807A1 (en) Method and electronic device for updating application program
WO2014107987A1 (en) File presenting method and apparatus for a smart terminal
CN114257551A (en) Distributed current limiting method and system and storage medium
CN112181677A (en) Service processing method and device, storage medium and electronic device
CN108563472B (en) Service plug-in loading method and device based on multi-open application
CN108280174A (en) Front end file construction method and server, page access method and terminal
CN111694639A (en) Method and device for updating address of process container and electronic equipment
CN109857963A (en) Local resource access method, device and electronic equipment
CN111385255B (en) Asynchronous call implementation method and device, server and server cluster
CN107733866A (en) RPC requests, RPC request processing methods, device and equipment
CN108762983B (en) Multimedia data recovery method and device
CN107682389A (en) A kind of method, terminal and computer-readable recording medium for performing network request
CN108062224B (en) Data reading and writing method and device based on file handle and computing equipment
CN112818270A (en) Data cross-domain transfer method and device and computer equipment
CN111857854A (en) Shutdown resource loading method and device, storage medium and electronic equipment
US11262995B2 (en) Method and apparatus for downloading installation-free application
JP6877388B2 (en) Information processing equipment, mobiles, information processing methods, and programs
CN114157655A (en) Task downloading method, system, computer equipment and readable storage medium
CN111045789A (en) Virtual machine starting method and device, electronic equipment and storage medium
CN109995863A (en) Dynamic resource downloading method and device, electronic equipment and storage medium
CN109962941B (en) Communication method, device and server
CN115225950A (en) Video playing control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220308