CN112118304A - Data pre-caching method and device, electronic equipment and storage medium - Google Patents

Data pre-caching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112118304A
CN112118304A CN202010949268.5A CN202010949268A CN112118304A CN 112118304 A CN112118304 A CN 112118304A CN 202010949268 A CN202010949268 A CN 202010949268A CN 112118304 A CN112118304 A CN 112118304A
Authority
CN
China
Prior art keywords
weak network
network area
entered
data
weak
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
CN202010949268.5A
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010949268.5A priority Critical patent/CN112118304A/en
Publication of CN112118304A publication Critical patent/CN112118304A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/42Determining position
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/52Determining velocity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a data pre-caching method and device, electronic equipment and a storage medium. The data pre-caching method is executed on a client side and comprises the following steps: the method comprises the steps of regularly acquiring GPS positioning information of a mobile terminal where a client is located, wherein the GPS positioning information comprises a positioning position; judging whether a weak network area to be entered by the mobile terminal exists or not according to the current positioning position; when the weak network area to be entered is determined to exist, calculating the time length required for passing through the weak network area to be entered; and downloading the pre-cached data according to the duration, and caching the pre-cached data. In the embodiment of the invention, the pre-cache data is downloaded and cached in advance before entering the weak network area according to the time length required for passing through the weak network area to be entered, so that the pre-cache data can support the browsing requirement in the weak network area to be entered, the client can still be normally used in the weak network area, and the user experience is improved.

Description

