Data caching method and electronic device

By receiving instructions from the control component, the electronic device adjusts the cache policy to cache more data, solving the user's application usage problem in the abnormal network area and improving the user experience.

CN114173372BActive Publication Date: 2025-08-29HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010950649.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-10
Publication Date
2025-08-29
Estimated Expiration
2040-09-10

AI Technical Summary

Technical Problem

Users cannot use audio or video applications normally in abnormal areas of network service, resulting in poor user experience.

Method used

By receiving instructions from the control component, the electronic device switches to different cache policies, increasing the download rate or reducing the amount of data to cache more data, ensuring that the user can still use the application normally in the abnormal area.

Benefits of technology

Improve users' application experience in abnormal areas of network service, avoid business lag, and improve user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114173372B_ABST
    Figure CN114173372B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data caching method, which is applied to an electronic device including a target application and a control component. The method includes: running the target application and caching the data of the target application using a first caching strategy, the first caching strategy may include downloading the data of the target application using a first download rate; the target application receives a first indication message sent by the control component; the first indication message is used to indicate that there is an abnormal area in the forward direction of the electronic device; after the target application receives the first indication message, caching the data of the target application using a second caching strategy, the second caching strategy may include downloading the data of the target application using a second download rate, the second download rate being greater than the first download rate. The embodiment of the present application can enable users to use the target application normally when passing through an abnormal area as much as possible, avoid service lag, and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and in particular to a data caching method and electronic device. Background Art

[0002] The use of online applications such as audio and video often requires a good network environment, but there are still many abnormal areas with weak coverage or no coverage. When users pass through abnormal areas, the network services of electronic devices are abnormal. For example, users will pass through multiple cells that provide network services to users on their daily routes to and from get off work. Among them, some cells have better network quality, and users can use online applications such as audio, video, and learning normally when passing through the cells. However, some cells have poor network quality, and users cannot use online applications normally when passing through the cells (such as playback freezes when using audio and video), which affects the user experience. Summary of the Invention

[0003] The embodiments of the present application disclose a data caching method and an electronic device, which can minimize the situation where users cannot normally use online applications such as audio and video when passing through an area with abnormal network services, thereby improving user experience.

[0004] In a first aspect, an embodiment of the present application provides a data caching method, which is applied to an electronic device, wherein the electronic device includes a target application and a control component, and the method includes: the electronic device runs the target application and adopts a first caching strategy to cache the data of the target application, and the first caching strategy includes at least one of the following: adopting a first download rate to download the data of the target application, adopting a first bit rate to download the data of the target application, adopting a first resolution to download the data of the target application, adopting a first frame rate to download the data of the target application, and adopting a first request number to request the data of the target application, wherein the first request number is the number of requests within a unit time; caching first type data and second type data, wherein the first type and the second type are different; adopting a first sampling frequency to download the data of the target application, adopting a first sampling bit number to download the data of the target application, and adopting a first number of channels to download the data of the target application; the target application receives the first indication information sent by the control component; after the target application receives the first indication information, adopting a second caching strategy Slightly cache the data of the above-mentioned target application, and the above-mentioned second caching strategy includes at least one of the following: adopting a second download rate to download the data of the above-mentioned target application, the above-mentioned second download rate is greater than the above-mentioned first download rate; adopting a second bit rate to download the data of the above-mentioned target application, the above-mentioned second bit rate is less than the above-mentioned first bit rate; adopting a second resolution to download the data of the above-mentioned target application, the above-mentioned second resolution is less than the above-mentioned first resolution; adopting a second frame rate to download the data of the above-mentioned target application, the above-mentioned second frame rate is less than the above-mentioned first frame rate; adopting a second number of requests to request the data of the above-mentioned target application, the above-mentioned second number of requests is the number of requests per unit time, and the above-mentioned second number of requests is greater than the above-mentioned first number of requests; caching the above-mentioned first type of data and not caching the above-mentioned second type of data; adopting a second sampling frequency to download the data of the above-mentioned target application, the above-mentioned second sampling frequency is less than the above-mentioned first sampling frequency; adopting a second sampling number of bits to download the data of the above-mentioned target application, the above-mentioned second sampling number of bits is less than the above-mentioned first sampling number of bits; adopting a second number of channels to download the data of the above-mentioned target application, the above-mentioned second number of channels is less than the above-mentioned first number of channels.

[0005] Among them, the first indication information is used to indicate that there is an abnormal area in the forward direction of the above-mentioned electronic device, and the above-mentioned abnormal area is at least one of the following areas: an area where the signal quality is less than a preset threshold; an area where the network is disconnected; an area where the system is dropped, and the above-mentioned system drop is that the first network system is changed to a second network system that is lower than the above-mentioned first network system; an area where the quality of experience QoE is less than the first QoE level.

[0006] In an embodiment of the present application, the target application caches its data using different caching strategies before and after receiving the first indication information. The duration of data downloaded per unit time using the first caching strategy before receiving the first indication information is shorter than the duration of data downloaded per unit time using the second caching strategy after receiving the first indication information. In other words, after receiving the first indication information indicating the presence of an abnormal area in the forward direction, the target application caches data using the second caching strategy, thereby increasing the duration of data downloaded per unit time. This allows users to use the target application normally while passing through the abnormal area, avoiding service interruptions and improving user experience.

[0007] In one possible implementation, before the target application receives the first indication information sent by the control component, the method further includes: the target application sends a registration message to the control component; the registration message is used to obtain the first indication information, and the first indication information is used to indicate that there is an abnormal area in the forward direction of the electronic device, and the abnormal area is at least one of the following areas: an area where the signal quality is less than a preset threshold; an area where the network is disconnected; an area where the mode is dropped, and the mode is dropped when the first network mode is changed to a second network mode lower than the first network mode; an area where the quality of experience QoE is less than the first QoE level.

[0008] In an embodiment of the present application, the target application that receives the first indication information and caches data using the second caching strategy is an application that sends a registration message to the control component. Therefore, the target application can independently choose whether to receive the first indication information and cache data using the second caching strategy, which greatly increases the flexibility of implementation.

[0009] In one possible implementation, there is a first position between the abnormal area and the current position, there is no other cell between the current position and the first position, and the first position is the position where the control component sends the first indication information; or, the abnormal area is an area within a first distance range from the current position.

[0010] In an embodiment of the present application, there is a first position between the current position and the abnormal area, and the distance between the current position and the abnormal area will not be too close. Therefore, the target application uses the second caching strategy to cache data for a period of time (i.e., the period from the first position to the abnormal area) will not be too short (for example, it will not be 0), and more data will be downloaded, so that the target application can be used normally when passing through the abnormal area as much as possible, avoiding business jams and improving user experience.

[0011] In a possible implementation, the method further includes: when the duration of the electronic device's current position entering the abnormal area is within a first preset time range, the control component sending the first indication information to the target application.

[0012] In an embodiment of the present application, the target application caches data using the second caching strategy for a period of time within a first preset time range. Control of the first preset time range can be used to control the period of time the target application caches data using the second caching strategy. The first preset time range can be determined based on demand. For example, when the battery level is low, the first preset time range can be adjusted to a smaller value, thereby reducing the situation where the target application uses the second download rate to download data and consumes power too quickly. For example, when the duration of the abnormal area is long, the first preset time range can be adjusted to a larger value, thereby ensuring that the target application can be used normally when passing through the abnormal area, avoiding service lag and improving user experience.

[0013] In a possible implementation, the target application sends a registration message to the control component, including: when the target application detects that the target application switches from background operation to foreground operation or is started, the target application sends the registration message to the control component.

[0014] In an embodiment of the present application, the target application can send a registration message to the control component when it is in use, so that the control component will send the first indication information only when the target application is in use, thereby avoiding the situation where the second caching strategy is used to cache data when the target application is not in use, which may cause excessive power consumption, poor viewing content clarity, incomplete viewing content, and other situations that affect the user experience.

[0015] In one possible implementation, the method further includes: obtaining the current cell information of the electronic device; determining whether there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area; if there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area, the control component generates the first indication information; or, obtaining the current location information of the electronic device; determining whether there is an abnormal area record corresponding to the current location information in the data file of the abnormal area; if there is an abnormal area record corresponding to the current location information in the data file of the abnormal area, the control component generates the first indication information; or, obtaining the current cell information and current location information of the electronic device; determining whether there is an abnormal area record corresponding to the current cell information and the current location information in the data file of the abnormal area; if there is an abnormal area record corresponding to the current cell information and the current location information in the data file of the abnormal area, the control component generates the first indication information.

[0016] In one possible implementation, the method further includes: determining whether there is an abnormal area record corresponding to the above-mentioned current cell information in the data file of the abnormal area; when there is an abnormal area record corresponding to the above-mentioned current cell information in the data file of the abnormal area, the above-mentioned control component generates the above-mentioned first indication information; the above-mentioned current location information is used to determine the time of sending the above-mentioned first indication information.

[0017] In an embodiment of the present application, there are various ways to generate the first indication information. For example, in the case where the current location information cannot be obtained, the electronic device can obtain the current cell information to determine whether to generate the first indication information, so that it can be applied to a variety of scenarios and has good usability.

[0018] In one possible implementation, the method further includes: obtaining information about cells passed by the electronic device; when a service abnormality notification event is detected, determining whether the electronic device has passed through at least one cell before a second preset time range in the information about cells passed by the electronic device; in the case of passing through the at least one cell, adding a first abnormal area record to a data file of the abnormal area, or updating a second abnormal area record in the data file of the abnormal area, wherein the first abnormal area record or the second abnormal area record includes information about the at least one cell; the service abnormality notification event is used to indicate at least one of the following information: signal quality is less than a preset threshold, network disconnection, the first network standard is changed to a second network standard lower than the first network standard, and the QoE is less than a first QoE level; or, when the service abnormality notification event is detected, obtaining location information of the electronic device, and adding a third abnormal area record to the data file of the abnormal area, or updating a fourth abnormal area record in the data file of the abnormal area, wherein the location information in the third abnormal area record or the fourth abnormal area record is obtained based on the location information of the electronic device.

[0019] In the embodiment of the present application, the data file of the abnormal area is used to generate the first indication information, that is, to determine whether there is an abnormal area in the forward direction. When the electronic device detects a service abnormality notification event, it can update the data file of the abnormal area based on the currently acquired information. The data source in the data file of the abnormal area used to generate the first indication information is authentic, reliable, timely and effective, thereby greatly increasing the accuracy of determining whether there is an abnormal area, minimizing the situation where the second caching strategy is used to cache data when there is no abnormal area, or where the abnormal area is not detected when it exists, thereby improving the user experience.

[0020] In a possible implementation, when passing through the at least one cell, adding a first abnormal area record to the data file of the abnormal area, or updating the second abnormal area record in the data file of the abnormal area, includes: when passing through the at least one cell, obtaining the location information of the electronic device, and adding a first abnormal area record to the data file of the abnormal area, or updating the second abnormal area record in the data file of the abnormal area, the first abnormal area record or the second abnormal area record includes information of the at least one cell, and the location information in the first abnormal area record or the second abnormal area record is obtained based on the location information of the electronic device.

[0021] In the embodiment of the present application, the abnormal area record in the abnormal area data file can be obtained not only based on the updated cell information, but also based on the location information. For areas where location information can be obtained, the electronic device can generate the first indication information based on the real-time location information and the location information of the abnormal area record in the abnormal area data file, thereby increasing the accuracy of determining whether an abnormal area exists, minimizing the situation where the second caching strategy is used to cache data when no abnormal area exists, or where an abnormal area is not detected when it exists, thereby improving the user experience.

[0022] In a possible implementation, when passing through the at least one cell, adding a first abnormal area record to the data file of the abnormal area, or updating the second abnormal area record in the data file of the abnormal area, includes: when passing through the at least one cell, obtaining at least one of the following information: the time of entering the abnormal area, the time of leaving the abnormal area, and the duration of the abnormal area; adding the first abnormal area record to the data file of the abnormal area, or updating the second abnormal area record in the data file of the abnormal area; the time of entering the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of entering the abnormal area, or the time of leaving the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of leaving the abnormal area, or the duration of the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the duration of the abnormal area.

[0023] In an embodiment of the present application, the abnormal area record in the abnormal area data file may also include historical records of the time of entry into the abnormal area, the time of exiting the abnormal area, and the duration of the abnormal area. The control component may refer to the above information in the abnormal area database file when generating and sending the first indication information, thereby assisting in determining the actual time of entry into the abnormal area, the time of exiting the abnormal area, and the duration of the abnormal area, thereby increasing the accuracy of determining whether an abnormal area exists, minimizing the use of the second caching strategy to cache data when no abnormal area exists, or avoiding situations where an abnormal area is not detected when it exists, thereby improving the user experience.

[0024] In a possible implementation, after the target application receives the first indication information and adopts the second caching strategy to cache the data of the target application, the method further includes: when the electronic device is in the abnormal area, adopting at least one of the following methods: adopting a third download rate to download the data of the target application, the third download rate is less than the first download rate; adopting the third bit rate to download the data of the target application, the third bit rate is less than or equal to the second bit rate; adopting the third resolution to download the data of the target application, the third resolution is less than or equal to the second resolution; adopting the third frame rate to download the data of the target application, the third frame rate is less than or equal to the second frame rate; adopting a third request number to request the data of the target application, the third request number is the number of requests per unit time, and the third request number is less than or equal to the first request number; after leaving the abnormal area, adopting the first caching strategy to cache the data of the target application.

[0025] In an embodiment of the present application, when the electronic device is in an abnormal area, the target application can further reduce parameters such as the resolution, bit rate, and frame rate of the downloaded data to increase the usage time of the data downloaded per unit time, thereby maximizing the user's ability to use the target application even in the abnormal area. When the electronic device leaves the abnormal area, the first caching strategy is restored to cache the target application's data, allowing the user to continue using the target application normally.

[0026] In one possible implementation, the above-mentioned use of the first caching strategy to cache the data of the above-mentioned target application includes: when the playback duration of the data volume of the above-mentioned target application cached by the above-mentioned first caching strategy is greater than the first preset duration, stopping caching the data of the above-mentioned target application; the above-mentioned use of the second caching strategy to cache the data of the above-mentioned target application includes: when the playback duration of the data volume of the above-mentioned target application cached by the above-mentioned second caching strategy is greater than the above-mentioned first preset duration, continuing caching the data of the above-mentioned target application.

[0027] In this embodiment of the present application, within the same timeframe, the target application's data cached using the first caching strategy is used for a shorter duration than the data cached using the second caching strategy. Therefore, if there is an abnormal area along the forward direction, caching data using the second caching strategy allows users to use the target application longer while passing through the abnormal area, minimizing service interruptions and improving user experience.

[0028] In a possible implementation, after the target application receives the first indication information, the second caching strategy is used to cache the data of the target application, including: in response to receiving the first indication information, the second caching strategy is used to cache the data of the target application; and / or, within a second preset time length after receiving the first indication information, the step of using the second caching strategy to cache the data of the target application is started, and the second preset time length is less than 1 second.

[0029] In an embodiment of the present application, after the target application receives the first indication information, it uses the second caching strategy to cache the data of the target application within a shorter period of time, so that the cached data can be used for as long as possible before entering the abnormal area, so that the user can use the target application for a longer time while passing through the abnormal area, thereby avoiding business jams as much as possible and improving user experience.

[0030] In one possible implementation, the first indication information further includes: first time information, which is used to indicate the time of entering the abnormal area; and / or, the first indication information further includes: second time information, which is used to indicate the time of leaving the abnormal area; and / or, the first indication information further includes: third time information, which is used to indicate the duration of the abnormal area.

[0031] In this embodiment of the present application, the first indication information may also include detailed information about the time of entry into the abnormal area, the time of exit from the abnormal area, or the duration of the abnormal area. The target application can select a second caching strategy based on the first indication information. For example, if the duration of the abnormal area is long, the second download rate can be increased to download more data. This greatly increases the flexibility of implementation and improves usability.

[0032] In a possible implementation, after the target application receives the first indication information, the second caching strategy is used to cache the data of the target application, including: after the target application receives the first indication information, the second caching strategy is used to cache the data of the target application with a playback duration of a third preset duration, wherein the third preset duration is a duration obtained based on the first time information and the second time information, or the third preset duration is a duration indicated by the third duration information.

[0033] In the embodiment of the present application, the playback duration of the data downloaded by the target application before entering the abnormal area can be equal to the duration of the abnormal area, thereby ensuring that the target application can be used normally while the user passes through the abnormal area.

