[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112187667B - Data downloading method, device, equipment and storage medium - Google Patents

Data downloading method, device, equipment and storage medium Download PDF

Info

Publication number
CN112187667B
CN112187667B CN202010975428.3A CN202010975428A CN112187667B CN 112187667 B CN112187667 B CN 112187667B CN 202010975428 A CN202010975428 A CN 202010975428A CN 112187667 B CN112187667 B CN 112187667B
Authority
CN
China
Prior art keywords
data
waiting queue
data downloading
downloading
downloading request
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.)
Active
Application number
CN202010975428.3A
Other languages
Chinese (zh)
Other versions
CN112187667A (en
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.)
Shenzhen Xishima Data Technology Co ltd
Original Assignee
Shenzhen Xishima Data 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 Shenzhen Xishima Data Technology Co ltd filed Critical Shenzhen Xishima Data Technology Co ltd
Priority to CN202010975428.3A priority Critical patent/CN112187667B/en
Publication of CN112187667A publication Critical patent/CN112187667A/en
Application granted granted Critical
Publication of CN112187667B publication Critical patent/CN112187667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/628Queue scheduling characterised by scheduling criteria for service slots or service orders based on packet size, e.g. shortest packet first
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data downloading method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving a data downloading request sent by a user side, wherein the data downloading request contains data requirement information; calculating a data quantity value corresponding to the data requested to be downloaded by the data downloading request according to the data demand information by combining a database; and selecting a waiting queue matched with the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request into the waiting queue for queuing and data downloading processing. The method avoids the situation that the queuing waiting time of the data downloading request with small downloading data volume is too long when the data downloading request with small downloading data volume is arranged behind the data downloading request with large downloading data volume, and has good flexibility. And under the condition of high concurrency of data downloading requests, each waiting queue can be used for carrying out data downloading service in a division manner, so that the stability of the server is effectively ensured.

Description