Data pre-caching method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data pre-caching method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of network technologies, users increasingly rely on obtaining various information through networks. In order to meet the requirements of users, the types of clients used by the users are more and more, and the functions are more and more abundant. The user can acquire various information such as watching a video, listening to music, and the like through the client.
The client typically needs to be connected to a cellular network for use. However, due to the fact that the coverage of the base station is small or the base station is indoors, the cellular network signal may be weak or not. When the user enters the area with weak cellular network signals or no cellular network signals, the cellular network is basically in an unavailable state, so that the client cannot be normally used, and the user experience is reduced.
Disclosure of Invention
The embodiment of the invention aims to provide a data pre-caching method, a data pre-caching device, electronic equipment and a storage medium, so that a client can still be normally used when the client is in a weak network area, and user experience is improved. The specific technical scheme is as follows:
in a first aspect of the present invention, a data pre-caching method is first provided, where the method is executed on a client, and the method includes:
the method comprises the steps of regularly acquiring GPS positioning information of a mobile terminal where a client is located, wherein the GPS positioning information comprises a positioning position;
judging whether a weak network area to be entered by the mobile terminal exists or not according to the current positioning position;
when the weak network area to be entered is determined to exist, calculating the time length required for passing through the weak network area to be entered;
and downloading the pre-cached data according to the duration, and caching the pre-cached data.
Optionally, the determining, according to the current location, whether a weak network area to which the mobile terminal is about to enter exists includes: acquiring circle center positions and diameters of weak network areas contained in a preset cellular network quality map; aiming at each weak network area, calculating a first distance between a current positioning position and the circle center position of the weak network area; and when the first distance is greater than the radius of the weak network area and less than the sum of the radius of the weak network area and a preset distance threshold, determining the weak network area as the target weak network area to be entered.
Optionally, the GPS positioning information further includes a positioning timestamp; the calculating the time length required for passing through the upcoming weak network area comprises: calculating the moving speed according to the positioning position and the positioning time stamp which are included by the at least two pieces of GPS positioning information; acquiring the diameter of the to-be-entered weak network area contained in a preset cellular network quality map; when the number of the weak network areas to be entered is one, dividing the diameter of the weak network areas to be entered by the moving speed to obtain a quotient, and taking the quotient as the duration; and when the number of the weak network areas to be entered is multiple, selecting the weak network area with the largest diameter from the weak network areas to be entered, and taking the quotient obtained by dividing the diameter of the selected weak network area by the moving speed as the duration.
Optionally, after downloading the pre-cached data according to the duration and caching the pre-cached data, the method further includes: judging whether the target weak network area is entered or not according to the current positioning position; the target weak network area is one of the weak network areas to be entered; and when the target weak network area is judged to be entered, reading the cached pre-cached data and displaying the pre-cached data.
Optionally, the determining whether to enter the target weak network area according to the current location position includes: acquiring the circle center position and the diameter of the to-be-entered weak network area contained in a preset cellular network quality map; calculating a second distance between the current positioning position and the circle center position of the to-be-entered weak network area aiming at each to-be-entered weak network area; and when the second distance is smaller than or equal to the radius of the to-be-entered weak network area, taking the to-be-entered weak network area as the target weak network area, and determining that the to-be-entered weak network area enters the target weak network area.
Optionally, after the presenting the pre-cached data, the method further includes: judging whether the target weak network area is left or not according to the current positioning position; and when the target weak network area is judged to be left, stopping downloading the pre-cached data according to the duration.
Optionally, the downloading the pre-cached data according to the duration includes: acquiring the data volume required by browsing the duration at the client; and downloading data with the data volume larger than or equal to the data volume, and taking the downloaded data as the pre-cache data.
Optionally, the determining whether to leave the target weak network area according to the current location position includes: acquiring the circle center position and the diameter of the target weak network area contained in a preset cellular network quality map; calculating a third distance between the current positioning position and the circle center position of the target weak network area; and when the third distance is greater than or equal to the radius of the target weak network area, determining that the mobile terminal is away from the target weak network area.
In a second aspect of the present invention, there is also provided a data pre-caching apparatus applied to a client, where the apparatus includes:
the acquisition module is used for acquiring the GPS positioning information of the mobile terminal where the client is located at fixed time, and the GPS positioning information comprises a positioning position;
the first judgment module is used for judging whether a weak network area to which the mobile terminal is about to enter exists or not according to the current positioning position;
the calculation module is used for calculating the time length required for the weak network area to enter to pass through when the first judgment module judges that the weak network area to enter exists;
and the cache module is used for downloading the pre-cached data according to the duration and caching the pre-cached data.
Optionally, the first determining module includes: the first acquisition unit is used for acquiring the circle center position and the diameter of each weak network area contained in a preset cellular network quality map; the first distance calculation unit is used for calculating a first distance between the current positioning position and the circle center position of each weak network area; a first comparing unit, configured to determine the weak network area as the target weak network area to be entered when the first distance is greater than the radius of the weak network area and smaller than a sum of the radius of the weak network area and a preset distance threshold.
Optionally, the GPS positioning information further includes a positioning timestamp; the calculation module comprises: the speed calculation unit is used for calculating the moving speed according to the positioning position and the positioning time stamp which are included by the at least two pieces of GPS positioning information; a diameter obtaining unit, configured to obtain a diameter of the weak network area to be entered, where the diameter is included in a preset cellular network quality map; a first time length calculating unit, configured to, when the upcoming weak network area is one, divide a quotient obtained by dividing the diameter of the upcoming weak network area by the moving speed, as the time length; and the second duration calculation unit is used for selecting the weak network area with the largest diameter from the to-be-entered weak network areas when the to-be-entered weak network areas are multiple, and dividing the diameter of the selected weak network area by the moving speed to obtain a quotient serving as the duration.
Optionally, the apparatus further comprises: the second judgment module is used for judging whether the target weak network area is entered or not according to the current positioning position; the target weak network area is one of the weak network areas to be entered; and the display module is used for reading the cached pre-cached data and displaying the pre-cached data when the second judgment module judges that the target weak network area is entered.
Optionally, the second determining module includes: a second obtaining unit, configured to obtain a circle center position and a diameter of the weak network area to be entered, where the circle center position and the diameter are included in a preset cellular network quality map; the second distance calculation unit is used for calculating a second distance between the current positioning position and the circle center position of the to-be-entered weak network area aiming at each to-be-entered weak network area; and a second comparing unit, configured to determine that the mobile terminal enters the target weak network area, using the incoming weak network area as the target weak network area when the second distance is smaller than or equal to the radius of the incoming weak network area.
Optionally, the apparatus further comprises: the third judging module is used for judging whether the target weak network area is left or not according to the current positioning position; and the stopping module is used for stopping downloading the pre-cached data according to the duration when the third judging unit judges that the target weak network area is left.
Optionally, the cache module includes: a fourth obtaining unit, configured to obtain a data size required for browsing the duration at the client; and the downloading unit is used for downloading the data with the data volume more than or equal to the data volume and taking the downloaded data as the pre-cache data.
Optionally, the third determining module includes: a third obtaining unit, configured to obtain a circle center position and a diameter of the target weak network area included in a preset cellular network quality map; the third distance calculation unit is used for calculating a third distance between the current positioning position and the circle center position of the target weak network area; and a third comparing unit, configured to determine that the mobile terminal is away from the target weak network area when the third distance is greater than or equal to the radius of the target weak network area.
In another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; a memory for storing a computer program; and the processor is used for realizing any one of the data pre-caching methods when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to implement any one of the data pre-caching methods described above.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to implement any of the data pre-caching methods described above.
According to the data pre-caching method and device, the electronic equipment and the storage medium, the client side obtains the GPS positioning information of the mobile terminal where the client side is located at regular time, and the GPS positioning information comprises the positioning position; judging whether a weak network area to be entered by the mobile terminal exists or not according to the current positioning position; when the weak network area to be entered is determined to exist, calculating the time length required for passing through the weak network area to be entered; and downloading the pre-cached data according to the duration, and caching the pre-cached data. Therefore, in the embodiment of the invention, the pre-cached data is downloaded and cached in advance according to the time length required for passing through the weak network area to be entered before entering the weak network area, so that the pre-cached data can support the browsing requirement in the weak network area to be entered, the client can still be normally used in the weak network area, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart illustrating steps of a data pre-caching method according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a procedure for reporting weak network information by a client according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating steps of a server generating a cellular network quality map according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a weak network area in an embodiment of the present invention.
FIG. 5 is a flowchart illustrating steps of another data pre-caching method according to an embodiment of the present invention.
Fig. 6 is a flowchart illustrating a further data pre-caching method according to an embodiment of the present invention.
Fig. 7 is a block diagram of a data pre-caching device according to an embodiment of the present invention.
Fig. 8 is a block diagram of another data pre-caching device according to an embodiment of the present invention.
Fig. 9 is a block diagram of an electronic device in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Fig. 1 is a flowchart illustrating steps of a data pre-caching method according to an embodiment of the present invention. The data pre-caching method shown in fig. 1 is applied to a client. The client may be an APP (application program) installed on a device such as a mobile terminal. The mobile terminal may be a mobile phone, a tablet, a wearable device, etc.
As shown in fig. 1, the data pre-caching method may include the following steps:
step 101, acquiring the GPS positioning information of the mobile terminal where the client is located at regular time, wherein the GPS positioning information comprises a positioning position.
The mobile terminal has a GPS (Global Positioning System) Positioning function, and can perform GPS Positioning in real time. In the running process of the client, the GPS positioning information of the mobile terminal where the client is located can be obtained at regular time. The GPS location information may include a location position, a location timestamp, a location accuracy, and the like.
For the specific time interval for acquiring the GPS positioning information, any applicable value may be set according to the actual situation, for example, the GPS positioning information is acquired every 2 seconds, 3 seconds, 5 seconds, 8 seconds, and the like, which is not limited in this embodiment of the present invention.
And step 102, judging whether a weak network area to be entered by the mobile terminal exists or not according to the current positioning position.
After the client acquires a piece of GPS positioning information, whether a weak network area to which the mobile terminal is about to enter exists is judged according to the current positioning position included in the GPS positioning information.
The weak network area refers to an area where cellular network information is weak or no cellular network signal exists. In the embodiment of the invention, a cellular network quality map containing a plurality of weak network areas can be generated in advance, and whether the weak network area to which the mobile terminal is about to enter exists or not can be judged based on the cellular network quality map. Specific processes will be described in detail in the following examples.
And 103, when the entering weak network area exists, calculating the time required for passing through the entering weak network area.
And 104, downloading the pre-cached data according to the duration, and caching the pre-cached data.
Because the client cannot be used in the weak network area in a normal networking mode, when the client is judged to be in the weak network area to be entered, partial pre-cache data can be downloaded and cached in advance, so that the pre-cache data can be displayed normally after the client enters the weak network area. In the embodiment of the invention, the time length required for passing through the to-be-entered weak network area can be calculated, and the pre-cache data is downloaded according to the time length, so that the pre-cache data can support the display requirement from the time when the user enters the weak network area to the time when the user leaves the weak network area.
In the embodiment of the invention, the pre-cache data is downloaded and cached in advance before entering the weak network area according to the time length required for passing through the weak network area to be entered, so that the pre-cache data can support the browsing requirement in the weak network area to be entered, the client can still be normally used in the weak network area, and the user experience is improved.
Next, a process of generating a cellular network quality map will be described. The process of generating a cellular network quality map may include a client-executed portion and a server-executed portion. The client is used for reporting the information of the weak network, and the server is used for generating a cellular network quality map according to the information reported by the client.
Fig. 2 is a flowchart illustrating a procedure for reporting weak network information by a client according to an embodiment of the present invention.
As shown in fig. 2, the process of reporting the weak network information by the client may include the following steps:
step 201, network request quality data is obtained.
The client can obtain the network request quality data after sending the network request once. The network request quality data may include information on time consumed for the request, result of the request, network speed, etc. Wherein the request result comprises request success and request failure.
Step 202, determine whether to use a cellular network. If yes, go to step 203; if not, return to step 201.
The client determines whether it is using the cellular network. If the ue uses the cellular network, the step 203 is continued, and if the ue does not use the cellular network, the step 201 is returned.
And step 203, judging whether the GPS use authority is available. If yes, go to step 204; if not, return to step 201.
And step 204, inputting the network request quality data into the weak network detection model.
And step 205, judging whether the current cellular network is in a weak network state according to the output of the weak network detection model. If yes, go to step 206; if not, return to step 201.
In the case where the client uses a cellular network, it may be determined whether the current cellular network is in a weak network state.
In the embodiment of the invention, whether the current cellular network is in the weak network state can be judged by utilizing the pre-trained weak network detection model. For example, the weak network detection model may take the form of a convolutional neural network model or the like. In the process of training the weak network detection model, a large amount of positive sample data and negative sample data are obtained. The positive sample data comprises the network request quality data and the marking information in the weak network state, and the negative sample comprises the network request quality data and the marking information in the non-weak network state. And training the weak network detection model to be trained based on the positive sample data and the negative sample data. And taking the network request quality data in the sample data as the input of the weak network detection model to be trained, calculating a loss value according to the output of the weak network detection model to be trained and the label information in the sample data, determining that the training is finished when the loss value is less than a preset loss threshold value, and taking the trained model as the weak network detection model.
For example, the label information indicates the probability that the actual cellular network is in the weak network state, the label information corresponding to the weak network state is 1, and the label information corresponding to the non-weak network state is 0. The output of the weak network detection model to be trained represents the probability that the predicted cellular network is in a weak network state. The difference between the labeling information and the output of the weak network detection model to be trained can be used as a loss value. For example, if the output of the weak network detection model is 0.8 and the label information is 1, the loss value may be 0.2. Any suitable value for the loss threshold may be selected based on practical experience. For example, loss thresholds of 0.1, 0.2, 0.3, etc. may be set.
And after the weak network detection model is obtained through training, storing the weak network detection model in the client. Inputting the network request quality data obtained in step 201 into the weak network detection model to obtain the probability that the current cellular network output by the weak network detection model is in the weak network state. And when the probability that the current cellular network is in the weak network state is greater than a preset probability threshold value, determining that the current cellular network is in the weak network state. For the specific value of the probability threshold, any suitable value can be selected according to practical experience. For example, probability thresholds of 0.7, 0.8, 0.9, etc. may be set.
And step 206, acquiring the GPS positioning information of the mobile terminal where the client is located.
And after judging that the current cellular network is in a weak network state, acquiring the GPS positioning information of the mobile terminal where the client is located. Optionally, in the process of acquiring the GPS positioning information, the GPS positioning information with corresponding accuracy may be acquired according to the positioning accuracy specified by the user. The GPS positioning information may include a positioning location, a positioning timestamp, a positioning accuracy, and the like.
Step 207, judging whether the positioning position changes. If yes, go to step 208; if not, return to step 201.
And step 208, reporting the GPS positioning information and the weak network state to the server.
If the positioning position changes, the fact that a new positioning position in a weak network state is generated is indicated, and therefore the client reports the GPS positioning information and the weak network state to the server. If the positioning position is not changed, repeated reporting is not needed.
Fig. 3 is a flowchart illustrating steps of a server generating a cellular network quality map according to an embodiment of the present invention.
As shown in fig. 3, the process of the server generating the cellular network quality map may include the following steps:
step 301, acquiring the GPS positioning information and the weak network status reported by the client.
Step 302, determine whether the position location already exists. If yes, go to step 304; if not, go to step 303.
Step 303, newly establishing the positioning position.
And step 304, updating the reporting times of the positioning position.
If the new positioning position is established, updating the reporting times of the positioning position to one time. If the position is the existing position, the reporting times of the position is increased once.
Step 305, judging whether the current time and the last clustering time reach a first preset time length. If yes, go to step 306; if not, return to step 301.
In the embodiment of the invention, the clustering time of the current time can be recorded after each clustering, and the clustering can be performed once every first preset time length to generate the cellular network quality map once. For the specific value of the first preset duration, any applicable value can be selected according to practical experience. For example, the first preset time period may be set to 30 minutes, 1 hour, 2 hours, and so on.
And step 306, selecting the positioning position of which the time length of the positioning timestamp from the current time is less than a second preset time length and the reporting times exceed a preset number threshold.
The cellular network state corresponding to the positioning location before a long time may no longer be accurate, for example, a certain positioning location is in a weak network state before one week due to a base station failure, but the base station failure is eliminated currently, so that the positioning location may be in a non-weak network state currently. In order to avoid inaccurate results caused by clustering by using the inaccurate positioning positions of the cellular network state, the positioning position of which the time length of the positioning timestamp from the current time is less than a second preset time length can be selected. For the specific value of the second preset duration, any suitable value can be selected according to practical experience. For example, the second preset time period may be set to 12 hours, 1 day, 2 days, etc.
Since the cellular network state corresponding to the positioning location with a small number of reporting times may be inaccurate, for example, a certain positioning location is reported only 10 times, the positioning location may be determined to be in the weak network state due to a detection error, and actually the positioning location may not be in the weak network state really. In order to avoid the inaccurate result caused by clustering by using the inaccurate positioning positions of the cellular network state, the positioning positions with the reporting times exceeding the preset number threshold value can be selected. For the specific value of the preset number threshold, any suitable value can be selected according to practical experience. For example, the number threshold may be set to 300 times, 500 times, 800 times, and so on.
Therefore, in the embodiment of the invention, when the distance between the current time and the last clustering time reaches the first preset time, the positioning position where the distance between the positioning timestamp and the current time is less than the second preset time and the reporting times exceeds the preset number threshold is selected.
And 307, clustering the selected positioning positions.
The clustering process may include:
(1) and dividing according to the cities, and selecting the positioning positions contained in the current city.
(2) The current city is divided according to preset areas, the positioning positions contained in each preset area form a data set, and the form of one data is 'positioning position, reporting times'.
For the specific numerical value of the preset area, any applicable value can be selected according to practical experience. For example, the preset area may be set to 1 square kilometer, 2 square kilometers, or the like.
(3) And calculating the number k of clusters obtained after clustering on the data set corresponding to the current preset area.
And carrying out three-dimensional histogram statistics on the data in the data set corresponding to the current preset area, wherein the height of the three-dimensional histogram represents the reporting times corresponding to the same positioning position, and the reporting times corresponding to the peak top in the three-dimensional histogram can be found by traversing the three-dimensional histogram. And taking the number of the peak tops with the reporting times larger than the preset time threshold value as the number k of the clusters. For the specific numerical value of the preset time threshold, any applicable value can be selected according to practical experience. For example, the number threshold may be set to 1000 times, 1500 times, and so on.
(4) And performing k-means clustering on the data set corresponding to the current preset area by taking the positioning positions corresponding to the k peak tops as initial centroids to obtain k clusters.
And 308, generating a cellular network quality map according to the clustering result.
The process of generating a cellular network quality map may include:
(1) and calculating the distance between every two positioning positions in the cluster aiming at each cluster corresponding to the current preset area, taking the distance between the two positioning positions with the largest distance as the diameter, taking the midpoint of the two positioning positions with the largest distance as the center of a circle, and abstracting each cluster into a circular area.
Fig. 4 is a schematic diagram of a weak network area in an embodiment of the present invention. In fig. 4, a circular area is an abstract circular area from a cluster.
(2) Aiming at circular areas contained in all preset areas in the current city, the circular areas with intersection are combined into one circular area, the smallest circular area of the circular areas with intersection can be contained, and the weak network area contained in the current city is obtained. Wherein, a circular area is a weak net area.
(3) And taking the weak network area contained in the current city as the weak network area in the cellular network quality map corresponding to the current city, and writing the diameter and the circle center position of each weak network area into an index file corresponding to the weak network area.
FIG. 5 is a flowchart illustrating steps of another data pre-caching method according to an embodiment of the present invention. The data pre-caching method shown in fig. 5 is applied to the client.
As shown in fig. 5, the data pre-caching method may include the following steps:
step 501, the client starts.
Step 502, determine if a new version of the cellular network quality map exists. If yes, go to step 503; if not, go to step 504.
After the client is started, a version acquisition request is sent to the server, and the version acquisition request can carry information such as a city where the client is located at present. And after receiving the version acquisition request, the server returns the version information of the cellular network quality map corresponding to the city where the client is located to the client. And the client compares the version information returned by the server with the version information of the cellular network quality map corresponding to the current city locally stored by the client. If the comparison result is inconsistent, determining that the new version of the cellular network quality map exists at the server; otherwise, determining that the new version of the cellular network quality map does not exist in the server.
Step 503, downloading the new version of the cellular network quality map.
And after judging that the new version of the cellular network quality map exists in the server, the client downloads the new version of the cellular network quality map corresponding to the city where the client is located from the server.
At step 504, a determination is made as to whether a cellular network is in use. If yes, go to step 505; if not, the process is ended.
The client determines whether it is using the cellular network. If the ue uses the cellular network, step 505 is continued, and if the ue does not use the cellular network, the data and caching method of the embodiment of the present invention need not be executed.
And 505, judging whether the GPS use authority exists. If yes, go to step 507; if not, go to step 506.
Step 506, determine whether to complete GPS authorization. If yes, go to step 507; if not, the process is ended.
When the client does not have the GPS use right currently, the client can display prompt information for prompting the user to carry out GPS authorization, and if the user authorizes the GPS to the client, the GPS authorization is determined to be finished.
And step 507, acquiring the GPS positioning information of the mobile terminal where the client is located at regular time.
After the client has the GPS use authority, the GPS positioning information of the mobile terminal is acquired at regular time in the running process. Optionally, in the process of acquiring the GPS positioning information, the GPS positioning information with corresponding accuracy may be acquired according to the positioning accuracy specified by the user. The GPS positioning information may include a positioning location, a positioning timestamp, a positioning accuracy, and the like.
Step 508, judging whether a weak network area to which the mobile terminal is about to enter exists. If yes, go to step 509; if not, the process is ended.
After acquiring GPS positioning information, the client judges whether a weak network area to which the mobile terminal is about to enter exists according to the current positioning position.
In an alternative embodiment, the process of determining whether the weak network area to which the mobile terminal is about to enter exists according to the current location position may include the following steps a1 to A3:
step A1, obtaining the circle center position and diameter of each weak network area contained in the preset cellular network quality map.
The method comprises the steps that a client side obtains a locally stored cellular network quality map corresponding to a current city, the cellular network quality map comprises at least one circular weak network area, each weak network area is provided with a corresponding index file, and the index files comprise the circle center position and the diameter of the weak network area.
Step A2, calculating a first distance between the current positioning position and the center position of the weak network area for each weak network area.
The client calculates a first distance between a current positioning position (positioning longitude and latitude) and a circle center position (circle center longitude and latitude) of a weak network area aiming at each weak network area contained in a cellular network quality map corresponding to a current city.
If the earth is assumed to be a perfect sphere, its radius is denoted as R. If the meridian of 0 degree is taken as a reference, the earth surface distance between any two points on the earth surface can be calculated according to the longitude and latitude of the two points (the error of the earth surface topography on the calculation is ignored, and is only a theoretical estimation value). If the longitude and latitude of the point A is (LonA, LatA) and the longitude and latitude of the point B is (LonB, LatB), the following formula I for calculating the distance between the two points can be obtained according to triangular derivation:
D=R×Arccos[sin(LatA)×sin(LatB)+cos(LatA)×cos(LatB)×cos(LonA-LonB)]
formula one
In formula one, D represents the distance between point a and point B, R represents the radius of the earth, sin represents a sine function, cos represents a cosine function, and Arccos represents an inverse cosine function. The units of R and D are the same.
Therefore, the first distance between the current positioning position and the center position of the weak network area may be calculated by using the above formula, with the current positioning position as the point a and the center position of the weak network area as the point B.
Step a3, when the first distance is greater than the radius of the weak network area and less than the sum of the radius of the weak network area and a preset distance threshold, determining the weak network area as the target weak network area to be entered.
And when a first distance between the current positioning position and the center position of a certain weak network area is larger than the radius of the weak network area and smaller than the sum of the radius of the weak network area and a preset distance threshold, judging the weak network area as a target weak network area to enter. There may be one or more target weak network areas to be entered.
For the specific value of the preset distance threshold, any applicable value may be set according to the actual situation, for example, the distance threshold may be set to be 50 meters, 80 meters, 100 meters, and the like, which is not limited in this embodiment of the present invention.
Step 509, calculate the length of time required to traverse the area of the weak network to be entered.
After determining that there is an upcoming weak network area, calculating a time period required to pass through the upcoming weak network area.
In an alternative embodiment, the process of calculating the time period required to pass through the upcoming weak network area may include the following steps B1-B3:
and step B1, calculating the moving speed according to the positioning position and the positioning time stamp included in the at least two pieces of GPS positioning information.
The client may obtain a positioning location and a positioning timestamp included in the at least two GPS positioning information.
If the positioning positions and the positioning time stamps included in the two pieces of GPS positioning information are acquired, the distance between the two positioning positions is calculated, the duration between the two positioning time stamps is calculated, the distance is divided by the duration, and the obtained quotient is used as the moving speed.
If the positioning positions and the positioning time stamps included in at least three pieces of GPS positioning information are acquired, respectively calculating the distance between two adjacent positioning positions, calculating the time length between two adjacent positioning time stamps, calculating the quotient of the distance between two adjacent positioning positions divided by the time length between two adjacent positioning positions, taking the obtained quotient as the moving speed between two adjacent positioning positions, and finally calculating the average value of all moving speeds as the final moving speed.
And step B2, acquiring the diameter of the weak network area to be entered, which is contained in a preset cellular network quality map.
Step B3, when the number of the weak network areas to be entered is one, dividing the diameter of the weak network areas to be entered by the moving speed to obtain a quotient, and taking the quotient as the duration; and when the number of the weak network areas to be entered is multiple, selecting the weak network area with the largest diameter from the weak network areas to be entered, and taking the quotient obtained by dividing the diameter of the selected weak network area by the moving speed as the duration.
And 510, downloading the pre-cached data according to the duration, and caching the pre-cached data.
And the client downloads the pre-cached data according to the time length required for passing through the to-be-entered weak network area.
In an optional implementation manner, the process of downloading the pre-cached data according to the duration may include: acquiring the data volume required by browsing the duration at the client; and downloading data with the data volume larger than or equal to the data volume, and taking the downloaded data as the pre-cache data. For example, the browsing data volume in the latest third preset time period may be obtained based on the historical browsing data at the client, the ratio of the browsing data volume to the third preset time period is calculated, and the ratio is used as the browsing speed; and then calculating the product of the browsing speed and the time length required for passing through the weak network area to be entered, and taking the product as the data volume required for browsing the time length at the client. For the specific value of the third preset time, any suitable value can be selected according to practical experience. For example, the third preset time period may be set to 10 minutes, 20 minutes, 30 minutes, and so on. After downloading the pre-cached data, caching the pre-cached data so as to display the pre-cached data under the condition of poor network state after entering a certain weak network area.
For example, when a user browses a webpage while walking, it can be judged that the user is about to enter a weak network area according to the GPS positioning information, the area diameter of the weak network area is 200 meters, and according to a normal speed, the user needs to walk for 6-8 minutes to pass through the weak network area, so that the user can face that the user cannot continuously browse webpage information through a cellular network within 6-8 minutes. After the data pre-caching method of the embodiment of the invention is adopted, when a user is at a certain distance from the weak network area, such as 50 meters or 100 meters, the webpage information flow page can be preloaded, such as pre-caching the content of 10 pages, each page contains 10 pieces of content, and the like. Therefore, after the user enters the weak network area, the user can be supported to browse 10 cached page contents, the browsing requirement of the user in the weak network area can be supported, and the user can pass through the weak network area without sensing network interruption.
For another example, when a user watches videos while walking, the user can judge that the user is about to enter a weak network area according to the GPS positioning information, the area diameter of the weak network area is 200 meters, and according to a normal speed, the user needs to walk for 6-8 minutes to pass through the weak network area, so that the user cannot watch videos continuously through the cellular network within 6-8 minutes. After the data pre-caching method provided by the embodiment of the invention is adopted, the duration of the caching fragment of the video can be increased to 10 minutes when the user is at a certain distance from the weak network area, such as 50 meters or 100 meters. Therefore, after the user enters the weak network area, the user can be supported to watch the video which is cached for 10 minutes, the watching requirement of the user in the weak network area can be supported, and the user can pass through the weak network area without sensing network interruption.
According to the embodiment of the invention, the cellular network quality map can be made by carrying out the big data clustering algorithm on the cellular network monitoring data of the client at the server side, and the cellular network quality map is updated regularly. After the client is started, the cellular network quality map of the latest version is downloaded from the server, whether the weak network area is about to enter is judged based on the cellular network quality map, and data required to be browsed in the weak network area is buffered in advance before the weak network area is entered, so that a user can pass through the weak network area without perception, and user experience is improved.
Fig. 6 is a flowchart illustrating a further data pre-caching method according to an embodiment of the present invention. The data pre-caching method shown in fig. 6 is applied to the client.
As shown in fig. 6, the data pre-caching method may include the following steps:
step 601, acquiring the GPS positioning information of the mobile terminal where the client is located at regular time, wherein the GPS positioning information comprises a positioning position.
Step 602, determining whether a weak network area to be entered by the mobile terminal exists according to the current positioning position.
Step 603, when it is determined that the incoming weak network area exists, calculating a time period required for passing through the incoming weak network area.
And step 604, downloading the pre-cached data according to the duration, and caching the pre-cached data.
Step 605, determining whether to enter the target weak network area according to the current positioning position.
The client is in a mobile state, and the acquired GPS positioning information can change in real time. And the client downloads the pre-cached data according to the duration, continues to acquire the GPS positioning information of the mobile terminal where the client is positioned at regular time after caching the pre-cached data, and judges whether to enter a target weak network area in the to-be-entered weak network area or not according to the current positioning position.
In an alternative embodiment, the process of determining whether to enter the target weak network area according to the current location position may include the following steps C1-C3:
and step C1, acquiring the circle center position and the diameter of the weak network area to be entered, which are contained in a preset cellular network quality map.
The client acquires an index file of the to-be-entered weak network area in a locally-stored cellular network quality map corresponding to the current city, and acquires the circle center position and the diameter of the to-be-entered weak network area from the index file.
And step C2, calculating a second distance between the current positioning position and the center position of the to-be-entered weak network area for each to-be-entered weak network area.
When calculating the second distance between the current positioning position and the center position of the weak network area to be entered, the calculation may be performed by using the first formula. And during calculation, taking the current positioning position as a point A, and taking the circle center position of the to-be-entered weak network area as a point B.
And step C3, when the second distance is smaller than or equal to the radius of the to-be-entered weak network area, determining that the to-be-entered weak network area is the target weak network area, and entering the target weak network area.
When the second distance between the current positioning position and the center position of a certain to-be-entered weak network area is smaller than or equal to the radius of the to-be-entered weak network area, the user can be considered to enter the to-be-entered weak network area, and therefore the to-be-entered weak network area is used as a target weak network area for the user to enter.
And 606, reading the cached pre-cached data and displaying the pre-cached data when the target weak network area is judged to be entered.
When the user determines that the user enters the target weak network area, the cellular network cannot be normally used due to poor cellular network quality in the weak network area, so that the pre-cached data cached in advance can be read, and the pre-cached data is displayed, so that the user can still use the client in the weak network area, and the user may not feel that the cellular network is disconnected.
Step 607, determining whether to leave the target weak network area according to the current positioning position.
And after entering the target weak network area, the client continuously and regularly acquires the GPS positioning information of the mobile terminal where the client is positioned, and judges whether the client leaves the target weak network area or not according to the current positioning position.
In an alternative embodiment, the process of determining whether to leave the target weak network area according to the current location position may include the following steps D1-D3:
and D1, acquiring the circle center position and the diameter of the target weak network area contained in the preset cellular network quality map.
And the client acquires the index file of the target weak network area in a locally stored cellular network quality map corresponding to the current city, and acquires the circle center position and the diameter of the target weak network area from the index file of the target weak network area.
And D2, calculating a third distance between the current positioning position and the center position of the target weak network area.
When calculating the third distance between the current positioning position and the center position of the target weak network area, the calculation may be performed by using the first formula. And during calculation, taking the current positioning position as a point A, and taking the circle center position of the target weak network area as a point B.
And a step D3 of determining that the mobile terminal is separated from the target weak network area when the third distance is equal to or greater than the radius of the target weak network area.
When the third distance between the current positioning position and the center position of the target weak network area is greater than or equal to the radius of the target weak network area, the user can be considered to leave the target weak network area.
And step 608, stopping downloading the pre-cached data according to the duration when the target weak network area is determined to be left.
When the cellular network is judged to leave the target weak network area, the cellular network is recovered to be normal, at this time, the pre-cached data can not be downloaded continuously according to the time length required by passing through the to-be-entered weak network area, and the original caching mechanism can be continuously adopted to cache the data, so that the excessive consumption of network flow is avoided. For example, the page content may not be cached in advance before the web page is browsed, and a real-time recommendation mechanism is adopted. As another example, when watching a video, the buffering mechanism can be restored to originally buffer 10 seconds of video data.
Fig. 7 is a block diagram of a data pre-caching device according to an embodiment of the present invention. The data pre-caching device shown in fig. 7 is applied to a client.
As shown in fig. 7, the data pre-caching apparatus may include the following modules:
an obtaining module 701, configured to obtain, at regular time, GPS positioning information of a mobile terminal where the client is located, where the GPS positioning information includes a positioning location;
a first determining module 702, configured to determine whether a weak network area to which the mobile terminal is about to enter exists according to a current location;
a calculating module 703, configured to calculate a time length required for passing through the to-be-entered weak network area when the first determining module determines that the to-be-entered weak network area exists;
the cache module 704 is configured to download the pre-cached data according to the duration, and cache the pre-cached data.
Fig. 8 is a block diagram of another data pre-caching device according to an embodiment of the present invention. The data pre-caching device shown in fig. 8 is applied to a client.
As shown in fig. 8, the data pre-caching apparatus may include the following modules:
an obtaining module 801, configured to obtain, at regular time, GPS positioning information of a mobile terminal where the client is located, where the GPS positioning information includes a positioning location;
a first determining module 802, configured to determine whether a weak network area to which the mobile terminal is about to enter exists according to a current location;
a calculating module 803, configured to calculate a time duration required for passing through the upcoming weak network region when the first determining module determines that the upcoming weak network region exists;
the cache module 804 is configured to download the pre-cache data according to the duration, and cache the pre-cache data.
Optionally, the first determining module 802 includes: a first obtaining unit 8021, configured to obtain circle center positions and diameters of weak network areas included in a preset cellular network quality map; a first distance calculation unit 8022, configured to calculate, for each weak network area, a first distance between a current location position and a circle center position of the weak network area; a first comparing unit 8023, configured to determine the weak network area as the target weak network area to be entered when the first distance is greater than the radius of the weak network area and is less than a sum of the radius of the weak network area and a preset distance threshold.
Optionally, the GPS positioning information further includes a positioning timestamp; the calculation module 803 includes: a speed calculation unit 8031, configured to calculate a moving speed according to a positioning position and a positioning timestamp included in at least two pieces of GPS positioning information; a diameter obtaining unit 8032, configured to obtain a diameter of the area of the weak network to be entered, where the diameter is included in a preset cellular network quality map; a first time length calculation unit 8033, configured to, when the upcoming weak network area is one, divide a quotient obtained by dividing the diameter of the upcoming weak network area by the moving speed, as the time length; a second duration calculation unit 8034, configured to, when there are multiple weak network areas to be entered, select a weak network area with the largest diameter from the weak network areas to be entered, and divide a quotient obtained by dividing the diameter of the selected weak network area by the moving speed, as the duration.
Optionally, the apparatus further comprises: a second determining module 805, configured to determine whether to enter a target weak network area according to the current location; the target weak network area is one of the weak network areas to be entered; a displaying module 806, configured to read the cached pre-cached data and display the pre-cached data when the second determining module determines that the target weak network area is entered.
Optionally, the second determining module 805 includes: a second obtaining unit 8051, configured to obtain a circle center position and a diameter of the to-be-entered weak network area, where the circle center position and the diameter are included in a preset cellular network quality map; a second distance calculation unit 8052, configured to calculate, for each upcoming weak network area, a second distance between the current location position and a circle center position of the upcoming weak network area; a second comparing unit 8053, configured to determine that the incoming weak network area is the target weak network area when the second distance is smaller than or equal to the radius of the incoming weak network area, and determine that the mobile terminal enters the target weak network area.
Optionally, the apparatus further comprises: a third determining module 807, configured to determine whether to leave the target weak network area according to the current positioning position; a stopping module 808, configured to stop downloading the pre-cached data according to the duration when the third determining unit determines that the target weak network area is left.
Optionally, the third determining module 807 includes: a third obtaining unit 8071, configured to obtain a circle center position and a diameter of the target weak network area included in a preset cellular network quality map; a third distance calculating unit 8072, configured to calculate a third distance between the current positioning position and the circle center position of the target weak grid area; a third comparing unit 8073, configured to determine that the mobile terminal is away from the target weak network area when the third distance is greater than or equal to the radius of the target weak network area.
Optionally, the caching module 804 includes: a fourth obtaining unit 8041, configured to obtain a data amount required for browsing the duration at the client; the downloading unit 8042 is configured to download data of the data size greater than or equal to the data size, and use the downloaded data as the pre-cache data.
In the embodiment of the invention, the pre-cache data is downloaded and cached in advance before entering the weak network area according to the time length required for passing through the weak network area to be entered, so that the pre-cache data can be displayed under the condition that the network cannot be normally used after entering the weak network area, the client can still be normally used in the weak network area, and the user experience is improved.
The embodiment of the present invention further provides an electronic device, as shown in fig. 9, which includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904.
A memory 903 for storing computer programs;
the processor 901 is configured to implement the following steps when executing the program stored in the memory 903:
the method comprises the steps of regularly acquiring GPS positioning information of a mobile terminal where a client is located, wherein the GPS positioning information comprises a positioning position;
judging whether a weak network area to be entered by the mobile terminal exists or not according to the current positioning position;
when the weak network area to be entered is determined to exist, calculating the time length required for passing through the weak network area to be entered;
and downloading the pre-cached data according to the duration, and caching the pre-cached data.
Optionally, the determining, according to the current location, whether a weak network area to which the mobile terminal is about to enter exists includes: acquiring circle center positions and diameters of weak network areas contained in a preset cellular network quality map; aiming at each weak network area, calculating a first distance between a current positioning position and the circle center position of the weak network area; and when the first distance is greater than the radius of the weak network area and less than the sum of the radius of the weak network area and a preset distance threshold, determining the weak network area as the target weak network area to be entered.
Optionally, the GPS positioning information further includes a positioning timestamp; the calculating the time length required for passing through the upcoming weak network area comprises: calculating the moving speed according to the positioning position and the positioning time stamp which are included by the at least two pieces of GPS positioning information; acquiring the diameter of the to-be-entered weak network area contained in a preset cellular network quality map; when the number of the weak network areas to be entered is one, dividing the diameter of the weak network areas to be entered by the moving speed to obtain a quotient, and taking the quotient as the duration; and when the number of the weak network areas to be entered is multiple, selecting the weak network area with the largest diameter from the weak network areas to be entered, and taking the quotient obtained by dividing the diameter of the selected weak network area by the moving speed as the duration.
Optionally, after downloading the pre-cached data according to the duration and caching the pre-cached data, the method further includes: judging whether the target weak network area is entered or not according to the current positioning position; the target weak network area is one of the weak network areas to be entered; and when the target weak network area is judged to be entered, reading the cached pre-cached data and displaying the pre-cached data.
Optionally, the determining whether to enter the target weak network area according to the current location position includes: acquiring the circle center position and the diameter of the to-be-entered weak network area contained in a preset cellular network quality map; calculating a second distance between the current positioning position and the circle center position of the to-be-entered weak network area aiming at each to-be-entered weak network area; and when the second distance is smaller than or equal to the radius of the to-be-entered weak network area, taking the to-be-entered weak network area as the target weak network area, and determining that the to-be-entered weak network area enters the target weak network area.
Optionally, after the presenting the pre-cached data, the method further includes: judging whether the target weak network area is left or not according to the current positioning position; and when the target weak network area is judged to be left, stopping downloading the pre-cached data according to the duration.
Optionally, the downloading the pre-cached data according to the duration includes: acquiring the data volume required by browsing the duration at the client; and downloading data with the data volume larger than or equal to the data volume, and taking the downloaded data as the pre-cache data.
Optionally, the determining whether to leave the target weak network area according to the current location position includes: acquiring the circle center position and the diameter of the target weak network area contained in a preset cellular network quality map; calculating a third distance between the current positioning position and the circle center position of the target weak network area; and when the third distance is greater than or equal to the radius of the target weak network area, determining that the mobile terminal is away from the target weak network area.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the computer-readable storage medium runs on a computer, the computer is enabled to implement the data pre-caching method in any one of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to implement the data pre-caching method of any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A data pre-caching method, executed on a client, includes:
the method comprises the steps of regularly acquiring GPS positioning information of a mobile terminal where a client is located, wherein the GPS positioning information comprises a positioning position;
judging whether a weak network area to be entered by the mobile terminal exists or not according to the current positioning position;
when the weak network area to be entered is determined to exist, calculating the time length required for passing through the weak network area to be entered;
and downloading the pre-cached data according to the duration, and caching the pre-cached data.
2. The method according to claim 1, wherein said determining whether there is a weak network area to which the mobile terminal is about to enter according to the current location position comprises:
acquiring circle center positions and diameters of weak network areas contained in a preset cellular network quality map;
aiming at each weak network area, calculating a first distance between a current positioning position and the circle center position of the weak network area;
and when the first distance is greater than the radius of the weak network area and less than the sum of the radius of the weak network area and a preset distance threshold, determining the weak network area as the target weak network area to be entered.
3. The method of claim 1, wherein the GPS location information further comprises a location timestamp; the calculating the time length required for passing through the upcoming weak network area comprises:
calculating the moving speed according to the positioning position and the positioning time stamp which are included by the at least two pieces of GPS positioning information;
acquiring the diameter of the to-be-entered weak network area contained in a preset cellular network quality map;
when the number of the weak network areas to be entered is one, dividing the diameter of the weak network areas to be entered by the moving speed to obtain a quotient, and taking the quotient as the duration;
and when the number of the weak network areas to be entered is multiple, selecting the weak network area with the largest diameter from the weak network areas to be entered, and taking the quotient obtained by dividing the diameter of the selected weak network area by the moving speed as the duration.
4. The method of claim 1, wherein after the downloading the pre-buffered data according to the duration and buffering the pre-buffered data, the method further comprises:
judging whether the target weak network area is entered or not according to the current positioning position; the target weak network area is one of the weak network areas to be entered;
and when the target weak network area is judged to be entered, reading the cached pre-cached data and displaying the pre-cached data.
5. The method of claim 4, wherein the determining whether to enter the target weak network area according to the current positioning location comprises:
acquiring the circle center position and the diameter of the to-be-entered weak network area contained in a preset cellular network quality map;
calculating a second distance between the current positioning position and the circle center position of the to-be-entered weak network area aiming at each to-be-entered weak network area;
and when the second distance is smaller than or equal to the radius of the to-be-entered weak network area, taking the to-be-entered weak network area as the target weak network area, and determining that the to-be-entered weak network area enters the target weak network area.
6. The method of claim 4, wherein after said exposing the pre-cached data, the method further comprises:
judging whether the target weak network area is left or not according to the current positioning position;
and when the target weak network area is judged to be left, stopping downloading the pre-cached data according to the duration.
7. The method according to claim 1 or 6, wherein the downloading the pre-buffered data according to the duration comprises:
acquiring the data volume required by browsing the duration at the client;
and downloading data with the data volume larger than or equal to the data volume, and taking the downloaded data as the pre-cache data.
8. The method of claim 6, wherein the determining whether to leave the target weak network area according to the current positioning location comprises:
acquiring the circle center position and the diameter of the target weak network area contained in a preset cellular network quality map;
calculating a third distance between the current positioning position and the circle center position of the target weak network area;
and when the third distance is greater than or equal to the radius of the target weak network area, determining that the mobile terminal is away from the target weak network area.
9. A data pre-caching device applied to a client side, the device comprising:
the acquisition module is used for acquiring the GPS positioning information of the mobile terminal where the client is located at fixed time, and the GPS positioning information comprises a positioning position;
the first judgment module is used for judging whether a weak network area to which the mobile terminal is about to enter exists or not according to the current positioning position;
the calculation module is used for calculating the time length required for the weak network area to enter to pass through when the first judgment module judges that the weak network area to enter exists;
and the cache module is used for downloading the pre-cached data according to the duration and caching the pre-cached data.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1 to 8 when executing a program stored in the memory.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
CN202010949268.5A 2020-09-10 2020-09-10 Data pre-caching method and device, electronic equipment and storage medium Pending CN112118304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010949268.5A CN112118304A (en) 2020-09-10 2020-09-10 Data pre-caching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010949268.5A CN112118304A (en) 2020-09-10 2020-09-10 Data pre-caching method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112118304A true CN112118304A (en) 2020-12-22