[0034] In one possible implementation, the target application is a video application, and the second caching strategy includes at least one of the following: downloading the data of the target application using the second download rate, downloading the data of the target application using the second bit rate, downloading the data of the target application using the second resolution, downloading the data of the target application using the second frame rate, and requesting the data of the target application using the second number of requests; or, the target application is an audio application, and the second caching strategy includes at least one of the following: downloading the data of the target application using the second download rate, requesting the data of the target application using the second number of requests, downloading the data of the target application using the second sampling frequency, downloading the data of the target application using the second sampling bit rate, and downloading the data of the target application using the second number of channels.

[0035] The embodiments of the present application can be applied to different target applications, such as video applications and audio applications. The second cache strategy can be different for different applications, which has a wider range of application scenarios and higher availability.

[0036] In a second aspect, an embodiment of the present application provides a chip, which includes at least one processor and an interface circuit, and optionally, the chip also includes a memory; the above-mentioned memory, the above-mentioned interface circuit and the above-mentioned at least one processor are interconnected through a line, and a computer program is stored in the above-mentioned memory; when the above-mentioned computer program is executed by the above-mentioned at least one processor, it implements: receiving a registration message sent by a target application; the above-mentioned registration message is used to register a first notification event; generating first indication information; the above-mentioned first indication information is used to indicate that there is an abnormal area in the forward direction of the above-mentioned chip, and the above-mentioned abnormal area is at least one of the following areas: an area with signal quality less than a preset threshold, an area with network disconnection, an area with a dropped mode, and an area with a quality of experience QoE less than a first QoE level, and the above-mentioned dropped mode is a change from a first network mode to a second network mode lower than the above-mentioned first network mode; sending the above-mentioned first indication information to the above-mentioned target application that has registered the above-mentioned first notification event.

[0037] In an embodiment of the present application, the chip can send a first indication message to a target application registered with a first notification time, wherein the first indication message is used to indicate the existence of an abnormal area in the forward direction, so that the target application can take corresponding actions based on the first indication message, such as increasing the download rate, so as to enable the user to use the target application normally when passing through the abnormal area, avoid business jams, and improve user experience.

[0038] In one possible implementation, when the chip generates the first indication information, it specifically implements: obtaining the current cell information; determining whether there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area; generating the first indication information when there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area; or obtaining the current location information; determining whether there is an abnormal area record corresponding to the current location information in the data file of the abnormal area; generating the first indication information when there is an abnormal area record corresponding to the current location information in the data file of the abnormal area; or obtaining the current cell information and the current location information; determining whether there is an abnormal area record corresponding to the current cell information and the current location information in the data file of the abnormal area; generating the first indication information when there is an abnormal area record corresponding to the current cell information and the current location information in the data file of the abnormal area.

[0039] In one possible implementation, when the chip generates the first indication information, it specifically implements: obtaining the current cell information and current location information of the chip; determining whether there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area; generating the first indication information when there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area; the current location information is used to determine the time of sending the first indication information.

[0040] In an embodiment of the present application, there are various ways to generate the first indication information. For example, in the case where the current location information cannot be obtained, the chip can obtain the current cell information to determine whether to generate the first indication information, so that it can be applied to a variety of scenarios and has good usability.

[0041] In one possible implementation, the chip is further configured to: obtain information about cells passed by the chip; when a service anomaly notification event is detected, determine from the information about cells passed by the chip whether the chip passed through at least one cell before a second preset time range; in the event of passing through the at least one cell, add a first abnormal area record to a data file of the abnormal area, or update a second abnormal area record in the data file of the abnormal area, wherein the first abnormal area record or the second abnormal area record includes information about the at least one cell; the service anomaly notification event is configured to indicate at least one of the following information: signal quality less than a preset threshold, network disconnection, a change from the first network standard to a second network standard lower than the first network standard, and QoE less than a first QoE level; or, when the service anomaly notification event is detected, obtain location information of the chip, and add a third abnormal area record to the data file of the abnormal area, or update a fourth abnormal area record in the data file of the abnormal area, wherein the location information in the third abnormal area record or the fourth abnormal area record is obtained based on the location information of the chip.

[0042] In the embodiment of the present application, the data file of the abnormal area is used to generate the first indication information, that is, to determine whether there is an abnormal area in the forward direction. When the chip detects a service abnormality notification event, it can update the data file of the abnormal area based on the currently acquired information. The data source in the data file of the abnormal area used to generate the first indication information is authentic, reliable, timely and valid, thereby greatly improving the accuracy of determining whether there is an abnormal area. It minimizes the situation where the second caching strategy is used to cache data when there is no abnormal area, or where the abnormal area is not detected when it exists, thereby improving the user experience.

[0043] In a possible implementation, when the chip passes through the at least one cell, it adds a first abnormal area record to the data file of the abnormal area, or updates the second abnormal area record in the data file of the abnormal area. Specifically, when the chip passes through the at least one cell, it obtains the location information of the chip, and adds the first abnormal area record to the data file of the abnormal area, or updates the second abnormal area record in the data file of the abnormal area; the first abnormal area record or the second abnormal area record includes information of the at least one cell, and the location information in the first abnormal area record or the second abnormal area record is obtained based on the location information of the chip.

[0044] In this embodiment of the present application, the abnormal area record in the abnormal area data file can be obtained not only based on the updated cell information, but also based on the location information. For areas where location information can be obtained, the chip can generate the first indication information based on the real-time location information and the location information of the abnormal area record in the abnormal area data file, thereby increasing the accuracy of determining whether an abnormal area exists, minimizing the situation where the second caching strategy is used to cache data when no abnormal area exists, or where an abnormal area is not detected when it exists, thereby improving the user experience.

[0045] In a possible implementation, when the chip passes through the at least one cell, it adds a first abnormal area record to the data file of the abnormal area, or updates the second abnormal area record in the data file of the abnormal area, and specifically implements: when passing through the at least one cell, it obtains at least one of the following information: the time of entering the abnormal area, the time of leaving the abnormal area, and the duration of the abnormal area; adds the first abnormal area record to the data file of the abnormal area, or updates the second abnormal area record in the data file of the abnormal area; the time of entering the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of entering the abnormal area, or the time of leaving the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of leaving the abnormal area, or the duration of the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the duration of the abnormal area.

[0046] In an embodiment of the present application, the abnormal area record in the abnormal area data file may also include historical records of the time of entry into the abnormal area, the time of exiting the abnormal area, and the duration of the abnormal area. The control component may refer to the above information in the abnormal area database file when generating and sending the first indication information, thereby assisting in determining the actual time of entry into the abnormal area, the time of exiting the abnormal area, and the duration of the abnormal area, thereby increasing the accuracy of determining whether an abnormal area exists, minimizing the use of the second caching strategy to cache data when no abnormal area exists, or avoiding situations where an abnormal area is not detected when it exists, thereby improving the user experience.

[0047] In a possible implementation, the chip is further configured to: receive a deregistration message sent by a target application; the deregistration message is used to cancel registration of the first notification event.

[0048] In an embodiment of the present application, the target application can send a deregistration message to the chip when it does not need to obtain the first indication information, that is, the target application can independently choose whether to receive the first indication information, which greatly increases the flexibility of implementation.

[0049] In a third aspect, an embodiment of the present application provides an electronic device, including a transceiver, a processor, and a memory; the memory is used to store computer program code, the computer program code includes computer instructions, and the processor calls the computer instructions to enable the user device to execute the data caching method provided in the first aspect of the embodiment of the present application and any one of the implementation methods of the first aspect.

[0050] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, they are used to execute the data caching method provided in the first aspect of the embodiment of the present application and any one of the implementation methods of the first aspect.

[0051] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a communication device, the communication device executes the data caching method provided by the first aspect or any one of the implementation methods of the first aspect in the embodiment of the present application.

[0052] In a sixth aspect, an embodiment of the present application provides an electronic device, the electronic device including a method or apparatus for executing any embodiment of the present application. The electronic device is, for example, a chip.

[0053] It is understandable that the electronic device provided in the third aspect, the computer storage medium provided in the fourth aspect, the computer program product provided in the fifth aspect, and the electronic device provided in the sixth aspect are all used to execute the data caching method provided in the first aspect. Therefore, the beneficial effects achievable by these devices can be referenced to the beneficial effects of the data caching method provided in the first aspect, and will not be further elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The following is an introduction to the drawings used in the embodiments of this application.

[0055] Figure 1A-1M is a schematic diagram of some application scenarios provided by the embodiments of the present application;

[0056] Figure 2-Figure 4 is a schematic diagram of the structure of some electronic devices provided in the embodiments of the present application;

[0057] Figure 5 This is a flow chart of a data caching method provided by an embodiment of the present application;

[0058] Figure 6 This is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0059] Figure 7This is a flow chart of a learning process provided by an embodiment of the present application;

[0060] Figure 8 This is a flowchart of a prediction process provided by an embodiment of the present application;

[0061] Figures 9-11 is a schematic diagram of some further application scenarios provided by the embodiments of the present application;

[0062] Figure 12 This is a flowchart of another prediction process provided by an embodiment of the present application;

[0063] Figure 13 This is a flow chart of another data caching method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The technical solutions in the embodiments of the present application will be described clearly and in detail below with reference to the accompanying drawings. The terms used in the implementation methods of the embodiments of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application.

[0065] The following describes an application scenario in which a user passes through an abnormal area on the way to work, wherein the abnormal area is an area where the signal quality is lower than a preset threshold. When the user passes through an abnormal area, the electronic device used is likely to have a network service abnormality. Network service abnormalities may include but are not limited to: no network signal (i.e., network drop), drop to a low network standard (for example, drop from the fifth generation mobile communication technology (5G) to the third generation mobile communication technology (3rd-generation, 3G)), poor signal quality, and poor application experience quality. Poor signal quality may be that the parameters used to characterize signal quality (hereinafter referred to as signal quality parameters) do not meet preset conditions, for example, the signal-to-noise ratio, reference signal receiving power (RSRP), reference signal receiving quality (RSRQ) are less than a preset threshold, and the packet loss rate is greater than a preset threshold. Poor application experience quality is, for example, that the quality of experience (QoE) is less than the first QoE level. Among them, the lower the QoE level, the worse the user experience. For example, the QoE level includes 3 levels: 0, 1, and 2. 0 indicates poor user experience, 1 indicates average user experience, and 2 indicates good user experience. The first QoE level is 2, and the abnormal area is the area with a QoE level of 0 or 1.

[0066] like Figure 1AAs shown, the user opens the video application of the electronic device 100 before leaving home, and watches videos through the video application while traveling from home to the company. There are two normal areas and one abnormal area on the commute. The normal area can be the coverage area of ​​a normal cell. When the user passes through the normal area, the user's electronic device 100 can access the normal cell and can be used normally, for example, when the video application of the electronic device 100 plays a video, there is no lag or the lag time is short (such as less than 3 seconds). The abnormal area can be the coverage area of ​​the abnormal cell, or it can be a weak coverage area of ​​the normal cell, or it can be an area without coverage. Among them, the abnormal cell cannot provide normal network services for the electronic device, for example, it cannot provide a network for the electronic device or can only provide a second generation mobile phone communication technology specification (2 Generation wireless telephone technology, 2G) network for the electronic device. Therefore, when the user passes through the abnormal area, the electronic device 100 cannot be used normally, for example, when the video application of the electronic device 100 plays a video, the lag time is long (such as more than 20 seconds) or it cannot be played.

[0067] like Figure 1A As shown, when the user reaches the normal point A in the first normal area, the electronic device 100 can display the user interface 110 of the video application. The user interface 110 may include a signal quality indicator 111, a time indicator 112, a black dot 113, and a gray dot 114. The signal quality indicator 111 is used to indicate that the electronic device 100 is currently connected to a 5G network with 5 signal grids (i.e., full grids), and the signal quality is good at this time. The time indicator 112 is "15:00 / 48:52", where "48:52" is used to indicate that the total duration of the video currently played by the video application (i.e., the 17th episode) is 48 minutes and 52 seconds, and "15:00" is used to indicate that the picture currently played by the video application is the picture of the video at 15 minutes. Corresponding to the time indicator 112, the black dot 113 is used to indicate that the current playback has reached 15 minutes. The gray dot 114 is used to indicate that the current cache has reached 15 minutes and 30 seconds.

[0068] When in a normal area, the video application can use a first caching strategy to cache video data, wherein the first caching strategy includes at least one of the following: using a first download rate to download the data of the target application, using a first bit rate to download the data of the target application, using a first resolution to download the data of the target application, using a first frame rate to download the data of the target application, and using a first number of requests to request the data of the target application, where the first number of requests is the number of requests per unit time. For example, when the video application uses the first caching strategy to cache video data, the first download rate is to download video data with a playback duration of 10 seconds per second. When the playback duration of the video data downloaded by the video application is equal to the first usage duration (300 seconds, i.e., 5 minutes), the video data is stopped from being cached. When the playback duration of the video data downloaded by the video application is less than or equal to the second usage duration (30 seconds), the video data is continued to be cached = that is, the video data of the first usage duration is cached each time until the usage duration of the remaining cache amount is less than or equal to the second usage duration, then the video data is continued to be cached.

[0069] Not limited to the above example, in a specific implementation, the first usage duration and the second usage duration may also be other values.

[0070] like Figure 1A As shown, when the user passes through the first normal area, electronic device 100 is connected to a 5G network with 5 signal bars (i.e., full bars), resulting in good signal quality. The video application of electronic device 100 uses the first caching strategy described above to cache video data. When the user arrives at normal point A, the current cached duration in user interface 110 is 15 minutes and 30 seconds, and the current playback duration is 15 minutes, with a difference of 30 seconds. Therefore, 30 seconds from this moment on, i.e., as the user travels from normal point A to normal point B, the first download rate remains at 10 seconds of video data per second. Therefore, 5 minutes of video data are downloaded in these 30 seconds. Accordingly, the black dot 113 and the gray dot 114 in user interface 110 move, and the time marker 112 also changes. When the user arrives at normal point B, the black dot 113 in user interface 110 indicates that the playback duration has reached 15 minutes and 30 seconds, and the gray dot 114 indicates that the cached duration has reached 20 minutes and 30 seconds.

[0071] like Figure 1BAs shown, when the user continues traveling from normal point B to normal point C for 14 minutes, the black dot 113 and gray dot 114 in user interface 110 move, and time marker 112 also changes. When the user arrives at normal point C, black dot 113 indicates that the video has been played to 29 minutes and 30 seconds, and gray dot 114 indicates that the video has been buffered to 30 minutes. The difference between the two is 30 seconds. Therefore, during the next 30 seconds, i.e., the user's journey from normal point C to the abnormal point, 5 minutes of video data will be downloaded. When the user arrives at the abnormal point, black dot 113 in user interface 110 indicates that the video has been played to 30 minutes, and gray dot 114 indicates that the video has been buffered to 35 minutes. From this point on, i.e., when the user passes through the abnormal area, signal quality indicator 111 in user interface 110 indicates that electronic device 100 is unable to access the network and has experienced a network drop. At this time, the video data download rate is 0.

[0072] like Figure 1C As shown, when the user continues to travel 5 minutes from the abnormal point to the midpoint, the user can continue to watch the video, and the black dot 113 in the user interface 110 moves, and the time mark 112 also changes. However, since the download rate in the abnormal area is 0, that is, the video data cannot be downloaded, the gray dot 114 in the user interface 110 does not move. When the user reaches the midpoint, the black dot 113 in the user interface 110 is used to indicate that the current playback has reached 35 minutes, and the gray dot 114 still indicates that the current cache has reached 35 minutes. At this time, the black dot 113 and the gray dot 114 overlap. When the user continues to travel 10 minutes from the midpoint (before reaching the recovery point), the gray dot 114 in the user interface 110 cannot move, so the user cannot continue to watch the video, and the black dot 113 and the time mark 112 cannot move.

[0073] like Figure 1C As shown, when the user reaches the recovery point, the signal quality indicator 111 in the user interface 110 is used to indicate that the electronic device 100 is connected to a 5G network with 5 signal grids (i.e., full grids), and the signal quality is good. Therefore, the above-mentioned first caching strategy can be used to continue downloading video data, and the gray dot 114 can be moved. At this time, the gray dot 114 can be used to indicate that the current cache has been cached to 35 minutes and 30 seconds. When the subsequent user continues to travel from the recovery point to the company (i.e., when in the second normal area), the network service is normal, and the video application of the electronic device 100 can continue to work normally using the above-mentioned first caching strategy, and the user can continue to watch the video through the video application. When the user reaches the normal point D, the black dot 113 in the user interface 110 displayed by the electronic device 100 is used to indicate that the current playback has reached 35 minutes and 30 seconds.

