CN106454419A - Data acquisition method, device and electronic equipment - Google Patents

Data acquisition method, device and electronic equipment Download PDF

Info

Publication number
CN106454419A
CN106454419A CN201611032510.2A CN201611032510A CN106454419A CN 106454419 A CN106454419 A CN 106454419A CN 201611032510 A CN201611032510 A CN 201611032510A CN 106454419 A CN106454419 A CN 106454419A
Authority
CN
China
Prior art keywords
data
time
acquiring
time interval
data acquisition
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.)
Pending
Application number
CN201611032510.2A
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.)
LeTV Holding Beijing Co Ltd
LeTV Information Technology Beijing Co Ltd
Original Assignee
LeTV Holding Beijing Co Ltd
LeTV Information Technology Beijing 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 LeTV Holding Beijing Co Ltd, LeTV Information Technology Beijing Co Ltd filed Critical LeTV Holding Beijing Co Ltd
Priority to CN201611032510.2A priority Critical patent/CN106454419A/en
Publication of CN106454419A publication Critical patent/CN106454419A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/482End-user interface for program selection
    • H04N21/4825End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention relates to a data acquisition method, a data acquisition device and electronic equipment. The data acquisition method comprises the following steps: acquiring first data, and recording a first time that the first data are acquired; when a data acquisition request transmitted by a user is received, determining whether the time interval between the time that the data acquisition request is transmitted by the user and the first time is smaller than a preset time interval or not; when the time interval between the time that the data acquisition request is transmitted by the user and the first time is smaller than the preset time interval, displaying the first data. By adopting the data acquisition method, the data acquisition device and the electronic equipment which are provided by the embodiment of the invention, the time for downloading data from a server can be shortened, network resources can be saved, and data acquisition efficiency can be improved.

Description