Data downloading method, device, equipment and storage medium
Technical Field
The present application belongs to the field of internet and data downloading technology, and in particular, to a data downloading method, apparatus, device and storage medium.
Background
The financial data in the financial market reflects the transaction information of the financial market and is an important reference for the user to make transaction behaviors. The financial data includes stock market data, futures market data, interest rate market data, credit market data, exchange rate market data, etc. With the background of continuous development of big data technology and internet technology, users can download abundant data resources through the internet. At present, a platform tool for downloading big data by a user is generally used for queuing and downloading according to the time sequence of user access, and under the condition of high concurrent access, the condition that the time occupied for downloading larger data resources is long, so that the queuing and waiting time for downloading smaller data resources is overlong is easy to occur, the queuing arrangement cannot be carried out according to the size of data volume, the flexibility is poor, a server is unstable, and the user experience is influenced.
Disclosure of Invention
In view of this, embodiments of the present application provide a data downloading method, apparatus, device and storage medium, which can perform dynamic queuing arrangement according to the size of the data volume, avoid that the waiting time for downloading data resources with a small data volume is too long, enable a user to obtain desired data as fast as possible, have good flexibility, and ensure the stability of a server.
A first aspect of an embodiment of the present application provides a data downloading method, where the data downloading method includes:
receiving a data downloading request sent by a user side, wherein the data downloading request contains data requirement information;
calculating a data quantity value corresponding to the data requested to be downloaded by the data downloading request according to the data demand information by combining a database;
and selecting a waiting queue matched with the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request into the waiting queue for queuing and data downloading.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the selecting, according to the data quantity value, a waiting queue matching the data download request from a preset waiting queue configuration table, and adding the data download request to the waiting queue for queuing and data download processing includes:
according to the data quantity value, traversing the data quantity application range configured for the waiting queue in the preset waiting configuration table, and judging whether the data quantity value falls into the data quantity application range;
and if the data quantity value falls into the data quantity application range, determining that the waiting queue corresponding to the data quantity application range is a waiting queue matched with the data downloading request.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the selecting, according to the data quantity value, a waiting queue matching the data download request from a preset waiting queue configuration table, and adding the data download request to the waiting queue for queuing and data download processing includes:
acquiring the load of each waiting queue in the preset waiting queue configuration table, wherein the load is characterized by the sum of prediction time values consumed by data downloading processing corresponding to all data downloading requests queued in the waiting queue;
determining idle time nodes corresponding to the waiting queues according to the load of the waiting queues, and sequencing each waiting queue in the preset waiting queue configuration table according to the order of the idle time nodes of the waiting queues;
and selecting the waiting queue with the first sequencing as the waiting queue matched with the data downloading request, and adding the data downloading request into the waiting queue matched with the data downloading request for queuing and data downloading processing.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, after the step of receiving a data download request sent by a user end, the method further includes:
inquiring whether a preset cache library contains the same cache data as the data downloading request;
and if the preset cache library contains the same cache data as the data downloading request, directly feeding the cache data serving as the downloading result back to the user side.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, before the step of selecting, according to the data quantity value, a waiting queue matched with the data download request from a preset waiting queue configuration table, and adding the data download request to the waiting queue for queuing and data download processing, the method further includes:
judging whether an idle waiting queue exists in the waiting queue in the preset waiting queue configuration table, wherein the idle waiting queue is a waiting queue without a data downloading request;
and if so, adding the data downloading request into the idle waiting queue for data downloading processing.
With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, after the step of selecting, according to the data quantity value, a waiting queue matched with the data download request from a preset waiting queue configuration table, and adding the data download request to the waiting queue for queuing and data download processing, the method further includes:
acquiring frequency for awakening a downloading interface of a user side;
and adjusting the queuing position of the data downloading request sent by the user side in the waiting queue according to a preset frequency queuing mechanism and the frequency.
A second aspect of an embodiment of the present application provides a data downloading apparatus, including:
the receiving module is used for receiving a data downloading request sent by a user side, wherein the data downloading request contains data requirement information;
the calculation module is used for calculating a data quantity value corresponding to the data requested to be downloaded by the data downloading request according to the data demand information by combining a database;
and the first downloading module is used for selecting a waiting queue matched with the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request into the waiting queue for queuing and data downloading processing.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the data downloading apparatus further includes:
the query module is used for querying whether a preset cache library contains the same cache data as the data downloading request;
and the second downloading module is used for directly feeding back the cache data serving as a downloading result to the user side if the preset cache library contains the same cache data as the data downloading request.
A third aspect of embodiments of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the data downloading method according to any one of the first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the data downloading method according to any one of the first aspect.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
the method comprises the steps that a data downloading request sent by a user side is received, wherein the data downloading request contains data requirement information; calculating a data quantity value corresponding to the data requested to be downloaded by the data downloading request according to the data demand information by combining a database; and selecting a waiting queue matched with the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request into the waiting queue for queuing and data downloading processing. The method avoids the situation that the queuing waiting time of the data downloading request with small downloading data volume is too long when the data downloading request with small downloading data volume is arranged behind the data downloading request with large downloading data volume, and has good flexibility. And under the condition of high concurrency of data downloading requests, each waiting queue can be used for carrying out data downloading service in a division manner, so that the stability of the server is effectively ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments or the prior art description will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic flowchart of a basic method of a data downloading method according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating a method for selecting a wait queue according to a data magnitude in a data downloading method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart illustrating another method for selecting a wait queue according to a data magnitude in a data downloading method according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a method for obtaining downloaded data based on a cache in a data downloading method according to an embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a method for selecting a waiting queue from a preset waiting queue configuration table in a data downloading method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a method for adjusting a queuing position of a data download request in a waiting queue in a data download method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a data downloading device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data downloading device according to an embodiment of the present application;
fig. 9 is a schematic view of an electronic device implementing a data downloading method according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
In some embodiments of the present application, please refer to fig. 1, and fig. 1 is a flowchart illustrating a basic method of a data downloading method according to an embodiment of the present application. The details are as follows:
in step S101, data downloading request data sent by a user side is received, where the data downloading request includes data requirement information.
In this embodiment, the user may send a data downloading request to the downloading service of the data service platform by using the user side to request to download the required data. The data downloading request contains data requirement information, and the data to be downloaded can be screened out from a database of the data service platform according to the requirement information. Taking a financial data service platform as an example, the database of the platform contains various types of market data such as stock market data, futures market data, interest rate market data, credit market data, exchange rate market data and the like, and each type of market data contains various indexes. In this embodiment, the download-required information may be data type information, data index information, date condition, and the like. For example, if the download request information includes three items of information, i.e., a stock code a, a fluctuation index, and quarter 2 in 2020, the data required by the user at this time is the fluctuation data of the stock code a each day in the period from 4/1/2020 to 6/30/2020.
In step S102, a data quantity value corresponding to the data requested to be downloaded by the data download request is calculated according to the data requirement information by combining with a database.
In this embodiment, a large amount of data resources are stored in the database of the data service platform, and in this embodiment, data screening may be performed according to the obtained data demand information to obtain data that the user demands for downloading. Specifically, a corresponding data list is generated in the database according to the data demand information, and then the data amount occupied by the generated data list in the database is calculated in an SQL statement query mode, so that the data amount value corresponding to the data requested to be downloaded by the user side is obtained. The data quantity value represents the size of the data requested to be downloaded by the user terminal.
In step S103, a waiting queue matching the data download request is selected from a preset waiting queue configuration table according to the data quantity value, and the data download request is added to the waiting queue for queuing and data download processing.
In this embodiment, a waiting queue configuration table is configured in the download service of the data service platform, the configuration table at least includes two or more waiting queues, and the data download request can be added to the waiting queue for queuing and data download processing by selecting a waiting queue matching the data download request from a preset waiting queue configuration table according to the data quantity value.
In some implementations, referring to fig. 2, fig. 2 is a flowchart illustrating a method for selecting a waiting queue according to a data size in a data downloading method according to an embodiment of the present disclosure. The details are as follows:
in step S201, according to the data quantity value traversing the data quantity application range configured for the waiting queue in the preset waiting configuration table, determining whether the data quantity value falls within the data quantity application range;
in step S202, if the data amount value falls within the data amount application range, it is determined that the waiting queue corresponding to the data amount application range is a waiting queue matched with the data download request.
In this embodiment, in the preset waiting queue configuration table, each waiting queue may be provided with a corresponding applicable data size range, for example, the data size range correspondingly used by the first waiting queue is not more than 1M, the data size range correspondingly used by the second waiting queue is 1M < X not more than 10M, and the data size range correspondingly used by the third waiting queue is more than 10M, where M is a unit of data size. In this embodiment, the data amount value is calculated according to step S102, and a corresponding waiting queue may be selected from the preset waiting queue configuration table according to the data amount range in which the data amount value falls, for example, the data amount value is less than 1M, and the waiting queue selected from the preset waiting queue configuration table and corresponding to the data amount value is the first waiting queue. And after the waiting queue corresponding to the data quantity value is obtained, adding the data downloading request to the tail of the selected waiting queue for queuing. And sequentially polling the first data downloading request queued in the waiting queue through the server to perform data downloading processing.
The data downloading method provided by the embodiment flexibly separates the data downloading request with large downloading data volume and the data downloading request with small downloading data volume into different waiting queues for queuing and downloading by adding the data downloading request into different waiting queues, thereby avoiding the condition that the queuing and waiting time of the data downloading request with small downloading data volume is overlong when the data downloading request with small downloading data volume is arranged behind the data downloading request with large downloading data volume, and having good flexibility. And under the condition of high concurrency of data downloading requests, each waiting queue can be used for carrying out data downloading service in a division manner, so that the stability of the server is effectively ensured.
Referring to fig. 3, in some embodiments of the present application, fig. 3 is a schematic flow chart illustrating another method for selecting a wait queue according to a data size value in a data downloading method according to an embodiment of the present application. The details are as follows:
in step S301, a load amount of each waiting queue in the preset waiting queue configuration table is obtained, where the load amount is represented by a sum of predicted time values consumed for data downloading processing corresponding to all data downloading requests queued in the waiting queue;
in step S302, determining an idle time node corresponding to the waiting queue according to the load of the waiting queue, and sorting each waiting queue in the preset waiting queue configuration table according to the order of the idle time nodes of the waiting queue;
in step S303, the waiting queue with the first rank is selected as the waiting queue matched with the data download request, and the data download request is added to the waiting queue matched with the data download request for queuing and data download processing.
In this embodiment, a matched waiting queue may be selected for the data download request sent by the current receiving user end according to the load condition of the current waiting queue of the download service of the data service platform, so as to solve the problem that the user has too long queuing waiting time, and ensure that the user can download the data desired by the user as fast as possible under the condition of high concurrency. In this embodiment, the load capacity of each waiting queue is obtained first, and the load capacity is characterized by the sum of the predicted time values consumed by the data downloading process corresponding to all the data downloading requests queued in the waiting queue. For example, 5 data download requests are queued in the current first wait queue, and the predicted time consumed for data download processing corresponding to each data download request is 3 seconds, 2 seconds, 1 second, and 2 seconds. At this time, the load amount of the first wait queue is obtained as 3+3+2+1+2 — 11 seconds. And determining an idle time node corresponding to the waiting queue according to the load capacity of the waiting queue, for example, the load capacity of the first waiting queue is 11 seconds, that is, the current time plus 11 seconds is the idle time node of the first waiting queue. Sequencing each waiting queue in the preset waiting queue configuration table according to the sequence of the idle time nodes of the waiting queue, for example, there are 3 waiting queues in the waiting queue configuration table, which are respectively a first waiting queue, a second waiting queue and a third waiting queue, and the load amounts of the 3 waiting queues in the waiting queue configuration table obtained according to the above are respectively 11 seconds, 5 seconds and 20 seconds, at this time, sequencing each waiting queue in the preset waiting queue configuration table according to the sequence of the idle time nodes to obtain a sequencing result as follows: a second wait queue, a first wait queue, a third wait queue. Therefore, the waiting queue with the first sequencing is selected as the waiting queue matched with the currently received data downloading request sent by the user terminal, and the data downloading request is added into the second waiting queue for queuing and data downloading processing.
In some embodiments of the present application, please refer to fig. 4, and fig. 4 is a schematic flowchart illustrating a method for obtaining downloaded data based on a cache in a data downloading method provided in the embodiments of the present application. The details are as follows:
in step S401, querying whether a preset buffer contains buffer data matched with the data download request;
in step S402, if the preset buffer contains the cache data matching with the data downloading request, the cache data is directly fed back to the user side as the downloading result.
In this embodiment, a buffer is configured in the data service platform, and is used for buffering data requested to be downloaded by all users on the same day. After the server sequentially polls the first data downloading request queued in the waiting queue for data downloading processing, the downloaded data and the data requirement information corresponding to the data downloading request are cached in the buffer. In this embodiment, after the download service of the data service platform newly receives data download request data sent by a user, it may first determine whether the cache data matches the data download request by querying the cache, and if before the user sends the data download request, other users have sent data download requests to download data corresponding to the same data requirement information, the cache data corresponding to the data requirement information will be retained in the cache. Therefore, by querying the buffer, it can be known whether other users have downloaded the same data with the same data demand information on the current day, and if so, it is indicated that the buffer retains the buffer data corresponding to the data demand information. At this time, according to the data download request sent by the current user side, the cache data matched with the data download request can be directly obtained from the cache, and then the obtained cache data can be directly fed back to the user side as a download result. Therefore, the time for the user side to obtain the download data can be saved, and the load of the download service is reduced.
In some embodiments of the present application, please refer to fig. 5, and fig. 5 is a flowchart illustrating a method for selecting a waiting queue from a preset waiting queue configuration table in a data downloading method according to the embodiments of the present application. The details are as follows:
in step S501, it is determined whether an idle waiting queue exists in the waiting queue in the preset waiting queue configuration table, where the idle waiting queue is a waiting queue without a data download request;
in step S502, if yes, the data download request is added to the idle waiting queue for data download processing.
In this embodiment, the download service of the data service platform may further perform real-time load monitoring on each waiting queue in the waiting queue configuration table configured with the download service, and obtain a load amount of each waiting queue, where the load amount is represented by the number of data download requests. In the configuration table, the idle waiting queue is a waiting queue without a data downloading request. If no data download request is currently in the waiting queue, the waiting queue is marked as an idle waiting queue until the waiting queue is added with the data download request, and then the mark of the idle waiting queue is cancelled. Therefore, whether an idle waiting queue exists in the waiting queue in the preset waiting queue configuration table can be judged through real-time load monitoring. If the idle waiting queue exists in the configuration table, the received data downloading request sent by the user side is preferentially added to the idle waiting queue to directly perform data downloading processing. Therefore, the waiting queue with a large load can be helped to reduce the load, the waiting queue can be flexibly selected, and the time consumption of a user for downloading data is reduced.
In some embodiments of the present application, please refer to fig. 6, and fig. 6 is a flowchart illustrating a method for adjusting a queuing position of a data download request in a waiting queue in a data download method according to the embodiment of the present application. The details are as follows:
in step S601, frequency for waking up a user to download an interface is obtained;
in step S602, a queuing position of the data download request sent by the user side in the waiting queue is adjusted according to a preset frequency queuing mechanism and the frequency.
In this embodiment, after the data downloading request is added to the waiting queue for queuing, the data required by the user may be preferentially downloaded for the user who needs to download the data urgently by identifying the urgent degree of the user for the data downloading request, so as to improve the user satisfaction. In this embodiment, the frequency for waking up the downloading interface of the user side is obtained by monitoring, specifically, the user may wake up the downloading interface of the user side by executing the operation of checking the progress of downloading the message at the user side, and if the user executes the operation of checking the progress of downloading the message more frequently, it indicates that the user has a higher urgency for the requirement of downloading data. At this time, the queuing position of the data download request sent by the user side in the waiting queue can be determined according to the preset frequency queuing mechanism and the obtained frequency for waking up the user side download interface, so that the data download processing is preferentially arranged according to the data download request sent by the user side. In some specific implementations, in the frequency queuing mechanism, an adjustment rule may be set for a plurality of data download requests queued in a waiting queue, and when the frequency of the wake-up operation of a later set data download request within a preset time period exceeds a preset threshold and all data download requests of a previous set do not have a wake-up operation, the queuing position of the later set data download request may be preferentially adjusted to the first position for preferential download at this time. And further dynamically adjusting the queuing position of each data downloading request in the waiting queue according to the adjustment rule. For example, 10 data download requests in the waiting queue are queued, the 5 th data download request is monitored to be woken up 3 times (assuming that the preset threshold is set to be 2 times), and the previous 1 st to 4 th data download requests are not monitored to be woken up, at this time, the queuing position of the 5 th data download request can be adjusted to be 1 st, and the original 1 st to 4 th data download requests are all backed off by 1 position, thereby realizing that the user side which needs to download data urgently downloads data preferentially. In other specific implementations, the frequency queuing rule is not limited to the adjustment rule set above, and can be reasonably set according to actual requirements. For example, based on the adjustment rule, the dynamically adjusted data download request is waken up to not participate in the adjustment of the queuing position for wakening up other subsequent data download requests. For example, if the queuing position of the 5 th data download request is adjusted to 1 st, the 7 th data download request in the waiting queue is also monitored to have 3 awakenings, but the 5 th data download request is not downloaded yet and is still waiting for the first bit, then the 7 th data download request can only adjust its queuing position to 2 nd bit, but does not adjust its queuing position to 1 st bit, and the 1 st bit is still the original 5 th data download request. Therefore, by formulating a frequency queuing rule, the queuing position of the data downloading request in the waiting queue is dynamically adjusted according to the urgent degree of the user for downloading the data, the data required by the user who needs to download the data urgently is downloaded preferentially, the data downloading time of the user who needs to download the data urgently is reduced, and the satisfaction degree of the user is improved. In some specific implementations, step S301 may be further combined, and meanwhile, whether an idle waiting queue exists in the configuration table is monitored, after the frequency for waking up the user side to download the interface is obtained, if the frequency meets the preset threshold and it is monitored that the idle waiting queue exists in the configuration table, the data download request whose frequency meets the preset threshold may be added to the idle waiting queue to directly perform data download processing, and the data download request is deleted from the original waiting queue.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In some embodiments of the present application, please refer to fig. 7, and fig. 7 is a schematic structural diagram of a data downloading device according to an embodiment of the present application, which is detailed as follows:
in this embodiment, the data downloading apparatus includes: a receiving module 701, a calculating module 702 and a first downloading module 703. The receiving module 701 is configured to receive a data downloading request sent by a user side, where the data downloading request includes data requirement information. The calculating module 702 is configured to calculate, in combination with a database, a data quantity value corresponding to the data requested to be downloaded by the data downloading request according to the data requirement information. The first downloading module 703 is configured to select a waiting queue matching the data downloading request from a preset waiting queue configuration table according to the data quantity value, and add the data downloading request to the waiting queue for queuing and data downloading.
In some embodiments of the present application, please refer to fig. 8, and fig. 8 is another schematic structural diagram of a data downloading device according to an embodiment of the present application. As shown in fig. 8, the data downloading apparatus further includes: a query module 801 and a second download module 802. The querying module 801 queries whether a preset cache library contains the same cache data as the data downloading request. The second downloading module 802 is configured to, if the preset cache library contains cache data that is the same as the data downloading request, directly feed back the cache data as a downloading result to the user side.
The data downloading device corresponds to the data downloading method one by one, and details are not repeated here.
In some embodiments of the present application, please refer to fig. 9, and fig. 9 is a schematic diagram of an electronic device implementing a data downloading method according to an embodiment of the present application. As shown in fig. 9, the electronic apparatus 9 of this embodiment includes: a processor 91, a memory 92 and a computer program 93, such as a data downloading program, stored in said memory 92 and operable on said processor 91. The processor 91 implements the steps in the above-described respective data download method embodiments when executing the computer program 92. Alternatively, the processor 91 implements the functions of the modules/units in the above-described device embodiments when executing the computer program 93.
Illustratively, the computer program 93 may be divided into one or more modules/units, which are stored in the memory 92 and executed by the processor 91 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 93 in the electronic device 9. For example, the computer program 93 may be divided into:
the receiving module is used for receiving a data downloading request sent by a user side, wherein the data downloading request contains data requirement information;
the calculation module is used for calculating a data quantity value corresponding to the data requested to be downloaded by the data downloading request according to the data demand information by combining a database;
and the first downloading module is used for selecting a waiting queue matched with the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request into the waiting queue for queuing and data downloading processing.
The electronic device may include, but is not limited to, a processor 91, a memory 92. Those skilled in the art will appreciate that fig. 9 is merely an example of the electronic device 9, and does not constitute a limitation of the electronic device 9, and may include more or fewer components than those shown, or some of the components may be combined, or different components, e.g., the electronic device may also include an input-output device, a network access device, a bus, etc.
The Processor 91 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 92 may be an internal storage unit of the electronic device 9, such as a hard disk or a memory of the electronic device 9. The memory 92 may also be an external storage device of the electronic device 9, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device 9. Further, the memory 92 may also include both an internal storage unit and an external storage device of the electronic device 9. The memory 92 is used for storing the computer program and other programs and data required by the electronic device. The memory 92 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
It should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the apparatus may be divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present application, and they should be construed as being included in the present application.