[0074] When the above-mentioned path is in an abnormal area, the user cannot use the video application to watch the video, resulting in a poor user experience. Therefore, an embodiment of the present application provides a data caching method, which can be applied to electronic devices, and can also be applied to chips or processing systems in electronic devices, such as Huawei Mobile Services (HMS) and Android systems. The electronic device can perform business anomaly prediction during the user's travel. When it is predicted that it is about to enter an abnormal area, the electronic device performs a pre-caching operation on the target application. Among them, the target application is an application that sends a registration message to the control component of the system during installation or operation, and the registration message is used to obtain the first indication information sent by the control component to indicate that there is an abnormal area in the forward direction. The control component can be a component in the processing system, such as Huawei Mobile Services Hi Device to Device (HMS HiD2D) in the HMS system, a processing module in the Android system, etc. The control component can also be a chip or a module in a chip, such as a module in a modem chip.

[0075] The pre-caching operation may include at least one of the following: increasing the download rate, reducing the amount of data used for downloading data per unit time, and increasing the number of requests per unit time. Increasing the download rate may include increasing the number of requests per unit time and increasing the amount of data per request.

[0076] Exemplarily, reducing the amount of data used per unit time for downloaded data may include reducing the amount of data played per unit time for downloaded video data, for example, by reducing the resolution, frame rate, or bit rate of the downloaded video data. Exemplarily, reducing the amount of data used per unit time for downloaded data may also include reducing the amount of data played per unit time for downloaded audio data, for example, by reducing the sampling rate, number of sampling bits, or number of channels of the downloaded audio data.

[0077] Therefore, through the data caching method provided in the embodiment of the present application, even in the case of continuous crossing of abnormal areas such as tunnels for a long time, the user can use the target application in the electronic device 100 normally as much as possible while passing through the abnormal area, thereby improving the user experience.

[0078] Based on the application scenario provided above where the user passes through an abnormal area on the way to work, the following describes the process of executing the data caching method of the embodiment of the present application. Figure 1A-1CThe user opens the video application of the electronic device 100 before leaving home. At this time, the video application sends a registration message to the control component in the electronic device 100 to obtain the first indication information. During the user's journey from home to the company, the user watches the video through the video application, and the control component continues to perform the prediction process and obtain the first indication information. The description of the prediction process can be found below. Figures 8-13 The embodiment shown will not be described in detail for the time being.

[0079] When the user passes through the first normal area, the electronic device 100 is connected to a 5G network with 5 signal grids (i.e., full grids), and the signal quality is good. The video application of the electronic device 100 uses the above-mentioned first caching strategy. Figure 1A The process is consistent with that shown in the figure. For details, please refer to Figure 1A Description.

[0080] like Figure 1D As shown, when the user reaches normal point C, the control component sends a first indication message to the video application. The first indication message may include type, and optionally, a first time t1, a second time t2, and a third time t3. A first value for type indicates the presence of an abnormal area, and a second value for type indicates that the previously sent broadcast message is invalid. t1 can be the moment of entry into the abnormal area, or the duration from the current location to entry into the abnormal area (i.e., 30 seconds from normal point C to the abnormal point). t2 can be the moment of exiting the abnormal area, or the duration from the current location to exiting the abnormal area. t3 can be the duration from entry into the abnormal area to exiting the abnormal area (i.e., the duration from the abnormal point to the recovery point), that is, the duration of the abnormal area. The video application receives the first indication message sent by the control component and, in response to the first indication message, performs a pre-caching operation. Optionally, the pre-caching operation is performed within a preset execution time (e.g., 5 milliseconds, 10 milliseconds, 1 second, 3 seconds, etc.) after receiving the first indication message. Pre-caching can extend the playback time of cached video data or the usage time of other cached data.

[0081] When a video application performs a pre-caching operation, a second caching strategy is used to cache data of the video application, wherein the second caching strategy includes at least one of the following: downloading data of the target application at a second download rate, downloading data of the target application at a second bit rate, downloading data of the target application at a second resolution, downloading data of the target application at a second frame rate, and requesting data of the target application at a second number of requests, where the second number of requests is the number of requests per unit time. The second download rate is greater than the first download rate, the second bit rate is less than the first bit rate, the second resolution is less than the first resolution, the second frame rate is less than the first frame rate, and the second number of requests is greater than the first number of requests.

[0082] Assume that the pre-caching operation increases the download rate to a preset multiple (e.g., 1.8x, 3x, etc.) of the original rate. For example, if the preset multiple is 3x, then 30 seconds of video data will be downloaded per second. After the cache reaches the first usage duration, caching will not stop, but will continue. Assume that during the 30-second journey from a normal point C to an abnormal point, the video application caches video data using a second caching strategy. The second download rate is 3 times the first download rate, the first and second resolutions are the same or lower than the first resolution, the first and second frame rates are the same or lower than the first frame rate, and the first and second bit rates are the same or lower than the first bit rate. Optionally, during this period, the number of data requests per unit time can be greater, that is, the second number of requests is greater than the first number of requests. Optionally, the second download rate being greater than the first download rate can specifically mean that the second number of requests is greater than the first number of requests. The electronic device can adjust one or more of the following parameters: download rate, bit rate, frame rate, resolution, or the number of data requests per unit time. The electronic device can adjust any combination of these five parameters.

[0083] like Figure 1DAs shown, assuming the video application performs the above pre-caching operation while the user travels from normal point C to the abnormal point (i.e., within t1), 15 minutes of video data are downloaded within t1. Therefore, when the user reaches the abnormal point, the black dot 113 in the user interface 110 indicates that the video has been played for 30 minutes, and the gray dot 114 indicates that the video has been cached for 45 minutes. In this case, the cached content (15 minutes) exceeds the first preset duration (300 seconds). From this point on, that is, when the user passes through the abnormal area, the video application downloads the video data using a third download rate, which is less than the first download rate, or a third bitrate, which is less than or equal to the second bitrate, or a third resolution, which is less than or equal to the second resolution, or a third frame rate, which is less than or equal to the second frame rate, or a third request number, which is the number of requests per unit time, which is less than or equal to the first request number. The signal quality indicator 111 in the user interface 110 is used to indicate that the electronic device 100 cannot access the network and is disconnected from the network, so the third download rate is 0.

[0084] In a specific implementation, when a user passes through an abnormal area, the user may also fall into a low network standard. When the user reaches the abnormal point, the user interface displayed by the electronic device 100 is, for example, Figure 1E The user interface 110 shown in the figure has a signal quality indicator 111 for indicating that the electronic device is connected to a 2G network with a signal grid of 5 grids (i.e., full grid). When the user passes through an abnormal area, the signal quality may be poor. When the user reaches the abnormal point, the user interface displayed by the electronic device 100 is, for example, Figure 1F The user interface 110 shown in the figure has a signal quality indicator 111 for representing a 5G network with a signal grid of 1 grid connected to the electronic device. When the user passes through an abnormal area, the application experience quality may be poor. When the user reaches the abnormal point, the user interface displayed by the electronic device 100 is, for example, Figure 1G In the user interface 110 shown, although the signal quality indicator 111 in the user interface 110 indicates that the electronic device is connected to a 5G network with 5 signal bars (i.e., full bars), the QoE of the application is poor, resulting in a low download rate. In the above three cases, the third rate is less than the first rate. For example, the third rate is less than the first rate when: the number of requests per unit time is less than the first number of requests, and the amount of data downloaded per unit time is less than the first amount of data.

[0085] like Figure 1HAs shown, when the user continues to move from the abnormal point to the midpoint for 5 minutes, the user can continue to watch the video, and the black dot 113 in the user interface 110 moves, and the time mark 112 also changes. However, since the second rate in the abnormal area is 0, that is, the video data cannot be downloaded, the gray dot 114 in the user interface 110 does not move. The third resolution is less than or equal to the second resolution, or the third frame rate is less than or equal to the second frame rate, or the third bit rate is less than or equal to the second bit rate, or the third number of requests is less than or equal to the second number of requests. When the user reaches the midpoint, the black dot 113 in the user interface 110 is used to indicate that the current playback has reached 35 minutes, and the gray dot 114 still indicates that the current cache has reached 45 minutes. Therefore, when the user continues to move from the midpoint for 10 minutes, the black dot 113 and the time mark 112 can continue to move, and the user can continue to watch the video.

[0086] like Figure 1H As shown, assuming that the time it takes for the user to reach the recovery point from the middle point is 9 minutes, when the user reaches the recovery point, the black dot 113 in the user interface 110 is used to indicate that the current playback has reached 44 minutes, and the gray dot 114 still indicates that the current cache has reached 45 minutes. In the process of the user traveling from the recovery point to the company (that is, when passing through the second normal area), the signal quality indicator 111 in the user interface 110 is used to indicate that the electronic device is connected to a 5G network with 5 signal grids (that is, full grids), and the signal quality is good. The video application can use the above-mentioned first caching strategy to download video data. In other words, the rate of downloading video data is restored to the first rate, or the resolution of the video data is restored to the first resolution, or the frame rate of the video data is restored to the first frame rate, or the bit rate of the video data is restored to the first bit rate. Optionally, the number of requests per unit time is restored to the first number of requests. Optionally, the rate of downloading video data is restored to the first rate, which can be specifically: restoring the number of requests per unit time to the first number of requests. The user can also continue to watch the video through the video application. When the user reaches the normal point D, the black dot 113 in the user interface 110 displayed by the electronic device 100 is used to indicate that the video has been played to 45 minutes.

[0087] In some embodiments, if the user stops or deviates from the current route before reaching the abnormal area, the control component may send a first indication message with a type value of the second value to the video application to notify the video application that the first indication message sent previously is invalid. For example, when the user arrives at the normal point C, the video application receives the first indication message with a type value of the first value and performs a pre-caching operation, that is, the second caching strategy is used to cache the video data. However, when the user stops while traveling from the normal point C to the abnormal point, or deviates from the route and does not travel to the abnormal point, the control component may send a first indication message with a type value of the second value to the video application. The video application receives the first indication message with a type value of the second value and stops the currently executed pre-caching operation, that is, the first caching strategy is used to cache the video data.

[0088] Assume that the pre-caching operation is to reduce the bit rate of the downloaded video data (for example, to the original bit rate). times, times, etc.), with the second code rate being the first code rate For example, the amount of video data played per unit time can be increased to 3 times the original amount. Figure 1I-1K .

[0089] like Figure 1I As shown, assuming that the video application performs the above pre-caching operation during the user's journey from the normal point C to the abnormal point (i.e., within t1), 15 minutes of video data are downloaded within t1. Therefore, when the user reaches the abnormal point, the black dot 113 in the user interface 110 is used to indicate that the current playback has reached 30 minutes, and the gray dot 114 is used to indicate that the current cache has reached 45 minutes. In this case, the cached content (15 minutes) is greater than the first usage time (300s). From this moment on, that is, when the user passes through the abnormal area, the working method of the video application can be seen in Figure 1D The description is omitted here.

[0090] like Figure 1I As shown, when the user reaches the abnormal point, actually passing through the abnormal area, the third bitrate is less than the first bitrate, or the third resolution is less than the first resolution, or the third bitrate is less than the first bitrate, or the third frame rate is less than the first frame rate, or the third resolution is less than or equal to the second resolution, or the third bitrate is less than or equal to the second bitrate, or the third frame rate is less than or equal to the second frame rate. Therefore, the clarity of user interface 110 is poor, with clarity less than that of the first normal area, or less than or equal to the clarity during the journey from normal point C to the abnormal point. Optionally, the third request count is less than the first request count or the second request count.

[0091] like Figure 1JAs shown, when the user continues to travel 5 minutes from the abnormal point and reaches the midpoint, the user can continue to watch the video. The black dot 113 in the user interface 110 moves, and the time stamp 112 also changes. However, because the second rate in the abnormal area is 0, meaning that video data cannot be downloaded, the gray dot 114 in the user interface 110 does not move. When the user reaches the midpoint, the black dot 113 in the user interface 110 indicates that the video has been played to the 35th minute, while the gray dot 114 still indicates that the video has been buffered to the 45th minute. Therefore, when the user continues to travel 10 minutes from the midpoint, the black dot 113 and time stamp 112 can continue to move, and the user can continue to watch the video. When the user passes through the abnormal area, the resolution, frame rate, and bit rate of the video data played by the video application are the second resolution, the second frame rate, or the second bit rate. The second bit rate is lower than the first bit rate, or the second resolution is lower than the first resolution, or the second frame rate is lower than the first frame rate, resulting in poor clarity in the user interface 110.

[0092] like Figure 1J As shown, assuming that the time it takes for the user to reach the recovery point from the middle point is 9 minutes, when the user reaches the recovery point, the black dot 113 in the user interface 110 is used to indicate that the current playback has reached 44 minutes, and the gray dot 114 still indicates that the current cache has reached 45 minutes. At this time, the resolution, frame rate, and bit rate of the video data played by the video application are still the second resolution, or the second frame rate, or the second bit rate, so the clarity of the user interface 110 is poor. In the process of the user traveling from the recovery point to the company (that is, passing through the second normal area), the signal quality indicator 111 in the user interface 110 is used to indicate that the electronic device is connected to a 5G network with 5 signal grids (that is, full grids), and the signal quality is good. The video application can continue to work normally using the above-mentioned first caching strategy, and the user can continue to watch videos through the video application.

[0093] like Figure 1KAs shown, when the user continues to travel from the recovery point to the normal point D for one minute, the black dot 113 in the user interface 110 indicates that the video has been played for 45 minutes. The signal quality indicator 111 in the user interface 110 indicates that the electronic device is connected to a 5G network with 5 signal bars (i.e., full bars), indicating good signal quality. Although the signal quality is good at this point, the video application downloaded 10 minutes of data while the user was traveling from the normal point C to the abnormal point, while the user only played 9 minutes of video from the abnormal point to the recovery point. Therefore, during the one-minute journey from the recovery point to the normal point D, the resolution, bit rate, and frame rate of the video played by the video application are still the second resolution, the second bit rate, or the second frame rate, and the clarity of the user interface 110 is still poor. Later, when the user travels from the normal point D to the company, the video data played by the video application may have been downloaded while in the second normal area. The resolution, frame rate, and bit rate of this video data are the first resolution, the first frame rate, or the first bit rate, so the clarity of the user interface 110 is normal. For example, when the normal point E is reached, the black dot 113 in the user interface 110 is used to indicate that the current playback has reached 45 minutes and 30 seconds.

[0094] Not limited to Figure 1K In the example scenario, in a specific implementation, when the user continues from the recovery point, the video application may use the first caching strategy to re-download video data 44 minutes later, with the bitrate of the video data being the first bitrate, or the frame rate of the video data being the first frame rate, or the resolution of the video data being the first resolution. Then, after a certain duration (e.g., 5 seconds, 10 seconds, 30 seconds, etc.), the bitrate of the video data played by the video application is the first bitrate, or the frame rate of the video data is the first frame rate, or the resolution of the video data is the first resolution, so the clarity of the displayed user interface is normal.

[0095] Understandably, Figure 1B-1C In the example, when the user is at an abnormal point or an intermediate point (i.e., passing through an abnormal area), the gray dot 114 in the user interface 110 indicates that the buffering time has reached 35 minutes. Figure 1C When the user is at the middle point, the black dot 113 and the gray dot 114 overlap. Figure 1D and Figure 1H 、 Figure 1I-1J In the example, when the user is at an abnormal point or an intermediate point (i.e., passing through an abnormal area), the gray dot 114 in the user interface 110 indicates that the buffering time has reached 45 minutes. Figure 1B-1C In the video, the user cannot continue watching the video from the midpoint to the resume point 9 minutes in. Figure 1D and Figure 1H 、 Figure 1I-1J In the example, the user can continue watching the video 9 minutes from the midpoint to the resume point.

[0096] In some embodiments, the user can click on the next episode before entering the abnormal area to make the video application play the video data of episode 18. Assuming that the user clicks on the next episode at the normal point C, the process of the user traveling from the normal point C to the abnormal point is as follows Figure 1L or Figure 1M shown.