Method and device for acquiring data and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for acquiring data, and an electronic device.
Background
In the prior art, a real-time live program list is provided, and data refreshing of the list is usually to request real-time data from a server when a user sends a request for obtaining the list, and then to wait for receiving data sent by the server.
Based on this, the inventor of the present invention finds and has not disclosed that a main problem of the existing data acquisition method is that there is a long time delay waiting, and especially when the data volume is large, the waiting time of the user is very long, which affects the efficiency of data acquisition and the user experience.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
In view of this, an embodiment of the present invention provides a method, an apparatus, and an electronic device for acquiring data, which are capable of acquiring data efficiently.
To solve the above technical problem, an embodiment of the present invention provides a method for acquiring data, including: acquiring first data, and recording first time for acquiring the first data; when a data acquisition request sent by a user is received, judging whether the time interval between the time when the user sends the data acquisition request and the first time is smaller than a preset time interval or not; and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, displaying the first data.
In a possible implementation manner, after determining whether a time interval between the time when the user issues the data obtaining request and the first time is smaller than a preset time interval, the method further includes: and when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, acquiring second data.
In a possible implementation manner, after the obtaining the second data, the method further includes: updating the first data according to the second data; and recording a second time for acquiring the second data, and updating the first time according to the second time.
In one possible implementation manner, the acquiring the second data includes: sending a request for acquiring the second data; and receiving the second data.
In one possible implementation manner, the displaying the first data includes: and acquiring and displaying the first data from a local cache.
To solve the above technical problem, an embodiment of the present invention provides, in another aspect, an apparatus for acquiring data, including: the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring first data and recording first time for acquiring the first data; the judging module is used for judging whether the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval or not when the data acquisition request sent by the user is received; and the processing module is used for displaying the first data when the time interval between the time of sending the data acquisition request by the user and the first time is less than the preset time interval.
In one possible implementation, the processing module is further configured to: and when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, acquiring second data.
In a possible implementation manner, the apparatus further includes: the updating module is used for updating the first data according to the second data after the second data is acquired; and recording a second time for acquiring the second data, and updating the first time according to the second time.
In one possible implementation, the processing module is configured to: sending a request for acquiring the second data; and receiving the second data.
In one possible implementation, the processing module is configured to: and acquiring and displaying the first data from a local cache.
To solve the above technical problem, an embodiment of the present invention provides, in another aspect, an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of the above aspects.
To solve the above technical problem, embodiments of the present invention provide in another aspect a non-transitory computer-readable storage medium storing computer-executable instructions for performing the method of the above aspects.
To solve the above technical problem, embodiments of the present invention provide, in another aspect, a computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method of the above aspects.
Therefore, according to the method, the device and the electronic equipment for acquiring data provided by the embodiment of the invention, the first time for acquiring the first data is recorded by acquiring the first data; when a data acquisition request sent by a user is received, judging whether the time interval between the time when the user sends the data acquisition request and the first time is smaller than a preset time interval or not; and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, acquiring and displaying the first data from the local cache, so that the downloading time of downloading the data from the server is saved, the network resource is saved, and the data acquisition efficiency is improved.
According to the method, the device and the electronic equipment for acquiring data, provided by the embodiment of the invention, the second data is acquired when the time interval between the time when the user sends the data acquiring request and the first time is greater than the preset time interval, the request for acquiring the second data is sent to the server, and the second data sent by the server is received, so that the accuracy and the timeliness of the acquired data are ensured.
According to the method, the device and the electronic equipment for acquiring data, provided by the embodiment of the invention, through updating the first data and the first time and based on the updated first time, whether the time interval between the time when the user sends the data acquisition request and the updated first time is smaller than the preset time interval or not is judged, so that the downloading time can be saved, the data acquisition efficiency is improved, and the accuracy and the timeliness of the acquired data are ensured.
Other features and aspects of the present invention will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a flow chart illustrating a method of acquiring data according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method of obtaining data according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a method of obtaining data according to an embodiment of the present invention;
FIG. 4 is a time period diagram illustrating a method of acquiring data according to an embodiment of the invention;
FIG. 5 is a schematic structural diagram of an apparatus for acquiring data according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an apparatus for acquiring data according to an embodiment of the present invention; and
fig. 7 is a schematic hardware structure diagram of an electronic device that executes a method for acquiring data according to an embodiment of the present invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present invention. It will be understood by those skilled in the art that the present invention may be practiced without some of these specific details. In some instances, methods, means, elements well known to those skilled in the art have not been described in detail so as not to obscure the present invention.
Example 1
Fig. 1 shows a flowchart of a method for acquiring data according to an embodiment of the present invention, where the method may be implemented by an electronic device, for example, a terminal device. As shown, the method may include the following steps.
S10: first data is acquired, and a first time at which the first data is acquired is recorded.
S20: when a data acquisition request sent by a user is received, judging whether the time interval between the time of sending the data acquisition request by the user and the first time is smaller than a preset time interval.
S30: and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, displaying the first data.
Therefore, according to the method for acquiring data provided by the embodiment of the invention, the first time for acquiring the first data is recorded by acquiring the first data; when a data acquisition request sent by a user is received, judging whether the time interval between the time when the user sends the data acquisition request and the first time is smaller than a preset time interval or not; when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, the first data is displayed, the acquired data can be directly displayed under the condition that the time when the user initiates the data acquisition request is closer to the time when the data is acquired last time, in other words, the acquired data is directly displayed under the condition that the acquired data is updated without being updated, the time is not consumed for downloading new data from the server, and therefore the downloading time is saved, and the data acquisition efficiency is improved.
Example 2
Fig. 2 is a flowchart illustrating a method for acquiring data according to another embodiment of the present invention, which may be implemented by an electronic device, for example, a terminal device. As shown, the method may include the following steps.
S10: first data is acquired, and a first time at which the first data is acquired is recorded.
In the embodiment of the present invention, there may be various ways of acquiring the first data. In a possible implementation manner, taking a terminal as an example for description, a request for obtaining data may be automatically sent to a server when the terminal is opened, and data sent by the server is received and is used as first data. In a possible implementation manner, taking a video client installed on a terminal as an example for illustration, when a user opens the video client, a request for obtaining data, for example, a request for obtaining a program list, may be automatically sent to a server, and the list sent by the server is received and is used as the first data.
S20: when a data acquisition request sent by a user is received, judging whether the time interval between the time of sending the data acquisition request by the user and the first time is smaller than a preset time interval.
The user may issue a request for acquiring data according to actual requirements, which is described by taking a video client installed on the terminal as an example, and when the user wishes to acquire data (e.g., a new program list), the request for acquiring data may be issued. In this step, a time interval, for example, 2 minutes, may be preset, and it is determined whether a time interval between the time when the user issues the data obtaining request and the first time is smaller than the preset time interval.
S30: and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, displaying the first data.
Generally, data (for example, a program list) does not change greatly in a short time, and therefore, when the time interval between the time when the user sends the data obtaining request and the first time is less than the preset time interval, the obtained first data is called from the local cache and displayed to the user, so that the efficiency of obtaining data can be ensured, and network resources can be saved at the same time.
S40: and when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, acquiring second data.
When the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, it indicates that the time when the user sends the data acquisition request is longer than the time interval of last data acquisition, and within the longer time interval, the data may have a larger change, and at this time, the second data needs to be acquired to ensure the accuracy and timeliness of the acquired data.
In a possible implementation manner, the step of obtaining the second data includes sending a request for obtaining the second data to the server, and receiving the second data sent by the server.
Therefore, the embodiment of the invention obtains the first data and records the first time for obtaining the first data; when a data acquisition request sent by a user is received, judging whether the time interval between the time when the user sends the data acquisition request and the first time is smaller than a preset time interval or not; and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, acquiring and displaying the first data from the local cache, so that the downloading time of downloading the data from the server is saved, the network resource is saved, and the data acquisition efficiency is improved.
According to the embodiment of the invention, the second data is acquired when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, and the accuracy and the timeliness of the acquired data are ensured by sending the request for acquiring the second data to the server and receiving the second data sent by the server.
Example 3
Fig. 3 is a flowchart illustrating a method for acquiring data according to a next embodiment of the present invention, where the method may be implemented by an electronic device, for example, a terminal device. As shown, the method may include the following steps.
S10: first data is acquired, and a first time at which the first data is acquired is recorded.
In the embodiment of the present invention, there may be various ways of acquiring the first data. In a possible implementation manner, taking a terminal as an example for description, a request for obtaining data may be automatically sent to a server when the terminal is opened, and data sent by the server is received and is used as first data. In a possible implementation manner, taking a video client installed on a terminal as an example for illustration, when a user opens the video client, a request for obtaining data, for example, a request for obtaining a live program list, may be automatically sent to a server, and the list sent by the server is received and is used as the first data.
S20: when a data acquisition request sent by a user is received, judging whether the time interval between the time of sending the data acquisition request by the user and the first time is smaller than a preset time interval.
The user can send a request for acquiring data according to actual requirements, which is described by taking a video client installed on a terminal as an example, and when the user wants to acquire a new live program list, the user can send the request for acquiring data. In this step, a time interval, for example, 2 minutes, may be preset, and it is determined whether a time interval between the time when the user issues the data obtaining request and the first time is smaller than the preset time interval.
S30: and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, displaying the first data.
Generally, data (for example, a live program list) does not change greatly in a short time, and therefore, when the time interval between the time when the user sends the data obtaining request and the first time is less than a preset time interval, the obtained first data is called from the local cache and displayed to the user, so that the efficiency of obtaining data can be ensured, and network resources can be saved at the same time.
S40: and when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, acquiring second data.
When the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, it indicates that the time when the user sends the data acquisition request is longer than the time interval of the first time, and within the longer time interval, the data may have a larger change.
In a possible implementation manner, the step of obtaining the second data includes sending a request for obtaining the second data to the server, and receiving the second data sent by the server.
S50: and updating the first data according to the second data, recording second time for acquiring the second data, and updating the first time according to the second time.
In one possible implementation, the first data may be updated to the second data, in other words, the original first data is replaced with the newly acquired second data, and the original first data may be deleted. At the same time, recording the second time of acquiring the second data, updating the first time to the second time, in other words, replacing the first time of acquiring the old data with the second time of acquiring the new data, and deleting the record of the original first time.
When the data acquiring request sent by the user is received again, whether the time interval between the time when the data acquiring request is sent by the user and the updated first time is smaller than the preset time interval or not can be judged based on the updated first time.
Therefore, the embodiment of the invention can save the downloading time, improve the data acquisition efficiency and ensure the accuracy and timeliness of the acquired data by updating the first data and the first time and judging whether the time interval between the time of sending the data acquisition request by the user and the updated first time is less than the preset time interval on the basis of the updated first time.
FIG. 4 is a diagram illustrating a method for acquiring data according to an embodiment of the present inventionThe periodic diagram. As shown in fig. 4, the client terminal is at time t0After starting, first data can be obtained from the server and the first time t can be recorded0. Thereafter, the user is at time t1Sending out a request for obtaining data, taking a preset time interval as s as an example for explanation, and at a time t1And time t0The time interval between is greater than s, so at time t1Obtaining the second data and updating the first data according to the second data, i.e. at time t1The acquired second data replacement time t0The first data is obtained, and the first time is updated to t1. Thus, when the time t2When the user sends out the request for obtaining data again, the time t is2And the updated first time t1Is less than s, so that the first data is displayed to the user, i.e. at the instant t1The first data are updated, so that the embodiment of the invention can ensure the accuracy and timeliness of the acquired data and improve the efficiency of the acquired data.
Therefore, the embodiment of the invention acquires the first data and records the first time for acquiring the first data; when a data acquisition request sent by a user is received, judging whether the time interval between the time when the user sends the data acquisition request and the first time is smaller than a preset time interval or not; and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, acquiring and displaying the first data from the local cache, so that the downloading time of downloading the data from the server is saved, the network resource is saved, and the data acquisition efficiency is improved.
According to the embodiment of the invention, when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, the second data is acquired, the request for acquiring the second data is sent to the server, and the second data sent by the server is received, so that the accuracy and the timeliness of the acquired data are ensured.
According to the embodiment of the invention, the first data and the first time are updated, and whether the time interval between the time of sending the data acquisition request by the user and the updated first time is smaller than the preset time interval is judged based on the updated first time, so that the downloading time can be saved, the data acquisition efficiency is improved, and the accuracy and the timeliness of the data acquisition are ensured.
Example 4
Fig. 5 is a schematic structural diagram of an apparatus 10 for acquiring data according to an embodiment of the present invention, and as shown in the drawing, the apparatus 10 includes: an acquisition module 110, a judgment module 120 and a processing module 130.
The obtaining module 110 is configured to obtain first data and record a first time when the first data is obtained. The determining module 120 is configured to determine, when a data obtaining request sent by a user is received, whether a time interval between the time when the user sends the data obtaining request and the first time is smaller than a preset time interval. The processing module 130 is configured to display the first data when a time interval between the time when the user sends the data obtaining request and the first time is smaller than a preset time interval.
Therefore, the apparatus for acquiring data according to the embodiment of the present invention is configured to acquire first data and record a first time for acquiring the first data through the acquisition module 110; a determining module 120, configured to determine, when a data obtaining request sent by a user is received, whether a time interval between the time when the user sends the data obtaining request and the first time is smaller than a preset time interval; the processing module 130 is configured to display the first data when a time interval between the time when the user sends the data obtaining request and the first time is smaller than a preset time interval, and directly display the obtained data when the time when the user initiates the data obtaining request is relatively short from the time when the data is obtained last time, in other words, directly display the obtained data when the obtained data is still newer and does not need to be updated, and do not need to spend time to download new data from the server, so that the downloading time is saved, and the data obtaining efficiency is improved.
Example 5
Fig. 6 is a schematic structural diagram of an apparatus for acquiring data according to another embodiment of the present invention, as shown in the figure, the apparatus includes: an obtaining module 110, a judging module 120, a processing module 130 and an updating module 140.
The obtaining module 110 is configured to obtain first data and record a first time when the first data is obtained. The determining module 120 is configured to determine, when a data obtaining request sent by a user is received, whether a time interval between the time when the user sends the data obtaining request and the first time is smaller than a preset time interval. The processing module 130 is configured to display the first data when a time interval between the time when the user sends the data obtaining request and the first time is smaller than a preset time interval.
In one possible implementation manner, the processing module 130 is further configured to: and when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, acquiring second data.
An updating module 140, configured to update the first data according to the second data after the second data is obtained; and recording a second time for acquiring the second data, and updating the first time according to the second time.
In one possible implementation manner, the processing module 130 is configured to: sending a request for acquiring the second data; and receiving the second data. For example, the request for obtaining the second data may be sent to a server, the server processes the request, then issues the second data, and the processing module 130 receives the second data.
In one possible implementation manner, the processing module 130 is configured to: and acquiring and displaying the first data from a local cache.
Therefore, the apparatus for acquiring data according to the embodiment of the present invention is configured to acquire first data and record a first time for acquiring the first data through the acquisition module 110; a determining module 120, configured to determine, when a data obtaining request sent by a user is received, whether a time interval between the time when the user sends the data obtaining request and the first time is smaller than a preset time interval; the processing module 130 is configured to display the first data when a time interval between the time when the user sends the data obtaining request and the first time is smaller than a preset time interval, and directly display the obtained data when the time when the user initiates the data obtaining request is relatively short from the time when the data is obtained last time, in other words, directly display the obtained data when the obtained data is still newer and does not need to be updated, and do not need to spend time to download new data from the server, so that the downloading time is saved, and the data obtaining efficiency is improved.
The device for acquiring data provided in the embodiment of the present invention is configured to, through the processing module 130, acquire the second data when a time interval between the time when the user sends the data acquiring request and the first time is greater than a preset time interval, and ensure accuracy and timeliness of the acquired data by sending the request for acquiring the second data to the server and receiving the second data sent by the server.
According to the device for acquiring data provided by the embodiment of the invention, the first data and the first time are updated by the updating module 140, and whether the time interval between the time when the user sends the data acquiring request and the updated first time is smaller than the preset time interval is judged based on the updated first time, so that the downloading time can be saved, the data acquiring efficiency is improved, and the accuracy and the timeliness of the acquired data are ensured.
Example 6
Embodiments of the present invention provide a non-transitory (non-volatile) computer storage medium having stored thereon computer-executable instructions that may perform a method in any of the above-described method embodiments.
Example 7
Embodiments of the present invention provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of the above aspects.
Example 8
Fig. 7 is a schematic hardware structure diagram of an electronic device for executing a method of acquiring data according to an embodiment of the present invention, and as shown in the figure, the electronic device includes one or more processors 610 and a memory 620. Take a processor 610 as an example. The apparatus may further include: an input device 630 and an output device 640.
The processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or other means, such as the bus connection in fig. 6.
The memory 620, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The processor 610 executes various functional applications and data processing of the electronic device, i.e., the processing method of the above-described method embodiment, by executing the non-transitory software programs, instructions and modules stored in the memory 620.
The memory 620 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data and the like. Further, the memory 620 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 620 optionally includes memory located remotely from the processor 610, which may be connected to the processing device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 630 may receive input numeric or character information and generate a signal input. The output device 640 may include a display device such as a display screen.
The one or more modules are stored in the memory 620 and, when executed by the one or more processors 610, perform: acquiring first data, and recording first time for acquiring the first data; when a data acquisition request sent by a user is received, judging whether the time interval between the time when the user sends the data acquisition request and the first time is smaller than a preset time interval or not; and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, displaying the first data.
In a possible implementation manner, after determining whether a time interval between the time when the user issues the data obtaining request and the first time is smaller than a preset time interval, performing: and when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, acquiring second data.
In one possible implementation, after the obtaining of the second data, performing: updating the first data according to the second data; and recording a second time for acquiring the second data, and updating the first time according to the second time.
In one possible implementation manner, the acquiring the second data includes: sending a request for acquiring the second data; and receiving the second data.
In one possible implementation manner, the displaying the first data includes: and acquiring and displaying the first data from a local cache.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The electronic device of the embodiments of the present invention exists in various forms including, but not limited to, the following devices.
A mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include PDA, MID, and UMPC devices, such as ipads.
A portable entertainment device: such devices can display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.
A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
And other electronic devices with data interaction functions.
The above-described embodiments of the apparatus are merely illustrative, and 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 place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions substantially or contributing to the related art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will 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; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A method of acquiring data, comprising:
acquiring first data, and recording first time for acquiring the first data;
when a data acquisition request sent by a user is received, judging whether the time interval between the time when the user sends the data acquisition request and the first time is smaller than a preset time interval or not; and
and when the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval, displaying the first data.
2. The method of claim 1, further comprising, after determining whether a time interval between the time when the user issues the request to obtain data and the first time is less than a preset time interval:
and when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, acquiring second data.
3. The method of claim 2, further comprising, after said obtaining second data:
updating the first data according to the second data; and
and recording a second time for acquiring the second data, and updating the first time according to the second time.
4. The method of claim 2, wherein the obtaining second data comprises:
sending a request for acquiring the second data; and
receiving the second data.
5. The method of claim 1, wherein the displaying the first data comprises:
and acquiring and displaying the first data from a local cache.
6. An apparatus for acquiring data, comprising:
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring first data and recording first time for acquiring the first data;
the judging module is used for judging whether the time interval between the time when the user sends the data acquisition request and the first time is less than the preset time interval or not when the data acquisition request sent by the user is received; and
and the processing module is used for displaying the first data when the time interval between the time of sending the data acquisition request by the user and the first time is less than a preset time interval.
7. The apparatus of claim 6, wherein the processing module is further configured to: and when the time interval between the time when the user sends the data acquisition request and the first time is greater than the preset time interval, acquiring second data.
8. The apparatus of claim 7, further comprising:
the updating module is used for updating the first data according to the second data after the second data is acquired; and
and recording a second time for acquiring the second data, and updating the first time according to the second time.
9. The apparatus of claim 7, wherein the processing module is configured to: sending a request for acquiring the second data; and
receiving the second data.
10. The apparatus of claim 6, wherein the processing module is configured to: and acquiring and displaying the first data from a local cache.
11. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
CN201611032510.2A 2016-11-18 2016-11-18 Data acquisition method, device and electronic equipment Pending CN106454419A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611032510.2A CN106454419A (en) 2016-11-18 2016-11-18 Data acquisition method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611032510.2A CN106454419A (en) 2016-11-18 2016-11-18 Data acquisition method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN106454419A true CN106454419A (en) 2017-02-22

