Data caching method and electronic device
Patent Information
- Application Number
- JP2023515719
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-09-10
- Filing Date
- 2021-09-02
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-09-02
AI Technical Summary
については、第1の態様において提供されるデータキャッシュ方法の有益な効果を参照する。詳細はここでは再び説明しない。
Smart Images

Figure 0007609380000013 
Figure 0007609380000014 
Figure 0007609380000015
Abstract
Description
[Technical field]
[0001] [CROSS-REFERENCE TO RELATED APPLICATIONS] This application claims priority to Chinese Patent Application No. 202010950649.5, entitled “DATA CACHING METHOD AND ELECTRONIC DEVICE”, filed with the State Intellectual Property Office of the People's Republic of China on September 10, 2020, the entire contents of which are incorporated by reference.
[0002] [Technical field] This application relates to the field of electronic device technology, and more particularly to a data caching method and electronic device. [Background technology]
[0003] The use of online applications such as audio applications or video applications usually requires a good network environment. However, currently, there are still a number of abnormal areas with weak or even no network coverage, and when a user passes through an abnormal area, the network service of an electronic device becomes abnormal. For example, a user may pass through a number of cells that provide network services to the user during a daily commute. When passing through some cells with good network quality, the user can normally use online applications such as audio applications, video applications, or learning applications. However, when passing through some cells with bad network quality, the user cannot normally use the online application (e.g., frame freeze occurs during audio and video playback), which affects the user experience. Summary of the Invention
[0004] The embodiments of this application disclose a data caching method and electronic device for improving user experience by avoiding the situation where a user cannot normally use online applications, such as audio applications or video applications, when passing through an area where network services are abnormal.
[0005] According to a first aspect, an embodiment of the present application provides a data caching method applied to an electronic device. The electronic device includes a target application and a control component, and the method includes: the electronic device executes the target application and caches data of the target application based on a first cache policy, the first cache policy including at least one of the following: downloading data of the target application at a first download rate, downloading data of the target application at a first bit rate, downloading data of the target application at a first resolution, downloading data of the target application at a first frame rate, requesting data of the target application by using a first request number, the first request number being a request number within a unit time, caching a first type of data and a second type of data, the first type being different from the second type, downloading data of the target application at a first sampling frequency, downloading data of the target application by using a first sampling bit number, and downloading data of the target application by using a first sound channel number. The target application receives the first indication information sent by the control component.After receiving the first instruction information, the target application caches data of the target application based on a second cache policy, and the second cache policy includes the following: downloading data of the target application at a second download rate, the second download rate being greater than the first download rate; downloading data of the target application at a second bit rate, the second bit rate being smaller than the first bit rate; downloading data of the target application at a second resolution, the second resolution being smaller than the first resolution; downloading data of the target application at a second frame rate, the second frame rate being smaller than the first frame rate; and using a second request number. the second request number being a number of requests within a unit time, the second request number being greater than the first request number; caching the first type of data and skipping caching the second type of data; downloading the target application data at a second sampling frequency, the second sampling frequency being smaller than the first sampling frequency; downloading the target application data by using a second sampling bit number, the second sampling bit number being smaller than the first sampling bit number; and downloading the target application data by using a second sound channel number, the second sound channel number being smaller than the first sound channel number.
[0006] The first indication information is used to indicate that an abnormal area exists in the direction of travel of the electronic device, and the abnormal area is at least one of the following areas: an area where the signal quality is lower than a preset threshold, a network disconnection area, a standard drop area where the standard drops from a first network standard to a second network standard lower than the first network standard, and an area where the quality of experience QoE is lower than a first QoE level.
[0007] In this embodiment of the application, the target application caches the data of the target application based on different cache policies before and after receiving the first indication information. The usage period of the amount of data downloaded within a unit time based on the first cache policy before receiving the first indication information is smaller than the usage period of the amount of data downloaded within a unit time based on the second cache policy after receiving the first indication information. In other words, after receiving the first indication information used to indicate that an abnormal area exists in the traveling direction, the target application caches data based on the second cache policy to increase the usage period of the amount of data downloaded within a unit time, thereby allowing the user to use the target application as normally as possible when passing through the abnormal area. This avoids service freezes and improves user experience.
[0008] In a 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, the first indication information is used to indicate that an abnormal area exists in the traveling direction of the electronic device, the abnormal area being at least one of the following areas: an area where the signal quality is lower than a preset threshold, a network disconnection area, a standard drop area where the standard drop changes from a first network standard to a second network standard lower than the first network standard, and an area where the quality of experience QoE is lower than a first QoE level.
[0009] In this embodiment of the present application, the target application that receives the first instruction information and caches data based on the second cache policy is the application that sends the registration message to the control component. Therefore, the target application can autonomously choose whether to receive the first instruction information and cache data based on the second cache policy, which greatly improves the flexibility of implementation.
[0010] In a possible implementation, a first location exists between the abnormal area and the current location, and there are no other cells between the current location and the first location, and the first location is a location from which the control component sends first instruction information, or the abnormal area is an area within a first distance range from the current location.
[0011] In this embodiment of the application, the first location still exists between the current location and the abnormal area, and the distance between the current location and the abnormal area is not too short. Therefore, the period of data caching by the target application based on the second cache policy (i.e., the period from the first location to the abnormal area) is not too short (e.g., the period is not 0). More data is downloaded, so that the target application can be used properly when the abnormal area is passed. This avoids service freeze and improves user experience.
[0012] In a possible implementation, the method further includes: the control component sends first indication information to the target application when a period during which the electronic device enters the abnormal area from a current location is within a first preset time range.
[0013] In this embodiment of the application, the period during which the target application caches data based on the second cache policy is within a first preset time range. The period during which the target application caches data based on the second cache policy can be controlled by controlling the first preset time range. The first preset time range can be determined according to requirements. For example, when the power is low, the first preset time range can be decreased to avoid the case where the power consumption is excessively high because the target application downloads data at the second download rate, and for example, when the period of the abnormal area is long, the first preset time range can be increased, so that the target application can be used as normally as possible when the abnormal area is passed. This avoids service freeze and improves user experience.
[0014] In a possible implementation manner, the target application sending a registration message to the control component includes: when the target application detects that the target application has been switched from background execution to foreground execution or has been launched, the target application sends registration information to the control component.
[0015] In this embodiment of the application, when the target application is used, the target application can send a registration message to the control component, so that the control component sends the first indication information only when the target application is used, which can avoid the case where user experience is affected due to fast power consumption, poor clarity of viewing content, and incomplete viewing content caused by the target application caching data based on the second cache policy when the target application is not used.
[0016] In a possible implementation manner, the method further includes: obtaining current cell information of the electronic device, and determining whether an abnormal area record corresponding to the current cell information exists in the data file of the abnormal area, and when an abnormal area exists, the control component generates first indication information; or obtaining current location information of the electronic device, and determining whether an abnormal area record corresponding to the current location information exists in the data file of the abnormal area, and when an abnormal area exists, the control component generates first indication information; or obtaining current cell information and current location information of the electronic device, and determining whether an abnormal area record corresponding to the current cell information and the current location information exists in the data file of the abnormal area, and when an abnormal area exists, the control component generates first indication information.
[0017] In a possible implementation manner, the method further includes determining whether an abnormal area record corresponding to the current cell information exists in the abnormal area data file, and when an abnormal area record exists, the control component generates first indication information, and the current location information is used to determine a time for sending the first indication information.
[0018] In this embodiment of this application, there are various ways of generating the first indication information. For example, when 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. This is applicable to multiple scenarios and has good availability.
[0019] In a possible implementation, the method includes obtaining information about cells through which the electronic device passes; when detecting a service anomaly notification event, determining in the information about the cells through which the electronic device passes whether the electronic device passes at least one cell before a second preset time range; if the electronic device passes at least one cell, adding a first abnormal area record to a data file of abnormal areas or updating a second abnormal area record in the data file of abnormal areas, where the first abnormal area record or the second abnormal area record includes information about at least one cell; and the service anomaly notification event includes the following information: signal The method further includes, when a service abnormality notification event is detected, the quality is used to indicate at least one of the following: the quality is lower than a preset threshold, the network is disconnected, the first network standard is changed to a second network standard lower than the first network standard, and the QoE is lower than the first QoE level, or a service abnormality notification event is detected, obtaining location information of the electronic device and adding a third abnormal area record to the abnormal area data file or updating a fourth abnormal area record in the abnormal area data file, 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.
[0020] In this embodiment of the application, the data file of the abnormal area is used to generate the first indication information, i.e., to determine whether an abnormal area exists in the traveling direction. When the electronic device detects a service abnormality notification event, it can update the data file of the abnormal area based on the current 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. This greatly improves the accuracy of determining whether an abnormal area exists, and tries to avoid the case where data is cached based on the second cache policy when an abnormal area does not exist or when an abnormal area exists but an abnormal area is not detected, improving the user experience.
[0021] In a possible implementation manner, adding a first abnormal area record to the abnormal area data file or updating a second abnormal area record in the abnormal area data file when the electronic device passes through at least one cell includes obtaining location information of the electronic device, and adding a first abnormal area record to the abnormal area data file or updating a second abnormal area record in the abnormal area data file when the electronic device passes through at least one cell, wherein the first abnormal area record or the second abnormal area record includes information about 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.
[0022] In an embodiment of this application, the abnormal area record in the abnormal area data file can be obtained not only by updating cell information, but also based on location information. For areas where location information is available, the electronic device can generate first indication information based on real-time location information and the location information recorded in the abnormal area in the abnormal area data file. This improves the accuracy of determining whether an abnormal area exists, and tries to avoid the case where data is cached based on the second cache policy when no abnormal area exists or when an abnormal area exists but no abnormal area is detected, improving user experience.
[0023] In a possible implementation manner, adding a first abnormal area record to the abnormal area data file or updating a second abnormal area record in the abnormal area data file when the electronic device passes through at least one cell includes obtaining at least one of the following information, namely, a time of entering the abnormal area, a time of leaving the abnormal area, and a duration of the abnormal area, when the electronic device passes through at least one cell, and adding a first abnormal area record to the abnormal area data file or updating a second abnormal area record in the abnormal area data file, wherein 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.
[0024] In this embodiment of the application, the abnormal area record in the abnormal area data file can further include history record information such as the time of entering the abnormal area, the time of leaving the abnormal area, and the duration of the abnormal area. Both the generation of the first instruction information by the control component and the transmission of the first instruction information refer to the above information in the abnormal area database file, thereby assisting in determining the actual time of entering the abnormal area, the actual time of leaving the abnormal area, and the duration of the abnormal area. This improves the accuracy of determining whether an abnormal area exists, and tries to avoid the case where data is cached based on the second cache policy when an abnormal area does not exist, or when an abnormal area exists but an abnormal area is not detected, improving the user experience.
[0025] In a possible implementation manner, after the target application receives the first instruction information and caches the data of the target application based on the second cache policy, the method further includes: when in the abnormal area, the electronic device uses at least one of the following manners: downloading the data of the target application at a third download rate, where the third download rate is smaller than the first download rate; downloading the data of the target application at a third bit rate, where the third bit rate is equal to or less than the second bit rate; downloading the data of the target application at a third resolution, where the third resolution is equal to or less than the second resolution; downloading the data of the target application at a third frame rate, where the third frame rate is equal to or less than the second frame rate; and requesting the data of the target application by using a third request number, where the third request number is the number of requests within a unit time, where the third request number is equal to or less than the first request number; and caching the data of the target application based on the first cache policy after leaving the abnormal area.
[0026] In this embodiment of the application, when the electronic device is in the abnormal area, the target application can further reduce parameters such as resolution, bit rate and frame rate for downloading data, so as to increase the usage period of the data downloaded in a unit time, so as to allow the user to use the target application in the abnormal area as much as possible. When the electronic device leaves the abnormal area, the data of the target application is restored to be cached based on the first cache policy, so as to allow the user to continue to use the target application normally.
[0027] In a possible implementation, caching the data of the target application based on a first cache policy includes stopping caching the data of the target application when a playback period of the amount of data of the target application cached based on the first cache policy is greater than a first preset period, and caching the data of the target application based on a second cache policy includes continuing to cache the data of the target application when a playback period of the amount of data of the target application cached based on the second cache policy is greater than the first preset period.
[0028] In this embodiment of the application, within the same period, the use period of data cached by the target application based on the first cache policy is smaller than the use period of data cached by the target application based on the second cache policy. Therefore, when an abnormal area exists in the travel direction, the target application caches data based on the second cache policy, so that the period of use of the target application can be extended when the user passes through the abnormal area. This avoids service freeze as much as possible and improves user experience.
[0029] In a possible implementation manner, caching the data of the target application based on the second cache policy after the target application receives the first instruction information includes: caching the data of the target application based on the second cache policy in response to receiving the first instruction information, and / or initiating a step of caching the data of the target application based on the second cache policy within a second preset period after the first instruction information is received, wherein the second preset period is less than 1 second.
[0030] In an embodiment of this application, after receiving the first indication information, the target application caches the data of the target application for a short time according to the second cache policy, so that the use period of the cached data before entering the abnormal area is as long as possible, so that the user can use the target application for a longer period when passing through the abnormal area, which can avoid service freezing as much as possible and improve the user experience.
[0031] In a possible implementation manner, 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.
[0032] In this embodiment of this application, the first indication information can further include the detailed time of entering the abnormal area, the time of leaving the abnormal area, or the period of the abnormal area.The target application can select the second cache policy according to the first indication information, for example, when the period of the abnormal area is long, the second download rate can be a little higher to download more data.This greatly improves the flexibility of implementation and has high availability.
[0033] In a possible implementation manner, caching data of the target application based on the second cache policy after the target application receives the first instruction information includes: caching data of the target application, the playback period of which is a third preset period, based on the second cache policy after the target application receives the first instruction information, wherein the third preset period is a period obtained based on the first time information and the second time information, or the third preset period is a period indicated by the third time information.
[0034] In this embodiment of the present application, the playing duration of the data downloaded by the target application before the target application enters the abnormal area can be equal to the duration of the abnormal area, which ensures that the target application can be used normally when the user passes through the abnormal area.
[0035] In a possible implementation, the target application is a video application and the second cache policy 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 by using a second request count; or the target application is an audio application and the second cache policy includes at least one of the following: downloading data of the target application at a second download rate, requesting data of the target application by using a second request count, downloading data of the target application at a second sampling frequency, downloading data of the target application by using a second sampling bit count, and downloading data of the target application by using a second sound channel count.
[0036] The embodiments of this application are applicable to different target applications, such as video applications and audio applications. For different applications, the second cache policies can be different. Therefore, the application scenarios are wider and the availability is higher.
[0037] According to a second aspect, an embodiment of this application provides a chip. The chip includes at least one processor and an interface circuit. Optionally, the chip further includes a memory. The memory, the interface circuit and the at least one processor are interconnected through a line, and the memory stores a computer program. When the computer program is executed by the at least one processor, the following is realized: receiving a registration message sent by a target application, the registration message is used to register a first notification event; generating first indication information, the first indication information is used to indicate that an abnormal area exists in the travel direction of the chip, the abnormal area is at least one of the following areas: an area where the signal quality is lower than a preset threshold, a network disconnection area, a standard drop area, and an area where the quality of experience QoE is lower than a first QoE level, and the standard drop changes from a first network standard to a second network standard lower than the first network standard; and sending the first indication information to the target application where the first notification event is registered.
[0038] In this embodiment of the application, the chip can send first indication information to the target application that has the first notification time registered, and the first indication information is used to indicate that an abnormal area exists in the traveling direction, so that the target application can take corresponding actions according to the first notification information, for example, increase the download rate, so that the user can use the target application as normally as possible when passing through the abnormal area, which avoids service freezing and improves the user experience.
[0039] In a possible implementation manner, when generating the first instruction information, the chip specifically realizes the following steps: obtaining 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, and when an abnormal area exists, generating the first instruction information by the control component; or obtaining 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, and when an abnormal area exists, generating the first instruction information by the control component; or obtaining current cell information and 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, and when an abnormal area exists, generating the first instruction information by the control component.
[0040] In a possible implementation manner, when generating the first instruction information, the chip specifically implements the following steps: obtaining current cell information and current location information of the chip; determining whether an abnormal area record corresponding to the current cell information exists in the abnormal area data file; and when an abnormal area record exists, generating the first instruction information by the control component, and the current location information is used to determine the time to send the first instruction information.
[0041] In this embodiment of this application, there are various ways of generating the first indication information. For example, when the current location information cannot be obtained, the chip can obtain the current cell information to determine whether to generate the first indication information. This is applicable to multiple scenarios and has good availability.
[0042] In a possible implementation, the chip includes the following steps: obtain information about the cells the chip passes through; when a service abnormality notification event is detected, in the information about the cells the chip passes through, determine whether the chip passes at least one cell before a second time range that is preset; if the chip passes at least one cell, add a first abnormal area record to the abnormal area data file or update a second abnormal area record in the abnormal area data file, where the first abnormal area record or the second abnormal area record includes information about at least one cell; and the service abnormality notification event is detected based on the following information: The method is further configured to realize a step of: detecting a service abnormality notification event using the detected abnormality information to indicate at least one of the following: the QoE level is lower than a set threshold, the network has been disconnected, the first network standard has been changed to a second network standard lower than the first network standard, and the QoE is lower than the first QoE level; or, when a service abnormality notification event is detected, obtaining location information of the chip and adding a third abnormal area record to the abnormal area data file or updating a fourth abnormal area record in the abnormal area data file, 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.
[0043] In this embodiment of the application, the data file of the abnormal area is used to generate the first indication information, i.e., to determine whether an abnormal area exists in the traveling direction. When the chip detects a service abnormality notification event, it can update the data file of the abnormal area based on the current 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. This greatly improves the accuracy of determining whether an abnormal area exists, and tries to avoid the case where data is cached based on the second cache policy when there is no abnormal area, or when an abnormal area exists but no abnormal area is detected, improving the user experience.
[0044] In a possible implementation manner, adding a first abnormal area record to the abnormal area data file or updating a second abnormal area record in the abnormal area data file when the chip passes through at least one cell is specifically realized as follows: when the chip passes through at least one cell, obtaining location information of the chip, and adding a first abnormal area record to the abnormal area data file or updating a second abnormal area record in the abnormal area data file, wherein the first abnormal area record or the second abnormal area record includes information about 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.
[0045] In an embodiment of this application, the abnormal area record in the abnormal area data file can be obtained not only by updating cell information, but also based on location information. For areas where location information can be obtained, the chip can generate first indication information based on real-time location information and the location information recorded in the abnormal area in the abnormal area data file. This improves the accuracy of determining whether an abnormal area exists, and tries to avoid the case where data is cached based on the second cache policy when no abnormal area exists or when an abnormal area exists but no abnormal area is detected, improving user experience.
[0046] In a possible implementation manner, when the chip passes through at least one cell, adding a first abnormal area record to the abnormal area data file or updating a second abnormal area record in the abnormal area data file is specifically realized as follows: when the chip passes through at least one cell, obtaining at least one of the following information, namely, the time of entering the abnormal area, the time of exiting the abnormal area, and the duration of the abnormal area, and adding a first abnormal area record to the abnormal area data file or updating a second abnormal area record in the abnormal area data file, wherein 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 exiting the abnormal area in the first abnormal area record or the second abnormal area record is obtained based on the time of exiting 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.
[0047] In this embodiment of the application, the abnormal area record in the abnormal area data file can further include history record information such as the time of entering the abnormal area, the time of leaving the abnormal area, and the duration of the abnormal area. Both the generation of the first instruction information by the control component and the transmission of the first instruction information refer to the above information in the abnormal area database file, thereby assisting in determining the actual time of entering the abnormal area, the actual time of leaving the abnormal area, and the duration of the abnormal area. This improves the accuracy of determining whether an abnormal area exists, and tries to avoid the case where data is cached based on the second cache policy when an abnormal area does not exist, or when an abnormal area exists but an abnormal area is not detected, improving the user experience.
[0048] In a possible implementation manner, the chip is further configured to implement the following step: receiving an unregistration message sent by the target application, the unregistration message being used to cancel registration for the first notification event.
[0049] In this embodiment of this application, when the target application does not need to obtain the first indication information, the target application can send a deregistration message to the chip. In other words, the target application can autonomously choose whether to receive the first indication information. This greatly improves the flexibility of implementation.
[0050] According to a third aspect, an embodiment of the present application provides an electronic device including a transceiver, a processor and a memory, the memory being configured to store a computer program code, the computer program code including computer instructions, and the processor calling the computer instructions, thereby causing the above user equipment to execute the data caching method provided in the first aspect or any one of the implementation manners of the first aspect in the embodiment of the present application.
[0051] According to a fourth aspect, an embodiment of the present application provides a computer storage medium, the computer storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, perform a data caching method provided in the first aspect or any one of the implementations of the first aspect in the embodiment of the present application.
[0052] According to a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a communication device, enables the communication device to execute a data caching method provided in the first aspect or any one of the implementation manners of the first aspect in the embodiment of the present application.
[0053] According to a sixth aspect, an embodiment of the present application provides an electronic device, including a method or apparatus for carrying out any of the embodiments of the present application. The electronic device is, for example, a chip.
[0054] It can be understood 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 configured to execute the data cache method provided in the first aspect. Therefore, for the beneficial effects that can be achieved, refer to the beneficial effects of the data cache method provided in the first aspect. Details will not be described again here. [Brief description of the drawings]
[0055] The following describes the accompanying drawings used in the embodiments of this application. [Figure 1A] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1B] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1C]FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1D] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1E] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1F] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1G] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1H] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1I] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1J] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1K] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1L] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Figure 1M] FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. [Diagram 2] 1 is a schematic diagram of a structure of an electronic device according to an embodiment of the present application. [Diagram 3] 1 is a schematic diagram of a structure of an electronic device according to an embodiment of the present application. [Figure 4] 1 is a schematic diagram of a structure of an electronic device according to an embodiment of the present application. [Diagram 5] 1 is a schematic flowchart of a data caching method according to an embodiment of the present application. [Figure 6] FIG. 2 is a schematic diagram of another application scenario according to an embodiment of the present application. [Figure 7] 1 is a schematic flow chart of a learning process according to an embodiment of the present application. [Figure 8A] 1 is a schematic flow chart of a prediction process according to an embodiment of the present application. [Figure 8B] 1 is a schematic flow chart of a prediction process according to an embodiment of the present application. [Figure 9] FIG. 2 is a schematic diagram of a further application scenario according to an embodiment of the present application; [Figure 10] FIG. 2 is a schematic diagram of a further application scenario according to an embodiment of the present application; [Figure 11] FIG. 2 is a schematic diagram of a further application scenario according to an embodiment of the present application; [Figure 12] 1 is a schematic flow chart of another prediction process according to an embodiment of the present application. [Figure 13] 4 is a schematic flowchart of another data caching method according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0056] The technical solutions according to the embodiments of this application are clearly and completely described below with reference to the accompanying drawings. The terms used in the implementation manner of the embodiments of this application are merely used to describe the specific embodiments of this application, and are not intended to limit this application.
[0057] The following describes an application scenario in which a user passes through an abnormal area on the route to the company. The abnormal area is an area where the signal quality is lower than a preset threshold. When the user passes through the abnormal area, there is a high probability that a network service abnormality occurs on the electronic device used by the user. The network service abnormality may include, but is not limited to, no network signal (i.e., network disconnection), dropping to a lower network standard (e.g., dropping from a 5th-generation mobile network (5G) communication technology to a 3rd-generation (3G)), poor signal quality, and poor application quality of experience. Poor signal quality may be that a parameter used to represent signal quality (signal quality parameter for short) does not meet a preset condition. For example, the signal-to-noise ratio, reference signal received power (RSRP) or reference signal received quality (RSRQ) is smaller than a preset threshold, and the packet loss rate is larger than a preset threshold. A poor quality of experience for an application may be, for example, a quality of experience (QoE) less than a first QoE level. A lower QoE level indicates a worse user experience. For example, there are three QoE levels 0, 1 and 2, where 0 indicates a bad user experience, 1 indicates an average user experience and 2 indicates a good user experience. The first QoE level is 2 and the abnormal areas are areas with QoE levels 0 or 1.
[0058] As shown in FIG. 1A, a user opens a video application on the electronic device 100 before leaving home, and watches a video on the video application during the process of moving from home to the office. On the route to the office, there are two normal areas and one abnormal area. The normal area may be a 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, there is no frame freeze or a short frame freeze time (e.g., less than 3 seconds) when the video application on the electronic device 100 plays a video. The abnormal area may be a network coverage area of an abnormal cell, a weak network coverage area of a normal cell, or an area without network coverage. The abnormal cell cannot provide normal network services to the electronic device. For example, the abnormal cell cannot provide a network to the electronic device, or can only provide a network of 2nd-generation wireless telephone technology (2G) specifications to the electronic device. Therefore, when the user passes through the abnormal area, the electronic device 100 cannot be used normally. For example, when a video application on the electronic device 100 plays a video, there may be a long freeze time (eg, greater than 20 seconds) or the video may not play.
[0059] As shown in FIG. 1A, when the user reaches the normal point A in the first normal area, the electronic device 100 may display a user interface 110 of a video application. The user interface 110 may include a signal quality identifier 111, a time identifier 112, a black dot 113, and a gray dot 114. The signal quality identifier 111 is used to represent that the electronic device 100 is currently connected to a 5G network with five signal bars (i.e., full bars). In this case, the signal quality is good. The time identifier 112 is "15:00 / 48:52", where "48:52" is used to indicate that the total duration of the video currently being played by the video application (i.e., the video of the 17th episode) is 48 minutes and 52 seconds, and "15:00" indicates that the image currently being played by the video application is an image of the video at 15 minutes. Corresponding to the time identifier 112, the black dot 113 is used to indicate that the video has been played up to 15 minutes. A grey dot 114 is used to indicate that up to 15 minutes and 30 seconds of the video is cached.
[0060] When the video application is in the normal area, the video data may be cached based on a first cache policy. The first cache policy 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 bit rate, downloading the data of the target application at a first resolution, downloading the data of the target application at a first frame rate, and requesting the data of the target application by using a first request number, the first request number being a request number in a unit time. For example, when the video application caches the video data based on the first cache policy, the first download rate is downloading the video data with a playing period of 10 seconds per second. When the playing period of the video data downloaded by the video application is equal to the first usage period (300 seconds, i.e., 5 minutes), the video data is stopped from being cached. When the playing period of the video data downloaded by the video application is equal to or less than the second usage period (30 seconds), the video data continues to be cached, i.e., the video data of the first usage period is cached every time, and the video data continues to be cached until the usage period of the remaining cache size is equal to or less than the second usage period.
[0061] This is not limited to the above example. In a specific implementation, the first and second usage periods may also be other values.
[0062] As shown in FIG. 1A, when the user passes through the first normal area, the electronic device 100 accesses the 5G network with five signal bars (i.e., full bars). The signal quality is good, and the video application on the electronic device 100 caches video data based on the first cache policy. When the user reaches the normal point A, the current cache duration in the user interface 110 is 15 minutes 30 seconds, the current playing duration is 15 minutes, and the difference between the two values is equal to 30 seconds. Therefore, 30 seconds after this point, i.e., in the process of the user moving from the normal point A to the normal point B, the first download rate remains as the download of video data with a duration of 10 seconds per second. Therefore, 5 minutes of video data are downloaded within 30 seconds. Correspondingly, the black dot 113 and the gray dot 114 in the user interface 110 move, and the time identifier 112 also changes. When the user reaches normal point B, a black dot 113 in the user interface 110 is used to indicate that the video has been played up to 15 minutes 30 seconds, and a grey dot 114 is used to indicate that the video has been cached up to 20 minutes 30 seconds.
[0063] As shown in FIG. 1B, when the user continues to move from normal point B for 14 minutes and reaches normal point C, the black dot 113 and the gray dot 114 in the user interface 110 move and the time identifier 112 also changes. When the user reaches normal point C, the black dot 113 is used to indicate that the video is played up to 29 minutes 30 seconds, and the gray dot 114 is used to indicate that the video is cached up to 30 minutes. The difference between the two values is 30 seconds. Therefore, in the next 30 seconds, i.e., when the user moves from normal point C to the abnormal point, 5 minutes of video data are downloaded. When the user reaches the abnormal point, the black dot 113 in the user interface 110 is used to indicate that the video is played up to 30 minutes, and the gray dot 114 is used to indicate that the video is cached up to 35 minutes. Starting from this point, i.e., when the user passes through the abnormal area, the signal quality identifier 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. In this case, the download rate of the video data is 0.
[0064] As shown in FIG. 1C, when the user continues to move from the anomaly point to the midpoint for 5 minutes, the user may continue to watch the video. In this case, the black dot 113 in the user interface 110 moves, and the time identifier 112 also changes. However, the gray dot 114 in the user interface 110 does not move, because the download rate in the anomaly area is 0, i.e., no video data can be downloaded. When the user reaches the midpoint, the black dot 113 in the user interface 110 is used to indicate that the video is being played up to 35 minutes, and the gray dot 114 is used to indicate that the video is still cached up to 35 minutes. In this case, the black dot 113 coincides with the gray dot 114. When the user continues to move from the midpoint for 10 minutes (before reaching the recovery point), the gray dot 114 in the user interface 110 cannot move. Therefore, the user cannot continue to watch the video, and the black dot 113 and the time identifier 112 cannot move either.
[0065] As shown in FIG. 1C, when the user reaches the recovery point, the signal quality identifier 111 in the user interface 110 is used to represent that the electronic device 100 accesses the 5G network with five signal bars (i.e., full bars). The signal quality is good, and therefore the video data may continue to be downloaded based on the first cache policy, and the gray dot 114 may move. In this case, the gray dot 114 may be used to indicate that the video is cached until 35 minutes and 30 seconds. Then, when the user continues to move from the recovery point to the company (i.e., when the user is in the second normal area), the network service is normal, and the video application on the electronic device 100 may continue to operate normally based on the first cache policy, and the user may also continue to watch the video on 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 is played until 35 minutes and 30 seconds.
[0066] In the abnormal area, the user cannot watch the video in the video application, resulting in a bad user experience. Therefore, an embodiment of this application provides a data caching method. The method is applied to an electronic device, or to a chip or a processing system in the electronic device, such as a Huawei mobile services (HMS) or Android system. The electronic device may predict a service abnormality in a user's moving process. When predicting that the user is about to enter the abnormal area, the electronic device performs a pre-caching operation on a target application. The target application is an application that sends a registration message to a control component of the system during installation or execution, and the registration message is used to obtain first indication information sent by the control component and used to indicate that an abnormal area exists in the traveling direction. The control component may be a component in a processing system, such as a Huawei mobile services hi device to device (HMS HiD2D) in an HMS system or a processing module in an Android system. Alternatively, the control component may be a chip or a module in a chip, such as a module in a modem chip.
[0067] The pre-caching operations may include at least one of the following: increasing the download rate, reducing the amount of data used in the downloaded data in a unit of time, and increasing the number of requests in a unit of time. Increasing the download rate may include increasing the number of requests in a unit of time and increasing the amount of data in a single request.
[0068] For example, reducing the amount of data used in the data downloaded within a unit time may be reducing the amount of data played in the video data downloaded within a unit time, such as reducing the resolution, frame rate, and bit rate of the downloaded video data. For example, reducing the amount of data used in the data downloaded within a unit time may also be reducing the amount of data played in the audio data downloaded within a unit time, such as reducing the sampling rate, sampling bit rate, and channel number of the downloaded audio data.
[0069] Therefore, according to the data caching method provided in the embodiment of this application, even if the period of continuously passing through an abnormal area such as a tunnel is long, the user can use the target application on the electronic device 100 as normally as possible when passing through the abnormal area, which improves the user experience.
[0070] Based on the application scenario provided above, in which a user passes through an abnormal area on the route to the company, the following describes the process of performing the data caching method in the embodiment of this application. For details of the route to the company, please refer to the route shown in Figures 1A to 1C. Before leaving home, the user opens a video application on the electronic device 100. In this case, the video application sends a registration message to the control component in the electronic device 100 to obtain the first instruction information. In the process of the user moving from home to the company, the user watches a video on the video application, and the control component continuously executes the prediction process and obtains the first instruction information. For the description of the prediction process, please refer to the embodiment shown in Figures 8A and 8B to 13. Details will not be described for the time being.
[0071] When the user passes through the first normal area, the electronic device 100 accesses the 5G network with five signal bars (i.e., full bars), the signal quality is good, and the video application on the electronic device 100 operates based on the first cache policy. The process of the user moving from home to the normal point C (i.e., when the user is in the first normal area) is consistent with the process shown in FIG. 1A. For details, please refer to the description in FIG. 1A.
[0072] As shown in FIG. 1D, when the user reaches the normal point C, the control component sends a first instruction information to the video application. The first instruction information may include a type. Optionally, the first instruction information may further include a first time t1. Optionally, the first instruction information may further include a second time t2. Optionally, the first instruction information may further include a third time t3. When the type is a first value, it indicates that an abnormal area exists. When the type is a second value, it indicates that the previously transmitted broadcast message is invalid. t1 may be a time point when the abnormal area is entered, or a period from the current position to entering the abnormal area (i.e., a period of 30 seconds from the normal point C to the abnormal point). t2 may be a time point when the abnormal area is exited, or a period from the current position to exiting the abnormal area. t3 may be a period from entering the abnormal area to exiting the abnormal area (i.e., a period from the abnormal point to the recovery point), i.e., a period of the abnormal area. The video application receives the first instruction information sent by the control component, and performs a pre-cache operation according to the first instruction information. Optionally, the video application performs the pre-cache operation within a preset execution period (e.g., 5 ms, 10 ms, 1 sec, or 3 sec) during which the first instruction information is received. The playback period of the cached video data may be extended, or the usage period of other cached data may be extended through the pre-cache operation.
[0073] When performing the pre-cache operation, the video application caches data of the video application based on a second cache policy, the second cache policy including 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 by using a second request number, the second request number being a request number within a unit time, the second download rate being greater than the first download rate, the second bit rate being less than the first bit rate, the second resolution being less than the first resolution, the second frame rate being less than the first frame rate, and the second request number being greater than the first request number.
[0074] Assume that the pre-caching operation increases the download rate to a preset multiple (e.g., 1.8 times, 3 times) of the original rate. For example, the preset multiple is 3 times, and video data with a duration of 30 seconds is downloaded every second, and after the content that reaches the first usage period is downloaded and cached, the caching is not stopped. Instead, the caching continues. Assume that during the period when the user moves from the normal point C to the abnormal point for 30 seconds, the video application caches the video data based on the second caching policy. The second download rate is 3 times the first download rate, the first resolution is the same as the second resolution, or the second resolution is smaller than the first resolution, the first frame rate is the same as the second frame rate, or the second frame rate is smaller than the first frame rate, the first bit rate is the same as the second bit rate, or the second bit rate is smaller than the first bit rate. Optionally, in this period, the number of data requests within a unit time may be greater, i.e., 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 may specifically mean that the second number of requests is greater than the first number of requests. The electronic device may adjust one or more parameters of the download rate, the bit rate, the frame rate, the resolution, and the number of data requests within a unit time, and the electronic device may adjust any combination of the five parameters.
[0075] As shown in FIG. 1D, assuming that the video application performs a pre-cache operation within a period when the user moves from the normal point C to the abnormal point (i.e., within t1), the video application downloads video data with a duration of 15 minutes within t1. Thus, when the user reaches the abnormal point, a black dot 113 in the user interface 110 is used to indicate that the video has been played up to 30 minutes, and a gray dot 114 is used to indicate that the video has been cached up to 45 minutes. In this case, the duration of the cached content (15 minutes) is greater than the first preset duration (300 seconds). From this point on, i.e. when the user passes through the abnormal area, the video application downloads video data at a third download rate, where the third download rate is smaller than the first download rate; or downloads video data at a third bit rate, where the third bit rate is equal to or smaller than the second bit rate; or downloads video data at a third resolution, where the third resolution is equal to or smaller than the second resolution; or downloads video data at a third frame rate, where the third frame rate is equal to or smaller than the second frame rate; or downloads video data by using a third request number, where the third request number is the request number in a unit time, where the third request number is equal to or smaller than the first request number. The signal quality identifier 111 in the user interface 110 is used to represent that the electronic device 100 cannot access the network and is disconnected from the network. Therefore, the third download rate is 0.
[0076] In a specific implementation, a drop to a lower network standard may occur when the user passes through an abnormal area. In this case, when the user reaches an abnormal point, the user interface displayed by the electronic device 100 is, for example, the user interface 110 shown in FIG. 1E, and the signal quality identifier 111 in the user interface 110 is used to represent that the electronic device accesses a 2G network with five signal bars (i.e., a full bar). Also, poor signal quality may occur when the user passes through an abnormal area. In this case, when the user reaches an abnormal point, the user interface displayed by the electronic device 100 is, for example, the user interface 110 shown in FIG. 1F, and the signal quality identifier 111 in the user interface 110 is used to represent that the electronic device accesses a 5G network with one signal bar. Also, poor application quality of experience may occur when the user passes through an abnormal area. In this case, when the user reaches an abnormal point, the user interface displayed by the electronic device 100 is, for example, the user interface 110 shown in FIG. 1G. The signal quality identifier 111 in the user interface 110 represents that the electronic device accesses the 5G network with five signal bars (i.e., full bars), but the QoE of the application is poor. As a result, the download rate is low. In the above three cases, the third rate is smaller than the first rate, and the third rate being smaller than the first rate means, for example, that the number of requests in a unit time is smaller than the first number of requests, and the amount of data downloaded in a unit time is smaller than the first amount of data.
[0077] As shown in FIG. 1H, when the user continues to move from the anomaly point to the midpoint for 5 minutes, the user may continue to watch the video. In this case, the black dot 113 in the user interface 110 moves and the time identifier 112 also changes. However, the gray dot 114 in the user interface 110 does not move because the second rate in the anomaly area is 0, i.e., no video data can be downloaded. The third resolution is equal to or lower than the second resolution, or the third frame rate is equal to or lower than the second frame rate, or the third bit rate is equal to or lower than the second bit rate, or the third request count is equal to or lower than the second request count. When the user reaches the midpoint, the black dot 113 in the user interface 110 is used to indicate that the video has been played up to 35 minutes, and the gray dot 114 is used to indicate that the video is still cached up to 45 minutes. Therefore, when the user continues to move from the midpoint for 10 minutes, the black dot 113 and the time identifier 112 can continue to move and the user can continue to watch the video.
[0078] As shown in FIG. 1H, assuming that the time period for the user to reach the recovery point from the midpoint 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 video has been played up to 44 minutes, and the gray dot 114 is used to indicate that the video is still cached up to 45 minutes. In the process of the user moving from the recovery point to the company (i.e., when the user passes through the second normal area), the signal quality identifier 111 in the user interface 110 is used to represent that the electronic device accesses the 5G network with 5 signal bars (i.e., full bars). The signal quality is good, and the video application may download the video data based on the first cache policy. In other words, the rate for downloading the 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 in a unit time is restored to the first number of requests. Optionally, the rate for downloading the video data is restored to the first rate, specifically, the number of requests in a unit time may be restored to the first number of requests. The user may also continue to watch the video in 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 up to 45 minutes.
[0079] In some embodiments, when the user stops moving before reaching the anomalous area or deviates from the current path, the control component may send a first instruction information having a type of a second value to the video application to inform the video application that the previously sent first instruction information is invalid. For example, when the user reaches the normal point C, the video application receives the first instruction information having a type of a first value and performs a pre-cache operation, i.e., caches the video data based on the second cache policy. However, when the user stops moving from the normal point C to the anomalous point or does not move from the offset path to the anomalous point, the control component may send a first instruction information having a type of a second value to the video application. The video application receives the first instruction information having a type of a second value and stops performing a pre-cache operation, i.e., caches the video data based on the first cache policy.
[0080] Assume that the pre-caching operation is for reducing the bit rate of the downloaded video data (e.g., reducing the bit rate to 1 / 2 or 1 / 3 of the original bit rate). For example, the second bit rate is 1 / 3 of the first bit rate. In this case, the amount of data played back in the video data per unit time may increase to 3 times the original bit rate. In this case, the process in which the user moves from the normal point C to the company is shown in FIG. 1I to FIG. 1K.
[0081] As shown in FIG. 1I, assume that the video application performs a pre-cache operation within the period when the user moves from the normal point C to the abnormal point (i.e., within t1), the video data with a duration of 15 minutes is 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 video is played up to 30 minutes, and the gray dot 114 is used to indicate that the video is cached up to 45 minutes. In this case, the duration of the cached content (15 minutes) is greater than the first usage period (300 seconds). Starting from this point, i.e., when the user passes through the abnormal area, the operation method of the video application refers to the description in FIG. 1D. The details will not be described again.
[0082] As shown in FIG. 1I, when the user reaches the abnormal point and actually passes through the abnormal area, the third bit rate is smaller than the first bit rate, or the third resolution is smaller than the first resolution, or the third bit rate is smaller than the first bit rate, or the third frame rate is smaller than the first frame rate, or the third resolution is equal to or smaller than the second resolution, or the third code rate is equal to or smaller than the second code rate, or the third frame rate is equal to or smaller than the second frame rate. Thus, the clarity of the user interface 110 is poor, and the clarity is equal to or smaller than the clarity in the first normal area, or the clarity is equal to or smaller than the clarity during the period from the normal point C to the abnormal point. Optionally, the third request number is smaller than the first request number or the second request number.
[0083] As shown in FIG. 1J, when the user continues to move from the abnormal point to the midpoint for 5 minutes, the user may continue to watch the video. In this case, the black dot 113 in the user interface 110 moves and the time identifier 112 also changes. However, the gray dot 114 in the user interface 110 does not move because the second rate in the abnormal area is 0, i.e., no video data can be downloaded. When the user reaches the midpoint, the black dot 113 in the user interface 110 is used to indicate that the video has been played up to 35 minutes, and the gray dot 114 is used to indicate that the video is still cached up to 45 minutes. Therefore, when the user continues to move from the midpoint for 10 minutes, the black dot 113 and the time identifier 112 can continue to move and the user can continue to watch the video. The resolution, frame rate or bit rate of the video data played by the video application when the user passes through the abnormal area is the second resolution, the second frame rate or the second bit rate. The second bit rate is smaller than the first bit rate, or the second resolution is smaller than the first resolution, or the second frame rate is smaller than the first frame rate, so the clarity of the user interface 110 is poor.
[0084] As shown in FIG. 1J, assuming that the time period for the user to reach the recovery point from the midpoint 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 video has been played up to 44 minutes, and the gray dot 114 is used to indicate that the video is still cached up to 45 minutes. In this case, the resolution, frame rate or bit rate of the video data played by the video application is still the second resolution, the second frame rate or the second bit rate. Therefore, the clarity of the user interface 110 is poor. In the process of the user moving from the recovery point to the company (i.e., when the user passes through the second normal area), the signal quality identifier 111 in the user interface 110 is used to represent that the electronic device accesses the 5G network with five signal bars (i.e., full bars). The signal quality is good, the video application may continue to operate normally based on the first cache policy, and the user may also continue to watch the video in the video application.
[0085] As shown in FIG. 1K, when the user continues to move from the recovery point for one minute and reaches the normal point D, the black dot 113 in the user interface 110 is used to indicate that the video has been played up to 45 minutes, and the signal quality identifier 111 in the user interface 110 is used to indicate that the electronic device accesses the 5G network with five signal bars (i.e., full bars) and the signal quality is good. In this case, although the signal quality is good, when the user moves from the normal point C to the abnormal point, the video application downloads data for 10 minutes, but when the user moves from the abnormal point to the recovery point, the user only plays the video for 9 minutes. Therefore, when the user continues to move from the recovery point to the normal point D for one minute, the resolution, bit rate or frame rate of the video played by the video application is still the second resolution, second bit rate or second frame rate, and the clarity of the user interface 110 is still poor. In the subsequent process of the user moving from the normal point D to the company, when the video application is in the second normal area, the video data played by the video application may be downloaded. The resolution, frame rate or bit rate of the video data is a first resolution, a first frame rate or a first bit rate. Therefore, the clarity of the user interface 110 is normal. For example, when the normal point E is reached, a black dot 113 in the user interface 110 is used to indicate that the video has been played up to 45 minutes and 30 seconds.
[0086] This is not limited to the example in Fig. 1K. In a specific implementation manner, the video application may re-download the video data after 44 minutes based on the first cache policy from the time when the user continues to move from the recovery point, and the bit rate of the video data is the first bit rate, the frame rate of the video data is the first frame rate, or the resolution of the video data is the first resolution. After a certain period (for example, 5 seconds, 10 seconds, or 30 seconds), the bit rate of the video data played by the video application is the first bit rate, or the frame rate of the video data is the first frame rate, or the resolution of the video data is the first resolution. Therefore, the clarity of the displayed user interface is normal.
[0087] It can be seen that in FIG. 1B-FIG. 1C, when the user is at the anomaly point or the midpoint (i.e., when the user passes through the anomaly area), the gray dot 114 in the user interface 110 is used to indicate that the video is cached up to 35 minutes. Furthermore, when the user is at the midpoint in FIG. 1C, the black dot 113 coincides with the gray dot 114. In FIG. 1D, FIG. 1H, and FIG. 1I-FIG. 1J, when the user is at the anomaly point or the midpoint (i.e., when the user passes through the anomaly area), the gray dot 114 in the user interface 110 is used to indicate that the video is cached up to 45 minutes. Thus, in FIG. 1B-FIG. 1C, the user cannot continue to watch the video during the 9-minute period from the midpoint to the recovery point. However, in FIG. 1D, FIG. 1H, and FIG. 1I-FIG. 1J, the user may continue to watch the video during the 9-minute period from the midpoint to the recovery point.
[0088] In some embodiments, the user may tap NEXT EPISODE before entering the anomalous area, which causes the video application to play the video data of the 18th episode. Assuming that the user taps NEXT EPISODE at normal point C, the process of the user moving from normal point C to the anomalous point is shown in FIG. 1L or FIG. 1M.
[0089] As shown in FIG. 1L, when the user opens the video application on the electronic device 100 before leaving home, the video application does not send a registration message to the control component. When the user reaches the normal point C, the user taps on the next episode. In this case, the user interface 110 does not play the video data, and the prompt 115 included in the user interface 110, “To be played…”, is used to prompt the user that the video of the 18th episode is to be played. The time identifier 112 in the user interface 110 is not normally acquired, and is therefore “00:00 / 00:00”. The black dot 113 coincides with the gray dot 114, which indicates that the time to play and cache the video is 0. During the period when the user moves from the normal point C to the abnormal point (i.e., within 30 seconds), the video application continues to download 10 seconds of video data every second. When the user reaches the abnormal point, the video application has downloaded 300 seconds (i.e., 5 minutes) of video data. Thus, in the user interface 110, a black dot 113 is used to indicate that the video has been played up to 30 seconds, and a grey dot 114 is used to indicate that the video has been cached up to 5 minutes.
[0090] As shown in FIG. 1M, when the user opens the video application on the electronic device 100 before leaving home, the video application sends a registration message to the control component. When the user reaches the normal point C, the user operation and the user interface 110 are consistent with those in FIG. 1L, and the details will not be described again. However, while 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 to increase the download rate by three times the original download rate, as shown in FIG. 1D and FIG. 1H, or to decrease the bit rate of the downloaded video data to 1 / 3 of the original bit rate, as shown in FIG. 1I and FIG. 1J. When the user reaches the abnormal point, the video application downloads 10 minutes of video data. Thus, in the user interface 110, a black dot 113 is used to indicate that the video has been played up to 30 seconds, and a gray dot 114 is used to indicate that the video has been cached up to 15 minutes. Within the same download period, the period of the downloaded video data in FIG. 1M is greater than the period of the downloaded video data in FIG. 1L.
[0091] 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 whose playback duration is equal to or greater than the duration of the abnormal area before reaching the abnormal area, so as to ensure that the user can watch the video normally when passing through the abnormal area. The duration of the abnormal area may be obtained based on the difference between the first time t1 and the second time t2, or may be obtained directly based on the third time t3.
[0092] In some embodiments, when the video application plays a video, each time the video application requests data from the video application's server, the video application may increment the data request count by one and record the data request count. When the next episode of video is played, the current recorded data request count may be cleared and the above recording process is resumed for the currently played video. The same is true for other content (e.g., audio, web pages, or games), e.g., when the next song is played, the audio application clears the current recorded data request count and re-records the data request count for the currently played song.
[0093] This is not limited to the examples in Figures 1A to 1M. 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 state may be consistent with the cache state represented by the gray dot 114.
[0094] It can be understood that for content cached by other applications (e.g., audio data, text data, image data, video data of audio applications, and audio data of web applications and game applications), the first cache policy and the second cache policy are similar during download. For example, the first cache policy for audio applications includes at least one of the following: downloading data of the target application at a first download rate, downloading data of the target application at a first sampling frequency, downloading data of the target application by using a first sampling bit number, downloading data of the target application by using a first sound channel number, and requesting data of the target application by using a first request number. The second cache policy for audio applications 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 sampling frequency, downloading data of the target application by using a second sampling bit number, downloading data of the target application by using a second sound channel number, and requesting data of the target application by using a second request number.
[0095] 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), and a first caching policy for 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. A second caching policy for 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, and caching the first type of data and skip caching the second type of data.
[0096] In this embodiment of the application, the enabling and disabling of the prediction function may be preset by the system, for example, the function may be enabled by default, or may be customized by the user. For example, the user may enable the "enable prediction function" option in the setting interface displayed by the electronic device 100. In this case, an application on the electronic device 100 sends a registration message to the control component during installation or execution, and the control component continues to execute the prediction process and obtains the first instruction information in the course of the user's movement. The control component may then send the first instruction information to the above application that sent the registration message, thereby causing the application to perform a pre-caching operation. For example, the setting interface displayed by the electronic device 100 may include "enable prediction function" options for different applications, and the user may enable or disable the "enable prediction function" option for any of the applications in the setting interface. It can be understood that when the "enable prediction function" option for at least one application is enabled in the setting interface, the control component continues to execute the prediction process and obtains the first instruction information in the course of the user's movement. However, when the "enable prediction function" option of each application in the setting interface is disabled, the control component may stop performing the prediction process. The user may enable the "enable prediction function" option of the video application in the setting interface. In this case, the video application may send a registration message to the control component during installation or execution, so that the control component sends first instruction information to the video application, and the video application can perform a pre-caching operation based on the first instruction information, allowing the user to normally use the video application when passing through the abnormal area.
[0097] The electronic device 100 in the embodiment of this application may be a device such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a notebook computer, an Ultra-mobile Personal Computer (UMPC), a handheld computer, a netbook, a Personal Digital Assistant (PDA), a wearable electronic device, or a smart screen.
[0098] Next, an exemplary electronic device provided in the following embodiments of this application will be described.
[0099] FIG. 2 is a schematic diagram of the structure of the electronic device 100.
[0100] 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, a headset jack 170D, a sensor module 180, buttons 190, a motor 191, indicators 192, a camera 193, a display 194, a subscriber identification module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, an optical proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
[0101] It may be understood that the structure shown in this embodiment of the application does not constitute a particular limitation of the electronic device 100. In some other embodiments of the application, the electronic device 100 may include more or fewer components than those shown in the drawings, or some components may be combined, or some components may be divided, or a different arrangement of components may be used. The components shown in the drawings may be implemented in hardware, software, or a combination of software and hardware.
[0102] Processor 110 may include one or more processing units. For example, processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), etc. The different processing units may be separate components or may be integrated into one or more processors.
[0103] The wireless communication function of the electronic device 100 may be realized by using an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a modem processor, a baseband processor, and the like.
[0104] Antenna 1 and Antenna 2 are configured to transmit and receive electromagnetic signals. Each antenna in electronic device 100 may be configured to cover one or more communication frequency bands. Different antennas may be multiplexed to improve antenna utilization. For example, Antenna 1 may be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas may be used in combination with tuning switches.
[0105] The mobile communication module 150 may be applied to the electronic device 100 and provide wireless communication solutions including 2G / 3G / 4G / 5G. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves through the antenna 1, perform processing such as filtering or amplification on the received electromagnetic waves, and send the electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 may further amplify the modulated signal by the modem processor and convert the signal to electromagnetic waves for emission through the antenna 1. In some embodiments, at least some functional modules in the mobile communication module 150 may be located in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 may be located in the same device as at least some modules of the processor 110.
[0106] The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the low-frequency baseband signal obtained through demodulation to the baseband processor for processing. The low-frequency baseband signal is processed by the baseband processor and then forwarded to the AP. The AP outputs a sound signal through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays an image or video on the display 194. In some embodiments, the modem processor may be an independent component. In some other embodiments, the modem processor may be independent of the processor 110 and is located in the same device as the mobile communication module 150 or other functional modules.
[0107] The wireless communication module 160 may be applied to the electronic device 100 and provide wireless communication solutions including wireless local area network (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) technology, infrared (IR) technology, etc. The wireless communication module 160 may be one or more components integrating at least one communication processor module. The wireless communication module 160 receives electromagnetic waves through the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 may further receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves for emission through the antenna 2.
[0108] In some embodiments, in the electronic device 100, the antenna 1 and the mobile communication module 150 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, thereby enabling the electronic device 100 to communicate with networks and other devices by using wireless communication technologies that 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, IR technologies, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a BeiDou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation system (SBAS).
[0109] In some embodiments, the GNSS may alternatively be realized by using an independent component. For example, the electronic device 100 further includes a positioning module. The positioning module may use the GNSS (e.g., GPS) to obtain location information of the electronic device 100, i.e., longitude and latitude information, optionally direction (angle) information (e.g., northeast direction), and optionally speed information.
[0110] In some embodiments, the modem processor may obtain cell information of the electronic device 100, such as the identity (cell ID) of the serving cell, the cell IDs of neighboring cells, and signal quality parameters of the serving cell and / or signal quality parameters of neighboring cells, by using the mobile communication module 150 and the wireless communication module 160. The signal quality parameters are, for example, but not limited to, packet loss rate, signal-to-noise ratio, RSRP, or RSRQ.
[0111] In some embodiments, the AP may receive the cell information transmitted by the modem processor and obtain location information of the electronic device based on the cell information, i.e., longitude and latitude information, optionally direction (angle) information (e.g., 20 degrees east of north), and optionally speed information.
[0112] In some embodiments, the AP may receive a service abnormality notification event, e.g., a notification reported by the modem processor and indicating a network disconnection, a drop to a lower network standard, or an RSRP or RSRQ lower than a pre-set threshold. The AP may also collect statistics on the network quality parameters (e.g., bandwidth or delay) of at least one application to obtain a comprehensive value QoE, which is used to represent the quality and performance of a service, such as a network or service, experienced by a user. When the AP receives the service abnormality notification message and determines that the QoE is lower than a first QoE level, the AP may determine that the network service is abnormal and that the service of the application is abnormal. The AP may further receive the location information sent by the positioning module or the modem processor and the cell information sent by the modem processor. Then, the AP may perform a learning process, i.e., identify and collect statistics on abnormal areas based on the above information, and obtain a data file of abnormal areas (hereinafter may be referred to as an abnormal area database). The abnormal area database includes at least one record, and each record is used to identify an abnormal area and information including the abnormal area. For an example of a record in the abnormal area database (i.e., information about the abnormal area in the record), refer to Table 2 in FIG. 7. Details will not be described temporarily. For a specific implementation of the learning process, refer to the description of FIG. 6 and FIG. 7. Details will not be described temporarily.
[0113] In some other embodiments, the AP may use the mobile communication module 150 and the wireless communication module 160 to send the above information to the cloud server, and the cloud server executes the above learning process. It can be understood that the cloud server may receive the relevant information of the user's passing path sent by at least one electronic device. Therefore, the abnormal area recorded in the abnormal area database and obtained by the cloud server through learning may be the abnormal area that the electronic device 100 does not pass through.
[0114] In an embodiment of this application, the processor 110 may perform service anomaly prediction (for short, prediction process) based on the anomaly area database acquired in the learning process, the cell information acquired in real time, and the location information acquired in real time optionally, to obtain first indication information. The processor 110 may perform a pre-cache operation based on the first indication information in the process of sending a request message to the server of the target application. For the description of the first indication information, please refer to the description of the first indication information in FIG. 1A to FIG. 1M. Details will not be described again.
[0115] The pre-caching operation may include at least one of the following: increasing the download rate, reducing the amount of data used in the downloaded data in a unit time, and increasing the number of data requests in a unit time. Increasing the download rate may include increasing the number of data requests in a unit time and / or increasing the amount of data requested in a single request message. For example, reducing the amount of data used in the downloaded data in a unit time may be reducing the amount of data played in the downloaded video data in a unit time, e.g., reducing the resolution, frame rate, and bit rate of the downloaded video data. For example, reducing the amount of data used in the downloaded data in a unit time may also be reducing the amount of data played in the downloaded audio data in a unit time, e.g., reducing the sampling rate, sampling bit number, and channel number of the downloaded audio data.
[0116] The electronic device 100 may realize display functions through a GPU, a display 194, an application processor, etc. The GPU is a microprocessor for image processing and is connected to the display 194 and the application processor. The GPU is configured to perform mathematical and geometric calculations and perform graphic rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or modify instruction information.
[0117] The display 194 is configured to display images, videos, etc. The display 194 includes a display panel. The display panel may 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 mini-LED, a micro-LED, a micro-OLED, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0118] The electronic device 100 may implement audio functions, such as playing or recording music, through the use of an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, an application processor, and the like.
[0119] Audio module 170 is configured to convert digital audio information to analog audio signals for output, and also to convert analog audio input to digital audio signals. Audio module 170 may be configured for coding and decoding audio signals. In some embodiments, audio module 170 may be located in processor 110, or some functional modules within audio module 170 may be located in processor 110.
[0120] The speaker 170A, also referred to as a "loudspeaker," is configured to convert audio electrical signals into sound signals. The electronic device 100 may be used for listening to music in a hands-free mode or for answering calls with the speaker 170A.
[0121] Receiver 170B, also referred to as an "earpiece," is configured to convert electrical audio signals into sound signals. Receiver 170B may be placed near a human ear to hear audio when answering a call or when voice information is received through electronic device 100.
[0122] Furthermore, for the description of the components in the electronic device 100, please refer to the relevant descriptions in paragraphs
[0054] to
[0104] of the specification entitled "POWER-OFF MANAGEMENT AND CONTROL METHOD FOR ELECTRONIC DEVICE AND APPARATUS" numbered CN110519451A. Details will not be described again here.
[0123] 3 is a schematic diagram of the structure of another electronic device 100 according to an embodiment of this 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 and a prediction unit 312, and may further include a learning unit 313 optionally. The reporting unit 320 may include a first reporting unit 321, a second reporting unit 322 and a third reporting unit 323. The service anomaly prediction unit 310, the reporting unit 320 and the application unit 330 may all belong to the processor 110 shown in FIG. 2. For example, the service anomaly prediction unit 310 and the application unit 330 belong to an 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 units included in the electronic device 100 are described below.
[0124] The monitoring unit 311 is configured to monitor information. The monitored information may include location information sent by the first reporting unit 321, cell information sent by the second reporting unit 322, and service abnormality notification event sent by the third reporting unit 323. For example, the location information includes longitude and latitude information, direction information and speed information. The cell information includes a cell ID of a serving cell, a cell ID of a neighboring cell, and signal quality parameters (such as packet loss rate, signal-to-noise ratio, RSRP and RSRQ) of the serving cell and / or signal quality parameters of the neighboring cells. The service abnormality notification event includes a notification message in which the RSRP or RSRQ is smaller than a preset threshold and a notification message in which the QoE is smaller than a first QoE level.
[0125] In some embodiments, the information monitored by the monitoring unit 311 may be sent to the learning unit 313 to perform a learning process. Specifically, the learning unit 313 may identify and collect statistics on abnormal areas based on the information, and obtain an abnormal area database. The abnormal area database includes at least one record, and each record is used to identify an abnormal area and information including the abnormal area. For an example of a record in the abnormal area database (i.e., information about the abnormal area in the record), refer to Table 2 in FIG. 7. Details will not be described temporarily. In some other embodiments, the information monitored by the monitoring unit 311 may also be sent to a cloud server to perform a learning process. For a detailed description of the learning process, refer to the embodiment shown in FIG. 6 and FIG. 7. Details will not be described temporarily.
[0126] The prediction unit 312 is configured to obtain first indication information based on the real-time information monitored by the monitoring unit 311 and the abnormal area database (which may also be called a historical record) sent by the cloud server or the learning unit 313. Further, the prediction unit 312 may trigger a service abnormality broadcast to send the first indication information to the application unit 330.
[0127] Specifically, for an area where positioning can be realized, such as on the ground, the abnormal area database may include valid location information, and the monitoring unit 311 may also monitor the 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 sent by the monitoring unit 311, and the real-time location information, and obtain the first instruction information. For a description of the process, please refer to the embodiments shown in FIG. 8A and FIG. 8B to FIG. 11. Details will not be described for the time being. However, for an area where positioning cannot be realized, such as a subway or a tunnel, the abnormal area database does not include valid location information, and the monitoring unit 311 cannot monitor the real-time valid location information. Therefore, the prediction unit 312 may 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 instruction information. For a description of the process, please refer to the embodiment shown in FIG. 12. Details will not be described for the time being. For a description of the first instruction information, please refer to the description of the first instruction information in FIG. 1A to FIG. 1M. Details will not be described again.
[0128] Specifically, the application unit 330 may include at least one target application. For a description of the target application, please refer to the description in Figs. 1A to 1M and 4 and 5. Details will not be described temporarily. After receiving the first indication information, the target application in the application unit 330 performs a pre-cache operation. For a description of the pre-cache operation, please refer to the description of the pre-cache operation in Figs. 1A to 1M. Details will not be described again.
[0129] In some embodiments, after performing the prediction process and obtaining the first indication information, the prediction unit 312 may trigger a service anomaly broadcast to send the first indication information to the application unit 330.
[0130] In some other embodiments, to send the first indication information to the application unit 330, the prediction unit 312 may also trigger the service anomaly broadcast only when the period of entering the anomaly area obtained through prediction is within a first preset time range. The first preset time range may be a short period range, for example, [25 seconds, 35 seconds] or [50 seconds, 70 seconds]. Alternatively, the first preset time range may be determined based on scene information. For example, the first preset time range on the route to the company is [25 seconds, 35 seconds], and the first preset time range on the route home is [50 seconds, 70 seconds]. This realization method can avoid the case where the electronic device is affected and the user experience is affected because the power consumption and traffic consumption of the electronic device are high due to the increase in download rate, and the clarity of the video image displayed thereafter is low due to the reduction in the resolution, frame rate or bit rate of the downloaded video data, since the target application performs the pre-caching operation early. Optionally, if the prediction unit 312 obtains the first instruction information based on the real-time location information of the electronic device 100, when the first instruction information is sent to the application unit 330, the distance between the abnormal area and the current location of the electronic device performing the prediction is short, for example, the period from the current location to the abnormal area is 30 seconds, in this case, there is a low probability that the user will change the route, that is, there is a high probability that the user will enter the abnormal area, which improves the prediction accuracy.
[0131] It may be understood that the software system of the electronic device 100 may use a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In this embodiment of the application, the layered architecture is used as an example to describe the software system of the electronic device 100.
[0132] 4 is a schematic diagram of the structure of the software system of the electronic device 100 according to this embodiment of the present application. The software system may be an Android system, or an HMS system, or a software system such as a Microsoft Windows operating system, an operating system kernel (Linux), or a mobile device operating system (Iphone operating system, IOS).
[0133] In a layered architecture, a software system is divided into several layers, each of which has a clear role and task. The layers communicate with each other through software interfaces. In some embodiments, the software system is divided into four layers from top to bottom: application layer, application framework layer, kernel layer, and hardware layer.
[0134] The application layer may include a series of application packages. As shown in FIG. 4, the application package may include applications such as camera, calendar, navigation, message, gallery, phone, Bluetooth, video, music, game and learning. An example in which a video application is a target application is described in FIG. 4. In other words, when installed or running, the video application sends a registration message to a registration module in the application framework layer. The registration message is used to obtain first indication information from a service anomaly prediction module in the application framework layer. For the description of the first indication information, please refer to the description of the first indication information in FIG. 1A to FIG. 1M. Details will not be described again.
[0135] The application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer. The application framework layer includes some predetermined functions. As shown in FIG. 4, the application framework layer may include a service anomaly notification module, a control component, a content provider, a view system, etc. The control component may include a registration module, a service anomaly prediction module, and a transceiver module. For example, if the software system shown in FIG. 4 is an HMS system, the control component may be an HMS HiD2D in the HMS.
[0136] The service anomaly notification module may be configured to receive notification messages of application service anomalies and network service anomalies (which may also be referred to as service anomaly prediction notification events). For example, the service anomaly notification module may receive a notification message sent by an application in the application layer and indicating that the service of the application is abnormal, for example, the QoE is lower than a first QoE level. The QoE may be a value obtained through synthesis based on parameters such as the bandwidth and delay of the application. The service anomaly notification module may also receive a notification message reported by a processor driver (for example, a modem driver) in the kernel layer and indicating a network service anomaly, for example, a network disconnection, a drop to a lower network standard, a signal-to-noise ratio, RSRP or RSRQ being lower than a preset threshold, or a packet loss rate being higher than a preset threshold.
[0137] The registration module may be configured to receive a registration message sent by the video application in the application layer to determine the video application as the target application. Alternatively, the registration module may 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 service anomaly prediction module and the transceiver module subsequently send the first indication information to the target application.
[0138] The service anomaly prediction module may be configured to execute a prediction process based on the anomaly area database and cell information reported by a processor driver (e.g., a modem driver) in the kernel layer in real time. For a description of the prediction process, please refer to the embodiments shown in Fig. 8A and Fig. 8B to Fig. 11. Details will not be described temporarily. Optionally, the service anomaly prediction module may further execute a prediction process by referring to location information reported by a processor driver (e.g., a modem driver) or a positioning driver in the kernel layer in real time. For a description of the prediction process, please refer to the embodiments shown in Fig. 12. Details will not be described temporarily.
[0139] The transceiver module may be configured to send the first indication information obtained by the service anomaly prediction module to a video application in the application layer. After receiving the first indication information, the video application may perform a pre-cache operation before the electronic device 100 reaches the abnormal area. For a description of the pre-cache operation, please refer to the description of the pre-cache operation in Figures 1A to 1M. Details will not be described again.
[0140] In some embodiments, the abnormal area database may be obtained by the service abnormality prediction module by performing a learning process. Specifically, the service abnormality prediction module may monitor at least one of the following messages: location information reported by a processor driver (e.g., modem driver) or a positioning driver in the kernel layer, cell information such as a cell ID of a serving cell, cell ID of a neighboring cell, and signal quality parameters of a current cell (RSRP, RSRQ, packet loss rate, signal-to-noise ratio, etc.) and / or signal quality parameters of a neighboring cell reported by a processor driver (e.g., modem driver) in the kernel layer, and a notification message of a service abnormality reported by a service abnormality notification module. Then, the service abnormality prediction module may identify and collect statistics about abnormal areas based on the above messages, and obtain the abnormal area database. This is not limited. In a specific implementation manner, the cloud server may alternatively obtain messages monitored by at least one electronic device 100, and perform a learning process to obtain the abnormal area database. For a detailed description of the learning process, please refer to the embodiments shown in Figures 6 and 7. Details will not be described for the time being.
[0141] It can be understood that when performing the learning process or prediction process, the service anomaly prediction module may obtain scene information of the user's passing route from an application (e.g., HUAWEI Assistant) in the application layer. This is not limited. Alternatively, the scene information may be obtained by other modules in the application framework layer, or the scene information may be obtained through automatic identification. This is not limited in this embodiment of the application. The scene information may include, but is not limited to, a route type (such as a route to work, a route back to home, or a leisure route), a route start point (such as home or work), a route end point, etc.
[0142] It can be understood that the service anomaly prediction module in the application framework layer may be the service anomaly prediction unit 310 in Figure 3, and the service anomaly notification module in the application framework layer and the processor driver and the positioning driver in the kernel layer may be the reporting unit 320 in Figure 3. The video application in the application layer may be the application unit 330 in Figure 3. The service anomaly notification module may be the third reporting unit 323 in Figure 3, the processor driver may be the second reporting unit 322 in Figure 3, or may be the first reporting unit 321, and the positioning driver may be the first reporting unit 321 in Figure 3.
[0143] A window manager is configured to manage window programs. A window manager may get the size of the display, determine if a status bar is present, perform screen locking, take screenshots, etc.
[0144] Content providers are configured to store and retrieve data and enable the data to be accessed by applications. Data may include video, images, audio, calls made and received, browsing history, bookmarks, phone books, etc.
[0145] The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system may be used to build applications. A display interface may include one or more views. For example, a display interface that includes an SMS message notification icon may include a text display view and an image display view.
[0146] The kernel layer is a layer between the hardware and the 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, and a sensor module. The processor driver may be configured to drive the processor in the hardware layer, the positioning driver may be configured to drive the positioning module in the hardware layer, the display driver may be configured to drive the display in the hardware layer, and the sensor driver may be configured to drive multiple sensors in the hardware layer. In some embodiments, the positioning module may alternatively be integrated into the processor, and the positioning driver may alternatively be integrated into the processor driver.
[0147] In some embodiments, the processor at the hardware layer may include an application processor and a modem processor, and the processor driver at the kernel layer may also include an application processor driver and a modem driver, where the application processor driver at the kernel layer is configured to drive the application processor at the hardware layer, and the modem driver at the kernel layer is configured to drive the modem processor at the hardware layer.
[0148] 4 is an Android system, and the Android runtime and system libraries may be included between the application framework layer and the kernel layer. The Android runtime includes kernel libraries and a virtual machine.
[0149] The Android Runtime is responsible for scheduling and managing the Android system.
[0150] The kernel library includes two parts: the functions that need to be called in the Java language and the Android kernel library.
[0151] The application layer and the application framework layer execute on a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is configured to implement functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0152] The system library may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (eg, OpenGL ES), and a 2D graphics engine (eg, SGL).
[0153] The surface manager is configured to manage the display subsystem and provide a blend of 2D and 3D layers for multiple applications.
[0154] The media library supports playback and recording of multiple commonly used audio and video formats, as well as static image files. The media library may support multiple audio and video encoding formats, such as MPEG-4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0155] The 3D graphics processing library is configured to realize 3D graphics drawing, image rendering, compositing, layer processing, and the like.
[0156] The 2D graphics engine is a drawing engine for 2D drawing.
[0157] The data caching method provided in the embodiment of this application is described below with reference to the scenario in which a user passes through an abnormal area (the application scenario shown in FIG. 1A-FIG. 1M). Specifically, as shown in FIG. 5, the method may include, but is not limited to, the following steps:
[0158] S501: A target application in an application layer executes and caches data of the target application based on a first cache policy.
[0159] Specifically, the first cache policy includes at least one of the following: downloading data of the target application at a first download rate, downloading data of the target application at a first bit rate, downloading data of the target application at a first resolution, downloading data of the target application at a first frame rate, requesting data of the target application by using a first request count, the first request count being the number of requests in a unit time, caching a first type of data and a second type of data, the first type being different from the second type, downloading data of the target application at a first sampling frequency, downloading data of the target application by using a first sampling bit count, and downloading data of the target application by using a first sound channel count. For specific examples, please refer to the description of the first cache policy in Figures 1A to 1M. Details will not be described again.
[0160] S502: A target application in the application layer sends a registration message to a registration module in the application framework layer.
[0161] Specifically, the target application may send a registration message to the registration module during installation, during startup, during foreground execution, during background execution, during switching from background execution to foreground execution, or during switching from foreground execution to background execution. The registration message is used to obtain first indication information obtained by the service anomaly prediction module. Optionally, the target application may further send an unregistration message to the registration module during foreground execution, during background execution, during switching from background execution to foreground execution, or during switching from foreground execution to background execution. The unregistration message is used to cancel the acquisition of one indication information obtained by the service anomaly prediction module. For example, the target application sends a registration message to the registration module during switching from background execution to foreground execution, and sends an unregistration message to the registration module during switching from foreground execution to background execution.
[0162] Specifically, the registration message is used to register the first notification event. For example, after receiving the registration message sent by the video application, the registration module determines the video application as the target application for which the first notification event is registered, and notifies the service anomaly prediction module and the transceiver module in the control component. Thus, after generating the first notification information, the service anomaly prediction module transmits the first notification information to the video application for which the first notification event is registered via the transceiver module (i.e., executes S504). The unregistration message is used to cancel the registration of the first notification event. For example, after receiving the unregistration message sent by the video application, the registration module determines the video application as the target application for which the first notification event is not registered, and notifies the service anomaly prediction module and the transceiver module in the control component. Thus, after generating the first indication information, the service anomaly prediction module does not transmit the first indication information to the video application via the transceiver module.
[0163] For example, during installation or execution of a video application, a function in the application framework layer, ie, registeredSignalQualityPrediction( ), is called and sends a registration message to the registration module through the function.
[0164] S503: The service abnormality prediction module predicts whether an abnormal area exists in the traveling direction of the electronic device, and generates first indication information when an abnormal area exists.
[0165] Specifically, the abnormal area is at least one of the following areas: an area where the signal quality is lower than a preset threshold, a network disconnection area, a standard drop area where the standard drop may change from a first network standard (e.g., 5G) to a second network standard (e.g., 2G) lower than the first network standard, and an area where the quality of experience QoE is lower than a first QoE level. A lower QoE level indicates a worse user experience. For example, there are three QoE levels 0, 1 and 2. 0 indicates a bad user experience, 1 indicates an average user experience, and 2 indicates a good user experience. The first QoE level is 1, and the abnormal area is an area where the QoE level is 0.
[0166] For an area where location information can be obtained, such as on the ground, the service abnormality prediction module may execute a prediction process based on the abnormal area database, cell information obtained in real time, and location information, and obtain first instruction information. For details of the prediction process, please refer to the embodiments shown in Figures 8A and 8B to 11. Details will not be described temporarily. For an area where location information cannot be obtained, such as a subway or a tunnel, the service abnormality prediction module may execute a prediction process based on the abnormal area database and cell information obtained in real time, and obtain first instruction information. For details of the prediction process, please refer to the embodiment shown in Figure 12. Details will not be described temporarily. For descriptions of the abnormal area and the first instruction information, please refer to the descriptions of the first instruction information in Figures 1A to 1M. Details will not be described again.
[0167] In some embodiments, a first location exists between the abnormal area and the current location, and no other cells exist between the current location and the first location, and the first location is a location to which the control component transmits the first instruction information, or the abnormal area is an area whose distance from the current location is within a first distance range. The first location is, for example, the normal point C in Figures 1 to 1M, or a preset point in Figures 6 and 9 to 11.
[0168] In some embodiments, when the period of entering the abnormal area from the current location of the electronic device obtained through prediction is within a first preset time range, the control component sends the first instruction information to the target application through the transceiver module. For the description of the first preset time range, please refer to the description of the first preset time range in Figures 1A to 1M. Details will not be described again.
[0169] S504: The service anomaly prediction module sends first indication information in the form of a broadcast message to the target application via the transceiver module.
[0170] For example, the transceiver module may send the first indication information to the video application through a function in the application framework, namely, sendBroadcast( ).
[0171] Specifically, the first instruction information may include type, and may optionally further include first time information t1, may optionally further include second time information t2, and may optionally further include third time information t3. When type is a first value, it indicates that an abnormal area exists. When type is a second value, it indicates that a previously transmitted broadcast message is invalid. t1 may be a time point when the abnormal area is entered, or may be a period from the current position to entering the abnormal area. t2 may be a time point when the abnormal area is exited, or may be a period from the current position to exiting the abnormal area. t3 may be a period from entering the abnormal area to exiting the abnormal area, i.e., a period of the abnormal area. For an example of parameters included in the first instruction information, see Table 1 below. [Table 1]
[0172] type=1 indicates that type in Fig. 1A-1M is a first value, and an abnormal area exists. type=0 indicates that type in Fig. 1-1M and Fig. 2 is a second value, and type=0 indicates that a previously transmitted broadcast message indicating that an abnormal area exists is invalid. Alternatively, the first indication information may include only t2, or may include t2 and type, or may include only t1, or may include t1 and type, or may include t1 and t2, or may include t1, t2 and type. This is not limited to this embodiment of the application.
[0173] S505: After receiving the first indication information, the target application caches data of the target application based on the second cache policy.
[0174] Specifically, upon receiving the first indication information in which type is a first value, the target application performs a pre-cache operation, i.e., caches the data of the target application based on a second cache policy. The second cache policy includes the following: downloading the data of the target application at a second download rate, the second download rate being greater than the first download rate; downloading the data of the target application at a second bit rate, the second bit rate being smaller than the first bit rate; downloading the data of the target application at a second resolution, the second resolution being smaller than the first resolution; downloading the data of the target application at a second frame rate, the second frame rate being smaller than the first frame rate; requesting the data of the target application by using a second request count, the second request count being smaller than the first frame rate; The method includes at least one of: caching the first type of data but skipping caching the second type of data; downloading the target application data at a second sampling frequency, the second sampling frequency being lower than the first sampling frequency; downloading the target application data by using a second sampling bit count, the second sampling bit count being lower than the first sampling bit count; and downloading the target application data by using a second sound channel count, the second sound channel count being lower than the first sound channel count. For an example of the second cache policy and a description of the pre-cache operation, please refer to the description of the second cache policy and the pre-cache operation in FIG. 1A to FIG. 1M.
[0175] Specifically, in response to receiving the first instruction information, the target application caches the data of the target application based on the second cache policy. Optionally, within a second preset period during which the first instruction information is received, caching the data of the target application based on the second cache policy is initiated. The second preset period may be a period less than 1 second, such as 5 milliseconds, 10 milliseconds, or 30 milliseconds, or may be 1 second, 3 seconds, or 5 seconds. The second preset period is the preset execution period in FIG. 1A to FIG. 1M.
[0176] In some embodiments, the target application performs the pre-cache operation within a first time t1 after receiving the first indication information, which is not limited. Alternatively, the target application may perform the pre-cache operation within 0.5×t1 after receiving the first indication information, which is not limited in this embodiment of the application.
[0177] In some embodiments, after receiving the first indication information, the target application caches the data of the target application whose playback duration is a third preset duration (i.e., the duration of the abnormal area) according to the second cache policy, so as to ensure that the user can normally use the target application when 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 a duration indicated by the third time information.
[0178] Below are examples of the process by which different types of target applications perform the pre-cache operation.
[0179] For example, the target application is a video application. In order to ensure that a user can normally use the video application in the abnormal area, for example, normally watch the video displayed on the user interface 110 in FIG. 1A to FIG. 1M, the video application determines to download video data having a duration of (t1+t2) within t1 based on the first instruction information. An example of the formula for the data amount D1 of the video data having a duration of (t1+t2) is as follows: D1 = (t1 + t2) × F × IC
[0180] 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.
[0181] Correspondingly, an example rate R1 at which the video application caches video data is as follows:
number
[0182] Therefore, the pre-caching operation may include at least one of the following: increasing R1, decreasing I, and decreasing F. Correspondingly, the process of the video application caching video data 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 be as follows: the frequency of sending a request message to the server of the target application is greater than the frequency before t1, and / or the amount of data requested to be downloaded in a single request message is greater than the amount of data before t1.
[0183] For example, the target application is an audio application. In order to ensure that the user can normally use the audio application in the abnormal area, the audio application may determine to download audio data having a duration of t2 within t1 according to the first indication information. An example of the formula for the data amount of the audio data having a duration of (t1+t2) is as follows: D2=t2×H×B×SQ
[0184] H is the sampling frequency of the audio data, B is the sampling bit rate 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.
[0185] Correspondingly, an example rate R2 at which the audio application caches audio data is as follows:
number
[0186] Therefore, the pre-caching operation may include at least one of the following: increasing R2, decreasing H, decreasing B, and decreasing S. Correspondingly, the process of the audio application caching 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 rate of the cached content before t1, and S is less than the number of sound channels of the cached content before t1.
[0187] For example, the target application is a reading application. In order to ensure that the user can normally use the reading application in the abnormal area, for example, to normally read a document, the reading application may determine, within t1, based on the first instruction information, to download an amount of data D3 that is read by the user within a period (t1+t2). D3 may be determined by the reading application based on the user's reading habits, for example, the reading habits are that the user reads 0.3 pages of documents per second. Therefore, the pre-caching operation may be to increase the rate of downloading D3 within t1.
[0188] For example, the target application may be a news application, and the user interface of the news application may include text and images. To ensure that the user can normally use the news application in the abnormal area, the news application may determine within t1 to download an amount of data D4 to be viewed by the user within a period (t1+t2) based on the first indication information. D4 may be determined by the news application based on the news viewing habits of the user. For example, 0.2 news items are viewed per second, and news without photos is preferentially displayed. The pre-caching operation may include at least one of the following: increasing the download rate, and caching only text but not photos.
[0189] For example, the target application is a game application. In order to ensure that the user normally uses the game application in the abnormal area, the game application may determine within t1 to download the amount of data D5 used by the user within the period (t1+t2) based on the first indication information. The data cached by the online game application is data that can be pre-cached, such as, but not limited to, game mall data and friend data. The data cached by the game application may be determined by the game application based on the habit of using the game app by the user. For example, the user prefers to use the game mall instead of looking at friend data. The pre-caching operation may be to cache only the game mall data but skip caching the friend data.
[0190] In the method shown in FIG. 5, the target application caches data of the target application based on different cache policies before and after receiving the first instruction information. The usage period of the amount of data downloaded within a unit time based on the first cache policy before the first instruction information is received is smaller than the usage period of the amount of data downloaded within a unit time based on the second cache policy after receiving the first instruction information. In other words, after receiving the first instruction information used to indicate that an abnormal area exists in the traveling direction, the target application caches data based on the second cache policy to increase the usage period of the amount of data downloaded within a unit time, thereby allowing the user to use the target application as normally as possible when passing through the abnormal area. This avoids service freezes and improves user experience.
[0191] In some embodiments, the electronic device 100 may perform a learning process, which is described below with reference to an application scenario shown in FIG.
[0192] FIG. 6 is a schematic diagram of another application scenario in which a user passes through an abnormal area according to an embodiment of this application. The application scenario shown in FIG. 6 is similar to the application scenario shown in FIG. 1A-FIG. 1M. For details, please refer to the description of FIG. 1A-FIG. 1M. An example in which a first cell and a second cell exist between a home and an abnormal point is described in FIG. 6. The first cell and the second cell may be a single cell, or may be a cell group including multiple cells (e.g., adjacent cells). This is not limited. In a specific implementation manner, there may be more or fewer cells.
[0193] In some embodiments, as shown in FIG. 6, there is a preset point (e.g., normal point C in FIG. 1A-FIG. 1M and the first position in FIG. 5) between the second cell and the abnormal point. The preset point is a preset position where the control component sends the first instruction information to the target application. This can also be understood as a position where the target application starts to execute the pre-cache operation. The preset period during which the electronic device 100 is from the preset point to the abnormal point is a first period T_trig. The first period may be any period within the first preset time range shown in FIG. 3, for example, 30 seconds. For details, refer to the description of the first preset time range in FIG. 3. This is not limited. T_trig may also be equal to the period from the second cell to the abnormal point, i.e., the preset point is any point within the second cell. T_trig may also be equal to the period from the first cell to the abnormal point, i.e., the preset point is any point within the first cell. T_trig may also be smaller than the time period from the second cell to reach the abnormal point, but larger than the time period from the first cell to reach the abnormal point, i.e., the preset point may be between the first cell and the second cell. The specific time point at which the electronic device performs the pre-cache operation is not limited in this embodiment of the application.
[0194] 7 is a schematic flow chart of a learning process according to an embodiment of this application. The learning process may include, but is not limited to, the following steps.
[0195] S701: When a cell change is monitored, the electronic device records a cell handover list.
[0196] Specifically, the cells may include a serving cell of the electronic device 100, and may optionally further include neighboring cells. Optionally, the cells may further include signal quality parameters of the serving cell and neighboring cells (such as RSRP, RSRQ, packet loss rate, and signal-to-noise ratio). Correspondingly, the cell handover list recorded by the electronic device may include an identifier of the serving cell, and may optionally further include identifiers of neighboring cells, and may optionally further include signal quality parameters of the serving cell and neighboring cells.
[0197] For example, as shown in Fig. 6, in the process of a user moving from home to work, the electronic device 100 monitors whether a cell changes, cell information, messages of a service abnormality notification event and a service recovery notification event. In the process of a user moving from home to an abnormal point, the electronic device 100 monitors a cell change in which a first cell changes to a second cell, and records a cell handover list by the first cell and the second cell. Optionally, the electronic device 100 may further record information about the first cell and the second cell.
[0198] However, it should be noted that the cell handover list may record information of a cell without ping-pong handover, i.e., the first appearing cell information. For example, in the process of a user moving from a first cell to a second cell, if a cell change is monitored from the first cell to the second cell and then back to the first cell, the recorded cell handover list is of the first cell and the second cell.
[0199] S702: When monitoring a service abnormality notification event, the electronic device determines whether a fence cell exists at the abnormality point.
[0200] Specifically, the service abnormality notification event may include, but is not limited to, a network disconnection, a drop to a lower network standard, a signal-to-noise ratio, an RSRP or an RSRQ being smaller than a preset threshold, a QoE being smaller than a first QoE level, a packet loss rate being larger than a preset threshold, etc. When a service abnormality notification event is monitored, the electronic device 100 considers the current location to be an abnormal point.
[0201] Specifically, the fence cell may be one or more cells, which is used to measure the period of reaching the abnormal point to determine the passing path, so that the electronic device 100 then executes the corresponding prediction process for different paths. In this embodiment of the application, an explanation is provided by using an example in which two cells are used as the fence cell. It can be understood that since one line is determined by two points, the accuracy of determining the current path is higher by using two fence cells. There is no need to record excessive cell information, which reduces the storage pressure and processing pressure of the electronic device 100. The fence cell far away from the abnormal point or the preset point is called the first fence cell, and the fence cell closer to the abnormal point or the preset point is called the second fence cell.
[0202] The electronic device may determine whether at least two cells exist outside the anomaly point or the preset point based on the cell handover list recorded in S701. When two cells exist, the two cells closest to the anomaly point or the preset point are determined as fence cells. For example, as shown in FIG. 6, when a user moves from home to the anomaly point, the user passes through a first cell and a second cell, and the electronic device 100 records information about the first cell and the second cell in the cell handover list. When the user reaches the anomaly point, the electronic device 100 monitors a service anomaly notification event. Then, the electronic device 100 may determine that the first cell and the second cell exist outside the anomaly point based on the cell handover list, and thus determine the first cell and the second cell as fence cells of the anomaly point. If no cells exist, information about the anomaly area is not recorded. For example, the anomaly point is adjacent to the start point of the route (e.g., home in FIG. 6), and the user reaches the anomaly point before passing through other cells when starting out. Therefore, information about the anomaly area is not recorded. The information about the abnormal area may include information about the abnormal point and information about the recovery point.
[0203] S703: When the fence cell is present at the anomaly point, the electronic device records information about the anomaly point.
[0204] Specifically, the information about the anomaly point may include, but is not limited to, information about the fence cell, a period from the first fence cell to the anomaly point, a time from the second fence cell to the anomaly point, a service anomaly type, and a service anomaly occurrence count. Optionally, the information about the anomaly area may further include location information about the anomaly point. The service anomaly type and the service anomaly occurrence count may be obtained from the service anomaly notification event monitored when the electronic device passes through the anomaly area. For example, the service anomaly occurrence count is the number of service anomaly notification events received during the process from entering the anomaly area to leaving the anomaly area.
[0205] For example, as shown in Fig. 6, when the user passes through the abnormal area, the electronic device 100 records information about the abnormal point, i.e., the identification information of the second cell, the signal quality parameter, the period from the second cell to the abnormal point (second period T_avgfen), the service abnormality type and the number of times of occurrence of the service abnormality in the service abnormality notification event monitored when the abnormal area is passed. If the route shown in Fig. 6 is a route such as a ground route from which location information can be obtained, the information about the abnormal point recorded by the electronic device 100 may further include longitude and latitude information, direction information and speed information about the abnormal point.
[0206] S704: When a service recovery notification event is monitored, the electronic device records information about the recovery point.
[0207] Specifically, the information on the recovery point may include, but is not limited to, a period from the abnormality point to the recovery point, and may optionally further include location information on the recovery point. For example, as shown in FIG. 6, when a user reaches a recovery point, the electronic device 100 monitors a service recovery notification event, and the electronic device 100 records information on the recovery point, i.e., a period from the abnormality point to the recovery point (third period T_avgrec). If the route shown in FIG. 6 is a route on the ground or the like where location information can be obtained, the information on the recovery point recorded by the electronic device 100 may further include latitude and longitude information, direction information, and speed information on the recovery point.
[0208] S705: The electronic device updates the abnormal area database based on the recorded information about the abnormal area.
[0209] Specifically, the information about the abnormal area includes information about the start point of the abnormal area (i.e., the abnormal point) and information about the end point of the abnormal area (i.e., the recovery point). The electronic device 100 may update the original record in the abnormal area database based on the recorded information about the abnormal area, or may add a new record to the database. Assume that a record of a route from a user's home to his / her company (i.e., the route to the company) exists in the abnormal area database. An example of the record is shown in Table 2 below. [Table 2]
[0210] scene=0 indicates that the route type is a route to work. For example, scene=1 indicates that the route type is a return journey to home, and scene=2 indicates that the route type is a leisure route. weakType=0 indicates that the service abnormality type is a network disconnection. For example, weakType=1 indicates that the service abnormality type is a drop to a lower network standard, weakType=2 indicates that the service abnormality type is a bad signal quality (e.g., RSRP and RSRQ are less than the respective preset thresholds), and weakType=3 indicates that the QoE is lower than the first QoE level.
[0211] weakLoc="116.2,40.6,17.79,23" indicates that the longitude of the anomaly point is 116.2, the latitude is 40.6, the speed is 17.79 (for example, unit: km / h), and the direction angle is 23 degrees northeast. 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, unit: km / h), and the direction angle is 25 degrees northeast. The accuracy, unit, and value of the location information are not limited in the embodiment of this application.
[0212] firstFenceCell is the cell ID of the first fence cell, secondFenceCell is the cell ID of the second fence cell, and the cell ID is a unique identity. timestamp="1599102391" indicates that the last time the anomalous area was entered was "2020-09-03 11:06:30".
[0213] historyTimeFence2Weak="57,47,48,0,0" indicates that the duration from the second fence cell to the anomaly point in the last three history records is 57 seconds, 47 seconds, and 48 seconds, respectively. historyTimeWeak2Recover="34,33,32,0,0" indicates that the duration from the anomaly point to the recovery point in the last three history records is 34 seconds, 33 seconds, and 32 seconds, respectively. "0" indicates that the anomaly area is not passed. Therefore, based on the above two history records, the anomaly area may be passed three times, and the corresponding count="3".
[0214] avgTimeFenceToWeak="49" indicates that the average time period from the second fence cell to the anomaly point is 49 seconds. In some embodiments, avgTimeFenceToWeak may be obtained by averaging the value of historyTimeFence2Weak. The specific calculation process is shown below:
number
[0215] Similarly, avgTimeWeakToRecover="33" indicates that the average time from the abnormal point to the recovery point is 33 seconds. In some embodiments, avgTimeWeakToRecover may be obtained by averaging the value of historyTimeWeak2Recover. The specific calculation process is as follows:
number
[0216] In a specific implementation, avgTimeFenceToWeak may also be obtained by removing the maximum and minimum values from the value of historyTimeFence2Weak and then performing the average, and avgTimeWeakToRecover may also be obtained by removing the maximum and minimum values from the value of historyTimeWeak2Recove and then performing the average, which is not limited in this embodiment of this application.
[0217] In some embodiments, the electronic device 100 does not pass through an area where location information can be obtained, such as above ground, but passes through an area where location information cannot be obtained, such as a subway or tunnel. In this case, in the record of the abnormal area obtained through learning, recoverLoc="0,0,0,0" and weakLoc="0,0,0,0".
[0218] This is not limited to the case listed in Table 2. In a specific implementation, the characteristic information of the abnormal area may further include the period from the first fence cell to the abnormal point, the time stamp of the last time leaving the recovery point, etc. This is not limited to this embodiment of the application. In the following, an explanation is provided by using an example in which the information on the abnormal area included in the abnormal area database is the information shown in Table 2.
[0219] Based on Table 2, assuming that the electronic device 100 passes through the abnormal area on the route to the company four times, the electronic device 100 may update the record shown in Table 2 based on the information about the abnormal area on the route to the company recorded this time, or may add a record of the abnormal area to the database. A specific example is as follows.
[0220] Example 1: Assuming that the scene, weakLoc, recoverLoc, firstFenceCell, and secondFenceCell recorded when the electronic device 100 passes the anomaly area on the route to the office four times remain unchanged, count may be updated to 4 and timeStamp may be updated to the timestamp at which the service anomaly notification event was detected, i.e., the timestamp at which the anomaly point was reached this time. Assuming that the recorded duration from the second cell to the anomaly point is T_fen=50, historyTimeFence2Weak may be updated to "57, 47, 48, 50, 0" and avgTimeFenceToWeak may be updated. The update process is as follows:
[0221] First, calculate the average value of the updated historyTimeFence2Weak. The calculation process is as follows:
number
[0222] Then, get the updated avgTimeFenceToWeak. The calculation process is as follows: avgTimeFenceToWeak=(1-a)×avgTimeFenceToWeak+a×t_newfence
[0223] The value of a is in the range [0,1], for example a=0.6.
[0224] The process of updating historyTimeWeak2Recover and avgTimeWeakToRecover is similar to that of updating historyTimeFence2Weak and avgTimeFenceToWeak. The calculation process of the updated avgTimeWeakToRecover is as follows: avgTimeWeakToRecover=(1-b)×avgTimeWeakToRecover+b×t_newrecover
[0225] t_newrecover is obtained by averaging the updated values of historyTimeWeak2Recove. The range of values of b is the same as that of a. a and b can be the same or different.
[0226] In a specific implementation, when the average value of the updated historyTimeFence2Weak or the average value of the updated historyTimeFence2Weak is calculated, the maximum and minimum values may be removed first, and then the average is performed, which is not limited to this embodiment of the application.
[0227] Example 2: When the electronic device 100 passes through an anomaly area on the route to the company four times, the firstFenceCell and secondFenceCell obtained through detection remain unchanged, and assuming that the difference between the location where the service anomaly prediction notification event is detected (i.e., the anomaly point) and the weakLoc in Table 2 is smaller than a preset threshold, for example, if the distance is less than 100 m, the electronic device 100 may obtain an updated weakLoc based on the anomaly point detected this time and the weakLoc in Table 2, for example, obtain an intermediate location between the two locations.
[0228] Similarly, assuming that the electronic device 100 passes through an anomaly area on the route to the company four times, the firstFenceCell and secondFenceCell obtained through detection remain unchanged, and the difference between the location where the service anomaly prediction notification event is detected (i.e., the recovery point) and the recoverLoc in Table 2 is smaller than a preset threshold, for example, if the distance is less than 100 m, the electronic device 100 may obtain an updated recoverLoc based on the recovery point detected this time and the recoverLoc in Table 2, for example, to obtain an intermediate location between the two locations.
[0229] It can be understood that the manner in which weakLoc is updated and the manner in which recoverLoc is updated may be the same or different.
[0230] Example 3: When the electronic device 100 passes through an abnormal area on the route to the company four times, assuming that the firstFenceCell and secondFenceCell obtained through detection remain unchanged and the difference between the location where the service anomaly prediction notification event is detected (i.e., the anomaly point) and the weakLoc in Table 2 is greater than a preset threshold, for example, if the distance is greater than 100 m, the electronic device 100 may re-add the record of the abnormal area detected this time to the database.
[0231] Similarly, when the electronic device 100 passes through an abnormal area on the route to the company four times, assuming that the firstFenceCell and secondFenceCell obtained through detection remain unchanged and the difference between the location where the service anomaly prediction notification event was detected (i.e., the recovery point) and the recoverLoc in Table 2 is greater than a preset threshold, for example, if the distance is greater than 100 m, the electronic device 100 may re-add the record of the abnormal area detected this time to the database.
[0232] It can be appreciated that the preset threshold corresponding to weakLoc may be the same as or different from the preset threshold corresponding to recoverLoc.
[0233] Example 4: When the electronic device 100 passes through an anomalous area on the route to the office four times, assuming that the cell ID of either of the two cells closest to the anomaly point is detected to be not firstFenceCell or secondFenceCell in Table 2, the electronic device 100 may re-add the record of the anomalous area detected this time to the database.
[0234] Example 5: The electronic device 100 may periodically delete records from the anomalous area database whose timeStamp is less than a preset threshold, for example, deleting anomalous area records that have not been updated for three months every two months.
[0235] This is not limited to the above example. In a specific implementation, when the electronic device 100 passes through the abnormal area on the route to the company four times, if the detected scene (e.g., the play route) is not the scene in Table 2 (i.e., the route to the company), the electronic device 100 may re-add the record of the abnormal area detected this time to the database. This is not limited to this embodiment of the application.
[0236] This is not limited to the learning process shown in FIG. 7. In a specific implementation manner, the electronic device may not record a cell handover list or may not determine a fence cell. When the electronic device detects a service abnormality notification event, the electronic device may obtain location information of the electronic device. Optionally, the electronic device may further obtain 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, and then update the abnormal area database according to the obtained location information and at least one of the above information. This is not limited to this embodiment of this application.
[0237] It can be understood that, in order to obtain authentic and reliable information about the abnormal area, the electronic device 100 may execute the method shown in Fig. 7 every time it passes through the same route, which facilitates executing the subsequent prediction process and improves the accuracy of the first indication information.
[0238] The prediction process will be described below. For the prediction process performed by the electronic device 100 in an area such as on the ground where location information can be obtained, refer to the embodiment shown in Fig. 8A and Fig. 8B to Fig. 11. For the prediction process performed by the electronic device 100 in an area such as a subway or a tunnel where location information cannot be obtained, refer to the embodiment shown in Fig. 12.
[0239] 8A and 8B are schematic flow charts of a prediction process according to an embodiment of the present application. An explanation is provided by using an example in which longitude and latitude information and speed information can be obtained in a passing area in FIG. 8A and 8B. The prediction process may include, but is not limited to, the following steps:
[0240] S801: The electronic device determines a target record in an abnormal area database that matches a passing cell.
[0241] Specifically, when the electronic device 100 determines that at least two cells have been passed, the electronic device 100 may extract at least one record from the abnormal area database whose "count" (number of times the abnormal area has been passed) is greater than a preset threshold (e.g., 3), and determine a target record from the at least one record. In the target record, "firstFenceCell" (identity of the first fence cell) and "secondFenceCell" (identity of the second fence cell) are identities of two consecutive cells passed by the electronic device 100. When the target record exists, the electronic device 100 determines that the electronic device 100 has passed the fence cell in the target record, i.e., the scene information of the current route is the scene information in the target record (e.g., the route to the company in Table 2).
[0242] In some embodiments, the electronic device 100 may also obtain scene information of the current route. If the scene information is a "scene" that exists in the abnormal area database and it is determined that the electronic device has passed at least two cells, the electronic device may execute S801.
[0243] For example, Figure 9 is a schematic diagram of yet another application scenario in which a user passes through an abnormal area according to an embodiment of this application. The application scenario shown in Figure 9 is similar to those in Figures 1A-1M and 6. For details, please refer to the descriptions in Figures 1A-1M and 6.
[0244] As shown in Fig. 9, in the process of a user moving from home to a first point, the electronic device 100 passes through a first cell and a second cell. When the electronic device 100 reaches the second cell, the electronic device 100 may determine a target record from the abnormal area database, where "firstFenceCell" is the identity of the first cell and "secondFenceCell" is the identity of the second cell, i.e., the fence cells are the first cell and the second cell. Below, an explanation is provided by using an example in which the records shown in Table 2 are the target records.
[0245] S802: The electronic device obtains position information on the abnormal point in the target record, position information on the recovery point, the average period from the second fence cell to the abnormal point T_avgfen, and the average period from the abnormal point to the recovery point T_avgrec.
[0246] Specifically, the electronic device acquires 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.
[0247] For example, when the target record is a record shown in Table 2, the acquired information is the weakLoc of the abnormal point, the recoverLoc of the recovery point, the average period from the second fence cell to the abnormal point, avgTimeFenceToWeak (i.e., T_avgfen in FIG. 6), and the average period from the abnormal point to the recovery point, avgTimeWeakToRecover (i.e., T_avgrec in FIG. 6) in Table 2. For the period required for the electronic device 100 to pass through the second cell, the abnormal point, and the recovery point in the target record, refer to the period shown in FIG. 6.
[0248] S803: The electronic device obtains location information of its current location.
[0249] Specifically, when the user reaches a second cell (e.g., a first point in the second cell shown in FIG. 9), the electronic device 100 first obtains latitude and longitude information S_Loc and speed information V_Loc of the current location.
[0250] S804: The electronic device obtains a fourth period T_drop and a fifth period T_rec through calculation based on the location information of the target record and the current location.
[0251] Specifically, the fourth period T_drop is a period from the current position to the abnormal point obtained through calculation based on the target record, the longitude and latitude information of the current position, and the speed information. The fifth period T_rec is a period from the abnormal point to the recovery point obtained through calculation based on the target record, the longitude and latitude information of the current position, and the speed information.
[0252] 9, the fourth period T_drop is the period from the first point to the abnormal point obtained through calculation by the electronic device 100. The calculation method is as follows:
[0253] First, the distance D_Loctodrop between the first point S_Loc and the abnormal point S_drop is calculated.
[0254] Then calculate the average velocity V_Loctodrop between the first point S_Loc and the abnormal point S_drop. The formula is as follows:
number
[0255] Finally, obtain the fourth term T_drop based on D_Loctodrop and V_Loctodrop. The formula is as follows:
number
[0256] The fifth period T_rec is a period from the abnormal point to the recovery point obtained through calculation by the electronic device 100 at the first point. The calculation method is as follows.
[0257] First, the distance D_droptorec between the abnormal point S_drop and the recovery point S_rec is calculated.
[0258] Then, calculate the average speed V_droptorec between the abnormal point S_drop and the recovery point S_rec. The formula is as follows:
number
[0259] Finally, obtain the fifth period T_rec based on D_droptorec and V_droptorec, as follows:
number
[0260] S805: The electronic device obtains a sixth period T_newfen based on the average period T_avgfen from the second fence cell of the record in the target record to the anomaly point.
[0261] Specifically, based on the target record, the sixth period T_newfen from the current position to the abnormal point is obtained by subtracting the period from the second cell to the current position from the average period T_avgfen from the second cell to the abnormal point. For example, as shown in FIG. 9, when the current position is the first point in the second cell, that is, the period from the second cell to the current position is 0, T_newfen=T_avgfen-0=T_avgfen.
[0262] S806: The electronic device obtains a seventh term T_newdrop based on the fourth term T_drop and the sixth term T_newfen.
[0263] Specifically, T_newdrop is the period from the current position to the anomaly point obtained through prediction by the electronic device 100 at the first point. An example of the formula for T_newdrop is as follows: T_newdrop=c×T_drop+(1-c)×T_newfen
[0264] The value of c is in the range [0,1]. For example, c=0, c=0.6, or c=1.
[0265] S807: The electronic device obtains an eighth period T_newrec based on the fifth period T_rec and the third period T_avgrec.
[0266] Specifically, T_newrec is the period from the abnormal point to the recovery point obtained through prediction by the electronic device 100 at the first point. An example of the formula for T_newrec is as follows: T_newrec=d×T_rec+(1-d)×T_avgrec
[0267] The value of d is in the range of [0,1]. For example, d = 0, d = 0.6, or d = 1. c and d can be the same or different.
[0268] 9, when the electronic device 100 is at the first point, the period to the abnormal point obtained through prediction is a seventh period T_newdrop obtained based on a fourth period T_drop obtained through calculation with reference to the real-time position and a sixth period T_newfen obtained based on the target record. When the electronic device 100 is at the first point, the period from the abnormal point to the recovery point obtained through prediction is an eighth period T_newrec obtained based on a fifth period T_rec obtained through calculation with reference to the real-time position and a third period T_avgrec based on the target record.
[0269] S808: The electronic device determines whether the seventh period T_newdrop is less than or equal to the first period T_trig.
[0270] S809: The electronic device performs a pre-cache operation.
[0271] Specifically, the electronic device 100 determines whether T_newdropT_trig≦T_trig is satisfied. When the condition is satisfied, the electronic device 100 determines that the electronic device at the current position (e.g., the current position is the second point shown in FIG. 10 ) has passed the preset point, and the electronic device 100 performs a pre-cache operation on the target application based on the first indication information (i.e., executes S809). If not, the electronic device 100 executes S810.
[0272] Specifically, the electronic device performs the pre-cache operation based on the first instruction information, which means that the target application receives the first instruction information sent by the control component and caches the data of the target application based on the second cache policy. For the description of the first instruction information, the second cache policy, and the pre-cache operation, please refer to the description of the first instruction information and the pre-cache operation in Figures 1A to 1M, 3, and 5. The details will not be described again.
[0273] It can be understood that multiple cases of the preset point are described in Figure 6. For example, the preset point may be any point in the second cell, and the preset period is equal to the seventh period T_newdrop that is initially obtained. In this case, the electronic device may directly execute S809, and does not need to execute S808 and S810.
[0274] In some embodiments, the number of location acquisitions Cnt may be increased by 1 each time S803 is executed. Specifically, the initial value of the number of location acquisitions Cnt is 0. When the user reaches 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. In this case, the number of location acquisitions Cnt is Cnt=Cnt+1=0+1=1.
[0275] Based on this, S808 may specifically include the following. The electronic device 100 determines whether (number of position acquisitions) CntC_max ≥ C_max (first threshold value) (for example, 5) is satisfied and whether (T_newdrop - T_trig) > second threshold value Th (for example, 5 seconds). When the condition is satisfied, the electronic device 100 determines that this prediction process is inaccurate and stops the prediction. Otherwise, the electronic device 100 determines whether T_newdrop ≤ T_trig is satisfied. When the condition is satisfied, the electronic device 100 continues to execute the pre-caching operation for the target application based on the first instruction information (that is, execute 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 the condition is satisfied, the electronic device 100 determines that the electronic device at the current position has not passed through a preset point, but the current position (for example, the third point shown in FIG. 11) is very close to the preset point, and the electronic device 100 executes the pre-caching operation for the target application based on the first instruction information (that is, execute S809). Otherwise, the electronic device 100 executes S810.
[0276] In this embodiment of this application, the restriction on the number of position acquisitions in the prediction process may be increased. This ensures the accuracy of the first instruction information while avoiding unnecessary power consumption and overhead of the electronic device as much as possible and improving the battery life capacity.
[0277] S810: The electronic device obtains a ninth period T_test based on the seventh period T_newdrop and the first period T_trig.
[0278] Specifically, the ninth period T_test is a period from the current time to the next time S803 is executed. For example, the electronic device 100 may calculate T_test by using a dichotomy, and the formula for T_test is as follows:
number
[0279] S811: The electronic device determines whether the passing period is greater than or equal to a ninth period T_test.
[0280] Specifically, when the electronic device 100 determines that the passing period is equal to or greater than T_test, that is, the time to next obtain location information related to the current location has arrived, the electronic device 100 executes S803. Otherwise, the electronic device 100 continues to wait. For example, as shown in FIG. 9, the time of the user at the first point is the first time, and the time when the user next executes S803 is the time when the period T_test has elapsed from the first time, that is, the sum of the first time and T_test.
[0281] It should be noted that the sequence of S801, S802, and S803 is not limited, or S801, S802, and S803 may be executed simultaneously. The sequence of S804 to S806 and S807 is not limited, or S804 to S806 and S80 may be executed simultaneously. The sequence of S804 and S805 is not limited, or S804 and S805 may be executed simultaneously.
[0282] In the method shown in Figures 8A and 8B, the electronic device can perform a prediction process based on the history records in the abnormal area database and the cell information and location information obtained in real time to obtain the first indication information and a time point for sending the first indication information, which increases the accuracy of determining whether an abnormal area exists, tries to avoid the case where data is cached based on the second cache policy when no abnormal area exists or when an abnormal area exists but no abnormal area is detected, and improves the user experience.
[0283] The first indication information includes the time of entering the abnormal area and the period of the abnormal area, and the pre-cache operation performed by the target application may be determined based on the first indication information, for example, when the playback period of the data downloaded through the pre-cache operation is the period of the abnormal area, different first indication information is obtained when the real-time location information of the electronic device changes, for example, when the moving speed is fast or slow. Therefore, the pre-cache operation determined based on the first indication information may also be different. Therefore, in order to ensure that the user can normally use the target application when passing through the abnormal area in different application scenarios, the pre-cache operation can be dynamically adjusted in different application scenarios. This avoids service freeze and improves user experience.
[0284] Figure 12 is a schematic flow chart of another prediction process according to an embodiment of this application. An explanation is provided by using an example in which the longitude and latitude information and the speed information are not available in the passing area in Figure 12. The prediction process includes but is not limited to the following steps:
[0285] S1201: The electronic device determines a target record in the abnormal area database that matches a passing cell.
[0286] Specifically, S1201 is similar to S801 in FIG. 8A, and the details will not be described again.
[0287] S1202: The electronic device acquires an average period T_avgfen from the second fence cell to the abnormal point in the target record and an average period T_avgrec from the abnormal point to the recovery point.
[0288] For example, when the target record is the record shown in Table 2, the acquired information is the average period from the second fence cell to the abnormal point, avgTimeFenceToWeak (i.e., T_avgfen in FIG. 6), and the average period from the abnormal point to the recovery point, avgTimeWeakToRecover (i.e., T_avgrec in FIG. 6). For the period required for the electronic device 100 to pass through the second cell, the abnormal point, and the recovery point in the target record, refer to the period shown in FIG. 6.
[0289] S1203: The electronic device determines whether the transit time is equal to (T_avgfen-T_trig).
[0290] S1204: The electronic device performs a pre-cache operation.
[0291] Specifically, when the electronic device 100 determines that the passing period is smaller than (T_avgfen-T_trig), i.e., when the electronic device 100 has not reached the preset point, the electronic device 100 continues to wait. For example, when the user is at the first point in the second cell shown in FIG. 9, the electronic device 100 executes S1202 and S1203. In this case, the passing period is equal to 0. In FIG. 9, since the preset point is closer to the abnormal point than the second cell, the period T_trig from the preset point to the abnormal point is smaller than T_avgfen in the target record, i.e., (T_avgfen-T_trig)>0. Therefore, if the period is smaller than (T_avgfen-T_trig), the electronic device 100 continues to wait.
[0292] Specifically, the electronic device performs the pre-cache operation based on the first instruction information, which means that the target application receives the first instruction information sent by the control component and caches the data of the target application based on the second cache policy. For the description of the first instruction information, the second cache policy, and the pre-cache operation, please refer to the description of the first instruction information and the pre-cache operation in Figures 1A to 1M, 3, and 5. The details will not be described again.
[0293] When the electronic device 100 determines that the passing period is equal to (T_avgfen-T_trig), i.e., when the electronic device 10 reaches a preset point (e.g., the third point shown in FIG. 11), the electronic device 100 performs a pre-cache operation on the target application based on the first instruction information (i.e., executes S1204). Optionally, the first instruction information includes a period T_trig from the current position (i.e., the preset point) to the abnormal point and a period T_avgrec from the abnormal point to the recovery point.
[0294] It can be understood that multiple cases of the preset point are described in Figure 6. For example, the preset point may be any point in the second cell, and the first period T_trig is equal to T_avgfen. In this case, the electronic device may directly execute S1204, and does not need to execute S1203.
[0295] In the method shown in Fig. 12, for an area where location information cannot be obtained, the electronic device can perform a prediction process based on the history records in the abnormal area database and the cell information obtained in real time to obtain first indication information. Furthermore, a pre-caching operation can be performed for the target application based on the first indication information, so that the target application can be used as normally as possible when passing through the abnormal area. This avoids service freezing and improves user experience.
[0296] The prediction process shown in Figures 8A, 8B and 12 is not limited. In a specific implementation manner, the electronic device only obtains the current location information of the electronic device, determines whether there is an abnormal area record corresponding to the current location information in the abnormal area database, and if there is an abnormal area record, can generate first indication information and send the first indication information. Alternatively, the electronic device can obtain both the location information of the electronic device and the current location information of the electronic device, and determines whether there is an abnormal area record corresponding to the current cell information and the current location information in the abnormal area database, and if there is an abnormal area record, can generate first indication information and send the first indication information. This is not limited to this embodiment of this application.
[0297] It may be appreciated that when traversing any path, the electronic device 100 may perform the learning process shown in FIG. 7 and / or the prediction process shown in FIGS. 8A and 8B or FIG.
[0298] Based on several embodiments shown in FIGS. 1A to 1M and 2 to 12, the data caching method provided in this application will be described below.
[0299] Figure 13 shows a data caching method according to an embodiment of the present application. The method may be applied to the electronic device 100 and the processor 110 in the electronic device 100 shown in Figure 2. The method may also be applied to the electronic device 100 shown in Figure 3. The method may also be applied to the software system shown in Figure 4, such as the Android system or the HMS system of the electronic device 100. The method may include, but is not limited to, the following steps.
[0300] S1301: The electronic device performs a first prediction process in a first abnormal area, performs a second prediction process in a second abnormal area, and obtains first indication information.
[0301] Specifically, the first abnormal area is an area where the electronic device can obtain location information. The electronic device may execute a first prediction process based on the abnormal area database, the network information obtained in real time, and the location information, and obtain the first instruction information. For a specific implementation of the first prediction process, please refer to the embodiment shown in FIG. 8A and FIG. 8B to FIG. 11. The second abnormal area is an area where the electronic device cannot obtain location information. The electronic device may execute a second prediction process based on the database record of the abnormal area and the network information obtained in real time, and obtain the first instruction information. For a specific implementation of the second prediction process, please refer to the embodiment shown in FIG. 12.
[0302] 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 longitude and latitude information, speed information and direction information of the electronic device, cell information, such as a cell ID of a serving cell, a cell ID of a neighboring cell, signal quality parameters of a current cell of the electronic device and / or signal quality parameters of a neighboring cell, network or service abnormality notification messages, such as RSRP and RSRQ being smaller than a preset threshold or QoE being lower than a first QoE level.
[0303] In some embodiments, before S1301, the method may further include: performing a learning process. Specifically, the electronic device may identify and collect statistics about abnormal areas based on the monitoring information, and generate an abnormal area database. In some other embodiments, the abnormal area database may also be obtained by the cloud server by performing a learning process based on the monitoring information sent by at least one electronic device. For a detailed description of the learning process, please refer to the embodiments shown in Figures 6 and 7. The details will not be described again.
[0304] S1302: The electronic device performs a pre-cache operation based on the first instruction information.
[0305] Specifically, the electronic device performs the pre-cache operation based on the first instruction information, which is the target application receives the first instruction information sent by the control component and caches the data of the target application based on the second cache policy. For details, please refer to the above description of the first instruction information and the pre-cache operation in Figures 1A to 1M, 3 and 5. The details will not be described again.
[0306] Specifically, the first indication information may include type, and may optionally further include first time information t1, and may optionally further include second time information t2, and may optionally further include third time information t3. When type is a first value, it indicates that an abnormal area exists. When type is a second value, it indicates that a previously transmitted broadcast message is invalid. t1 may be a time when the abnormal area is entered, or may be a period from the current position to entering the abnormal area. t2 may be a time when the abnormal area is left, or may be a period from the current position to leaving the abnormal area. t3 may be a period from entering the abnormal area to leaving the abnormal area, that is, a period of the abnormal area. In the first prediction process shown in FIG. 8A and FIG. 8B to FIG. 11, the first time t1 is the seventh period T_newdrop, the second time t2 is the eighth period T_newrec, and the third time t3 is the difference between the two. In the second prediction process shown in FIG. 12, the first time t1 is the first period T_trig, the second time t2 is the third period T_avgrec, and the third time t3 is the difference between the two.
[0307] Specifically, a pre-caching operation may be performed on a target application. The target application is an online application having a caching mechanism, such as an audio application, a video application, a learning application, or a reading application. Optionally, the target application is an application that registers a service anomaly prediction notification event during installation or execution. For details, please refer to the description of the target application in Figures 1A-1M and 2-5.
[0308] In the method shown in Fig. 13, the electronic device can perform different prediction processes in areas where location information can be obtained and areas where location information cannot be obtained. Therefore, the method is fully applicable to different application scenarios and can improve the accuracy of the first indication information as much as possible. In order to ensure that the electronic device can be used normally when passing through an abnormal area, the electronic device can perform a pre-caching operation based on the first indication information. This avoids service freeze and improves user experience.
[0309] Furthermore, the abnormal area database used by the electronic device to perform the prediction process is obtained by the electronic device or the cloud server by learning historical monitoring information, which ensures the authenticity and reliability of the data used in the prediction process and further improves the accuracy of the first indication information.
[0310] All or part of the above embodiments may be realized by using software, hardware, firmware, or any combination thereof. When software is used to realize the above embodiments, all or part of the embodiments may be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into a computer and executed, all or part of the procedures or functions according to this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (e.g., coaxial cable, optical fiber, or digital subscriber line) or wireless (infrared, radio, or microwave) manner. The computer-readable storage medium may be any available medium accessible by a computer, or a data storage device such as a server or data center that integrates one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, hard disk, or magnetic tape), an optical medium (eg, a DVD), a semiconductor medium (eg, a Solid State Disk), or the like.
[0311] In conclusion, the above description is merely an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement or improvement made according to the disclosure of the present invention shall fall within the protection scope of the present invention.
[0312] It is obvious that those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. The present invention intends to cover these modifications and variations, provided that they fall within the scope of protection defined by the following claims and their equivalent technologies.
Claims
1. 1. A data caching method applied to an electronic device, the electronic device including a target application and a control component, the method comprising: executing, by the electronic device, the target application and caching data of the target application based on a first cache policy, the first cache policy including 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 bit rate, downloading the data of the target application at a first resolution, downloading the data of the target application at a first frame rate, requesting the data of the target application by using a first request number, the first request number being a number of requests within a unit time, caching a first type of data and a second type of data, the first type being different from the second type, downloading the data of the target application at a first sampling frequency, downloading the data of the target application by using a first sampling bit number, and downloading the data of the target application by using a first sound channel number; receiving, by the target application, first indication information sent by the control component, the first indication information being used to indicate that an abnormal area exists in the direction of travel of the electronic device, the abnormal area being at least one of the following areas: an area where signal quality is lower than a preset threshold, a network disconnection area, a standard drop area where a standard changes from a first network standard to a second network standard lower than the first network standard, and an area where the Quality of Experience (QoE) is lower than a first QoE level; caching data of the target application based on a second cache policy after the target application receives the first indication information, the second cache policy at least including: caching the first type of data and skipping caching the second type of data; The method includes:
2. Prior to receiving, by the target application, a first instruction sent by the control component, the method further comprises: The method of claim 1 , further comprising the step of: sending, by the target application, a registration message to the control component, the registration message being used to obtain the first indication information.
3. 3. The method of claim 2, wherein a first location exists between the abnormal area and a current location, and no other cells exist between the current location and the first location, and the first location is a location from which the control component transmits the first instruction information, or the abnormal area is an area within a first distance range from the current location.
4. The method comprises:
4. The method of claim 2 or 3, further comprising: sending, by the control component, the first indication information to the target application when a period during which the electronic device enters the anomalous area from a current location is within a first preset time range.
5. 3. The method of claim 2, wherein the step of sending a registration message to the control component by the target application includes the step of sending registration information to the control component by the target application when the target application detects that it has been switched from background execution to foreground execution or launched.
6. The method comprises: obtaining current cell information of the electronic device, determining whether an abnormal area record corresponding to the current cell information exists in the abnormal area data file, and generating, by the control component, the first indication information when the abnormal area exists; or obtaining current location information of the electronic device, determining whether an abnormal area record corresponding to the current location information exists in the abnormal area data file, and generating, by the control component, the first indication when the abnormal area exists; or obtaining the current cell information and the current location information of the electronic device, determining whether an abnormal area record corresponding to the current cell information and the current location information exists in the abnormal area data file, and generating the first indication information by the control component when the abnormal area exists; The method of claim 2 or 3, further comprising:
7. The method comprises: obtaining current cell information and current location information of the electronic device; determining whether an abnormal area record corresponding to the current cell information exists in the abnormal area data file; generating, by the control component, the first indication when the abnormal area record exists, the current location information being used to determine a time to transmit the first indication; The method of claim 2 or 3, further comprising:
8. The method comprises: obtaining information about cells through which the electronic device passes, and when detecting a service anomaly notification event, determining in the information about the cells through which the electronic device passes whether the electronic device passes at least one cell before a second preset time range, and if the electronic device passes the at least one cell, adding a first abnormal area record to the 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, and the service anomaly notification event is used to indicate at least one of the following information: signal quality is lower than a preset threshold, network is disconnected, a first network standard is changed to a second network standard that is lower than the first network standard, and QoE is lower than a first QoE level; or when detecting the service abnormality notification event, acquiring 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 acquired based on the location information of the electronic device. The method of claim 6 or 7, further comprising:
9. When the electronic device passes through the at least one cell, the step of adding a first abnormal area record to the data file of the abnormal area or updating a second abnormal area record in the data file of the abnormal area includes:
9. The method of claim 8, further comprising: if the electronic device passes through the at least one cell, obtaining the location information of the electronic device and 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, wherein the first abnormal area record or the second abnormal area record includes the information about 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.
10. When the electronic device passes through the at least one cell, the step of adding a first abnormal area record to the data file of the abnormal area or updating a second abnormal area record in the data file of the abnormal area includes:
9. The method of claim 8, comprising the steps of: when the electronic device passes through the at least one cell, obtaining at least one of the following information: a time of entering the abnormal area, a time of leaving the abnormal area, and a duration of the abnormal area; and 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, wherein 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.
11. After the target application receives the first indication information and caches data of the target application based on a second cache policy, the method includes: when the electronic device is in an abnormal area, using at least one of the following manners: downloading the data of the target application at a third download rate, the third download rate being smaller than the first download rate; downloading the data of the target application at a third bit rate, the third bit rate being equal to or smaller than the second bit rate; downloading the data of the target application at a third resolution, the third resolution being equal to or smaller than the second resolution; downloading the data of the target application at a third frame rate, the third frame rate being equal to or smaller than the second frame rate; and requesting the data of the target application by using a third request number, the third request number being the number of requests within a unit time, the third request number being equal to or smaller than the first request number; caching the data of the target application according to the first caching policy after leaving the abnormal area; The method of claim 1 further comprising:
12. The step of caching the data of the target application based on the first cache policy includes the step of stopping caching the data of the target application when a playback period of the amount of the data of the target application cached based on the first cache policy is greater than a first preset period; 2. The method of claim 1, wherein caching the data of the target application based on a second cache policy includes continuing to cache the data of the target application when a playback period of the amount of the data of the target application cached based on the second cache policy is greater than the first preset period.
13. After the target application receives the first indication information, caching data of the target application based on a second cache policy includes: In response to receiving the first indication, caching the data of the target application based on the second cache policy; and / or starting caching data of the target application based on a second cache policy within a second preset period during which the first indication information is received, the second preset period being less than one second; The method of claim 1 , comprising:
14. The first indication information further includes first time information, and the first time information is used to indicate a time when the abnormal area is entered; and / or The first indication information further includes second time information, and the second time information is used to indicate a time of leaving the abnormal area; and / or The method of claim 1 , wherein the first indication information further includes third time information, and the third time information is used to indicate a duration of the abnormal area.
15. The method of claim 14, wherein the step of caching data of the target application based on a second cache policy after the target application receives the first instruction information includes the step of caching, by the target application based on the second cache policy after receiving the first instruction information, the data of the target application having a playback period of a third preset period, wherein the third preset period is a period obtained based on the first time information and the second time information, or the third preset period is a period indicated by the third time information.
16. the target application is a video application, and the second cache policy 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 bit rate, downloading the data of the target application at a second resolution, downloading the data of the target application at a second frame rate, and requesting the data of the target application by using a second request count, the second request count being a number of requests within a unit time, the second request count being greater than the first request count; or 2. The method of claim 1, wherein the target application is an audio application, and the second cache policy includes at least one of the following: downloading the data of the target application at the second download rate, requesting the data of the target application by using the second request count, downloading the data of the target application at a second sampling frequency, downloading the data of the target application by using a second sampling bit number, and downloading the data of the target application by using a second number of sound channels.
17. An electronic device including a transceiver, a processor and a memory, 17. An electronic device, wherein the memory is configured to store a computer program, and wherein the processor calls the computer program to execute the method of any one of claims 1 to 16.
18. 1. A computer storage medium, comprising:
17. A computer storage medium storing a computer program which, when executed by a processor, implements the method of any one of claims 1 to 16.
Citation Information
Patent Citations
Browser system
JP2011128700A
Buffer Management by Network Recommendation of Service Applications in Wireless Devices
JP2018522441A
System and method for cooperative control of applications
JP2018523383A
Predictive caching
US20190342419A1