[0097] like Figure 1L As shown, when the user opens the video application on electronic device 100 before leaving home, the video application does not send a registration message to the control component. When the user reaches normal point C, the user clicks Next Episode. At this point, user interface 110 has not yet played the video data. User interface 110 includes prompt 115, "Play Now...", which indicates that episode 18 is about to play. Time stamp 112 in user interface 110 has not yet been successfully retrieved and is therefore "00:00 / 00:00." Black dot 113 and gray dot 114 overlap, indicating that both the currently played and cached data values ​​are zero. During the time the user travels from normal point C to the abnormal point (i.e., within 30 seconds), the video application continues downloading video data at a rate of 10 seconds per second. Therefore, when the user reaches the abnormal point, the video application has already downloaded 300 seconds (i.e., 5 minutes) of video data. Therefore, black dot 113 in user interface 110 indicates that the video has been played up to 30 seconds, and gray dot 114 indicates that the video has been cached up to 5 minutes.

[0098] like Figure 1M As shown, when the user opens the video application of the electronic device 100 before leaving home, the video application sends a registration message to the control component. Figure 1L However, during the time when the user moves from the normal point C to the abnormal point (i.e. within 30 seconds), the video application performs a pre-caching operation. Assume that the pre-caching operation is Figure 1D 、 Figure 1H The increased download speed shown is 3 times the original, or Figure 1I-1J The bit rate of the downloaded video data is reduced to the original When the user reaches the abnormal point, the video application has downloaded 10 minutes of video data, so the black dot 113 in the user interface 110 is used to indicate that the video has been played to the 30th second, and the gray dot 114 is used to indicate that the video has been cached to the 15th minute. Figure 1M The duration of the video data downloaded is greater than Figure 1L The duration of the video data downloaded in .

[0099] In some embodiments, the first indication information includes a first time t1 and a second time t2, or includes a third time t3. The pre-caching operation performed by the video application is used to download video data with a playback duration greater than or equal to the duration of the abnormal area before reaching the abnormal area, thereby ensuring that the user can watch the video normally while passing through the abnormal area. The duration of the abnormal area can be obtained based on the difference between the first time t1 and the second time t2, or directly based on the third time t3.

[0100] In some embodiments, when a video application plays a video, each time the video application requests data from the video application's server, the number of times the data is requested can be increased by one, and the number of times the data is requested can be recorded. When the next episode of the video is played, the currently recorded number of times the data is requested can be cleared, and the above-mentioned recording process can be restarted for the currently playing video. Other content (for example: audio, web pages, games, etc.) is similar. For example, when the audio application plays the next song, the currently recorded number of times the data is requested can be cleared, and the number of times the data is requested can be restarted for the currently playing song.

[0101] Not limited to Figure 1A-1M In an example case, in a specific implementation, the user interface 110 displayed by the electronic device 100 may not include the gray dot 114 , but the actual cache situation may be consistent with the cache situation represented by the gray dot 114 .

[0102] It is understandable that for cached content of other applications (for example, audio data of audio applications, text data, image data, video data, audio data, etc. of web applications and game applications), the first cache strategy and the second cache strategy used during downloading are similar. For example, the first cache strategy of the audio application includes at least one of the following: downloading the data of the target application using a first download rate, downloading the data of the target application using a first sampling frequency, downloading the data of the target application using a first sampling bit number, downloading the data of the target application using a first number of channels, and requesting the data of the target application using a first number of requests. The second cache strategy of the audio application includes at least one of the following: downloading the data of the target application using a second download rate, downloading the data of the target application using a second sampling frequency, downloading the data of the target application using a second sampling bit number, downloading the data of the target application using a second number of channels, and requesting the data of the target application using a second number of requests.

[0103] For example, the data of a news application includes a first type of data (i.e., image data) and a second type of data (i.e., text data). The first caching strategy of the news application includes at least one of the following: downloading the data of the target application at a first download rate, downloading the data of the target application at a first resolution, and caching the first type of data and the second type of data. The second caching strategy of the news application includes at least one of the following: downloading the data of the target application at a second download rate, downloading the data of the target application at a second resolution, caching the first type of data and not caching the second type of data.

[0104] In embodiments of the present application, the prediction function can be enabled or disabled by the system, such as by default, or it can be user-defined. For example, a user can enable the "Enable Prediction Function" option on the settings interface displayed by the electronic device 100. Applications on the electronic device 100, when installed or running, will then send registration messages to the control component. The control component will then execute the prediction process and obtain the first indication information while the user is moving. The control component can then send the first indication information to the application that sent the registration message, causing the application to perform a pre-caching operation. For example, the settings interface displayed by the electronic device 100 can include "Enable Prediction Function" options for different applications, and the user can enable or disable the "Enable Prediction Function" option for any application on the settings interface. It is understood that when the "Enable Prediction Function" option is enabled for at least one application on the settings interface, the control component will execute the prediction process and obtain the first indication information while the user is moving. However, when the "Enable Prediction Function" option is disabled for every application on the settings interface, the control component can stop executing the prediction process. The user can turn on the "Turn on prediction function" option of the video application on the setting interface. The video application can then send a registration message to the control component during installation or operation, so that the control component sends the first indication information to the video application. The video application can perform a pre-caching operation based on the first indication information, so that the user can use the video application normally even when passing through an abnormal area.

[0105] The electronic device 100 involved in the embodiment of the present application can be a mobile phone, a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable electronic device, a smart screen, and other devices.

[0106] Next, exemplary electronic devices provided in the following embodiments of the present application are introduced.

[0107] See Figure 2 , Figure 2 A schematic structural diagram of an electronic device 100 is shown.

[0108] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0109] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0110] The processor 110 may include one or more processing units, for example, an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0111] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0112] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0113] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0114] The modem processor (modem) may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium- or high-frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the AP. The AP outputs audio signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays images or videos through the display 194. In some embodiments, the modem processor may be a standalone device. In other embodiments, the modem processor may be independent of the processor 110 and provided in the same device as the mobile communication module 150 or other functional modules.

[0115] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0116] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with a network and other devices via wireless communication technologies. The above-mentioned wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The above-mentioned GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0117] In some embodiments, GNSS can also be implemented by an independent device, for example, the electronic device 100 further includes a positioning module. The positioning module can obtain the location information of the electronic device 100 through GNSS (such as GPS): latitude and longitude information, optionally, and direction (angle) information (such as northeast direction), optionally, and speed information.

[0118] In some embodiments, the modem processor can obtain cell information of the electronic device 100 through the mobile communication module 150 and the wireless communication module 160. For example, the cell ID of the serving cell, the cell ID of the neighboring cell, and the signal quality parameters of the serving cell and / or the neighboring cell. The signal quality parameters include, but are not limited to, packet loss rate, signal-to-noise ratio, RSRP, RSRQ, etc.

[0119] In some embodiments, the AP can receive cell information sent by the modem processor to obtain the location information of the electronic device based on the cell information: latitude and longitude information, optionally, and direction (angle) information (e.g., 20 degrees north by east), optionally, and speed information.

[0120] In some embodiments, the AP may receive service anomaly notification events, such as notifications reported by the modem processor of network disconnection, falling to a low network standard, RSRP, and RSRQ being less than a preset threshold. The AP may also automatically count the network quality parameters (such as bandwidth and latency) of at least one application to obtain a comprehensive numerical QoE. QoE is used to characterize the quality and performance of the network, business, and other services experienced by the user. When the AP receives a service anomaly notification message and determines that the QoE is less than the first QoE level, the AP may determine that the network service is abnormal and the service of the application is abnormal. The AP may also receive location information sent by the positioning module or the modem processor, and cell information sent by the modem processor. Then, the AP may perform a learning process, i.e., identify and count abnormal areas based on the above information to obtain a data file of the abnormal area (hereinafter also referred to as an abnormal area database). The abnormal area database includes at least one record, each record is used to identify an abnormal area and includes information about the abnormal area. For examples of records of the abnormal area database (i.e., the information of the abnormal area therein), please refer to the following Figure 7 The learning process is described in detail in Table 2. Figure 6-Figure 7 The description is not detailed for now.

[0121] In other embodiments, the AP may also transmit the above information to a cloud server via the mobile communication module 150 and the wireless communication module 160, and the cloud server may perform the above learning process. It is understood that the cloud server may receive relevant information about the user's route sent by at least one electronic device, so the abnormal area recorded in the abnormal area database learned by the cloud server may be an abnormal area that the electronic device 100 has not passed through.

[0122] In the embodiment of the present application, the processor 110 can perform a business anomaly prediction (hereinafter referred to as the prediction process) based on the abnormal area database obtained by the above learning process, the cell information obtained in real time, and optionally, the location information obtained in real time, and obtain the first indication information. The processor 110 can perform a pre-caching operation in the process of sending a request message to the server of the target application according to the first indication information. The description of the first indication information can be found in Figure 1A-1M The description of the first indication information will not be repeated here.

[0123] The pre-caching operation may include at least one of the following: increasing the download rate, reducing the amount of data used per unit time for the downloaded data, and increasing the number of times data is requested per unit time. Increasing the download rate may include increasing the number of times data is requested per unit time, and / or increasing the amount of data requested in a single request message. Exemplarily, reducing the amount of data per unit time when the downloaded data is used may include reducing the amount of data played per unit time for the downloaded video data, for example, reducing the resolution, frame rate, or bit rate of the downloaded video data. Exemplarily, reducing the amount of data per unit time when the downloaded data is used may also include reducing the amount of data played per unit time for the downloaded audio data, for example, reducing the sampling rate, number of sampling bits, or number of channels of the downloaded audio data.

[0124] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0125] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0126] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0127] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0128] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0129] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0130] In addition, for the description of each component in the electronic device 100, please refer to the patent application with publication number: CN110519451A, invention name: A shutdown control method and device for an electronic device, and the relevant descriptions in paragraphs

[0054] -

[0104] of the specification, which will not be repeated here.

[0131] See Figure 3 , Figure 3 3 is a structural diagram of another electronic device 100 provided in an embodiment of the present application. The electronic device 100 may include a service anomaly prediction unit 310, a reporting unit 320 and an application unit 330. The service anomaly prediction unit 310 may include a monitoring unit 311, a prediction unit 312, and optionally, a learning unit 313. The reporting unit 320 may include a first reporting unit 321, a second reporting unit 322, and a third reporting unit 323. Among them, the service anomaly prediction unit 310, the reporting unit 320 and the application unit 330 may all belong to Figure 2 The processor 110 shown. For example, the service anomaly prediction unit 310 and the application unit 330 belong to the AP, the first reporting unit 321 is a positioning module or AP, the second reporting unit 322 is a modem processor, and the third reporting unit 323 is an AP. The description of each unit included in the electronic device 100 is as follows:

[0132] The monitoring unit 311 is used to monitor information. The monitored information may include the location information sent by the first reporting unit 321, the cell information sent by the second reporting unit 322, and the service anomaly notification event sent by the third reporting unit 323. For example, the location information includes latitude and longitude information, direction information, and speed information. The cell information includes the cell ID of the serving cell, the cell ID of the neighboring cell, and the signal quality parameters of the serving cell and / or the neighboring cell (such as packet loss rate, signal-to-noise ratio, RSRP, RSRQ). The service anomaly notification event includes a notification message that RSRP and RSRQ are less than a preset threshold, and a notification message that QoE is less than the first QoE level.

[0133] In some embodiments, the information monitored by the monitoring unit 311 can be sent to the learning unit 313 to perform a learning process. Specifically, the learning unit 313 can identify and count abnormal areas based on this information to obtain an abnormal area database. The abnormal area database includes at least one record, each record is used to identify an abnormal area and includes information about the abnormal area. An example of a record of the abnormal area database (i.e., the information about the abnormal area therein) can be found below. Figure 7 In other embodiments, the information monitored by the monitoring unit 311 can also be sent to the cloud server to perform the learning process. The specific description of the learning process can be found below. Figure 6-Figure 7 The embodiment shown will not be described in detail for the time being.

[0134] Prediction unit 312 is configured to obtain first indication information based on the real-time information monitored by monitoring unit 311 and the abnormal area database (also referred to as historical records) sent by the cloud server or learning unit 313. Furthermore, prediction unit 312 can trigger a service abnormality broadcast to transmit the first indication information to application unit 330.

[0135] Specifically, for areas where positioning can be achieved on the ground, the abnormal area database may include valid location information, and the monitoring unit 311 may also monitor real-time valid location information. Therefore, the prediction unit 312 may perform a prediction process based on the abnormal area database, the real-time cell information, and the real-time location information sent by the monitoring unit 311, and obtain the first indication information. The description of this process can be found below. Figures 8-11 The embodiment shown is not described in detail. For areas where positioning cannot be achieved, such as subways and tunnels, the abnormal area database does not include valid location information, and the monitoring unit 311 cannot monitor real-time valid location information. Therefore, the prediction unit 312 can perform a prediction process based on the abnormal area database and the real-time cell information sent by the monitoring unit 311, and obtain the first indication information, wherein the description of the process can be found in the following Figure 12 The embodiment shown is not described in detail. The description of the first indication information can be found in Figure 1A-1M The description of the first indication information is omitted here.

[0136] Specifically, the application unit 330 may include at least one target application. The description of the target application can be found in Figure 1A-1M ,Down Figure 4-Figure 5 After receiving the first indication information, the target application in the application unit 330 performs a pre-caching operation. The description of the pre-caching operation can be found in Figure 1A-1M The description of the pre-cache operation in will not be repeated here.

[0137] In some embodiments, after performing the prediction process and obtaining the first indication information, the prediction unit 312 may trigger a service abnormality broadcast, thereby sending the first indication information to the application unit 330 .

[0138] In other embodiments, the prediction unit 312 may also trigger the service anomaly broadcast only when the predicted duration of entering the abnormal area is within a first preset time range, thereby sending the first indication information to the application unit 330. The first preset time range may be a smaller time range, for example, [25 seconds, 35 seconds], [50 seconds, 70 seconds], and so on. The first preset time range may also be determined based on scenario information, for example, the first preset time range in the route to work is [25 seconds, 35 seconds], and the first preset time range in the route back home is [50 seconds, 70 seconds]. This implementation can avoid the situation where the target application performs the pre-caching operation too early, causing the electronic device to be affected and affecting the user experience, for example, increasing the download rate causes the electronic device to consume more power and consumes too much traffic, and reducing the resolution, frame rate, and bit rate of the downloaded video data causes the subsequent displayed video picture to have lower clarity. Alternatively, if the prediction unit 312 obtains the first indication information based on the real-time location information of the electronic device 100 and sends the first indication information to the application unit 330, the distance between the currently predicted location of the electronic device and the abnormal area is relatively close, for example, the time it takes to enter the abnormal area from the current location is 30 seconds. In this case, the user is unlikely to change their route, that is, the user is likely to enter the abnormal area, thereby improving the accuracy of the prediction.

[0139] It is understandable that the software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application uses a layered architecture to exemplify the software system of the electronic device 100.

[0140] Figure 41 is a schematic diagram of the structure of the software system of the electronic device 100 provided in an embodiment of the present application. The software system can be an Android system, an HMS system, a Microsoft Windows operating system, an operating system kernel (Linux), an iPhone operating system (IOS), or other software systems.

[0141] A layered architecture divides a software system into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the software system is divided into four layers: application layer, application framework layer, kernel layer, and hardware layer, from top to bottom.

[0142] The application layer can include a series of application packages. Figure 4 As shown, the application package may include camera, calendar, navigation, short message, gallery, call, Bluetooth, video, music, game, learning and other applications. Figure 4 The video application is used as an example for the target application. That is, when the video application is installed or running, it sends a registration message to the registration module of the application framework layer. The registration message is used to obtain the first indication information from the business anomaly prediction module of the application framework layer. The description of the first indication information can be found in Figure 1A-1M The description of the first indication information is omitted here.

[0143] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 4 As shown, the application framework layer may include a business exception notification module, a control component, a content provider, a view system, etc. Among them, the control component may include a registration module, a business exception prediction module and a transceiver module. For example, if Figure 4 The software system shown is the HMS system, and the control component may be the HMS HiD2D in the HMS.

[0144] The business anomaly notification module can be used to receive notification messages of business service anomalies and network service anomalies of applications (also referred to as business anomaly prediction notification events). Exemplarily, the business anomaly notification module can receive notification messages of business service anomalies of applications such as the QoE sent by an application at the application layer being less than the first QoE level. Among them, QoE can be a value obtained by comprehensively combining parameters such as the bandwidth and latency of the application. The business anomaly notification module can also receive notification messages of network service anomalies reported by the processor driver (such as the modem driver) of the kernel layer, such as network disconnection, falling to a low network standard, signal-to-noise ratio, RSRP, RSRQ being lower than a preset threshold, and packet loss rate being higher than a preset threshold.

