WO2022052852A1 - 数据缓存方法及电子设备 - Google Patents

数据缓存方法及电子设备 Download PDF

Info

Publication number
WO2022052852A1
WO2022052852A1 PCT/CN2021/116165 CN2021116165W WO2022052852A1 WO 2022052852 A1 WO2022052852 A1 WO 2022052852A1 CN 2021116165 W CN2021116165 W CN 2021116165W WO 2022052852 A1 WO2022052852 A1 WO 2022052852A1
Authority
WO
WIPO (PCT)
Prior art keywords
abnormal area
data
target application
information
abnormal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2021/116165
Other languages
English (en)
French (fr)
Inventor
杨锐
窦凤辉
金辉
杨海泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202180054920.XA priority Critical patent/CN116235535A/zh
Priority to JP2023515719A priority patent/JP7609380B2/ja
Priority to EP21865906.8A priority patent/EP4199575A4/en
Publication of WO2022052852A1 publication Critical patent/WO2022052852A1/zh
Priority to US18/180,967 priority patent/US20230232065A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0231Traffic management, e.g. flow control or congestion control based on communication conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/38Flow control; Congestion control by adapting coding or compression rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44209Monitoring of downstream path of the transmission network originating from a server, e.g. bandwidth variations of a wireless network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0226Traffic management, e.g. flow control or congestion control based on location or mobility
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0231Traffic management, e.g. flow control or congestion control based on communication conditions
    • H04W28/0236Traffic management, e.g. flow control or congestion control based on communication conditions radio quality, e.g. interference, losses or delay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/18Communication route or path selection, e.g. power-based or shortest path routing based on predicted events