Claims (9)

1. A method for downloading data, comprising:
receiving a data downloading request sent by a user side, wherein the data downloading request contains data requirement information;
calculating a data quantity value corresponding to the data requested to be downloaded by the data downloading request according to the data demand information by combining a database;
selecting a waiting queue matched with the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request into the waiting queue for queuing and data downloading;
after the steps of selecting a waiting queue matched with the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request into the waiting queue for queuing and data downloading processing, the method further comprises the following steps:
acquiring frequency for waking up a user side to download an interface within a preset time period;
and adjusting the queuing position of the data downloading request sent by the user side in the waiting queue according to a preset frequency queuing mechanism and the frequency.
2. The data downloading method of claim 1, wherein the step of selecting a waiting queue matching the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request to the waiting queue for queuing and data downloading comprises:
traversing a data volume application range configured for a waiting queue in the preset waiting configuration table according to the data volume value, and judging whether the data volume value falls into the data volume application range;
and if the data quantity value falls into the data quantity application range, determining that the waiting queue corresponding to the data quantity application range is a waiting queue matched with the data downloading request.
3. The data downloading method of claim 1, wherein the step of selecting a waiting queue matching the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request to the waiting queue for queuing and data downloading comprises:
acquiring the load of each waiting queue in the preset waiting queue configuration table, wherein the load is characterized by the sum of prediction time values consumed by data downloading processing corresponding to all data downloading requests queued in the waiting queue;
determining idle time nodes corresponding to the waiting queues according to the load of the waiting queues, and sequencing each waiting queue in the preset waiting queue configuration table according to the order of the idle time nodes of the waiting queues;
and selecting the waiting queue with the first sequencing as the waiting queue matched with the data downloading request, and adding the data downloading request into the waiting queue matched with the data downloading request for queuing and data downloading processing.
4. The data downloading method according to any one of claims 1 to 3, wherein after the step of receiving the data downloading request sent by the user side, the method further comprises:
inquiring whether a preset cache library contains the same cache data as the data downloading request;
and if the preset cache library contains the same cache data as the data downloading request, directly feeding the cache data serving as the downloading result back to the user side.
5. The data downloading method according to any one of claims 1 to 3, wherein before the step of selecting a waiting queue matching the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request to the waiting queue for queuing and data downloading, the method further comprises:
judging whether an idle waiting queue exists in the waiting queue in the preset waiting queue configuration table, wherein the idle waiting queue is a waiting queue without a data downloading request;
and if so, adding the data downloading request into the idle waiting queue for data downloading processing.
6. A data download apparatus, characterized in that the data download apparatus comprises:
the receiving module is used for receiving a data downloading request sent by a user side, wherein the data downloading request contains data requirement information;
the calculation module is used for calculating a data quantity value corresponding to the data requested to be downloaded by the data downloading request according to the data demand information by combining a database;
the first downloading module is used for selecting a waiting queue matched with the data downloading request from a preset waiting queue configuration table according to the data quantity value, and adding the data downloading request into the waiting queue for queuing and data downloading processing;
after the steps of selecting, by the first download module, a waiting queue matching the data download request from a preset waiting queue configuration table according to the data quantity value, and adding the data download request to the waiting queue for queuing and data download processing, the method further includes: acquiring frequency for waking up a user side to download an interface within a preset time period; and adjusting the queuing position of the data downloading request sent by the user side in the waiting queue according to a preset frequency queuing mechanism and the frequency.
7. The data download device of claim 6, further comprising:
the query module is used for querying whether a preset cache library contains the same cache data as the data downloading request;
and the second downloading module is used for directly feeding back the cache data serving as a downloading result to the user side if the preset cache library contains the same cache data as the data downloading request.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the data downloading method according to any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the data downloading method according to any one of claims 1 to 5.
CN202010975428.3A 2020-09-16 2020-09-16 Data downloading method, device, equipment and storage medium Active CN112187667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010975428.3A CN112187667B (en) 2020-09-16 2020-09-16 Data downloading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010975428.3A CN112187667B (en) 2020-09-16 2020-09-16 Data downloading method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112187667A CN112187667A (en) 2021-01-05
CN112187667B true CN112187667B (en) 2022-09-13