[0145] The registration module can be used to receive a registration message sent by a video application in the application layer, thereby determining that the video application is the target application. The registration module can also notify the service anomaly prediction module and the transceiver module in the control component that the target application is the video application, so that the first indication information can be subsequently sent to the target application.

[0146] The service anomaly prediction module can be used to perform a prediction process based on the abnormal area database and the cell information reported in real time by the processor driver of the kernel layer (such as the modem driver). The description of the prediction process can be found in the following Figures 8-11 The embodiment shown is not described in detail. Optionally, the service anomaly prediction module can also combine the position information reported in real time by the processor driver (such as the modem driver) or the positioning driver of the kernel layer to perform the prediction process. The description of the prediction process can be found in the following Figure 12 The embodiment shown will not be described in detail for the time being.

[0147] The transceiver module can be used to send the first indication information obtained by the service anomaly prediction module to the video application of the application layer. After receiving the first indication information, the video application can perform a pre-caching operation before the electronic device 100 reaches the abnormal area. The description of the pre-caching operation can be found in Figure 1A-1M The description of the pre-cache operation in will not be repeated here.

[0148] In some embodiments, the abnormal area database can be obtained by the business anomaly prediction module performing a learning process. Specifically, the business anomaly prediction module can monitor at least one of the following messages: location information reported by the processor driver (e.g., modem driver) or positioning driver of the kernel layer, cell information such as the cell ID of the service cell, the cell ID of the neighboring cell, the signal quality parameters of the current cell and / or the neighboring cell (such as RSRP, RSRQ, packet loss rate, signal-to-noise ratio) reported by the processor driver (e.g., modem driver) of the kernel layer, and notification messages of service anomalies reported by the business anomaly notification module. Then, the business anomaly prediction module can identify and count abnormal areas based on the above messages to obtain an abnormal area database. Not limited to this, in a specific implementation, the cloud server can also obtain the message monitored by at least one electronic device 100 and perform a learning process to obtain the above abnormal area database. The specific description of the learning process can be found below. Figure 6-Figure 7 The embodiment shown will not be described in detail for the time being.

[0149] It is understandable that when the business anomaly prediction module performs a learning process or a prediction process, it can obtain scenario information of the user's route from an application in the application layer (such as Huawei Smart Assistant). Not limited to this, the scenario information can also be obtained through other modules in the application framework layer, and the scenario information can also be obtained by self-identification. This embodiment of the application is not limited to this. Among them, the scenario information may include but is not limited to: route type (such as route to work, route to get off work, route to play, etc.), route starting point (such as home, company), route end point, etc.

[0150] It can be understood that the business anomaly prediction module of the application framework layer can be Figure 3 The business anomaly prediction unit 310 in the application framework layer, the business anomaly notification module, the processor driver and the positioning driver of the kernel layer can be Figure 3 The reporting unit 320 in the application layer can be a video application Figure 3 The application unit 330 in the application unit 330. Among them, the service abnormality notification module can be Figure 3 The third reporting unit 323 in the processor driver can be Figure 3 The second reporting unit 322 in the example may also be the first reporting unit 321, and the positioning driver may be Figure 3 The first reporting unit 321 in.

[0151] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0152] Content providers are used to store and retrieve data and make it accessible to applications. This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0153] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0154] The kernel layer is the layer between hardware and software. The kernel layer includes at least a processor driver, a positioning driver, a display driver, and a sensor driver. The hardware layer is the hardware structure of the electronic device 100 and may include at least a processor, a positioning module, a display screen, and a sensor module. The processor driver can be used to drive the processor in the hardware layer, the positioning driver can be used to drive the positioning module in the hardware layer, the display driver can be used to drive the display screen in the hardware layer, and the sensor driver can be used to drive multiple sensors in the hardware layer. In some embodiments, the positioning module can also be integrated into the processor, and the positioning driver can also be integrated into the processor driver.

[0155] In some embodiments, the processor of the hardware layer may include an application processor and a modem processor, and the processor driver of the kernel layer may also include an application processor driver and a modem driver. The application processor driver of the kernel layer is used to drive the application processor in the hardware layer, and the modem driver of the kernel layer is used to drive the modem processor in the hardware layer.

[0156] In some embodiments, Figure 4 The software system shown is the Android system, and the Android runtime and system library can also be included between the application framework layer and the kernel layer.

[0157] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0158] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0159] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0160] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0161] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0162] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0163] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0164] A 2D graphics engine is a drawing engine for 2D drawings.

[0165] The following is a scenario where the user's path is abnormal (such as Figure 1A-1M The application scenario shown in FIG) introduces a data caching method provided by an embodiment of the present application, specifically as follows Figure 5 As shown, this may include but is not limited to the following steps:

[0166] S501: A target application in an application layer is run, and data of the target application is cached using a first cache strategy.

[0167] Specifically, the first caching strategy includes at least one of the following: downloading the data of the target application using a first download rate, downloading the data of the target application using a first bit rate, downloading the data of the target application using a first resolution, downloading the data of the target application using a first frame rate, requesting the data of the target application using a first request number, the first request number being the number of requests per unit time; caching first type data and second type data, the first type and the second type being different; downloading the data of the target application using a first sampling frequency, downloading the data of the target application using a first sampling bit number, and downloading the data of the target application using a first number of channels; for specific examples, see Figure 1A-1M The description of the first cache strategy is omitted here.

[0168] S502: The target application of the application layer sends a registration message to the registration module of the application framework layer.

[0169] Specifically, the target application can send a registration message to the registration module when it is installed, started, running in the foreground, running in the background, switching from background operation to foreground operation, or switching from foreground operation to background operation. The registration message is used to obtain the first indication information obtained by the business anomaly prediction module. Optionally, the target application can also send a deregistration message to the registration module when it is running in the foreground, running in the background, switching from background operation to foreground operation, or switching from foreground operation to background operation. The deregistration message is used to cancel the acquisition of the first indication information obtained by the business anomaly prediction module. For example, the target application sends a registration message to the registration module when it switches from background operation to foreground operation, and sends a deregistration message to the registration module when it switches from foreground operation to background operation.

[0170] Specifically, the registration message is used to register the first notification event. For example, after the registration module receives the registration message sent by the video application, it will determine the video application as the target application registered with the first notification event, and notify the business anomaly prediction module and the transceiver module in the control component. Therefore, after the business anomaly prediction module generates the first indication information, it will send the first indication information to the video application registered with the first notification event through the transceiver module (i.e., execute S504). The deregistration message is used to cancel the registration of the first notification event. For example, after the registration module receives the deregistration message sent by the video application, it will determine the video application as the target application not registered with the first notification event, and notify the business anomaly prediction module and the transceiver module in the control component. Therefore, after the business anomaly prediction module generates the first indication information, it will not send the first indication information to the video application through the transceiver module.

[0171] Exemplarily, when the video application is installed or running, a function of the application framework layer is called: registeredSignalQualityPrediction(), thereby sending a registration message to the registration module through the function.

[0172] S503: The service anomaly prediction module predicts whether there is an abnormal area in the forward direction of the electronic device, and generates first indication information if there is an abnormal area.

[0173] Specifically, an abnormal area is at least one of the following: an area where signal quality is less than a preset threshold; an area where the network is disconnected; an area where the network standard is dropped, where the network standard is dropped, where a first network standard (e.g., 5G) is changed to a second network standard (e.g., 2G) that is lower than the first network standard; or an area where the Quality of Experience (QoE) is less than a first QoE level. The lower the QoE level, the worse the user experience. For example, the QoE level includes three levels: 0, 1, and 2, where 0 represents a poor user experience, 1 represents an average user experience, and 2 represents a good user experience. The first QoE level is 1, and an abnormal area is an area where the QoE level is 0.

[0174] For areas where location information can be obtained, such as on the ground, the service anomaly prediction module can perform a prediction process based on the abnormal area database, the cell information obtained in real time, and the location information to obtain the first indication information. The specific details of the prediction process can be found in Figures 8-11 For areas where location information cannot be obtained, such as subways and tunnels, the service anomaly prediction module can perform a prediction process based on the abnormal area database and the cell information obtained in real time to obtain the first indication information, wherein the prediction process can be specifically referred to in Figure 12 The embodiment shown is not described in detail. For the description of abnormal area and first indication information, please refer to Figure 1A-1M The description of the first indication information will not be repeated here.

[0175] In some embodiments, there is a first location between the abnormal area and the current location, and no other cells exist between the current location and the first location. The first location refers to the location where the control component sends the first indication information; or, the abnormal area is an area within a first distance range from the current location. The first location is, for example, Figure 1A-1M The normal point C in Figure 6 、 Figures 9-11 Preset point in .

[0176] In some embodiments, when the predicted time duration from the current position of the electronic device to the abnormal area is within the first preset time range, the control component sends a first indication message to the target application via the transceiver module, wherein the description of the first preset time range can be found in Figure 1A-1M The description of the first preset time range is omitted here.

[0177] S504: The service anomaly prediction module sends the first indication information to the target application in the form of a broadcast message through the transceiver module.

[0178] Exemplarily, the transceiver module may send the first indication information to the video application through a function of the application framework layer: sendBroadcast().

[0179] Specifically, the first indication information may include type, optionally, may further include first time information t1, optionally may further include second time information t2, and optionally may further include third time information t3. Wherein, the first value of type indicates that there is an abnormal area, and the second value of type indicates that the previously sent broadcast message is invalid. t1 can be the moment of entering the abnormal area, or the time from the current position to entering the abnormal area. t2 can be the moment of leaving the abnormal area, or the time from the current position to leaving the abnormal area. t3 can be the time from entering the abnormal area to leaving the abnormal area, that is, the duration of the abnormal area. Examples of the parameters included in the first indication information can be found in Table 1 below.

[0180] Table 1 First indication information

[0181]

[0182] Among them, type=1 means Figure 1A-1M The type value is the first value, indicating that there is an abnormal area. Figure 1A-1M 、 Figure 2 The type value is a second value, and type=0 indicates that the previously sent broadcast message indicating the presence of an abnormal area is invalid. The first indication information may also include only t2, or include t2 and type, or include only t1, or include t1 and type, or include t1 and t2, or include t1, t2, and type, and the embodiment of the present application is not limited thereto.

[0183] S505: After receiving the first indication information, the target application caches the data of the target application using the second cache strategy.

[0184] Specifically, when the target application receives the first indication information whose type value is the first value, it performs a pre-caching operation, that is, it uses the second caching strategy to cache the data of the target application. The second caching strategy includes at least one of the following: using a second download rate to download the data of the target application, the second download rate is greater than the first download rate; using a second bit rate to download the data of the target application, the second bit rate is less than the first bit rate; using a second resolution to download the data of the target application, the second resolution is less than the first resolution; using a second frame rate to download the data of the target application, the second frame rate is less than the first frame rate; using a second number of requests to request the data of the target application, the second number of requests is the number of requests per unit time, the second number of requests is greater than the first number of requests; caching the first type of data and not caching the second type of data; using a second sampling frequency to download the data of the target application, the second sampling frequency is less than the first sampling frequency; using a second sampling number of bits to download the data of the target application, the second sampling number of bits is less than the first sampling number of bits; using a second number of channels to download the data of the target application, the second number of channels is less than the first number of channels. For examples of the second caching strategy and descriptions of pre-caching operations, please refer to Figure 1A-1M The second cache strategy and pre-cache operation instructions.

[0185] Specifically, in response to receiving the first indication information, the target application adopts the second caching strategy to cache the data of the target application. Optionally, within the second preset time length after receiving the first indication information, the step of caching the data of the target application using the second caching strategy is started. The second preset time length can be 5 milliseconds, 10 milliseconds, 30 milliseconds, etc., which is less than 1 second, or 1 second, 3 seconds, 5 seconds, etc. The second preset time length is Figure 1A-1M The preset execution time in .

[0186] In some embodiments, the target application performs a pre-caching operation within a first time t1 after receiving the first indication information. However, the target application is not limited thereto and may perform a pre-caching operation within 0.5×t1 after receiving the first indication information. This embodiment of the present application does not limit this.

[0187] In some embodiments, after the target application receives the first indication information, a second caching strategy is used to cache the target application data for a third preset duration (i.e., the duration of the abnormal area), thereby ensuring that the user can use the target application normally while passing through the abnormal area. The third preset duration is a duration obtained based on the first time information t1 and the second time information t2 (i.e., the difference between t1 and t2), or the third preset duration is the duration indicated by the third duration information.

[0188] Next, the process of executing the pre-caching operation for different types of target applications is exemplified.

[0189] For example, the target application is a video application. In order to ensure that users can use the video application normally in the abnormal area, such as watching Figure 1A-1M For the video displayed on the user interface 110, the video application determines that video data with a duration of (t1+t2) needs to be downloaded within t1 according to the first indication information. An example of an expression for the data amount D1 of the video data with a duration of (t1+t2) is as follows:

[0190] D1=(t1+t2)×F×IC

[0191] Wherein, F is the frame rate of the video data, I is the resolution of the video data, and C is the amount of video data currently cached.

[0192] Accordingly, an example of the rate R1 at which the video application caches the video data is as follows:

[0193]

[0194] Therefore, the pre-caching operation may include at least one of the following: increasing R1, decreasing I, and decreasing F. Accordingly, the process of caching the video data by the video application may satisfy at least one of the following: R1 is greater than the download rate before t1, I is less than the resolution of the cached content before t1, and F is less than the frame rate of the cached content before t1. Specifically, R1 being greater than the download rate before t1 may mean that the frequency of sending request messages to the target application's server is greater than the frequency before t1, and / or the amount of data requested for download in a single request message is greater than the amount of data before t1.

[0195] For example, the target application is an audio application. To ensure that the user can use the audio application normally in the abnormal area, the audio application can determine, based on the first indication information, that it needs to download audio data of duration t2 within t1. An example of an expression for the data volume D2 of the audio data of duration (t1+t2) is as follows:

[0196] D2=t2×H×B×SQ

[0197] Wherein, H is the sampling frequency of the audio data, B is the number of sampling bits of the audio data, S is the number of channels of the audio data (for example, 8), and Q is the amount of audio data currently cached.

[0198] Accordingly, an example of the rate r2 at which the audio application buffers the audio data is as follows:

[0199]

[0200] Therefore, the pre-caching operation may include at least one of the following: increasing R2, decreasing H, decreasing B, and decreasing S. Accordingly, the process of the audio application caching the audio data may satisfy at least one of the following: R2 is greater than the download rate before t1, H is less than the sampling frequency of the cached content before t1, B is less than the sampling bit number of the cached content before t1, and S is less than the number of channels of the cached content before t1.

[0201] For example, the target application is a reading application. To ensure that the user can use the reading application normally in the abnormal area, such as reading documents normally, the reading application can determine, based on the first indication information, the amount of data D3 that the user has read within a time period of (t1 + t2) and needs to download within t1. D3 can be determined by the reading application based on the user's reading habits, such as a reading habit of 0.3 pages per second. Therefore, the pre-caching operation can be to increase the download rate of D3 within t1.

[0202] For example, the target application is a news application whose user interface may include text and images. To ensure that the user can use the news application normally within the abnormal area, the news application can determine, based on the first indication information, that the amount of data D4 viewed by the user within a time period of (t1 + t2) must be downloaded within t1. D4 can be determined by the news application based on the user's news viewing habits, for example, viewing 0.2 news items per second and preferring to view news that does not include images. In this case, the pre-caching operation may include at least one of the following: increasing the download rate, caching only text and not images.

[0203] For example, the target application is a game application. To ensure that the user can use the game application normally in the abnormal area, the game application can determine, based on the first indication information, that the amount of data D5 used by the user within a period of (t1+t2) needs to be downloaded within t1. The data cached by the online game application includes, but is not limited to, game mall data, friend data, and other data that can be cached in advance. The data cached by the game application can be determined by the game application based on the user's habits of using the game application. For example, if the user prefers to use the game mall rather than view friend data, the pre-caching operation can only cache the game mall data without caching the friend data.

[0204] exist Figure 5 In the illustrated method, the target application caches its data using different caching strategies before and after receiving the first indication information. The duration of data downloaded per unit time using the first caching strategy before receiving the first indication information is shorter than the duration of data downloaded per unit time using the second caching strategy after receiving the first indication information. In other words, after receiving the first indication information indicating the presence of an abnormal area in the forward direction, the target application caches data using the second caching strategy, thereby increasing the duration of data downloaded per unit time. This allows users to use the target application normally while passing through the abnormal area, avoiding service interruptions and improving user experience.