Definitions

  • the present application relates to the technical field of electronic devices, and in particular, to a data caching method and electronic device.
  • the embodiments of the present application disclose a data caching method and an electronic device, which can try to avoid a situation where a user cannot normally use online applications such as audio and video when passing through an area with abnormal network services, and improve user experience.
  • an embodiment of the present application provides a data caching method, which is applied to an electronic device, where the electronic device includes a target application and a control component, and the method includes: the electronic device runs the target application, and uses a first caching strategy to cache For the data of the target application, the first caching strategy includes at least one of the following: using a first download rate to download the data of the target application, using a first bit rate to download the data of the target application, using a first resolution to download the target application
  • the data of the target application is downloaded using the first frame rate, and the data of the target application is requested using the first number of requests, where the first number of requests is the number of requests per unit time; the first type of data and the second type of data are cached , the above-mentioned first type is different from the above-mentioned second type; the data of the above-mentioned target application is downloaded using the first sampling frequency, the data of the above-mentioned target application is downloaded using the first sampling number of digits, and
  • the number of times to request the data of the target application is the number of requests per unit time, and the number of times of the second request is greater than the number of times of the first request; the data of the first type is cached and the data of the second type is not cached;
  • the data of the target application is downloaded at two sampling frequencies, and the second sampling frequency is lower than the first sampling frequency; the data of the target application is downloaded using the second sampling number of bits, and the second sampling number of bits is smaller than the first sampling number of bits;
  • the second channel number downloads the data of the target application, and the second channel number is smaller than the first channel number.
  • the first indication information is used to indicate that there is an abnormal area in the forward direction of the electronic device, and the abnormal area is at least one of the following areas: an area where the signal quality is lower than a preset threshold; an area where the network is disconnected; Dropping the standard means that the first network standard is changed to a second network standard lower than the above-mentioned first network standard; the area where the quality of experience QoE is lower than the first QoE level.
  • the target application uses different caching strategies to cache the data of the target application before and after receiving the first indication information, wherein the usage duration of the amount of data downloaded per unit time using the first caching strategy before receiving the first indication information , less than, the usage duration of the amount of data downloaded in a unit time using the second cache strategy after receiving the first indication information. That is to say, after receiving the first indication information for indicating that there is an abnormal area in the forward direction, the target application uses the second caching strategy to cache data, thereby increasing the usage time of the amount of data downloaded per unit time, so as to minimize the It may allow users to use the target application normally when they pass through abnormal areas, avoid business freezes, and improve user experience.
  • the method further includes: the above-mentioned target application sends a registration message to the above-mentioned control component; the above-mentioned registration message is used to obtain the above-mentioned first indication information Indication information, the first indication information is used to indicate that there is an abnormal area in the forward direction of the electronic device, and the abnormal area is at least one of the following areas: an area where the signal quality is less than a preset threshold value; an area where the network is disconnected; an area where the system is dropped , the above-mentioned dropped standard means that the first network standard is changed to a second network standard lower than the above-mentioned first network standard; the area where the quality of experience QoE is lower than the first QoE level.
  • the target application that receives the first indication information and uses the second caching strategy to cache data is an application that sends a registration message to the control component. Therefore, the target application can independently choose whether to receive the first indication information and use the second The caching strategy caches data, and the flexibility of implementation is greatly increased.
  • a first location exists between the abnormal area and the current location, and no other cell exists between the current location and the first location, and the first location refers to the control component sending the first indication information or, the above-mentioned abnormal area is an area whose distance from the current location is within the first distance range.
  • the distance between the current location and the abnormal area is not too close.
  • the time to reach the abnormal area will not be too short (for example, it will not be 0), and more data will be downloaded, so that the target application can be used normally when passing through the abnormal area as much as possible, avoiding business freezes, and improving user experience.
  • the method further includes: when the duration of entering the abnormal area from the current position of the electronic device is within a first preset time range, the control component sends the first indication information to the target application.
  • the duration for which the target application uses the second caching strategy to cache data is within the first preset time range, and the duration for which the target application uses the second caching strategy to cache data can be realized by controlling the first preset time range. control.
  • 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 reduced to reduce the excessive power consumption caused by the target application using the second download rate to download data. For example When the duration of the abnormal area is long, the first preset time range can be increased, so that the target application can be used normally when passing through the abnormal area as much as possible, so as to avoid business freezes and improve user experience.
  • the above-mentioned target application sends a registration message to the above-mentioned control component, including: the above-mentioned target application sends the above-mentioned registration information to the above-mentioned control component when detecting that the above-mentioned target application is switched from running in the background to running in the foreground or started .
  • the target application may send a registration message to the control component when it is in use, so that the control component only sends the first indication information when the target application is in use, so as to avoid adopting the second caching strategy when the target application is not in use
  • Cached data may cause excessive power consumption, poor definition of viewing content, and incomplete viewing content, which may affect the user experience.
  • the method further includes: acquiring current cell information of the electronic device; determining whether there is an abnormal area record corresponding to the current cell information in a data file of the abnormal area;
  • the above-mentioned control component generates the above-mentioned first indication information; or, obtains the current location information of the above-mentioned electronic device; determines whether there is an abnormal area record corresponding to the above-mentioned current location information in the data file of the above-mentioned abnormal area;
  • the above-mentioned control component In the case of the above-mentioned abnormal area, the above-mentioned control component generates the above-mentioned first indication information; or obtains the above-mentioned current cell information and the above-mentioned current location information of the above-mentioned electronic device; in the data file of the above-mentioned abnormal area, it is determined whether there is a corresponding and above-mentioned current cell information and Recording of the abnormal area corresponding to the above-mentione
  • the method further includes: determining whether there is an abnormal area record corresponding to the above-mentioned current cell information in the data file of the abnormal area; if the above-mentioned abnormal area record exists, the above-mentioned control component generates the above-mentioned abnormal area record.
  • the first indication information; the above-mentioned current location information is used to determine the time to send the above-mentioned first indication information.
  • the electronic device can obtain the current cell information to determine whether to generate the first indication information, which can be applied to a variety of scene, the usability is good.
  • the method further includes: acquiring information that the electronic device passes through a cell; when a service abnormality notification event is detected, determining whether the electronic device passes through a cell before the second preset time range in the information about the electronic device passing through the cell.
  • the area record or the above-mentioned second abnormal area record includes the information of the above-mentioned at least one cell; the above-mentioned service abnormality notification event is used to indicate at least one of the following information: the signal quality is lower than the preset threshold, the network is disconnected, and the first network standard is changed to be lower than the above-mentioned
  • the second network standard of the first network standard, the QoE is lower than the first QoE level; or, when the above-mentioned service abnormality notification event is detected, the location information of the above-mentioned electronic device is obtained, and the data file of the above-mentioned abnormal area is added.
  • the area record, or the fourth abnormal area record in the data file of the abnormal area is updated, and the location information in the third abnormal area record or the fourth abnormal area
  • the data file of the abnormal area is used to generate the first indication information, that is, used to determine whether there is an abnormal area in the forward direction.
  • the electronic device can update the data file of the abnormal area according to the currently acquired information when detecting the business abnormality notification event. Increase the accuracy of judging whether there is an abnormal area, try to avoid using the second caching strategy to cache data when there is no abnormal area or not detect when there is an abnormal area, and improve the user experience.
  • the first abnormal area record when passing through the at least one cell, is added to the data file of the abnormal area, or the second abnormal area record in the data file of the abnormal area is updated. , including: in the case of passing through the above-mentioned at least one cell, obtaining the location information of the above-mentioned electronic equipment, and adding the first abnormal area record in the data file of the above-mentioned abnormal area, or updating the data file of the above-mentioned abnormal area.
  • the second abnormal area in the data file is updated
  • the area record, the first abnormal area record or the second abnormal area record includes the information of the at least one cell, and the location information in the first abnormal area record or the second abnormal area record is obtained according to the location information of the electronic device. of.
  • the abnormal area record in the data file of the abnormal area may not only be obtained according to the updated cell information, but also may be obtained according to the location information.
  • the electronic device can generate the first indication information according to the real-time location information and the location information recorded in the abnormal area in the data file of the abnormal area, thereby increasing the accuracy of judging whether there is an abnormal area, and trying to avoid the abnormal area.
  • the second caching strategy is used to cache data or when there is an abnormal area that is not detected, the user experience is improved.
  • the first abnormal area record is added to the data file of the abnormal area, or the second abnormal area record in the data file of the abnormal area is updated. , including: in the case of passing through the at least one cell, obtaining at least one of the following information: the time of entering the above-mentioned abnormal area, the time of leaving the above-mentioned abnormal area, and the duration of the above-mentioned abnormal area; adding in the data file of the above-mentioned abnormal area
  • the first abnormal area record, or the second abnormal area record in the data file of the above-mentioned abnormal area is updated; the time of entering the abnormal area in the above-mentioned first abnormal area record or the above-mentioned second abnormal area record is based on the above-mentioned entry into the above-mentioned abnormal area.
  • the time obtained from the above-mentioned first abnormal area record or the above-mentioned second abnormal area record The duration of the abnormal area in the abnormal area record is obtained
  • the abnormal area record in the data file of the abnormal area may further include the time information of entering the abnormal area, the time information of leaving the abnormal area, and the duration information of the abnormal area in the historical records.
  • the control component can refer to the above information in the database file of the abnormal area for generating the first indication information and sending the first indication information, so as to assist in judging the actual time of entering the abnormal area, the time of leaving the abnormal area, and the duration of the abnormal area, thereby increasing the In order to determine the accuracy of whether there is an abnormal area, try to avoid using the second caching strategy to cache data when there is no abnormal area or not detect when there is an abnormal area, so as to improve the user experience.
  • the method further includes: when the electronic device is in the abnormal area , adopt at least one of the following methods: use a third download rate to download the data of the above-mentioned target application, and the above-mentioned third download rate is smaller than the above-mentioned first download rate; use the above-mentioned third code rate to download the data of the above-mentioned target application, the above-mentioned third code rate is less than or equal to the above-mentioned second bit rate; use the above-mentioned third resolution to download the data of the above-mentioned target application, and the above-mentioned third resolution is less than or equal to the second resolution; use the above-mentioned third frame rate to download the data of the above-mentioned target application, the above-mentioned first The third frame rate is less than or equal to the above-mentioned second
  • the target application when the electronic device is in an abnormal area, the target application can further reduce parameters such as the resolution, bit rate, and frame rate of the downloaded data, so as to increase the usage time of the downloaded data per unit time, so as to minimize the It is possible to enable users to use the target application even in the abnormal area.
  • the first caching strategy is resumed to cache the data of the target application, so that the user can continue to use the target application normally.
  • using the first caching strategy to cache the data of the target application includes: when the playback duration of the data amount of the target application cached by using the first caching strategy is greater than the first preset duration, Stopping the caching of the data of the target application; the caching of the data of the target application by adopting the second caching strategy includes: when the playback duration of the data amount of the target application cached by adopting the second caching strategy is greater than the first preset duration, Continue to cache the data of the above target application.
  • the usage duration of the data cached by the target application using the first caching strategy is shorter than the usage duration of the data cached by the target application using the second caching strategy. Therefore, when there is an abnormal area in the forward direction, the target application can use the second caching strategy to cache data, so that the user can use the target application for a longer period of time when passing through the abnormal area, try to avoid business freezes, and improve user experience.
  • using the second caching strategy to cache the data of the target application after the target application receives the first indication information includes: in response to receiving the first indication information, using the first indication information The second cache strategy caches the data of the target application; and/or, within a second preset time period of receiving the first indication information, the step of using the second cache strategy to cache the data of the target application is started, and the second cache strategy is used to cache the data of the target application. Set the duration to be less than 1 second.
  • the target application uses the second caching strategy to cache the data of the target application within a short period of time, so that the usage time of the cached data is as long as possible before entering the abnormal area, so that the user can
  • the target application is used for a longer period of time when passing through the abnormal area, so as to avoid business freezes as much as possible and improve the user experience.
  • the above-mentioned first indication information further includes: first time information, where the above-mentioned first time information is used to indicate the time for entering the above-mentioned abnormal area; and/or, the above-mentioned first indication information further includes: the first time information Second time information, the second time information is used to indicate the time of leaving the abnormal area; and/or the first indication information further includes: third time information, the third time information is used to indicate the duration of the abnormal area .
  • the first indication information may further include the detailed time of entering the abnormal area, the time of leaving the abnormal area, or the duration of the abnormal area, and the target application may select the second caching strategy according to the first indication information, for example, abnormal When the duration of the region is longer, the second download rate can be a little larger to download more data.
  • the flexibility of implementation is greatly increased, and the availability is high.
  • using a second caching strategy to cache the data of the above-mentioned target application includes: after the above-mentioned target application receives the above-mentioned first indication information, The data of the target application whose playback duration is a third preset duration is cached using the second caching strategy, wherein the third preset duration is the duration obtained according to the first time information and the second time information, or, the above The third preset duration is the duration indicated by the third duration information.
  • the playback duration of the data downloaded by the target application before entering the abnormal area may be equal to the duration of the abnormal area, thereby ensuring that the target application can be used normally when the user passes through the abnormal area.
  • the above-mentioned target application is a video application
  • the above-mentioned second caching strategy includes at least one of the following: using the above-mentioned second download rate to download the data of the above-mentioned target application, and using the above-mentioned second bit rate to download the above-mentioned target application
  • the data of the above-mentioned target application is downloaded by the above-mentioned second resolution
  • the data of the above-mentioned target application is downloaded by the above-mentioned second frame rate
  • the data of the above-mentioned target application is requested by the above-mentioned second number of requests; or, the above-mentioned target application is an audio application.
  • the above-mentioned second caching strategy includes at least one of the following: using the above-mentioned second download rate to download the data of the above-mentioned target application, using the above-mentioned second request times to request the data of the above-mentioned target application, and using the above-mentioned second sampling frequency to download the data of the above-mentioned target application , using the second sampling bit number to download the data of the target application, and using the second channel number to download the data of the target application.
  • the embodiments of the present application can be applied to different target applications, such as video applications and audio applications, and for different applications, the second caching strategy can be different, the application scenarios are more extensive, and the usability is high.
  • an embodiment of the present application provides a chip, the chip includes at least one processor and an interface circuit, and optionally, the chip further includes a memory; the memory, the interface circuit, and the at least one processor are interconnected through a line , a computer program is stored in the above-mentioned memory; when the above-mentioned computer program is executed by the above-mentioned at least one processor, it is realized: receiving a registration message sent by the target application; the above-mentioned registration message is used to register the first notification event; The indication information is used to indicate that there is an abnormal area in the forward direction of the chip, and the abnormal area is at least one of the following areas: an area where the signal quality is less than a preset threshold, an area where the network is disconnected, an area where the system is dropped, and the quality of experience QoE is less than the first area.
  • the above-mentioned dropped standard is that the first network standard is changed to a second network standard lower than the above-mentioned first network standard; the above-mentioned first indication information is sent to the above-mentioned target application registered with the above-mentioned first notification event.
  • the chip may send first indication information to the target application registered with the first notification time, where the first indication information is used to indicate that there is an abnormal area in the forward direction, so that the target application can make a decision based on the first indication information
  • Corresponding actions such as increasing the download rate, make it possible for the user to use the target application normally when passing through the abnormal area as much as possible, to avoid service freezes, and to improve the user experience.
  • the chip when the chip generates the first indication information, it specifically implements: acquiring current cell information; determining whether there is an abnormal area record corresponding to the above-mentioned current cell information in the data file of the abnormal area; In the case of an abnormal area, the above-mentioned control component generates the above-mentioned first indication information; or, obtains the current location information; determines whether there is an abnormal area record corresponding to the above-mentioned current location information in the data file of the above-mentioned abnormal area; In the case of the above-mentioned control component, the above-mentioned first indication information is generated; or, the above-mentioned current cell information and the above-mentioned current location information are obtained; in the data file of the above-mentioned abnormal area, it is determined whether there is a corresponding to the above-mentioned current cell information and the above-mentioned current location information Corresponding abnormal area record; when the abnormal area exists, the control component generates the first
  • the above-mentioned chip when the above-mentioned chip generates the first indication information, it is specifically implemented: obtain the current cell information and current location information of the above-mentioned chip; and determine whether there is a data file corresponding to the above-mentioned current cell information in the data file of the abnormal area.
  • Abnormal area record when the abnormal area record exists, the control component generates the first indication information; the current location information is used to determine the time to send the first indication information.
  • the chip can obtain the current cell information to determine whether to generate the first indication information, which is applicable to various scenarios , the usability is better.
  • the above-mentioned chip is further configured to: obtain the information that the above-mentioned chip passes through a cell; when a service abnormality notification event is detected, determine whether the above-mentioned chip passes through the cell before the second preset time range.
  • the area record or the above-mentioned second abnormal area record includes the information of the above-mentioned at least one cell; the above-mentioned service abnormality notification event is used to indicate at least one of the following information: the signal quality is lower than the preset threshold, the network is disconnected, and the first network standard is changed to be lower than the above-mentioned
  • the second network standard of the first network standard, the QoE is lower than the first QoE level; or, when the above-mentioned service abnormality notification event is detected, the location information of the above-mentioned chip is obtained, and the data file of the above-mentioned abnormal area is added.
  • a third abnormal area is added record or update the fourth abnormal area record in the data file of the abnormal area, and the location information in the third abnormal area record or the fourth abnormal
  • the data file of the abnormal area is used to generate the first indication information, that is, used to determine whether there is an abnormal area in the forward direction.
  • the chip can update the data file of the abnormal area according to the currently obtained information when detecting the business abnormality notification event, and the data source in the data file of the abnormal area used to generate the first indication information is real, reliable, timely and effective, thereby greatly increasing the In order to determine the accuracy of whether there is an abnormal area, try to avoid using the second caching strategy to cache data when there is no abnormal area or not detect when there is an abnormal area, so as to improve the user experience.
  • the first abnormal area record is added to the data file of the abnormal area, or the second abnormal area in the data file of the abnormal area is updated.
  • recording it is specifically implemented: in the case of passing through the above at least one cell, the location information of the above-mentioned chip is obtained, and the first abnormal area record is added to the data file of the above-mentioned abnormal area, or the data file of the above-mentioned abnormal area is updated.
  • Two abnormal area records; the first abnormal area record or the second abnormal area record includes the information of the at least one cell, and the location information in the first abnormal area record or the second abnormal area record is based on the location information of the chip owned.
  • the abnormal area record in the data file of the abnormal area may not only be obtained according to the updated cell information, but also may be obtained according to the location information.
  • the chip can generate the first indication information according to the real-time location information and the location information recorded in the abnormal area in the data file of the abnormal area, thereby increasing the accuracy of judging whether there is an abnormal area and avoiding the absence of the abnormal area as much as possible.
  • the second caching strategy is used to cache data in an abnormal area or if there is an abnormal area that is not detected, the user experience is improved.
  • the first abnormal area record is added to the data file of the abnormal area, or the second abnormal area in the data file of the abnormal area is updated.
  • recording it is specifically implemented: in the case of passing through the above-mentioned at least one cell, obtain at least one of the following information: the time of entering the above-mentioned abnormal area, the time of leaving the above-mentioned abnormal area, the duration of the above-mentioned abnormal area; the data in the above-mentioned abnormal area
  • the first abnormal area record is added to the file, or the second abnormal area record in the data file of the above-mentioned abnormal area is updated; the time for entering the abnormal area in the above-mentioned first abnormal area record or the above-mentioned second abnormal area record is based on the above-mentioned
  • the time of leaving the abnormal area is obtained, or, the time of leaving the abnormal area in the above-mentioned first abnormal area record or the above-mentioned second abnormal
  • the abnormal area record in the data file of the abnormal area may further include the time information of entering the abnormal area, the time information of leaving the abnormal area, and the duration information of the abnormal area in the historical records.
  • the control component can refer to the above information in the database file of the abnormal area for generating the first indication information and sending the first indication information, so as to assist in judging the actual time of entering the abnormal area, the time of leaving the abnormal area, and the duration of the abnormal area, thereby increasing the In order to determine the accuracy of whether there is an abnormal area, try to avoid using the second caching strategy to cache data when there is no abnormal area or not detect when there is an abnormal area, so as to improve the user experience.
  • the chip is further configured to: receive a deregistration message sent by the target application; and the deregistration message is used to deregister the first notification event.
  • the target application can send a deregistration message to the chip when it does not need to obtain the first indication information, that is, the target application can independently choose whether to receive the first indication information, which greatly increases the flexibility of implementation.
  • an embodiment of the present application provides an electronic device, including a transceiver, a processor, and a memory; the above-mentioned memory is used to store computer program codes, and the above-mentioned computer program codes include computer instructions, and the above-mentioned processor invokes the above-mentioned computer instructions to make
  • the above-mentioned user equipment executes the data caching method provided by the first aspect and any one of the implementation manners of the first aspect in the embodiments of the present application.
  • an embodiment of the present application provides a computer storage medium, where the computer storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, is used to execute the first step in the embodiment of the present application.
  • a data caching method provided by any implementation manner of the first aspect.
  • the embodiments of the present application provide a computer program product that, when the computer program product runs on a communication device, enables the communication device to perform any one of the first aspect and the first aspect in the embodiments of the present application.
  • the data caching method provided by the method.
  • an embodiment of the present application provides an electronic device, where the electronic device includes executing the method or apparatus described in any embodiment of the present application.
  • the above-mentioned electronic device is, for example, a chip.
  • the electronic device provided by the third aspect, the computer storage medium provided by the fourth aspect, the computer program product provided by the fifth aspect, and the electronic device provided by the sixth aspect are all used to execute the data provided by the first aspect. cache method. Therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects of the data caching method provided in the first aspect, which will not be repeated here.
  • FIGS. 1A to 1M are schematic diagrams of some application scenarios provided by embodiments of the present application.
  • FIGS. 2 to 4 are schematic structural diagrams of some electronic devices provided by embodiments of the present application.
  • FIG. 5 is a schematic flowchart of a data caching method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another application scenario provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a learning process provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a prediction process provided by an embodiment of the present application.
  • FIG. 13 is a schematic flowchart of another data caching method provided by an embodiment of the present application.
  • Network service anomalies may include, but are not limited to: no network signal (ie, network disconnection), falling to a low network standard (for example, falling from the fifth generation mobile networks (5G) to the third generation mobile communication technology (3rd-generation, 3G)), the signal quality is poor, and the application experience quality is poor.
  • no network signal ie, network disconnection
  • 5G fifth generation mobile networks
  • 3rd-generation, 3G third generation mobile communication technology
  • the poor signal quality may be that the parameters used to characterize the signal quality (hereinafter referred to as signal quality parameters) do not meet the preset conditions, for example, the signal-to-noise ratio, reference signal receiving power (RSRP), reference signal receiving quality ( The reference signal receiving quality, RSRQ) is less than the preset threshold, and the packet loss rate is greater than the preset threshold.
  • the application experience quality is poor, for example, the quality of experience (quality of experience, QoE) is lower than the first QoE level. Among them, the lower the QoE level, the worse the user experience.
  • the QoE level includes three: 0, 1, 2, 0 means poor user experience, 1 means average user experience, 2 means good user experience, and the first QoE level is 2 , an abnormal area is an area with a QoE rating of 0 or 1.
  • the user opens the video application of the electronic device 100 before leaving home, and watches videos through the video application during the journey from home to the company.
  • the normal area may be the coverage area of a normal cell.
  • the user's electronic device 100 can access the normal cell and can be used normally.
  • the video application of the electronic device 100 does not freeze or the freeze time is short (eg, less than 3 seconds) when playing the video.
  • the abnormal area may be a coverage area of an abnormal cell, a weak coverage area of a normal cell, or a non-coverage area.
  • abnormal cells cannot provide normal network services for electronic devices, for example, they cannot provide networks for electronic devices or can only provide 2Generation wireless telephone technology (2G) networks for electronic devices. Therefore, when the user passes through the abnormal area, the electronic device 100 cannot be used normally. For example, the video application of the electronic device 100 freezes for a long time (eg, more than 20 seconds) or fails to play the video.
  • 2G 2Generation wireless telephone technology
  • the electronic device 100 may display the user interface 110 of the video application.
  • the user interface 110 may include a signal quality indicator 111 , a time indicator 112 , black dots 113 , and gray dots 114 .
  • the signal quality identifier 111 is used to indicate that the electronic device 100 is currently accessing a 5G network with a signal grid number of 5 (ie, full grid), and the signal quality is good at this time.
  • the time mark 112 is "15:00/48:52", wherein "48:52” is used to indicate that the total duration of the video currently played by the video application (that is, the 17th episode video) is 48 minutes and 52 seconds, and "15:00 " is used to indicate that the currently playing picture of the video application is the picture of the video at 15 minutes.
  • the black dots 113 are used to indicate that the current playback has reached 15 minutes.
  • the gray dot 114 is used to indicate that the current cache is up to 15 minutes and 30 seconds.
  • the video application may use a first caching strategy to cache video data, where the first caching strategy includes at least one of the following: using a first download rate to download the data of the target application, using a first bit rate to download all data the data of the target application, use the first resolution to download the data of the target application, use the first frame rate to download the data of the target application, and use the first number of requests to request the data of the target application, and the first number of requests is The number of requests per unit time.
  • the first download rate is to download video data with a playback duration of 10 seconds per second.
  • the first usage duration and the second usage duration may also be other values.
  • the electronic device 100 when the user passes through the first normal area, the electronic device 100 is connected to a 5G network with a signal grid number of 5 (ie, full grid), and the signal quality is good.
  • the video application of the electronic device 100 adopts the above-mentioned No. A caching strategy caches video data.
  • the currently cached duration in the user interface 110 is 15 minutes and 30 seconds, and the currently played duration is 15 minutes, and the difference between the two is equal to 30 seconds. Therefore, 30 seconds have elapsed from this moment, that is, during the process of the user traveling from the normal point A to the normal point B, the first download rate is maintained as the video data with the duration of 10 seconds downloaded per second.
  • the black dots 113 and the gray dots 114 in the user interface 110 move, and the time mark 112 also changes.
  • the black dots 113 in the user interface 110 are used to indicate that the current playback has reached 15 minutes and 30 seconds
  • the gray dots 114 are used to indicate that the current buffer has reached 20 minutes and 30 seconds.
  • the black dots 113 and the gray dots 114 in the user interface 110 move, and the time mark 112 also changes.
  • the black dot 113 is used to indicate that the current playback has reached 29 minutes and 30 seconds
  • the gray dot 114 is used to indicate that the current buffer has reached 30 minutes, and the difference between the two is equal to 30 seconds. Therefore, in the next 30 seconds, that is, when the user travels from the normal point C to the abnormal point, 5 minutes of video data will be downloaded.
  • the black dots 113 in the user interface 110 are used to indicate that the current playback has reached 30 minutes, and the gray dots 114 are used to indicate that the current buffer has reached 35 minutes.
  • the signal quality indicator 111 in the user interface 110 is used to indicate that the electronic device 100 cannot access the network and the network is disconnected. At this time, the rate of downloading video data is 0.
  • the black dot 113 in the user interface 110 moves and the time mark 112 also changes.
  • the gray circle 114 in the user interface 110 does not move.
  • the black dots 113 in the user interface 110 are used to indicate that the current playback has reached 35 minutes, and the gray dots 114 still indicate that the current buffer has reached 35 minutes.
  • the black dots 113 and the gray dots 114 coincide.
  • the gray dot 114 in the user interface 110 cannot move, so the user cannot continue to watch the video, nor can the black dot 113 and the time marker 112 move.
  • the signal quality indicator 111 in the user interface 110 is used to indicate that the electronic device 100 is connected to a 5G network with 5 signal bars (ie, full bars), and the signal quality is relatively low. OK, therefore, the video data can be continued to be downloaded by adopting the above-mentioned first caching strategy, and the gray circle 114 can be moved. At this time, the gray dot 114 can be used to indicate that the current cache is 35 minutes and 30 seconds.
  • the video application of the electronic device 100 can continue to work normally using the above-mentioned first caching strategy, and the user can also continue to watch through the video application. video.
  • the black dot 113 in the user interface 110 displayed by the electronic device 100 is used to indicate that the current playback has reached 35 minutes and 30 seconds.
  • the embodiments of the present application provide a data caching method, which can be applied to electronic devices, and can also be applied to chips or processing systems in electronic devices, such as Huawei mobile services (huawei mobile services, HMS), Android (Android) )system.
  • the electronic device can perform service abnormality prediction during the user's travel, and when it is predicted that the abnormal area is about to be entered, the electronic device performs a pre-cache operation for the target application.
  • the target application is an application that sends a registration message to the control component of the system during installation or running, and the registration message is used to obtain the first indication information sent by the control component and used to indicate that there is an abnormal area in the forward direction.
  • the control component may be a component in a processing system, such as a Huawei inter-device communication mobile service (huawei mobile services hi device to device, HMS HiD2D) in an HMS system, a processing module in an Android system, and the like.
  • the control component may also be a chip or a module in a chip, eg a module in a modem chip.
  • the pre-cache operation may include at least one of the following: increasing the download rate, reducing the amount of data used by the download data in a unit time, and increasing the number of requests per unit time.
  • Increasing the download rate may include increasing the number of requests per unit time and increasing the amount of data per request.
  • reducing the amount of data used by the downloaded data in a unit time may be: reducing the amount of data played by the downloaded video data in a unit time, for example, reducing the resolution, frame rate, code, etc. of the downloaded video data. Rate.
  • reducing the amount of data used by the downloaded data in a unit time may also be: reducing the amount of data played by the downloaded audio data in a unit time, for example, reducing the sampling rate and the number of sampling bits of the downloaded audio data. , the number of channels.
  • the user can use the target application in the electronic device 100 normally during the period of passing through the abnormal area as much as possible. Improve user experience.
  • the following describes the process of executing the data caching method of the embodiment of the present application.
  • the commute route please refer to the route shown in FIG. 1A-FIG. 1C.
  • the user opens the video application of the electronic device 100 before leaving home.
  • the video application sends a registration message to the control component in the electronic device 100 to obtain the first indication information.
  • the control component continues to perform the prediction process and obtains the first indication information.
  • the prediction process refer to the embodiments shown in FIG. 8 to FIG. 13 below, which will not be described in detail for the time being.
  • the electronic device 100 When the user passes through the first normal area, the electronic device 100 is connected to a 5G network with a signal grid number of 5 (ie, full grid), and the signal quality is good.
  • the process when the user travels from home to the normal point C (that is, when the user is in the first normal area) is the same as the process shown in FIG. 1A , for details, please refer to the description of FIG. 1A .
  • the first indication information may include type, optionally, a first time t 1 , optionally a second time t 2 , and optionally a third time t 3 .
  • the first value of type indicates that there is an abnormal area, and the value of type is the second value to indicate that the previously sent broadcast message is invalid.
  • t 1 can be the moment of entering the abnormal area, or the time period from the current position to entering the abnormal area (that is, the time period from the normal point C to the abnormal point is 30 seconds).
  • t 2 can be the moment of leaving the abnormal area, or the time period from the current position to leaving the abnormal area.
  • t 3 can be the time period from entering the abnormal area to leaving the abnormal area (ie, the time period from the abnormal point to the recovery point), that is, the duration of the abnormal area.
  • the video application receives the first indication information sent by the control component, and in response to the first indication information, performs a pre-cache operation, optionally, within a preset execution duration (for example, 5 ms, 10 ms, 1 seconds, 3 seconds, etc.), perform a pre-cache operation.
  • a preset execution duration for example, 5 ms, 10 ms, 1 seconds, 3 seconds, etc.
  • the data of the video application is cached using a second caching strategy, wherein the second caching strategy includes at least one of the following: using a second download rate to download the data of the target application, and using a second bit rate to download the target application
  • the data of the target application is downloaded using the second resolution
  • the data of the target application is downloaded using the second frame rate
  • the data of the target application is requested using the second number of requests, which is the number of requests per unit time.
  • the second download rate is higher than the first download rate
  • the second bit rate is lower than the first bit rate
  • the second resolution is lower than the first resolution
  • the second frame rate is lower than the first frame rate
  • the second number of requests is greater than the number of first requests.
  • the pre-cache operation is to increase the download rate to a preset multiple of the original rate (for example: 1.8 times, 3 times, etc.), taking the preset multiple of 3 times as an example, the download time is 30 seconds of video data per second , and after downloading the content whose cache reaches the first usage time, the cache will not be stopped, but will continue to be cached.
  • the video application uses the second caching strategy to cache the video data.
  • 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 and the second frame rate are the same or the second frame rate is less than The first frame rate, the first code rate and the second code rate are the same or the second code rate is smaller than the first code rate.
  • the number of times of requesting data per unit time may be greater, that is, the number of times of second requests is greater than the number of times of first requests.
  • the second download rate being greater than the first download rate may be specifically: the number of times of the second requests is greater than the number of times of the first requests.
  • the electronic device can adjust one or more parameters of download rate, bit rate, frame rate, resolution, and the number of times of requesting data per unit time, and the electronic device can adjust any combination of these five parameters.
  • the video application performs the above-mentioned pre-cache operation when the user travels from the normal point C to the abnormal point (ie, within t 1 )
  • video data with a duration of 15 minutes is downloaded within t 1 . Therefore, when the user reaches the abnormal point, the black dots 113 in the user interface 110 are used to indicate that the current playback has reached 30 minutes, and the gray dots 114 are used to indicate that the current buffer has reached 45 minutes.
  • the cached content ( 15 minutes) is longer than the first preset duration (300s).
  • the video application downloads the video data at a third download rate, and the third download rate is lower than the first download rate, or downloads the video data at a third bit rate, and the third bit rate is less than or equal to
  • the second bit rate or, use a third resolution to download video data, and the third resolution is less than or equal to the second resolution, or, use a third frame rate to download video data, and the third frame rate is less than or equal to the second frame rate , or download the video data by adopting the third number of requests, where the third number of requests is the number of requests within a unit time, and the number of third requests is less than or equal to the number of first requests.
  • the signal quality indicator 111 in the user interface 110 is used to indicate that the electronic device 100 cannot access the network and the network is dropped, so the third download rate is 0.
  • the user may also drop to a low network standard when passing through the abnormal area.
  • the user interface displayed by the electronic device 100 is, for example, the user interface 110 shown in FIG. 1E .
  • the user interface 110 The signal quality indicator 111 in is used to represent a 2G network with a signal grid number of 5 grids (that is, full grids) accessed by the electronic device.
  • the signal quality may also be poor.
  • the user interface displayed by the electronic device 100 is, for example, the user interface 110 shown in FIG. 1F . It is used to characterize a 5G network with a signal grid of 1 grid connected to an electronic device.
  • the application experience quality may also be poor.
  • the user interface displayed by the electronic device 100 is, for example, the user interface 110 shown in FIG. 1G .
  • the signal quality indicator 111 in the user interface 110 Although the 5G network characterized by the number of signal bars connected to electronic devices is 5 bars (that is, full bars), the QoE of the application is poor, resulting in a lower download rate.
  • the third rate is less than the first rate, and the third rate is less than the first rate, for example, the number of requests per unit time is less than the number of first requests, and the amount of data downloaded per unit time is less than the first amount of data.
  • the black dot 113 in the user interface 110 moves and the time mark 112 also changes.
  • the second rate in the abnormal area is 0, that is, the video data cannot be downloaded, the gray circle 114 in the user interface 110 does not move.
  • the third resolution is less than or equal to the second resolution, or the third frame rate is less than or equal to the second frame rate, or the third bit rate is less than or equal to the second bit rate, or the third number of requests is less than or equal to the first 2. Number of requests.
  • the black dots 113 in the user interface 110 are used to indicate that the current playback has reached 35 minutes, and the gray dots 114 still indicate that the current buffer has reached 45 minutes. Therefore, when the user continues to travel from the intermediate point for 10 minutes, the black dot 113 and the time marker 112 can continue to move, and the user can continue to watch the video.
  • the black dots 113 in the user interface 110 are used to indicate that the current playback has reached 44 minutes, and the gray dots 114 It still means that it is currently cached to 45 minutes.
  • the signal quality indicator 111 in the user interface 110 is used to indicate that the number of signal bars connected by the electronic device is 5 bars (that is, full bars) of 5G network, the signal quality is good, and the video application can download the video data by adopting the above-mentioned first caching strategy.
  • the rate of downloading video data is restored to the first rate, or the resolution of the video data is restored to the first resolution, or the frame rate of the video data is restored to the first frame rate, or the bit rate of the video data is restored is the first bit rate.
  • the number of requests per unit time is restored to the first number of requests.
  • restoring the rate of downloading video data to the first rate may specifically include: restoring the number of requests per unit time to the first number of requests.
  • the control component may send the first indication information whose type is the second value to the video application to notify the video application to send the The first indication information of is invalid.
  • the video application receives the first indication information whose type is the first value, and performs a pre-cache operation, that is, the second cache strategy is used to cache the video data.
  • the control component may send the first indication information with the type value of the second value to the video application.
  • the video application receives the first indication information whose type value is the second value, and stops the currently executed pre-cache operation, that is, the first caching strategy is used to cache the video data.
  • the pre-cache operation is to reduce the bit rate of the downloaded video data (for example, to reduce the bit rate to the original bit rate) times, times, etc.), at the second code rate of the first code rate
  • the amount of video data played in a unit time can be increased to three times the original.
  • the process of the user traveling from the normal point C to the company can be referred to in Figs. 1I to 1K below.
  • the video application performs the above pre-cache operation during the user's journey from the normal point C to the abnormal point (ie, 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 dots 113 in the user interface 110 are used to indicate that the current playback has reached 30 minutes, and the gray dots 114 are used to indicate that the current buffer has reached 45 minutes.
  • the cached content ( 15 minutes) is longer than the first use time (300s).
  • the third code rate is smaller than the first code rate, or the third resolution is smaller than the first resolution, or the third code rate is smaller than the first code rate
  • the bit rate, or the third frame rate is less than the first frame rate, or the third resolution is less than or equal to the second resolution, or the third bit rate is less than or equal to the second bit rate, or the third frame rate is less than or equal to the first Second frame rate. Therefore, the sharpness of the user interface 110 is poor, its sharpness is less than that of the first normal area, or its sharpness is less than or equal to the sharpness during traveling from the normal point C to the abnormal point.
  • the third request number is less than the first request number or the second request number.
  • the black dot 113 in the user interface 110 moves and the time mark 112 also changes.
  • the gray circle 114 in the user interface 110 does not move.
  • the black dots 113 in the user interface 110 are used to indicate that the current playback has reached 35 minutes, and the gray dots 114 still indicate that the current buffer has reached 45 minutes. Therefore, while the user continues to travel from the intermediate point for 10 minutes, the black 113 and the time mark 112 can continue to move and the user can continue to watch the video.
  • the resolution, frame rate, and bit rate of the video data played by the video application when the user passes through the abnormal area is the second resolution, or the second frame rate, or the second bit rate.
  • the second bit rate is lower than the first bit rate, or the second resolution is lower than the first resolution, or the second frame rate is lower than the first frame rate, so the definition of the user interface 110 is poor.
  • the black dots 113 in the user interface 110 are used to indicate that the current playback has reached 44 minutes, and the gray dots 114 It still means that it is currently cached to 45 minutes.
  • the resolution, frame rate, and code rate of the video data played by the video application are still the second resolution, or the second frame rate, or the second code rate, so the definition of the user interface 110 is poor.
  • the signal quality indicator 111 in the user interface 110 is used to indicate that the number of signal bars connected by the electronic device is 5 bars (that is, full bars) of 5G network, the signal quality is good, the video application can continue to work normally by adopting the above-mentioned first caching strategy, and the user can also continue to watch the video through the video application.
  • the black dot 113 in the user interface 110 is used to indicate that the current playback has reached 45 minutes, and the signal quality indicator 111 in the user interface 110 is used for A 5G network with 5 grids (that is, full grids) of signals connected to electronic devices has better signal quality.
  • the video application downloads 10 minutes of data from the normal point C to the abnormal point, while the user only plays 9 minutes of video from the abnormal point to the recovery point.
  • the resolution, bit rate, and frame rate of the video played by the video application are still the second resolution, or the second bit rate, or the second frame rate, Then the clarity of the user interface 110 is still poor.
  • the video data played by the video application may be downloaded when it is in the second normal area, and the resolution, frame rate, and bit rate of the video data are the first resolution, or the first resolution.
  • One frame rate, or the first bit rate so the definition of the user interface 110 is normal. For example, when the normal point E is reached, the black dot 113 in the user interface 110 is used to indicate that the current playback has reached 45 minutes and 30 seconds.
  • the video application may re-download the video data after 44 minutes using the above-mentioned first caching strategy from the moment when the user continues from the recovery point, and the bit rate of the video data 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. Then after a certain period of time (for example, 5 seconds, 10 seconds, 30 seconds, etc.), 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 video data is the first resolution, so the displayed user interface has normal clarity.
  • a certain period of time for example, 5 seconds, 10 seconds, 30 seconds, etc.
  • the gray circle 114 in the user interface 110 indicates that the buffer has been stored for 35 minutes. Moreover, in FIG. 1C , when the user is at the middle point, the black dots 113 and the gray dots 114 overlap. In FIGS. 1D , 1H, and 1I-1J, when the user is at an abnormal point or an intermediate point (ie, when passing through an abnormal area), the gray circle 114 in the user interface 110 indicates that the buffer has been stored for 45 minutes. Therefore, in FIGS. 1B-1C , the user cannot continue watching the video during the 9 minutes from the intermediate point to the recovery point. However, in FIG. 1D, FIG. 1H, and FIG. 1I-FIG. 1J, the user can continue to watch the video during the 9 minutes from the intermediate point to the recovery point.
  • the user may click on the next episode before entering the exception area to cause the video application to play the video data for episode 18. Assuming that the user clicks the next episode at the normal point C, the process of the user traveling from the normal point C to the abnormal point is as shown in FIG. 1L or FIG. 1M below.
  • the video application does not send a registration message to the control component.
  • the user clicks on the next episode.
  • the user interface 110 has not yet played the video data, and the prompt 115 "play now" included in the user interface 110 is used to prompt the user that the video of episode 18 is about to be played.
  • the time mark 112 in the user interface 110 has not been successfully obtained, so it is "00:00/00:00".
  • the black dots 113 and the gray dots 114 overlap, indicating that the currently played and cached are both 0.
  • the video application keeps downloading video data with a duration of 10 seconds per second. Then when the user reaches the abnormal point, the video application has downloaded 300 seconds (ie, 5 minutes) of video data, so the black dots 113 in the user interface 110 are used to indicate that the video has been played to 30 seconds, and the gray dots 114 are used for for 5 minutes that are currently cached to the video.
  • the video application when the user opens the video application of the electronic device 100 before leaving home, the video application sends a registration message to the control component.
  • the user operation and the user interface 110 when the user reaches the normal point C are the same as those in FIG. 1L , and will not be repeated here.
  • the video application performs a pre-cache operation, assuming that the pre-cache operation is shown in Figure 1D and Figure 1H to increase the download rate by 3 times the original, or The code rate of the reduced downloaded video data shown in FIG. 1I-FIG.
  • 1J is the original one
  • the video application has downloaded 10 minutes of video data, so the black dots 113 in the user interface 110 are used to indicate that the video has been played for 30 seconds, and the gray dots 114 are used to indicate that the current has been cached. to 15 minutes of this video.
  • the duration of the downloaded video data in FIG. 1M is greater than the duration of the downloaded video data in FIG. 1L.
  • the first indication information includes the first time t 1 and the second time t 2 , or includes the third time t 3 .
  • the pre-cache operation performed by the video application is used to download video data whose playback duration is greater than or equal to 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 according to the difference between the first time t 1 and the second time t 2 , or may be obtained directly according to the third time t 3 .
  • a video application when a video application plays a video, each time the video application requests data from the server of the video application, the number of times of requesting data may be increased by one, and the number of times of requesting data may be recorded.
  • the currently recorded number of times of requesting data can be cleared, and the above recording process can be restarted for the currently played video.
  • Other content eg: audio, web pages, games, etc.
  • the audio application plays the next song, the number of times of request data currently recorded is cleared, and the number of times of request data is re-recorded for the currently played song.
  • the user interface 110 displayed by the electronic device 100 may not include the gray dots 114 , but the actual cache situation may be consistent with the cache situation represented by the gray circles 114 .
  • the first caching strategy and the first caching strategy adopted during downloading The two caching strategies are similar.
  • the first caching strategy of the audio application includes at least one of the following: using the first download rate to download the data of the target application, using the first sampling frequency to download the data of the target application, using the first sampling bit to download the data of the target application, using The first number of channels is used to download the data of the target application, and the first number of requests is used to request the data of the target application.
  • the second caching strategy of the audio application includes at least one of the following: using the second download rate to download the data of the target application, using the second sampling frequency to download the data of the target application, using the second sampling number to download the data of the target application, using the second sampling frequency.
  • the number of channels is used to download the data of the target application, and the second number of requests is used to request the data of the target application.
  • the data of the news application includes the first type of data (that is, the picture data) and the second type of data (that is, the text data), and the first caching strategy of the news application includes at least one of the following: using the first download rate to download the target application
  • the data of the target application is downloaded at the first resolution, and the data of the first type and the data of the second type are cached.
  • the second caching strategy of the news application includes at least one of the following: using a second download rate to download the data of the target application, using a second resolution to download the data of the target application, caching the data of the first type and not caching the data of the second type data.
  • the enabling and disabling of the prediction function may be preset by the system, such as being enabled by default, or may be user-defined settings.
  • the user can turn on the "Enable prediction function" option on the setting interface displayed by the electronic device 100, then the application program on the electronic device 100 sends a registration message to the control component during installation or running, and the control component is in the process of the user's travel.
  • the prediction process is always performed and the first indication information is obtained.
  • the control component may send the first indication information to the application program that has sent the registration message, so that the application program performs the pre-cache operation.
  • the setting interface displayed by the electronic device 100 may include an option of "enable prediction function” for different applications, and the user may turn on or off the option of “enable prediction function” of any application program on the setting interface. Understandably, when the "Enable prediction function" option of at least one application on the setting interface is turned on, the control component will always perform the prediction process and obtain the first indication information while the user is traveling, but when the setting interface is When the "Turn on forecasting" option for each application is turned off, the control component can stop the forecasting process. The user can turn on the "Enable prediction function” option of the video application on the setting interface, and the video application can send a registration message to the control component during installation or running, so that the control component sends the first indication information to the video application. The pre-cache operation can be performed according to the first indication information, so that the user can also use the video application normally when passing through the abnormal area.
  • the electronic device 100 involved in the embodiments of the present application may be 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 ( Personal Digital Assistant, PDA), wearable electronic devices, smart screens and other devices.
  • UMPC Ultra-mobile Personal Computer
  • PDA Personal Digital Assistant
  • FIG. 2 shows a schematic structural diagram of an electronic device 100 .
  • 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 charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor (modem), a graphics processor (graphics processing unit, GPU), image Image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem modem
  • graphics processor graphics processor
  • ISP image Image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is processed by the baseband processor and delivered to the AP.
  • the AP outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modulation and demodulation processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • wireless communication technology can include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology, etc.
  • the above-mentioned GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi- zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quasi-zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the GNSS can also be implemented by an independent device, for example, the electronic device 100 further includes a positioning module.
  • the positioning module can acquire the position information of the electronic device 100 through GNSS (eg GPS): latitude and longitude information, optionally, and direction (angle) information (eg, northeast direction), optionally, and speed information.
  • the modem processor may acquire the cell information of the electronic device 100 through the mobile communication module 150 and the wireless communication module 160 .
  • the identity of the serving cell (cell id), the cell id of the neighboring cell, the signal quality parameters of the serving cell and/or the neighboring cell.
  • the signal quality parameters are, for example, but not limited to, packet loss rate, signal-to-noise ratio, RSRP, RSRQ, and the like.
  • the AP can receive the cell information sent by the modem processor, so as to obtain the location information of the electronic device according to the cell information: longitude and latitude information, optionally, and direction (angle) information (for example, 20 north by east degrees), optionally, and speed information.
  • the AP can receive service exception notification events, such as a notification that the modem processor reports network drop, drop to a low network standard, RSRP, and RSRQ are less than a preset threshold.
  • the AP can also count the network quality parameters (such as bandwidth and delay) of at least one application by itself to obtain a comprehensive numerical QoE, which is used to characterize the quality and performance of services such as networks and services experienced by users.
  • the AP receives the service abnormality notification message and determines that the QoE is less than the first QoE level, the AP can determine that the network service is abnormal and the service service of the application is abnormal.
  • the AP can also receive the location information sent by the positioning module or the modem processor, and the cell information sent by the modem processor.
  • the AP can perform a learning process, that is, identify and count abnormal areas based on the above information, so as to obtain a data file of the abnormal areas (which may also be referred to as an abnormal area database later).
  • the abnormal area database includes at least one record, and each record is used to identify an abnormal area and the information including the abnormal area.
  • An example of the records of the abnormal area database (that is, the information of the abnormal area therein) can be found in Table 2 in FIG. 7 below, which will not be described in detail for the time being.
  • the learning process please refer to the descriptions of Figures 6 to 7 below, and will not be described in detail for the time being.
  • the AP may also send the above-mentioned information to the cloud server through the mobile communication module 150 and the wireless communication module 160, and the cloud server performs the above-mentioned learning process.
  • the cloud server can receive the relevant information on the route of the user sent by at least one electronic device, so the abnormal area recorded in the abnormal area database learned by the cloud server may be the abnormal area that the electronic device 100 does not pass through.
  • the processor 110 may perform service anomaly prediction (hereinafter referred to as the prediction process) according to the abnormal area database obtained in the above learning process, the cell information obtained in real time, and optionally, the location information obtained in real time, and obtain first indication information.
  • the processor 110 may perform a pre-cache operation in the process of sending the request message to the server of the target application according to the first indication information.
  • the first indication information reference may be made to the description of the first indication information in FIG. 1A to FIG. 1M , and details are not repeated here.
  • the pre-cache operation may include at least one of the following: increasing the download rate, reducing the amount of data used by the downloaded data in a unit time, and increasing the number of times data is requested in a unit time.
  • increasing the download rate may include: increasing the number of times of requesting data per unit time, and/or increasing the amount of data requested in a single request message.
  • reducing the amount of data in the unit time of the downloaded data in use may be: reducing the amount of data played in the unit time of the downloaded video data, for example, reducing the resolution and frame rate of the downloaded video data. , code rate.
  • reducing the data volume in a unit time of the downloaded data during use may also be: reducing the data volume played by the downloaded audio data in a unit time, for example, reducing the sampling rate, sampling rate, and sampling rate of the downloaded audio data. Number of digits, number of channels.
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • FIG. 3 is a schematic structural diagram of another electronic device 100 provided by an embodiment of the present application.
  • the electronic device 100 may include a service abnormality prediction unit 310 , a reporting unit 320 and an application unit 330 .
  • the service abnormality prediction unit 310 may include a monitoring unit 311 , a prediction unit 312 , and optionally, a learning unit 313 .
  • the reporting unit 320 may include a first reporting unit 321 , a second reporting unit 322 , and a third reporting unit 323 .
  • the service abnormality prediction unit 310 , the reporting unit 320 and the application unit 330 may all belong to the processor 110 shown in FIG. 2 .
  • the service abnormality prediction unit 310 and the application unit 330 belong to APs
  • the first reporting unit 321 is a positioning module or AP
  • the second reporting unit 322 is a modem processor
  • the third reporting unit 323 is an AP.
  • the description of each unit included in the electronic device 100 is as follows:
  • the monitoring unit 311 is used for monitoring 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 exception notification events sent by the third reporting unit 323 .
  • the location information includes latitude and longitude information, direction information, and speed information.
  • the cell information includes the cell id of the serving cell, the cell id of the neighboring cell, and signal quality parameters (eg, packet loss rate, signal-to-noise ratio, RSRP, RSRQ) of the serving cell and/or the neighboring cell.
  • the service abnormality notification event includes a notification message whose RSRP and RSRQ are less than a preset threshold, and a notification message whose QoE is less than the first QoE level.
  • the information monitored by the monitoring unit 311 may be sent to the learning unit 313 to perform the learning process.
  • the learning unit 313 may perform identification and statistics of abnormal areas based on the information to obtain a database of abnormal areas.
  • 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.
  • An example of the records of the abnormal area database (that is, the information of the abnormal area therein) can be found in Table 2 in FIG. 7 below, which will not be described in detail for the time being.
  • the information monitored by the monitoring unit 311 may also be sent to the cloud server to perform the learning process. For the description of the learning process, refer to the embodiments shown in FIGS. 6 to 7 below, which will not be described in detail for the time being.
  • the prediction unit 312 is configured to obtain the first indication information according to the real-time information monitored by the monitoring unit 311 , the abnormal area database (also referred to as a historical record) sent by the cloud server or the learning unit 313 .
  • the prediction unit 312 may trigger the service exception broadcast, so as to send the first indication information to the application unit 330 .
  • the abnormal area database may include valid location information, and the monitoring unit 311 may also monitor real-time valid location information. Therefore, the prediction unit 312 can perform the prediction process according to the abnormal area database, the real-time cell information and real-time location information sent by the monitoring unit 311, and obtain the first indication information.
  • the prediction unit 312 can perform the prediction process according to the abnormal area database, the real-time cell information and real-time location information sent by the monitoring unit 311, and obtain the first indication information.
  • the abnormal area database does not include valid location information, and the monitoring unit 311 cannot monitor real-time valid location information.
  • the prediction unit 312 can perform the prediction process according to the abnormal area database and the real-time cell information sent by the monitoring unit 311, and obtain the first indication information.
  • the description of the process can refer to the embodiment shown in FIG. 12 below, which will not be described in detail.
  • For the description of the first indication information reference may be made to the description of the first indication information in FIG. 1A to FIG. 1M , and details are not repeated here.
  • the application unit 330 may include at least one target application, and the description of the target application may refer to the descriptions of FIGS. 1A-1M and the following FIGS. 4-5 , which will not be described in detail for now.
  • the target application in the application unit 330 After receiving the first indication information, the target application in the application unit 330 performs a pre-cache operation.
  • the description of the pre-cache operation refer to the description of the pre-cache operation in FIGS. 1A to 1M , and details are not repeated here.
  • the prediction unit 312 may trigger a service exception broadcast after performing the prediction process and obtain the first indication information, so as to send the first indication information to the application unit 330 .
  • the predicting unit 312 may also trigger the service abnormality broadcast when the predicted duration of entering the abnormal area is within the first preset time range, so as to send the first indication information to the application unit 330 .
  • the first preset time range may be a range with a relatively small duration, for example, [25 seconds, 35 seconds], [50 seconds, 70 seconds] and so on.
  • the first preset time range can also be determined according to the scene information, for example, the first preset time range in the route to work is [25 seconds, 35 seconds], and the first preset time range in the route back to home is [50 seconds, 70 seconds]. ].
  • This implementation can avoid the situation that the target application performs the pre-cache operation earlier and causes the electronic device to be affected and affects the user experience.
  • the resolution, frame rate, and bit rate of the video data result in a lower definition of the subsequently displayed video picture.
  • the prediction unit 312 obtains the first indication information according to the real-time location information of the electronic device 100, when the first indication information is sent to the application unit 330, the distance between the current predicted location of the electronic device and the abnormal area is relatively close, for example, from The duration of the current location entering the abnormal area is 30 seconds. In this case, the possibility of the user changing the route is small, i.e. the possibility of the user entering the abnormal area is high, thereby improving the accuracy of the prediction.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application exemplarily illustrate the software system of the electronic device 100 with a layered architecture.
  • FIG. 4 is a schematic structural diagram of a software system of an electronic device 100 provided by an embodiment of the present application.
  • the software system may be an Android system, an HMS system, or a software system such as a Microsoft Windows operating system (microsoft windows), an operating system kernel (linux), a mobile device operating system (iphone operation system, IOS).
  • Microsoft Windows operating system Microsoft windows
  • linux operating system kernel
  • IOS mobile device operating system
  • the layered architecture divides the software system into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the software system is divided into four layers, which are an application layer, an application framework layer, a kernel layer and a hardware layer from top to bottom.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, calendar, navigation, SMS, gallery, calling, Bluetooth, video, music, games, learning, etc.
  • FIG. 4 takes the video application as the target application as an example for description. That is, the video application sends a registration message to the registration module of the application framework layer during installation or running, where the registration message is used to obtain the first indication information from the service abnormality prediction module of the application framework layer.
  • the first indication information reference may be made to the description of the first indication information in FIG. 1A to FIG. 1M , and details are not repeated here.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer can include business exception notification modules, control components, content providers, view systems, and so on.
  • the control component may include a registration module, a service abnormality prediction module and a transceiver module.
  • the software system shown in FIG. 4 is an HMS system
  • the control component may be HMS HiD2D in the HMS.
  • the business exception notification module can be used to receive notification messages of business service exceptions and network service exceptions of the application (also referred to as business exception prediction notification events).
  • the service exception notification module may receive a notification message of service exception of the application, such as the QoE being less than the first QoE level, sent by the application at the application layer.
  • the QoE can be a value obtained comprehensively according to parameters such as bandwidth and delay of the application.
  • the service exception notification module can also receive the dropped network reported by the processor driver (such as the modem driver) at the kernel layer, and dropped to a low network standard. Notification messages for network service exceptions such as preset thresholds.
  • the registration module may be configured to receive a registration message sent by a video application at the application layer, so as to determine the video application as a target application.
  • the registration module may also notify the service abnormality prediction module and the transceiver module in the control component that the target application is a video application, so as to send the first indication information to the target application subsequently.
  • the service abnormality prediction module can be used to perform the prediction process based on the abnormal area database and the cell information reported in real time by the processor driver (such as the modem driver) at the kernel layer. For example, it will not be described in detail.
  • the service anomaly prediction module can also perform the prediction process in combination with the processor driver (for example, a modem driver) or the location information reported by the positioning driver in real time at the kernel layer.
  • the processor driver for example, a modem driver
  • the location information reported by the positioning driver in real time at the kernel layer.
  • the transceiver module may be configured to send the first indication information obtained by the service abnormality prediction module to the video application of 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.
  • the pre-cache operation please refer to the description of the pre-cache operation in FIGS.
  • the abnormal area database may be obtained by the business abnormality prediction module performing the learning process.
  • the service abnormality prediction module can monitor at least one of the following messages: the location information reported by the processor driver (eg, modem driver) or positioning driver at the kernel layer, and the location information reported by the processor driver (eg, modem driver) at the kernel layer.
  • the service abnormality prediction module can identify and count abnormal areas based on the above-mentioned message, so as to obtain the abnormal area database.
  • the cloud server may also acquire at least one message monitored by the electronic device 100 and perform a learning process to obtain the above-mentioned abnormal area database.
  • the learning process refer to the embodiments shown in FIGS. 6 to 7 below, which will not be described in detail for the time being.
  • the business anomaly prediction module executes the learning process or the prediction process, it can obtain scene information of the user's route and route from an application at the application layer (eg, Huawei Smart Assistant).
  • the scene information may also be obtained through other modules in the application framework layer, and the scene information may also be obtained by self-identification, which is not limited in this embodiment of the present application.
  • the scene information may include, but is not limited to: route type (eg, commute route, commute route, play route, etc.), route starting point (eg, home, company), route end point, and the like.
  • the business exception prediction module of the application framework layer may be the business exception prediction unit 310 in FIG. 3
  • the business exception notification module of the application framework layer and the processor driver and positioning driver of the kernel layer may be the one in FIG. 3 .
  • the reporting unit 320, the video application of the application layer may be the application unit 330 in FIG. 3 .
  • the service exception notification module may be the third reporting unit 323 in FIG. 3
  • the processor driver may be the second reporting unit 322 in FIG. 3
  • the positioning driver may be the The first reporting unit 321 .
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • This data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, and more.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least processor drivers, positioning drivers, display drivers, and sensor drivers.
  • the hardware layer is the hardware structure of the electronic device 100, which may at least include a processor, a positioning module, a display screen, and a sensor module.
  • the processor driver can be used to drive the processor in the hardware layer
  • the positioning driver can be used to drive the positioning module of the hardware layer
  • the display driver can be used to drive the display screen in the hardware layer
  • the sensor driver can be used to drive the hardware layer. of multiple sensors.
  • the positioning module may also be integrated in the processor, and the positioning driver may also be integrated in the processor driver.
  • the processor at the hardware layer may include an application processor and a modem processor
  • the processor driver at the kernel layer may also include an application processor driver and a modem driver.
  • the application processor driver of the kernel layer is used to drive the application processor in the hardware layer
  • the modulation and demodulation driver of the kernel layer is used to drive the modulation and demodulation processor in the hardware layer.
  • the software system shown in FIG. 4 is the Android system, and the Android runtime (Android runtime) and the system library may also be included between the application framework layer and the kernel layer. in:
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • a data caching method provided by an embodiment of the present application is described below in conjunction with a scenario of an abnormal area of a user path (application scenario shown in FIG. 1A-FIG. 1M ). Specifically, as shown in FIG. 5 , the method may include but not be limited to the following steps:
  • S501 The target application of the application layer is running, and the data of the target application is cached by adopting the first caching strategy.
  • the first caching strategy includes at least one of the following: using a first download rate to download the data of the target application, using a first bit rate to download the data of the target application, using a first resolution to download the data of the target application Data, use the first frame rate to download the data of the target application, use the first number of requests to request the data of the target application, and the first number of requests is the number of requests per unit time; cache the first type of data and the second type of data.
  • Type data the first type is different from the second type; the first sampling frequency is used to download the data of the target application, the first sampling number of bits is used to download the data of the target application, and the first channel number is used to download For the data of the target application; for a specific example, refer to the description of the first cache policy in FIG. 1A to FIG. 1M , and details are not repeated here.
  • S502 The target application of the application layer sends a registration message to the registration module of the application framework layer.
  • the target application may send a registration message to the registration module at installation, startup, foreground running, background running, switching from background running to foreground running, and switching from foreground running to background running.
  • the registration message is used to obtain the first indication information obtained by the service abnormality prediction module.
  • the target application may also send a deregistration message to the registration module when running in the foreground, running in the background, switching from running from the background to running in the foreground, or switching from running from the foreground to running in the background.
  • the deregistration message is used to cancel the acquisition of the first indication information obtained by the service abnormality prediction module.
  • the target application sends a registration message to the registration module when switching from the background running to the foreground running, and sends a de-registration message to the registration module when switching from the foreground running to the background running.
  • 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 registered with the first notification event, and notifies the service abnormality prediction module and the transceiver module in the control component. Therefore, after generating the first indication information, the service abnormality prediction module will send the first indication information to the video application registered with the first notification event through the transceiver module (ie, execute S504).
  • the deregister message is used to unregister the first notification event. For example, after receiving the deregistration message sent by the video application, the registration module determines the video application as the target application not registered with the first notification event, and notifies the service abnormality prediction module and the transceiver module in the control component. Therefore, after the service abnormality prediction module generates the first indication information, it will not send the first indication information to the video application through the transceiver module.
  • the function of the application framework layer: registeredSignalQualityPrediction( ) is called, so as to send a registration message to the registration module through this function.
  • the service abnormality prediction module predicts whether there is an abnormal area in the advancing direction of the electronic device, and generates first indication information if there is an abnormal area.
  • the abnormal area is at least one of the following areas: an area where the signal quality is lower than a preset threshold; an area where the network is disconnected;
  • the second network standard of the standard for example, 2G
  • the area where the quality of experience QoE is lower than the first QoE level the smaller the QoE level, the worse the user experience.
  • the QoE level includes three: 0, 1, 2, 0 means poor user experience, 1 means average user experience, 2 means good user experience, and the first QoE level is 1 , the abnormal area is the area with a QoE level of 0.
  • the service anomaly prediction module can perform a prediction process according to the abnormal area database, cell information acquired in real time, and location information to obtain the first indication information.
  • the prediction process please refer to Figure 8- Figure The embodiment shown in 11 will not be described in detail for the time being.
  • the service abnormality prediction module can perform a prediction process according to the abnormal area database and the real-time acquired cell information to obtain the first indication information.
  • the prediction process please refer to the implementation shown in FIG. 12 .
  • a first location exists between the abnormal area and the current location, no other cell exists between the current location and the first location, and the first location refers to the location where the control component sends the first indication information; or, the abnormality
  • the area is the area whose distance from the current location is within the first distance range.
  • the first position is, for example, the normal point C in FIG. 1A to FIG. 1M and the preset point in FIG. 6 and FIG. 9 to FIG. 11 .
  • the control component when the predicted duration of entering the abnormal area from the current position of the electronic device is within the first preset time range, the control component sends first indication information to the target application through the transceiver module, wherein the first preset time
  • the first preset time For the description of the range, reference may be made to the description of the first preset time range in FIG. 1A to FIG. 1M , and details are not repeated here.
  • the service abnormality prediction module sends the first indication information to the target application in the form of a broadcast message through the transceiver module.
  • the transceiver module may send the first indication information to the video application through the function of the application framework layer: send broadcast sendBroadcast().
  • the first indication information may include type, optionally, first time information t 1 , optionally second time information t 2 , optionally, third time information t 3 .
  • the first value of type indicates that there is an abnormal area, and the value of type is the second value to indicate that the previously sent broadcast message is invalid.
  • t 1 can be the moment of entering the abnormal area, or the time period from the current position to entering the abnormal area.
  • t 2 can be the moment of leaving the abnormal area, or the time period from the current position to leaving the abnormal area.
  • t 3 may be the time period from entering the abnormal area to leaving the abnormal area, that is, the duration of the abnormal area.
  • Table 1 For an example of the parameters included in the first indication information, please refer to Table 1 below.
  • the first indication information may also include only t 2 , or t 2 and type, or only t 1 , or t 1 and type, or t 1 and t 2 , or t 1 , t 2 and type, the present The application examples are not limited.
  • the target application After receiving the first indication information, the target application uses the second caching strategy to cache the data of the target application.
  • the target application when it receives the first indication information whose type value is the first value, it performs a pre-cache operation, that is, caches the data of the target application by adopting the second caching strategy.
  • the second caching strategy includes at least one of the following: using a second download rate to download the data of the target application, and the second download rate is greater than the first download rate; using a second code rate to download the data of the target application, the second code rate is less than the first bit rate; use the second resolution to download the data of the target application, and the second resolution is smaller than the first resolution; use the second frame rate to download the data of the target application, and the second frame rate is smaller than the first frame rate; use the second The number of requests requests the data of the target application, the second number of requests is the number of requests per unit time, and the number of second requests is greater than the number of first requests; the first type of data is cached and the second type of data is not cached; the second sampling frequency is used to download the target application data, the second sampling frequency is lower
  • the target application caches the data of the target application by using a second caching strategy, and optionally, within a second preset time period after receiving the first indication information, the target application starts to use the second caching strategy.
  • the second preset duration may be a duration shorter than 1 second, such as 5 milliseconds, 10 milliseconds, and 30 milliseconds, or may be 1 second, 3 seconds, 5 seconds, and so on.
  • the second preset duration is the preset execution duration in FIGS. 1A-1M .
  • the target application performs the pre-cache operation within the first time t 1 after receiving the first indication information, but is not limited to this, and may also perform the pre-cache operation within 0.5 ⁇ t 1 after receiving the first indication information , which is not limited in the embodiments of the present application.
  • a second caching strategy is used to cache the data of the target application whose playback duration is a third preset duration (ie, the duration of the abnormal area), so as to ensure that the user
  • the target application can be used normally during the passage of the abnormal area.
  • the third preset duration is the duration obtained according to the first time information t 1 and the second time information t 2 (that is, the difference between t 1 and t 2 ), or the third preset duration is an indication of the third duration information length of time.
  • the target application is a video application.
  • the video application determines that the download duration within t 1 is (t 1 +t according to the first indication information) 2 ) video data, an example of the expression of the data amount D 1 of the video data whose duration is (t 1 +t 2 ) is as follows:
  • F is the frame rate of the video data
  • I is the resolution of the video data
  • C is the data amount of the currently buffered video.
  • an example of the rate R 1 at which the video application buffers the video data is as follows:
  • the pre-cache operation may include at least one of the following: increase R 1 , decrease I, decrease F.
  • the process of caching the video data by the video application may satisfy at least one of the following: R 1 is greater than the download rate before t 1 , I is less than the resolution of the cached content before t 1 , and F is less than the frame rate of the cached content before t 1 .
  • R 1 is greater than the download rate before t 1 , specifically: the frequency of sending request messages to the server of the target application is greater than the frequency before t 1 , and/or the amount of data requested to be downloaded in a single request message is greater than before t 1 amount of data.
  • the target application is an audio application.
  • the audio application can determine, according to the first indication information, that the audio data of the duration t 2 needs to be downloaded within t 1 , and the duration of the audio data of the duration is (t 1 + t 2 ).
  • An example of the data volume D 2 expression is shown below:
  • H is the sampling frequency of the audio data
  • B is the number of sampling bits of the audio data
  • S is the number of channels of the audio data (for example, 8)
  • Q is the data volume of the currently buffered audio.
  • an example of the rate R 2 at which the audio application buffers the audio data is as follows:
  • the pre-cache operation may include at least one of the following: increase R 2 , decrease H, decrease B, decrease S.
  • the process of buffering the audio data by the audio application can satisfy at least one of the following: R 2 is greater than the download rate before t 1 , H is less than the sampling frequency of the cached content before t 1 , and B is less than the sampling number of bits of the cache content before t 1 , S is less than the number of channels of buffered content before t1 .
  • the target application is a reading application.
  • the reading application can determine, according to the first instruction information, the amount of data D that needs to be downloaded within t 1 for the user to read within the duration of (t 1 +t 2 ) 3 .
  • D 3 may be determined by the reading application according to the reading habit of the user, for example, the reading habit is that the user reads 0.3 pages of a document per second. Therefore, the pre-cache operation may be to increase the rate at which D 3 is downloaded within t 1 .
  • the target application is a news application
  • the user interface of the news application may include text and pictures.
  • the news application can determine, according to the first indication information, to download within t1 the amount of data D4 viewed by the user within a duration of ( t1 + t2 ).
  • D4 may be determined by the news application according to the user's habit of viewing news, for example, viewing 0.2 news per second, and prefers to view news that does not include pictures
  • the pre-cache operation may include at least one of the following: increasing the download rate, only Cached text does not cache images.
  • the target application is a game application.
  • the game application can determine, according to the first indication information, to download the data amount D 5 used by the user within the duration of (t 1 +t 2 ) within t 1 .
  • the data cached by the online game application is, for example, but not limited to, game mall data, friend data, and other data that can be cached in advance.
  • the data cached by the game application can be determined by the game application according to the user's habit of using the game application. For example, if the user prefers to use the game arcade instead of viewing friend data, the pre-cache operation can only cache the game arcade data and not the friend data. .
  • the target application uses different caching strategies to cache the data of the target application before and after receiving the first indication information, wherein the amount of data downloaded in a unit time using the first caching strategy before receiving the first indication information
  • the usage duration is less than the usage duration of the amount of data downloaded in a unit time using the second caching strategy after receiving the first indication information. That is to say, after receiving the first indication information for indicating that there is an abnormal area in the forward direction, the target application uses the second caching strategy to cache data, thereby increasing the usage time of the amount of data downloaded per unit time, so as to minimize the It may allow users to use the target application normally when they pass through abnormal areas, avoid business freezes, and improve user experience.
  • the electronic device 100 may perform the learning process by itself. Next, the above learning process is described in combination with the application scenario shown in FIG. 6 and the schematic flowchart shown in FIG. 7 .
  • FIG. 6 is a schematic diagram of another application scenario of a user path abnormal area provided by an embodiment of the present application.
  • the application scenario shown in FIG. 6 is similar to the application scenario shown in FIG. 1A-FIG. 1M.
  • FIG. 6 takes as an example that the first cell and the second cell exist between the home and the abnormal point.
  • the first cell and the second cell may be a single cell, or may be a cell group composed of multiple cells (eg, neighboring cells). Not limited to this, in a specific implementation, there may also be more or less cells.
  • the preset point is the position where the preset control component sends the first indication information to the target application, which can also be understood as the position where the target application starts to perform the pre-cache operation.
  • the duration from the preset point to the abnormal point preset by the electronic device 100 is the first duration T_trig.
  • the first duration may be any duration in the first preset time range shown in FIG. 3 , for example, 30 seconds. For details, please refer to the description of the first preset time range in FIG. 3 .
  • T_trig may also be equal to the time duration from the second cell to the abnormal point, that is, the preset point is any point in the second cell.
  • T_trig may also be equal to the time duration from the first cell to the abnormal point, that is, the preset point is any point in the first cell.
  • T_trig may also be shorter than the time duration from the second cell to the abnormal point, but greater than the time duration from the first cell to the abnormal point, that is, the preset point may be between the first cell and the second cell.
  • FIG. 7 is a schematic flowchart of a learning process provided by an embodiment of the present application.
  • the learning process may include but is not limited to the following steps:
  • the cell may include a serving cell of the electronic device 100, optionally, a neighboring cell, optionally, a serving cell and signal quality parameters of neighboring cells (for example, RSRP, RSRQ, packet loss rate, signal quality, etc.). noise ratio, etc.).
  • the cell handover list recorded by the electronic device may include the identifier of the serving cell, optionally, the identifier of the neighbor cell, and optionally, the signal quality parameters of the serving cell and the neighbor cell.
  • the electronic device 100 monitors messages: whether the cell changes, cell information, service abnormality notification event, service recovery notification event. During the process of the user traveling from home to the abnormal point, the electronic device 100 monitors the cell change: the first cell is changed to the second cell, and records the cell switching list as: the first cell and the second cell. Optionally, the electronic device 100 may also record the information of the first cell and the second cell.
  • the cell handover list may record the cell information after going to ping pong, that is, the cell information that appears for the first time. For example, during the process of traveling from the first cell to the second cell, the user monitors cell changes: the first cell, the second cell, and the first cell, and the recorded cell handover list is the first cell and the second cell.
  • S702 When monitoring the service abnormality notification event, the electronic device determines whether there is a fenced cell at the abnormal point.
  • the service abnormality notification event may include but is not limited to: network drop, drop to a low network standard, signal-to-noise ratio, RSRP, RSRQ less than a preset threshold, QoE less than the first QoE level, packet loss rate greater than a preset threshold, etc. .
  • the electronic device 100 When listening to the service abnormality notification event, the electronic device 100 considers the current location as the abnormal point.
  • the fenced cells may be one or more cells, which are used to measure the duration of reaching the abnormal point and determine the route, so that the electronic device 100 can subsequently perform a corresponding prediction process for different routes.
  • the embodiment of the present application uses two fenced cells as an example for description. It is understandable that since two points determine a line, it is more accurate to determine the route of the current route through two fenced cells, and there is no need to record A large amount of cell information can be used to reduce the storage pressure and processing pressure of the electronic device 100 .
  • the fenced cells that are farther from the abnormal point or the preset point are called the first fenced cell
  • the fenced cells that are closer to the abnormal point or the preset point are called the second fenced cell.
  • the electronic device may determine whether there are at least two cells outside the abnormal point or the preset point through the cell switching list recorded in S701. When it exists, the two nearest cells outside the abnormal point or the preset point are determined as fence cells. Exemplarily, as shown in FIG. 6 , the user passes through the first cell and the second cell while traveling from home to the abnormal point, and the electronic device 100 records the information of the first cell and the second cell in the cell switching list. When the user reaches the abnormal point, the electronic device 100 monitors the service abnormal notification event. Then, the electronic device 100 may determine, according to the cell switching list, that the first cell and the second cell exist outside the abnormal point, and thus determine the first cell and the second cell as the fenced cells of the abnormal point.
  • the information of the abnormal area is not recorded.
  • the abnormal point is adjacent to the starting point of the route (as shown in the home in FIG. 6 ), and the user arrives at the abnormal point without passing through other cells when starting, so the information of the abnormal area is not recorded.
  • the information on the abnormal area may include information on the abnormal point and information on the recovery point.
  • the information of the abnormal point may include, but is not limited to: the information of the fenced cell, the time from the first fenced cell to the abnormal point, the time from the second fenced cell to the abnormal point, the service exception type, and the number of service exceptions.
  • the information of the abnormal area may further include location information of the abnormal point.
  • the type of business exception and the number of occurrences of business exceptions can be obtained through the monitored business exception notification events during the period when the electronic device passes through the abnormal area. For example, the number of business exceptions is received from entering the abnormal area to leaving the abnormal area. The number of business exception notification events.
  • the electronic device 100 when the user passes through the abnormal area, the electronic device 100 records the information of the abnormal point: the identification information of the second cell, the signal quality parameter, the duration from the second cell to the abnormal point (the second duration T_avgfen ), the business exception type and the number of business exception occurrences in the business exception notification event monitored when passing through the exception area.
  • the route shown in FIG. 6 is a route that can obtain location information such as on the ground
  • the abnormal point information recorded by the electronic device 100 may further include: latitude and longitude information, direction information, and speed information of the abnormal point.
  • the information of the recovery point may include, but is not limited to, the duration from the abnormal point to the recovery point, and optionally, may also include location information of the recovery point.
  • the electronic device 100 listens to the service recovery notification event, and the electronic device 100 records the information of the recovery point: the duration from the abnormal point to the recovery point (the third duration T_avgrec) .
  • the route shown in FIG. 6 is a route that can obtain location information such as on the ground
  • the information of the recovery point recorded by the electronic device 100 may further include: latitude and longitude information, direction information, and speed information of the recovery point.
  • S705 The electronic device updates the abnormal area database according to the recorded abnormal area information.
  • the information of the abnormal area includes the information of the starting point (ie, the abnormal point) of the abnormal area and the information of the end point (that is, the recovery point) of the abnormal area.
  • the electronic device 100 can update the original data in the abnormal area database according to the recorded information of the abnormal area. A record exists or a new record is added to the database. Assuming that there is a record of the user's route from home to the company (ie, the route to work) in the abnormal area database, an example of the record is shown in Table 2 below.
  • weakLoc 116.2, 40.6, 17.79, 23
  • the longitude of the abnormal point is 116.2
  • the latitude is 40.6
  • the speed is 17.79 (for example, the unit is kilometers per hour)
  • the direction angle is 23 degrees north by east.
  • recoverLoc 116.3, 40.2, 18.6, 25
  • the latitude is 40.2
  • the speed is 18.6 (for example, the unit is kilometers per hour)
  • the direction angle is 25 degrees north by east.
  • the embodiments of the present application do not limit the representations of the location information, such as the precision, the unit, and the value.
  • firstFenceCell is the cell id of the first fence cell
  • secondFenceCell is the cell id of the second fence cell
  • the cell id is a unique identifier.
  • historyTimeFence2Weak 57, 47, 48, 0, 0
  • historyTimeWeak2Recover 34, 33, 32, 0, 0
  • the time durations from the abnormal point to the recovery point in the last three historical records are 34 seconds, 33 seconds, and 32 seconds, respectively.
  • avgTimeFenceToWeak "49" indicates that the average duration from the second fenced cell to the abnormal point is 49 seconds.
  • avgTimeFenceToWeak can be obtained by averaging the values of historyTimeFence2Weak, and the specific calculation process is as follows:
  • avgTimeWeakToRecover 33" indicates that the average time from the abnormal point to the recovery point is 33 seconds.
  • avgTimeWeakToRecover may be obtained by averaging the values of historyTimeWeak2Recover, and the specific calculation process is as follows:
  • avgTimeFenceToWeak can also be obtained by removing the maximum and minimum values in the historyTimeFence2Weak value and then taking the average value
  • avgTimeWeakToRecover can also be obtained by removing the maximum value and the minimum value in the historyTimeWeak2Recove value and then taking the average value Yes, this embodiment of the present application does not limit this.
  • the characteristic information of the abnormal area may also include the duration from the first fenced cell to the abnormal point, the time stamp of the last departure from the recovery point, etc., which are not limited in this embodiment of the present application. .
  • description will be given by taking the information of the abnormal area included in the abnormal area database as the information shown in Table 2 as an example.
  • the electronic device 100 can update the records shown in Table 2 according to the information of the abnormal area in the commuting route recorded this time, or update the records in the database. Add a record of this abnormal area in . Specific examples are as follows:
  • the process of updating historyTimeWeak2Recover and avgTimeWeakToRecover is similar to the process of updating historyTimeFence2Weak and avgTimeFenceToWeak.
  • the calculation process of the updated avgTimeWeakToRecover is as follows:
  • t_newrecover is obtained by averaging the values of the updated historyTimeWeak2Recove.
  • the value range of b is the same as that of a, and a and b can be the same or different.
  • the maximum value and the minimum value may be removed first, and then the average value may be taken, which is not limited in this embodiment of the present application.
  • Example 2 it is assumed that when the electronic device 100 passes through the abnormal area of the commute route for the fourth time, the detected firstFenceCell and secondFenceCell remain unchanged, and the difference between the position (ie, the abnormal point) when the service abnormality prediction notification event is detected and the weakLoc in Table 2. If the value is less than the preset threshold, for example, the distance is less than 100 meters, the electronic device 100 can obtain the updated weakLoc according to the abnormal point detected this time and weakLoc in Table 2, for example, taking the middle position of these two positions.
  • the electronic device 100 can obtain the updated recoveryLoc according to the recovery point detected this time and the recoverLoc in Table 2, for example, taking the middle position of the two positions.
  • the methods of updating weakLoc and updating recoverLoc may be the same or different.
  • Example 3 it is assumed that when the electronic device 100 passes through the abnormal area of the commute route for the fourth time, the detected firstFenceCell and secondFenceCell remain unchanged, and the difference between the position (ie, the abnormal point) when the service abnormality prediction notification event is detected and the weakLoc in Table 2. If the value is greater than the preset threshold, for example, the distance is greater than 100 meters, the electronic device 100 may re-add a record of the abnormal area detected this time in the database.
  • the electronic device 100 may re-add a record of the abnormal area detected this time in the database.
  • the preset threshold corresponding to weakLoc and the preset threshold corresponding to recoverLoc may be the same or different.
  • Example 4 assuming that when the electronic device 100 passes through the abnormal area of the work route for the fourth time, it detects that the cell id of any one of the two nearest cells outside the abnormal point is not firstFenceCell or secondFenceCell in Table 2, then the electronic device 100 A record of the abnormal area detected this time can be re-added in the database.
  • the electronic device 100 may periodically delete records in the abnormal area database whose timeStamp is less than a preset threshold, for example, delete records in abnormal areas that have not been updated for three months every other month.
  • the electronic device 100 may re-add a record of the abnormal area detected this time in the database, which is not limited in this embodiment of the present application.
  • the electronic device may not record the cell switching list, nor determine the fenced cell.
  • the electronic device can obtain the location information of the electronic device when detecting the business abnormality notification event, and optionally, can also obtain at least one of the following information: the time of entering the abnormal area, the time of leaving the abnormal area, the duration of the abnormal area, Then, the abnormal area database is updated according to the obtained location information and the above at least one item of information. This embodiment of the present application does not limit this.
  • the electronic device 100 can execute the method shown in FIG. 7 every time the electronic device 100 passes the same route, thereby obtaining real and reliable abnormal area information, which facilitates subsequent execution of the prediction process and improves the accuracy of the first indication information.
  • the prediction process performed by the electronic device 100 may refer to the embodiments shown in FIGS. 8-11 .
  • the prediction process performed by the electronic device 100 may refer to the embodiment shown in FIG. 12 .
  • FIG. 8 is a schematic flowchart of a prediction process provided by an embodiment of the present application.
  • FIG. 8 illustrates by taking as an example that the latitude and longitude information and the speed information can be obtained in the route area.
  • the forecasting process may include, but is not limited to, the following steps:
  • S801 The electronic device determines the target record in the abnormal area database that matches the cell that has passed currently.
  • the electronic device 100 may extract from the abnormal area database at least one record whose "count of times of passing the abnormal area" is greater than a preset threshold (for example, 3), and extract from the at least one record. Identify the target record within a record.
  • the "identification of the first fence cell firstFenceCell” and the “identity of the second fence cell secondFenceCell” are the identifications of two consecutive cells that the electronic device 100 has currently passed.
  • the electronic device 100 determines that the fenced cell in the target record has been passed, that is, the scene information of the current route is the scene information in the target record (eg, the commute route in Table 2).
  • the electronic device 100 may also obtain scene information of the current route. If the scene information is the "scene information scene” existing in the abnormal area database, and it is determined that at least two cells have been passed through, the electronic device may S801 is executed.
  • FIG. 9 is a schematic diagram of another application scenario of an abnormal user path area provided by an embodiment of the present application.
  • the application scenario shown in FIG. 9 is similar to FIG. 1A-FIG. 1M and FIG. See the description of FIGS. 1A-1M and FIG. 6 .
  • the electronic device 100 passes through the first cell and the second cell.
  • the electronic device 100 can determine from the abnormal area database that "firstFenceCell" is the identifier of the first cell and "secondFenceCell” is the target record of the identifier of the second cell, that is, the fenced cell is the first cell and the target record of the second cell.
  • the record shown in Table 2 is taken as the target record as an example for description.
  • the electronic device obtains the location information of the abnormal point in the target record, the location information of the recovery point, the average duration T_avgfen from the second fenced cell to the abnormal point, and the average duration T_avgrec from the abnormal point to the recovery point.
  • the electronic device acquires the latitude and longitude information S_drop and the velocity information V_drop of the abnormal point in the target record, and the latitude and longitude information S_rec and the velocity information V_rec of the recovery point.
  • the target record is the record shown in Table 2, and the obtained information is: weakLoc of the abnormal point in Table 2, recoverLoc of the recovery point, and the average duration avgTimeFenceToWeak from the second fence cell to the abnormal point (that is, in Figure 6 ).
  • T_avgfen the average time from the outlier to the recovery point avgTimeWeakToRecover (ie T_avgrec in Figure 6).
  • the time required for the electronic device 100 to pass through the second cell, the abnormal point, and the recovery point may refer to the time duration shown in FIG. 6 above.
  • S803 The electronic device acquires the location information of the current location.
  • the electronic device 100 obtains the latitude and longitude information S_Loc and the velocity information V_Loc of the current location for the first time.
  • S804 The electronic device calculates and obtains the fourth duration T_drop and the fifth duration T_rec according to the target record and the location information of the current location.
  • the fourth time length T_drop is the time length from the current position to the abnormal point calculated according to the target record, the latitude and longitude information of the current position, and the speed information
  • the fifth time length T_rec is calculated according to the target record, the latitude and longitude information of the current position, and the speed information. The length of time from the anomaly point to the recovery point.
  • the fourth duration T_drop is the duration of reaching the abnormal point calculated by the electronic device 100 at the first point, and the calculation method is as follows:
  • the fifth duration T_rec is the duration from the abnormal point to the recovery point calculated by the electronic device 100 at the first point, and the calculation method is as follows:
  • T_rec is obtained according to D_droptorec and V_droptorec, and the expression is as follows:
  • the electronic device obtains the sixth duration T_newfen according to the average duration T_avgfen from the second fenced cell to the abnormal point in the target record.
  • the sixth time duration T_newfen from the current location to the abnormal point is obtained by subtracting the time duration from the second cell to the current location from the average time duration T_avgfen from the second cell to the abnormal point.
  • S806 The electronic device obtains the seventh duration T_newdrop according to the fourth duration T_drop and the sixth duration T_newfen.
  • T_newdrop is the time period from the current position to the abnormal point predicted by the electronic device 100 at the first point.
  • An example of an expression for T_newdrop is shown below:
  • T_newdrop c ⁇ T_drop+(1-c) ⁇ T_newfen
  • S807 The electronic device obtains the eighth duration T_newrec according to the fifth duration T_rec and the third duration T_avgrec.
  • T_newrec is the time period from the abnormal point to the recovery point predicted by the electronic device 100 at the first point.
  • An example of an expression for T_newrec is shown below:
  • T_newrec d ⁇ T_rec+(1-d) ⁇ T_avgrec
  • c and d can be the same or different.
  • the predicted duration of reaching the abnormal point is: the fourth duration T_drop calculated in combination with the real-time position and the sixth duration T_newfen obtained according to the target record.
  • the seventh duration T_newdrop is: the predicted duration from the abnormal point to the recovery point.
  • the predicted duration from the abnormal point to the recovery point is: the eighth duration T_newrec obtained by combining the fifth duration T_rec calculated from the real-time position and the third duration T_avgrec in the target record.
  • S808 The electronic device determines whether the seventh duration T_newdrop is less than or equal to the first duration T_trig.
  • the electronic device 100 determines whether T_newdrop ⁇ T_trig is satisfied. When satisfied, the electronic device 100 determines that the current position has passed the preset point (for example, the current position is the second point shown in FIG. 10 ), then the electronic device 100 performs a pre-cache operation for the target application according to the first indication information (ie, executes S809 ). ). Otherwise, the electronic device 100 performs S810.
  • the electronic device performs a pre-cache operation according to the first indication information, that is, the above-mentioned target application receives the first indication information sent by the control component, and uses the second caching strategy to cache the data of the target application.
  • the first indication information, the second caching strategy and the pre-cache operation please refer to the description of the first indication information and the pre-cache operation in FIG. 1A-FIG. 1M, FIG. 3, and FIG.
  • the preset point may be any point in the second cell, and the preset duration is equal to the seventh duration T_newdrop obtained for the first time.
  • the electronic device can directly execute S809 without executing S808 and S810.
  • each time S803 is performed the number of times Cnt for obtaining a location may be incremented by 1. Specifically, the initial value of the number of times of obtaining the position Cnt is 0.
  • S808 may specifically include: the electronic device 100 determines whether the following conditions are met: the number of times of obtaining the position Cnt ⁇ the first threshold C_max (eg 5) and (T_newdrop-T_trig)>the second threshold Th (eg 5 seconds). When it is satisfied, the electronic device 100 considers the prediction process to be inaccurate and stops the prediction, otherwise, the electronic device 100 continues to execute: judging whether T_newdrop ⁇ T_trig is satisfied, and when satisfied, the electronic device 100 executes the prediction for the target application according to the first indication information Cache operation (ie, perform S809), otherwise, the electronic device 100 performs S810.
  • the electronic device 100 determines whether Cnt ⁇ C_max and (T_newdrop-T_trig) ⁇ Th are satisfied. When it is satisfied, the electronic device 100 determines that although the current position does not pass the preset point, but the distance to the preset point is very close (for example, the third point shown in FIG. 11 ), the electronic device 100 targets the target application according to the first indication information A pre-cache operation is performed (ie, S809 is performed). Otherwise, the electronic device 100 performs S810.
  • the prediction process can increase the limit of the number of times of obtaining the position, so as to ensure the accuracy of the first indication information, avoid unnecessary power consumption and overhead of the electronic device as much as possible, and improve the battery life.
  • S810 The electronic device obtains the ninth duration T_test according to the seventh duration T_newdrop and the first duration T_trig.
  • the ninth duration T_test is the duration from the current time to the next execution of S803.
  • the electronic device 100 may calculate T_test by using the dichotomy method, and the expression of T_test is as follows:
  • S811 The electronic device determines whether the elapsed duration is greater than or equal to the ninth duration T_test.
  • the electronic device 100 determines that the current elapsed time period is greater than or equal to T_test, that is, the time when the position information of the current location is obtained next time has been reached, the electronic device 100 executes S803, otherwise, it continues to wait.
  • T_test the time when the position information of the current location is obtained next time has been reached
  • the electronic device 100 executes S803, otherwise, it continues to wait.
  • the moment when the user is at the first point is the first moment
  • the moment when the user executes S803 next time is the moment when the duration T_test elapses from the first moment, that is, the sum of the first moment and T_test.
  • sequence of S801-S802 and S803 is not limited, and may be executed simultaneously.
  • sequence of S804-S806 and S807 is not limited, and can also be executed simultaneously.
  • sequence of S804 and S805 is not limited, and may be executed simultaneously.
  • the electronic device can perform the prediction process according to the historical records in the abnormal area database, the cell information and location information acquired in real time, and obtain the first indication information and the time of sending the first indication information, thereby increasing the number of The accuracy of judging whether there is an abnormal area, try to avoid using the second caching strategy to cache data when there is no abnormal area or the situation that is not detected when there is an abnormal area, so as to improve the user experience.
  • the pre-cache operation performed by the target application may be determined according to the first indication information, for example, the playback duration of the downloaded data in the pre-cache operation is the duration of the abnormal area. duration.
  • the real-time location information of the electronic device changes, for example, when the moving speed is fast or slow
  • the obtained first indication information is different, so the pre-cache operations determined according to the first indication information may also be different.
  • the pre-cache operation can be dynamically adjusted according to different application scenarios, so as to ensure that the target application can be used normally when the user passes through the abnormal area in different application scenarios, avoid business jams, and improve the user experience.
  • FIG. 12 is a schematic flowchart of another prediction process provided by an embodiment of the present application.
  • FIG. 12 takes as an example that the latitude and longitude information and the speed information cannot be obtained in the route area.
  • the forecasting process may include, but is not limited to, the following steps:
  • S1201 The electronic device determines the target record in the abnormal area database that matches the cell that has passed currently.
  • S1201 is similar to S801 in FIG. 8 , and details are not repeated here.
  • the electronic device acquires the average time duration T_avgfen from the second fenced cell to the abnormal point and the average time duration T_avgrec from the abnormal point to the recovery point in the target record.
  • the target record is the record shown in Table 2
  • the obtained information is: the average duration avgTimeFenceToWeak (that is, T_avgfen in Figure 6) from the second fenced cell to the abnormal point, the average duration from the abnormal point to the recovery point avgTimeWeakToRecover (ie T_avgrec in Figure 6).
  • the time required for the electronic device 100 to travel to the second cell, the abnormal point, and the recovery point may refer to the time length shown in FIG. 6 above.
  • S1203 The electronic device determines whether the elapsed duration is equal to (T_avgfen-T_trig).
  • S1204 The electronic device performs a pre-cache operation.
  • the electronic device 100 determines that the currently elapsed time period is less than (T_avgfen-T_trig), that is, the electronic device 100 has not reached the preset point, the electronic device 100 continues to wait.
  • the electronic device 100 executes S1202-S1203, and at this time, the elapsed time period is equal to 0. Since the preset point in FIG. 9 is closer to the abnormal point than the second cell is, the time T_trig from the preset point to the abnormal point is less than T_avgfen in the target record, (T_avgfen-T_trig)>0. Therefore, if the elapsed time period is less than (T_avgfen-T_trig), the electronic device 100 continues to wait.
  • the electronic device performs a pre-cache operation according to the first indication information, that is, the above-mentioned target application receives the first indication information sent by the control component, and uses the second caching strategy to cache the data of the target application.
  • the first indication information that is, the above-mentioned target application receives the first indication information sent by the control component, and uses the second caching strategy to cache the data of the target application.
  • the second caching strategy and the pre-cache operation reference may be made to the description of the first indication information and the pre-cache operation in FIG. 1A-FIG. 1M , FIG. 3 , and FIG.
  • the electronic device 100 determines that the current elapsed time period is equal to (T_avgfen-T_trig), that is, when the electronic device 10 has reached a preset point (eg, the third point shown in FIG. 11 ), the electronic device 100 targets the target according to the first indication information
  • the application performs a pre-cache operation (ie, performs S1204).
  • the first indication information includes the time duration T_trig from the current position (ie, the preset point) to the abnormal point, and the time duration T_avgrec from the abnormal point to the recovery point.
  • the preset point may be any point in the second cell, and the first duration T_trig is equal to T_avgfen.
  • the electronic device can directly execute S1204 without executing S1203.
  • the electronic device can perform the prediction process and obtain the first indication information according to the historical records in the abnormal area database and the cell information obtained in real time.
  • a pre-cache operation can be performed for the target application according to the first indication information, so that the target application can be used normally when passing through an abnormal area as much as possible, so as to avoid service jams and improve user experience.
  • the electronic device can also only obtain the current location information of the electronic device, and determine in the abnormal area database whether the abnormal area record corresponding to the current location information is in the abnormal area record. In the case of existence, the first indication information is generated, and the first indication information is sent.
  • the electronic device may obtain both the location information of the electronic device and the current location information of the electronic device, and determine in the abnormal area database whether there is an abnormal area record corresponding to the current cell information and corresponding to the current location information, in the existing abnormal area record. In this case, the first indication information is generated, and the first indication information is sent. This embodiment of the present application does not limit this.
  • the learning process shown in FIG. 7 and/or the prediction process shown in FIG. 8 or FIG. 12 may be performed.
  • FIG. 13 is a data caching method provided by an embodiment of the present application.
  • the method can be applied to the electronic device 100 and the processor 110 of the electronic device 100 shown in FIG. 2 .
  • the method can also be applied to the electronic device 100 shown in FIG. 3 .
  • the method can also be applied to the software system shown in FIG. 4 , such as the Android system and the HMS system of the electronic device 100 .
  • the method may include but is not limited to the following steps:
  • S1301 For the first abnormal area, the electronic device performs a first prediction process, and for the second abnormal area, the electronic device performs a second prediction process to obtain the first indication information.
  • the first abnormal area is an area where the electronic device can obtain location information.
  • the electronic device may perform the first prediction process according to the database of the abnormal area, the network information obtained in real time, and the location information to obtain the first indication information, wherein the specific implementation of the first prediction process can refer to the embodiments shown in FIGS. 8-11 .
  • the second abnormal area is an area where the electronic device cannot obtain location information.
  • the electronic device may perform the second prediction process according to the database records of the abnormal area and the network information acquired in real time to obtain the first indication information, wherein the specific implementation of the second prediction process can refer to the embodiment shown in FIG. 12 .
  • the method may further include: monitoring information.
  • 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, the cell id of the serving cell of the electronic device, the cell id of the neighboring cell, the current cell and/or the neighboring cell Cell information such as signal quality parameters, RSRP and RSRQ are less than preset thresholds, and QoE is less than the first QoE level and other network and service service exception notification messages.
  • the method may further include: performing a learning process.
  • the electronic device may perform identification and statistics of abnormal areas based on the above-mentioned monitored information, so as to generate the above-mentioned abnormal area database.
  • the above-mentioned abnormal area database may also be obtained by the cloud server performing a learning process based on monitoring information sent by at least one electronic device.
  • the learning process reference may be made to the embodiments shown in FIG. 6 to FIG. 7 , and details are not repeated here.
  • S1302 The electronic device performs a pre-cache operation according to the first indication information.
  • the electronic device performs a pre-cache operation according to the first indication information, that is, the above-mentioned target application receives the first indication information sent by the control component, and uses the second caching strategy to cache the data of the target application.
  • the pre-cache operation and the second cache strategy are described in the above-mentioned FIGS. 1A-1M , FIG. 3 , and FIG.
  • the first indication information may include type, optionally, first time information t 1 , optionally second time information t 2 , optionally, third time information t 3 .
  • the first value of type indicates that there is an abnormal area, and the value of type is the second value to indicate that the previously sent broadcast message is invalid.
  • t 1 can be the moment of entering the abnormal area, or the time period from the current position to entering the abnormal area.
  • t 2 can be the moment of leaving the abnormal area, or the time period from the current position to leaving the abnormal area.
  • t 3 may be the time period from entering the abnormal area to leaving the abnormal area, that is, the duration of the abnormal area.
  • the first time t 1 is the seventh time duration T_newdrop
  • the second time t 2 is the eighth time duration T_newrec
  • the third time t 3 is the difference between the two.
  • the first time t 1 is the first time duration T_trig
  • the second time t 2 is the third time duration T_avgrec
  • the third time t 3 is the difference between the two.
  • the pre-cache operation can be targeted to the target application.
  • the target application is an online application with a caching mechanism, such as an audio application, a video application, a learning application, and a reading application.
  • the target application is an application registered with a service abnormality prediction notification event during installation or running. For details, please refer to the description of the target application in FIGS. 1A to 1M and FIGS. 2 to 5 .
  • the prediction process performed by the electronic device can be different for the area where the location information can be obtained and the area where the location information cannot be obtained, so that it can be well applied to different application scenarios, and the first Indicate the accuracy of the information.
  • the electronic device can perform a pre-cache operation according to the first indication information, thereby ensuring that the electronic device can be used normally during the passage to the abnormal area, avoiding service jams, and improving user experience.
  • the abnormal area database used by the electronic device to perform the prediction process is obtained by the electronic device or the cloud server learning historical monitoring information, which ensures the authenticity and reliability of the data used in the prediction process, thereby further improving the accuracy of the first indication information. sex.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product described above includes one or more computer instructions.
  • the computer program instructions described above are loaded and executed on a computer, the procedures or functions described above in accordance with the present application are produced in whole or in part.
  • the aforementioned computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the above-mentioned computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the above-mentioned computer instructions may be transmitted from a website site, computer, server or data center via wired communication. (eg coaxial cable, optical fiber, digital subscriber line) or wireless (eg infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • the above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, etc. that includes one or more available media integrated.
  • the above-mentioned usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

本申请实施例提供一种数据缓存方法,应用于包括目标应用和控制组件的电子设备,该方法包括:运行目标应用,且采用第一缓存策略缓存目标应用的数据,第一缓存策略可以包括采用第一下载速率下载所述目标应用的数据;目标应用接收控制组件发送的第一指示信息;第一指示信息用于指示电子设备的前进方向上存在异常区域;在目标应用接收到第一指示信息之后,采用第二缓存策略缓存目标应用的数据,第二缓存策略可以包括采用第二下载速率下载所述目标应用的数据,第二下载速率大于第一下载速率。采用本申请实施例能尽可能使用户途径异常区域时可以正常使用目标应用,避免业务卡顿,提升用户体验感。

Description

数据缓存方法及电子设备
本申请要求于2020年09月10日提交中国专利局、申请号为202010950649.5、申请名称为“数据缓存方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备技术领域,尤其涉及一种数据缓存方法及电子设备。
背景技术
音频、视频等在线应用程序的使用往往需要良好的网络环境,但目前仍然存在多处弱覆盖、无覆盖的异常区域,用户途径异常区域时电子设备的网络服务异常。例如,用户在日常上班、下班的路线中会途径多个为用户提供网络服务的小区。其中,有的小区网络质量较好,用户途径该小区时可以正常使用音频、视频、学习等在线应用。而有的小区网络质量较差,用户途径该小区时无法正常使用在线应用(如使用音频、视频时播放卡顿),从而影响用户体验。
发明内容
本申请实施例公开了一种数据缓存方法及电子设备,能够尽量避免用户经过网络服务异常的区域时无法正常使用音频、视频等在线应用的情况,提升用户体验感。
第一方面,本申请实施例提供了一种数据缓存方法,应用于电子设备,上述电子设备包括目标应用和控制组件,该方法包括:上述电子设备运行上述目标应用,且采用第一缓存策略缓存上述目标应用的数据,上述第一缓存策略包括以下至少一种:采用第一下载速率下载上述目标应用的数据,采用第一码率下载上述目标应用的数据,采用第一分辨率下载上述目标应用的数据,采用第一帧率下载上述目标应用的数据,采用第一请求次数请求上述目标应用的数据,上述第一请求次数为单位时间内的请求次数;缓存第一类型数据和第二类型数据,上述第一类型和上述第二类型不同;采用第一采样频率下载上述目标应用的数据,采用第一采样位数下载上述目标应用的数据,采用第一声道数下载上述目标应用的数据;上述目标应用接收上述控制组件发送的第一指示信息;在上述目标应用接收到上述第一指示信息之后,采用第二缓存策略缓存上述目标应用的数据,上述第二缓存策略包括以下至少一种:采用第二下载速率下载上述目标应用的数据,上述第二下载速率大于上述第一下载速率;采用第二码率下载上述目标应用的数据,上述第二码率小于上述第一码率;采用第二分辨率下载上述目标应用的数据,上述第二分辨率小于上述第一分辨率;采用第二帧率下载上述目标应用的数据,上述第二帧率小于上述第一帧率;采用第二请求次数请求上述目标应用的数据,上述第二请求次数为单位时间内的请求次数,上述第二请求次数大于上述第一请求次数;缓存上述第一类型数据且不缓存上述第二类型数据;采用第二采样频率下载上述目标应用的数据,上述第二采样频率小于上述第一采样频率;采用第二采样位数下载上述目标应用的数据,上述第二采样位数小于上述第一采样位数;采用第二声道数下载上述目标应用的数据,上述第二声道数小于上述第一声道数。
其中,第一指示信息用于指示上述电子设备的前进方向上存在异常区域,上述异常区域是以下至少一种区域:信号质量小于预设阈值的区域;断网的区域;掉制式的区域,上述掉制式是第一网络制式变更为低于上述第一网络制式的第二网络制式;体验质量QoE小于第一QoE等级的区域。
本申请实施例中,目标应用在接收第一指示信息前后采用不同的缓存策略缓存目标应用的数据,其中,接收第一指示信息前采用第一缓存策略在单位时间内下载的数据量的使用时长,小于,接收第一指示信息后采用第二缓存策略在单位时间内下载的数据量的使用时长。也就是说,在收到用于指示前进方向上存在异常区域的第一指示信息后,目标应用采用第二缓存策略缓存数据,从而增大单位时间内下载的数据量的使用时长,以此尽可能使用户途径异常区域时可以正常使用目标应用,避免业务卡顿,提升用户体验感。
在一种可能的实现方式中,在上述目标应用接收上述控制组件发送的第一指示信息之前,该方法还包括:上述目标应用向上述控制组件发送注册消息;上述注册消息用于获取上述第一指示信息,上述第一指示信息用于指示上述电子设备的前进方向上存在异常区域,上述异常区域是以下至少一种区域:信号质量小于预设阈值的区域;断网的区域;掉制式的区域,上述掉制式是第一网络制式变更为低于上述第一网络制式的第二网络制式;体验质量QoE小于第一QoE等级的区域。
本申请实施例中,接收第一指示信息和采用第二缓存策略缓存数据的目标应用是向控制组件发送注册消息的应用程序,因此,目标应用可以自主选择是否接收第一指示信息和采用第二缓存策略缓存数据,实现的灵活性大大增加。
在一种可能的实现方式中,上述异常区域与当前位置之间存在第一位置,当前位置与上述第一位置之间不存在其他小区,上述第一位置指上述控制组件发送上述第一指示信息的位置;或者,上述异常区域是和当前位置的距离在第一距离范围内的区域。
本申请实施例中,当前位置和异常区域之间还存在第一位置,当前位置和异常区域的距离不会过近,因此,目标应用采用第二缓存策略缓存数据的时长(即从第一位置到异常区域的时长)不会太短(例如不会为0),下载的数据更多,以此尽可能使途径异常区域时目标应用可以正常使用,避免业务卡顿,提升用户体验感。
在一种可能的实现方式中,该方法还包括:在从上述电子设备当前位置进入上述异常区域的时长在第一预设时间范围时,上述控制组件向上述目标应用发送上述第一指示信息。
本申请实施例中,目标应用采用第二缓存策略缓存数据的时长在第一预设时间范围内,通过对第一预设时间范围的控制可以实现对目标应用采用第二缓存策略缓存数据的时长的控制。第一预设时间范围可以根据需求确定,例如在电量较少时,第一预设时间范围可以调小,从而减少目标应用采用第二下载速率下载数据带来的电量消耗过快的情况,例如在异常区域的持续时长较长时,第一预设时间范围可以调大,从而尽可能使途径异常区域时目标应用可以正常使用,避免业务卡顿,提升用户体验感。
在一种可能的实现方式中,上述目标应用向上述控制组件发送注册消息,包括:上述目标应用在检测到上述目标应用从后台运行切换到前台运行或者启动时,向上述控制组件发送上述注册信息。
本申请实施例中,目标应用可以在使用时再给控制组件发送注册消息,以使控制组件在目标应用被使用时才发送第一指示信息,从而避免目标应用不被使用时采用第二缓存策略缓存数据带来的电量消耗过快、观看内容清晰度较差、观看内容不完整等影响用户体验的情况。
在一种可能的实现方式中,该方法还包括:获取上述电子设备的当前小区信息;在异常 区域的数据文件中确定是否存在和上述当前小区信息对应的异常区域记录;在存在上述异常区域的情况下,上述控制组件生成上述第一指示信息;或者,获取上述电子设备的当前位置信息;在上述异常区域的数据文件中确定是否存在和上述当前位置信息对应的异常区域记录;在存在上述异常区域的情况下,上述控制组件生成上述第一指示信息;或者,获取上述电子设备的上述当前小区信息和上述当前位置信息;在上述异常区域的数据文件中确定是否存在和上述当前小区信息对应且和上述当前位置信息对应的异常区域记录;在存在上述异常区域的情况下,上述控制组件生成上述第一指示信息。
在一种可能的实现方式中,该方法还包括:在异常区域的数据文件中确定是否存在和上述当前小区信息对应的异常区域记录;在存在上述异常区域记录的情况下,上述控制组件生成上述第一指示信息;上述当前位置信息用于确定发送上述第一指示信息的时刻。
本申请实施例中,生成第一指示信息的方式多种多样,例如,对于无法获取当前位置信息的情况,电子设备可以获取当前小区信息来确定是否生成第一指示信息,从而可以适用于多种场景,可用性较好。
在一种可能的实现方式中,该方法还包括:获取上述电子设备经过小区的信息;当检测到业务异常通知事件时,在上述电子设备经过小区的信息中确定第二预设时间范围之前是否经过至少一个小区;在经过上述至少一个小区的情况下,在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录,上述第一异常区域记录或上述第二异常区域记录包括上述至少一个小区的信息;上述业务异常通知事件用于指示以下至少一项信息:信号质量小于预设阈值,断网,第一网络制式变更为低于上述第一网络制式的第二网络制式,QoE小于第一QoE等级;或者,当检测到上述业务异常通知事件时,获取上述电子设备的位置信息,并在上述异常区域的数据文件中添加第三异常区域记录,或者更新上述异常区域的数据文件中的第四异常区域记录,上述第三异常区域记录或上述第四异常区域记录中的位置信息是根据上述电子设备的位置信息得到的。
本申请实施例中,异常区域的数据文件用于生成第一指示信息,即用于判断前进方向是否存在异常区域。电子设备可以在检测到业务异常通知事件时根据当前获取的信息更新异常区域的数据文件,用于生成第一指示信息的异常区域的数据文件中的数据来源是真实可靠且及时有效的,从而大大增加了判断是否存在异常区域的准确性,尽量避免不存在异常区域时采用第二缓存策略缓存数据或存在异常区域时未检测到的情况,提升用户体验感。
在一种可能的实现方式中,上述在经过上述至少一个小区的情况下,在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录,包括:在经过上述至少一个小区的情况下,获取上述电子设备的位置信息,并在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录,上述第一异常区域记录或上述第二异常区域记录包括上述至少一个小区的信息,上述第一异常区域记录或上述第二异常区域记录中的位置信息是根据上述电子设备的位置信息得到的。
本申请实施例中,异常区域的数据文件中的异常区域记录不仅可以是根据经过小区信息更新得到的,还可以是根据位置信息得到的。对于可以获取位置信息的区域,电子设备可以根据实时位置信息和异常区域的数据文件中异常区域记录的位置信息来生成第一指示信息,从而增加了判断是否存在异常区域的准确性,尽量避免不存在异常区域时采用第二缓存策略缓存数据或存在异常区域时未检测到的情况,提升用户体验感。
在一种可能的实现方式中,上述在经过上述至少一个小区的情况下,在上述异常区域的 数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录,包括:在经过上述至少一个小区的情况下,获取以下至少一项信息:进入上述异常区域的时间、离开上述异常区域的时间、上述异常区域的持续时长;在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录;上述第一异常区域记录或上述第二异常区域记录中的进入异常区域的时间是根据上述进入上述异常区域的时间得到的,或者,上述第一异常区域记录或上述第二异常区域记录中的离开异常区域的时间是根据上述离开上述异常区域的时间得到的,或者,上述第一异常区域记录或上述第二异常区域记录中的异常区域的持续时长是根据上述异常区域的持续时长得到的。
本申请实施例中,异常区域的数据文件中的异常区域记录还可以包括历史记录的进入异常区域的时间信息、离开异常区域的时间信息、异常区域的持续时长信息。控制组件生成第一指示信息、发送第一指示信息均可以参考异常区域的数据库文件中的上述信息,从而协助判断实际进入异常区域的时间、离开异常区域的时间、异常区域的持续时长,从而增加了判断是否存在异常区域的准确性,尽量避免不存在异常区域时采用第二缓存策略缓存数据或存在异常区域时未检测到的情况,提升用户体验感。
在一种可能的实现方式中,上述在上述目标应用接收到上述第一指示信息之后,采用第二缓存策略缓存上述目标应用的数据之后,该方法还包括:在上述电子设备处于上述异常区域时,采用以下至少一种方式:采用第三下载速率下载上述目标应用的数据,上述第三下载速率小于上述第一下载速率;采用上述第三码率下载上述目标应用的数据,上述第三码率小于或等于上述第二码率;采用上述第三分辨率下载上述目标应用的数据,上述第三分辨率小于或等于第二分辨率;采用上述第三帧率下载上述目标应用的数据,上述第三帧率小于或等于上述第二帧率;采用第三请求次数请求上述目标应用的数据,上述第三请求次数为单位时间内的请求次数,上述第三请求次数小于或等于上述第一请求次数;离开上述异常区域之后,采用上述第一缓存策略缓存上述目标应用的数据。
本申请实施例中,电子设备处于异常区域时,目标应用可以进一步减小下载数据的分辨率、码率、帧率等参数,以此增大在单位时间内下载的数据的使用时长,从而尽可能使用户在异常区域也能使用目标应用。当电子设备离开异常区域时,恢复使用第一缓存策略缓存目标应用的数据,以使用户可以继续正常使用目标应用。
在一种可能的实现方式中,上述采用第一缓存策略缓存上述目标应用的数据,包括:在采用上述第一缓存策略缓存的上述目标应用的数据量的播放时长大于第一预设时长时,停止缓存上述目标应用的数据;上述采用第二缓存策略缓存上述目标应用的数据,包括:在采用上述第二缓存策略缓存的上述目标应用的数据量的播放时长大于上述第一预设时长时,继续缓存上述目标应用的数据。
本申请实施例中,在相同时长内,目标应用采用第一缓存策略缓存的数据的使用时长小于目标应用采用第二缓存策略缓存的数据的使用时长。因此,在前进方向上存在异常区域的情况下,目标应用采用第二缓存策略缓存数据能够使用户途径异常区域期间使用目标应用的时长更长,尽量避免业务卡顿,提升用户体验感。
在一种可能的实现方式中,上述在上述目标应用接收到上述第一指示信息之后,采用第二缓存策略缓存上述目标应用的数据,包括:响应于接收到上述第一指示信息,采用上述第二缓存策略缓存上述目标应用的数据;和/或,在接收到上述第一指示信息的第二预设时长内,启动采用上述第二缓存策略缓存上述目标应用的数据的步骤,上述第二预设时长小于1秒。
本申请实施例中,目标应用接收第一指示信息后,在较短的时间内采用第二缓存策略缓 存目标应用的数据,以此在进入异常区域之前缓存数据的使用时长尽可能长,使用户途径异常区域期间使用目标应用的时长更长,尽量避免业务卡顿,提升用户体验感。
在一种可能的实现方式中,上述第一指示信息还包括:第一时间信息,上述第一时间信息用于指示进入上述异常区域的时间;和/或,上述第一指示信息还包括:第二时间信息,上述第二时间信息用于指示离开上述异常区域的时间;和/或,上述第一指示信息还包括:第三时间信息,上述第三时间信息用于指示上述异常区域的持续时长。
本申请实施例中,第一指示信息还可以包括详细的进入异常区域的时间、离开异常区域的时间或异常区域的持续时长,目标应用可以根据第一指示信息选择第二缓存策略,例如,异常区域的持续时长较长时,第二下载速率可以更大一点,以此下载更多的数据。实现的灵活性大大增加,可用性较高。
在一种可能的实现方式中,上述在上述目标应用接收到上述第一指示信息之后,采用第二缓存策略缓存上述目标应用的数据,包括:在上述目标应用接收到上述第一指示信息之后,采用上述第二缓存策略缓存播放时长为第三预设时长的上述目标应用的数据,其中,上述第三预设时长为根据上述第一时间信息和上述第二时间信息得到的时长,或者,上述第三预设时长为上述第三时长信息指示的时长。
本申请实施例中,目标应用在进入异常区域之前下载的数据的播放时长可以等于异常区域的持续时长,从而保证用户途径异常区域期间目标应用可以正常使用。
在一种可能的实现方式中,上述目标应用为视频应用,上述第二缓存策略包括以下至少一种:采用上述第二下载速率下载上述目标应用的数据,采用上述第二码率下载上述目标应用的数据,采用上述第二分辨率下载上述目标应用的数据,采用上述第二帧率下载上述目标应用的数据,采用上述第二请求次数请求上述目标应用的数据;或,上述目标应用为音频应用,上述第二缓存策略包括以下至少一种:采用上述第二下载速率下载上述目标应用的数据,采用上述第二请求次数请求上述目标应用的数据,采用上述第二采样频率下载上述目标应用的数据,采用上述第二采样位数下载上述目标应用的数据,采用上述第二声道数下载上述目标应用的数据。
本申请实施例可以应用于不同的目标应用,例如视频应用、音频应用,并对于不同的应用,第二缓存策略可以不同,应用场景更为广泛,可用性较高。
第二方面,本申请实施例提供了一种芯片,该芯片包括至少一个处理器和接口电路,可选地,该芯片还包括存储器;上述存储器、上述接口电路和上述至少一个处理器通过线路互联,上述存储器中存储有计算机程序;上述计算机程序被上述至少一个处理器执行时实现:接收目标应用发送的注册消息;上述注册消息用于注册第一通知事件;生成第一指示信息;上述第一指示信息用于指示上述芯片的前进方向上存在异常区域,上述异常区域是以下至少一种区域:信号质量小于预设阈值的区域、断网的区域、掉制式的区域、体验质量QoE小于第一QoE等级的区域,上述掉制式是第一网络制式变更为低于上述第一网络制式的第二网络制式;向注册有上述第一通知事件的上述目标应用发送上述第一指示信息。
本申请实施例中,芯片可以给注册有第一通知时间的目标应用发送第一指示信息,其中第一指示信息用于指示前进方向上存在异常区域,以使目标应用可以根据第一指示信息作出相应的动作,例如增大下载速率,从而尽可能使用户途径异常区域时可以正常使用目标应用,避免业务卡顿,提升用户体验感。
在一种可能的实现方式中,上述芯片生成第一指示信息时,具体实现:获取当前小区信 息;在异常区域的数据文件中确定是否存在和上述当前小区信息对应的异常区域记录;在存在上述异常区域的情况下,上述控制组件生成上述第一指示信息;或者,获取当前位置信息;在上述异常区域的数据文件中确定是否存在和上述当前位置信息对应的异常区域记录;在存在上述异常区域的情况下,上述控制组件生成上述第一指示信息;或者,获取上述当前小区信息和上述当前位置信息;在上述异常区域的数据文件中确定是否存在和上述当前小区信息对应且和上述当前位置信息对应的异常区域记录;在存在上述异常区域的情况下,上述控制组件生成上述第一指示信息。
在一种可能的实现方式中,上述芯片生成第一指示信息时,具体实现:获取上述芯片的当前小区信息和当前位置信息;在异常区域的数据文件中确定是否存在和上述当前小区信息对应的异常区域记录;在存在上述异常区域记录的情况下,上述控制组件生成上述第一指示信息;上述当前位置信息用于确定发送上述第一指示信息的时刻。
本申请实施例中,生成第一指示信息的方式多种多样,例如,对于无法获取当前位置信息的情况,芯片可以获取当前小区信息来确定是否生成第一指示信息,从而可以适用于多种场景,可用性较好。
在一种可能的实现方式中,上述芯片还用于实现:获取上述芯片经过小区的信息;当检测到业务异常通知事件时,在上述芯片经过小区的信息中确定第二预设时间范围之前是否经过至少一个小区;在经过上述至少一个小区的情况下,在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录,上述第一异常区域记录或上述第二异常区域记录包括上述至少一个小区的信息;上述业务异常通知事件用于指示以下至少一项信息:信号质量小于预设阈值,断网,第一网络制式变更为低于上述第一网络制式的第二网络制式,QoE小于第一QoE等级;或者,当检测到上述业务异常通知事件时,获取上述芯片的位置信息,并在上述异常区域的数据文件中添加第三异常区域记录,或者更新上述异常区域的数据文件中的第四异常区域记录,上述第三异常区域记录或上述第四异常区域记录中的位置信息是根据上述芯片的位置信息得到的。
本申请实施例中,异常区域的数据文件用于生成第一指示信息,即用于判断前进方向是否存在异常区域。芯片可以在检测到业务异常通知事件时根据当前获取的信息更新异常区域的数据文件,用于生成第一指示信息的异常区域的数据文件中的数据来源是真实可靠且及时有效的,从而大大增加了判断是否存在异常区域的准确性,尽量避免不存在异常区域时采用第二缓存策略缓存数据或存在异常区域时未检测到的情况,提升用户体验感。
在一种可能的实现方式中,上述芯片在经过上述至少一个小区的情况下,在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录时,具体实现:在经过上述至少一个小区的情况下,获取上述芯片的位置信息,并在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录;上述第一异常区域记录或上述第二异常区域记录包括上述至少一个小区的信息,上述第一异常区域记录或上述第二异常区域记录中的位置信息是根据上述芯片的位置信息得到的。
本申请实施例中,异常区域的数据文件中的异常区域记录不仅可以是根据经过小区信息更新得到的,还可以是根据位置信息得到的。对于可以获取位置信息的区域,芯片可以根据实时位置信息和异常区域的数据文件中异常区域记录的位置信息来生成第一指示信息,从而增加了判断是否存在异常区域的准确性,尽量避免不存在异常区域时采用第二缓存策略缓存数据或存在异常区域时未检测到的情况,提升用户体验感。
在一种可能的实现方式中,上述芯片在经过上述至少一个小区的情况下,在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录时,具体实现:在经过上述至少一个小区的情况下,获取以下至少一项信息:进入上述异常区域的时间、离开上述异常区域的时间、上述异常区域的持续时长;在上述异常区域的数据文件中添加第一异常区域记录,或者更新上述异常区域的数据文件中的第二异常区域记录;上述第一异常区域记录或上述第二异常区域记录中的进入异常区域的时间是根据上述进入上述异常区域的时间得到的,或者,上述第一异常区域记录或上述第二异常区域记录中的离开异常区域的时间是根据上述离开上述异常区域的时间得到的,或者,上述第一异常区域记录或上述第二异常区域记录中的异常区域的持续时长是根据上述异常区域的持续时长得到的。
本申请实施例中,异常区域的数据文件中的异常区域记录还可以包括历史记录的进入异常区域的时间信息、离开异常区域的时间信息、异常区域的持续时长信息。控制组件生成第一指示信息、发送第一指示信息均可以参考异常区域的数据库文件中的上述信息,从而协助判断实际进入异常区域的时间、离开异常区域的时间、异常区域的持续时长,从而增加了判断是否存在异常区域的准确性,尽量避免不存在异常区域时采用第二缓存策略缓存数据或存在异常区域时未检测到的情况,提升用户体验感。
在一种可能的实现方式中,上述芯片还用于实现:接收目标应用发送的去注册消息;上述去注册消息用于取消注册第一通知事件。
本申请实施例中,目标应用无需获取第一指示信息时可以向芯片发送去注册消息,即目标应用可以自主选择是否接收第一指示信息,实现的灵活性大大增加。
第三方面,本申请实施例提供了一种电子设备,包括收发器、处理器和存储器;上述存储器用于存储计算机程序代码,上述计算机程序代码包括计算机指令,上述处理器调用上述计算机指令以使上述用户设备执行本申请实施例中第一方面、第一方面的任意一种实现方式提供的数据缓存方法。
第四方面,本申请实施例提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,该计算机程序包括程序指令,该程序指令被处理器执行时,用于执行本申请实施例中第一方面、第一方面的任意一种实现方式提供的数据缓存方法。
第五方面,本申请实施例提供了一种计算机程序产品,当该计算机程序产品在通信设备上运行时,使得该通信设备执行本申请实施例中第一方面、第一方面的任意一种实现方式提供的数据缓存方法。
第六方面,本申请实施例提供一种电子设备,该电子设备包括执行本申请任一实施例所介绍的方法或装置。上述电子设备例如为芯片。
可以理解地,上述提供的第三方面提供的电子设备、第四方面提供的计算机存储介质、第五方面提供的计算机程序产品以及第六方面提供的电子设备均用于执行第一方面提供的数据缓存方法。因此,其所能达到的有益效果可参考第一方面所提供的数据缓存方法中的有益效果,此处不再赘述。
附图说明
以下对本申请实施例用到的附图进行介绍。
图1A-图1M是本申请实施例提供的一些应用场景的示意图;
图2-图4是本申请实施例提供的一些电子设备的结构示意图;
图5是本申请实施例提供一种数据缓存方法的流程示意图;
图6是本申请实施例提供的又一种应用场景的示意图;
图7是本申请实施例提供的一种学习过程的流程示意图;
图8是本申请实施例提供的一种预测过程的流程示意图;
图9-图11是本申请实施例提供的又一些应用场景的示意图;
图12是本申请实施例提供的又一种预测过程的流程示意图;
图13是本申请实施例提供的又一种数据缓存方法的流程示意图。
具体实施方式
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。本申请实施例的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。
下面介绍一种用户在上班路线中途径异常区域的应用场景,其中,异常区域是信号质量低于预设阈值的区域。用户途径异常区域时,所使用的电子设备高概率出现网络服务异常。网络服务异常可以包括但不限于:没有网络信号(即掉网),掉落至低网络制式(例如从第五代移动通信技术(5th generation mobile networks,5G)掉落至第三代移动通信技术(3rd-generation,3G)),信号质量较差,应用体验质量较差。信号质量较差可以是用于表征信号质量的参数(后续简称信号质量参数)不满足预设条件,例如,信噪比、参考信号接收功率(reference signal receiving power,RSRP)、参考信号接收质量(reference signal receiving quality,RSRQ)小于预设阈值,丢包率大于预设阈值。应用体验质量较差例如是体验质量(quality of experience,QoE)小于第一QoE等级。其中,QoE等级越小,用户体验越差,例如,QoE等级包括3个:0、1、2,0表示用户体验差,1表示用户体验一般,2表示用户体验好,第一QoE等级为2,异常区域是QoE等级为0或1的区域。
如图1A所示,用户从家出发之前打开电子设备100的视频应用,从家行进至公司的过程中通过视频应用观看视频。该上班路线上存在两个正常区域和一个异常区域。正常区域可以是正常小区的覆盖区域。用户途径正常区域时,用户的电子设备100可以接入正常小区并可以正常使用,例如电子设备100的视频应用播放视频时没有卡顿或卡顿时间较短(如小于3秒)。异常区域可以是异常小区的覆盖区域,也可以是正常小区的弱覆盖区域,还可以是无覆盖区域。其中,异常小区无法为电子设备提供正常的网络服务,例如无法为电子设备提供网络或者只能为电子设备提供第二代手机通信技术规格(2Generation wireless telephone technology,2G)网络。因此,用户途径异常区域时,电子设备100无法正常使用,例如电子设备100的视频应用播放视频时卡顿时间较长(如大于20秒)或无法播放。
如图1A所示,当用户到达第一正常区域中的正常点A时,电子设备100可以显示视频应用的用户界面110。该用户界面110可以包括信号质量标识111、时间标识112、黑色圆点113、灰色圆点114。信号质量标识111用于表征电子设备100当前接入的是信号格数为5格(即满格)的5G网络,此时信号质量较好。时间标识112为“15:00/48:52”,其中,“48:52”用于表示视频应用当前播放的视频(即第17集视频)的总时长为48分钟52秒,“15:00”用于表示视频应用当前播放的画面是该视频在15分钟时的画面。和时间标识112对应,黑色圆点113用于表示当前已播放至15分钟。灰色圆点114用于表示当前已缓存至15分钟30秒。
当处于正常区域时,视频应用可以采用第一缓存策略缓存视频数据,其中,第一缓存策 略包括以下至少一种:采用第一下载速率下载所述目标应用的数据,采用第一码率下载所述目标应用的数据,采用第一分辨率下载所述目标应用的数据,采用第一帧率下载所述目标应用的数据,采用第一请求次数请求所述目标应用的数据,第一请求次数为单位时间内的请求次数。示例性地,视频应用在采用第一缓存策略缓存视频数据时,第一下载速率是每秒下载播放时长为10秒的视频数据。当视频应用下载的视频数据的播放时长等于第一使用时长(300秒,即5分钟)时,停止缓存视频数据,当视频应用下载的视频数据的播放时长小于或等于第二使用时长(30秒)时,继续缓存视频数据=也即:每次缓存第一使用时长的视频数据,直到剩余的缓存量的使用时长小于或等于第二使用时长,则继续缓存视频数据。
不限于上述示例的情况,在具体实现中,第一使用时长和第二使用时长也可以是其他数值。
如图1A所示,用户途径第一正常区域时,电子设备100接入的是信号格数为5格(即满格)的5G网络,信号质量较好,电子设备100的视频应用采用上述第一缓存策略缓存视频数据。当用户到达正常点A时,用户界面110中当前已缓存时长为15分钟30秒,当前已播放时长为15分钟,二者差值等于30秒。因此,从此刻起经过30秒,即用户从正常点A行进至正常点B的过程中,第一下载速率保持为每秒下载时长为10秒的视频数据。因此,在这30秒内会下载5分钟的视频数据,相应地,用户界面110中的黑色圆点113和灰色圆点114移动,时间标识112也发生改变。当用户到达正常点B时,用户界面110中黑色圆点113用于表示当前已播放至15分钟30秒,灰色圆点114用于表示当前已缓存至20分钟30秒。
如图1B所示,当用户从正常点B继续行进14分钟到达正常点C时,用户界面110中的黑色圆点113和灰色圆点114移动,时间标识112也发生改变。用户到达正常点C时,黑色圆点113用于表示当前已播放至29分钟30秒,灰色圆点114用于表示当前已缓存至30分钟,二者差值等于30秒。因此,接下来的30秒内,即用户从正常点C行进至异常点的过程中,会下载5分钟的视频数据。当用户到达异常点时,用户界面110中黑色圆点113用于表示当前已播放至30分钟,灰色圆点114用于表示当前已缓存至35分钟。此刻开始,也就是用户途径异常区域时,用户界面110中的信号质量标识111用于表征电子设备100无法接入网络,出现掉网,此时下载视频数据的速率为0。
如图1C所示,当用户从异常点继续行进5分钟到达中间点时,用户可以继续观看视频,则用户界面110中的黑色圆点113移动,时间标识112也发生改变。但由于异常区域内下载速率为0,即无法下载视频数据,则用户界面110中灰色圆点114不移动。当用户到达中间点时,用户界面110中黑色圆点113用于表示当前已播放至35分钟,灰色圆点114则仍表示当前已缓存至35分钟,此时黑色圆点113和灰色圆点114重合。当用户从中间点继续行进10分钟时(到达恢复点之前),用户界面110中灰色圆点114无法移动,因此用户无法继续观看视频,黑色圆点113和时间标识112也无法移动。
如图1C所示,当用户到达恢复点时,用户界面110中的信号质量标识111用于表征电子设备100接入的是信号格数为5格(即满格)的5G网络,信号质量较好,因此可以采用上述第一缓存策略继续下载视频数据,灰色圆点114可以移动。此时,灰色圆点114可以用于表示当前已缓存至35分钟30秒。后续用户从恢复点继续行进至公司时(即处于第二正常区域内时),网络服务正常,电子设备100的视频应用可以采用上述第一缓存策略继续正常工作,用户也可以继续通过视频应用观看视频。用户到达正常点D时,电子设备100显示的用户界面110中黑色圆点113用于表示当前已播放至35分钟30秒。
上述途径异常区域时,用户无法使用视频应用观看视频,从而导致用户体验感差。因此, 本申请实施例提供了一种数据缓存方法,该方法可以应用于电子设备,也可以应用于电子设备中的芯片或处理系统,例如华为移动服务(huawei mobile services,HMS)、安卓(Android)系统。电子设备可以在用户行进过程中执行业务异常预测,当预测到即将进入异常区域时,电子设备针对目标应用执行预缓存操作。其中,目标应用是在安装或运行时向系统的控制组件发送注册消息的应用,注册消息用于获取控制组件发送的用于指示前进方向存在异常区域的第一指示信息。控制组件可以是处理系统中的组件,例如HMS系统中的华为设备间通信移动服务(huawei mobile services hi device to device,HMS HiD2D)、安卓(Android)系统中的处理模块等。控制组件也可以是芯片或芯片中的模块,例如是调制解调器(modem)芯片中的模块。
其中,预缓存操作可以包括以下至少一项:增大下载速率,减小下载数据在单位时间内使用的数据量,增加单位时间内的请求次数。增大下载速率可以包含增加单位时间内的请求次数、增大单次请求的数据量。
示例性地,减小下载数据在单位时间内使用的数据量可以是:减小下载的视频数据在单位时间内播放的数据量,例如,减小下载的视频数据的分辨率、帧率、码率。示例性地,减小下载数据在单位时间内使用的数据量也可以是:减小下载的音频数据在单位时间内播放的数据量,例如,减小下载的音频数据的采样速率、采样位数、声道数。
因此,通过本申请实施例提供的数据缓存方法,即使是连续穿越隧道等异常区域的持续时长较长的情况,也可以尽可能使用户途径异常区域期间正常使用电子设备100中的目标应用,从而提升用户体验感。
基于上述提供的用户在上班路线中途径异常区域的应用场景,接下来介绍执行本申请实施例的数据缓存方法的过程。该上班路线具体可参见图1A-图1C所示的路线。用户从家出发之前打开电子设备100的视频应用,此时视频应用向电子设备100中的控制组件发送注册消息,以此获取第一指示信息。用户从家行进至公司的过程中,用户通过视频应用观看视频,控制组件持续执行预测过程并得到第一指示信息。该预测过程的说明可参见下图8-图13所示实施例,暂不详述。
用户途经第一正常区域时,电子设备100接入的是信号格数为5格(即满格)的5G网络,信号质量较好,电子设备100的视频应用采用上述第一缓存策略工作。用户从家行进至正常点C时(即处于第一正常区域时)的过程和图1A所示的过程一致,具体可参见图1A的说明。
如图1D所示,当用户到达正常点C时,控制组件将第一指示信息发送给视频应用。第一指示信息可以包括type,可选地,还可以包括第一时间t 1,可选地还可以包括第二时间t 2,可选地,还可以包括第三时间t 3。其中type取值为第一值表明存在异常区域,type取值为第二值表示之前发送的广播消息无效。t 1可以是进入异常区域的时刻,也可以是从当前位置到进入异常区域的时长(即从正常点C到达异常点的时长30秒)。t 2可以是离开异常区域的时刻,也可以是从当前位置到离开异常区域的时长。t 3可以是从进入异常区域到离开异常区域的时长(即从异常点到达恢复点的时长),也就是异常区域的持续时长。视频应用接收控制组件发送的第一指示信息,响应于第一指示信息,执行预缓存操作,可选地,在接收到第一指示信息的预设执行时长内(例如5毫秒、10毫秒、1秒、3秒等等),执行预缓存操作。通过预缓存操作可以延长缓存的视频数据的播放时长,或者延长缓存的其他数据的使用时长。
视频应用执行预缓存操作时,采用第二缓存策略缓存视频应用的数据,其中,第二缓存策略包括以下至少一种:采用第二下载速率下载目标应用的数据,采用第二码率下载目标应用的数据,采用第二分辨率下载目标应用的数据,采用第二帧率下载目标应用的数据,采用 第二请求次数请求目标应用的数据,第二请求次数为单位时间内的请求次数。第二下载速率大于第一下载速率,第二码率小于第一码率,第二分辨率小于第一分辨率,第二帧率小于第一帧率,第二请求次数大于第一请求次数。
假设预缓存操作是将下载速率增大至原本速率的预设倍(例如:1.8倍、3倍等等),以预设倍为3倍为例,则每秒下载时长为30秒的视频数据,且在下载至缓存达到第一使用时长的内容之后,不会停止缓存,而是继续缓存。假设用户从正常点C行进30秒到达异常点期间,视频应用采用第二缓存策略缓存视频数据。第二下载速率是第一下载速率的3倍,第一分辨率和第二分辨率相同或者第二分辨率小于第一分辨率、第一帧率和第二帧率相同或者第二帧率小于第一帧率、第一码率和第二码率相同或者第二码率小于第一码率。可选地,在此期间,单位时间内请求数据的次数可以更大,也即:第二请求次数大于第一请求次数。可选地,第二下载速率大于第一下载速率可以具体为:第二请求次数大于第一请求次数。其中,电子设备可以调整下载速率、码率、帧率、分辨率、单位时间内请求数据的次数中的一个或多个参数,电子设备可以调整这五个参数的任意组合。
如图1D所示,假设视频应用在用户从正常点C行进至异常点期间(即t 1内)执行上述预缓存操作,则t 1内下载了时长为15分钟的视频数据。因此,当用户到达异常点时,用户界面110中黑色圆点113用于表示当前已播放至30分钟,灰色圆点114用于表示当前已缓存至45分钟,这种情况下,缓存的内容(15分钟)大于第一预设时长(300s)。此刻开始,也就是用户途径异常区域时,视频应用采用第三下载速率下载视频数据,第三下载速率小于第一下载速率,或者,采用第三码率下载视频数据,第三码率小于或等于第二码率,或者,采用第三分辨率下载视频数据,第三分辨率小于或等于第二分辨率,或者,采用第三帧率下载视频数据,第三帧率小于或等于第二帧率,或者,采用第三请求次数下载视频数据,第三请求次数为单位时间内的请求次数,第三请求次数小于或等于第一请求次数。其中,用户界面110中的信号质量标识111用于表征电子设备100无法接入网络,出现掉网,因此第三下载速率为0。
在具体实现中,用户途径异常区域时也可能出现掉落至低网络制式的情况,则用户到达异常点时电子设备100显示的用户界面例如为图1E所示的用户界面110,该用户界面110中的信号质量标识111用于表征电子设备接入的信号格数为5格(即满格)的2G网络。用户途径异常区域时也可能出现信号质量较差的情况,则用户到达异常点时电子设备100显示的用户界面例如为图1F所示的用户界面110,该用户界面110中的信号质量标识111用于表征电子设备接入的信号格数为1格的5G网络。用户途径异常区域时也可能出现应用体验质量较差的情况,则用户到达异常点时电子设备100显示的用户界面例如为图1G所示的用户界面110,该用户界面110中的信号质量标识111虽然表征电子设备接入的信号格数为5格(即满格)的5G网络,但是应用程序的QoE较差,从而导致下载速率也较低。在上述三种情况下,第三速率小于第一速率,第三速率小于第一速率例如为:单位时间内的请求次数小于第一请求次数、单位时间内下载的数据量小于第一数据量。
如图1H所示,当用户从异常点继续行进5分钟到达中间点时,用户可以继续观看视频,则用户界面110中的黑色圆点113移动,时间标识112也发生改变。但由于异常区域内第二速率为0,即无法下载视频数据,则用户界面110中灰色圆点114不移动。第三分辨率小于或等于第二分辨率,或者,第三帧率小于或等于第二帧率,或者,第三码率小于或等于第二码率,或者,第三请求次数小于或等于第二请求次数。当用户到达中间点时,用户界面110中黑色圆点113用于表示当前已播放至35分钟,灰色圆点114则仍表示当前已缓存至45分钟。因此,当用户从中间点继续行进10分钟期间,黑色圆点113和时间标识112可以继续移 动,用户可以继续观看视频。
如图1H所示,假设用户从中间点到达恢复点的时长为9分钟,则当用户到达恢复点时,用户界面110中黑色圆点113用于表示当前已播放至44分钟,灰色圆点114则仍表示当前已缓存至45分钟。用户从恢复点行进至公司的过程中(即途径第二正常区域时),用户界面110中的信号质量标识111用于表征电子设备接入的信号格数为5格(即满格)的5G网络,信号质量较好,视频应用可以采用上述第一缓存策略下载视频数据。也就是说,下载视频数据的速率恢复为第一速率,或,该视频数据的分辨率恢复为第一分辨率,或视频数据的帧率恢复为第一帧率,或视频数据的码率恢复为第一码率。可选地,单位时间内的请求次数恢复为第一请求次数。可选地,下载视频数据的速率恢复为第一速率可以具体为:将单位时间内的请求次数恢复为第一请求次数。用户也可以继续通过视频应用观看视频,用户到达正常点D时,电子设备100显示的用户界面110中黑色圆点113用于表示当前已播放至45分钟。
在一些实施例中,若在到达异常区域之前,用户停止不动或偏移当前路线,则控制组件可以向视频应用发送type取值为第二值的第一指示信息,以通知视频应用之前发送的第一指示信息无效。例如,用户到达正常点C时,视频应用接收到type取值为第一值的第一指示信息,并执行预缓存操作,即采用第二缓存策略缓存视频数据。但当用户从正常点C行进至异常点期间停止不动、或者偏移路线不行进至异常点,则控制组件可以向视频应用发送type取值为第二值的第一指示信息。视频应用接收到type取值为第二值的第一指示信息,停止当前执行的预缓存操作,即采用第一缓存策略缓存视频数据。
假设预缓存操作是减小下载的视频数据的码率(例如减小至原本码率的
Figure PCTCN2021116165-appb-000001
倍、
Figure PCTCN2021116165-appb-000002
倍等等),以第二码率为第一码率的
Figure PCTCN2021116165-appb-000003
倍为例,则视频数据在单位时间内播放的数据量可以增大为原本的3倍。此时用户从正常点C行进至公司的过程可参见下图1I-图1K。
如图1I所示,假设视频应用在用户从正常点C行进至异常点期间(即t 1内)执行上述预缓存操作,则t 1内下载了时长为15分钟的视频数据。因此,当用户到达异常点时,用户界面110中黑色圆点113用于表示当前已播放至30分钟,灰色圆点114用于表示当前已缓存至45分钟,这种情况下,缓存的内容(15分钟)大于第一使用时长(300s)。此刻开始,也就是用户途径异常区域时,视频应用的工作方式可参见图1D的说明,不再赘述。
如图1I所示,当用户到达异常点时,实际为途径异常区域时,第三码率小于第一码率,或,第三分辨率小于第一分辨率,或第三码率小于第一码率,或第三帧率小于第一帧率,或,第三分辨率小于或等于第二分辨率,或第三码率小于或等于第二码率,或第三帧率小于或等于第二帧率。因此用户界面110的清晰度较差,其清晰度小于第一正常区域的清晰度,或其清晰度小于或等于从正常点C行进至异常点期间的清晰度。可选地,第三请求次数小于第一请求次数或第二请求次数。
如图1J所示,当用户从异常点继续行进5分钟到达中间点时,用户可以继续观看视频,则用户界面110中的黑色圆点113移动,时间标识112也发生改变。但由于异常区域内第二速率为0,即无法下载视频数据,则用户界面110中灰色圆点114不移动。当用户到达中间点时,用户界面110中黑色圆点113用于表示当前已播放至35分钟,灰色圆点114则仍表示当前已缓存至45分钟。因此,当用户从中间点继续行进10分钟期间,黑色113和时间标识112可以继续移动,用户可以继续观看视频。用户途径异常区域时视频应用播放的视频数据的分辨率、帧率、码率为第二分辨率,或第二帧率,或第二码率。第二码率小于第一码率,或,第二分辨率小于第一分辨率,或,第二帧率小于第一帧率,因此用户界面110的清晰度较差。
如图1J所示,假设用户从中间点到达恢复点的时长为9分钟,则当用户到达恢复点时,用户界面110中黑色圆点113用于表示当前已播放至44分钟,灰色圆点114则仍表示当前已缓存至45分钟。此时视频应用播放的视频数据的分辨率、帧率、码率仍为第二分辨率,或第二帧率,或第二码率,因此用户界面110的清晰度较差。用户从恢复点行进至公司的过程中(即途径第二正常区域时),用户界面110中的信号质量标识111用于表征电子设备接入的信号格数为5格(即满格)的5G网络,信号质量较好,视频应用可以采用上述第一缓存策略继续正常工作,用户也可以继续通过视频应用观看视频。
如图1K所示,当用户从恢复点继续行进1分钟到达正常点D时,用户界面110中黑色圆点113用于表示当前已播放至45分钟,用户界面110中的信号质量标识111用于表征电子设备接入的信号格数为5格(即满格)的5G网络,信号质量较好。虽然此时信号质量较好,但由于用户从正常点C到达异常点期间,视频应用下载了10分钟的数据,而用户从异常点到达恢复点期间仅播放了9分钟的视频。因此,在用户从恢复点继续行进1分钟到达正常点D期间,视频应用播放的视频的分辨率、码率、帧率仍为第二分辨率,或第二码率,或第二帧率,则用户界面110的清晰度仍然较差。后续用户从正常点D行进至公司的过程中,视频应用播放的视频数据可以是处于第二正常区域时下载的,该视频数据的分辨率、帧率、码率是第一分辨率,或第一帧率,或第一码率,因此用户界面110的清晰度正常。例如到达正常点E时,用户界面110中黑色圆点113用于表示当前已播放至45分钟30秒。
不限于图1K示例的情况,在具体实现中,也可以在用户从恢复点继续行进的时刻起,视频应用采用上述第一缓存策略重新下载44分钟之后的视频数据,且该视频数据的码率为第一码率,或者该视频数据的帧率为第一帧率,或者该视频数据的分辨率为第一分辨率。则一定时长后(例如5秒、10秒、30秒等等),视频应用播放的视频数据的码率为第一码率,或者该视频数据的帧率为第一帧率,或者该视频数据的分辨率为第一分辨率,因此显示的用户界面的清晰度正常。
可以理解地,图1B-图1C中,用户处于异常点、中间点时(即途径异常区域时),用户界面110中灰色圆点114表示已缓存至35分钟。并且,图1C中用户处于中间点时黑色圆点113和灰色圆点114重合。图1D和图1H、图1I-图1J中,用户处于异常点、中间点时(即途径异常区域时),用户界面110中灰色圆点114表示已缓存至45分钟。因此,图1B-图1C中,用户从中间点行进9分钟至恢复点期间无法继续观看视频。而图1D和图1H、图1I-图1J中,用户从中间点行进9分钟至恢复点期间可以继续观看视频。
在一些实施例中,用户可以在进入异常区域之前点击下一集,以使视频应用播放第18集的视频数据。假设用户在正常点C时点击下一集,则用户从正常点C行进至异常点的过程如下图1L或图1M所示。
如图1L所示,用户从家出发之前打开电子设备100的视频应用时,视频应用未向控制组件发送注册消息。当用户到达正常点C时,用户点击下一集。此时用户界面110还未播放视频数据,用户界面110包括的提示语115“立即播放…”用于提示用户即将播放第18集的视频。用户界面110中时间标识112还未获取成功,因此是“00:00/00:00”,黑色圆点113和灰色圆点114重合,表示当前已播放和已缓存均为0。用户从正常点C行进至异常点期间(即30秒内),视频应用保持在每秒下载时长为10秒的视频数据。则当用户到达异常点时,视频应用已下载300秒(即5分钟)的视频数据,因此用户界面110中黑色圆点113用于表示当前已播放至该视频的30秒,灰色圆点114用于表示当前已缓存至该视频的5分钟。
如图1M所示,用户从家出发之前打开电子设备100的视频应用时,视频应用向控制组 件发送注册消息。用户到达正常点C时的用户操作和用户界面110和图1L一致,不再赘述。但用户从正常点C行进至异常点期间(即30秒内),视频应用执行预缓存操作,假设该预缓存操作为图1D、图1H所示的增大下载速率为原本的3倍,或图1I-图1J所示的减小下载的视频数据的码率为原本的
Figure PCTCN2021116165-appb-000004
则当用户到达异常点时,视频应用已下载10分钟的视频数据,因此用户界面110中黑色圆点113用于表示当前已播放至该视频的30秒,灰色圆点114用于表示当前已缓存至该视频的15分钟。在相同的下载时长内,图1M中下载的视频数据的时长大于图1L中下载的视频数据的时长。
在一些实施例中,第一指示信息包括第一时间t 1和第二时间t 2,或者包括第三时间t 3。视频应用执行的预缓存操作用于在到达异常区域之前下载播放时长大于或等于异常区域的持续时长的视频数据,从而保证用户途径异常区域期间可以正常观看视频。异常区域的持续时长可以是根据第一时间t 1和第二时间t 2的差值得到的,也可以是根据第三时间t 3直接得到的。
在一些实施例中,视频应用播放视频时,视频应用每次向视频应用的服务器请求数据时,可以将请求数据的次数加一,并记录请求数据的次数。当播放至下一集的视频时,可以将当前记录的请求数据的次数清空,针对当前播放的视频重新开始上述记录过程。其他内容(例如:音频、网页、游戏等等)类似,示例性地,音频应用播放下一首歌曲时将当前记录的请求数据的次数清空,针对当前播放的歌曲重新记录请求数据的次数。
不限于图1A-图1M示例的情况,在具体实现中,电子设备100显示的用户界面110也可以不包括灰色圆点114,但实际缓存情况可以和灰色圆点114表示的缓存情况一致。
可以理解地,针对其他应用的缓存内容(例如:音频应用的音频数据,网页应用和游戏应用的文本数据、图片数据、视频数据、音频数据等等),下载时采用的第一缓存策略和第二缓存策略类似。例如,音频应用的第一缓存策略包括以下至少一种:采用第一下载速率下载目标应用的数据,采用第一采样频率下载目标应用的数据,采用第一采样位数下载目标应用的数据,采用第一声道数下载目标应用的数据,采用第一请求次数请求目标应用的数据。音频应用的第二缓存策略包括以下至少一种:采用第二下载速率下载目标应用的数据,采用第二采样频率下载目标应用的数据,采用第二采样位数下载目标应用的数据,采用第二声道数下载目标应用的数据,采用第二请求次数请求目标应用的数据。
例如,新闻应用的数据包括第一类型数据(即图片数据)和第二类型数据(即文字数据),新闻应用的第一缓存策略包括以下至少一种:采用第一下载速率下载所述目标应用的数据,采用第一分辨率下载所述目标应用的数据,缓存第一类型数据和第二类型数据。新闻应用的第二缓存策略包括以下至少一种:采用第二下载速率下载所述目标应用的数据,采用第二分辨率下载所述目标应用的数据,缓存第一类型数据且不缓存第二类型数据。
本申请实施例中,预测功能的开启和关闭可以是系统预设的,例如默认开启,也可以是用户自定义设置的。示例性地,用户可以在电子设备100显示的设置界面上打开“开启预测功能”选项,则电子设备100上的应用程序在安装或运行时均向控制组件发送注册消息,控制组件在用户行进过程中一直执行预测过程并得到第一指示信息。然后,控制组件可以将第一指示信息发送给上述发送了注册消息的应用程序,以使该应用程序执行预缓存操作。示例性地,电子设备100显示的设置界面可以包括针对不同应用程序的“开启预测功能”选项,用户可以在该设置界面上打开或关闭任意一个应用程序的“开启预测功能”选项。可以理解地,当该设置界面上至少一个应用程序的“开启预测功能”选项被打开时,控制组件就会在用户行进过程中一直执行预测过程并得到第一指示信息,但当该设置界面上每个应用程序的“开启预测功能”选项均被关闭时,控制组件可以停止执行预测过程。用户可以在该设置界面上打开视频应用的“开启预测功能”选项,则视频应用可以在安装或运行时向控制组件发 送注册消息,以使控制组件将第一指示信息发送给视频应用,视频应用可以根据第一指示信息执行预缓存操作,从而使用户途径异常区域时也可以正常使用视频应用。
本申请实施例中涉及的电子设备100可以是手机,平板电脑,桌面型、膝上型、笔记本电脑,超级移动个人计算机(Ultra-mobile Personal Computer,UMPC),手持计算机,上网本,个人数字助理(Personal Digital Assistant,PDA),可穿戴电子设备,智慧屏等设备。
接下来,介绍本申请以下实施例中提供的示例性电子设备。
请参见图2,图2示出了一种电子设备100的结构示意图。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器(modem),图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器(modem)可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理 后,被传递给AP。AP通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。上述无线通信技术可以包括全球移动通讯系统(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技术等。上述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
在一些实施例中,GNSS也可以通过独立的器件实现,例如电子设备100还包括定位模块。定位模块可以通过GNSS(如GPS)获取电子设备100的位置信息:经纬度信息,可选地,以及方向(角度)信息(例如东北方向),可选地,以及速度信息。
在一些实施例中,调制解调处理器可以通过移动通信模块150、无线通信模块160获取电子设备100的小区信息。例如,服务小区的标识(cell id)、邻小区的cell id、服务小区和/或邻小区的信号质量参数。信号质量参数例如但不限于是丢包率、信噪比、RSRP、RSRQ等。
在一些实施例中,AP可以接收调制解调处理器发送的小区信息,以此根据小区信息得到电子设备的位置信息:经纬度信息,可选地,以及方向(角度)信息(例如北偏东20度),可选地,以及速度信息。
在一些实施例中,AP可以接收业务异常通知事件,例如调制解调处理器上报的掉网、掉落至低网络制式、RSRP、RSRQ小于预设阈值的通知等。AP也可以自行统计至少一个应用程序的网络质量参数(例如带宽、时延)以得到综合数值QoE,QoE用于表征用户体验的网络、业务等服务的质量和性能。当AP接收到业务异常通知消息、确定QoE小于第一QoE等级时,AP可以确定网络服务异常、应用程序的业务服务异常。AP还可以接收定位模块或调制解调处理器发送的位置信息、调制解调处理器发送的小区信息。然后,AP可以执行学习过程,即基于上述信息进行异常区域的识别和统计,以得到异常区域的数据文件(后续也可以称为异常区域数据库)。其中,异常区域数据库包括至少一条记录,每一条记录用于标识一个异常区域以及包括该异常区域的信息。异常区域数据库的记录(即其中的异常区域的信息) 的示例可参见下图7中的表2,暂不详述。学习过程的实现具体可参见下图6-图7的说明,暂不详述。
在另一些实施例中,AP也可以通过移动通信模块150、无线通信模块160将上述信息发送给云端服务器,由云端服务器执行上述学习过程。可以理解地,云端服务器可以接收至少一个电子设备发送的用户途径路线上的相关信息,因此云端服务器学习得到的异常区域数据库中记录的异常区域可以是电子设备100未经过的异常区域。
本申请实施例中,处理器110可以根据上述学习过程得到的异常区域数据库、实时获取的小区信息,可选地,以及实时获取的位置信息,进行业务异常预测(后续简称预测过程),并得到第一指示信息。处理器110可以根据第一指示信息在向目标应用的服务器发送请求消息的过程中执行预缓存操作。第一指示信息的描述可参见图1A-图1M中第一指示信息的说明,不再赘述。
预缓存操作可以包括以下至少一项:增大下载速率,减小下载的数据在单位时间内使用的数据量,增加单位时间内请求数据的次数。其中,增大下载速率可以包括:增加单位时间内请求数据的次数,和/或增大单次请求消息中请求的数据量。示例性地,减小下载数据在使用时的单位时间内的数据量可以是:减小下载的视频数据在单位时间内播放的数据量,例如,减小下载的视频数据的分辨率、帧率、码率。示例性地,减小下载数据在使用时的单位时间内的数据量也可以是:减小下载的音频数据在单位时间内播放的数据量,例如,减小下载的音频数据的采样速率、采样位数、声道数。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
另外,对于电子设备100内各个部件的说明,可以参考公开号为:CN110519451A,发明名称为:一种电子设备的关机管控方法和装置的专利申请中,说明书第[0054]-[0104]段的相关说明,此处不予赘述。
请参见图3,图3是本申请实施例提供的又一种电子设备100的结构示意图。电子设备100可以包括业务异常预测单元310、上报单元320和应用单元330。业务异常预测单元310可以包括监听单元311、预测单元312,可选地,还可以包括学习单元313。上报单元320可以包括第一上报单元321、第二上报单元322、第三上报单元323。其中,业务异常预测单元310、上报单元320和应用单元330可以均属于图2所示的处理器110。例如,业务异常预测单元310和应用单元330属于AP,第一上报单元321为定位模块或AP,第二上报单元322为调制解调处理器,第三上报单元323为AP。电子设备100包括的各单元的描述如下所示:
监听单元311,用于监听信息。其中,监听的信息可以包括第一上报单元321发送的位置信息、第二上报单元322发送的小区信息、第三上报单元323发送的业务异常通知事件。例如,位置信息包括经纬度信息、方向信息、速度信息。小区信息包括服务小区的cell id、邻小区的cell id、服务小区和/或邻小区的信号质量参数(如丢包率、信噪比、RSRP、RSRQ)。业务异常通知事件包括RSRP、RSRQ小于预设阈值的通知消息,QoE小于第一QoE等级的通知消息。
在一些实施例中,监听单元311监听的信息可以发送给学习单元313执行学习过程。具体地,学习单元313可以基于这些信息进行异常区域的识别和统计,以得到异常区域数据库。异常区域数据库包括至少一条记录,每一条记录用于标识一个异常区域以及包括该异常区域的信息。异常区域数据库的记录(即其中的异常区域的信息)的示例可参见下图7中的表2,暂不详述。在另一些实施例中,监听单元311监听的信息也可以发送给云端服务器执行学习过程。该学习过程的说明具体可参见下图6-图7所示实施例,暂不详述。
预测单元312,用于根据监听单元311监听的实时信息、云端服务器或学习单元313发送的异常区域数据库(也可以称为历史记录)得到第一指示信息。并且,预测单元312可以触发业务异常广播,以此将第一指示信息发送给应用单元330。
具体地,对于地上等可以实现定位的区域,异常区域数据库可以包括有效的位置信息,监听单元311也可以监听到实时有效的位置信息。因此,预测单元312可以根据异常区域数据库、监听单元311发送的实时小区信息、实时位置信息执行预测过程,并得到第一指示信息,其中该过程的说明可参见下图8-图11所示实施例,暂不详述。而对于地铁、隧道等无法实现定位的区域,异常区域数据库不包括有效的位置信息,监听单元311也无法监听到实时有效的位置信息。因此,预测单元312可以根据异常区域数据库、监听单元311发送的实时小区信息执行预测过程,并得到第一指示信息,其中该过程的说明可参见下图12所示实施例,暂不详述。第一指示信息的说明可参见图1A-图1M中第一指示信息的描述,不再赘述。
具体地,应用单元330可以包括至少一个目标应用,目标应用的说明可参见图1A-图1M、下图4-图5的说明,暂不详述。应用单元330中的目标应用接收到第一指示信息后,执行预缓存操作,预缓存操作的说明可参见图1A-图1M中预缓存操作的描述,不再赘述。
在一些实施例中,预测单元312可以在进行预测过程并得到第一指示信息后,触发业务异常广播,以此将第一指示信息发送给应用单元330。
在另一些实施例中,预测单元312也可以在预测得到的进入异常区域的时长在第一预设时间范围内时,才触发业务异常广播,以此将第一指示信息发送给应用单元330。其中,第一预设时间范围可以是一个较小时长的范围,例如,[25秒,35秒]、[50秒,70秒]等等。第一预设时间范围也可以是根据场景信息决定的,例如上班路线中第一预设时间范围为[25秒,35秒],回老家路线中第一预设时间范围为[50秒,70秒]。通过该实施方式可以避免目标应用较早执行预缓存操作导致电子设备受影响,影响用户体验的情况,例如,增大下载速率导 致的电子设备功耗较高、流量消耗过快,减小下载的视频数据的分辨率、帧率、码率导致的后续显示的视频画面清晰度较低。可选地,若预测单元312根据电子设备100的实时位置信息得到第一指示信息,第一指示信息发送给应用单元330时,当前预测的电子设备所在位置和异常区域的距离较近,例如从当前位置进入异常区域的时长为30秒。在这种情况下,用户更改路线的可能性很小,即用户进入异常区域的可能性很大,从而提高预测的准确性。
可以理解地,电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构示例性说明电子设备100的软件系统。
图4是本申请实施例提供的电子设备100的软件系统的结构示意图。该软件系统可以是Android系统,也可以是HMS系统,还可以是微软视窗操作系统(microsoft windows)、操作系统内核(linux)、移动设备操作系统(iphone operation system,IOS)等软件系统。
分层架构将软件系统分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将软件系统分为四层,从上至下分别为应用程序层,应用程序框架层,内核层以及硬件层。
应用程序层可以包括一系列应用程序包。如图4所示,应用程序包可以包括相机,日历,导航,短信息,图库,通话,蓝牙,视频,音乐,游戏,学习等应用程序。图4以视频应用为目标应用为例进行说明。也就是说,视频应用在安装或运行时向应用程序框架层的注册模块发送注册消息,该注册消息用于向应用程序框架层的业务异常预测模块获取第一指示信息。第一指示信息的说明可参见图1A-图1M中第一指示信息的描述,不再赘述。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。如图4所示,应用程序框架层可以包括业务异常通知模块,控制组件,内容提供器,视图系统等。其中,控制组件可以包括注册模块、业务异常预测模块和收发模块。示例性地,若图4所示的软件系统是HMS系统,则控制组件可以是HMS中的HMS HiD2D。
业务异常通知模块可以用于接收应用程序的业务服务异常、网络服务异常的通知消息(也可以称为业务异常预测通知事件)。示例性地,业务异常通知模块可以接收应用程序层的应用程序发送的QoE小于第一QoE等级等应用程序的业务服务异常的通知消息。其中,QoE可以是根据应用程序的带宽、时延等参数综合得到的数值。业务异常通知模块也可以接收内核层的处理器驱动(如调制解调驱动)上报的掉网,掉落至低网络制式,信噪比、RSRP、RSRQ低于预设阈值,丢包率高于预设阈值等网络服务异常的通知消息。
注册模块可以用于接收应用程序层的视频应用发送的注册消息,从而确定视频应用为目标应用。注册模块也可以将目标应用为视频应用通知给控制组件中的业务异常预测模块、收发模块,以便后续将第一指示信息发送给目标应用。
业务异常预测模块可以用于根据异常区域数据库,内核层的处理器驱动(例如调制解调驱动)实时上报的小区信息进行预测过程,该预测过程的说明可参见下图8-图11所示实施例,暂不详述。可选地,业务异常预测模块还可以结合内核层的处理器驱动(例如调制解调驱动)或定位驱动实时上报的位置信息进行预测过程,该预测过程的说明可参见下图12所示实施例,暂不详述。
收发模块可以用于将业务异常预测模块得到的第一指示信息发送给应用程序层的视频应用。视频应用接收到第一指示信息后可以在电子设备100到达异常区域之前执行预缓存操作,预缓存操作的说明可参见图1A-图1M中预缓存操作的描述,不再赘述。
在一些实施例中,异常区域数据库可以是业务异常预测模块执行学习过程得到的。具体地,业务异常预测模块可以监听以下至少一种消息:内核层的处理器驱动(例如调制解调驱动)或定位驱动上报的位置信息,内核层的处理器驱动(例如调制解调驱动)上报的服务小区的cell id、邻小区的cell id、当前小区和/或邻小区的信号质量参数(如RSRP、RSRQ、丢包率、信噪比)等小区信息,业务异常通知模块上报的服务异常的通知消息。然后,业务异常预测模块可以基于上述消息进行异常区域的识别和统计,以得到异常区域数据库。不限于此,在具体实现中,也可以是云端服务器获取至少一个电子设备100监听的消息并执行学习过程,以得到上述异常区域数据库。该学习过程的说明具体可参见下图6-图7所示实施例,暂不详述。
可以理解地,业务异常预测模块执行学习过程或预测过程时,可以从应用程序层的应用程序(例如华为智能助手)获取用户途径路线的场景信息。不限于此,还可以通过应用程序框架层中的其他模块获取该场景信息,还可以自行识别得到该场景信息,本申请实施例对此不作限定。其中,该场景信息可以包括但不限于:路线类型(如上班路线、下班路线、游玩路线等)、路线起点(如家、公司)、路线终点等。
可以理解地,应用程序框架层的业务异常预测模块可以为图3中的业务异常预测单元310,应用程序框架层的业务异常通知模块,内核层的处理器驱动、定位驱动可以为图3中的上报单元320,应用程序层的视频应用可以为图3中的应用单元330。其中,业务异常通知模块可以为图3中的第三上报单元323,处理器驱动可以为图3中的第二上报单元322,也可以为第一上报单元321,定位驱动可以为图3中的第一上报单元321。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。这些数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
内核层是硬件和软件之间的层。内核层至少包含处理器驱动,定位驱动,显示驱动,传感器驱动。硬件层是电子设备100的硬件结构,可以至少包括处理器、定位模块、显示屏、传感器模块。其中,处理器驱动可以用于驱动硬件层中的处理器,定位驱动可以用于驱动硬件层的定位模块,显示驱动可以用于驱动硬件层中的显示屏,传感器驱动可以用于驱动硬件层中的多个传感器。在一些实施例中,定位模块也可以集成在处理器中,则定位驱动也可以集成在处理器驱动中。
在一些实施例中,硬件层的处理器可以包括应用处理器和调制解调处理器,内核层的处理器驱动也可以包括应用处理器驱动和调制解调驱动。其中,内核层的应用处理器驱动用于驱动硬件层中的应用处理器,内核层的调制解调驱动用于驱动硬件层中的调制解调处理器。
在一些实施例中,图4所示的软件系统为Android系统,则应用程序框架层和内核层之间还可以包括安卓运行时(Android runtime)和系统库。其中:
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理, 安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
下面结合用户途径异常区域的场景(如图1A-图1M所示的应用场景)介绍本申请实施例提供的一种数据缓存方法,具体如图5所示,该可以包括但不限于以下步骤:
S501:应用程序层的目标应用运行,且采用第一缓存策略缓存目标应用的数据。
具体地,第一缓存策略包括以下至少一种:采用第一下载速率下载所述目标应用的数据,采用第一码率下载所述目标应用的数据,采用第一分辨率下载所述目标应用的数据,采用第一帧率下载所述目标应用的数据,采用第一请求次数请求所述目标应用的数据,所述第一请求次数为单位时间内的请求次数;缓存第一类型数据和第二类型数据,所述第一类型和所述第二类型不同;采用第一采样频率下载所述目标应用的数据,采用第一采样位数下载所述目标应用的数据,采用第一声道数下载所述目标应用的数据;具体示例可参见图1A-图1M中第一缓存策略的说明,不再赘述。
S502:应用程序层的目标应用向应用程序框架层的注册模块发送注册消息。
具体地,目标应用可以在安装时、启动时、前台运行时、后台运行时、后台运行切换至前台运行时、前台运行切换至后台运行时,向注册模块发送注册消息。注册消息用于获取业务异常预测模块得到的第一指示信息。可选地,目标应用还可以在前台运行时、后台运行时、后台运行切换至前台运行时、前台运行切换至后台运行时,向注册模块发送去注册消息。去注册消息用于取消获取业务异常预测模块得到的第一指示信息。例如,目标应用在后台运行切换至前台运行时向注册模块发送注册消息,并且在前台运行切换至后台运行时向注册模块发送去注册消息。
具体地,注册消息用于注册第一通知事件。例如,注册模块接收视频应用发送的注册消息后,会将视频应用确定为注册有第一通知事件的目标应用,并通知控制组件中的业务异常预测模块和收发模块。因此,业务异常预测模块生成第一指示信息后会通过收发模块向注册有第一通知事件的视频应用发送第一指示信息(即执行S504)。去注册消息用于取消注册第一通知事件。例如,注册模块接收视频应用发送的去注册消息后,会将视频应用确定为未注册有第一通知事件的目标应用,并通知控制组件中的业务异常预测模块和收发模块。因此,业务异常预测模块生成第一指示信息后不会通过收发模块向视频应用发送第一指示信息。
示例性地,视频应用安装或运行时,调用应用程序框架层的函数:注册信号质量预测registeredSignalQualityPrediction(),从而通过该函数向注册模块发送注册消息。
S503:业务异常预测模块预测电子设备的前进方向上是否存在异常区域,在存在异常区域的情况下,生成第一指示信息。
具体地,异常区域是以下至少一种区域:信号质量小于预设阈值的区域;断网的区域;掉制式的区域,掉制式可以是第一网络制式(例如5G)变更为低于第一网络制式的第二网络制式(例如2G);体验质量QoE小于第一QoE等级的区域。其中,QoE等级越小,用户体 验越差,例如,QoE等级包括3个:0、1、2,0表示用户体验差,1表示用户体验一般,2表示用户体验好,第一QoE等级为1,异常区域是QoE等级为0的区域。
对于地上等可以获取位置信息的区域,业务异常预测模块可以根据异常区域数据库、实时获取的小区信息、位置信息进行预测过程,以得到第一指示信息,其中该预测过程具体可参见图8-图11所示实施例,暂不详述。对于地铁、隧道等无法获取位置信息的区域,业务异常预测模块可以根据异常区域数据库、实时获取的小区信息进行预测过程,以得到第一指示信息,其中该预测过程具体可参见图12所示实施例,暂不详述。异常区域、第一指示信息的说明可参见图1A-图1M中第一指示信息的说明,不再赘述。
在一些实施例中,异常区域与当前位置之间存在第一位置,当前位置与第一位置之间不存在其他小区,第一位置指控制组件发送所述第一指示信息的位置;或者,异常区域是和当前位置的距离在第一距离范围内的区域。第一位置例如图1A-图1M中的正常点C,图6、图9-图11中的预设点。
在一些实施例中,在预测得到的从电子设备当前位置进入异常区域的时长在第一预设时间范围时,控制组件通过收发模块向目标应用发送第一指示信息,其中,第一预设时间范围的说明可参见图1A-图1M中第一预设时间范围的描述,不再赘述。
S504:业务异常预测模块通过收发模块将第一指示信息以广播消息的形式发送给目标应用。
示例性地,收发模块可以通过应用程序框架层的函数:发送广播sendBroadcast()将第一指示信息发送给视频应用。
具体地,第一指示信息可以包括type,可选地,还可以包括第一时间信息t 1,可选地还可以包括第二时间信息t 2,可选地,还可以包括第三时间信息t 3。其中type取值为第一值表明存在异常区域,type取值为第二值表示之前发送的广播消息无效。t 1可以是进入异常区域的时刻,也可以是从当前位置到进入异常区域的时长。t 2可以是离开异常区域的时刻,也可以是从当前位置到离开异常区域的时长。t 3可以是从进入异常区域到离开异常区域的时长,也就是异常区域的持续时长。第一指示信息包括的参数的示例可参见下表1。
表1第一指示信息
Figure PCTCN2021116165-appb-000005
其中,type=1即为图1A-图1M所述的type取值为第一值,表示存在异常区域。type=0即为图1A-图1M、图2所述的type取值为第二值,type=0表示之前发送的表示存在异常区域的广播消息无效。第一指示信息也可以仅包含t 2,或者包含t 2与type,或者仅包含t 1,或者包含t 1与type,或者包含t 1与t 2,或者包含t 1、t 2与type,本申请实施例不作限制。
S505:目标应用接收到第一指示信息之后,采用第二缓存策略缓存目标应用的数据。
具体地,目标应用接收到type取值为第一值的第一指示信息时,执行预缓存操作,即采用第二缓存策略缓存目标应用的数据。该第二缓存策略包括以下至少一种:采用第二下载速率下载所述目标应用的数据,第二下载速率大于第一下载速率;采用第二码率下载目标应用的数据,第二码率小于第一码率;采用第二分辨率下载目标应用的数据,第二分辨率小于第 一分辨率;采用第二帧率下载目标应用的数据,第二帧率小于第一帧率;采用第二请求次数请求目标应用的数据,第二请求次数为单位时间内的请求次数,第二请求次数大于第一请求次数;缓存第一类型数据且不缓存第二类型数据;采用第二采样频率下载目标应用的数据,第二采样频率小于第一采样频率;采用第二采样位数下载目标应用的数据,第二采样位数小于第一采样位数;采用第二声道数下载目标应用的数据,第二声道数小于第一声道数。第二缓存策略的示例和预缓存操作的说明可参见图1A-图1M中第二缓存策略和预缓存操作说明。
具体地,响应于接收到所述第一指示信息,目标应用采用第二缓存策略缓存目标应用的数据,可选地,在接收到第一指示信息的第二预设时长内,启动采用第二缓存策略缓存目标应用的数据的步骤,第二预设时长可以是5毫秒、10毫秒、30毫秒等小于1秒的时长,也可以是1秒、3秒、5秒等等。第二预设时长即图1A-图1M中的预设执行时长。
在一些实施例中,目标应用接收第一指示信息后的第一时间t 1内执行预缓存操作,不限于此,还可以是接收到第一指示信息后的0.5×t 1内执行预缓存操作,本申请实施例对此不作限定。
在一些实施例中,在目标应用接收到第一指示信息之后,采用第二缓存策略缓存播放时长为第三预设时长(即异常区域的持续时长)的所述目标应用的数据,从而保证用户途径异常区域期间可以正常使用目标应用。其中,第三预设时长为根据第一时间信息t 1和第二时间信息t 2得到的时长(即t 1和t 2的差值),或者,第三预设时长为第三时长信息指示的时长。
接下来示例性示出不同类型的目标应用执行预缓存操作的过程。
示例性地,目标应用为视频应用。为了保障用户可以在异常区域内正常使用视频应用,例如正常观看图1A-图1M中用户界面110显示的视频,视频应用根据第一指示信息确定需在t 1内下载时长为(t 1+t 2)的视频数据,该时长为(t 1+t 2)的视频数据的数据量D 1的表达式的示例如下所示:
D 1=(t 1+t 2)×F×I-C
其中,F为该视频数据的帧率,I为该视频数据的分辨率,C为当前已缓存的视频的数据量。
相应地,视频应用缓存该视频数据的速率R 1的示例如下所示:
Figure PCTCN2021116165-appb-000006
因此,预缓存操作可以包括以下至少一项:增大R 1,降低I,降低F。相应地,视频应用缓存该视频数据的过程可以满足以下至少一项:R 1大于t 1之前的下载速率,I小于t 1之前缓存内容的分辨率,F小于t 1之前缓存内容的帧率。其中,R 1大于t 1之前的下载速率,具体可以是:向目标应用的服务器发送请求消息的频率大于t 1之前的频率,和/或,单个请求消息中请求下载的数据量大于t 1之前的数据量。
示例性地,目标应用为音频应用。为了保障用户可以在异常区域内正常使用音频应用,音频应用可以根据第一指示信息确定需在t 1内下载时长为t 2的音频数据,该时长为(t 1+t 2)的音频数据的数据量D 2表达式的示例如下所示:
D 2=t 2×H×B×S-Q
其中,H为该音频数据的采样频率,B为该音频数据的采样位数,S为该音频数据的声道数(例如8),Q为当前已缓存的音频的数据量。
相应地,音频应用缓存该音频数据的速率R 2的示例如下所示:
Figure PCTCN2021116165-appb-000007
因此,预缓存操作可以包括以下至少一项:增大R 2,降低H,降低B,降低S。相应地,音频应用缓存该音频数据的过程可以满足以下至少一项:R 2大于t 1之前的下载速率,H小于tt 1之前缓存内容的采样频率,B小于t 1之前缓存内容的采样位数,S小于t 1之前缓存内容的声 道数。
示例性地,目标应用为阅读应用。为了保障用户可以在异常区域内正常使用阅读应用,例如正常阅读文档,阅读应用可以根据第一指示信息确定需在t 1内下载用户在时长为(t 1+t 2)内阅读的数据量D 3。其中,D 3可以是阅读应用根据用户的阅读习惯确定的,阅读习惯例如是用户每秒阅读0.3页文档。因此,预缓存操作可以为增大t 1内下载D 3的速率。
示例性地,目标应用为新闻应用,该新闻应用的用户界面可以包括文字和图片。为了保障用户可以在异常区域内正常使用新闻应用,新闻应用可以根据第一指示信息确定需在t 1内下载用户在时长为(t 1+t 2)内所查看的数据量D 4。D 4可以是新闻应用根据用户查看新闻的习惯确定的,例如每秒查看0.2个新闻,且更喜欢查看不包括图片的新闻,则预缓存操作可以包括以下至少一项:增大下载速率、仅缓存文字不缓存图片。
示例性地,目标应用为游戏应用。为了保障用户可以在异常区域内正常使用游戏应用,游戏应用可以根据第一指示信息确定需在t 1内下载用户在时长为(t 1+t 2)内所使用的数据量D 5。其中,在线的游戏应用缓存的数据例如但不限于是游戏商场数据、好友数据等可以提前缓存的数据。游戏应用缓存的数据可以是游戏应用根据用户使用该游戏应用的习惯确定的,例如用户更喜欢使用游戏商场,而不是查看好友数据,则预缓存操作可以仅缓存游戏商场的数据而不缓存好友数据。
在图5所示的方法中,目标应用在接收第一指示信息前后采用不同的缓存策略缓存目标应用的数据,其中,接收第一指示信息前采用第一缓存策略在单位时间内下载的数据量的使用时长,小于,接收第一指示信息后采用第二缓存策略在单位时间内下载的数据量的使用时长。也就是说,在收到用于指示前进方向上存在异常区域的第一指示信息后,目标应用采用第二缓存策略缓存数据,从而增大单位时间内下载的数据量的使用时长,以此尽可能使用户途径异常区域时可以正常使用目标应用,避免业务卡顿,提升用户体验感。
在一些实施例中,电子设备100可以自行执行学习过程。接下来结合下图6所示的应用场景和图7所示的流程示意图介绍上述学习过程。
请参见图6,图6是本申请实施例提供的又一种用户途径异常区域的应用场景的示意图,图6所示的应用场景和图1A-图1M所示的应用场景类似,具体可参见图1A-图1M的说明。图6以家和异常点之间存在第一小区、第二小区为例进行说明。其中,第一小区、第二小区可以是单个小区,也可以是多个小区(例如邻小区)组成的小区群。不限于此,在具体实现中,还可以存在更多或更少的小区。
在一些实施例中,如图6所示,第二小区和异常点之间还存在预设点(例如图1A-图1M中的正常点C、图5所述的第一位置),预设点为预设的控制组件将第一指示信息发送给目标应用的位置,也可以理解为目标应用开始执行预缓存操作的位置。电子设备100预设的从预设点到异常点的时长为第一时长T_trig。第一时长可以是图3所示的第一预设时间范围中任意一个时长,例如30秒,具体可参见图3中第一预设时间范围的描述。不限于此,T_trig还可以等于从第二小区到达异常点的时长,即预设点为第二小区中的任意一点。T_trig还可以等于从第一小区到达异常点的时长,即预设点为第一小区中的任意一点。T_trig还可以小于从第二小区到达异常点的时长,但大于从第一小区到达异常点的时长,即预设点可以在第一小区和第二小区之间。本申请实施例对电子设备执行预缓存操作的具体时刻不作限定。
请参见图7,图7是本申请实施例提供的一种学习过程的流程示意图。该学习过程可以包括但不限于以下步骤:
S701:当监听到小区变化时,电子设备记录小区切换列表。
具体地,小区可以包括电子设备100的服务小区,可选地,还可以包括邻小区,可选地, 还可以包括服务小区、邻小区的信号质量参数(例如RSRP、RSRQ、丢包率、信噪比等)。相应地,电子设备记录的小区切换列表中可以包括服务小区的标识,可选地,还可以包括邻小区的标识,可选地,还可以包括服务小区、邻小区的信号质量参数。
示例性地,如图6所示,用户从家行进至公司的过程中,电子设备100监听消息:小区是否变化、小区信息、业务异常通知事件、业务恢复通知事件。用户从家行进至异常点的过程中,电子设备100监听到小区变化:第一小区变换为第二小区,则记录小区切换列表为:第一小区、第二小区。可选地,电子设备100还可以记录第一小区、第二小区的信息。
但需要说明的是,小区切换列表记录的可以是去乒乓后的小区信息,即第一次出现的小区信息。例如,用户从第一小区行进至第二小区的过程中,监听到小区变化:第一小区、第二小区、第一小区,则记录的小区切换列表是第一小区、第二小区。
S702:当监听到业务异常通知事件时,电子设备判断异常点是否存在围栏小区。
具体地,业务异常通知事件可以包括但不限于:掉网、掉落至低网络制式、信噪比、RSRP、RSRQ小于预设阈值、QoE小于第一QoE等级、丢包率大于预设阈值等。当监听到业务异常通知事件时,电子设备100认为当前位置为异常点。
具体地,围栏小区可以是一个或多个小区,用于衡量到达异常点的时长和确定途径路线,以便于电子设备100后续针对不同路线执行相应的预测过程。本申请实施例以围栏小区以两个小区为例进行说明,可以理解地,由于两点确定一条线,因此通过两个围栏小区来确定当前途径的路线的准确性更高,同时也无需记录过多的小区信息,减少电子设备100的存储压力和处理压力。其中,围栏小区中离异常点或预设点更远的称为第一围栏小区,离异常点或预设点更近的称为第二围栏小区。
电子设备可以通过S701记录的小区切换列表确定异常点或预设点外是否存在至少两个小区。当存在时,将异常点或预设点外最近的两个小区确定为围栏小区。示例性地,如图6所示,用户从家行进至异常点期间途径了第一小区和第二小区,电子设备100将第一小区和第二小区的信息记录在小区切换列表中。当用户到达异常点时,电子设备100监听到业务异常通知事件。然后,电子设备100可以根据小区切换列表确定异常点外存在第一小区和第二小区,因此将第一小区和第二小区确定为该异常点的围栏小区。当不存在时,不记录该异常区域的信息。示例性地,异常点和路线起点(如图6中的家)相邻,用户出发时还未途径其他小区就到达异常点,因此不记录该异常区域的信息。其中,异常区域的信息可以包括异常点的信息和恢复点的信息。
S703:当异常点存在围栏小区时,电子设备记录异常点的信息。
具体地,异常点的信息可以包括但不限于:围栏小区的信息、从第一围栏小区到达异常点的时长、从第二围栏小区到达异常点的时长、业务异常类型、业务异常发生次数。可选地,异常区域的信息还可以包括异常点的位置信息。其中,业务异常类型、业务异常发生次数可以在电子设备途径异常区域期间,通过监听的业务异常通知事件中获取,例如,业务异常发生次数是从进入异常区域到离开异常区域的过程中接收到的业务异常通知事件的数目。
示例性地,如图6所示,用户途径异常区域时,电子设备100记录异常点的信息:第二小区的标识信息、信号质量参数,从第二小区到达异常点的时长(第二时长T_avgfen)、途径异常区域时监听的业务异常通知事件中的业务异常类型、业务异常发生次数。若图6所示路线是地上等可以获取位置信息的路线,则电子设备100记录的异常点的信息还可以包括:异常点的经纬度信息、方向信息、速度信息。
S704:当监听到业务恢复通知事件时,电子设备记录恢复点的信息。
具体地,恢复点的信息可以包括但不限于从异常点到达恢复点的时长,可选地,还可以包括恢复点的位置信息。示例性地,如图6所示,用户到达恢复点时,电子设备100监听到业务恢复通知事件,则电子设备100记录恢复点的信息:从异常点到达恢复点的时长(第三时长T_avgrec)。若图6所示路线是地上等可以获取位置信息的路线,则电子设备100记录的恢复点的信息还可以包括:恢复点的经纬度信息、方向信息、速度信息。
S705:电子设备根据记录的异常区域的信息更新异常区域数据库。
具体地,异常区域的信息包括异常区域的起点(即异常点)的信息和异常区域的终点(即恢复点)的信息,电子设备100可以根据记录的异常区域的信息更新异常区域数据库中的原有记录或在该数据库中新增记录。假设异常区域数据库中存在用户从家行进至公司的路线(即上班路线)的记录,该记录的示例如下表2所示。
表2上班路线的异常区域的记录
Figure PCTCN2021116165-appb-000008
其中,scene=0表示路线类型为上班路线,示例性地,scene=1表示路线类型为下班路线,scene=2表示路线类型为游玩路线。weakType=0表示业务异常类型为掉网,示例性地,weakType=1表示业务异常类型为掉落至低网络制式,weakType=2表示业务异常类型为信号质量差(如RSRP和RSRQ小于预设阈值),weakType=3表示QoE小于第一QoE等级。
weakLoc=“116.2,40.6,17.79,23”表示异常点的经度为116.2、纬度为40.6、速度为17.79(单位例如为千米每小时)、方向角度为北偏东23度。recoverLoc=“116.3,40.2,18.6,25”表示恢复点的经度为116.3、纬度为40.2、速度为18.6(单位例如为千米每小时)、方向角度为北偏东25度。本申请实施例对位置信息的精度、单位、取值等表示方式不作限定。
firstFenceCell是第一围栏小区的cell id,secondFenceCell是第二围栏小区的cell id,cell id是唯一的标识。timestamp=“1599102391”表示最近一次进入异常区域的时间信息为“2020-09-03 11:06:30”。
historyTimeFence2Weak=“57,47,48,0,0”表示历史记录最近三次从第二围栏小区到达异常点的时长分别为57秒,47秒,48秒。historyTimeWeak2Recover=“34,33,32,0, 0”表示历史记录最近三次从异常点到达恢复点的时长分别为34秒,33秒,32秒。其中,“0”表示未途径异常区域,因此根据上述两个历史记录可以得到途径异常区域三次,对应count=“3”。
avgTimeFenceToWeak=“49”表示从第二围栏小区到达异常点的平均时长为49秒。在一些实施例中,avgTimeFenceToWeak可以是将historyTimeFence2Weak的数值取平均值得到的,具体计算过程如下所示:
Figure PCTCN2021116165-appb-000009
类似地,avgTimeWeakToRecover=“33”表示从异常点到达恢复点的平均时长为33秒。在一些实施例中,avgTimeWeakToRecover可以是将historyTimeWeak2Recover的数值取平均值得到的,具体计算过程如下所示:
Figure PCTCN2021116165-appb-000010
在具体实现中,avgTimeFenceToWeak也可以是将historyTimeFence2Weak的数值中的最大值和最小值去掉后再取平均值得到的,avgTimeWeakToRecover也可以是将historyTimeWeak2Recove的数值中的最大值和最小值去掉后再取平均值得到的,本申请实施例对此不作限定。
在一些实施例中,电子设备100途径的不是地上等可以获取位置信息的区域,而是地铁、隧道等无法获取位置信息的区域,则学习得到的异常区域的记录中weakLoc=“0,0,0,0”,recoverLoc=“0,0,0,0”。
不限于表2列举的情况,在具体实现中,异常区域的特征信息还可以包括从第一围栏小区到达异常点的时长、最后一次离开恢复点的时间戳等,本申请实施例对此不作限定。接下来以异常区域数据库包括的异常区域的信息为表2所示的信息为例进行说明。
在表2的基础上,假设电子设备100第四次途径上班路线的异常区域,则电子设备100可以根据此次记录的上班路线中异常区域的信息更新表2所示的记录,或在该数据库中新增该异常区域的记录。具体示例如下所示:
示例一,假设电子设备100第四次途径上班路线的异常区域时记录得到的scene、weakLoc、recoverLoc、firstFenceCell、secondFenceCell不变,则可以更新count为4、更新timeStamp为检测到业务异常通知事件的时间戳,此次即到达异常点的时间戳。假设此次记录的从第二小区到达异常点的时长T_fen=50,则可以将historyTimeFence2Weak更新为“57,47,48,50,0”,并且可以更新avgTimeFenceToWeak,更新过程如下所示。
首先计算更新后的historyTimeFence2Weak的平均值,计算过程如下所示:
Figure PCTCN2021116165-appb-000011
然后得到更新后的avgTimeFenceToWeak,计算过程如下所示:
avgTimeFenceToWeak=(1-a)×avgTimeFenceToWeak+a×t_newfence
其中,a的取值范围为[0,1],例如a=0.6。
更新historyTimeWeak2Recover、avgTimeWeakToRecover的过程和更新historyTimeFence2Weak、avgTimeFenceToWeak的过程类似,更新后的avgTimeWeakToRecover的计算过程如下所示:
avgTimeWeakToRecover=(1-b)×avgTimeWeakToRecover+b×t_newrecover
其中,t_newrecover为将更新后的historyTimeWeak2Recove的数值取平均值得到的。b的取值范围和a一致,a和b可以相同,也可以不同。
在具体实现中,计算更新后的historyTimeFence2Weak的平均值或historyTimeFence2Weak的平均值时,可以先去掉最大值和最小值后再取平均值,本申请实施例对此不作限定。
示例二,假设电子设备100第四次途径上班路线的异常区域时,检测得到的firstFenceCell、secondFenceCell不变,并且检测到业务异常预测通知事件时的位置(即异常点)和表2中weakLoc的差值小于预设阈值,例如距离小于100米,则电子设备100可以根据此次检测到的异常点和表2中weakLoc得到更新后的weakLoc,例如取这两个位置的中间位置。
类似地,假设电子设备100第四次途径上班路线的异常区域时,检测得到的firstFenceCell、secondFenceCell不变,并且检测到业务异常预测通知事件的位置(即恢复点)和表2中recoverLoc的差值小于预设阈值,例如距离小于100米,则电子设备100可以根据此次检测到的恢复点和表2中recoverLoc得到更新后的recoverLoc,例如取这两个位置的中间位置。
可以理解地,更新weakLoc和更新recoverLoc的方式可以相同,也可以不同。
示例三,假设电子设备100第四次途径上班路线的异常区域时,检测得到的firstFenceCell、secondFenceCell不变,并且检测到业务异常预测通知事件时的位置(即异常点)和表2中weakLoc的差值大于预设阈值,例如距离大于100米,则电子设备100可以在该数据库中重新添加一条此次检测的异常区域的记录。
类似地,假设电子设备100第四次途径上班路线的异常区域时,检测得到的firstFenceCell、secondFenceCell不变,并且检测到业务异常预测通知事件的位置(即恢复点)和表2中recoverLoc的差值大于预设阈值,例如距离大于100米,则电子设备100可以在该数据库中重新添加一条此次检测的异常区域的记录。
可以理解地,weakLoc对应的预设阈值和recoverLoc对应的预设阈值可以相同,也可以不同。
示例四,假设电子设备100第四次途径上班路线的异常区域时,检测到异常点外最近的两个小区中任意一个小区的cell id均不为表2中的firstFenceCell或secondFenceCell,则电子设备100可以在该数据库中重新添加一条此次检测的异常区域的记录。
示例五,电子设备100可以周期性地删除异常区域数据库中timeStamp小于预设阈值的记录,例如每隔一个月删除三个月未更新过的异常区域的记录。
不限于上述列举的示例,在具体实现中,假设电子设备100第四次途径上班路线的异常区域时,检测到的scene(例如游玩路线)不为表2中的scene(即上班路线),则电子设备100可以在该数据库中重新添加一条此次检测的异常区域的记录,本申请实施例对此不作限定。
不限于上述图7示例的学习过程,在具体实现中,电子设备也可以不记录小区切换列表,也不判断围栏小区。电子设备可以在检测到业务异常通知事件时,获取电子设备的位置信息,可选地,还可以获取以下至少一项信息:进入异常区域的时间,离开异常区域的时间,异常区域的持续时长,然后根据获取的位置信息和上述至少一项信息更新异常区域数据库。本申请实施例对此不作限定。
可以理解地,电子设备100每次途径同一路线,均可以执行图7所示的方法,从而获取到真实可靠的异常区域的信息,便于后续执行预测过程,提高第一指示信息的准确性。
接下来介绍预测过程,其中,对于地上等可以获取位置信息的区域,电子设备100执行的预测过程可参见图8-图11所示实施例。对于地铁、隧道等无法获取位置信息的区域,电子设备100执行的预测过程可参见图12所示实施例。
请参见图8,图8是本申请实施例提供的一种预测过程的流程示意图。图8以途径区域可以获取到经纬度信息和速度信息为例进行说明。该预测过程可以包括但不限于以下步骤:
S801:电子设备确定与当前已经过的小区匹配的异常区域数据库中的目标记录。
具体地,电子设备100确定已途径至少两个小区时,电子设备100可以从异常区域数据库中提取“途径异常区域的次数count”大于预设阈值(例如3)的至少一条记录,并且从该至少一条记录中确定目标记录。目标记录中“第一围栏小区的标识firstFenceCell”、“第二围栏小区的标识secondFenceCell”为电子设备100当前已经过的两个连续的小区的标识。当存在目标记录时,电子设备100确定已途径目标记录中的围栏小区,即当前路线的场景信息为目标记录中的场景信息(例如表2的上班路线)。
在一些实施例中,电子设备100也可以获取当前路线的场景信息,若该场景信息为所述异常区域数据库中存在的“场景信息scene”,并且确定已途径至少两个小区时,电子设备可以执行S801。
示例性地,请参见图9,图9是本申请实施例提供的又一种用户途径异常区域的应用场景的示意图,图9所示的应用场景和图1A-图1M和图6类似,具体可参见图1A-图1M和图6的说明。
如图9所示,用户从家行进至第一点的过程中,电子设备100途径了第一小区和第二小区。当电子设备100到达第二小区时,电子设备100可以从异常区域数据库中确定“firstFenceCell”为第一小区的标识、“secondFenceCell”为第二小区的标识的目标记录,即围栏小区为第一小区和第二小区的目标记录。接下来以表2所示的记录为目标记录为例进行说明。
S802:电子设备获取目标记录中异常点的位置信息、恢复点的位置信息、从第二围栏小区到达异常点的平均时长T_avgfen、从异常点到达恢复点的平均时长T_avgrec。
具体地,电子设备获取目标记录中异常点的经纬度信息S_drop和速度信息V_drop,以及恢复点的经纬度信息S_rec和速度信息V_rec。
示例性地,目标记录为表2所示的记录,则获取的信息为:表2中异常点的weakLoc、恢复点的recoverLoc,从第二围栏小区到达异常点的平均时长avgTimeFenceToWeak(即图6中的T_avgfen),从异常点到达恢复点的平均时长avgTimeWeakToRecover(即图6中的T_avgrec)。按照目标记录,电子设备100途径第二小区、异常点和恢复点的所需时长可参见上图6所示的时长。
S803:电子设备获取当前位置的位置信息。
具体地,当用户到达第二小区(例如图9所示的第二小区内的第一点)时,电子设备100第一次获取当前位置的经纬度信息S_Loc和速度信息V_Loc。
S804:电子设备根据目标记录和当前位置的位置信息计算得到第四时长T_drop和第五时长T_rec。
具体地,第四时长T_drop为根据目标记录、当前位置的经纬度信息、速度信息计算得到从当前位置到达异常点的时长,第五时长T_rec为根据目标记录、当前位置的经纬度信息、速度信息计算得到从异常点到达恢复点的时长。
示例性地,如图9所示,第四时长T_drop为电子设备100在第一点时计算得到的到达异常点的时长,计算方式如下所示:
首先计算第一点S_Loc和异常点S_drop之间的距离D_Loctodrop;
然后计算第一点S_Loc和异常点S_drop之间的平均速度V_Loctodrop,表达式如下所示:
Figure PCTCN2021116165-appb-000012
最后根据D_Loctodrop和V_Loctodrop得到第四时长T_drop,表达式如下所示:
Figure PCTCN2021116165-appb-000013
第五时长T_rec为电子设备100在第一点时计算得到的从异常点到达恢复点的时长,计算方式如下所示:
首先计算异常点S_drop和恢复点S_rec之间的距离D_droptorec;
然后计算异常点S_drop和恢复点S_rec之间的平均速度V_droptorec,表达式如下所示:
Figure PCTCN2021116165-appb-000014
最后根据D_droptorec和V_droptorec得到第五时长T_rec,表达式如下所示:
Figure PCTCN2021116165-appb-000015
S805:电子设备根据目标记录中从第二围栏小区到达异常点的平均时长T_avgfen得到第六时长T_newfen。
具体地,按照目标记录,从当前位置到达异常点的第六时长T_newfen是从第二小区到达异常点的平均时长T_avgfen减去从第二小区到达当前位置的时长得到的。示例性地,如图9所示,当前位置为第二小区中的第一点,即从第二小区到达当前位置的时长为0,则T_newfen=T_avgfen-0=T_avgfen。
S806:电子设备根据第四时长T_drop和第六时长T_newfen得到第七时长T_newdrop。
具体地,T_newdrop为电子设备100在第一点时预测得到的从当前位置到达异常点的时长。T_newdrop的表达式的示例如下所示:
T_newdrop=c×T_drop+(1-c)×T_newfen
其中,c的取值范围为[0,1],例如,c=0,c=0.6或c=1。
S807:电子设备根据第五时长T_rec和第三时长T_avgrec得到第八时长T_newrec。
具体地,T_newrec为电子设备100在第一点时预测得到的从异常点到达恢复点的时长。T_newrec的表达式的示例如下所示:
T_newrec=d×T_rec+(1-d)×T_avgrec
其中,d的取值范围为[0,1],例如,d=0,d=0.6或d=1。c和d可以相同,也可以不同。
示例性地,如图9所示,电子设备100在第一点时,预测得到的到达异常点的时长为:结合实时位置计算的第四时长T_drop和根据目标记录得到的第六时长T_newfen得到的第七时长T_newdrop。电子设备100在第一点时,预测得到的从异常点到达恢复点的时长为:结合实时位置计算的第五时长T_rec和目标记录中的第三时长T_avgrec得到的第八时长T_newrec。
S808:电子设备判断第七时长T_newdrop是否小于或等于第一时长T_trig。
S809:电子设备执行预缓存操作。
具体地,电子设备100判断是否满足T_newdrop≤T_trig。当满足时,电子设备100确定当前位置已途径预设点(例如当前位置为图10所示的第二点),则电子设备100根据第一指示信息针对目标应用执行预缓存操作(即执行S809)。否则,电子设备100执行S810。
具体地,电子设备根据第一指示信息执行预缓存操作也就是上述目标应用接收控制组件发送的第一指示信息,并采用第二缓存策略缓存目标应用的数据。第一指示信息、第二缓存策略和预缓存操作的描述可参见图1A-图1M、图3、图5中第一指示信息和预缓存操作的说 明,不再赘述。
可以理解地,图6中已说明预设点的多种情况,例如预设点可以就是第二小区中任意一点,则预设时长等于第一次得到的第七时长T_newdrop。此时,电子设备可以直接执行S809,无需执行S808和S810。
在一些实施例中,每次执行S803时,可以将获取位置的次数Cnt加1。具体地,获取位置的次数Cnt初始值为0,当用户到达第二小区时,电子设备100第一次获取当前位置的经纬度信息S_Loc和速度信息V_Loc,此时,获取位置的次数Cnt=Cnt+1=0+1=1。
在此基础上,S808可以具体包括:电子设备100判断是否满足:获取位置的次数Cnt≥第一阈值C_max(例如5)且(T_newdrop-T_trig)>第二阈值Th(例如5秒)。当满足时,电子设备100认为此次预测过程不准确并停止预测,否则,电子设备100继续执行:判断是否满足T_newdrop≤T_trig,当满足时,电子设备100根据第一指示信息针对目标应用执行预缓存操作(即执行S809),否则,电子设备100执行S810。或者,电子设备100判断是否满足Cnt≥C_max且(T_newdrop-T_trig)≤Th。当满足时,电子设备100确定当前位置虽然未途径预设点,但和预设点的距离很近(例如图11所示的第三点),则电子设备100根据第一指示信息针对目标应用执行预缓存操作(即执行S809)。否则,电子设备100执行S810。
本申请实施例中,预测过程可以增加获取位置次数的限定,从而在保证第一指示信息的准确性的同时,尽量避免电子设备不必要的功耗和开销,提升续航能力。
S810:电子设备根据第七时长T_newdrop和第一时长T_trig得到第九时长T_test。
具体地,第九时长T_test为从当前时刻到下次执行S803所经过的时长。示例性地,电子设备100可以采用二分法计算T_test,T_test的表达式如下所示:
Figure PCTCN2021116165-appb-000016
S811:电子设备判断经过时长是否大于或等于第九时长T_test。
具体地,当电子设备100判断当前已经过的时长大于或等于T_test时,即已经到达下次获取当前位置的位置信息的时刻,则电子设备100执行S803,否则继续等待。示例性地,如图9所示,用户在第一点的时刻为第一时刻,用户下次执行S803的时刻为从第一时刻起经过时长T_test的时刻,即第一时刻和T_test之和。
需要说明的是,S801-S802和S803的顺序不做限定,也可以同时执行。S804-S806和S807的顺序不做限定,也可以同时执行。S804和S805的顺序不做限定,也可以同时执行。
在图8所示的方法中,电子设备可以根据异常区域数据库中的历史记录、实时获取的小区信息和位置信息执行预测过程并得到第一指示信息和发送第一指示信息的时刻,从而增加了判断是否存在异常区域的准确性,尽量避免不存在异常区域时采用第二缓存策略缓存数据或存在异常区域时未检测到的情况,提升用户体验感。
若第一指示信息包括进入异常区域的时间和异常区域的持续时长,并且目标应用执行的预缓存操作可以是根据第一指示信息决定的,例如预缓存操作下载数据的播放时长为异常区域的持续时长。电子设备的实时位置信息变化时,例如移动速度较快或者较慢时,得到的第一指示信息不同,因此根据第一指示信息决定的预缓存操作也可以不同。从而可以根据不同的应用场景动态地调整预缓存操作,从而保证不同的应用场景下用户途径异常区域时目标应用可以正常使用,避免业务卡顿,提升用户体验感。
请参见图12,图12是本申请实施例提供的又一种预测过程的流程示意图。图12以途径区域无法获取到经纬度信息和速度信息为例进行说明。该预测过程可以包括但不限于以下步 骤:
S1201:电子设备确定与当前已经过的小区匹配的异常区域数据库中的目标记录。
具体地,S1201和图8的S801类似,不再赘述。
S1202:电子设备获取目标记录中从第二围栏小区到达异常点的平均时长T_avgfen、从异常点到达恢复点的平均时长T_avgrec。
示例性地,目标记录为表2所示的记录,则获取的信息为:从第二围栏小区到达异常点的平均时长avgTimeFenceToWeak(即图6中的T_avgfen),从异常点到达恢复点的平均时长avgTimeWeakToRecover(即图6中的T_avgrec)。按照目标记录,电子设备100途径第二小区、异常点和恢复点所需时长可参见上图6所示的时长。
S1203:电子设备判断经过时长是否等于(T_avgfen-T_trig)。
S1204:电子设备执行预缓存操作。
具体地,当电子设备100判断当前已经过的时长小于(T_avgfen-T_trig)时,即电子设备100未到达预设点,则电子设备100继续等待。示例性地,当用户处于图9所示的第二小区内的第一点时,电子设备100执行S1202-S1203,此时,经过时长等于0。由于图9中预设点距离异常点比第二小区距离异常点更近,则从预设点到达异常点的时长T_trig小于目标记录中的T_avgfen,(T_avgfen-T_trig)>0。因此,经过时长小于(T_avgfen-T_trig),则电子设备100继续等待。
具体地,电子设备根据第一指示信息执行预缓存操作也就是上述目标应用接收控制组件发送的第一指示信息,并采用第二缓存策略缓存目标应用的数据。第一指示信息、第二缓存策略和预缓存操作的描述可参见图1A-图1M、图3、图5中第一指示信息和预缓存操作的说明,不再赘述。
当电子设备100判断当前已经过的时长等于(T_avgfen-T_trig)时,即电子设备10已到达预设点时(例如图11所示的第三点),电子设备100根据第一指示信息针对目标应用执行预缓存操作(即执行S1204)。可选地,第一指示信息包括从当前位置(即预设点)到达异常点的时长T_trig、异常点到达恢复点的时长T_avgrec。
可以理解地,图6中已说明预设点的多种情况,例如预设点可以就是第二小区中任意一点,则第一时长T_trig等于T_avgfen。此时,电子设备可以直接执行S1204,无需执行S1203。
在图12所示的方法中,对于无法获取位置信息的区域,电子设备可以根据异常区域数据库中的历史记录、实时获取的小区信息执行预测过程并得到第一指示信息。并且,可以根据第一指示信息针对目标应用执行预缓存操作,从而尽可能使途径异常区域时目标应用可以正常使用,避免业务卡顿,提升用户体验感。
不限于图8和图12所示的预测过程,在具体实现中,电子设备也可以仅获取电子设备的当前位置信息,并在异常区域数据库中确定是否和当前位置信息对应的异常区域记录,在存在的情况下生成第一指示信息,并发送第一指示信息。或者,电子设备也可以既获取电子设备的位置信息也获取电子设备的当前位置信息,并在异常区域数据库中确定是否存在和当前小区信息对应且和当前位置信息对应的异常区域记录,在存在的情况下生成第一指示信息,并发送第一指示信息。本申请实施例对此不作限定。
可以理解地,电子设备100途径任意路线时,可以执行图7所示的学习过程,和/或,图8或图12所示的预测过程。
基于上述图1A-图1M、图2-图12所示的一些实施例,下面介绍本申请提供的数据缓存 方法。
请参见图13,图13是本申请实施例提供的一种数据缓存方法。该方法可以应用于图2所示的电子设备100、电子设备100的处理器110。该方法也可以应用于图3所示的电子设备100。该方法也可以应用于图4所示的软件系统,例如电子设备100的Android系统、HMS系统。该方法可以包括但不限于如下步骤:
S1301:针对第一异常区域,电子设备执行第一预测过程,针对第二异常区域,电子设备执行第二预测过程,以得到第一指示信息。
具体地,第一异常区域为电子设备可以获取位置信息的区域。电子设备可以根据异常区域的数据库、实时获取的网络信息、位置信息执行第一预测过程,以得到第一指示信息,其中第一预测过程的具体实现可参见图8-图11所示实施例。第二异常区域为电子设备无法获取位置信息的区域。电子设备可以根据异常区域的数据库记录、实时获取的网络信息执行第二预测过程,以得到第一指示信息,其中第二预测过程的具体实现可参见图12所示实施例。
在一些实施例中,S1301之前,该方法还可以包括:监听信息。具体地,监听的信息可以包括但不限于:电子设备的经纬度信息、速度信息、方向信息等位置信息,电子设备的服务小区的cell id、邻小区的cell id、当前小区和/或邻小区的信号质量参数等小区信息,RSRP、RSRQ小于预设阈值,QoE小于第一QoE等级等网络、业务服务异常的通知消息。
在一些实施例中,S1301之前,该方法还可以包括:执行学习过程。具体地,电子设备可以基于上述监听的信息进行异常区域的识别和统计,以生成上述异常区域数据库。在另一些实施例中,上述异常区域数据库也可以是云端服务器基于至少一个电子设备发送的监听信息执行学习过程得到的。学习过程的说明具体可参见图6-图7所示实施例,不再赘述。
S1302:电子设备根据第一指示信息执行预缓存操作。
具体地,电子设备根据第一指示信息执行预缓存操作也就是上述目标应用接收控制组件发送的第一指示信息,并采用第二缓存策略缓存目标应用的数据。具体可参见上述图1A-图1M、图3、图5中预缓存操作和第二缓存策略的说明,不再赘述。
具体地,第一指示信息可以包括type,可选地,还可以包括第一时间信息t 1,可选地还可以包括第二时间信息t 2,可选地,还可以包括第三时间信息t 3。其中type取值为第一值表明存在异常区域,type取值为第二值表示之前发送的广播消息无效。t 1可以是进入异常区域的时刻,也可以是从当前位置到进入异常区域的时长。t 2可以是离开异常区域的时刻,也可以是从当前位置到离开异常区域的时长。t 3可以是从进入异常区域到离开异常区域的时长,也就是异常区域的持续时长。在图8-图11所示的第一预测过程中,第一时间t 1是第七时长T_newdrop,第二时间t 2是第八时长T_newrec,第三时间t 3是二者的差值。在图12所示的第二预测过程中,第一时间t 1为第一时长T_trig,第二时间t 2是第三时长T_avgrec,第三时间t 3是二者的差值。
具体地,预缓存操作可以针对目标应用。目标应用为具备缓存机制的在线应用,例如音频应用、视频应用、学习应用、阅读应用等。可选地,目标应用为在安装或运行时注册了业务异常预测通知事件的应用,具体可参见图1A-图1M、图2-图5中目标应用的说明。
在图13所示的方法中,对于可以获取位置信息的区域和无法获取位置信息的区域,电子设备执行的预测过程可以不同,从而可以很好地适用于不同的应用场景,尽可能提高第一指示信息的准确性。电子设备可以根据第一指示信息执行预缓存操作,从而保证途径异常区域期间电子设备可以正常使用,避免业务卡顿,提升用户体验感。
并且,电子设备执行预测过程所使用的异常区域数据库是电子设备或云端服务器学习历史监听的信息得到的,保证了预测过程所使用数据的真实性和可靠性,从而进一步提高第一 指示信息的准确性。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。上述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行上述计算机程序指令时,全部或部分地产生按照本申请上述的流程或功能。上述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。上述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,上述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。上述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。上述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk)等。
总之,以上上述仅为本发明技术方案的实施例而已,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (25)

  1. 一种数据缓存方法,其特征在于,应用于电子设备,所述电子设备包括目标应用和控制组件,所述方法包括:
    所述电子设备运行所述目标应用,且采用第一缓存策略缓存所述目标应用的数据,所述第一缓存策略包括以下至少一种:采用第一下载速率下载所述目标应用的数据,采用第一码率下载所述目标应用的数据,采用第一分辨率下载所述目标应用的数据,采用第一帧率下载所述目标应用的数据,采用第一请求次数请求所述目标应用的数据,所述第一请求次数为单位时间内的请求次数;缓存第一类型数据和第二类型数据,所述第一类型和所述第二类型不同;采用第一采样频率下载所述目标应用的数据,采用第一采样位数下载所述目标应用的数据,采用第一声道数下载所述目标应用的数据;
    所述目标应用接收所述控制组件发送的第一指示信息;
    在所述目标应用接收到所述第一指示信息之后,采用第二缓存策略缓存所述目标应用的数据,所述第二缓存策略包括以下至少一种:采用第二下载速率下载所述目标应用的数据,所述第二下载速率大于所述第一下载速率;采用第二码率下载所述目标应用的数据,所述第二码率小于所述第一码率;采用第二分辨率下载所述目标应用的数据,所述第二分辨率小于所述第一分辨率;采用第二帧率下载所述目标应用的数据,所述第二帧率小于所述第一帧率;采用第二请求次数请求所述目标应用的数据,所述第二请求次数为单位时间内的请求次数,所述第二请求次数大于所述第一请求次数;缓存所述第一类型数据且不缓存所述第二类型数据;采用第二采样频率下载所述目标应用的数据,所述第二采样频率小于所述第一采样频率;采用第二采样位数下载所述目标应用的数据,所述第二采样位数小于所述第一采样位数;采用第二声道数下载所述目标应用的数据,所述第二声道数小于所述第一声道数。
  2. 如权利要求1所述的方法,其特征在于,在所述目标应用接收所述控制组件发送的第一指示信息之前,所述方法还包括:所述目标应用向所述控制组件发送注册消息;所述注册消息用于获取所述第一指示信息,所述第一指示信息用于指示所述电子设备的前进方向上存在异常区域,所述异常区域是以下至少一种区域:信号质量小于预设阈值的区域;断网的区域;掉制式的区域,所述掉制式是第一网络制式变更为低于所述第一网络制式的第二网络制式;体验质量QoE小于第一QoE等级的区域。
  3. 如权利要求2所述的方法,其特征在于,所述异常区域与当前位置之间存在第一位置,当前位置与所述第一位置之间不存在其他小区,所述第一位置指所述控制组件发送所述第一指示信息的位置;或者,所述异常区域是和当前位置的距离在第一距离范围内的区域。
  4. 如权利要求2或3所述的方法,其特征在于,所述方法还包括:在从所述电子设备当前位置进入所述异常区域的时长在第一预设时间范围时,所述控制组件向所述目标应用发送所述第一指示信息。
  5. 如权利要求2所述的方法,其特征在于,所述目标应用向所述控制组件发送注册消息,包括:所述目标应用在检测到所述目标应用从后台运行切换到前台运行或者启动时,向所述控制组件发送所述注册信息。
  6. 如权利要求2或3所述的方法,其特征在于,所述方法还包括:
    获取所述电子设备的当前小区信息;在异常区域的数据文件中确定是否存在和所述当前小区信息对应的异常区域记录;在存在所述异常区域的情况下,所述控制组件生成所述第一指示信息;或者,
    获取所述电子设备的当前位置信息;在所述异常区域的数据文件中确定是否存在和所述当前位置信息对应的异常区域记录;在存在所述异常区域的情况下,所述控制组件生成所述第一指示信息;或者,
    获取所述电子设备的所述当前小区信息和所述当前位置信息;在所述异常区域的数据文件中确定是否存在和所述当前小区信息对应且和所述当前位置信息对应的异常区域记录;在存在所述异常区域的情况下,所述控制组件生成所述第一指示信息。
  7. 如权利要求2或3所述的方法,其特征在于,所述方法还包括:
    获取所述电子设备的当前小区信息和当前位置信息;
    在异常区域的数据文件中确定是否存在和所述当前小区信息对应的异常区域记录;
    在存在所述异常区域记录的情况下,所述控制组件生成所述第一指示信息;所述当前位置信息用于确定发送所述第一指示信息的时刻。
  8. 如权利要求6或7所述的方法,其特征在于,所述方法还包括:
    获取所述电子设备经过小区的信息;当检测到业务异常通知事件时,在所述电子设备经过小区的信息中确定第二预设时间范围之前是否经过至少一个小区;在经过所述至少一个小区的情况下,在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录,所述第一异常区域记录或所述第二异常区域记录包括所述至少一个小区的信息;所述业务异常通知事件用于指示以下至少一项信息:信号质量小于预设阈值,断网,第一网络制式变更为低于所述第一网络制式的第二网络制式,QoE小于第一QoE等级;或者,
    当检测到所述业务异常通知事件时,获取所述电子设备的位置信息,并在所述异常区域的数据文件中添加第三异常区域记录,或者更新所述异常区域的数据文件中的第四异常区域记录,所述第三异常区域记录或所述第四异常区域记录中的位置信息是根据所述电子设备的位置信息得到的。
  9. 如权利要求8所述的方法,其特征在于,所述在经过所述至少一个小区的情况下,在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录,包括:
    在经过所述至少一个小区的情况下,获取所述电子设备的位置信息,并在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录,所述第一异常区域记录或所述第二异常区域记录包括所述至少一个小区的信息,所述第一异常区域记录或所述第二异常区域记录中的位置信息是根据所述电子设备的位置信息得到的。
  10. 如权利要求8所述的方法,其特征在于,所述在经过所述至少一个小区的情况下,在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中 的第二异常区域记录,包括:
    在经过所述至少一个小区的情况下,获取以下至少一项信息:进入所述异常区域的时间、离开所述异常区域的时间、所述异常区域的持续时长;在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录;所述第一异常区域记录或所述第二异常区域记录中的进入异常区域的时间是根据所述进入所述异常区域的时间得到的,或者,所述第一异常区域记录或所述第二异常区域记录中的离开异常区域的时间是根据所述离开所述异常区域的时间得到的,或者,所述第一异常区域记录或所述第二异常区域记录中的异常区域的持续时长是根据所述异常区域的持续时长得到的。
  11. 如权利要求1所述的方法,其特征在于,所述在所述目标应用接收到所述第一指示信息之后,采用第二缓存策略缓存所述目标应用的数据之后,所述方法还包括:
    在所述电子设备处于所述异常区域时,采用以下至少一种方式:采用第三下载速率下载所述目标应用的数据,所述第三下载速率小于所述第一下载速率;采用所述第三码率下载所述目标应用的数据,所述第三码率小于或等于所述第二码率;采用所述第三分辨率下载所述目标应用的数据,所述第三分辨率小于或等于第二分辨率;采用所述第三帧率下载所述目标应用的数据,所述第三帧率小于或等于所述第二帧率;采用第三请求次数请求所述目标应用的数据,所述第三请求次数为单位时间内的请求次数,所述第三请求次数小于或等于所述第一请求次数;
    离开所述异常区域之后,采用所述第一缓存策略缓存所述目标应用的数据。
  12. 如权利要求1所述的方法,其特征在于,所述采用第一缓存策略缓存所述目标应用的数据,包括:在采用所述第一缓存策略缓存的所述目标应用的数据量的播放时长大于第一预设时长时,停止缓存所述目标应用的数据;
    所述采用第二缓存策略缓存所述目标应用的数据,包括:在采用所述第二缓存策略缓存的所述目标应用的数据量的播放时长大于所述第一预设时长时,继续缓存所述目标应用的数据。
  13. 如权利要求1所述的方法,其特征在于,所述在所述目标应用接收到所述第一指示信息之后,采用第二缓存策略缓存所述目标应用的数据,包括:
    响应于接收到所述第一指示信息,采用所述第二缓存策略缓存所述目标应用的数据;和/或,
    在接收到所述第一指示信息的第二预设时长内,启动采用所述第二缓存策略缓存所述目标应用的数据的步骤,所述第二预设时长小于1秒。
  14. 如权利要求1所述的方法,其特征在于,所述第一指示信息还包括:第一时间信息,所述第一时间信息用于指示进入所述异常区域的时间;和/或,
    所述第一指示信息还包括:第二时间信息,所述第二时间信息用于指示离开所述异常区域的时间;和/或,
    所述第一指示信息还包括:第三时间信息,所述第三时间信息用于指示所述异常区域的持续时长。
  15. 如权利要求12所述的方法,其特征在于,所述在所述目标应用接收到所述第一指示信息之后,采用第二缓存策略缓存所述目标应用的数据,包括:在所述目标应用接收到所述第一指示信息之后,采用所述第二缓存策略缓存播放时长为第三预设时长的所述目标应用的数据,其中,所述第三预设时长为根据所述第一时间信息和所述第二时间信息得到的时长,或者,所述第三预设时长为所述第三时长信息指示的时长。
  16. 如权利要求1所述的方法,其特征在于,所述目标应用为视频应用,所述第二缓存策略包括以下至少一种:采用所述第二下载速率下载所述目标应用的数据,采用所述第二码率下载所述目标应用的数据,采用所述第二分辨率下载所述目标应用的数据,采用所述第二帧率下载所述目标应用的数据,采用所述第二请求次数请求所述目标应用的数据;或,
    所述目标应用为音频应用,所述第二缓存策略包括以下至少一种:采用所述第二下载速率下载所述目标应用的数据,采用所述第二请求次数请求所述目标应用的数据,采用所述第二采样频率下载所述目标应用的数据,采用所述第二采样位数下载所述目标应用的数据,采用所述第二声道数下载所述目标应用的数据。
  17. 一种芯片,其特征在于,所述芯片包括至少一个处理器、接口电路和存储器,所述存储器、所述接口电路和所述至少一个处理器通过线路互联,所述存储器中存储有计算机程序,所述计算机程序被所述至少一个处理器执行时,所述芯片实现:
    接收目标应用发送的注册消息;所述注册消息用于注册第一通知事件;
    生成第一指示信息;所述第一指示信息用于指示所述芯片的前进方向上存在异常区域,所述异常区域是以下至少一种区域:信号质量小于预设阈值的区域、断网的区域、掉制式的区域、体验质量QoE小于第一QoE等级的区域,所述掉制式是第一网络制式变更为低于所述第一网络制式的第二网络制式;
    向注册有所述第一通知事件的所述目标应用发送所述第一指示信息。
  18. 如权利要求17所述的芯片,其特征在于,所述芯片生成第一指示信息时,具体实现:
    获取当前小区信息;在异常区域的数据文件中确定是否存在和所述当前小区信息对应的异常区域记录;在存在所述异常区域的情况下,所述控制组件生成所述第一指示信息;或者,
    获取当前位置信息;在所述异常区域的数据文件中确定是否存在和所述当前位置信息对应的异常区域记录;在存在所述异常区域的情况下,所述控制组件生成所述第一指示信息;或者,
    获取所述当前小区信息和所述当前位置信息;在所述异常区域的数据文件中确定是否存在和所述当前小区信息对应且和所述当前位置信息对应的异常区域记录;在存在所述异常区域的情况下,所述控制组件生成所述第一指示信息。
  19. 如权利要求17所述的芯片,其特征在于,所述芯片生成第一指示信息时,具体实现:
    获取所述芯片的当前小区信息和当前位置信息;
    在异常区域的数据文件中确定是否存在和所述当前小区信息对应的异常区域记录;
    在存在所述异常区域记录的情况下,所述控制组件生成所述第一指示信息;所述当前位置信息用于确定发送所述第一指示信息的时刻。
  20. 如权利要求18或19所述的芯片,其特征在于,所述芯片还用于实现:
    获取所述芯片经过小区的信息;当检测到业务异常通知事件时,在所述芯片经过小区的信息中确定第二预设时间范围之前是否经过至少一个小区;在经过所述至少一个小区的情况下,在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录,所述第一异常区域记录或所述第二异常区域记录包括所述至少一个小区的信息;所述业务异常通知事件用于指示以下至少一项信息:信号质量小于预设阈值,断网,第一网络制式变更为低于所述第一网络制式的第二网络制式,QoE小于第一QoE等级;或者,
    当检测到所述业务异常通知事件时,获取所述芯片的位置信息,并在所述异常区域的数据文件中添加第三异常区域记录,或者更新所述异常区域的数据文件中的第四异常区域记录,所述第三异常区域记录或所述第四异常区域记录中的位置信息是根据所述芯片的位置信息得到的。
  21. 如权利要求20所述的芯片,其特征在于,所述芯片在经过所述至少一个小区的情况下,在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录时,具体实现:
    在经过所述至少一个小区的情况下,获取所述芯片的位置信息,并在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录;所述第一异常区域记录或所述第二异常区域记录包括所述至少一个小区的信息,所述第一异常区域记录或所述第二异常区域记录中的位置信息是根据所述芯片的位置信息得到的。
  22. 如权利要求20所述的芯片,其特征在于,所述芯片在经过所述至少一个小区的情况下,在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录时,具体实现:
    在经过所述至少一个小区的情况下,获取以下至少一项信息:进入所述异常区域的时间、离开所述异常区域的时间、所述异常区域的持续时长;在所述异常区域的数据文件中添加第一异常区域记录,或者更新所述异常区域的数据文件中的第二异常区域记录;所述第一异常区域记录或所述第二异常区域记录中的进入异常区域的时间是根据所述进入所述异常区域的时间得到的,或者,所述第一异常区域记录或所述第二异常区域记录中的离开异常区域的时间是根据所述离开所述异常区域的时间得到的,或者,所述第一异常区域记录或所述第二异常区域记录中的异常区域的持续时长是根据所述异常区域的持续时长得到的。
  23. 如权利要求17所述的芯片,其特征在于,所述芯片还用于实现:接收目标应用发送的去注册消息;所述去注册消息用于取消注册第一通知事件。
  24. 一种电子设备,其特征在于,包括收发器、处理器和存储器,所述存储器用于存储计算机程序,所述处理器调用所述计算机程序,用于执行如权利要求1-16任一项所述的方法。
  25. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有计算机程序,所述计算机程序被处理器执行时,实现权利要求1-16任一项所述的方法。
PCT/CN2021/116165 2020-09-10 2021-09-02 数据缓存方法及电子设备 Ceased WO2022052852A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202180054920.XA CN116235535A (zh) 2020-09-10 2021-09-02 数据缓存方法及电子设备
JP2023515719A JP7609380B2 (ja) 2020-09-10 2021-09-02 データキャッシュ方法及び電子デバイス
EP21865906.8A EP4199575A4 (en) 2020-09-10 2021-09-02 DATA BUFFERING METHOD AND ELECTRONIC DEVICE
US18/180,967 US20230232065A1 (en) 2020-09-10 2023-03-09 Data Caching Method and Electronic Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010950649.5A CN114173372B (zh) 2020-09-10 2020-09-10 数据缓存方法及电子设备
CN202010950649.5 2020-09-10

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/180,967 Continuation US20230232065A1 (en) 2020-09-10 2023-03-09 Data Caching Method and Electronic Device

Publications (1)

Publication Number Publication Date
WO2022052852A1 true WO2022052852A1 (zh) 2022-03-17

Family

ID=80475885

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116165 Ceased WO2022052852A1 (zh) 2020-09-10 2021-09-02 数据缓存方法及电子设备

Country Status (5)

Country Link
US (1) US20230232065A1 (zh)
EP (1) EP4199575A4 (zh)
JP (1) JP7609380B2 (zh)
CN (2) CN114173372B (zh)
WO (1) WO2022052852A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116744328A (zh) * 2022-10-17 2023-09-12 荣耀终端有限公司 一种网络加速方法和装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817089B (zh) * 2022-04-26 2024-11-12 北京奇艺世纪科技有限公司 多下载任务的缓存管理方法和装置
CN116709367B (zh) * 2022-10-17 2024-07-12 荣耀终端有限公司 一种网络加速方法和装置
US12323647B2 (en) * 2023-11-10 2025-06-03 Avago Technologies International Sales Pte. Limited Video quality monitoring system
WO2025258873A1 (ko) * 2024-06-10 2025-12-18 엘지전자 주식회사 등록해제 관련 정보
CN120740659B (zh) * 2025-09-03 2026-01-02 临海市新睿电子科技股份有限公司 一种总线编码器检测方法、系统、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065834A (zh) * 2014-06-20 2014-09-24 宇龙计算机通信科技(深圳)有限公司 降低终端功耗的方法、装置和终端
CN105872974A (zh) * 2016-05-05 2016-08-17 捷开通讯(深圳)有限公司 缓存预加载系统、方法及移动终端
CN107529097A (zh) * 2016-06-20 2017-12-29 北京信威通信技术股份有限公司 一种自适应调整视频缓冲大小的方法及装置
CN108551436A (zh) * 2018-03-12 2018-09-18 联想(北京)有限公司 数据传输方法和装置
CN109819040A (zh) * 2019-02-02 2019-05-28 腾讯科技(深圳)有限公司 应用数据缓存方法、装置、智能终端及存储介质
CN110519451A (zh) 2019-08-01 2019-11-29 华为技术有限公司 一种电子设备的关机管控方法和装置

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090143078A1 (en) * 2007-11-30 2009-06-04 Palm, Inc. Techniques to manage a radio based on location information
US20100121977A1 (en) * 2008-11-10 2010-05-13 Nokia Corporation Predictive Bit-Rate Modification of Content Delivery in a Wireless Network
JP5277148B2 (ja) * 2009-12-15 2013-08-28 富士フイルム株式会社 ブラウザシステム
US9596670B2 (en) * 2013-01-16 2017-03-14 Apple Inc. Location assisted service capability monitoring
US10264043B2 (en) * 2014-04-23 2019-04-16 Ericsson Ab Outage notification with client control modification in an ABR streaming network
US9338486B2 (en) * 2014-09-02 2016-05-10 Ericsson Ab Optimizing ABR segment sizes for mobile video outage coverage in an ABR streaming network
WO2016182482A1 (en) * 2015-05-08 2016-11-17 Telefonaktiebolaget Lm Ericsson (Publ) Network recommended buffer management of a service application in a radio device
US9838893B2 (en) * 2015-06-25 2017-12-05 Alcatel Lucent System and method for cooperatively controlling an application
US10405017B1 (en) * 2017-08-03 2019-09-03 Cox Communications, Inc. Secure access to content provided over a distributed network
US10136408B1 (en) * 2017-08-17 2018-11-20 Colby Green Determining high value geographic locations
JP6837151B2 (ja) * 2017-09-11 2021-03-03 株式会社日立製作所 情報処理システム
EP3565261B1 (en) * 2018-05-02 2020-05-27 Spotify AB Predictive caching
US11811854B2 (en) * 2018-12-30 2023-11-07 Dish Network Technologies India Private Limited Delivery of digital video content based upon geographic location
CN113163470B (zh) * 2019-02-21 2023-06-09 荣耀终端有限公司 对特定路线上的特定位置进行识别的方法及电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065834A (zh) * 2014-06-20 2014-09-24 宇龙计算机通信科技(深圳)有限公司 降低终端功耗的方法、装置和终端
CN105872974A (zh) * 2016-05-05 2016-08-17 捷开通讯(深圳)有限公司 缓存预加载系统、方法及移动终端
CN107529097A (zh) * 2016-06-20 2017-12-29 北京信威通信技术股份有限公司 一种自适应调整视频缓冲大小的方法及装置
CN108551436A (zh) * 2018-03-12 2018-09-18 联想(北京)有限公司 数据传输方法和装置
CN109819040A (zh) * 2019-02-02 2019-05-28 腾讯科技(深圳)有限公司 应用数据缓存方法、装置、智能终端及存储介质
CN110519451A (zh) 2019-08-01 2019-11-29 华为技术有限公司 一种电子设备的关机管控方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4199575A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116744328A (zh) * 2022-10-17 2023-09-12 荣耀终端有限公司 一种网络加速方法和装置
CN116744328B (zh) * 2022-10-17 2024-04-23 荣耀终端有限公司 一种网络加速方法和装置

Also Published As

Publication number Publication date
EP4199575A4 (en) 2024-01-03
JP2023541875A (ja) 2023-10-04
US20230232065A1 (en) 2023-07-20
JP7609380B2 (ja) 2025-01-07
CN116235535A (zh) 2023-06-06
EP4199575A1 (en) 2023-06-21
CN114173372B (zh) 2025-08-29
CN114173372A (zh) 2022-03-11

Similar Documents

Publication Publication Date Title
WO2022052852A1 (zh) 数据缓存方法及电子设备
US10667157B2 (en) Individualized adaptive wireless parameter tuning for streaming content
US10375620B2 (en) Determining routing of proxy traffic between mobile client and proxy devices
EP3241362B1 (en) Cloud support for discovery and data transfer for mobile client devices
US10085294B2 (en) Determining when to establish connection between mobile client and proxy devices
US10033847B2 (en) Dropped call warning and prevention methods
US9432961B2 (en) Location-assisted service capability monitoring
US8620339B2 (en) System and method for providing quality of service mapping
US9420477B2 (en) Signal strength management
US10448283B2 (en) Dynamic predictive buffering
CN105191261A (zh) 对等系统中的内容管理
AU2017435235B2 (en) Application management method and terminal
US11026283B2 (en) Determining when to establish connection between mobile client and proxy devices
CN113747347A (zh) 电子设备及其上网卡切换方法、可读介质
CN117835169A (zh) 一种短信通道的确定方法和相关装置
CN106993327A (zh) 网络定位方法、装置及计算机设备
WO2019183783A1 (zh) 一种终端内外围器件的管理方法及终端
CN118524418B (zh) 网络预测方法及其终端设备、服务器和通信系统
US20240334531A1 (en) Electronic device interaction method and apparatus
CN116962794A (zh) 应用优化方法及电子设备
CN111093148A (zh) 一种信号频率调节方法、装置、存储介质及终端
CN120128652A (zh) 显示方法和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21865906

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023515719

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 202317019178

Country of ref document: IN

ENP Entry into the national phase

Ref document number: 2021865906

Country of ref document: EP

Effective date: 20230315

NENP Non-entry into the national phase

Ref country code: DE

WWG Wipo information: grant in national office

Ref document number: 202317019178

Country of ref document: IN