Family

ID=73802541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010949268.5A Pending CN112118304A (en) 2020-09-10 2020-09-10 Data pre-caching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112118304A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112888030A (en) * 2021-01-12 2021-06-01 北京小米移动软件有限公司 Service processing method and device, electronic equipment and storage medium
CN114257870A (en) * 2021-12-20 2022-03-29 北京字跳网络技术有限公司 Short video playing method, device, equipment and storage medium
WO2023231861A1 (en) * 2022-06-02 2023-12-07 维沃移动通信有限公司 Data preloading method and device, terminal, and storage medium
WO2023236019A1 (en) * 2022-06-06 2023-12-14 北京小米移动软件有限公司 Capability reporting method and apparatus, capability determination method and apparatus, communication apparatus, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120023041A1 (en) * 2007-08-08 2012-01-26 Yoram Kariv System and method for predictive network monitoring
CN103428334A (en) * 2012-05-15 2013-12-04 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile terminal for browsing website
CN104640224A (en) * 2013-11-12 2015-05-20 华为技术有限公司 Network data transmission method, device and system
CN106899958A (en) * 2017-02-08 2017-06-27 努比亚技术有限公司 A kind of information download apparatus and method
CN111526246A (en) * 2020-04-07 2020-08-11 咪咕音乐有限公司 Caching method, electronic device and computer-readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120023041A1 (en) * 2007-08-08 2012-01-26 Yoram Kariv System and method for predictive network monitoring
CN103428334A (en) * 2012-05-15 2013-12-04 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile terminal for browsing website
CN104640224A (en) * 2013-11-12 2015-05-20 华为技术有限公司 Network data transmission method, device and system
CN106899958A (en) * 2017-02-08 2017-06-27 努比亚技术有限公司 A kind of information download apparatus and method
CN111526246A (en) * 2020-04-07 2020-08-11 咪咕音乐有限公司 Caching method, electronic device and computer-readable storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112888030A (en) * 2021-01-12 2021-06-01 北京小米移动软件有限公司 Service processing method and device, electronic equipment and storage medium
CN112888030B (en) * 2021-01-12 2023-04-07 北京小米移动软件有限公司 Service processing method and device, electronic equipment and storage medium
CN114257870A (en) * 2021-12-20 2022-03-29 北京字跳网络技术有限公司 Short video playing method, device, equipment and storage medium
CN114257870B (en) * 2021-12-20 2024-03-15 北京字跳网络技术有限公司 Short video playing method, device, equipment and storage medium
WO2023231861A1 (en) * 2022-06-02 2023-12-07 维沃移动通信有限公司 Data preloading method and device, terminal, and storage medium
WO2023236019A1 (en) * 2022-06-06 2023-12-14 北京小米移动软件有限公司 Capability reporting method and apparatus, capability determination method and apparatus, communication apparatus, and storage medium