Family

ID=73921481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010975428.3A Active CN112187667B (en) 2020-09-16 2020-09-16 Data downloading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112187667B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254176B (en) * 2021-05-28 2023-02-07 平安普惠企业管理有限公司 Project management method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651676A (en) * 2009-09-01 2010-02-17 北京中科智网传媒技术有限公司 Online download method for large data volume files
CN109729178A (en) * 2019-02-22 2019-05-07 苏州华必讯信息科技有限公司 A kind of network download method of large-data documents
EP3594947A1 (en) * 2018-07-12 2020-01-15 Cork Institute Of Technology Audio interactive decomposition editor method and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7058064B2 (en) * 2000-02-08 2006-06-06 Mips Technologies, Inc. Queueing system for processors in packet routing operations
JP2006259812A (en) * 2005-03-15 2006-09-28 Hitachi Ltd Dynamic queue load distribution method, system, and program
CN1852307B (en) * 2005-10-10 2010-12-08 华为技术有限公司 Data downloading method
CN101841557B (en) * 2010-03-02 2013-01-02 中国科学院计算技术研究所 P2P streaming media downloading method and system based on orthogonal list
CN103607451B (en) * 2013-11-18 2017-02-15 上海爱数信息技术股份有限公司 Client terminal and server terminal document operation synchronization method supporting concurrence
US9965318B2 (en) * 2015-03-16 2018-05-08 Tata Consultancy Services Limited Concurrent principal component analysis computation
CN109462650A (en) * 2018-11-14 2019-03-12 深圳市小牛普惠投资管理有限公司 Data file downloading method, device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651676A (en) * 2009-09-01 2010-02-17 北京中科智网传媒技术有限公司 Online download method for large data volume files
EP3594947A1 (en) * 2018-07-12 2020-01-15 Cork Institute Of Technology Audio interactive decomposition editor method and system
CN109729178A (en) * 2019-02-22 2019-05-07 苏州华必讯信息科技有限公司 A kind of network download method of large-data documents