[0205] In some embodiments, the electronic device 100 can perform the learning process by itself. Figure 6 The application scenarios shown and Figure 7 The flowchart shown introduces the above learning process.

[0206] See Figure 6 , Figure 6 This is a schematic diagram of another application scenario of an abnormal user path area provided by an embodiment of the present application. Figure 6 The application scenarios shown and Figure 1A-1M The application scenarios shown are similar, please refer to Figure 1A-1M Description. Figure 6 For example, a first cell and a second cell exist between a home and an outlier. The first cell and the second cell can be a single cell or a cell cluster consisting of multiple cells (e.g., neighboring cells). This is not limiting; in specific implementations, more or fewer cells may exist.

[0207] In some embodiments, as Figure 6 As shown, there is a preset point between the second cell and the abnormal point (for example Figure 1A-1M Normal point C in Figure 5The first position is the preset point where the control component sends the first indication information to the target application, which can also be understood as the position where the target application starts to perform the pre-caching operation. The electronic device 100 presets the time from the preset point to the abnormal point as the first time length T_trig. The first time length can be Figure 3 Any duration in the first preset time range shown, such as 30 seconds, can be found in Figure 3 Description of the first preset time range in . Not limited to this, T_trig can also be equal to the time it takes to reach the abnormal point from the second cell, that is, the preset point is any point in the second cell. T_trig can also be equal to the time it takes to reach the abnormal point from the first cell, that is, the preset point is any point in the first cell. T_trig can also be less than the time it takes to reach the abnormal point from the second cell, but greater than the time it takes to reach the abnormal point from the first cell, that is, the preset point can be between the first cell and the second cell. The embodiments of the present application do not limit the specific time when the electronic device performs the pre-caching operation.

[0208] See Figure 7 , Figure 7 This is a flow chart of a learning process provided by an embodiment of the present application. The learning process may include but is not limited to the following steps:

[0209] S701: When a cell change is detected, the electronic device records a cell switching list.

[0210] Specifically, the cell may include the serving cell of the electronic device 100, and optionally, may further include a neighboring cell, and optionally, may further include signal quality parameters of the serving cell and the neighboring cell (e.g., RSRP, RSRQ, packet loss rate, signal-to-noise ratio, etc.). Accordingly, the cell switching list recorded by the electronic device may include an identifier of the serving cell, and optionally, may further include an identifier of the neighboring cell, and optionally, may further include signal quality parameters of the serving cell and the neighboring cell.

[0211] For example, Figure 6 As shown, while a user is traveling from home to work, electronic device 100 monitors messages including cell changes, cell information, service anomaly notifications, and service recovery notifications. While the user is traveling from home to the anomaly location, electronic device 100 monitors a cell change: the first cell switches to the second cell. The cell switching list is then recorded as: first cell, second cell. Optionally, electronic device 100 may also record information about the first and second cells.

[0212] However, it should be noted that the cell handover list can record cell information after ping-pong is removed, that is, the cell information that appears for the first time. For example, when a user is traveling from a first cell to a second cell, and hears a cell change: first cell, second cell, first cell, the cell handover list recorded will be first cell, second cell.

[0213] S702: When a service abnormality notification event is monitored, the electronic device determines whether there is a fenced area at the abnormal point.

[0214] Specifically, service anomaly notification events may include, but are not limited to: network disconnection, dropping to a low network standard, signal-to-noise ratio, RSRP, RSRQ less than a preset threshold, QoE less than a first QoE level, packet loss rate greater than a preset threshold, etc. When a service anomaly notification event is monitored, the electronic device 100 considers the current location to be an abnormal point.

[0215] Specifically, the fence cell can be one or more cells, which are used to measure the time to reach the abnormal point and determine the route, so that the electronic device 100 can subsequently perform the corresponding prediction process for different routes. The embodiment of the present application takes two cells as an example to illustrate the fence cell. It can be understood that since two points determine a line, the accuracy of determining the route of the current route through two fence cells is higher, and there is no need to record too much cell information, reducing the storage pressure and processing pressure of the electronic device 100. Among them, the fence cell that is farther away from the abnormal point or the preset point is called the first fence cell, and the fence cell that is closer to the abnormal point or the preset point is called the second fence cell.

[0216] The electronic device can determine whether there are at least two cells outside the abnormal point or the preset point through the cell switching list recorded in S701. If there are at least two cells outside the abnormal point or the preset point, the electronic device can determine the two cells closest to the abnormal point or the preset point as fence cells. For example, Figure 6 As shown, the user passed through the first cell and the second cell while traveling from home to the abnormal point, and the electronic device 100 recorded the information of the first cell and the second cell in the cell switching list. When the user arrives at the abnormal point, the electronic device 100 monitors the service abnormality notification event. Then, the electronic device 100 can determine that the first cell and the second cell exist outside the abnormal point according to the cell switching list, and thus determine the first cell and the second cell as the fence cells of the abnormal point. When it does not exist, the information of the abnormal area is not recorded. For example, the abnormal point and the starting point of the route (such as Figure 6 The user's home is adjacent to the abnormal point before passing through other cells when setting out, so the information of the abnormal area is not recorded. The information of the abnormal area may include the information of the abnormal point and the information of the recovery point.

[0217] S703: When the abnormal point exists in a fenced area, the electronic device records information of the abnormal point.

[0218] Specifically, the information about the abnormal point may include, but is not limited to, fenced cell information, the time it takes to reach the abnormal point from the first fenced cell, the time it takes to reach the abnormal point from the second fenced cell, the type of service anomaly, and the number of service anomaly occurrences. Optionally, the abnormal area information may also include the location information of the abnormal point. The service anomaly type and the number of service anomaly occurrences can be obtained from monitored service anomaly notification events while the electronic device passes through the abnormal area. For example, the number of service anomaly occurrences is the number of service anomaly notification events received from the time the electronic device enters the abnormal area to the time it leaves the abnormal area.

[0219] For example, Figure 6 As shown, when the user passes through an abnormal area, the electronic device 100 records the information of the abnormal point: the identification information of the second cell, the signal quality parameters, the time from the second cell to the abnormal point (the second time length T_avgfen), the service abnormality type in the service abnormality notification event monitored when passing through the abnormal area, and the number of service abnormality occurrences. Figure 6 The route shown is a route on the ground, for example, where location information can be obtained. The information of the abnormal point recorded by the electronic device 100 may further include: latitude and longitude information, direction information, and speed information of the abnormal point.

[0220] S704: When a service recovery notification event is monitored, the electronic device records information of the recovery point.

[0221] Specifically, the information of the recovery point may include but is not limited to the time from the abnormal point to the recovery point, and optionally, may also include the location information of the recovery point. Figure 6 As shown, when the user reaches the recovery point, the electronic device 100 monitors the service recovery notification event, and the electronic device 100 records the information of the recovery point: the time from the abnormal point to the recovery point (the third time length T_avgrec). Figure 6 The route shown is a route on the ground, for example, where location information can be obtained. The information of the recovery point recorded by the electronic device 100 may further include: latitude and longitude information, direction information, and speed information of the recovery point.

[0222] S705: The electronic device updates the abnormal area database according to the recorded abnormal area information.

[0223] Specifically, the abnormal area information includes information about the abnormal area's starting point (i.e., the abnormal point) and the abnormal area's end point (i.e., the recovery point). Based on the recorded abnormal area information, the electronic device 100 can update existing records in the abnormal area database or add new records to the database. Assume that the abnormal area database contains a record of a user's route from home to work (i.e., the route to work). An example of this record is shown in Table 2 below.

[0224] Table 2 Records of abnormal areas on the commute

[0225]

[0226] Among them, scene=0 indicates that the route type is a commute route, for example, scene=1 indicates that the route type is a commute route, and scene=2 indicates that the route type is a play route. weakType=0 indicates that the service anomaly type is a network drop, for example, weakType=1 indicates that the service anomaly type is a drop to a low network standard, weakType=2 indicates that the service anomaly type is poor signal quality (such as RSRP and RSRQ are less than a preset threshold), and weakType=3 indicates that the QoE is less than the first QoE level.

[0227] weakLoc="116.2, 40.6, 17.79, 23" indicates that the longitude of the abnormal point is 116.2, the latitude is 40.6, the speed is 17.79 (for example, in kilometers per hour), and the direction angle is 23 degrees north-east. recoverLoc="116.3, 40.2, 18.6, 25" indicates that the longitude of the recovery point is 116.3, the latitude is 40.2, the speed is 18.6 (for example, in kilometers per hour), and the direction angle is 25 degrees north-east. This embodiment of the application does not limit the accuracy, unit, value, and other representation methods of the location information.

[0228] "firstFenceCell" is the cell ID of the first fence cell, and "secondFenceCell" is the cell ID of the second fence cell. A cell ID is a unique identifier. "timestamp="1599102391" indicates the time of the most recent entry into the abnormal area was "2020-09-03 11:06:30."

[0229] historyTimeFence2Weak="57,47,48,0,0" indicates that the three most recent times from the second fence cell to the anomaly point took 57 seconds, 47 seconds, and 48 seconds, respectively. historyTimeWeak2Recover="34,33,32,0,0" indicates that the three most recent times from the anomaly point to the recovery point took 34 seconds, 33 seconds, and 32 seconds, respectively. "0" indicates that the vehicle did not pass through the anomaly area. Therefore, based on the two historical records, the vehicle passed through the anomaly area three times, corresponding to count="3".

[0230] avgTimeFenceToWeak = "49" indicates that the average time from the second fence cell to the abnormal point is 49 seconds. In some embodiments, avgTimeFenceToWeak can be obtained by taking the average value of historyTimeFence2Weak. The specific calculation process is as follows:

[0231]

[0232] Similarly, avgTimeWeakToRecover = "33" means that the average time from the abnormal point to the recovery point is 33 seconds. In some embodiments, avgTimeWeakToRecover can be obtained by taking the average value of historyTimeWeak2Recover. The specific calculation process is as follows:

[0233]

[0234] In a specific implementation, avgTimeFenceToWeak can also be obtained by removing the maximum and minimum values ​​in the value of historyTimeFence2Weak and then taking the average value, and avgTimeWeakToRecover can also be obtained by removing the maximum and minimum values ​​in the value of historyTimeWeak2Recove and then taking the average value. The embodiments of the present application are not limited to this.

[0235] In some embodiments, the electronic device 100 passes through an area where location information cannot be obtained, such as a subway or a tunnel, instead of an area where location information can be obtained on the ground. In this case, weakLoc = "0,0,0,0", and recoverLoc = "0,0,0,0" in the learned record of the abnormal area.

[0236] The characteristic information of the abnormal area is not limited to the cases listed in Table 2. In a specific implementation, the characteristic information of the abnormal area may also include the time from the first fenced cell to the abnormal point, the timestamp of the last departure from the recovery point, etc. This embodiment of the present application is not limited to this. The following is an example of the abnormal area information included in the abnormal area database as shown in Table 2.

[0237] Based on Table 2, assuming that the electronic device 100 passes through an abnormal area on the commute route for the fourth time, the electronic device 100 can update the record shown in Table 2 based on the information about the abnormal area on the commute route recorded this time, or add a record of the abnormal area to the database. A specific example is shown below:

[0238] In Example 1, assuming that the scene, weakLoc, recoverLoc, firstFenceCell, and secondFenceCell recorded when electronic device 100 passes through the abnormal area on its fourth commute remain unchanged, count can be updated to 4, and timeStamp can be updated to the timestamp of the service anomaly notification event, which is the timestamp of the arrival at the abnormal point. Assuming that the recorded time from the second cell to the abnormal point is T_fen = 50, historyTimeFence2Weak can be updated to "57, 47, 48, 50, 0", and avgTimeFenceToWeak can be updated. The update process is as follows.

[0239] First, calculate the average value of the updated historyTimeFence2Weak. The calculation process is as follows:

[0240]

[0241] Then get the updated avgTimeFenceToWeak, the calculation process is as follows:

[0242] avgTimeFenceToWeak=(1-a)×avgTimeFenceToWeak+a×t_newfence

[0243] The value range of a is [0,1], for example, a=0.6.

[0244] The process of updating historyTimeWeak2Recover and avgTimeWeakToRecover is similar to the process of updating historyTimeFence2Weak and avgTimeFenceToWeak. The calculation process of the updated avgTimeWeakToRecover is as follows:

[0245] avgTimeWeakToRecover=(1-b)×avgTimeWeakToRecover+b×t_newrecover

[0246] t_newrecover is the average of the updated historyTimeWeak2Recove values. The value range of b is the same as that of a; a and b can be the same or different.

[0247] In a specific implementation, when calculating the average value of the updated historyTimeFence2Weak or the average value of historyTimeFence2Weak, the maximum and minimum values ​​may be removed first and then the average value is taken. This embodiment of the present application does not limit this.

[0248] Example 2: Assume that when the electronic device 100 passes through the abnormal area on the route to work for the fourth time, the detected firstFenceCell and secondFenceCell remain unchanged, and the difference between the location when the business abnormality prediction notification event is detected (i.e., the abnormal point) and the weakLoc in Table 2 is less than the preset threshold, for example, the distance is less than 100 meters, then the electronic device 100 can obtain an updated weakLoc based on the abnormal point detected this time and the weakLoc in Table 2, for example, taking the middle position of the two positions.

[0249] Similarly, assuming that when the electronic device 100 passes through the abnormal area on the route to work for the fourth time, the detected firstFenceCell and secondFenceCell remain unchanged, and the difference between the location of the detected business abnormality prediction notification event (i.e., the recovery point) and the recoverLoc in Table 2 is less than the preset threshold, for example, the distance is less than 100 meters, then the electronic device 100 can obtain an updated recoverLoc based on the recovery point detected this time and the recoverLoc in Table 2, for example, taking the middle position between the two positions.

[0250] It can be understood that the methods of updating weakLoc and recoverLoc may be the same or different.

[0251] Example three: Suppose that when the electronic device 100 passes through the abnormal area on the route to work for the fourth time, the detected firstFenceCell and secondFenceCell remain unchanged, and the difference between the location when the business abnormality prediction notification event is detected (i.e., the abnormal point) and the weakLoc in Table 2 is greater than the preset threshold, for example, the distance is greater than 100 meters, then the electronic device 100 can re-add a record of the abnormal area detected this time in the database.

[0252] Similarly, assuming that the electronic device 100 passes through the abnormal area on the route to work for the fourth time, the detected firstFenceCell and secondFenceCell remain unchanged, and the difference between the location of the detected business abnormality prediction notification event (i.e., the recovery point) and the recoverLoc in Table 2 is greater than the preset threshold, for example, the distance is greater than 100 meters, then the electronic device 100 can re-add a record of the abnormal area detected this time in the database.

[0253] It can be understood that the preset threshold corresponding to weakLoc and the preset threshold corresponding to recoverLoc may be the same or different.

[0254] Example 4: Suppose that when the electronic device 100 passes through the abnormal area on the route to work for the fourth time, it detects that the cell ID of any of the two cells closest to the abnormal point is not the firstFenceCell or secondFenceCell in Table 2, then the electronic device 100 can add a new record of the abnormal area detected this time to the database.

[0255] Example 5: The electronic device 100 may periodically delete records in the abnormal area database whose time stamp is less than a preset threshold, for example, deleting records of abnormal areas that have not been updated for three months every month.

[0256] Without being limited to the examples listed above, in a specific implementation, assuming that when the electronic device 100 passes through the abnormal area of ​​the route to work for the fourth time, the detected scene (for example, the travel route) is not the scene in Table 2 (i.e., the route to work), the electronic device 100 can re-add a record of the abnormal area detected this time to the database. The embodiments of the present application are not limited to this.

[0257] Not limited to the above Figure 7 In the example learning process, in a specific implementation, the electronic device may not record the cell switching list or determine the presence of fenced cells. Upon detecting a service anomaly notification event, the electronic device may obtain its location information. Optionally, it may also obtain at least one of the following information: the time of entry into the anomaly area, the time of exit from the anomaly area, and the duration of the anomaly area. The anomaly area database may then be updated based on the obtained location information and the at least one of the above information. This embodiment of the present application is not limited to this.

[0258] It is understandable that the electronic device 100 can execute the same route each time. Figure 7 The method shown can obtain real and reliable information about the abnormal area, facilitate the subsequent prediction process, and improve the accuracy of the first indication information.

[0259] Next, the prediction process is introduced. For areas where location information can be obtained, such as on the ground, the prediction process performed by the electronic device 100 can be found in Figures 8-11 For areas where location information cannot be obtained, such as subways and tunnels, the prediction process performed by the electronic device 100 can be found in Figure 12 The embodiment shown.

[0260] See Figure 8 , Figure 8It is a flowchart of a prediction process provided in an embodiment of the present application. Figure 8 For example, the latitude, longitude, and speed information of the route area can be obtained. The prediction process may include but is not limited to the following steps:

[0261] S801: The electronic device determines a target record in the abnormal area database that matches the cell currently passed.

[0262] Specifically, when the electronic device 100 determines that it has passed through at least two cells, the electronic device 100 can extract at least one record whose "number of times it has passed through an abnormal area count" is greater than a preset threshold (for example, 3) from the abnormal area database, and determine the target record from the at least one record. The "first fence cell identifier firstFenceCell" and the "second fence cell identifier secondFenceCell" in the target record are the identifiers of two consecutive cells that the electronic device 100 has currently passed. When there is a target record, the electronic device 100 determines that it has passed through the fence cell in the target record, that is, the scene information of the current route is the scene information in the target record (for example, the route to work in Table 2).

[0263] In some embodiments, the electronic device 100 may also obtain scene information of the current route. If the scene information is the "scene information scene" existing in the abnormal area database, and it is determined that it has passed through at least two cells, the electronic device may execute S801.

[0264] For example, see Figure 9 , Figure 9 This is a schematic diagram of another application scenario of an abnormal user path area provided by an embodiment of the present application. Figure 9 The application scenarios shown and Figure 1A-1M and Figure 6 Similar, see Figure 1A-1M and Figure 6 Description.

[0265] like Figure 9 As shown in Table 2, while the user is traveling from home to the first point, electronic device 100 passes through the first and second cells. When electronic device 100 reaches the second cell, electronic device 100 can determine from the abnormal area database the target record where "firstFenceCell" is the identifier of the first cell and "secondFenceCell" is the identifier of the second cell. That is, the fence cells are the target records for both the first and second cells. The following description uses the records shown in Table 2 as target records as an example.

[0266] S802: The electronic device obtains the location information of the abnormal point, the location information of the recovery point, the average time T_avgfen from the second fence cell to the abnormal point, and the average time T_avgrec from the abnormal point to the recovery point in the target record.

[0267] Specifically, the electronic device obtains the latitude and longitude information S_drop and the speed information V_drop of the abnormal point in the target record, and the latitude and longitude information S_rec and the speed information V_rec of the recovery point.

[0268] For example, if the target record is the record shown in Table 2, the information obtained is: the weakLoc of the abnormal point in Table 2, the recoverLoc of the recovery point, the average time avgTimeFenceToWeak from the second fence cell to the abnormal point (i.e. Figure 6 T_avgfen in), the average time from the abnormal point to the recovery point avgTimeWeakToRecover (i.e. Figure 6 According to the target record, the time required for the electronic device 100 to pass through the second cell, the abnormal point and the recovery point can be referred to above. Figure 6 The duration shown.

[0269] S803: The electronic device obtains location information of the current location.

[0270] Specifically, when the user arrives at the second cell (eg Figure 9 When the electronic device 100 reaches the first point in the second cell shown in FIG1 , the electronic device 100 obtains the latitude and longitude information S_Loc and the speed information V_Loc of the current position for the first time.

[0271] S804: The electronic device calculates a fourth duration T_drop and a fifth duration T_rec according to the target record and the location information of the current location.

[0272] Specifically, the fourth duration T_drop is the duration from the current position to the abnormal point calculated based on the target record, the latitude and longitude information of the current position, and the speed information. The fifth duration T_rec is the duration from the abnormal point to the recovery point calculated based on the target record, the latitude and longitude information of the current position, and the speed information.

[0273] For example, Figure 9 As shown, the fourth time duration T_drop is the time duration to reach the abnormal point calculated by the electronic device 100 at the first point, and the calculation method is as follows:

[0274] First, calculate the distance D_Loctodrop between the first point S_Loc and the outlier point S_drop;

[0275] Then calculate the average velocity V_Loctodrop between the first point S_Loc and the outlier point S_drop. The expression is as follows:

[0276]

[0277] Finally, the fourth duration T_drop is obtained based on D_Loctodrop and V_Loctodrop. The expression is as follows:

[0278]

[0279] The fifth time duration T_rec is the time duration from the abnormal point to the recovery point calculated by the electronic device 100 at the first point, and is calculated as follows:

[0280] First, calculate the distance D_droptorec between the outlier point S_drop and the recovery point S_rec;

[0281] Then calculate the average velocity V_droptorec between the outlier point S_drop and the recovery point S_rec. The expression is as follows:

[0282]

[0283] Finally, the fifth duration T_rec is obtained based on D_droptorec and V_droptorec. The expression is as follows:

[0284]

[0285] S805: The electronic device obtains a sixth time duration T_newfen according to the average time duration T_avgfen from the second fenced cell to the abnormal point in the target record.

[0286] Specifically, according to the target record, the sixth time duration T_newfen from the current position to the abnormal point is obtained by subtracting the time duration from the second cell to the current position from the average time duration T_avgfen from the second cell to the abnormal point. Figure 9 As shown, the current position is the first point in the second cell, that is, the time length from the second cell to the current position is 0, then T_newfen=T_avgfen-0=T_avgfen.

[0287] S806: The electronic device obtains a seventh duration T_newdrop according to the fourth duration T_drop and the sixth duration T_newfen.

[0288] Specifically, T_newdrop is the time duration from the current position to the abnormal point predicted by the electronic device 100 at the first point. An example of the expression of T_newdrop is as follows:

[0289] T_newdrop=c×T_drop+(1-c)×T_newfen

[0290] The value range of c is [0, 1], for example, c = 0, c = 0.6 or c = 1.

[0291] S807: The electronic device obtains an eighth duration T_newrec according to the fifth duration T_rec and the third duration T_avgrec.

[0292] Specifically, T_newrec is the time from the abnormal point to the recovery point predicted by the electronic device 100 at the first point. An example of the expression of T_newrec is as follows:

[0293] T_newrec=d×T_rec+(1-d)×T_avgrec

[0294] The value range of d is [0, 1], for example, d = 0, d = 0.6 or d = 1. c and d can be the same or different.

[0295] For example, Figure 9 As shown, when the electronic device 100 is at the first point, the predicted duration to reach the abnormal point is: the seventh duration T_newdrop obtained by combining the fourth duration T_drop calculated based on the real-time location and the sixth duration T_newfen obtained based on the target record. When the electronic device 100 is at the first point, the predicted duration from the abnormal point to the recovery point is: the eighth duration T_newrec obtained by combining the fifth duration T_rec calculated based on the real-time location and the third duration T_avgrec in the target record.

[0296] S808: The electronic device determines whether the seventh time duration T_newdrop is less than or equal to the first time duration T_trig.

[0297] S809: The electronic device performs a pre-caching operation.

[0298] Specifically, the electronic device 100 determines whether T_newdrop≤T_trig is satisfied. If satisfied, the electronic device 100 determines that the current position has passed through the preset point (for example, the current position is Figure 10 If the second point is not shown), the electronic device 100 performs a pre-cache operation on the target application according to the first indication information (ie, executes S809). Otherwise, the electronic device 100 executes S810.

[0299] Specifically, the electronic device performs a pre-caching operation according to the first indication information, that is, the target application receives the first indication information sent by the control component and caches the data of the target application using the second cache strategy. The description of the first indication information, the second cache strategy and the pre-caching operation can be found in Figure 1A-1M 、 Figure 3 、 Figure 5 The description of the first indication information and pre-cache operation will not be repeated here.

[0300] Understandably, Figure 6 The various situations of the preset point have been described in the above. For example, the preset point can be any point in the second cell. Then, the preset duration is equal to the seventh duration T_newdrop obtained for the first time. In this case, the electronic device can directly execute S809 without executing S808 and S810.

[0301] In some embodiments, each time S803 is executed, the number of times the location is acquired Cnt may be increased by 1. Specifically, the initial value of the number of times the location is acquired Cnt is 0. When the user arrives at the second cell, the electronic device 100 acquires the latitude and longitude information S_Loc and the speed information V_Loc of the current location for the first time. At this time, the number of times the location is acquired Cnt=Cnt+1=0+1=1.

[0302] On this basis, S808 may specifically include: the electronic device 100 determines whether the following conditions are met: the number of times the position is obtained Cnt ≥ a first threshold C_max (for example, 5) and (T_newdrop-T_trig) > a second threshold Th (for example, 5 seconds). When satisfied, the electronic device 100 considers that the prediction process is inaccurate and stops the prediction. Otherwise, the electronic device 100 continues to execute: determining whether T_newdrop≤T_trig is satisfied. When satisfied, the electronic device 100 performs a pre-cache operation for the target application according to the first indication information (ie, executes S809). Otherwise, the electronic device 100 executes S810. Alternatively, the electronic device 100 determines whether Cnt≥C_max and (T_newdrop-T_trig)≤Th is satisfied. When satisfied, the electronic device 100 determines that although the current position has not passed through the preset point, it is very close to the preset point (for example, Figure 11 If the first indication information is not provided, the electronic device 100 performs a pre-cache operation on the target application according to the first indication information (ie, executes S809). Otherwise, the electronic device 100 executes S810.

[0303] In an embodiment of the present application, the prediction process can increase the limit on the number of times the position is obtained, thereby ensuring the accuracy of the first indication information while minimizing unnecessary power consumption and overhead of the electronic device and improving battery life.

[0304] S810: The electronic device obtains a ninth duration T_test according to the seventh duration T_newdrop and the first duration T_trig.

[0305] Specifically, the ninth time duration T_test is the time duration from the current moment to the next execution of S803. For example, the electronic device 100 may calculate T_test using a dichotomy method, and the expression of T_test is as follows:

[0306]

[0307] S811: The electronic device determines whether the elapsed time is greater than or equal to a ninth time period T_test.

[0308] Specifically, when the electronic device 100 determines that the time period that has elapsed is greater than or equal to T_test, that is, the time for obtaining the location information of the current location next time has arrived, the electronic device 100 executes S803, otherwise it continues to wait. Figure 9 As shown, the time when the user is at the first point is the first moment, and the time when the user executes S803 next time is the time after the time length T_test from the first moment, that is, the sum of the first moment and T_test.

[0309] It should be noted that the order of S801-S802 and S803 is not limited and they can be executed simultaneously. The order of S804-S806 and S807 is not limited and they can be executed simultaneously. The order of S804 and S805 is not limited and they can be executed simultaneously.

[0310] exist Figure 8 In the method shown, the electronic device can perform a prediction process based on the historical records in the abnormal area database, the cell information and location information obtained in real time, and obtain the first indication information and the time of sending the first indication information, thereby increasing the accuracy of judging whether there is an abnormal area, and trying to avoid using the second cache strategy to cache data when there is no abnormal area or avoiding the situation where the abnormal area is not detected when it exists, thereby improving the user experience.

[0311] If the first indication information includes the time of entering the abnormal area and the duration of the abnormal area, and the pre-caching operation performed by the target application can be determined based on the first indication information, for example, the playback duration of the data downloaded by the pre-caching operation is the duration of the abnormal area. When the real-time location information of the electronic device changes, for example, when the moving speed is faster or slower, the first indication information obtained is different, so the pre-caching operation determined based on the first indication information may also be different. In this way, the pre-caching operation can be dynamically adjusted according to different application scenarios, thereby ensuring that the target application can be used normally when the user passes through the abnormal area in different application scenarios, avoiding service jams, and improving user experience.

[0312] See Figure 12 , Figure 12 This is a flowchart of another prediction process provided in an embodiment of the present application. Figure 12 For example, the prediction process may include but is not limited to the following steps:

[0313] S1201: The electronic device determines a target record in the abnormal area database that matches the cell currently passed.

[0314] Specifically, S1201 and Figure 8 The S801 is similar and will not be described in detail.

[0315] S1202: The electronic device obtains the average time duration T_avgfen from the second fenced cell to the abnormal point and the average time duration T_avgrec from the abnormal point to the recovery point in the target record.

[0316] For example, the target record is the record shown in Table 2, and the information obtained is: the average time avgTimeFenceToWeak (i.e., the average time from the second fence cell to the abnormal point) Figure 6 T_avgfen in), the average time from the abnormal point to the recovery point avgTimeWeakToRecover (i.e. Figure 6 According to the target record, the time required for the electronic device 100 to pass through the second cell, the abnormal point and the recovery point can be referred to above. Figure 6 The duration shown.

[0317] S1203: The electronic device determines whether the elapsed time is equal to (T_avgfen-T_trig).

[0318] S1204: The electronic device performs a pre-caching operation.

[0319] Specifically, when the electronic device 100 determines that the current elapsed time is less than (T_avgfen-T_trig), that is, the electronic device 100 has not reached the preset point, the electronic device 100 continues to wait. Figure 9 When the first point in the second cell is shown, the electronic device 100 executes S1202-S1203, and the elapsed time is equal to 0. Figure 9 If the middle preset point is closer to the abnormal point than the second cell, the time T_trig from the preset point to the abnormal point is less than T_avgfen in the target record, and (T_avgfen-T_trig)> 0. Therefore, if the elapsed time is less than (T_avgfen-T_trig), the electronic device 100 continues to wait.

[0320] Specifically, the electronic device performs a pre-caching operation according to the first indication information, that is, the target application receives the first indication information sent by the control component and caches the data of the target application using the second cache strategy. The description of the first indication information, the second cache strategy and the pre-caching operation can be found in Figure 1A-1M 、 Figure 3 、 Figure 5 The description of the first indication information and pre-cache operation will not be repeated here.

[0321] When the electronic device 100 determines that the current elapsed time is equal to (T_avgfen-T_trig), that is, the electronic device 100 has reached the preset point (for example, Figure 11 The electronic device 100 performs a pre-caching operation on the target application according to the first indication information (i.e., executes S1204). Optionally, the first indication information includes a time length T_trig from the current position (i.e., the preset point) to the abnormal point and a time length T_avgrec from the abnormal point to the recovery point.

[0322] Understandably, Figure 6 Various situations of the preset point have been described in the foregoing. For example, the preset point can be any point in the second cell, and the first duration T_trig is equal to T_avgfen. In this case, the electronic device can directly execute S1204 without executing S1203.

[0323] exist Figure 12 In the illustrated method, for areas where location information is unavailable, the electronic device can perform a prediction process based on historical records in the abnormal area database and real-time cell information to obtain first indication information. Furthermore, based on the first indication information, a pre-caching operation can be performed on the target application, thereby maximizing the ability to use the target application normally when passing through the abnormal area, avoiding service interruptions and improving the user experience.

[0324] Not limited to Figure 8 and Figure 12 In the prediction process shown, in a specific implementation, the electronic device may also only obtain the current location information of the electronic device, and determine whether there is an abnormal area record corresponding to the current location information in the abnormal area database, and generate first indication information if it exists, and send the first indication information. Alternatively, the electronic device may also obtain both the location information and the current location information of the electronic device, and determine whether there is an abnormal area record corresponding to the current cell information and the current location information in the abnormal area database, and generate first indication information if it exists, and send the first indication information. The embodiments of the present application are not limited to this.

[0325] It is understandable that when the electronic device 100 passes through any route, it can execute Figure 7The learning process shown, and / or, Figure 8 or Figure 12 The prediction process shown.

[0326] Based on the above Figure 1A-1M 、 Figure 2-Figure 12 Some embodiments are shown, and the data caching method provided by the present application is introduced below.

[0327] See Figure 13 , Figure 13 This is a data caching method provided by the embodiment of the present application. This method can be applied to Figure 2 The electronic device 100 and the processor 110 of the electronic device 100 are shown. The method can also be applied to Figure 3 The electronic device 100 shown. The method can also be applied to Figure 4 The software system shown is, for example, the Android system or HMS system of the electronic device 100. The method may include but is not limited to the following steps:

[0328] S1301: The electronic device performs a first prediction process for a first abnormal area, and performs a second prediction process for a second abnormal area to obtain first indication information.

[0329] Specifically, the first abnormal area is an area where the electronic device can obtain location information. The electronic device can perform a first prediction process based on the database of the abnormal area, the network information obtained in real time, and the location information to obtain the first indication information. The specific implementation of the first prediction process can be found in Figures 8-11 The second abnormal area is an area where the electronic device cannot obtain location information. The electronic device can perform a second prediction process based on the database records of the abnormal area and the network information obtained in real time to obtain the first indication information. The specific implementation of the second prediction process can be found in Figure 12 The embodiment shown.

[0330] In some embodiments, before S1301, the method may further include: monitoring information. Specifically, the monitored information may include, but is not limited to: location information such as the latitude and longitude information, speed information, and direction information of the electronic device; cell information such as the cell ID of the serving cell of the electronic device, the cell ID of the neighboring cell, signal quality parameters of the current cell and / or neighboring cells; notification messages of network or service anomalies such as RSRP and RSRQ being less than a preset threshold, and QoE being less than a first QoE level.

[0331] In some embodiments, before S1301, the method may further include: executing a learning process. Specifically, the electronic device may identify and count abnormal areas based on the above-mentioned monitored information to generate the above-mentioned abnormal area database. In other embodiments, the above-mentioned abnormal area database may also be obtained by the cloud server executing a learning process based on the monitored information sent by at least one electronic device. For a detailed description of the learning process, please refer to Figure 6-Figure 7 The embodiments shown will not be described in detail.

[0332] S1302: The electronic device performs a pre-caching operation according to the first indication information.

[0333] Specifically, the electronic device performs a pre-caching operation according to the first indication information, that is, the target application receives the first indication information sent by the control component, and caches the data of the target application using the second cache strategy. Figure 1A-1M 、 Figure 3 、 Figure 5 The description of the pre-caching operation and the second cache strategy will not be repeated here.

[0334] Specifically, the first indication information may include type, and optionally, may also include first time information t1, and optionally may also include second time information t2, and optionally may also include third time information t3. Wherein, type taking the first value indicates that there is an abnormal area, and type taking the second value indicates that the previously sent broadcast message is invalid. t1 may be the moment of entering the abnormal area, or the time from the current position to entering the abnormal area. t2 may be the moment of leaving the abnormal area, or the time from the current position to leaving the abnormal area. t3 may be the time from entering the abnormal area to leaving the abnormal area, that is, the duration of the abnormal area. Figures 8-11 In the first prediction process shown, the first time t1 is the seventh duration T_newdrop, the second time t2 is the eighth duration T_newrec, and the third time t3 is the difference between the two. Figure 12 In the second prediction process shown, the first time t1 is the first duration T_trig, the second time t2 is the third duration T_avgrec, and the third time t3 is the difference between the first and second durations T_trig.

[0335] Specifically, the pre-caching operation can be targeted at the target application. The target application is an online application with a caching mechanism, such as an audio application, a video application, a learning application, a reading application, etc. Optionally, the target application is an application that has registered for a business anomaly prediction notification event during installation or operation. For details, see Figure 1A-1M 、 Figure 2-Figure 5 Description of the target application.

[0336] exist Figure 13In the illustrated method, the electronic device can perform different prediction processes for areas where location information is available and areas where it is not, thereby scalably adapting to different application scenarios and maximizing the accuracy of the first indication information. The electronic device can also perform pre-caching based on the first indication information, ensuring normal use of the electronic device while passing through an abnormal area, avoiding service interruptions, and improving the user experience.

[0337] In addition, the abnormal area database used by the electronic device to perform the prediction process is obtained by the electronic device or cloud server learning historical monitoring information, which ensures the authenticity and reliability of the data used in the prediction process, thereby further improving the accuracy of the first indication information.

[0338] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The above computer program product includes one or more computer instructions. When the above computer program instructions are loaded and executed on a computer, the above process or function according to the present application is generated in whole or in part. The above computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The above computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The above 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 or data center that includes one or more available media integrated. The above available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).

[0339] In short, the above is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included in the scope of protection of the present invention.

[0340] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A data caching method, characterized in that: Applied to an electronic device, the electronic device includes a target application and a control component, the method includes: The electronic device runs the target application and caches data of the target application using a first caching strategy, where the first caching strategy includes at least one of the following: downloading the data of the target application using a first download rate, downloading the data of the target application using a first bit rate, downloading the data of the target application using a first resolution, downloading the data of the target application using a first frame rate, and requesting the data of the target application using a first request number, where the first request number is the number of requests per unit time; caching first type data and second type data, where the first type and the second type are different; downloading the data of the target application using a first sampling frequency, downloading the data of the target application using a first sampling bit number, and downloading the data of the target application using a first number of channels; Predicting that there is an abnormal area in the forward direction of the electronic device; When the duration of time from the current location of the electronic device entering the abnormal area is within a first preset time range, the target application receives the first indication information sent by the control component, wherein the first preset time range is determined according to the scene in which the electronic device is located; After the target application receives the first indication information, a second caching strategy is adopted to cache the data of the target application, where the second caching strategy includes at least one of the following: downloading the data of the target application using a second download rate, which is greater than the first download rate; downloading the data of the target application using a second bit rate, which is less than the first bit rate; downloading the data of the target application using a second resolution, which is less than the first resolution; downloading the data of the target application using a second frame rate, which is less than the first frame rate; requesting the data of the target application using a second number of requests, which is the number of requests per unit time, which is greater than the first number of requests; caching the first type of data and not caching the second type of data; downloading the data of the target application using a second sampling frequency, which is less than the first sampling frequency; downloading the data of the target application using a second sampling number of bits, which is less than the first sampling number of bits; downloading the data of the target application using a second number of channels, which is less than the first number of channels.

2. The method according to claim 1, wherein Before the target application receives the first indication information sent by the control component, the method further includes: The target application sends a registration message to the control component; the registration message is used to obtain the first indication information, and the first indication information is used to indicate that there is an abnormal area in the forward direction of the electronic device, and the abnormal area is at least one of the following areas: an area where the signal quality is less than a preset threshold; an area where the network is disconnected; an area where the system is dropped, where the system is dropped, and the first network system is changed to a second network system lower than the first network system; an area where the quality of experience (QoE) is less than the first QoE level.

3. The method according to claim 2, wherein There is a first position between the abnormal area and the current position, no other cells exist between the current position and the first position, and the first position is the position where the control component sends the first indication information; or The abnormal area is an area whose distance from the current position is within a first distance range.

4. The method according to claim 2, wherein The target application sends a registration message to the control component, including: When detecting that the target application switches from background operation to foreground operation or is started, the target application sends the registration message to the control component.

5. The method according to claim 3, wherein The method further comprises: obtaining current cell information of the electronic device; determining whether there is an abnormal area record corresponding to the current cell information in a data file of the abnormal area; if there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area, the control component generates the first indication information; or obtaining the current location information of the electronic device; determining whether there is an abnormal area record corresponding to the current location information in the data file of the abnormal area; if there is an abnormal area record corresponding to the current location information in the data file of the abnormal area, the control component generates the first indication information; or Obtain the current cell information and the current location information of the electronic device; determine whether there is an abnormal area record corresponding to the current cell information and the current location information in the data file of the abnormal area; if there is an abnormal area record corresponding to the current cell information and the current location information in the data file of the abnormal area, the control component generates the first indication information.

6. The method according to claim 3, wherein The method further comprises: Obtaining current cell information and current location information of the electronic device; Determining whether there is an abnormal area record corresponding to the current cell information in the abnormal area data file; When there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area, the control component generates the first indication information; the current location information is used to determine the time of sending the first indication information.

7. The method according to claim 5 or 6, wherein: The method further comprises: Obtain information about the cell passed by the electronic device; when a service abnormality notification event is detected, determine whether the electronic device has passed through at least one cell before a second preset time range in the information about the cell passed by the electronic device; in the case of passing through the at least one cell, add a first abnormal area record in the data file of the abnormal area, or update the second abnormal area record in the data file of the abnormal area, the first abnormal area record or the second abnormal area record includes information about the at least one cell; the service abnormality notification event is used to indicate at least one of the following information: signal quality is less than the preset threshold, network disconnection, the first network standard is changed to the second network standard lower than the first network standard, and QoE is less than the first QoE level; or, When the service abnormality notification event is detected, the location information of the electronic device is obtained, and a third abnormal area record is added to the data file of the abnormal area, or the fourth abnormal area record in the data file of the abnormal area is updated. The location information in the third abnormal area record or the fourth abnormal area record is obtained based on the location information of the electronic device.

8. The method according to claim 7, wherein The adding a first abnormal area record in the data file of the abnormal area, or updating a second abnormal area record in the data file of the abnormal area, when passing through the at least one cell, comprises: When passing through the at least one cell, the location information of the electronic device is obtained, and the first abnormal area record is added to the data file of the abnormal area, or the second abnormal area record in the data file of the abnormal area is updated, the first abnormal area record or the second abnormal area record includes information of the at least one cell, and the location information in the first abnormal area record or the second abnormal area record is obtained based on the location information of the electronic device.

9. The method according to claim 7, wherein The adding a first abnormal area record in the data file of the abnormal area, or updating a second abnormal area record in the data file of the abnormal area, when passing through the at least one cell, comprises: When passing through the at least one cell, at least one of the following information is obtained: the time of entering the abnormal area, the time of leaving the abnormal area, and the duration of the abnormal area; the first abnormal area record is added to the data file of the abnormal area, or the second abnormal area record in the data file of the abnormal area is updated; the time of entering the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of entering the abnormal area, or the time of leaving the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of leaving the abnormal area, or the duration of the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the duration of the abnormal area.

10. The method according to claim 1, wherein After the target application receives the first indication information and caches the data of the target application using the second cache strategy, the method further includes: When the electronic device is in the abnormal area, at least one of the following methods is adopted: downloading the data of the target application using a third download rate, the third download rate being less than the first download rate; downloading the data of the target application using a third bit rate, the third bit rate being less than or equal to the second bit rate; downloading the data of the target application using a third resolution, the third resolution being less than or equal to the second resolution; downloading the data of the target application using a third frame rate, the third frame rate being less than or equal to the second frame rate; requesting the data of the target application using a third request number, the third request number being the number of requests per unit time, the third request number being less than or equal to the first request number; After leaving the abnormal area, the first cache strategy is adopted to cache the data of the target application.

11. The method according to claim 1, wherein The adopting the first caching strategy to cache the data of the target application includes: when the playback duration of the data of the target application cached by adopting the first caching strategy is greater than a first preset duration, stopping caching the data of the target application; The adopting the second caching strategy to cache the data of the target application includes: when the playback duration of the amount of data of the target application cached by adopting the second caching strategy is greater than the first preset duration, continuing to cache the data of the target application.

12. The method according to claim 1, wherein The step of caching the data of the target application using a second caching strategy after the target application receives the first indication information includes: In response to receiving the first indication information, caching the data of the target application using the second caching strategy; and / or, Within a second preset time period after receiving the first indication information, the step of caching the data of the target application using the second caching strategy is initiated, where the second preset time period is less than 1 second.

13. The method according to claim 1, wherein The first indication information further includes: first time information, the first time information being used to indicate the time of entering the abnormal area; and / or, The first indication information further includes: second time information, the second time information being used to indicate the time of leaving the abnormal area; and / or, The first indication information further includes: third time information, where the third time information is used to indicate the duration of the abnormal area.

14. The method according to claim 13, wherein The step of caching the data of the target application using a second caching strategy after the target application receives the first indication information includes: After the target application receives the first indication information, the second caching strategy is used to cache the data of the target application with a playback duration of a third preset duration, wherein the third preset duration is a duration obtained based on the first time information and the second time information, or the third preset duration is a duration indicated by the third duration information.

15. The method according to claim 1, wherein The target application is a video application, and the second caching strategy includes at least one of the following: downloading data of the target application using the second download rate, downloading data of the target application using the second bit rate, downloading data of the target application using the second resolution, downloading data of the target application using the second frame rate, and requesting data of the target application using the second request number; or, The target application is an audio application, and the second caching strategy includes at least one of the following: downloading data of the target application using the second download rate, requesting data of the target application using the second number of requests, downloading data of the target application using the second sampling frequency, downloading data of the target application using the second sampling bit number, and downloading data of the target application using the second number of channels.

16. A chip, characterized in that: The chip includes at least one processor, an interface circuit, and a memory. The memory, the interface circuit, and the at least one processor are interconnected via a circuit. The memory stores a computer program. When the computer program is executed by the at least one processor, the chip implements: Receive a registration message sent by a target application; the registration message is used to register a first notification event; generating first indication information when it is predicted that there is an abnormal area in the forward direction of the chip; The first indication information is used to indicate that the abnormal area exists in the forward direction of the chip, and the abnormal area is at least one of the following areas: an area where signal quality is less than a preset threshold, an area where the network is disconnected, an area where the network standard is dropped, and an area where the quality of experience (QoE) is less than a first QoE level, where the network standard is dropped and a first network standard is changed to a second network standard that is lower than the first network standard; When the duration of entering the abnormal area from the current position of the chip is within a first preset time range, the first indication information is sent to the target application registered with the first notification event, wherein the first preset time range is determined according to the scenario in which the chip is located.

17. The chip according to claim 16, wherein: When the chip generates the first indication information, it specifically implements: Obtaining current cell information; determining whether there is an abnormal area record corresponding to the current cell information in the abnormal area data file; generating the first indication information if there is an abnormal area record corresponding to the current cell information in the abnormal area data file; or, Get current location information; determining whether there is an abnormal area record corresponding to the current location information in the abnormal area data file; and generating the first indication information if there is an abnormal area record corresponding to the current location information in the abnormal area data file; or, Acquire the current cell information and the current location information; determining whether there is an abnormal area record corresponding to the current cell information and the current location information in the abnormal area data file; When an abnormal area record corresponding to the current cell information and the current location information exists in the abnormal area data file, the first indication information is generated.

18. The chip according to claim 16, wherein: When the chip generates the first indication information, it specifically implements: Obtaining current cell information and current location information of the chip; Determining whether there is an abnormal area record corresponding to the current cell information in the abnormal area data file; When there is an abnormal area record corresponding to the current cell information in the data file of the abnormal area, the first indication information is generated; the current location information is used to determine the time of sending the first indication information.

19. The chip according to claim 17 or 18, characterized in that The chip is also used to implement: Obtain information about the cell passed by the chip; when a service abnormality notification event is detected, determine whether the chip has passed through at least one cell before a second preset time range in the information about the cell passed by the chip; in the case of passing through the at least one cell, add a first abnormal area record to the data file of the abnormal area, or update the second abnormal area record in the data file of the abnormal area, the first abnormal area record or the second abnormal area record includes information about the at least one cell; the service abnormality notification event is used to indicate at least one of the following information: signal quality is less than the preset threshold, network disconnection, the first network standard is changed to the second network standard lower than the first network standard, and QoE is less than the first QoE level; or, When the business abnormality notification event is detected, the location information of the chip is obtained, and a third abnormal area record is added to the data file of the abnormal area, or the fourth abnormal area record in the data file of the abnormal area is updated. The location information in the third abnormal area record or the fourth abnormal area record is obtained based on the location information of the chip.

20. The chip according to claim 19, wherein: When the chip passes through the at least one cell, the chip adds a first abnormal area record to the data file of the abnormal area, or updates a second abnormal area record in the data file of the abnormal area, specifically implementing: When passing through the at least one cell, the location information of the chip is obtained, and the first abnormal area record is added to the data file of the abnormal area, or the second abnormal area record in the data file of the abnormal area is updated; the first abnormal area record or the second abnormal area record includes information of the at least one cell, and the location information in the first abnormal area record or the second abnormal area record is obtained based on the location information of the chip.

21. The chip according to claim 19, wherein: When the chip passes through the at least one cell, the chip adds a first abnormal area record to the data file of the abnormal area, or updates a second abnormal area record in the data file of the abnormal area, specifically implementing: When passing through the at least one cell, obtaining at least one of the following information: time of entering the abnormal area, time of leaving the abnormal area, and duration of the abnormal area; The first abnormal area record is added to the data file of the abnormal area, or the second abnormal area record in the data file of the abnormal area is updated; the time of entering the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of entering the abnormal area, or the time of leaving the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of leaving the abnormal area, or the duration of the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the duration of the abnormal area.

22. The chip according to claim 16, wherein: The chip is further configured to implement: receiving a deregistration message sent by the target application; the deregistration message is used to cancel registration of the first notification event.

23. An electronic device, characterized in that: The method comprises a transceiver, a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the method according to any one of claims 1 to 15.

24. A computer storage medium, characterized in that The computer storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 15 is implemented.

Citation Information

Patent Citations

  • Shutdown management and control method and device for electronic equipment

    CN110519451A

  • Predictive bit-rate modification of content delivery in a wireless network

    CN102257868A

  • Data transmission method and data transmission device

    CN108551436A

  • Delivery of digital video content based upon geographic location

    US20200213384A1