Similar Documents

Publication Publication Date Title
CN112118304A (en) Data pre-caching method and device, electronic equipment and storage medium
US10111042B2 (en) Modeling significant locations
CN107431896B (en) Wireless coverage verification based on connection technology
EP3231200B1 (en) Determining timing for determination of applicable geo-fences
US9435878B1 (en) Positioning using audio recognition
US10764184B2 (en) Detecting communication network insights of alerts
CN113342905B (en) Method and device for determining stop point
US9798509B2 (en) Use of an anticipated travel duration as a basis to generate a playlist
CN111262791A (en) Flow control method and device, electronic equipment and storage medium
CN111526246A (en) Caching method, electronic device and computer-readable storage medium
US11258709B2 (en) Detecting communication network insights of alerts
Zhang et al. Accuracy analysis of freeway traffic speed estimation based on the integration of cellular probe system and loop detectors
JP7175783B2 (en) Program, device and method for estimating stay area population in predetermined area
US20190045399A1 (en) Dynamic predictive buffering
CN109219953B (en) Alarm clock reminding method, electronic equipment and computer readable storage medium
CN110753298B (en) Positioning method and device, equipment and storage medium thereof
CN112383823A (en) Code rate self-adaption method and device, electronic equipment and storage medium
CN113574830A (en) Measuring impact of network deployment
CN113647055A (en) Measuring impact of network deployment
CN113868538A (en) Information processing method, device, equipment and medium
CN108449372B (en) Network data processing method, three-dimensional network database construction method and system
CN104392000B (en) Determine the method and apparatus that mobile site captures quota
CN112118592A (en) Region generation method and device, electronic equipment and storage medium
CN115712749A (en) Image processing method and device, computer equipment and storage medium
CN111343245A (en) Uploading line scheduling method and device, electronic equipment and readable storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201222

RJ01 Rejection of invention patent application after publication