Family

ID=58221011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611032510.2A Pending CN106454419A (en) 2016-11-18 2016-11-18 Data acquisition method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN106454419A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111142740A (en) * 2018-11-02 2020-05-12 腾讯科技(深圳)有限公司 Data updating method, device and storage medium
CN113051451A (en) * 2019-12-27 2021-06-29 佛山市顺德区美的饮水机制造有限公司 Data transmission method, device and storage medium in wireless Internet of things system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103905441A (en) * 2014-03-28 2014-07-02 广州华多网络科技有限公司 Data acquisition method and device
CN103986773A (en) * 2014-05-26 2014-08-13 北京奇艺世纪科技有限公司 Data request response method and device
CN104572105A (en) * 2015-01-07 2015-04-29 广东欧珀移动通信有限公司 Data updating method and device
US9215292B2 (en) * 2012-08-22 2015-12-15 Canon Kabushiki Kaisha Information processing apparatus, data distribution system, method of controlling information processing apparatus, and storage medium
CN105550287A (en) * 2015-12-10 2016-05-04 海智网聚网络技术(北京)有限公司 Method and device used in data presentation and auxiliary data presentation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9215292B2 (en) * 2012-08-22 2015-12-15 Canon Kabushiki Kaisha Information processing apparatus, data distribution system, method of controlling information processing apparatus, and storage medium
CN103905441A (en) * 2014-03-28 2014-07-02 广州华多网络科技有限公司 Data acquisition method and device
CN103986773A (en) * 2014-05-26 2014-08-13 北京奇艺世纪科技有限公司 Data request response method and device
CN104572105A (en) * 2015-01-07 2015-04-29 广东欧珀移动通信有限公司 Data updating method and device
CN105550287A (en) * 2015-12-10 2016-05-04 海智网聚网络技术(北京)有限公司 Method and device used in data presentation and auxiliary data presentation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111142740A (en) * 2018-11-02 2020-05-12 腾讯科技(深圳)有限公司 Data updating method, device and storage medium
CN113051451A (en) * 2019-12-27 2021-06-29 佛山市顺德区美的饮水机制造有限公司 Data transmission method, device and storage medium in wireless Internet of things system