Also Published As

Publication number Publication date
CN112187667A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN109684358B (en) Data query method and device
CN108196961B (en) Asynchronous message processing method, terminal, system and storage medium
CN108616444B (en) A kind of PUSH message processing method, computer readable storage medium and terminal device
CN110162529B (en) Data processing method, service server and data processing system
CN111797091A (en) Method and device for querying data in database, electronic equipment and storage medium
CN113704243A (en) Data analysis method, data analysis device, computer device, and storage medium
CN109241099B (en) Data query method and terminal equipment
CN112445857A (en) Resource quota management method and device based on database
CN112202834A (en) Data processing method, data processing device and node server
CN112187667B (en) Data downloading method, device, equipment and storage medium
CN110912949A (en) Method and device for submitting sites
CN109951540B (en) Data acquisition method and device based on content timeliness and electronic equipment
CN110489468A (en) A kind of deriving method of data sheet, device and server
CN113779412B (en) Message touch method, node and system based on blockchain network
CN116185578A (en) Scheduling method of computing task and executing method of computing task
CN115658745A (en) Data processing method, data processing device, computer equipment and computer readable storage medium
CN113468442A (en) Resource bit flow distribution method, computing device and computer storage medium
WO2023103752A1 (en) Method for downloading network element version, and network element, electronic device and storage medium
CN111680014A (en) Shared file acquisition method and device, electronic equipment and storage medium
CN115665074B (en) Message flow-limiting sending method, device, equipment and storage medium
CN114385081B (en) Disk protection method for kafka cluster and related equipment
CN113676414B (en) Information merging method, device, electronic equipment, medium and product
CN113344706A (en) Product quota control method, device, electronic equipment and computer readable medium
CN114186845A (en) Method and device for executing index calculation task at fixed time
CN118502988A (en) Big data operation processing method and related 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
GR01 Patent grant
GR01 Patent grant