Similar Documents

Publication Publication Date Title
CN109542614B (en) Resource allocation method, device, terminal and storage medium
WO2017185616A1 (en) File storage method and electronic equipment
WO2017166630A1 (en) Task priority correctingon method and device
WO2017107542A1 (en) Video program obtaining method, device and system
CN110275723A (en) Obtain method, apparatus, electronic equipment and the readable medium of resource
CN113254105B (en) Resource processing method and device, storage medium and electronic equipment
US10802939B2 (en) Method for scanning cache of application and electronic device
US9588757B2 (en) Data update method, user terminal, and data update system
WO2017197888A1 (en) Information sharing method, intelligent terminal, and system
CN107391108B (en) Notification bar information correction method and device and electronic equipment
CN110310139B (en) Data delivery method and data delivery engine device
CN111198859A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN110784520A (en) File downloading method and device and electronic equipment
US20170163787A1 (en) Method and electronic device for upgrading or downgrading system
US20170171339A1 (en) Advertisement data transmission method, electrnoic device and system
CN106815042A (en) The dynamic loading method of refresh page, device and electronic equipment
CN111767558A (en) Data access monitoring method, device and system
CN111309406A (en) Event processing method and device of application program and electronic equipment
CN106815283A (en) Data processing method, device and electronic equipment
CN106454419A (en) Data acquisition method, device and electronic equipment
CN109218793A (en) Video loading method, device, electronic equipment and computer readable storage medium
CN106055210A (en) Method and device for processing icons
CN106790445A (en) Data transmission method, device and electronic equipment based on Samba agreements
CN111767074A (en) Configuration updating method, device, terminal and storage medium
CN109547630B (en) Cloud mobile phone use method and device during screen locking, computer equipment and storage medium

Legal Events

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

Application publication date: 20170222

WD01 Invention patent application deemed withdrawn after publication