WO2019120037A1 - Model construction method, network resource preloading method and apparatus, medium, and terminal - Google Patents

Model construction method, network resource preloading method and apparatus, medium, and terminal Download PDF

Info

Publication number
WO2019120037A1
WO2019120037A1 PCT/CN2018/117157 CN2018117157W WO2019120037A1 WO 2019120037 A1 WO2019120037 A1 WO 2019120037A1 CN 2018117157 W CN2018117157 W CN 2018117157W WO 2019120037 A1 WO2019120037 A1 WO 2019120037A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
state
terminal
observation
access
Prior art date
Application number
PCT/CN2018/117157
Other languages
French (fr)
Chinese (zh)
Inventor
陈岩
刘耀勇
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019120037A1 publication Critical patent/WO2019120037A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0862Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with prefetch
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0868Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/60Details of cache memory
    • G06F2212/6024History based prefetching

Definitions

  • the embodiments of the present application relate to data processing technologies, for example, to a model construction method, a network resource preloading method, an apparatus, a medium, and a terminal.
  • mobile terminals provide communication services, living services, entertainment services, and the like for more and more users.
  • a user can install a news application on a mobile terminal to view news information through such an application.
  • An application installed on a mobile terminal provides users with the information they need by accessing network resources.
  • the network loading process takes a long time, the user needs to wait for the network data to load, and the application performance is not good, thereby affecting the user's viscosity of the application.
  • the news interface includes not only text content, but also pictures or short videos.
  • the mobile terminal detects that the user clicks on a news title to the final display of the news interface corresponding to the news title, the network data is downloaded by the set resource resource address, that is, the Uniform Resource Locator (URL).
  • the time is as low as tens of milliseconds (in a network-free environment), hundreds of milliseconds or even seconds, and the user experience is not good.
  • the embodiment of the present application provides a model construction method, a network resource preloading method, a device, a medium, and a terminal, which can shorten the loading time of network data.
  • the embodiment of the present application provides a model construction method, including: acquiring a historical network access record and a terminal status associated with the historical network access record; determining a status according to the historical network access record and the terminal status The transition probability matrix and the observation probability matrix are constructed; the access prediction model is constructed based on the state transition probability matrix and the observation probability matrix.
  • the embodiment of the present application further provides a network resource preloading method, including: acquiring a current network access record and a terminal status associated with a current network access record according to a set period; and the current network access record and the location Entering a pre-built access prediction model, wherein the access prediction model is a model of terminal state training corresponding to the historical network access record and the historical network access record; and the access prediction model output is to be accessed.
  • the network resource identifier is used to download network data corresponding to the network resource identifier, and is stored in a local cache.
  • the embodiment of the present application further provides a model construction apparatus, where the apparatus includes: a history acquisition module, configured to acquire a historical network access record and a terminal status associated with the historical network access record; and a matrix determination module, The method is configured to determine a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state; and the model building module is configured to construct an access prediction model based on the state transition probability matrix and the observation probability matrix.
  • a history acquisition module configured to acquire a historical network access record and a terminal status associated with the historical network access record
  • a matrix determination module The method is configured to determine a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state
  • the model building module is configured to construct an access prediction model based on the state transition probability matrix and the observation probability matrix.
  • the embodiment of the present application further provides a network resource preloading device, where the device includes: a current record obtaining module, configured to acquire a current network access record according to a set period and associated with the current network access record. a terminal input module configured to input the current network access record and the terminal state into a pre-built access prediction model, wherein the access prediction model is based on a historical network access record and a terminal corresponding to the historical network access record a model of the state training; the preloading module is configured to acquire the network resource identifier to be accessed output by the access prediction model, and download the network data corresponding to the network resource identifier, and store the data in the local cache.
  • a current record obtaining module configured to acquire a current network access record according to a set period and associated with the current network access record.
  • a terminal input module configured to input the current network access record and the terminal state into a pre-built access prediction model, wherein the access prediction model is based on a historical network access record and a terminal corresponding to the historical
  • the embodiment of the present application further provides a computer readable storage medium, where the computer program is stored, and when the program is executed by the processor, the model construction method according to the first aspect is implemented; or the program The network resource preloading method as described in the second aspect above is implemented when executed by the processor.
  • the embodiment of the present application further provides a terminal, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor implements the computer program to implement the first aspect as described above
  • the model construction method; or the network resource preloading method according to the second aspect described above is implemented when the processor executes the computer program.
  • FIG. 1 is a flowchart of a method for constructing a model provided by an embodiment of the present application
  • FIG. 2 is a flowchart of another method for constructing a model provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a network resource preloading method provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of another network resource preloading method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a network data loading process according to an embodiment of the present application.
  • FIG. 6 is a structural block diagram of a model construction apparatus according to an embodiment of the present application.
  • FIG. 7 is a structural block diagram of a network resource preloading apparatus according to an embodiment of the present application.
  • FIG. 8 is a structural block diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • FIG. 1 is a flowchart of a method for constructing a model according to an embodiment of the present disclosure.
  • the method may be implemented by a model building device, where the device may be implemented by at least one of software and hardware, and may be integrated into a terminal. For example in a mobile terminal.
  • the method includes steps 110 to 130.
  • step 110 a historical network access record and a terminal status associated with the historical network access record are obtained.
  • the terminal may be a mobile terminal equipped with an operating system, including but not limited to a smart phone, a tablet computer, a handheld game console, a notebook computer, and a smart watch.
  • an operating system including but not limited to a smart phone, a tablet computer, a handheld game console, a notebook computer, and a smart watch.
  • the historical network access record may be a network access record of an application accessing the network behavior in the local machine in the preset time interval, and the network access record includes but is not limited to a network resource address (ie, a URL address), and a timestamp for opening the URL address. (ie access time) and the application ID of the application accessing the URL address.
  • the terminal status includes, but is not limited to, a network environment status, a charging status, remaining power, and location information. It should be noted that the terminal status in the embodiment of the present application is a network environment status, a charging status, and the like when the application accesses the URL address.
  • the mobile terminal When an application accesses the network, the mobile terminal records the network access behavior as a historical network access record. At the same time, when the network access behavior is recorded, the state of the mobile terminal at the time when the corresponding application accesses the network can also be obtained. For example, when an application accesses the network, network access information such as a URL address, an application that issues a network access request, and a timestamp of opening a URL are recorded. It is also possible to collect terminal status information such as the network environment and the charging status of the mobile terminal at this time.
  • the network environment may be a wireless network. For example, whether to connect WIreless-FIdelity (WIFI) or the like.
  • the mobile terminal can store the historical network access record and the terminal status in the form of a data table, which is stored in the mobile terminal database.
  • one row in the above table may be recorded as a status.
  • the features listed in the above table include WIFI, an application, a URL, a timestamp for opening the URL, and a charging status, but are not limited to the above features, and may also be based on The actual model construction needs to increase the remaining power, location information and other characteristics.
  • step 120 a state transition probability matrix and an observation probability matrix are determined according to the historical network access record and the terminal state.
  • the mobile terminal needs to preprocess the historical network access record and the terminal state in the above table to obtain a state set and an observation set.
  • the status set may be determined according to the WIFI, the application, the timestamp of the open URL, and the charging status in Table 1.
  • the observation set may be determined according to the URL.
  • the state transition probability can be regarded as the probability that the state q i is transferred to q j in the state set, that is, the state transition probability can be understood as the state corresponding to the previous moment in the two adjacent moments is q i and The state corresponding to the next moment is the probability of q j .
  • the manner of calculating the state transition probability of each state in the state set is a numerator as the number of times the state q i is transferred to q j in the state set (it is required that q i may be the same as q j
  • the state may be a different state.
  • the division is performed by using the number of occurrences of the state q i in the state set as a denominator.
  • the state set can be represented in the form of a state matrix.
  • the state transition probability for each state in the set of states can be calculated using the following formula:
  • the state transition probability between two adjacent moments in the state set may be respectively calculated by using the above formula, and the state transition probability matrix is formed according to the state transition probability.
  • the state transition probability matrix may include a state transition state occurring at a next moment or a state transition probability of a current state, and a state transition probability at which a state occurring at a next moment is a remaining state in the state matrix.
  • the state transition probability may exist in the form of a transition transition probability matrix as shown in the above example, and may also exist and construct an access prediction model in other ways.
  • the state transition probability table may be stored in association with the state transition probability; or the state transition probability may be stored in the first table, the state may be stored in the second table, and the mapping between the first table and the second table may be established. Wait.
  • the observation probability can be regarded as the probability of generating a preset observation value in a certain state, that is, if a certain state is represented by q x , the manner of determining the observation value corresponding to the state may be, times the number of occurrences of the observation state q x k values divided by the occurrence of a state is obtained in a state q x q x k generated observation probability of the observed values.
  • one state in the state set may be sequentially acquired as the current state, and the number of occurrences of the current state may be counted. According to the observation value corresponding to the current state and the number of occurrences of the current state, the following formula is used to calculate the observation probability of the current state:
  • step 130 an access prediction model is constructed based on the state transition probability matrix and the observation probability matrix.
  • the access prediction model in the embodiment of the present application may be a probability model.
  • the access prediction model includes, but is not limited to, a hidden Markov model.
  • the hidden Markov model describes a hidden sequence and a corresponding observable sequence, called a sequence of states, which can be represented by a set of states. This observable sequence is called an observation sequence and can be represented by an observation set.
  • A represents the state transition probability matrix
  • i t q i ), a ij represents the probability of transitioning from state q i to q j .
  • the observation probability matrix is a set of observation probabilities, that is, if the observation probability matrix is represented by B, the observation probability matrix can be expressed as
  • the access prediction model can be constructed by the state set Q, the observation set V, the state transition probability matrix A, and the observation probability matrix B, that is, the access prediction model can be expressed as [Q, V, A, B].
  • the technical solution of the embodiment obtains a historical network access record and a terminal state associated with the historical network access record; determines a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state; and based on the state transition probability matrix And the observation probability matrix constructs an access prediction model; thus, the observation probability of the observation value corresponding to the next state can be determined by accessing the prediction model based on the current state, since the observation value represents the network resource address, and thus, the user has predicted before accessing the network resource
  • the target network resources are improved, and the intelligence of the mobile terminal is improved.
  • FIG. 2 is a flowchart of another method for constructing a model according to an embodiment of the present application. As shown in FIG. 2, the method includes steps 201 to 210.
  • step 201 a historical network access record and a terminal status associated with the historical network access record are obtained.
  • the historical network access record includes an application for accessing the network, a network resource address, and an access time; and the terminal status includes network environment information and a charging status.
  • the collection of the original data is completed on the mobile terminal.
  • real-time access to the network access record of the mobile terminal and the status of the terminal when the network access behavior occurs including an application accessing the network, a network resource address (ie, a URL address), a URL access time, and a WIFI status when the application accesses the network
  • the network access record and the terminal state are stored in a preset database of the mobile terminal, and the storage form can be as shown in Table 1.
  • step 202 the program number of the application that accesses the network and the network number corresponding to the network resource address are matched according to a preset rule.
  • the preset rule may be that the application number is in a preset order, and the network resource address number is in a preset order.
  • the preset order can be chronological, or other user-specified order.
  • applications that access the network include applications such as QQ, WeChat, and Today's headlines, assigning a number to each application and replacing the application with a number.
  • applications such as QQ, WeChat, and Today's headlines, assigning a number to each application and replacing the application with a number.
  • the program number assigned to QQ is 0, the program number assigned to WeChat is 1, and the program number assigned to today's headline is 2, whereas, and the maximum number of program numbers depends on the number of applications in Table 1.
  • the application may correspond to multiple network resource addresses and assign different network numbers to different network resource addresses. Different applications may access the same network resource address, and the same network resource address has the same network number.
  • Each network accessed by the application is assigned a network number, ie the network number k ⁇ [0,1,2...], and the maximum network number depends on how many different URLs have appeared in Table 1.
  • step 203 the working days and the rest days are divided according to the access time, and different date numbers are assigned to the working days and the rest days, respectively.
  • the access time is the timestamp of opening the URL in Table 1, and the timestamp can be converted into a year, month, day, hour, minute, and second format, so that the time for opening the URL address is determined to be a working day or a rest according to the access time. day. You can set the timestamp of opening the URL to 1 in the case of opening the URL. If the time to open the URL is 1 day, the timestamp of opening the URL in Table 1 is the value of the timestamp. Is 0.
  • step 204 the time number is determined according to the time period to which the access time belongs.
  • the time interval in which the user uses the mobile terminal can be divided according to the usage habit of the user. For example, if the user is in a sleep state between 12 am and 6 am, and the mobile terminal is not used, the time interval outside the rest time interval can be divided to obtain a time period.
  • step 205 it is determined whether the terminal accesses the wireless network according to the network environment information, and determines a network state value according to the determination result.
  • the network environment information includes information such as whether the terminal accesses the network or not, and how to access the network, including but not limited to whether to access the WIFI.
  • the network status value is set to 1, and if the mobile terminal does not access the wireless network, the network status value is set to zero. For example, if the WIFI of the mobile terminal is turned on and the wireless network is connected, the network status value is set to 1, and if the WIFI of the mobile terminal is turned off, the network status value is set to 0.
  • step 206 it is judged whether the terminal is charging according to the state of charge, and the state of charge value is determined according to the determination result.
  • the charging state value is set to 1, and if the mobile terminal is not in the charging state, the charging state value is 0.
  • the charging state value when the application accesses the URL is determined according to whether the mobile terminal is charging.
  • the following table can be obtained based on the above-described preprocessing of historical network access records and terminal status.
  • each row in Table 2 represents a state.
  • a state set is generated based on the program number, date number, time number, network state value, and state of charge value, and an observation set is constructed based on the network number.
  • program number the date number, the time number, the network status value, and the charging status value constitute a state set
  • network number constitutes an observation set
  • the state set Q is composed of the first five columns of corresponding feature values
  • the observation set V is composed of the last column of URLs. Since at least two weeks of historical network access records and corresponding terminal states are acquired during model construction, the records in the state matrix corresponding to the state set are highly random, not necessarily chronologically arranged.
  • the number of records of Q can be expressed as 2*2*144*2*, the number of applications accessing the network on the terminal, and the size of V is the number of URLs visited.
  • step 208 a state transition probability for each state in the set of states is calculated, and a state transition probability matrix is generated based on the state transition probability.
  • the state transition probability in the embodiment of the present application calculates the current state and the transition probability of the state in which the next row may occur, that is, the current state and the next state appear in pairs in the state set, and the next state The next line in the row where the current state is located.
  • the next state q j [0,0,0,0,1]
  • the two q listed above can be j is considered to be the next next state of the current state.
  • the probability of the user accessing the same URL in the same time period is higher in the sampling period of at least two weeks. Therefore, there is a recurring state in the state matrix.
  • the state transition probability of the current state q i to the next state q j is to be calculated, the state of the state matrix Q in which the previous row is q i and the next row is q j may be counted, and The number of occurrences of the q i state in the above state matrix Q is also counted.
  • the result of the state in which the upper row of the state matrix Q is q i and the next row is q j is divided by the number of q i states is taken as the state transition probability of jumping from the current state q i to the next state q j .
  • q j includes the remaining state of removing q i from the state matrix, and also includes the state q i itself.
  • the state transition probability is calculated for each state in the state matrix, and a state transition probability matrix of n*n is obtained, which may be [a ij ] n ⁇ n described above.
  • step 209 an observation probability of an observation value corresponding to each state is calculated according to the state set and the observation set, and an observation probability matrix is generated according to the observation probability.
  • each state in the state matrix is taken as the current state, and the probability of generating the observation value in the observation set in the current state is respectively determined to constitute the observation probability matrix B of n*m.
  • step 210 an access prediction model is constructed.
  • the access prediction model is a hidden Markov model.
  • the access prediction model is built in the terminal. Within the setting, it is set to predict in advance which resources corresponding to the URL need to be downloaded in advance.
  • the sample set for predicting the network resource address that the mobile terminal may access in the future is not static, and the model may be set according to actual needs.
  • the condition is updated so that the access prediction model is updated when the update condition is met.
  • the update time is set.
  • the update period may be set, and when the update period is reached, it is determined that the model update condition is satisfied. For example, you can set a week or day as the update cycle.
  • the network behavior record and the terminal state of the mobile terminal in the latest week are obtained by means of incremental update.
  • the update date can also be set, for example, Monday or every other week of Monday.
  • the sample update operation may also be triggered by a user, for example, the user inputs a model update indication, performs a model update operation based on the update indication, and the like.
  • the technical solution of the embodiment by learning the historical network access behavior of the terminal and the terminal state associated with the historical network access behavior, constructs an access prediction model, improves the adaptive capability of the model, and has good applicability to different users.
  • FIG. 3 is a flowchart of a network resource preloading method provided by an embodiment of the present application, where the method may be implemented by a network resource preloading device, where the device may be implemented by at least one of software and hardware, and generally integrated.
  • the method includes steps 310 to 330.
  • step 310 the current network access record and the terminal status associated with the current network access record are obtained according to a set period.
  • the current network access record includes the application that accesses the network at the current time, the network resource address (ie, the URL address), and the timestamp at which the URL is opened.
  • the terminal status associated with the current network access record includes the current network environment information and the current charging status, including but not limited to whether the monitoring terminal is currently connected to the WIFI, and the monitoring terminal recognizes that the charging is performed.
  • the setting period may be the default of the system, or may be a time interval set by the user for invoking the access prediction model to predict the next state according to the current state.
  • the access prediction model may be set to be called every 10 minutes to predict the network resource address that the next state may access according to the current state, and pre-download the network data associated with the predicted network resource address.
  • the current network access record and its associated terminal status need to be pre-processed.
  • the pre-processing manner is the same as that in the foregoing embodiment, and is no longer As a result, get the current state that matches the input data format of the access prediction model.
  • step 320 the current network access record and terminal status are entered into a pre-built access prediction model.
  • the access prediction model is a model of terminal state training corresponding to the historical network access record and the historical network access record. It can be understood that the access prediction model herein may be a model constructed by the scheme described in the above embodiment.
  • the current state is directly outputted to the access prediction model, so that the access prediction model predicts the next state that may occur at the next moment.
  • an observation probability of each observation value ie, a network resource identifier, and the network resource identifier may include a network resource address
  • the observation probability may be considered as an output of the access prediction model.
  • the current state q i is input into the access prediction model, and the state transition probability of all the next states corresponding to the current state q i is determined according to the state transition probability matrix, so that the state with the highest state transition probability is the most The next state q j that may appear.
  • the reference observation probability corresponding to q j is determined according to q j and the observation probability matrix B.
  • the reference observation probability is arranged in descending order, and the target observation probability of the set number prior to the ranking is selected by the reference observation probability, and the network resource identifier corresponding to the target observation probability is used as the network resource identifier most likely to be accessed in the next state, And output.
  • step 330 the network resource identifier to be accessed that is output by the access prediction model is obtained, and the network data corresponding to the network resource identifier is downloaded and stored in the local cache.
  • the network resource identifier may be a network resource address. For example, if the set number is 100, the 100 network resource addresses corresponding to the next state output by the access prediction model are obtained, and the 100 network resource addresses are considered to be preloaded.
  • the network resource address is predicted, if the network data corresponding to the network resource address has been loaded, the network data does not need to be repeatedly loaded to avoid excessive occupation of the cache.
  • the method for downloading the network data corresponding to the network resource identifier may be that a communication connection is established between the server corresponding to the network resource address through the Internet, and the network data corresponding to the network resource address is downloaded by the server. It can be understood that the manner of downloading the network data corresponding to the network resource identifier is not limited to the manner enumerated in the above examples.
  • the technical solution of the embodiment obtains the current network access record and the terminal status associated with the current network access record according to the set period, and inputs the current network access record and the terminal status into the access prediction model to obtain a to-be-accessed
  • the network resource identifier is configured to download the network data corresponding to the network resource identifier, and store the network data in the local cache, and preload the network data corresponding to the network resource identifier that may be accessed before acquiring the network data according to the identifier of the network resource,
  • the network data is read in the local cache to shorten the loading time of the network data, thereby avoiding the situation that the loading time is long caused by loading data from the external network.
  • the pre-loaded network data is cached in the local cache, and the network data corresponding to the network access request may be directly downloaded from the local cache when the application obtains the network access request.
  • the application includes an application with network access capabilities. For example, a news application, an instant messaging application, or a multimedia application. Get a network access request for the application.
  • the network access request may be understood as a message that the application requests the network corresponding to the specified network resource address (ie, the URL) to obtain the network data.
  • the network access request can be generated by the application and reported to the system network function module.
  • the system network function module obtains the message requesting to obtain the network data of the specified URL, the system knows that the application needs to acquire the network resource.
  • the system network function module can be understood as the code and protocol stack of the system to implement the network access function.
  • the local cache is queried according to the network access request, and a preload state of the network data corresponding to the network access request is determined.
  • the network access request includes a network resource address (URL address), and when the network access request of the application is obtained, the network resource address is extracted.
  • the local cache is queried according to the network resource address, and it is determined whether the network data corresponding to the network resource address exists. If the network data corresponding to the network resource address does not exist, it is determined that the network data corresponding to the network access request is not preloaded, the network access process is executed, and the network data corresponding to the network access request is downloaded by the external network.
  • the network data corresponding to the network resource address exists, it is determined that the network data corresponding to the network access request is preloaded, and the network data is read by the local cache, and is directly returned to the application that sends the network access request to prevent the mobile terminal from passing.
  • the Internet downloads network data from the server, which shortens the time for loading network data.
  • FIG. 4 is a flowchart of another network resource preloading method provided by an embodiment of the present application. As shown in FIG. 4, the method includes steps 401 to 416.
  • step 401 the current network access record and the terminal status associated with the current network access record are obtained according to a set period.
  • the setting period may be the default of the system, or may be set by the user according to the actual needs, and is used to trigger the operation of predicting the network resource identifier that may be accessed at the next moment according to the current time network access record and the terminal state.
  • step 402 the current network access record and the terminal status are preprocessed to obtain a current status.
  • step 403 the current state is input into a pre-built access prediction model to predict a next state corresponding to the next moment by using the access prediction model, and respectively determine an observation of a network resource address corresponding to the next state. Probability.
  • step 404 the network resource address to be accessed corresponding to the next state output by the access prediction model is obtained.
  • step 405 it is determined whether the terminal accesses the wireless network. If the terminal accesses the wireless network, step 406 is performed. If the terminal does not access the wireless network, step 407 is performed.
  • the wireless network in the embodiment of the present application includes but is not limited to WIFI. That is to say, after obtaining the network resource address outputted by the access prediction model, the network state of the terminal can be obtained, and whether the terminal is connected to the WIFI is determined.
  • step 406 the network data corresponding to the network resource identifier is downloaded and stored in a local cache.
  • step 413 may be skipped.
  • the process may go to step 410, where the step 410 is performed to obtain the first network included in the network resource identifier through the network crawler after downloading the network data corresponding to the network resource identifier.
  • the second network resource address of the resource address loads the network data corresponding to the second network resource address, and is stored in the local cache.
  • step 407 status information of the cellular mobile network data of the terminal is obtained.
  • the status information in this embodiment includes, but is not limited to, a switch state of a cellular mobile network data switch, a daily traffic upper limit, a current used traffic, and a remaining traffic state.
  • step 408 it is determined whether the state information meets the preset condition. If the state information meets the preset condition, step 406 is performed. If the state information does not meet the preset condition, step 409 is performed.
  • the preset condition may be that the cellular mobile network data switch is in an open state and the remaining traffic exceeds a preset traffic threshold. In an embodiment, the preset condition may also be that the cellular mobile network data switch is in an open state and the currently used traffic does not reach a preset daily traffic upper limit or the like.
  • the target network data is determined according to at least one of a data type and a data amount of the network data corresponding to the network resource identifier, and the target network data is loaded.
  • the data type of the network data corresponding to the network resource identifier output by the access prediction model is acquired, where the data type includes but is not limited to text, Pictures, animations, videos and audio.
  • the data volume of the network data corresponding to the network resource identifier (that is, the size of the network data) may also be acquired.
  • the data amount of the network data D1 is 5 MB
  • the data amount of the network data D2 is 50 MB
  • the target network data may refer to network data that meets preset filtering conditions, wherein the filtering condition may be that network data whose data type is text and picture can be used as target network data.
  • the screening condition may also be that the network data whose data amount is less than the preset data amount threshold may be used as the target network data.
  • the data type of the network data corresponding to the obtained network resource identifier is matched with the preset screening condition. If the matching is successful, it is determined that the successfully matched network data is the target network data, and the target network data is loaded. In an embodiment, the data quantity of the network data corresponding to the acquired network resource identifier is matched with the preset screening condition. If the matching is successful, determining that the successfully matched network data is the target network data, and performing the target network data load. It can be understood that the above data types and data amounts can be combined for use in determining target network data, or can be used alone.
  • step 410 the second network resource address linked to the first network resource address included in the network resource identifier is obtained by the network crawler, and the network data corresponding to the second network resource address is loaded and stored in the local cache.
  • the network data corresponding to some network resource addresses may include links of other network resource addresses, and these additional network resource addresses may be obtained through the network crawler, and data preloading may be performed. For example, when downloading the target network data, it is found that there is a second network resource address linked to the first network resource address (the second network resource address may not belong to the set of network resource identifiers output by the access prediction model), and may be downloaded together. The network data corresponding to the second network resource address. It should be noted that, when downloading the second network resource address, the network data actually needed to be downloaded may also be determined according to the preset screening conditions described in step 409.
  • this step is not a step that must be performed. In some embodiments, this step may not be performed after step 409 is performed.
  • step 411 the storage space occupied by the network data in the local cache is obtained.
  • a set policy can be used to clear part of the data in the local cache to reduce the amount of network data stored in the local cache.
  • the size of the data amount of the network data in the local cache (that is, the size of the storage space) can be obtained according to a set period.
  • the time for clearing the network data cache may be preset, such as clearing the locally cached network data from 0:00 to 12:00.
  • step 412 when the storage space exceeds a set threshold, data to be cleared is determined according to at least one of a cache time and a use frequency of the network data, and the data to be cleared is cleared.
  • the setting threshold may be the system default, or may be set by the user according to actual needs. Exemplarily, if the total amount of cached data exceeds 100 MB, the set cache file is cleared.
  • the setting cache file may be determined according to the cache time of the cache file. For example, the cache data whose cache time exceeds 1 hour may be considered as setting a cache file.
  • setting the cache file can also be determined according to the frequency of use. For example, cached data whose frequency is less than 5 times/hour can be regarded as a set cache file. It should be noted that the above cache time and frequency of use can be combined to determine the set cache file, or can be used alone.
  • step 411 and step 412 is not limited to the order described in the above example (ie, after step 410), and steps 411 and 412 are performed as long as it is detected that the data clear event is triggered.
  • step 413 a network access request of the application is obtained.
  • the execution order of this step is not limited, and is triggered by the operation of the network access request input by the user in an application. That is, the user operation is monitored, and when the user inputs a network access request operation, the terminal acquires a network access request of the application.
  • step 414 the local cache is queried according to the network access request, and a preload state of the network data corresponding to the network access request is determined.
  • the preload status includes loading to the local cache and not loading. Querying the local cache according to the network resource address included in the network access request, and determining whether the network data corresponding to the network resource address is loaded. If the network data corresponding to the network resource address is loaded, step 415 is performed, if the network resource address corresponds to The network data is not loaded, and step 416 is performed.
  • step 415 the network data is read and returned to the application.
  • step 416 the network data is downloaded by an external network.
  • the technical solution provided in this embodiment pre-judges the network environment of the terminal before downloading the network data corresponding to the network resource identifier.
  • the network environment is in a wireless network environment (for example, in a WIFI environment)
  • the network data may be directly preloaded.
  • the network access request of the application input by the user is detected, the network data is directly read by the local cache to improve the data loading speed.
  • all or part of the network data is downloaded according to the setting policy, so as to simultaneously increase the data loading speed without causing excessive traffic consumption.
  • the network data corresponding to the network resource identifier outputted by the access prediction model is also loaded, and the preloaded data is enriched to avoid data omission.
  • the preloaded data is enriched to avoid data omission.
  • FIG. 5 is a schematic diagram of a network data loading process provided by an embodiment of the present application.
  • the network subsystem of the terminal (which may also be referred to as a system network function module) uses the current network access record and the terminal status associated with the current network access record according to the set period, and utilizes the access prediction model (which may be hidden).
  • the Markov model predicts the most likely network resource address to be accessed based on the current network access record and the terminal state, and outputs the network resource address as a decision. That is to say, the output of the access prediction model is the set number of network resource addresses that the terminal is most likely to access next.
  • the network data corresponding to the network resource address is downloaded by the server in the external network according to the network resource address, and the network data is stored in the local cache, and the content corresponding to the pre-loaded URL is stored in the local cache. If the network access request sent by the current application is detected, the network resource address included in the network access request is extracted, and it is determined whether the content corresponding to the network resource address is preloaded locally. If it is preloaded, the cache file corresponding to the network resource address is read by the local cache and directly returned to the application, and the network data is not required to be downloaded by the server in the external network. However, if the network data corresponding to the network resource address is not preloaded, the network access request continues, and the network data corresponding to the network resource address is downloaded by the external network server.
  • the technical solution of the embodiment by calling the access prediction model according to the set period, predicting the network resource address that is most likely to be accessed next based on the current network access record and the terminal status associated with the current network access record, and downloading the network resource in advance
  • the network data corresponding to the network resource address may be used to determine whether the network resource address of the network access request has corresponding network data in the local cache when the network access request of the application is detected, and if so, the network is directly read by the local cache. Accessing the network data corresponding to the request, shortening the loading time of the application for the network resource, improving the performance of the application, and avoiding the situation that the loading time is long caused by loading the data by the external network.
  • FIG. 6 is a structural block diagram of a model construction apparatus according to an embodiment of the present application.
  • the device may be implemented by at least one of software and hardware, and may be integrated into the terminal and configured to perform the model construction method provided by the embodiment of the present application.
  • the apparatus includes a history acquisition module 610, a matrix determination module 620, and a model construction module 630.
  • the history acquisition module 610 is configured to obtain a historical network access record and a terminal status associated with the historical network access record.
  • the matrix determination module 620 is configured to determine a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state.
  • the model construction module 630 is configured to construct an access prediction model based on the state transition probability matrix and the observation probability matrix.
  • the technical solution of the embodiment provides a model construction device, which acquires a historical network access record and a terminal state associated with the historical network access record; and determines a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state;
  • the access prediction model is constructed based on the state transition probability matrix and the observation probability matrix; thus, the observation probability of the observation value corresponding to the next state can be determined by accessing the prediction model based on the current state, since the observation value represents the network resource address, and further, the user
  • the target network resources have been predicted before accessing the network resources, which improves the intelligence of the mobile terminal.
  • the matrix determination module 620 includes a pre-processing sub-module, a first computing sub-module, and a second computing sub-module.
  • the pre-processing sub-module is configured to pre-process the historical network access record and the terminal state to obtain a state set and an observation set.
  • the first calculation submodule is configured to calculate a state transition probability of each state in the state set, and generate a state transition probability matrix according to the state transition probability.
  • the second calculation submodule is configured to calculate an observation probability of the observation value corresponding to each state according to the state set and the observation set, and generate an observation probability matrix according to the observation probability.
  • the state transition probability of each state in the set of states may be calculated using the following formula:
  • the second calculation sub-module is configured to: sequentially acquire one state in the state set as a current state, and count the number of occurrences of the current state; and obtain an observation value corresponding to the current state and the current state. The number of occurrences, using the following formula to calculate the observation probability of the current state:
  • the historical network access record includes an application for accessing the network, a network resource address, and an access time; the terminal status includes network environment information and a charging status.
  • the pre-processing sub-module is configured to: match the program number of the application that accesses the network according to the preset rule, and the network number corresponding to the network resource address; and distinguish the working day and the rest day according to the access time, respectively
  • the work date and the rest day are assigned different date numbers; the time number is determined according to the time period to which the access time belongs, wherein the time period is obtained by equally dividing the preset time interval in the natural day, and the time period is stored in association with the time number.
  • FIG. 7 is a structural block diagram of a network resource preloading apparatus according to an embodiment of the present application.
  • the device may be implemented by using at least one of software and hardware, and may be integrated into the terminal and configured to perform the network resource preloading method provided by the embodiment of the present application.
  • the apparatus includes a current record acquisition module 710, a model input module 720, and a preload module 730.
  • the current record obtaining module 710 is configured to acquire a current network access record and a terminal status associated with the current network access record according to a set period.
  • the model input module 720 is configured to input the current network access record and the terminal state into a pre-built access prediction model, wherein the access prediction model is based on a historical network access record and a terminal state training corresponding to the historical network access record. Model.
  • the preloading module 730 is configured to acquire the network resource identifier to be accessed that is output by the access prediction model, and download the network data corresponding to the network resource identifier, and store the data in the local cache.
  • the technical solution of the embodiment provides a network resource preloading device, which can preload the network data corresponding to the network resource identifier that may be accessed before acquiring the network data according to a certain network resource identifier, so as to directly read the network from the local cache. Data, shortening the loading time of network data, thus avoiding the situation that the loading time is longer due to loading data from the external network.
  • the model input module 720 is configured to: preprocess the current network access record and the terminal state to obtain a current state; and input the current state into a pre-built access prediction model to pass the access prediction The model predicts a next state corresponding to the next moment, and respectively determines an observation probability of the network resource address corresponding to the next state.
  • the method further includes: downloading a policy selection module, configured to determine whether the terminal accesses the wireless network before the preloading module downloads the network data corresponding to the network resource identifier; and if the terminal accesses the wireless network, And causing the preloading module to perform an operation of downloading network data corresponding to the network resource identifier; if the terminal does not access the wireless network, acquiring state information of the cellular mobile network data of the terminal.
  • downloading a policy selection module configured to determine whether the terminal accesses the wireless network before the preloading module downloads the network data corresponding to the network resource identifier; and if the terminal accesses the wireless network, And causing the preloading module to perform an operation of downloading network data corresponding to the network resource identifier; if the terminal does not access the wireless network, acquiring state information of the cellular mobile network data of the terminal.
  • the preloading module 730 is configured to: determine the target network data according to at least one of a data type and a data amount of the network data corresponding to the network resource identifier, The target network data is loaded.
  • the method further includes: an address obtaining module, configured to: after the preloading module downloads the network data corresponding to the network resource identifier, acquire, by using a network crawler, a first network resource included in the network resource identifier The second network resource address of the address loads the network data corresponding to the second network resource address, and is stored in the local cache.
  • an address obtaining module configured to: after the preloading module downloads the network data corresponding to the network resource identifier, acquire, by using a network crawler, a first network resource included in the network resource identifier The second network resource address of the address loads the network data corresponding to the second network resource address, and is stored in the local cache.
  • the method further includes: a cache clearing module, configured to acquire a storage space occupied by network data in the local cache; and when the storage space exceeds a set threshold, according to a cache time and a frequency of use of the network data At least one of determining data to be cleared and clearing the data to be cleared.
  • a cache clearing module configured to acquire a storage space occupied by network data in the local cache; and when the storage space exceeds a set threshold, according to a cache time and a frequency of use of the network data At least one of determining data to be cleared and clearing the data to be cleared.
  • the method further includes: requesting an acquisition module, configured to acquire a network access request of the application; and a cache query module, configured to query the local cache according to the network access request, and determine a network corresponding to the network access request a data pre-loading state, configured to: if the network data corresponding to the network access request is preloaded, read the network data, and return to the application; the data downloading module is set to If the network data corresponding to the network access request is not preloaded, the network data is downloaded by the external network.
  • Embodiments of the present application also provide a storage medium including computer executable instructions that, when executed by a computer processor, are configured to perform a model construction method, the method comprising: obtaining a historical network access record and The historical network access records the associated terminal state; determining the state transition probability matrix and the observation probability matrix according to the historical network access record and the terminal state; and constructing the access prediction model based on the state transition probability matrix and the observation probability matrix.
  • the embodiment of the present application further provides another storage medium including computer executable instructions, which are set to execute a network resource preloading method when executed by a computer processor, the method comprising: Obtaining a current network access record and a terminal status associated with the current network access record; inputting the current network access record and terminal status into a pre-built access prediction model, wherein the access prediction model is accessed according to a historical network Recording a model of the terminal state training corresponding to the historical network access record; acquiring the network resource identifier to be accessed output by the access prediction model, downloading the network data corresponding to the network resource identifier, and storing the network data in the local cache.
  • Storage media any of a variety of types of memory devices or storage devices.
  • the term "storage medium” is intended to include: a mounting medium such as a Compact Disc Read-Only Memory (CD-ROM), a floppy disk or a tape device; a computer system memory or a random access memory such as a dynamic random access memory; (Dynamic Random Access Memory, DRAM), Double Data Rate Random Access Memory (DDR RAM), Static Random Access Memory (SRAM), Extended Data Output Random Access Memory ( Extended Data Output Random Access Memory (EDO RAM), Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (eg, hard disk or optical storage); registers or other similar types of memory elements, and the like.
  • a mounting medium such as a Compact Disc Read-Only Memory (CD-ROM), a floppy disk or a tape device
  • a computer system memory or a random access memory such as a dynamic random access memory
  • DRAM Double Data Rate Random Access Memory
  • SRAM Static Random Access Memory
  • the storage medium may also include other types of memory or a combination thereof. Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system, the second computer system being coupled to the first computer system via a network, such as the Internet. The second computer system can provide program instructions to the first computer for execution.
  • the term "storage medium" can include two or more storage media that can reside in different locations (eg, in different computer systems connected through a network).
  • the storage medium may store program instructions (eg, embodied as a computer program) executable by the at least one processor.
  • the computer executable instructions are not limited to the operation of model construction as described above, and may also execute the model construction method provided by any embodiment of the present application. Related operations in .
  • the storage medium including the computer executable instructions provided by the embodiment of the present application is not limited to the operation of the network resource preloading as described above, and may also perform any of the embodiments of the present application. Related operations in the provided network resource preloading method.
  • the embodiment of the present application provides a terminal in which the model construction apparatus provided in the embodiment of the present application can be integrated.
  • the embodiment of the present application provides another terminal, where the network resource preloading device provided by the embodiment of the present application can be integrated.
  • the model can be constructed by the first terminal, and the model is transplanted to the second terminal that performs the network resource preloading operation, and the model construction and the network resource preloading operation can also be performed in the same terminal.
  • the terminal includes a smart phone, a tablet computer, a handheld game machine, a notebook computer, and a smart watch.
  • FIG. 8 is a structural block diagram of a terminal according to an embodiment of the present application. As shown in FIG.
  • the terminal may include a memory 810 and a processor 820.
  • the memory 810 is configured to store a computer program, a historical network access record, a terminal status, and an access prediction model; the processor 820 reads and executes the computer program stored in the memory 810.
  • the processor 820 when executing the computer program, implements the steps of: acquiring a historical network access record and a terminal status associated with the historical network access record; determining a state transition probability matrix according to the historical network access record and the terminal status and Observing probability matrix; constructing an access prediction model based on the state transition probability matrix and the observation probability matrix.
  • the memory 810 of the terminal may also be configured to store another computer program and pre-loaded network data.
  • Processor 820 can also be configured to read and execute computer programs stored in said memory 810.
  • the processor 820 when executing the computer program, implements the steps of: acquiring a current network access record and a terminal status associated with the current network access record according to a set period; and inputting the current network access record and terminal status in advance
  • the access prediction model is configured, wherein the access prediction model is a model of terminal state training corresponding to the historical network access record and the historical network access record; acquiring the network resource identifier to be accessed output by the access prediction model, and downloading The network resource identifies the corresponding network data and stores the data in the local cache.
  • FIG. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
  • the mobile terminal may include: a memory 901, a central processing unit (CPU) 902 (also referred to as a processor), a peripheral interface 903, a radio frequency (RF) circuit 905, and audio.
  • Circuitry 906, speaker 911, power management chip 908, input/output (I/O) subsystem 909, other input/control devices 910, and external port 904 are communicated via at least one communication bus or signal line 907.
  • the illustrated mobile terminal 900 is merely one example of a mobile terminal, and that the mobile terminal 900 may have more or fewer components than those shown in the figures, may combine at least two components, or may Has a different component configuration.
  • the various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including at least one of signal processing and application specific integrated circuits, at least in combination with hardware, software, or a combination of hardware and software.
  • the mobile terminal As a mobile phone as an example, the mobile terminal is described in detail.
  • the memory 901 can be accessed by the CPU 902, the peripheral interface 903, etc., and the memory 901 can include a high speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or Other volatile solid-state storage devices.
  • the computer program is stored in the memory 901, and the historical network access record, the terminal status, the access prediction model, the preloaded network data, and the like can also be stored.
  • Peripheral interface 903 which can connect the input and output peripherals of the device to CPU 902 and memory 901.
  • the I/O subsystem 909 can connect input and output peripherals on the device, such as touch screen 912 and other input/control devices 910, to peripheral interface 903.
  • the I/O subsystem 909 can include a display controller 9091 and at least one input controller 9092 configured to control other input/control devices 910. At least one of the input controllers 9092 receives electrical signals from other input/control devices 910 or transmits electrical signals to other input/control devices 910.
  • Other input/control devices 910 may include physical buttons (press buttons, rocker buttons, etc.) , dial, slide switch, joystick, click on the wheel. It is worth noting that the input controller 9092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
  • the touch screen 912 is an input interface and an output interface between the user terminal and the user, and displays the visual output to the user.
  • the visual output may include graphics, text, icons, videos, and the like.
  • Display controller 9091 in I/O subsystem 909 receives an electrical signal from touch screen 912 or an electrical signal to touch screen 912.
  • the touch screen 912 detects the contact on the touch screen, and the display controller 9091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 912, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 912 may be running.
  • the icon of the game, the icon of the network to the corresponding network, and the like.
  • the device may also include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by the touch screen.
  • the RF circuit 905 is mainly configured to establish communication between the mobile phone and the wireless network (ie, the network side), and implement data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, emails, and the like.
  • RF circuit 905 receives and transmits an RF signal, also referred to as an electromagnetic signal, and RF circuit 905 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network And other devices to communicate.
  • RF circuitry 905 may include known circuitry configured to perform these functions including, but not limited to, an antenna system, an RF transceiver, at least one amplifier, a tuner, at least one oscillator, a digital signal processor, a codec (COder- DECoder, CODEC) Chipset, Subscriber Identity Module (SIM), etc.
  • an antenna system an RF transceiver, at least one amplifier, a tuner, at least one oscillator, a digital signal processor, a codec (COder- DECoder, CODEC) Chipset, Subscriber Identity Module (SIM), etc.
  • CODEC codec
  • SIM Subscriber Identity Module
  • the audio circuit 906 is primarily configured to receive audio data from the peripheral interface 903, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 911.
  • the speaker 911 is arranged to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 905 to sound and play the sound to the user.
  • the power management chip 908 is configured to provide power and power management for the hardware connected to the CPU 902, the I/O subsystem, and the peripheral interface.
  • the terminal provided by the embodiment of the present application can determine the observation probability of the observation value corresponding to the next state by using the access prediction model based on the current state, and predict the target network resource before the user accesses the network resource, thereby improving the intelligence of the mobile terminal.
  • the terminal provided by the embodiment of the present application may preload the network data corresponding to the network resource identifier that may be accessed before acquiring the network data according to the identifier of the network resource, so as to directly read the network data from the local cache, and shorten the loading of the network data. Time, and thus, avoiding the fact that loading time is caused by loading data from the external network.
  • the model building device, the storage medium and the terminal provided in the above embodiments can execute the model building method provided by the embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method.
  • the model construction method provided by the embodiments of the present application.
  • the network resource preloading device, the storage medium, and the terminal provided in the foregoing embodiments may perform the network resource preloading method provided by the embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method.
  • the network resource preloading method provided by the embodiment of the present application may perform the network resource preloading method provided by the embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method.

Abstract

Disclosed are a model construction method, a network resource preloading method and apparatus, a medium, and a terminal. The model construction method comprises: obtaining a historical network access record and the terminal state associated with same; determining a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state; and constructing an access prediction model on the basis of the state transition probability matrix and the observation probability matrix.

Description

模型构建方法、网络资源预加载方法、装置、介质及终端Model construction method, network resource preloading method, device, medium and terminal
本申请要求在2017年12月18日提交中国专利局、申请号为201711364552.0的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application No. PCT Application No.
技术领域Technical field
本申请实施例涉及数据处理技术,例如涉及一种模型构建方法、网络资源预加载方法、装置、介质及终端。The embodiments of the present application relate to data processing technologies, for example, to a model construction method, a network resource preloading method, an apparatus, a medium, and a terminal.
背景技术Background technique
目前,移动终端为越来越多的用户提供通信服务、生活服务、娱乐服务等。例如,用户可以在移动终端上安装新闻类应用程序,通过此类应用程序浏览新闻资讯。At present, mobile terminals provide communication services, living services, entertainment services, and the like for more and more users. For example, a user can install a news application on a mobile terminal to view news information through such an application.
安装在移动终端上的应用程序通过访问网络资源,为用户提供需要的资讯。但是,由于网络加载过程耗时较长,导致用户需要等待网络数据加载,应用程序性能不佳,从而影响该应用程序的用户黏度。以新闻类应用为例,新闻界面中不仅包括文字内容,还包括图片或短视频等。移动终端在检测到用户点击一个新闻标题,到最终显示出该新闻标题对应的新闻界面的过程中,由设定的网络资源地址即统一资源定位符(Uniform Resource Locator,URL)下载网络数据所花费的时间少则几十毫秒(在网络通畅的环境下),多则数百毫秒甚至几秒,用户体验不佳。An application installed on a mobile terminal provides users with the information they need by accessing network resources. However, because the network loading process takes a long time, the user needs to wait for the network data to load, and the application performance is not good, thereby affecting the user's viscosity of the application. Take the news application as an example. The news interface includes not only text content, but also pictures or short videos. When the mobile terminal detects that the user clicks on a news title to the final display of the news interface corresponding to the news title, the network data is downloaded by the set resource resource address, that is, the Uniform Resource Locator (URL). The time is as low as tens of milliseconds (in a network-free environment), hundreds of milliseconds or even seconds, and the user experience is not good.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本申请实施例提供一种模型构建方法、网络资源预加载方法、装置、介质及终端,可以缩短网络数据的加载时间。The embodiment of the present application provides a model construction method, a network resource preloading method, a device, a medium, and a terminal, which can shorten the loading time of network data.
第一方面,本申请实施例提供了一种模型构建方法,包括:获取历史网络访问记录及与所述历史网络访问记录关联的终端状态;根据所述历史网络访问记录及所述终端状态确定状态转移概率矩阵及观测概率矩阵;基于所述状态转移概率矩阵及观测概率矩阵构建访问预测模型。In a first aspect, the embodiment of the present application provides a model construction method, including: acquiring a historical network access record and a terminal status associated with the historical network access record; determining a status according to the historical network access record and the terminal status The transition probability matrix and the observation probability matrix are constructed; the access prediction model is constructed based on the state transition probability matrix and the observation probability matrix.
第二方面,本申请实施例还提供了一种网络资源预加载方法,包括:按照设定周期获取当前网络访问记录及与当前网络访问记录关联的终端状态;将所述当前网络访问记录及所述终端状态输入预先构建的访问预测模型,其中,所述访问预测模型是根据历史网络访问记录及所述历史网络访问记录对应的终端状态训练的模型;获取所述访问预测模型输出的待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存。In a second aspect, the embodiment of the present application further provides a network resource preloading method, including: acquiring a current network access record and a terminal status associated with a current network access record according to a set period; and the current network access record and the location Entering a pre-built access prediction model, wherein the access prediction model is a model of terminal state training corresponding to the historical network access record and the historical network access record; and the access prediction model output is to be accessed. The network resource identifier is used to download network data corresponding to the network resource identifier, and is stored in a local cache.
第三方面,本申请实施例还提供了一种模型构建装置,该装置包括:历史记录获取模块,设置为获取历史网络访问记录及与所述历史网络访问记录关联的终端状态;矩阵确定模块,设置为根据所述历史网络访问记录及终端状态确定状态转移概率矩阵及观测概率矩阵;模型构建模块,设置为基于所述状态转移概率矩阵及观测概率矩阵构建访问预测模型。In a third aspect, the embodiment of the present application further provides a model construction apparatus, where the apparatus includes: a history acquisition module, configured to acquire a historical network access record and a terminal status associated with the historical network access record; and a matrix determination module, The method is configured to determine a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state; and the model building module is configured to construct an access prediction model based on the state transition probability matrix and the observation probability matrix.
第四方面,本申请实施例还提供了一种网络资源预加载装置,所述装置包括:当前记录获取模块,设置为按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态;模型输入模块,设置为将所述当前网络访问记录及终端状态输入预先构建的访问预测模型,其中,所述访问预测模型是根据历史网络访问记录及所述历史网络访问记录对应的终端状态训练的模型;预加载模块,设置为获取所述访问预测模型输出的待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存。In a fourth aspect, the embodiment of the present application further provides a network resource preloading device, where the device includes: a current record obtaining module, configured to acquire a current network access record according to a set period and associated with the current network access record. a terminal input module configured to input the current network access record and the terminal state into a pre-built access prediction model, wherein the access prediction model is based on a historical network access record and a terminal corresponding to the historical network access record a model of the state training; the preloading module is configured to acquire the network resource identifier to be accessed output by the access prediction model, and download the network data corresponding to the network resource identifier, and store the data in the local cache.
第五方面,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述第一方面所述的模型构建方法;或者,该程序被处理器执 行时实现如上述第二方面所述的网络资源预加载方法。In a fifth aspect, the embodiment of the present application further provides a computer readable storage medium, where the computer program is stored, and when the program is executed by the processor, the model construction method according to the first aspect is implemented; or the program The network resource preloading method as described in the second aspect above is implemented when executed by the processor.
第六方面,本申请实施例还提供一种终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,该处理器执行所述计算机程序时实现如上述第一方面所述的模型构建方法;或者,该处理器执行所述计算机程序时实现如上述第二方面所述的网络资源预加载方法。In a sixth aspect, the embodiment of the present application further provides a terminal, including a memory, a processor, and a computer program stored on the memory and operable on the processor, where the processor implements the computer program to implement the first aspect as described above The model construction method; or the network resource preloading method according to the second aspect described above is implemented when the processor executes the computer program.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图说明DRAWINGS
图1是本申请实施例提供的一种模型构建方法的流程图;1 is a flowchart of a method for constructing a model provided by an embodiment of the present application;
图2是本申请实施例提供的另一种模型构建方法的流程图;2 is a flowchart of another method for constructing a model provided by an embodiment of the present application;
图3是本申请实施例提供的一种网络资源预加载方法的流程图;3 is a flowchart of a network resource preloading method provided by an embodiment of the present application;
图4是本申请实施例提供的另一种网络资源预加载方法的流程图;4 is a flowchart of another network resource preloading method provided by an embodiment of the present application;
图5是本申请实施例提供的一种网络数据加载过程的示意图;FIG. 5 is a schematic diagram of a network data loading process according to an embodiment of the present application; FIG.
图6是本申请实施例提供的一种模型构建装置的结构框图;6 is a structural block diagram of a model construction apparatus according to an embodiment of the present application;
图7是本申请实施例提供的一种网络资源预加载装置的结构框图;FIG. 7 is a structural block diagram of a network resource preloading apparatus according to an embodiment of the present application;
图8是本申请实施例提供的一种终端的结构框图;FIG. 8 is a structural block diagram of a terminal according to an embodiment of the present disclosure;
图9是本申请实施例提供的一种移动终端的结构示意图。FIG. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. In addition, it should be noted that, for the convenience of description, only some but not all of the structures related to the present application are shown in the drawings.
在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各步骤描述成顺序的处理,但是其中的许多步骤可以被并行地、并发地或者同时实施。此外,各步骤的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as a process or method depicted as a flowchart. Although the flowcharts describe the various steps as a sequential process, many of the steps can be implemented in parallel, concurrently, or concurrently. In addition, the order of the steps can be rearranged. The process may be terminated when its operation is completed, but may also have additional steps not included in the figures. The processing may correspond to methods, functions, procedures, subroutines, subroutines, and the like.
图1为本申请实施例提供的一种模型构建方法的流程图,该方法可以由模型构建装置来执行,其中,该装置可由软件和硬件中的至少一种实现,一般可集成在终端中,例如移动终端中。如图1所示,该方法包括步骤110至步骤130。FIG. 1 is a flowchart of a method for constructing a model according to an embodiment of the present disclosure. The method may be implemented by a model building device, where the device may be implemented by at least one of software and hardware, and may be integrated into a terminal. For example in a mobile terminal. As shown in FIG. 1, the method includes steps 110 to 130.
在步骤110中,获取历史网络访问记录及与所述历史网络访问记录关联的终端状态。In step 110, a historical network access record and a terminal status associated with the historical network access record are obtained.
其中,终端可以是搭载有操作系统的移动终端,包括但不限于智能手机、平板电脑、掌上游戏机、笔记本电脑及智能手表等。The terminal may be a mobile terminal equipped with an operating system, including but not limited to a smart phone, a tablet computer, a handheld game console, a notebook computer, and a smart watch.
其中,历史网络访问记录可以是预设时间区间内本机中的应用程序访问网络行为的网络访问记录,网络访问记录包括但不限于网络资源地址(即URL地址)、打开该URL地址的时间戳(即访问时间)及访问该URL地址的应用程序的应用标识。终端状态包括但不限于网络环境状态、充电状态、剩余电量及位置信息。需要说明的是,本申请实施例中的终端状态是应用程序访问URL地址时的网络环境状态及充电状态等。The historical network access record may be a network access record of an application accessing the network behavior in the local machine in the preset time interval, and the network access record includes but is not limited to a network resource address (ie, a URL address), and a timestamp for opening the URL address. (ie access time) and the application ID of the application accessing the URL address. The terminal status includes, but is not limited to, a network environment status, a charging status, remaining power, and location information. It should be noted that the terminal status in the embodiment of the present application is a network environment status, a charging status, and the like when the application accesses the URL address.
应用程序访问网络时,移动终端会记录网络访问行为,作为历史网络访问记录。同时,在记录网络访问行为时,还可以获取相应应用程序访问网络时刻的移动终端状态。例如,在应用程序访问网络时,记录URL地址、发出网络访问请求的应用程序、打开URL的时间戳等网络访问信息。还可以采集此时移动终端的网络环境及充电状态等终端状态信息。其中,网络环境可以为是否连接无线网络。例如,是否连接无线保真(WIreless-FIdelity,WIFI)等。移动终端可以以数据表的形式存储历史网络访问记录及终端状态,该数据表存储于移动终端数据库。When an application accesses the network, the mobile terminal records the network access behavior as a historical network access record. At the same time, when the network access behavior is recorded, the state of the mobile terminal at the time when the corresponding application accesses the network can also be obtained. For example, when an application accesses the network, network access information such as a URL address, an application that issues a network access request, and a timestamp of opening a URL are recorded. It is also possible to collect terminal status information such as the network environment and the charging status of the mobile terminal at this time. The network environment may be a wireless network. For example, whether to connect WIreless-FIdelity (WIFI) or the like. The mobile terminal can store the historical network access record and the terminal status in the form of a data table, which is stored in the mobile terminal database.
表1、网络访问记录及与所述历史网络访问记录关联的移动终端状态的数据表Table 1. Network access record and data table of mobile terminal status associated with the historical network access record
Figure PCTCN2018117157-appb-000001
Figure PCTCN2018117157-appb-000001
需要说明的是,可以将上述表格中的一行作为一条状态记录,上述表格中列举的特征包括WIFI、应用程序、URL、打开此URL的时间戳及充电状态,但不限于上述特征,还可以根据实际模型构建的需要增加剩余电量、位置信息等特征。打开此URL的时间戳可以转换为年月日时分秒格式。例如,1497590695469=2017/6/16 13:24:55。It should be noted that one row in the above table may be recorded as a status. The features listed in the above table include WIFI, an application, a URL, a timestamp for opening the URL, and a charging status, but are not limited to the above features, and may also be based on The actual model construction needs to increase the remaining power, location information and other characteristics. The timestamp to open this URL can be converted to the year, month, day, hour, minute, and second format. For example, 1497590695469=2017/6/16 13:24:55.
在步骤120中,根据所述历史网络访问记录及终端状态确定状态转移概率矩阵及观测概率矩阵。In step 120, a state transition probability matrix and an observation probability matrix are determined according to the historical network access record and the terminal state.
需要说明的是,移动终端需要对上述表格中的历史网络访问记录及终端状态进行预处理得到状态集合及观测集合。其中,状态集合可以根据表1中WIFI、应用程序、打开URL的时间戳及充电状态确定,观测集合可以根据URL确定。It should be noted that the mobile terminal needs to preprocess the historical network access record and the terminal state in the above table to obtain a state set and an observation set. The status set may be determined according to the WIFI, the application, the timestamp of the open URL, and the charging status in Table 1. The observation set may be determined according to the URL.
需要说明的是,状态转移概率可以认为是状态集合中由状态q i转移到q j的概率,也就是说状态转移概率可以理解为相邻两个时刻中上一时刻对应的状态是q i并且下一时刻对应的状态是q j的概率。 It should be noted that the state transition probability can be regarded as the probability that the state q i is transferred to q j in the state set, that is, the state transition probability can be understood as the state corresponding to the previous moment in the two adjacent moments is q i and The state corresponding to the next moment is the probability of q j .
在本申请实施例中,计算状态集合中每个状态的状态转移概率的方式是以状态集合中由状态q i转移到q j的次数作为分子(需要说明的是q i可以与q j是相同的状态,也可以是不同的状态),以状态集合中状态q i的出现次数作为分母,进行除法运算。需要说明的是,可以以状态矩阵的形式表示状态集合。示例性的,可以采用如下公式计算所述状态集合中每个状态的状态转移概率: In the embodiment of the present application, the manner of calculating the state transition probability of each state in the state set is a numerator as the number of times the state q i is transferred to q j in the state set (it is required that q i may be the same as q j The state may be a different state. The division is performed by using the number of occurrences of the state q i in the state set as a denominator. It should be noted that the state set can be represented in the form of a state matrix. Illustratively, the state transition probability for each state in the set of states can be calculated using the following formula:
Figure PCTCN2018117157-appb-000002
Figure PCTCN2018117157-appb-000002
其中,q i表示当前时刻的当前状态,q j表示下一时刻的相邻状态,P(i t+1=q j|i t=q i)表示所述状态集合中状态由当前状态转移到相邻状态的概率,N(i t=q i,i i+1=q j)表示所述状态集合中当前状态为q i且相邻状态为q j的出现次数,N(i t=q i)表示所述状态集合中当前状态为q i的次数。 Where q i represents the current state of the current time, q j represents the adjacent state at the next moment, and P(i t+1 =q j |i t =q i ) indicates that the state in the state set is transferred from the current state to The probability of the adjacent state, N(i t =q i , i i+1 =q j ), represents the number of occurrences of the state in the state set being q i and the neighboring state being q j , N(i t =q i ) represents the number of times the current state in the set of states is q i .
需要说明的是,可以采用上述公式分别计算状态集合中相邻两个时刻之间的状态转移概率,根据状态转移概率形成状态转移概率矩阵。例如,该状态转移概率矩阵可以包含下一时刻出现的状态还是当前状态的状态转移概率,以及下一时刻出现的状态是状态矩阵中剩余状态的状态转移概率。也就是说,如果用Q表示所有可能的状态集合,即Q={q 1,q 2,q 3,...,q n},其中,n表示状态数,那么状态转移概率矩阵A可以表示为A=[a ij] n×n,可以用于记录所有状态之间跳转(包括状态向自身转移或者向状态集合中剩余状态转移)的概率。 It should be noted that the state transition probability between two adjacent moments in the state set may be respectively calculated by using the above formula, and the state transition probability matrix is formed according to the state transition probability. For example, the state transition probability matrix may include a state transition state occurring at a next moment or a state transition probability of a current state, and a state transition probability at which a state occurring at a next moment is a remaining state in the state matrix. That is, if all possible sets of states are represented by Q, ie Q = {q 1 , q 2 , q 3 , ..., q n }, where n represents the number of states, then the state transition probability matrix A can represent A = [a ij ] n × n can be used to record the probability of a jump between all states, including a state transition to itself or a transition to a state in the state set.
可以理解的是,状态转移概率可以如上述示例所示以转态转移概率矩阵的形式存在,还可以以其他方式存在并构建访问预测模型。例如,也可以是将状态与状态转移概率关联存储的状态转移概率表;或者是将状态转移概率存储在第一表格,将状态存储于第二表格,建立第一表格与第二表格的映射等等。It can be understood that the state transition probability may exist in the form of a transition transition probability matrix as shown in the above example, and may also exist and construct an access prediction model in other ways. For example, the state transition probability table may be stored in association with the state transition probability; or the state transition probability may be stored in the first table, the state may be stored in the second table, and the mapping between the first table and the second table may be established. Wait.
需要说明的是,观测概率可以认为是在某一状态下产生预设的观测值的概率,也就是说,若以q x表示某一状态,则确定该状态对应的观测值的方式可以是,由状态q x下观测值k出现 的次数除以状态q x的出现次数得到状态q x下产生观测值k的观测概率。示例性的,可以顺序获取状态集合中的一个状态作为当前状态,并统计当前状态的出现次数。根据所述当前状态对应的观测值以及所述当前状态的出现次数,采用如下公式计算当前状态的观测概率: It should be noted that the observation probability can be regarded as the probability of generating a preset observation value in a certain state, that is, if a certain state is represented by q x , the manner of determining the observation value corresponding to the state may be, times the number of occurrences of the observation state q x k values divided by the occurrence of a state is obtained in a state q x q x k generated observation probability of the observed values. Exemplarily, one state in the state set may be sequentially acquired as the current state, and the number of occurrences of the current state may be counted. According to the observation value corresponding to the current state and the number of occurrences of the current state, the following formula is used to calculate the observation probability of the current state:
Figure PCTCN2018117157-appb-000003
Figure PCTCN2018117157-appb-000003
其中,观测值k∈{v 1,v 2,...,v m},{v 1,v 2,...,v m}为观测集合,
Figure PCTCN2018117157-appb-000004
表示所述当前状态q x下产生观测值k的概率,N(i t=q x,v=k)表示所述当前状态q x下产生观测值k的次数。
Wherein, the observed values k ∈ {v 1 , v 2 , . . . , v m }, {v 1 , v 2 , . . . , v m } are observation sets,
Figure PCTCN2018117157-appb-000004
Indicates the probability that the observation value k is generated in the current state q x , and N(i t =q x , v=k) represents the number of times the observation value k is generated in the current state q x .
在步骤130中,基于所述状态转移概率矩阵及观测概率矩阵构建访问预测模型。In step 130, an access prediction model is constructed based on the state transition probability matrix and the observation probability matrix.
需要说明的是,本申请实施例中的访问预测模型可以是概率模型。该访问预测模型包括但不限于隐马尔可夫模型。隐马尔可夫模型描述一个隐藏的序列和一个对应的可观测的序列,该隐藏的序列称为状态序列,可以通过状态集合表示。该可观测的序列称为观测序列,可以通过观测集合表示。It should be noted that the access prediction model in the embodiment of the present application may be a probability model. The access prediction model includes, but is not limited to, a hidden Markov model. The hidden Markov model describes a hidden sequence and a corresponding observable sequence, called a sequence of states, which can be represented by a set of states. This observable sequence is called an observation sequence and can be represented by an observation set.
示例性的,若以Q表示状态集合,V表示观测集合,则存在Q={q 1,q 2,q 3,...,q n},V={v 1,v 2,v 3,...,v m},其中,n是状态数量的取值范围,m是观测值的取值范围。由于以A表示状态转移概率矩阵,存在A=[a ij] n×n,其中,1≤i≤n,1≤j≤n,a ij=P(i t+1=q j|i t=q i),a ij表示由状态q i转移到q j的概率。观测概率矩阵是观测概率的集合,也就是说若以B表示观测概率矩阵,则可以将观测概率矩阵表示为
Figure PCTCN2018117157-appb-000005
从而,可以通过状态集合Q、观测集合V、状态转移概率矩阵A及观测概率矩阵B构成访问预测模型,即该访问预测模型可以表示为[Q,V,A,B]。
Exemplarily, if Q represents a state set and V represents an observation set, then Q={q 1 , q 2 , q 3 , . . . , q n }, V={v 1 , v 2 , v 3 , ..., v m }, where n is the range of values for the number of states and m is the range of values for the observed values. Since A represents the state transition probability matrix, there is A=[a ij ] n×n , where 1≤i≤n, 1≤j≤n, a ij =P(i t+1 =q j |i t = q i ), a ij represents the probability of transitioning from state q i to q j . The observation probability matrix is a set of observation probabilities, that is, if the observation probability matrix is represented by B, the observation probability matrix can be expressed as
Figure PCTCN2018117157-appb-000005
Thus, the access prediction model can be constructed by the state set Q, the observation set V, the state transition probability matrix A, and the observation probability matrix B, that is, the access prediction model can be expressed as [Q, V, A, B].
本实施例的技术方案,通过获取历史网络访问记录及与该历史网络访问记录关联的终端状态;根据该历史网络访问记录及终端状态确定状态转移概率矩阵及观测概率矩阵;基于该状态转移概率矩阵及观测概率矩阵构建访问预测模型;从而,可以基于当前状态,通过访问预测模型确定下一状态对应的观测值的观测概率,由于观测值代表网络资源地址,进而,在用户访问网络资源之前已预测出目标网络资源,提升了移动终端的智能性。The technical solution of the embodiment obtains a historical network access record and a terminal state associated with the historical network access record; determines a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state; and based on the state transition probability matrix And the observation probability matrix constructs an access prediction model; thus, the observation probability of the observation value corresponding to the next state can be determined by accessing the prediction model based on the current state, since the observation value represents the network resource address, and thus, the user has predicted before accessing the network resource The target network resources are improved, and the intelligence of the mobile terminal is improved.
图2为本申请实施例提供的另一种模型构建方法的流程图。如图2所示,该方法包括步骤201至步骤210。FIG. 2 is a flowchart of another method for constructing a model according to an embodiment of the present application. As shown in FIG. 2, the method includes steps 201 to 210.
在步骤201中,获取历史网络访问记录及与所述历史网络访问记录关联的终端状态。In step 201, a historical network access record and a terminal status associated with the historical network access record are obtained.
其中,该历史网络访问记录包括访问网络的应用程序、网络资源地址及访问时间;以及,该终端状态包括网络环境信息及充电状态。The historical network access record includes an application for accessing the network, a network resource address, and an access time; and the terminal status includes network environment information and a charging status.
需要说明的是,原始数据(即历史网络访问记录)的采集是在移动终端上完成的。例如,实时获取移动终端的网络访问记录以及发生该网络访问行为时的终端状态,包括访问网络的应用程序、网络资源地址(即URL地址)、URL访问时间,以及应用访问网络时的WIFI状态、充电状态等,将上述网络访问记录及终端状态存储到移动终端的预设的数据库内,存储形式可以按照表1所示。It should be noted that the collection of the original data (ie, the historical network access record) is completed on the mobile terminal. For example, real-time access to the network access record of the mobile terminal and the status of the terminal when the network access behavior occurs, including an application accessing the network, a network resource address (ie, a URL address), a URL access time, and a WIFI status when the application accesses the network, In the charging state, etc., the network access record and the terminal state are stored in a preset database of the mobile terminal, and the storage form can be as shown in Table 1.
在步骤202中,根据预设规则匹配所述访问网络的应用程序的程序编号,以及所述网络资源地址对应的网络编号。In step 202, the program number of the application that accesses the network and the network number corresponding to the network resource address are matched according to a preset rule.
其中,预设规则可以是按照预设顺序为该应用程序编号,及按照预设顺序为网络资源地址编号。预设顺序可以是时间顺序,或其它用户规定的顺序。The preset rule may be that the application number is in a preset order, and the network resource address number is in a preset order. The preset order can be chronological, or other user-specified order.
示例性的,以表1中的数据为例:访问网络的应用程序包括QQ、微信、今日头条等应用,为每个应用程序分配一个编号,以编号替代应用程序。需要说明的是,为不同的应用程序进行编号,相同的应用程序具有相同的编号。例如,为QQ分配程序编号为0,为微信分配程序编号为1,为今日头条分配程序编号为2,.....,程序编号的最大编号取决于表1中应用程序的数量。应用程序可能对应多个网络资源地址,为不同的网络资源地址分配不同的网络编号。不同的应用程序可能访问相同的网络资源地址,相同的网络资源地址的网络编号相同。为应用程序访问的每一个URL分配一个网络编号,即网络编号k∈[0,1,2...],最大网 络编号取决于表1中共出现过多少个不同的URL。For example, take the data in Table 1 as an example: applications that access the network include applications such as QQ, WeChat, and Today's headlines, assigning a number to each application and replacing the application with a number. It should be noted that different applications are numbered, and the same applications have the same number. For example, the program number assigned to QQ is 0, the program number assigned to WeChat is 1, and the program number assigned to today's headline is 2, ....., and the maximum number of program numbers depends on the number of applications in Table 1. The application may correspond to multiple network resource addresses and assign different network numbers to different network resource addresses. Different applications may access the same network resource address, and the same network resource address has the same network number. Each network accessed by the application is assigned a network number, ie the network number k∈[0,1,2...], and the maximum network number depends on how many different URLs have appeared in Table 1.
在步骤203中,根据所述访问时间区分工作日和休息日,分别为工作日和休息日赋予不同日期编号。In step 203, the working days and the rest days are divided according to the access time, and different date numbers are assigned to the working days and the rest days, respectively.
需要说明的是,访问时间即为表1中打开此URL的时间戳,该时间戳可以转化为年月日时分秒格式,从而,可以根据该访问时间确定打开URL地址的时间是工作日还是休息日。可以设定在打开URL的时间为工作日时,表1中打开此URL的时间戳的取值为1,若打开URL的时间为休息日,则表1中打开此URL的时间戳的取值为0。It should be noted that the access time is the timestamp of opening the URL in Table 1, and the timestamp can be converted into a year, month, day, hour, minute, and second format, so that the time for opening the URL address is determined to be a working day or a rest according to the access time. day. You can set the timestamp of opening the URL to 1 in the case of opening the URL. If the time to open the URL is 1 day, the timestamp of opening the URL in Table 1 is the value of the timestamp. Is 0.
在步骤204中,根据所述访问时间所属的时间段确定时间编号。In step 204, the time number is determined according to the time period to which the access time belongs.
需要说明的是,需要预先对自然日内预设时间区间进行均分得到所述时间段,该时间段与时间编号关联存储。例如,预先将自然日内24小时均分为若干个时间段。例如,若以10分钟为时间间隔,则一个自然日24小时具有24*60/10=144个时间段,为时间段进行顺序编号,则访问时间对应的时间编号t∈[0,1,2,3...143]。由于已经为时间段编号,可以根据表1中任选一条记录中打开URL的时间戳确定终端访问该URL的访问时间,从而,根据该访问时间所属的时间段以及预先关联存储的时间段与时间编号,可以确定该条记录对应的时间编号。It should be noted that it is necessary to divide the preset time interval in the natural day in advance to obtain the time period, and the time period is stored in association with the time number. For example, 24 hours in the natural day are divided into several time periods in advance. For example, if the time interval is 10 minutes, then a natural day has 24*60/10=144 time segments for 24 hours, and the time segments are sequentially numbered, and the time number corresponding to the access time is t∈[0,1,2 , 3...143]. Since the time period has been numbered, the access time of the terminal to access the URL may be determined according to the timestamp of opening the URL in any one of the records in Table 1, thereby, according to the time period to which the access time belongs and the time period and time stored in advance association. The number can be used to determine the time number corresponding to the record.
可以理解的是,由于用户不可能24小时均使用移动终端,也可以根据用户的使用习惯,对用户使用移动终端的时间区间进行划分。例如,用户在凌晨12点至早晨6点之间处于睡眠状态,不会使用移动终端,则可以对刨除这一休息时间区间之外的时间区间进行划分,得到时间段。It can be understood that, since the user cannot use the mobile terminal 24 hours a day, the time interval in which the user uses the mobile terminal can be divided according to the usage habit of the user. For example, if the user is in a sleep state between 12 am and 6 am, and the mobile terminal is not used, the time interval outside the rest time interval can be divided to obtain a time period.
在步骤205中,根据所述网络环境信息判断终端是否接入无线网络,根据判断结果确定网络状态值。In step 205, it is determined whether the terminal accesses the wireless network according to the network environment information, and determines a network state value according to the determination result.
其中,网络环境信息包括终端接入网络与否及采用何种途径接入网络等信息,包括但不限于是否接入WIFI。The network environment information includes information such as whether the terminal accesses the network or not, and how to access the network, including but not limited to whether to access the WIFI.
可以预先规定若移动终端接入无线网络,则设置网络状态值为1,若移动终端未接入无线网络,则设置网络状态值为0。例如,若移动终端的WIFI开启且接入无线网络,则设置网络状态值为1,若移动终端的WIFI关闭,则设置网络状态值为0。It may be pre-defined that if the mobile terminal accesses the wireless network, the network status value is set to 1, and if the mobile terminal does not access the wireless network, the network status value is set to zero. For example, if the WIFI of the mobile terminal is turned on and the wireless network is connected, the network status value is set to 1, and if the WIFI of the mobile terminal is turned off, the network status value is set to 0.
在步骤206中,根据充电状态判断终端是否正在充电,根据判断结果确定充电状态值。In step 206, it is judged whether the terminal is charging according to the state of charge, and the state of charge value is determined according to the determination result.
可以预先规定若移动终端处于充电状态,则设置充电状态值为1,若移动终端未处于充电状态,则充电状态值为0。根据移动终端是否在充电,确定应用程序访问URL时的充电状态值。It can be pre-specified that if the mobile terminal is in the charging state, the charging state value is set to 1, and if the mobile terminal is not in the charging state, the charging state value is 0. The charging state value when the application accesses the URL is determined according to whether the mobile terminal is charging.
根据上述对历史网络访问记录及终端状态的预处理可以得到下述表格。The following table can be obtained based on the above-described preprocessing of historical network access records and terminal status.
表2、样本集合表Table 2, sample collection table
WIFIWIFI 应用程序application 是否工作日Whether working day 时间段period 充电状态charging URL(网址)URL (URL)
11 00 11 8181 11 00
00 11 11 8282 00 11
... ... ... ... ... ...
... ... ... ... ... ...
需要说明的是,表2中每一行代表一个状态。It should be noted that each row in Table 2 represents a state.
在步骤207中,根据所述程序编号、日期编号、时间编号、网络状态值及充电状态值生成状态集合,并根据所述网络编号构成观测集合。In step 207, a state set is generated based on the program number, date number, time number, network state value, and state of charge value, and an observation set is constructed based on the network number.
需要说明的是,由所述程序编号、日期编号、时间编号、网络状态值及充电状态值构成状态集合,由该网络编号构成观测集合。It should be noted that the program number, the date number, the time number, the network status value, and the charging status value constitute a state set, and the network number constitutes an observation set.
示例性的,以表2中的样本集合为例,由前5列对应特征值构成状态集合Q,由最后一列URL构成观测集合V。由于在模型构建时,获取至少两周的历史网络访问记录及对应的终 端状态,所以状态集合对应的状态矩阵中的记录的随机性很大,不一定是按照时间顺序排列的。在一实施例中,状态集合Q={q 1=[0,0,0,0,0],q 2=[0,0,0,0,1],...,q i=[1,0,1,81,1],q j=[0,1,1,82,0],...,q n},观测集合V={0,1,2,...,v m}。若以矩阵形式表示状态集合及观测集合可以如下: Exemplarily, taking the sample set in Table 2 as an example, the state set Q is composed of the first five columns of corresponding feature values, and the observation set V is composed of the last column of URLs. Since at least two weeks of historical network access records and corresponding terminal states are acquired during model construction, the records in the state matrix corresponding to the state set are highly random, not necessarily chronologically arranged. In an embodiment, the state set Q = {q 1 = [0, 0, 0, 0, 0], q 2 = [0, 0, 0, 0, 1], ..., q i = [1 ,0,1,81,1],q j =[0,1,1,82,0],...,q n }, observation set V={0,1,2,...,v m }. If the state set and the observation set are represented in a matrix form, they can be as follows:
Figure PCTCN2018117157-appb-000006
以及,
Figure PCTCN2018117157-appb-000007
Figure PCTCN2018117157-appb-000006
as well as,
Figure PCTCN2018117157-appb-000007
其中,Q的记录数可以表示为2*2*144*2*终端上访问网络的应用程序的个数,V的大小是访问过URL的个数。The number of records of Q can be expressed as 2*2*144*2*, the number of applications accessing the network on the terminal, and the size of V is the number of URLs visited.
在步骤208中,计算所述状态集合中每个状态的状态转移概率,并根据所述状态转移概率生成状态转移概率矩阵。In step 208, a state transition probability for each state in the set of states is calculated, and a state transition probability matrix is generated based on the state transition probability.
需要说明的是,本申请实施例中的状态转移概率计算的是当前状态以及下一行可能出现的状态的转移概率,即当前状态与下一状态在上述状态集合中成对出现,且下一状态位于当前状态所在行的下一行。例如,在某些状态下,当前状态是q i=[1,0,1,81,1],且下一状态是q j=[0,1,1,82,0],而在另一些状态下,当前状态是q i=[1,0,1,81,1],但是下一状态q j=[0,0,0,0,1]等等,可以将上述列举的两种q j认为是当前状态的相邻的下一状态。由于每个用户有自己的网络访问习惯,若在某天的某一时段用户访问了一些URL,那么在至少两周的采样周期内,用户在相同时间段内访问同样URL的概率会比较高,因此,在状态矩阵中存在重复出现的状态。示例性的,若要计算由当前状态q i跳转至下一状态q j的状态转移概率,则可以统计上述状态矩阵Q中上一行是q i且下一行是q j的状态对数量,另外,还统计上述状态矩阵Q中出现q i状态的数量。从而,将状态矩阵Q中上一行是q i且下一行是q j的状态对数量除以q i状态的数量的结果作为由当前状态q i跳转至下一状态q j的状态转移概率。需要说明的是,q j包括与状态矩阵中除去q i的剩余状态,还包括状态q i本身。针对状态矩阵中的每一条状态计算其状态转移概率,得到n*n的状态转移概率矩阵,可以是上述的[a ij] n×nIt should be noted that the state transition probability in the embodiment of the present application calculates the current state and the transition probability of the state in which the next row may occur, that is, the current state and the next state appear in pairs in the state set, and the next state The next line in the row where the current state is located. For example, in some states, the current state is q i =[1,0,1,81,1], and the next state is q j =[0,1,1,82,0], while in others In the state, the current state is q i =[1,0,1,81,1], but the next state q j =[0,0,0,0,1], etc., the two q listed above can be j is considered to be the next next state of the current state. Since each user has their own network access habits, if a user visits some URLs at a certain time of the day, the probability of the user accessing the same URL in the same time period is higher in the sampling period of at least two weeks. Therefore, there is a recurring state in the state matrix. Exemplarily, if the state transition probability of the current state q i to the next state q j is to be calculated, the state of the state matrix Q in which the previous row is q i and the next row is q j may be counted, and The number of occurrences of the q i state in the above state matrix Q is also counted. Thus, the result of the state in which the upper row of the state matrix Q is q i and the next row is q j is divided by the number of q i states is taken as the state transition probability of jumping from the current state q i to the next state q j . It should be noted that q j includes the remaining state of removing q i from the state matrix, and also includes the state q i itself. The state transition probability is calculated for each state in the state matrix, and a state transition probability matrix of n*n is obtained, which may be [a ij ] n×n described above.
在步骤209中,根据所述状态集合及观测集合计算每个状态对应的观测值的观测概率,并根据所述观测概率生成观测概率矩阵。In step 209, an observation probability of an observation value corresponding to each state is calculated according to the state set and the observation set, and an observation probability matrix is generated according to the observation probability.
在本申请实施例中,顺序获取状态矩阵中的一行状态作为当前状态,获取与当前状态对应的观测值,统计相同的观测值的出现次数N(i t=q x,v=k),其中,x∈[1,2,3,...,n],k∈[1,2,3,...,v m]。然后,将N(i t=q x,v=k)除以状态矩阵中当前状态的出现次数的运算结果作为由当前状态下产生观测值k的观测概率
Figure PCTCN2018117157-appb-000008
In the embodiment of the present application, a row state in the state matrix is sequentially acquired as a current state, an observation value corresponding to the current state is acquired, and the number of occurrences of the same observation value N (i t =q x , v=k) is counted, wherein , x ∈ [1, 2, 3, ..., n], k ∈ [1, 2, 3, ..., v m ]. Then, N (i t =q x , v=k) is divided by the operation result of the current state of the state matrix in the state matrix as the observation probability of the observation value k generated by the current state.
Figure PCTCN2018117157-appb-000008
依照上述方式,以状态矩阵中的每个状态作为当前状态,分别确定当前状态下产生观测集合中观测值的概率,构成n*m的观测概率矩阵B。According to the above manner, each state in the state matrix is taken as the current state, and the probability of generating the observation value in the observation set in the current state is respectively determined to constitute the observation probability matrix B of n*m.
在步骤210中,构建访问预测模型。In step 210, an access prediction model is constructed.
在本申请实施例中,访问预测模型为隐马尔可夫模型。根据状态集合、观测集合、状态转移概率矩阵A及观测概率矩阵B可以构成隐马尔可夫模型λ,访问预测模型可以表示为λ=[Q,V,A,B]该访问预测模型内置于终端内,设置为提前预判哪些URL对应的资源是需要预先下载的。In the embodiment of the present application, the access prediction model is a hidden Markov model. According to the state set, the observation set, the state transition probability matrix A and the observation probability matrix B, the hidden Markov model λ can be constructed, and the access prediction model can be expressed as λ=[Q, V, A, B]. The access prediction model is built in the terminal. Within the setting, it is set to predict in advance which resources corresponding to the URL need to be downloaded in advance.
需要说明的是,由于用户使用移动终端上的应用程序访问网络资源的随机性很大,用于预测移动终端未来可能访问的网络资源地址的样本集合并不是一成不变的,可以根据实际需要设置模型的更新条件,从而,在满足更新条件时,对该访问预测模型进行更新。示例性的,设定更新时间,当检测到系统时间满足该更新时间时,获取预设时间区间内的历史网络访问 行为及移动终端状态信息,对访问预测模型进行更新。具体可以是设定更新周期,在达到该更新周期时,确定满足模型更新条件。例如,可以设定一周或一天为更新周期。若每周更新一次模型,则在检测到满足更新间隔时,采用增量更新的方式,获取最近一周内移动终端的网络行为记录及终端状态。可以理解的是,还可以设定更新日期,例如每周一或每隔一周的周一等。样本更新操作还可以由用户触发,例如,用户输入模型更新指示,基于该更新指示执行模型更新操作等等。It should be noted that, since the randomness of the user accessing the network resource by the application on the mobile terminal is very large, the sample set for predicting the network resource address that the mobile terminal may access in the future is not static, and the model may be set according to actual needs. The condition is updated so that the access prediction model is updated when the update condition is met. Exemplarily, the update time is set. When the system time is detected to satisfy the update time, the historical network access behavior and the mobile terminal state information in the preset time interval are acquired, and the access prediction model is updated. Specifically, the update period may be set, and when the update period is reached, it is determined that the model update condition is satisfied. For example, you can set a week or day as the update cycle. If the model is updated once a week, when it is detected that the update interval is satisfied, the network behavior record and the terminal state of the mobile terminal in the latest week are obtained by means of incremental update. It can be understood that the update date can also be set, for example, Monday or every other week of Monday. The sample update operation may also be triggered by a user, for example, the user inputs a model update indication, performs a model update operation based on the update indication, and the like.
本实施例的技术方案,通过学习终端的历史网络访问行为及与历史网络访问行为关联的终端状态,构建访问预测模型,提高模型的自适应能力,能够对不同用户具有很好的适用性。The technical solution of the embodiment, by learning the historical network access behavior of the terminal and the terminal state associated with the historical network access behavior, constructs an access prediction model, improves the adaptive capability of the model, and has good applicability to different users.
图3是本申请实施例提供的一种网络资源预加载方法的流程图,该方法可以由网络资源预加载装置来执行,其中,该装置可由软件和硬件中的至少一种实现,一般可集成在终端中,例如移动终端内。如图3所示,该方法包括步骤310至步骤330。3 is a flowchart of a network resource preloading method provided by an embodiment of the present application, where the method may be implemented by a network resource preloading device, where the device may be implemented by at least one of software and hardware, and generally integrated. In the terminal, for example in a mobile terminal. As shown in FIG. 3, the method includes steps 310 to 330.
在步骤310中,按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态。In step 310, the current network access record and the terminal status associated with the current network access record are obtained according to a set period.
需要说的是,当前网络访问记录包括当前时刻访问网络的应用程序、网络资源地址(即URL地址)、及打开该URL的时间戳。与当前网络访问记录关联的终端状态包括当前网络环境信息及当前充电状态,包括但不限监控终端当前是否开接入WIFI,以及监控终端识别在充电等。It should be noted that the current network access record includes the application that accesses the network at the current time, the network resource address (ie, the URL address), and the timestamp at which the URL is opened. The terminal status associated with the current network access record includes the current network environment information and the current charging status, including but not limited to whether the monitoring terminal is currently connected to the WIFI, and the monitoring terminal recognizes that the charging is performed.
需要说明的是,设定周期可以是系统默认的,还可以是获取用户设置的用于调用访问预测模型根据当前状态预测下一状态的时间间隔。例如,可以设置每隔10分钟调用一次访问预测模型,以根据当前状态预测下一状态可能访问的网络资源地址,并预先下载预测得到的网络资源地址关联的网络数据。It should be noted that the setting period may be the default of the system, or may be a time interval set by the user for invoking the access prediction model to predict the next state according to the current state. For example, the access prediction model may be set to be called every 10 minutes to predict the network resource address that the next state may access according to the current state, and pre-download the network data associated with the predicted network resource address.
可以理解的是,在获取到当前网络访问记录及其关联的终端状态后,需要对当前网络访问记录及终端状态进行预处理(该预处理的方式与上述实施例的记载相同,此处不再赘述),得到与访问预测模型的输入数据格式匹配的当前状态。It can be understood that after the current network access record and its associated terminal status are obtained, the current network access record and the terminal status need to be pre-processed. The pre-processing manner is the same as that in the foregoing embodiment, and is no longer As a result, get the current state that matches the input data format of the access prediction model.
在步骤320中,将所述当前网络访问记录及终端状态输入预先构建的访问预测模型。In step 320, the current network access record and terminal status are entered into a pre-built access prediction model.
其中,该访问预测模型是根据历史网络访问记录及所述历史网络访问记录对应的终端状态训练的模型。可以理解的是,此处的访问预测模型可以是通过上述实施例记载的方案构建的模型。The access prediction model is a model of terminal state training corresponding to the historical network access record and the historical network access record. It can be understood that the access prediction model herein may be a model constructed by the scheme described in the above embodiment.
在本实施例中,由于已对当前网络访问记录及终端状态进行预处理得到当前状态,将当前状态直接输出该访问预测模型,以通过该访问预测模型预判下一时刻可能出现的下一状态,进而,分别计算下一状态对应的每个观测值(即网络资源标识,并且,网络资源标识可以包括网络资源地址)的观测概率,该观测概率可以认为是访问预测模型的输出。示例性的,将当前状态q i输入访问预测模型,根据状态转移概率矩阵确定当前状态q i对应的所有下一个状态的状态转移概率,从而,将状态转移概率最大的一个状态作为下一时刻最可能出现的下一状态q j。然后,再根据q j及观测概率矩阵B确定q j对应的参考观测概率。对该参考观测概率进行降序排列,由该参考观测概率中筛选出排序在前的设定数量的目标观测概率,将目标观测概率对应的网络资源标识作为下一状态最可能访问的网络资源标识,并进行输出。 In this embodiment, since the current network access record and the terminal state are preprocessed to obtain the current state, the current state is directly outputted to the access prediction model, so that the access prediction model predicts the next state that may occur at the next moment. And, respectively, an observation probability of each observation value (ie, a network resource identifier, and the network resource identifier may include a network resource address) corresponding to the next state is calculated, and the observation probability may be considered as an output of the access prediction model. Exemplarily, the current state q i is input into the access prediction model, and the state transition probability of all the next states corresponding to the current state q i is determined according to the state transition probability matrix, so that the state with the highest state transition probability is the most The next state q j that may appear. Then, the reference observation probability corresponding to q j is determined according to q j and the observation probability matrix B. The reference observation probability is arranged in descending order, and the target observation probability of the set number prior to the ranking is selected by the reference observation probability, and the network resource identifier corresponding to the target observation probability is used as the network resource identifier most likely to be accessed in the next state, And output.
在步骤330中,获取所述访问预测模型输出的待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存。In step 330, the network resource identifier to be accessed that is output by the access prediction model is obtained, and the network data corresponding to the network resource identifier is downloaded and stored in the local cache.
需要说明的是,该网络资源标识可以是网络资源地址。例如,上述设定数量为100,则获取该访问预测模型输出的下一状态对应的100个网络资源地址,这100个网络资源地址就被认为需要预加载。It should be noted that the network resource identifier may be a network resource address. For example, if the set number is 100, the 100 network resource addresses corresponding to the next state output by the access prediction model are obtained, and the 100 network resource addresses are considered to be preloaded.
可以理解的是,在预测得到网络资源地址之后,若该网络资源地址对应的网络数据已被加载,则无需重复加载该网络数据,避免过多占用缓存。示例性的,在预测得到上述100个网络资源地址之后,判断预测得到该网络资源地址对应的网络数据是否已被预加载;若预测得到该网络资源地址对应的网络数据已被预加载,则放弃执行针对所述网络数据的下载操作, 若预测得到该网络资源地址对应的网络数据没有被预加载,下载该网络资源标识对应的网络数据,并存储于本地缓存。It can be understood that after the network resource address is predicted, if the network data corresponding to the network resource address has been loaded, the network data does not need to be repeatedly loaded to avoid excessive occupation of the cache. Exemplarily, after predicting the foregoing 100 network resource addresses, it is determined whether the network data corresponding to the network resource address is predicted to be preloaded; if it is predicted that the network data corresponding to the network resource address has been preloaded, then discarding Performing a download operation for the network data, if it is predicted that the network data corresponding to the network resource address is not preloaded, download the network data corresponding to the network resource identifier, and store the data in the local cache.
需要说明的是,下载该网络资源标识对应的网络数据的方式可以是通过互联网与网络资源地址对应的服务器建立通信连接,由该服务器下载该网络资源地址对应的网络数据。可以理解的是,下载该网络资源标识对应的网络数据的方式不限于上述示例列举的方式。It should be noted that the method for downloading the network data corresponding to the network resource identifier may be that a communication connection is established between the server corresponding to the network resource address through the Internet, and the network data corresponding to the network resource address is downloaded by the server. It can be understood that the manner of downloading the network data corresponding to the network resource identifier is not limited to the manner enumerated in the above examples.
本实施例的技术方案,通过按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态,将所述当前网络访问记录及终端状态输入上述访问预测模型,得到待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存,可以在根据某一网络资源标识获取网络数据之前,预加载可能访问的网络资源标识对应的网络数据,实现直接由本地缓存中读取网络数据,缩短网络数据的加载时间,从而,避免由外网加载数据导致加载时间较长的情况发生。The technical solution of the embodiment obtains the current network access record and the terminal status associated with the current network access record according to the set period, and inputs the current network access record and the terminal status into the access prediction model to obtain a to-be-accessed The network resource identifier is configured to download the network data corresponding to the network resource identifier, and store the network data in the local cache, and preload the network data corresponding to the network resource identifier that may be accessed before acquiring the network data according to the identifier of the network resource, The network data is read in the local cache to shorten the loading time of the network data, thereby avoiding the situation that the loading time is long caused by loading data from the external network.
需要说明的是,上述预加载的网络数据被缓存在本地缓存,可以在应用程序获取到网络访问请求时,直接由本地缓存中下载该网络访问请求对应的网络数据。其中,应用程序包括具有网络访问功能的应用程序。例如,新闻类应用程序、即时通讯类应用程序或多媒体类应用程序等。获取应用程序的网络访问请求。其中,网络访问请求可以理解为由应用程序向指定网络资源地址(即URL)对应的服务器请求获取网络数据的消息。该网络访问请求可以由应用程序生成,并上报至系统网络功能模块。在系统网络功能模块获取到该请求获取指定URL的网络数据的消息时,系统得知有应用程序要获取网络资源。需要说明的是,系统网络功能模块可以理解为系统实现网络访问功能的代码及协议栈等。It should be noted that the pre-loaded network data is cached in the local cache, and the network data corresponding to the network access request may be directly downloaded from the local cache when the application obtains the network access request. Among them, the application includes an application with network access capabilities. For example, a news application, an instant messaging application, or a multimedia application. Get a network access request for the application. The network access request may be understood as a message that the application requests the network corresponding to the specified network resource address (ie, the URL) to obtain the network data. The network access request can be generated by the application and reported to the system network function module. When the system network function module obtains the message requesting to obtain the network data of the specified URL, the system knows that the application needs to acquire the network resource. It should be noted that the system network function module can be understood as the code and protocol stack of the system to implement the network access function.
然后,根据所述网络访问请求查询所述本地缓存,确定所述网络访问请求对应的网络数据的预加载状态。示例性的,网络访问请求包括网络资源地址(URL地址),在获取应用程序的网络访问请求时,提取网络资源地址。根据该网络资源地址查询本地缓存,判断是否存在该网络资源地址对应的网络数据。若不存在该网络资源地址对应的网络数据,则确定该网络访问请求对应的网络数据未预加载,执行网络访问流程,由外网下载该网络访问请求对应的网络数据。若存在该网络资源地址对应的网络数据,则确定该网络访问请求对应的网络数据已预加载,由本地缓存中读取该网络数据,直接返回给发出网络访问请求的应用程序,避免移动终端通过互联网由服务器下载网络数据,缩短了网络数据加载的时间。Then, the local cache is queried according to the network access request, and a preload state of the network data corresponding to the network access request is determined. Exemplarily, the network access request includes a network resource address (URL address), and when the network access request of the application is obtained, the network resource address is extracted. The local cache is queried according to the network resource address, and it is determined whether the network data corresponding to the network resource address exists. If the network data corresponding to the network resource address does not exist, it is determined that the network data corresponding to the network access request is not preloaded, the network access process is executed, and the network data corresponding to the network access request is downloaded by the external network. If the network data corresponding to the network resource address exists, it is determined that the network data corresponding to the network access request is preloaded, and the network data is read by the local cache, and is directly returned to the application that sends the network access request to prevent the mobile terminal from passing. The Internet downloads network data from the server, which shortens the time for loading network data.
图4是本申请实施例提供的另一种网络资源预加载方法的流程图。如图4所示,该方法包括步骤401至步骤416。FIG. 4 is a flowchart of another network resource preloading method provided by an embodiment of the present application. As shown in FIG. 4, the method includes steps 401 to 416.
在步骤401中,按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态。In step 401, the current network access record and the terminal status associated with the current network access record are obtained according to a set period.
其中,设定周期可以是系统默认,也可以是用户根据实际需要设置的,用于触发根据当前时刻网络访问记录及终端状态预测下一时刻可能访问的网络资源标识的操作。The setting period may be the default of the system, or may be set by the user according to the actual needs, and is used to trigger the operation of predicting the network resource identifier that may be accessed at the next moment according to the current time network access record and the terminal state.
在步骤402中,对所述当前网络访问记录及终端状态进行预处理,得到当前状态。In step 402, the current network access record and the terminal status are preprocessed to obtain a current status.
在步骤403中,将所述当前状态输入预先构建的访问预测模型,以通过所述访问预测模型预测下一时刻对应的下一状态,并分别确定所述下一状态对应的网络资源地址的观测概率。In step 403, the current state is input into a pre-built access prediction model to predict a next state corresponding to the next moment by using the access prediction model, and respectively determine an observation of a network resource address corresponding to the next state. Probability.
在步骤404中,获取所述访问预测模型输出的下一状态对应的待访问的网络资源地址。In step 404, the network resource address to be accessed corresponding to the next state output by the access prediction model is obtained.
在步骤405中,判断终端是否接入无线网络,若终端接入无线网,则执行步骤406,若终端没有接入无线网,执行步骤407。In step 405, it is determined whether the terminal accesses the wireless network. If the terminal accesses the wireless network, step 406 is performed. If the terminal does not access the wireless network, step 407 is performed.
本申请实施例中的无线网络包括但不限于WIFI,也就是说在获取到访问预测模型输出的网络资源地址后,可以获取终端的联网状态,判定终端是否连接WIFI。The wireless network in the embodiment of the present application includes but is not limited to WIFI. That is to say, after obtaining the network resource address outputted by the access prediction model, the network state of the terminal can be obtained, and whether the terminal is connected to the WIFI is determined.
在步骤406中,下载所述网络资源标识对应的网络数据,并存储于本地缓存。In step 406, the network data corresponding to the network resource identifier is downloaded and stored in a local cache.
可以理解的是,在某些实施例中,本步骤执行完成后,可以跳转执行步骤413。在某些实施例中,本步骤执行完成后,可以跳转至步骤410,执行步骤410以在下载网络资源标识对应的网络数据之后,通过网络爬虫获取连接到该网络资源标识包含的第一网络资源地址的第二网络资源地址,加载该第二网络资源地址对应的网络数据,并存储于本地缓存。It can be understood that, in some embodiments, after the execution of this step is completed, step 413 may be skipped. In some embodiments, after the step is performed, the process may go to step 410, where the step 410 is performed to obtain the first network included in the network resource identifier through the network crawler after downloading the network data corresponding to the network resource identifier. The second network resource address of the resource address loads the network data corresponding to the second network resource address, and is stored in the local cache.
在步骤407中,获取所述终端的蜂窝移动网络数据的状态信息。In step 407, status information of the cellular mobile network data of the terminal is obtained.
其中,在本实施例中状态信息包括但不限于蜂窝移动网络数据开关的开关状态、日流量上限、当日已使用流量以及剩余流量状态。The status information in this embodiment includes, but is not limited to, a switch state of a cellular mobile network data switch, a daily traffic upper limit, a current used traffic, and a remaining traffic state.
在步骤408中,判断所述状态信息是否满足预设条件,若所述状态信息满足预设条件,则执行步骤406,若所述状态信息不满足预设条件,执行步骤409。In step 408, it is determined whether the state information meets the preset condition. If the state information meets the preset condition, step 406 is performed. If the state information does not meet the preset condition, step 409 is performed.
需要说明的是,预设条件可以是蜂窝移动网络数据开关处于开启状态且剩余流量超过预设流量门限。在一实施例中,预设条件还可以是蜂窝移动网络数据开关处于开启状态且当前已使用流量未达到预设的日流量上限等等。It should be noted that the preset condition may be that the cellular mobile network data switch is in an open state and the remaining traffic exceeds a preset traffic threshold. In an embodiment, the preset condition may also be that the cellular mobile network data switch is in an open state and the currently used traffic does not reach a preset daily traffic upper limit or the like.
在步骤409中,根据所述网络资源标识对应的网络数据的数据类型和数据量中的至少一种确定目标网络数据,对所述目标网络数据进行加载。In step 409, the target network data is determined according to at least one of a data type and a data amount of the network data corresponding to the network resource identifier, and the target network data is loaded.
需要说明的是,在蜂窝移动网络数据的状态信息是不满足预设条件时,获取由访问预测模型输出的网络资源标识对应的网络数据的数据类型,其中,该数据类型包括但不限于文字、图片、动画、视频及音频等。在一实施例中,还可以获取该网络资源标识对应的网络数据的数据量(也就是网络数据的大小)。例如,网络数据D1的数据量是5MB,网络数据D2的数据量是50MB等等。目标网络数据可以指满足预设筛选条件的网络数据,其中,筛选条件可以是数据类型为文字及图片的网络数据可以作为目标网络数据。在一实施例中,筛选条件还可以是数据量小于预设数据量阈值的网络数据可以作为目标网络数据。It should be noted that, when the state information of the cellular mobile network data does not meet the preset condition, the data type of the network data corresponding to the network resource identifier output by the access prediction model is acquired, where the data type includes but is not limited to text, Pictures, animations, videos and audio. In an embodiment, the data volume of the network data corresponding to the network resource identifier (that is, the size of the network data) may also be acquired. For example, the data amount of the network data D1 is 5 MB, the data amount of the network data D2 is 50 MB, and the like. The target network data may refer to network data that meets preset filtering conditions, wherein the filtering condition may be that network data whose data type is text and picture can be used as target network data. In an embodiment, the screening condition may also be that the network data whose data amount is less than the preset data amount threshold may be used as the target network data.
将获取的网络资源标识对应的网络数据的数据类型与预设筛选条件进行匹配,若匹配成功,则确定匹配成功的网络数据为目标网络数据,并对该目标网络数据进行加载。在一实施例中,将获取的网络资源标识对应的网络数据的数据量与预设筛选条件进行匹配,若匹配成功,则确定匹配成功的网络数据为目标网络数据,并对该目标网络数据进行加载。可以理解的是,上述数据类型和数据量可以结合起来用于判定目标网络数据,也可以单独使用。The data type of the network data corresponding to the obtained network resource identifier is matched with the preset screening condition. If the matching is successful, it is determined that the successfully matched network data is the target network data, and the target network data is loaded. In an embodiment, the data quantity of the network data corresponding to the acquired network resource identifier is matched with the preset screening condition. If the matching is successful, determining that the successfully matched network data is the target network data, and performing the target network data load. It can be understood that the above data types and data amounts can be combined for use in determining target network data, or can be used alone.
在步骤410中,通过网络爬虫获取链接到所述网络资源标识包含的第一网络资源地址的第二网络资源地址,加载所述第二网络资源地址对应的网络数据,并存储于本地缓存。In step 410, the second network resource address linked to the first network resource address included in the network resource identifier is obtained by the network crawler, and the network data corresponding to the second network resource address is loaded and stored in the local cache.
需要说明的是,在某些网络资源地址对应的网络数据中可能包含其它网络资源地址的链接,可以通过网络爬虫获取这些附加网络资源地址,并进行数据预加载。例如,在下载目标网络数据时,发现存在链接到第一网络资源地址的第二网络资源地址(该第二网络资源地址可以不属于访问预测模型输出的网络资源标识的集合),可以一并下载该第二网络资源地址对应的网络数据。需要注意的是,在下载该第二网络资源地址时同样可以根据步骤409中记载的预设筛选条件确定实际需下载的网络数据。It should be noted that the network data corresponding to some network resource addresses may include links of other network resource addresses, and these additional network resource addresses may be obtained through the network crawler, and data preloading may be performed. For example, when downloading the target network data, it is found that there is a second network resource address linked to the first network resource address (the second network resource address may not belong to the set of network resource identifiers output by the access prediction model), and may be downloaded together. The network data corresponding to the second network resource address. It should be noted that, when downloading the second network resource address, the network data actually needed to be downloaded may also be determined according to the preset screening conditions described in step 409.
可以理解的是,本步骤并不是必须执行的步骤,在某些实施例中在执行完步骤409后也可以不执行本步骤。It can be understood that this step is not a step that must be performed. In some embodiments, this step may not be performed after step 409 is performed.
在步骤411中,获取所述本地缓存中网络数据占用的存储空间。In step 411, the storage space occupied by the network data in the local cache is obtained.
可以理解的是,由于预加载网络数据并存储于本地缓存中,随着预加载的网络数据量的增加,其占用本地缓存也就越多,可能影响终端的运行效率。为了避免本地缓存太多网络数据,可以采用设定策略清除本地缓存中的部分数据,以减少本地缓存中存储的网络数据量。需要说明的是,触发执行数据清除事件的方式有很多种,本申请实施例并不作具体限定。例如,可以按照设定周期获取本地缓存中网络数据的数据量的大小(也就是占用存储空间的大小)。又如,可以预先设定清除网络数据缓存的时间,如凌晨0点~1点进行本地缓存的网络数据的清除等等。It can be understood that, because the network data is preloaded and stored in the local cache, as the amount of preloaded network data increases, the more local cache is occupied, which may affect the operating efficiency of the terminal. In order to avoid caching too much network data locally, a set policy can be used to clear part of the data in the local cache to reduce the amount of network data stored in the local cache. It should be noted that there are many ways to trigger the execution of the data clearing event, which is not specifically limited in the embodiment of the present application. For example, the size of the data amount of the network data in the local cache (that is, the size of the storage space) can be obtained according to a set period. For another example, the time for clearing the network data cache may be preset, such as clearing the locally cached network data from 0:00 to 12:00.
在步骤412中,在所述存储空间超过设定阈值时,根据所述网络数据的缓存时间和使用频率中的至少一种确定待清除数据,并清除所述待清除数据。In step 412, when the storage space exceeds a set threshold, data to be cleared is determined according to at least one of a cache time and a use frequency of the network data, and the data to be cleared is cleared.
其中,设定阈值可以是系统默认,也可以由用户根据实际需要进行设定。示例性的,若总的缓存数据量超过100MB,则清除设定缓存文件。其中,设定缓存文件可以根据缓存文件的缓存时间确定,例如,缓存时间超过1小时的缓存数据可以被认为是设定缓存文件。另外,设定缓存文件还可以根据使用频率确定,例如,使用频率低于5次/小时的缓存数据可以被认 为是设定缓存文件。需要注意的是,上述缓存时间和使用频率可以综合起来用于确定设定缓存文件,也可以单独使用。The setting threshold may be the system default, or may be set by the user according to actual needs. Exemplarily, if the total amount of cached data exceeds 100 MB, the set cache file is cleared. The setting cache file may be determined according to the cache time of the cache file. For example, the cache data whose cache time exceeds 1 hour may be considered as setting a cache file. In addition, setting the cache file can also be determined according to the frequency of use. For example, cached data whose frequency is less than 5 times/hour can be regarded as a set cache file. It should be noted that the above cache time and frequency of use can be combined to determine the set cache file, or can be used alone.
需要说明的是,步骤411和步骤412的执行顺序并不限于上述示例记载的顺序(即位于步骤410之后),只要检测到数据清除事件被触发即执行步骤411和步骤412。It should be noted that the execution order of step 411 and step 412 is not limited to the order described in the above example (ie, after step 410), and steps 411 and 412 are performed as long as it is detected that the data clear event is triggered.
在步骤413中,获取应用程序的网络访问请求。In step 413, a network access request of the application is obtained.
需要说明的是,本步骤的执行次序并不限定,由用户在某一应用程序中输入的网络访问请求的操作触发。即监控用户操作,在用户输入网络访问请求操作时,终端获取应用程序的网络访问请求。It should be noted that the execution order of this step is not limited, and is triggered by the operation of the network access request input by the user in an application. That is, the user operation is monitored, and when the user inputs a network access request operation, the terminal acquires a network access request of the application.
在步骤414中,根据所述网络访问请求查询所述本地缓存,确定所述网络访问请求对应的网络数据的预加载状态。In step 414, the local cache is queried according to the network access request, and a preload state of the network data corresponding to the network access request is determined.
其中,预加载状态包括已加载至本地缓存,以及未加载。根据网络访问请求包含的网络资源地址查询本地缓存,判断该网络资源地址对应的网络数据是否已加载,若该网络资源地址对应的网络数据已加载,则执行步骤415,若该网络资源地址对应的网络数据没有加载,执行步骤416。The preload status includes loading to the local cache and not loading. Querying the local cache according to the network resource address included in the network access request, and determining whether the network data corresponding to the network resource address is loaded. If the network data corresponding to the network resource address is loaded, step 415 is performed, if the network resource address corresponds to The network data is not loaded, and step 416 is performed.
在步骤415中,读取所述网络数据,并返回至所述应用程序。In step 415, the network data is read and returned to the application.
在步骤416中,由外网下载所述网络数据。In step 416, the network data is downloaded by an external network.
本实施例提供的技术方案,通过在下载网络资源标识对应的网络数据之前对终端的网络环境进行预判,若在无线网络环境下(例如WIFI环境下),则可以直接预加载网络数据,以在检测到用户输入的应用程序的网络访问请求时,直接由本地缓存读取网络数据,提升数据加载速度。若在蜂窝移动网络数据环境下,则根据设定策略下载全部或部分网络数据,满足同时提升数据加载速度又不造成过多的流量耗费。另外,在下载访问预测模型输出的网络资源标识对应的网络数据之外,还加载该网络数据包含的其它链接对应的网络数据,丰富预加载数据,避免数据遗漏。同时,通过制定适当的缓存数据清除机制,避免本地缓存太多网络数据而影响终端的执行效率。The technical solution provided in this embodiment pre-judges the network environment of the terminal before downloading the network data corresponding to the network resource identifier. If the network environment is in a wireless network environment (for example, in a WIFI environment), the network data may be directly preloaded. When the network access request of the application input by the user is detected, the network data is directly read by the local cache to improve the data loading speed. In the cellular mobile network data environment, all or part of the network data is downloaded according to the setting policy, so as to simultaneously increase the data loading speed without causing excessive traffic consumption. In addition, in addition to the network data corresponding to the network resource identifier outputted by the access prediction model, the network data corresponding to other links included in the network data is also loaded, and the preloaded data is enriched to avoid data omission. At the same time, by formulating an appropriate cache data clearing mechanism, it is possible to avoid too much network data being cached locally and affect the execution efficiency of the terminal.
图5是本申请实施例提供的一种网络数据加载过程的示意图。如图5所示,终端的网络子系统(也可以称为系统网络功能模块)按照设定的周期当前网络访问记录及与当前网络访问记录关联的终端状态,并利用访问预测模型(可以是隐马尔可夫模型)基于当前网络访问记录及终端状态预测接下来最有可能访问的网络资源地址,将该网络资源地址作为决策进行输出。也就是说访问预测模型的输出是终端接下来最可能访问的设定数量的网络资源地址。根据该网络资源地址由外网中服务器下载该网络资源地址对应的网络数据,并将网络数据存储于本地缓存,即将预加载的URL对应的内容存入本地缓存。若检测到当前应用程序发出的网络访问请求,则提取该网络访问请求包含的网络资源地址,判断该网络资源地址对应的内容是否已预加载至本地。若已预加载,则由本地缓存中读取该网络资源地址对应的缓存文件,并直接返回给该应用程序,无需由外网中服务器下载网络数据。但是,若未预加载该网络资源地址对应的网络数据,则网络访问请求继续,由外网服务器下载该网络资源地址对应的网络数据。FIG. 5 is a schematic diagram of a network data loading process provided by an embodiment of the present application. As shown in FIG. 5, the network subsystem of the terminal (which may also be referred to as a system network function module) uses the current network access record and the terminal status associated with the current network access record according to the set period, and utilizes the access prediction model (which may be hidden). The Markov model) predicts the most likely network resource address to be accessed based on the current network access record and the terminal state, and outputs the network resource address as a decision. That is to say, the output of the access prediction model is the set number of network resource addresses that the terminal is most likely to access next. The network data corresponding to the network resource address is downloaded by the server in the external network according to the network resource address, and the network data is stored in the local cache, and the content corresponding to the pre-loaded URL is stored in the local cache. If the network access request sent by the current application is detected, the network resource address included in the network access request is extracted, and it is determined whether the content corresponding to the network resource address is preloaded locally. If it is preloaded, the cache file corresponding to the network resource address is read by the local cache and directly returned to the application, and the network data is not required to be downloaded by the server in the external network. However, if the network data corresponding to the network resource address is not preloaded, the network access request continues, and the network data corresponding to the network resource address is downloaded by the external network server.
本实施例的技术方案,通过按照设定周期调用访问预测模型,基于当前网络访问记录及与所述当前网络访问记录关联的终端状态,预测接下来最可能访问的网络资源地址,并预先下载该网络资源地址对应的网络数据,可以在检测到应用程序的网络访问请求时,判断该网络访问请求的网络资源地址是否在本地缓存中存在对应的网络数据,若是,直接由本地缓存中读取网络访问请求对应的网络数据,缩短应用程序针对网络资源的加载时间,提升了应用程序的性能,避免由外网加载数据导致加载时间较长的情况。The technical solution of the embodiment, by calling the access prediction model according to the set period, predicting the network resource address that is most likely to be accessed next based on the current network access record and the terminal status associated with the current network access record, and downloading the network resource in advance The network data corresponding to the network resource address may be used to determine whether the network resource address of the network access request has corresponding network data in the local cache when the network access request of the application is detected, and if so, the network is directly read by the local cache. Accessing the network data corresponding to the request, shortening the loading time of the application for the network resource, improving the performance of the application, and avoiding the situation that the loading time is long caused by loading the data by the external network.
图6是本申请实施例提供的一种模型构建装置的结构框图。该装置可以通过软件和硬件中的至少一种实现,可被集成于终端内,设置为执行本申请实施例提供的模型构建方法。如图6所示,该装置包括历史记录获取模块610,矩阵确定模块620以及模型构建模块630。FIG. 6 is a structural block diagram of a model construction apparatus according to an embodiment of the present application. The device may be implemented by at least one of software and hardware, and may be integrated into the terminal and configured to perform the model construction method provided by the embodiment of the present application. As shown in FIG. 6, the apparatus includes a history acquisition module 610, a matrix determination module 620, and a model construction module 630.
历史记录获取模块610,设置为获取历史网络访问记录及与所述历史网络访问记录关联 的终端状态。The history acquisition module 610 is configured to obtain a historical network access record and a terminal status associated with the historical network access record.
矩阵确定模块620,设置为根据所述历史网络访问记录及终端状态确定状态转移概率矩阵及观测概率矩阵。The matrix determination module 620 is configured to determine a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state.
模型构建模块630,设置为基于所述状态转移概率矩阵及观测概率矩阵构建访问预测模型。The model construction module 630 is configured to construct an access prediction model based on the state transition probability matrix and the observation probability matrix.
本实施例的技术方案提供一种模型构建装置,通过获取历史网络访问记录及与该历史网络访问记录关联的终端状态;根据该历史网络访问记录及终端状态确定状态转移概率矩阵及观测概率矩阵;基于该状态转移概率矩阵及观测概率矩阵构建访问预测模型;从而,可以基于当前状态,通过访问预测模型确定下一状态对应的观测值的观测概率,由于观测值代表网络资源地址,进而,在用户访问网络资源之前已预测出目标网络资源,提升了移动终端的智能性。The technical solution of the embodiment provides a model construction device, which acquires a historical network access record and a terminal state associated with the historical network access record; and determines a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state; The access prediction model is constructed based on the state transition probability matrix and the observation probability matrix; thus, the observation probability of the observation value corresponding to the next state can be determined by accessing the prediction model based on the current state, since the observation value represents the network resource address, and further, the user The target network resources have been predicted before accessing the network resources, which improves the intelligence of the mobile terminal.
在一实施例中,矩阵确定模块620包括预处理子模块,第一计算子模块以及第二计算子模块。In an embodiment, the matrix determination module 620 includes a pre-processing sub-module, a first computing sub-module, and a second computing sub-module.
预处理子模块,设置为对所述历史网络访问记录及终端状态进行预处理,得到状态集合及观测集合。The pre-processing sub-module is configured to pre-process the historical network access record and the terminal state to obtain a state set and an observation set.
第一计算子模块,设置为计算所述状态集合中每个状态的状态转移概率,并根据所述状态转移概率生成状态转移概率矩阵。The first calculation submodule is configured to calculate a state transition probability of each state in the state set, and generate a state transition probability matrix according to the state transition probability.
第二计算子模块,设置为根据所述状态集合及观测集合计算每个状态对应的观测值的观测概率,并根据所述观测概率生成观测概率矩阵。The second calculation submodule is configured to calculate an observation probability of the observation value corresponding to each state according to the state set and the observation set, and generate an observation probability matrix according to the observation probability.
在一实施例中,可以采用如下公式计算所述状态集合中每个状态的状态转移概率:In an embodiment, the state transition probability of each state in the set of states may be calculated using the following formula:
Figure PCTCN2018117157-appb-000009
Figure PCTCN2018117157-appb-000009
其中,q i表示当前时刻的当前状态,q j表示下一时刻的相邻状态,P(i t+1=q j|i t=q i)表示所述状态集合中状态由当前状态转移到相邻状态的概率,N(i t=q i,i i+1=q j)表示所述状态集合中当前状态为q i且相邻状态为q j的出现次数,N(i t=q i)表示所述状态集合中当前状态为q i的次数。 Where q i represents the current state of the current time, q j represents the adjacent state at the next moment, and P(i t+1 =q j |i t =q i ) indicates that the state in the state set is transferred from the current state to The probability of the adjacent state, N(i t =q i , i i+1 =q j ), represents the number of occurrences of the state in the state set being q i and the neighboring state being q j , N(i t =q i ) represents the number of times the current state in the set of states is q i .
在一实施例中,第二计算子模块设置为:顺序获取所述状态集合中的一个状态作为当前状态,并统计当前状态的出现次数;根据所述当前状态对应的观测值以及所述当前状态的出现次数,采用如下公式计算当前状态的观测概率:In an embodiment, the second calculation sub-module is configured to: sequentially acquire one state in the state set as a current state, and count the number of occurrences of the current state; and obtain an observation value corresponding to the current state and the current state. The number of occurrences, using the following formula to calculate the observation probability of the current state:
Figure PCTCN2018117157-appb-000010
Figure PCTCN2018117157-appb-000010
其中,观测值k∈{v 1,v 2,...,v m},{v 1,v 2,...,v m}为观测集合,
Figure PCTCN2018117157-appb-000011
表示所述当前状态q x下产生观测值k的概率,N(i t=q x,v=k)表示所述当前状态q x下产生观测值k的次数。在一实施例中,所述历史网络访问记录包括访问网络的应用程序、网络资源地址及访问时间;所述终端状态包括网络环境信息及充电状态。
Wherein, the observed values k ∈ {v 1 , v 2 , . . . , v m }, {v 1 , v 2 , . . . , v m } are observation sets,
Figure PCTCN2018117157-appb-000011
Indicates the probability that the observation value k is generated in the current state q x , and N(i t =q x , v=k) represents the number of times the observation value k is generated in the current state q x . In an embodiment, the historical network access record includes an application for accessing the network, a network resource address, and an access time; the terminal status includes network environment information and a charging status.
以及,预处理子模块设置为:根据预设规则匹配所述访问网络的应用程序的程序编号,以及所述网络资源地址对应的网络编号;根据所述访问时间区分工作日和休息日,分别为工作日和休息日赋予不同日期编号;根据所述访问时间所属的时间段确定时间编号,其中,对自然日内预设时间区间进行均分得到所述时间段,所述时间段与时间编号关联存储;根据所述网络环境信息判断终端是否接入无线网络,根据判断结果确定网络状态值;根据充电状态 判断终端是否正在充电,根据判断结果确定充电状态值;根据所述程序编号、日期编号、时间编号、网络状态值及充电状态值生成状态集合,并根据所述网络编号构成观测集合。And the pre-processing sub-module is configured to: match the program number of the application that accesses the network according to the preset rule, and the network number corresponding to the network resource address; and distinguish the working day and the rest day according to the access time, respectively The work date and the rest day are assigned different date numbers; the time number is determined according to the time period to which the access time belongs, wherein the time period is obtained by equally dividing the preset time interval in the natural day, and the time period is stored in association with the time number. Determining whether the terminal accesses the wireless network according to the network environment information, determining a network status value according to the determination result; determining, according to the charging status, whether the terminal is charging, determining a charging status value according to the determination result; according to the program number, date number, time The number, the network status value, and the state of charge value generate a set of states, and form an observation set based on the network number.
图7是本申请实施例提供的一种网络资源预加载装置的结构框图。该装置可以通过软件和硬件中的至少一种实现,可被集成于终端内,设置为执行本申请实施例提供的网络资源预加载方法。如图7所示,该装置包括当前记录获取模块710,模型输入模块720以及预加载模块730。FIG. 7 is a structural block diagram of a network resource preloading apparatus according to an embodiment of the present application. The device may be implemented by using at least one of software and hardware, and may be integrated into the terminal and configured to perform the network resource preloading method provided by the embodiment of the present application. As shown in FIG. 7, the apparatus includes a current record acquisition module 710, a model input module 720, and a preload module 730.
当前记录获取模块710,设置为按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态。The current record obtaining module 710 is configured to acquire a current network access record and a terminal status associated with the current network access record according to a set period.
模型输入模块720,设置为将所述当前网络访问记录及终端状态输入预先构建的访问预测模型,其中,所述访问预测模型是根据历史网络访问记录及所述历史网络访问记录对应的终端状态训练的模型。The model input module 720 is configured to input the current network access record and the terminal state into a pre-built access prediction model, wherein the access prediction model is based on a historical network access record and a terminal state training corresponding to the historical network access record. Model.
预加载模块730,设置为获取所述访问预测模型输出的待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存。The preloading module 730 is configured to acquire the network resource identifier to be accessed that is output by the access prediction model, and download the network data corresponding to the network resource identifier, and store the data in the local cache.
本实施例的技术方案提供一种网络资源预加载装置,可以在根据某一网络资源标识获取网络数据之前,预加载可能访问的网络资源标识对应的网络数据,实现直接由本地缓存中读取网络数据,缩短网络数据的加载时间,从而,避免由外网加载数据导致加载时间较长的情况发生。The technical solution of the embodiment provides a network resource preloading device, which can preload the network data corresponding to the network resource identifier that may be accessed before acquiring the network data according to a certain network resource identifier, so as to directly read the network from the local cache. Data, shortening the loading time of network data, thus avoiding the situation that the loading time is longer due to loading data from the external network.
在一实施例中,模型输入模块720设置为:对所述当前网络访问记录及终端状态进行预处理,得到当前状态;将所述当前状态输入预先构建的访问预测模型,以通过所述访问预测模型预测下一时刻对应的下一状态,并分别确定所述下一状态对应的网络资源地址的观测概率。In an embodiment, the model input module 720 is configured to: preprocess the current network access record and the terminal state to obtain a current state; and input the current state into a pre-built access prediction model to pass the access prediction The model predicts a next state corresponding to the next moment, and respectively determines an observation probability of the network resource address corresponding to the next state.
在一实施例中,还包括:下载策略选择模块,设置为在所述预加载模块下载所述网络资源标识对应的网络数据之前,判断终端是否接入无线网络;若终端接入无线网络,则使所述预加载模块执行下载所述网络资源标识对应的网络数据的操作;若终端没有接入无线网络,获取所述终端的蜂窝移动网络数据的状态信息。In an embodiment, the method further includes: downloading a policy selection module, configured to determine whether the terminal accesses the wireless network before the preloading module downloads the network data corresponding to the network resource identifier; and if the terminal accesses the wireless network, And causing the preloading module to perform an operation of downloading network data corresponding to the network resource identifier; if the terminal does not access the wireless network, acquiring state information of the cellular mobile network data of the terminal.
在所述状态信息满足预设条件时,使所述预加载模块执行下载所述网络资源标识对应的网络数据的操作;以及When the status information meets the preset condition, causing the preloading module to perform an operation of downloading network data corresponding to the network resource identifier;
在所述状态信息不满足预设条件时,使所述预加载模块730执行以下操作:根据所述网络资源标识对应的网络数据的数据类型和数据量中的至少一种确定目标网络数据,对所述目标网络数据进行加载。When the status information does not meet the preset condition, the preloading module 730 is configured to: determine the target network data according to at least one of a data type and a data amount of the network data corresponding to the network resource identifier, The target network data is loaded.
在一实施例中,还包括:地址获取模块,设置为在所述预加载模块下载所述网络资源标识对应的网络数据之后,通过网络爬虫获取链接到所述网络资源标识包含的第一网络资源地址的第二网络资源地址,加载所述第二网络资源地址对应的网络数据,并存储于本地缓存。In an embodiment, the method further includes: an address obtaining module, configured to: after the preloading module downloads the network data corresponding to the network resource identifier, acquire, by using a network crawler, a first network resource included in the network resource identifier The second network resource address of the address loads the network data corresponding to the second network resource address, and is stored in the local cache.
在一实施例中,还包括:缓存清除模块,设置为获取所述本地缓存中网络数据占用的存储空间;在所述存储空间超过设定阈值时,根据所述网络数据的缓存时间和使用频率中的至少一种确定待清除数据,并清除所述待清除数据。In an embodiment, the method further includes: a cache clearing module, configured to acquire a storage space occupied by network data in the local cache; and when the storage space exceeds a set threshold, according to a cache time and a frequency of use of the network data At least one of determining data to be cleared and clearing the data to be cleared.
在一实施例中,还包括:请求获取模块,设置为获取应用程序的网络访问请求;缓存查询模块,设置为根据所述网络访问请求查询所述本地缓存,确定所述网络访问请求对应的网络数据的预加载状态;数据读取模块,设置为若所述网络访问请求对应的网络数据已预加载,则读取所述网络数据,并返回至所述应用程序;数据下载模块,设置为若所述网络访问请求对应的网络数据未预加载,则由外网下载所述网络数据。In an embodiment, the method further includes: requesting an acquisition module, configured to acquire a network access request of the application; and a cache query module, configured to query the local cache according to the network access request, and determine a network corresponding to the network access request a data pre-loading state, configured to: if the network data corresponding to the network access request is preloaded, read the network data, and return to the application; the data downloading module is set to If the network data corresponding to the network access request is not preloaded, the network data is downloaded by the external network.
本申请实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时设置为执行一种模型构建方法,该方法包括:获取历史网络访问记录及与所述历史网络访问记录关联的终端状态;根据所述历史网络访问记录及终端状态确定状态转移概率矩阵及观测概率矩阵;基于所述状态转移概率矩阵及观测概率矩阵构建访问预测模型。Embodiments of the present application also provide a storage medium including computer executable instructions that, when executed by a computer processor, are configured to perform a model construction method, the method comprising: obtaining a historical network access record and The historical network access records the associated terminal state; determining the state transition probability matrix and the observation probability matrix according to the historical network access record and the terminal state; and constructing the access prediction model based on the state transition probability matrix and the observation probability matrix.
另外,本申请实施例还提供另一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时设置为执行一种网络资源预加载方法,该方法包括:按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态;将所述当前网络访问记录及终端状态输入预先构建的访问预测模型,其中,所述访问预测模型是根据历史网络访问记录及所述历史网络访问记录对应的终端状态训练的模型;获取所述访问预测模型输出的待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存。In addition, the embodiment of the present application further provides another storage medium including computer executable instructions, which are set to execute a network resource preloading method when executed by a computer processor, the method comprising: Obtaining a current network access record and a terminal status associated with the current network access record; inputting the current network access record and terminal status into a pre-built access prediction model, wherein the access prediction model is accessed according to a historical network Recording a model of the terminal state training corresponding to the historical network access record; acquiring the network resource identifier to be accessed output by the access prediction model, downloading the network data corresponding to the network resource identifier, and storing the network data in the local cache.
存储介质——任何的多种类型的存储器设备或存储设备。术语“存储介质”旨在包括:安装介质,例如光盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如动态随机存取存储器(Dynamic Random Access Memory,DRAM)、双数据速率随机存取存储器(Double Data Rate Random Access Memory,DDR RAM)、静态随机存取存储器(Static Random Access Memory,SRAM)、扩展数据输出随机存取存储器(Extended Data Output Random Access Memory,EDO RAM),兰巴斯(Rambus)RAM等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机用于执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由至少一个处理器执行的程序指令(例如具体实现为计算机程序)。Storage media - any of a variety of types of memory devices or storage devices. The term "storage medium" is intended to include: a mounting medium such as a Compact Disc Read-Only Memory (CD-ROM), a floppy disk or a tape device; a computer system memory or a random access memory such as a dynamic random access memory; (Dynamic Random Access Memory, DRAM), Double Data Rate Random Access Memory (DDR RAM), Static Random Access Memory (SRAM), Extended Data Output Random Access Memory ( Extended Data Output Random Access Memory (EDO RAM), Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (eg, hard disk or optical storage); registers or other similar types of memory elements, and the like. The storage medium may also include other types of memory or a combination thereof. Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system, the second computer system being coupled to the first computer system via a network, such as the Internet. The second computer system can provide program instructions to the first computer for execution. The term "storage medium" can include two or more storage media that can reside in different locations (eg, in different computer systems connected through a network). The storage medium may store program instructions (eg, embodied as a computer program) executable by the at least one processor.
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的模型构建的操作,还可以执行本申请任意实施例所提供的模型构建方法中的相关操作。Certainly, a storage medium containing computer executable instructions provided by the embodiments of the present application, the computer executable instructions are not limited to the operation of model construction as described above, and may also execute the model construction method provided by any embodiment of the present application. Related operations in .
需要说明的是,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的网络资源预加载的操作,还可以执行本申请任意实施例所提供的网络资源预加载方法中的相关操作。It should be noted that the storage medium including the computer executable instructions provided by the embodiment of the present application is not limited to the operation of the network resource preloading as described above, and may also perform any of the embodiments of the present application. Related operations in the provided network resource preloading method.
本申请实施例提供了一种终端,该终端中可集成本申请实施例提供的模型构建装置。本申请实施例提供了另一种终端,该终端中可集成本申请实施例提供的网络资源预加载装置。需要说明的是,可以由第一种终端进行模型构建,并将模型移植至执行网络资源预加载操作的第二种终端,还可以在同一终端中执行模型构建及网络资源预加载操作。其中,终端包括智能手机、平板电脑、掌上游戏机、笔记本电脑及智能手表等。图8为本申请实施例提供的一种终端的结构框图。如图8所示,该终端可以包括:存储器810和处理器820。所述存储器810,设置为存储计算机程序、历史网络访问记录、终端状态及访问预测模型;所述处理器820读取并执行所述存储器810中存储的计算机程序。所述处理器820在执行所述计算机程序时实现以下步骤:获取历史网络访问记录及与所述历史网络访问记录关联的终端状态;根据所述历史网络访问记录及终端状态确定状态转移概率矩阵及观测概率矩阵;基于所述状态转移概率矩阵及观测概率矩阵构建访问预测模型。The embodiment of the present application provides a terminal in which the model construction apparatus provided in the embodiment of the present application can be integrated. The embodiment of the present application provides another terminal, where the network resource preloading device provided by the embodiment of the present application can be integrated. It should be noted that the model can be constructed by the first terminal, and the model is transplanted to the second terminal that performs the network resource preloading operation, and the model construction and the network resource preloading operation can also be performed in the same terminal. Among them, the terminal includes a smart phone, a tablet computer, a handheld game machine, a notebook computer, and a smart watch. FIG. 8 is a structural block diagram of a terminal according to an embodiment of the present application. As shown in FIG. 8, the terminal may include a memory 810 and a processor 820. The memory 810 is configured to store a computer program, a historical network access record, a terminal status, and an access prediction model; the processor 820 reads and executes the computer program stored in the memory 810. The processor 820, when executing the computer program, implements the steps of: acquiring a historical network access record and a terminal status associated with the historical network access record; determining a state transition probability matrix according to the historical network access record and the terminal status and Observing probability matrix; constructing an access prediction model based on the state transition probability matrix and the observation probability matrix.
需要说明的是,终端的存储器810还可以设置为存储另一种计算机程序及预加载的网络数据。处理器820还可以设置为读取并执行所述存储器810中存储的计算机程序。所述处理器820在执行所述计算机程序时实现以下步骤:按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态;将所述当前网络访问记录及终端状态输入预先构建的访问预测模型,其中,所述访问预测模型是根据历史网络访问记录及所述历史网络访问记录对应的终端状态训练的模型;获取所述访问预测模型输出的待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存。It should be noted that the memory 810 of the terminal may also be configured to store another computer program and pre-loaded network data. Processor 820 can also be configured to read and execute computer programs stored in said memory 810. The processor 820, when executing the computer program, implements the steps of: acquiring a current network access record and a terminal status associated with the current network access record according to a set period; and inputting the current network access record and terminal status in advance The access prediction model is configured, wherein the access prediction model is a model of terminal state training corresponding to the historical network access record and the historical network access record; acquiring the network resource identifier to be accessed output by the access prediction model, and downloading The network resource identifies the corresponding network data and stores the data in the local cache.
上述示例中列举的存储器及处理器均为终端的部分元器件,所述终端还可以包括其它元器件。以移动终端为例,说明上述终端可能的结构。图9是本申请实施例提供的一种移动终端的结构示意图。如图9所示,该移动终端可以包括:存储器901、中央处理器(Central  Processing Unit,CPU)902(又称处理器,)、外设接口903、射频(Radio Frequency,RF)电路905、音频电路906、扬声器911、电源管理芯片908、输入/输出(I/O)子系统909、其他输入/控制设备910以及外部端口904,这些部件通过至少一个通信总线或信号线907来通信。The memory and processor listed in the above examples are all components of the terminal, and the terminal may further include other components. Taking the mobile terminal as an example, the possible structure of the above terminal is explained. FIG. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. As shown in FIG. 9, the mobile terminal may include: a memory 901, a central processing unit (CPU) 902 (also referred to as a processor), a peripheral interface 903, a radio frequency (RF) circuit 905, and audio. Circuitry 906, speaker 911, power management chip 908, input/output (I/O) subsystem 909, other input/control devices 910, and external port 904 are communicated via at least one communication bus or signal line 907.
应该理解的是,图示移动终端900仅仅是移动终端的一个范例,并且移动终端900可以具有比图中所示出的更多的或者更少的部件,可以组合至少两个的部件,或者可以具有不同的部件配置。图中所示出的多种部件可以在包括信号处理和专用集成电路中至少一种在内的硬件、软件、或硬件和软件的组合中实现,上述硬件、软件或者硬件和软件的组合为至少一个。It should be understood that the illustrated mobile terminal 900 is merely one example of a mobile terminal, and that the mobile terminal 900 may have more or fewer components than those shown in the figures, may combine at least two components, or may Has a different component configuration. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including at least one of signal processing and application specific integrated circuits, at least in combination with hardware, software, or a combination of hardware and software. One.
以该移动终端是手机为例,对移动终端进行详细的描述。Taking the mobile terminal as a mobile phone as an example, the mobile terminal is described in detail.
存储器901,所述存储器901可以被CPU902、外设接口903等访问,所述存储器901可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。在存储器901中存储计算机程序,还可以存储历史网络访问记录、终端状态、访问预测模型及预加载的网络数据等。The memory 901 can be accessed by the CPU 902, the peripheral interface 903, etc., and the memory 901 can include a high speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or Other volatile solid-state storage devices. The computer program is stored in the memory 901, and the historical network access record, the terminal status, the access prediction model, the preloaded network data, and the like can also be stored.
外设接口903,所述外设接口903可以将设备的输入和输出外设连接到CPU902和存储器901。 Peripheral interface 903, which can connect the input and output peripherals of the device to CPU 902 and memory 901.
I/O子系统909,所述I/O子系统909可以将设备上的输入输出外设,例如触摸屏912和其他输入/控制设备910,连接到外设接口903。I/O子系统909可以包括显示控制器9091和设置为控制其他输入/控制设备910的至少一个个输入控制器9092。其中,至少一个个输入控制器9092从其他输入/控制设备910接收电信号或者向其他输入/控制设备910发送电信号,其他输入/控制设备910可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮。值得说明的是,输入控制器9092可以与以下任一个连接:键盘、红外端口、USB接口以及诸如鼠标的指示设备。I/O subsystem 909, which can connect input and output peripherals on the device, such as touch screen 912 and other input/control devices 910, to peripheral interface 903. The I/O subsystem 909 can include a display controller 9091 and at least one input controller 9092 configured to control other input/control devices 910. At least one of the input controllers 9092 receives electrical signals from other input/control devices 910 or transmits electrical signals to other input/control devices 910. Other input/control devices 910 may include physical buttons (press buttons, rocker buttons, etc.) , dial, slide switch, joystick, click on the wheel. It is worth noting that the input controller 9092 can be connected to any of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
触摸屏912,所述触摸屏912是用户终端与用户之间的输入接口和输出接口,将可视输出显示给用户,可视输出可以包括图形、文本、图标、视频等。The touch screen 912 is an input interface and an output interface between the user terminal and the user, and displays the visual output to the user. The visual output may include graphics, text, icons, videos, and the like.
I/O子系统909中的显示控制器9091从触摸屏912接收电信号或者向触摸屏912发送电信号。触摸屏912检测触摸屏上的接触,显示控制器9091将检测到的接触转换为与显示在触摸屏912上的用户界面对象的交互,即实现人机交互,显示在触摸屏912上的用户界面对象可以是运行游戏的图标、联网到相应网络的图标等。值得说明的是,设备还可以包括光鼠,光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸。 Display controller 9091 in I/O subsystem 909 receives an electrical signal from touch screen 912 or an electrical signal to touch screen 912. The touch screen 912 detects the contact on the touch screen, and the display controller 9091 converts the detected contact into an interaction with the user interface object displayed on the touch screen 912, that is, realizes human-computer interaction, and the user interface object displayed on the touch screen 912 may be running. The icon of the game, the icon of the network to the corresponding network, and the like. It is worth noting that the device may also include a light mouse, which is a touch sensitive surface that does not display a visual output, or an extension of a touch sensitive surface formed by the touch screen.
RF电路905,主要设置为建立手机与无线网络(即网络侧)的通信,实现手机与无线网络的数据接收和发送。例如收发短信息、电子邮件等。在一实施例中,RF电路905接收并发送RF信号,RF信号也称为电磁信号,RF电路905将电信号转换为电磁信号或将电磁信号转换为电信号,并且通过该电磁信号与通信网络以及其他设备进行通信。RF电路905可以包括设置为执行这些功能的已知电路,其包括但不限于天线系统、RF收发机、至少一个放大器、调谐器、至少一个振荡器、数字信号处理器、编译码器(COder-DECoder,CODEC)芯片组、用户标识模块(Subscriber Identity Module,SIM)等等。The RF circuit 905 is mainly configured to establish communication between the mobile phone and the wireless network (ie, the network side), and implement data reception and transmission between the mobile phone and the wireless network. For example, sending and receiving short messages, emails, and the like. In one embodiment, RF circuit 905 receives and transmits an RF signal, also referred to as an electromagnetic signal, and RF circuit 905 converts the electrical signal into an electromagnetic signal or converts the electromagnetic signal into an electrical signal, and through the electromagnetic signal and communication network And other devices to communicate. RF circuitry 905 may include known circuitry configured to perform these functions including, but not limited to, an antenna system, an RF transceiver, at least one amplifier, a tuner, at least one oscillator, a digital signal processor, a codec (COder- DECoder, CODEC) Chipset, Subscriber Identity Module (SIM), etc.
音频电路906,主要设置为从外设接口903接收音频数据,将该音频数据转换为电信号,并且将该电信号发送给扬声器911。The audio circuit 906 is primarily configured to receive audio data from the peripheral interface 903, convert the audio data into an electrical signal, and transmit the electrical signal to the speaker 911.
扬声器911,设置为将手机通过RF电路905从无线网络接收的语音信号,还原为声音并向用户播放该声音。The speaker 911 is arranged to restore the voice signal received by the mobile phone from the wireless network through the RF circuit 905 to sound and play the sound to the user.
电源管理芯片908,设置为为CPU902、I/O子系统及外设接口所连接的硬件进行供电及电源管理。The power management chip 908 is configured to provide power and power management for the hardware connected to the CPU 902, the I/O subsystem, and the peripheral interface.
本申请实施例提供的终端,可以基于当前状态,通过访问预测模型确定下一状态对应的观测值的观测概率,在用户访问网络资源之前已预测出目标网络资源,提升了移动终端的智能性。The terminal provided by the embodiment of the present application can determine the observation probability of the observation value corresponding to the next state by using the access prediction model based on the current state, and predict the target network resource before the user accesses the network resource, thereby improving the intelligence of the mobile terminal.
本申请实施例提供的终端,可以在根据某一网络资源标识获取网络数据之前,预加载可 能访问的网络资源标识对应的网络数据,实现直接由本地缓存中读取网络数据,缩短网络数据的加载时间,从而,避免由外网加载数据导致加载时间较长的情况发生。The terminal provided by the embodiment of the present application may preload the network data corresponding to the network resource identifier that may be accessed before acquiring the network data according to the identifier of the network resource, so as to directly read the network data from the local cache, and shorten the loading of the network data. Time, and thus, avoiding the fact that loading time is caused by loading data from the external network.
上述实施例中提供的模型构建装置、存储介质及终端可执行本申请实施例所提供的模型构建方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本申请实施例所提供的模型构建方法。The model building device, the storage medium and the terminal provided in the above embodiments can execute the model building method provided by the embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to the model construction method provided by the embodiments of the present application.
上述实施例中提供的网络资源预加载装置、存储介质及终端可执行本申请实施例所提供的网络资源预加载方法,具备执行该方法相应的功能模块和有益效果。未在上述实施例中详尽描述的技术细节,可参见本申请实施例所提供的网络资源预加载方法。The network resource preloading device, the storage medium, and the terminal provided in the foregoing embodiments may perform the network resource preloading method provided by the embodiment of the present application, and have the corresponding functional modules and beneficial effects of executing the method. For the technical details that are not described in detail in the foregoing embodiments, refer to the network resource preloading method provided by the embodiment of the present application.

Claims (20)

  1. 一种模型构建方法,包括:A model construction method, including:
    获取历史网络访问记录及与所述历史网络访问记录关联的终端状态;Obtaining a historical network access record and a terminal status associated with the historical network access record;
    根据所述历史网络访问记录及所述终端状态确定状态转移概率矩阵及观测概率矩阵;Determining a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state;
    基于所述状态转移概率矩阵及观测概率矩阵构建访问预测模型。An access prediction model is constructed based on the state transition probability matrix and the observation probability matrix.
  2. 根据权利要求1所述的方法,其中,根据所述历史网络访问记录及所述终端状态确定状态转移概率矩阵及观测概率矩阵,包括:The method of claim 1, wherein determining the state transition probability matrix and the observation probability matrix according to the historical network access record and the terminal state comprises:
    对所述历史网络访问记录及所述终端状态进行预处理,得到状态集合及观测集合;Performing pre-processing on the historical network access record and the state of the terminal to obtain a state set and an observation set;
    计算所述状态集合中每个状态的状态转移概率,并根据所述状态转移概率生成状态转移概率矩阵;Calculating a state transition probability of each state in the set of states, and generating a state transition probability matrix according to the state transition probability;
    根据所述状态集合及观测集合计算每个状态对应的观测值的观测概率,并根据所述观测概率生成观测概率矩阵。Observing the observation probability of the observation value corresponding to each state according to the state set and the observation set, and generating an observation probability matrix according to the observation probability.
  3. 根据权利要求2所述的方法,其中,计算所述状态集合中每个状态的状态转移概率,包括:The method of claim 2, wherein calculating a state transition probability for each state in the set of states comprises:
    采用如下公式计算所述状态集合中每个状态的状态转移概率:The state transition probability for each state in the set of states is calculated using the following formula:
    Figure PCTCN2018117157-appb-100001
    Figure PCTCN2018117157-appb-100001
    其中,q i表示当前时刻的当前状态,q j表示下一时刻的相邻状态,P(i t+1=q j|i t=q i)表示所述状态集合中状态由当前状态转移到相邻状态的概率,N(i t=q i,i i+1=q j)表示所述状态集合中当前状态为q i且相邻状态为q j的出现次数,N(i t=q i)表示所述状态集合中当前状态为q i的次数。 Where q i represents the current state of the current time, q j represents the adjacent state at the next moment, and P(i t+1 =q j |i t =q i ) indicates that the state in the state set is transferred from the current state to The probability of the adjacent state, N(i t =q i , i i+1 =q j ), represents the number of occurrences of the state in the state set being q i and the neighboring state being q j , N(i t =q i ) represents the number of times the current state in the set of states is q i .
  4. 根据权利要求3所述的方法,其中,根据所述状态集合及观测集合计算每个状态对应的观测值的观测概率,包括:The method according to claim 3, wherein the observation probability of the observation value corresponding to each state is calculated according to the state set and the observation set, including:
    顺序获取所述状态集合中的一个状态作为当前状态,并统计所述当前状态的出现次数;Obtaining one state in the state set as a current state, and counting the number of occurrences of the current state;
    根据所述当前状态对应的观测值以及所述当前状态的出现次数,采用如下公式计算当前状态的观测概率:According to the observation value corresponding to the current state and the number of occurrences of the current state, the following formula is used to calculate the observation probability of the current state:
    Figure PCTCN2018117157-appb-100002
    Figure PCTCN2018117157-appb-100002
    其中,观测值k∈{v 1,v 2,...,v m},{v 1,v 2,...,v m}为观测集合,
    Figure PCTCN2018117157-appb-100003
    表示所述当前状态q x下产生观测值k的概率,N(i t=q x,v=k)表示所述当前状态q x下产生观测值k的次数。
    Wherein, the observed values k ∈ {v 1 , v 2 , . . . , v m }, {v 1 , v 2 , . . . , v m } are observation sets,
    Figure PCTCN2018117157-appb-100003
    Indicates the probability that the observation value k is generated in the current state q x , and N(i t =q x , v=k) represents the number of times the observation value k is generated in the current state q x .
  5. 根据权利要求2至4中任一项所述的方法,其中,所述历史网络访问记录包括访问网络的应用程序、网络资源地址及访问时间;所述终端状态包括网络环境信息及充电状态;The method according to any one of claims 2 to 4, wherein the historical network access record comprises an application accessing a network, a network resource address and an access time; the terminal status comprises network environment information and a charging status;
    对所述历史网络访问记录及终端状态进行预处理,得到状态集合及观测集合,包括:Performing pre-processing on the historical network access record and the terminal state to obtain a state set and an observation set, including:
    根据预设规则匹配所述访问网络的应用程序的程序编号,以及所述网络资源地址对应的网络编号;Matching, by a preset rule, a program number of the application that accesses the network, and a network number corresponding to the network resource address;
    根据所述访问时间区分工作日和休息日,分别为所述工作日和所述休息日赋予不同的日期编号;Differentiating the working day and the rest day according to the access time, respectively assigning different date numbers to the working day and the rest day;
    根据所述访问时间所属的时间段确定时间编号,其中,对自然日内预设时间区间进行均分得到所述时间段,所述时间段与所述时间编号关联存储;Determining a time number according to the time period to which the access time belongs, wherein the time period is obtained by equally dividing the preset time interval in the natural day, and the time period is stored in association with the time number;
    根据所述网络环境信息判断终端是否接入无线网络,根据判断结果确定网络状态值;Determining, according to the network environment information, whether the terminal accesses the wireless network, and determining a network state value according to the determination result;
    根据充电状态判断终端是否正在充电,根据判断结果确定充电状态值;Determining whether the terminal is charging according to the state of charge, and determining a state of charge value according to the determination result;
    根据所述程序编号、日期编号、时间编号、网络状态值及充电状态值生成状态集合,并根据所述网络编号构成观测集合。A state set is generated based on the program number, date number, time number, network state value, and charge state value, and an observation set is constructed based on the network number.
  6. 一种网络资源预加载方法,包括:A network resource preloading method includes:
    按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态;Obtaining a current network access record and a terminal status associated with the current network access record according to a set period;
    将所述当前网络访问记录及所述终端状态输入预先构建的访问预测模型,其中,所述访问预测模型是根据历史网络访问记录及所述历史网络访问记录对应的终端状态训练的模型;Inputting the current network access record and the terminal status into a pre-built access prediction model, where the access prediction model is a model of terminal state training corresponding to the historical network access record and the historical network access record;
    获取所述访问预测模型输出的待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存。Obtaining a network resource identifier to be accessed output by the access prediction model, downloading network data corresponding to the network resource identifier, and storing the network data in a local cache.
  7. 根据权利要求6所述的方法,其中,将所述当前网络访问记录及所述终端状态输入预先构建的访问预测模型,包括:The method of claim 6, wherein the inputting the current network access record and the terminal status into a pre-built access prediction model comprises:
    对所述当前网络访问记录及所述终端状态进行预处理,得到当前状态;Performing pre-processing on the current network access record and the status of the terminal to obtain a current state;
    将所述当前状态输入预先构建的所述访问预测模型,以便通过所述访问预测模型预测下一时刻对应的下一状态,并确定所述下一状态对应的网络资源地址的观测概率。And inputting the current state into the pre-built access prediction model, so as to predict a next state corresponding to the next moment by using the access prediction model, and determine an observation probability of the network resource address corresponding to the next state.
  8. 根据权利要求6所述的方法,在下载所述网络资源标识对应的网络数据之前,还包括:The method of claim 6, before downloading the network data corresponding to the network resource identifier, the method further includes:
    判断终端是否接入无线网络;Determine whether the terminal accesses the wireless network;
    响应于确定终端接入无线网络,执行下载所述网络资源标识对应的网络数据的操作;And in response to determining that the terminal accesses the wireless network, performing an operation of downloading network data corresponding to the network resource identifier;
    响应于确定终端没有接入无线网络,获取所述终端的蜂窝移动网络数据的状态信息;Obtaining state information of the cellular mobile network data of the terminal in response to determining that the terminal does not access the wireless network;
    在所述状态信息满足预设条件时,执行下载所述网络资源标识对应的网络数据的操作;When the status information meets the preset condition, performing an operation of downloading network data corresponding to the network resource identifier;
    在所述状态信息不满足预设条件时,下载所述网络资源标识对应的网络数据,包括:When the status information does not meet the preset condition, the network data corresponding to the network resource identifier is downloaded, including:
    根据所述网络资源标识对应的网络数据的数据类型和数据量中的至少一种确定目标网络数据,对所述目标网络数据进行加载。Determining the target network data according to at least one of a data type and a data amount of the network data corresponding to the network resource identifier, and loading the target network data.
  9. 根据权利要求6所述的方法,在下载所述网络资源标识对应的网络数据之后,还包括:The method of claim 6, after downloading the network data corresponding to the network resource identifier, further comprising:
    通过网络爬虫,获取链接到所述网络资源标识包含的第一网络资源地址的第二网络资源地址,加载所述第二网络资源地址对应的网络数据,并存储于所述本地缓存。And obtaining, by the network crawler, the second network resource address that is linked to the first network resource address included in the network resource identifier, and loading the network data corresponding to the second network resource address, and storing the network data in the local cache.
  10. 根据权利要求6所述的方法,还包括:The method of claim 6 further comprising:
    获取所述本地缓存中网络数据占用的存储空间;Obtaining a storage space occupied by network data in the local cache;
    在所述存储空间超过设定阈值时,根据所述网络数据的缓存时间和使用频率中的至少一种确定待清除数据,并清除所述待清除数据。When the storage space exceeds a set threshold, determining data to be cleared according to at least one of a cache time and a use frequency of the network data, and clearing the data to be cleared.
  11. 根据权利要求6-10中任一项所述的方法,还包括:The method of any of claims 6-10, further comprising:
    获取应用程序的网络访问请求;Obtain a network access request for the application;
    根据所述网络访问请求查询所述本地缓存,确定所述网络访问请求对应的网络数据的预加载状态;Querying the local cache according to the network access request, and determining a preload state of the network data corresponding to the network access request;
    响应于所述网络访问请求对应的网络数据已预加载,读取所述网络数据,并返回至所述应用程序;Responding to the network data corresponding to the network access request being preloaded, reading the network data, and returning to the application;
    响应于所述网络访问请求对应的网络数据未预加载,由外网下载所述网络数据。The network data is downloaded by the external network in response to the network data corresponding to the network access request not being preloaded.
  12. 一种模型构建装置,包括:A model building device comprising:
    历史记录获取模块,设置为获取历史网络访问记录及与所述历史网络访问记录关联的终端状态;a history acquisition module configured to acquire a historical network access record and a terminal status associated with the historical network access record;
    矩阵确定模块,设置为根据所述历史网络访问记录及所述终端状态确定状态转移概率矩阵及观测概率矩阵;a matrix determining module, configured to determine a state transition probability matrix and an observation probability matrix according to the historical network access record and the terminal state;
    模型构建模块,设置为基于所述状态转移概率矩阵及观测概率矩阵构建访问预测模型。The model building module is configured to construct an access prediction model based on the state transition probability matrix and the observation probability matrix.
  13. 根据权利要求12所述的装置,其中,所述矩阵确定模块包括预处理子模块,第一计算子模块以及第二计算子模块;The apparatus according to claim 12, wherein the matrix determining module comprises a preprocessing submodule, a first computing submodule and a second computing submodule;
    所述预处理子模块,设置为对所述历史网络访问记录及终端状态进行预处理,得到状态集合及观测集合。The pre-processing sub-module is configured to pre-process the historical network access record and the terminal state to obtain a state set and an observation set.
    所述第一计算子模块,设置为计算所述状态集合中每个状态的状态转移概率,并根据所述状态转移概率生成状态转移概率矩阵。The first calculation submodule is configured to calculate a state transition probability of each state in the state set, and generate a state transition probability matrix according to the state transition probability.
    所述第二计算子模块,设置为根据所述状态集合及观测集合计算每个状态对应的观测值的观测概率,并根据所述观测概率生成观测概率矩阵。The second calculation submodule is configured to calculate an observation probability of an observation value corresponding to each state according to the state set and the observation set, and generate an observation probability matrix according to the observation probability.
  14. 根据权利要求13所述的装置,其中,所述历史网络访问记录包括访问网络的应用程序、网络资源地址及访问时间;所述终端状态包括网络环境信息及充电状态;The apparatus according to claim 13, wherein the historical network access record comprises an application for accessing a network, a network resource address, and an access time; the terminal status includes network environment information and a charging status;
    所述预处理子模块,设置为:The preprocessing submodule is configured to:
    根据预设规则匹配所述访问网络的应用程序的程序编号,以及所述网络资源地址对应的网络编号;Matching, by a preset rule, a program number of the application that accesses the network, and a network number corresponding to the network resource address;
    根据所述访问时间区分工作日和休息日,分别为所述工作日和所述休息日赋予不同的日期编号;Differentiating the working day and the rest day according to the access time, respectively assigning different date numbers to the working day and the rest day;
    根据所述访问时间所属的时间段确定时间编号,其中,对自然日内预设时间区间进行均分得到所述时间段,所述时间段与所述时间编号关联存储;Determining a time number according to the time period to which the access time belongs, wherein the time period is obtained by equally dividing the preset time interval in the natural day, and the time period is stored in association with the time number;
    根据所述网络环境信息判断终端是否接入无线网络,根据判断结果确定网络状态值;Determining, according to the network environment information, whether the terminal accesses the wireless network, and determining a network state value according to the determination result;
    根据充电状态判断终端是否正在充电,根据判断结果确定充电状态值;Determining whether the terminal is charging according to the state of charge, and determining a state of charge value according to the determination result;
    根据所述程序编号、日期编号、时间编号、网络状态值及充电状态值生成状态集合,并根据所述网络编号构成观测集合。A state set is generated based on the program number, date number, time number, network state value, and charge state value, and an observation set is constructed based on the network number.
  15. 一种网络资源预加载装置,包括:A network resource preloading device includes:
    当前记录获取模块,设置为按照设定周期获取当前网络访问记录及与所述当前网络访问记录关联的终端状态;The current record obtaining module is configured to acquire a current network access record and a terminal state associated with the current network access record according to a set period;
    模型输入模块,设置为将所述当前网络访问记录及终端状态输入预先构建的访问预测模型,其中,所述访问预测模型是根据历史网络访问记录及所述历史网络访问记录对应的终端状态训练的模型;a model input module, configured to input the current network access record and the terminal status into a pre-built access prediction model, wherein the access prediction model is trained according to a historical network access record and a terminal state corresponding to the historical network access record model;
    预加载模块,设置为获取所述访问预测模型输出的待访问的网络资源标识,下载所述网络资源标识对应的网络数据,并存储于本地缓存。The preloading module is configured to obtain the network resource identifier to be accessed that is output by the access prediction model, and download the network data corresponding to the network resource identifier, and store the data in the local cache.
  16. 根据权利要求15所述的装置,所述装置还包括:The device of claim 15 further comprising:
    下载策略选择模块,设置为在所述预加载模块下载所述网络资源标识对应的网络数据之前,判断终端是否接入无线网络;The downloading the policy selection module is configured to determine whether the terminal accesses the wireless network before the preloading module downloads the network data corresponding to the network resource identifier;
    若终端接入无线网络,则使所述预加载模块执行下载所述网络资源标识对应的网络数据的操作;If the terminal accesses the wireless network, the preloading module is configured to perform an operation of downloading network data corresponding to the network resource identifier;
    若终端没有接入无线网络,获取所述终端的蜂窝移动网络数据的状态信息;Obtaining state information of the cellular mobile network data of the terminal if the terminal does not access the wireless network;
    在所述状态信息满足预设条件时,使所述预加载模块执行下载所述网络资源标识对应的网络数据的操作;以及When the status information meets the preset condition, causing the preloading module to perform an operation of downloading network data corresponding to the network resource identifier;
    在所述状态信息不满足预设条件时,使所述预加载模块执行以下操作:根据所述网络资源标识对应的网络数据的数据类型和数据量中的至少一种确定目标网络数据,对所述目标网络数据进行加载。When the status information does not meet the preset condition, the preloading module is configured to: determine the target network data according to at least one of a data type and a data amount of the network data corresponding to the network resource identifier, The target network data is loaded.
  17. 根据权利要求15所述的装置,所述装置还包括:The device of claim 15 further comprising:
    地址获取模块,设置为在下载所述网络资源标识对应的网络数据之后,通过网络爬虫获取链接到所述网络资源标识包含的第一网络资源地址的第二网络资源地址,加载所述第二网络资源地址对应的网络数据,并存储于本地缓存。An address obtaining module, configured to: after downloading the network data corresponding to the network resource identifier, acquire, by using a network crawler, a second network resource address that is linked to the first network resource address included in the network resource identifier, and load the second network The network data corresponding to the resource address is stored in the local cache.
  18. 根据权利要求15-17中任一项所述的装置,所述装置还包括:A device according to any one of claims 15-17, the device further comprising:
    请求获取模块,设置为获取应用程序的网络访问请求;缓存查询模块,设置为根据所述网络访问请求查询所述本地缓存,确定所述网络访问请求对应的网络数据的预加载状态;数据读取模块,设置为若所述网络访问请求对应的网络数据已预加载,则读取所述网络数据,并返回至所述应用程序;数据下载模块,设置为若所述网络访问请求对应的网络数据未预加载,则由外网下载所述网络数据。The requesting module is configured to obtain a network access request of the application; the cache query module is configured to query the local cache according to the network access request, and determine a preload state of the network data corresponding to the network access request; a module, configured to: if the network data corresponding to the network access request is preloaded, read the network data, and return to the application; and the data downloading module is configured to: if the network access request corresponds to the network data If not preloaded, the network data is downloaded by the external network.
  19. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1至5中任一所述的模型构建方法;或者该程序被处理器执行时实现如权利要求6至11中任一所述的网络资源预加载方法。A computer readable storage medium having stored thereon a computer program, the program being executed by a processor to implement the model construction method according to any one of claims 1 to 5; or the program being implemented by the processor The network resource preloading method of any one of 6 to 11.
  20. 一种终端,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至5中任一所述的模型构建方法;或者,所述处理器执行所述计算机程序时实现如权利要求6至11中任一所述的网络资源预加载方法。A terminal comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, the processor executing the computer program to implement the model construction according to any one of claims 1 to 5 The method or the network resource preloading method according to any one of claims 6 to 11 is implemented when the processor executes the computer program.
PCT/CN2018/117157 2017-12-18 2018-11-23 Model construction method, network resource preloading method and apparatus, medium, and terminal WO2019120037A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711364552.0 2017-12-18
CN201711364552.0A CN108134691B (en) 2017-12-18 2017-12-18 Model building method, Internet resources preload method, apparatus, medium and terminal

Publications (1)

Publication Number Publication Date
WO2019120037A1 true WO2019120037A1 (en) 2019-06-27

Family

ID=62390496

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/117157 WO2019120037A1 (en) 2017-12-18 2018-11-23 Model construction method, network resource preloading method and apparatus, medium, and terminal

Country Status (2)

Country Link
CN (1) CN108134691B (en)
WO (1) WO2019120037A1 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021076376A1 (en) * 2019-10-16 2021-04-22 Microsoft Technology Licensing, Llc Prefetching based on historical use and real-time signals
CN113676505A (en) * 2020-05-15 2021-11-19 财付通支付科技有限公司 Information pushing method and device, computer equipment and storage medium
CN114027667A (en) * 2021-12-01 2022-02-11 慕思健康睡眠股份有限公司 Method and device for judging bed leaving state, intelligent mattress and medium
CN114374561A (en) * 2022-01-13 2022-04-19 潍坊学院 Network security state evaluation method and device and storage medium
CN114513488A (en) * 2020-10-29 2022-05-17 腾讯科技(深圳)有限公司 Resource access method, device, computer equipment and storage medium
CN115022342A (en) * 2022-05-31 2022-09-06 Oppo广东移动通信有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN115174557A (en) * 2022-07-01 2022-10-11 济南浪潮数据技术有限公司 Log downloading scheduling method, device and medium
CN115499319A (en) * 2022-09-19 2022-12-20 北京达佳互联信息技术有限公司 Resource distribution method, device, electronic equipment and storage medium
US11544560B2 (en) 2020-04-10 2023-01-03 Microsoft Technology Licensing, Llc Prefetching and/or computing resource allocation based on predicting classification labels with temporal data
CN115829172A (en) * 2023-02-24 2023-03-21 清华大学 Pollution prediction method, device, computer equipment and storage medium
CN116389398A (en) * 2023-05-30 2023-07-04 阿里巴巴(中国)有限公司 Data access control method, vehicle control method and device
CN116527982A (en) * 2023-06-01 2023-08-01 杭州威灿科技有限公司 Method and system for recording question synchronous audio and video
CN116708579A (en) * 2023-08-04 2023-09-05 浪潮电子信息产业股份有限公司 Data access method, device, electronic equipment and computer readable storage medium

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134691B (en) * 2017-12-18 2019-10-01 Oppo广东移动通信有限公司 Model building method, Internet resources preload method, apparatus, medium and terminal
CN109138969B (en) * 2018-07-17 2021-07-13 中国地质大学(武汉) Prediction method and device for drilling state variable and storage device
CN109191732A (en) * 2018-07-26 2019-01-11 杭州懒陈鑫网络科技有限公司 A kind of supermarket unmanned cash register system
CN110875836B (en) * 2018-08-31 2023-04-07 北京京东尚科信息技术有限公司 Application caching method, system, equipment and storage medium based on network prediction
CN109388224A (en) * 2018-09-26 2019-02-26 广东小天才科技有限公司 A kind of power consumption optimization method of smart machine, system and smart machine
CN111126103B (en) * 2018-10-30 2023-09-26 百度在线网络技术(北京)有限公司 Method and device for judging life stage state of user
CN110312272B (en) * 2019-07-23 2021-01-15 中南大学 Network service block resource allocation method and storage medium
CN111586020B (en) * 2020-04-29 2021-09-10 北京天融信网络安全技术有限公司 Probability model construction method and device, electronic equipment and storage medium
CN111666497B (en) * 2020-06-16 2023-06-06 腾讯科技(上海)有限公司 Application program loading method and device, electronic equipment and readable storage medium
CN111741112B (en) * 2020-06-22 2023-08-08 中国平安财产保险股份有限公司 File downloading method, device, equipment and storage medium based on artificial intelligence
CN112685058A (en) * 2020-12-22 2021-04-20 北京达佳互联信息技术有限公司 Pre-download method of application program update package, related device and storage medium
CN112965887A (en) * 2021-03-02 2021-06-15 南昌黑鲨科技有限公司 Modeling method of state machine model, game state prediction method, system and computer readable storage medium
CN113891388B (en) * 2021-10-15 2024-04-02 中国联合网络通信集团有限公司 Control method, device, equipment and storage medium for quality of experience QoE reporting
CN114302446A (en) * 2021-12-31 2022-04-08 中国联合网络通信集团有限公司 Quality of experience (QoE) reporting control method, device, equipment and storage medium
CN115514660B (en) * 2022-09-07 2024-01-19 北京达佳互联信息技术有限公司 Data caching method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120290817A1 (en) * 2011-05-13 2012-11-15 Oracle International Corporation Branch target storage and retrieval in an out-of-order processor
CN103581966A (en) * 2013-10-08 2014-02-12 北京工商大学 Real-time monitoring optimizing configuration method for smart phone
CN104008203A (en) * 2014-06-17 2014-08-27 浙江工商大学 User interest discovering method with ontology situation blended in
CN108134691A (en) * 2017-12-18 2018-06-08 广东欧珀移动通信有限公司 Model building method, Internet resources preload method, apparatus, medium and terminal

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6012052A (en) * 1998-01-15 2000-01-04 Microsoft Corporation Methods and apparatus for building resource transition probability models for use in pre-fetching resources, editing resource link topology, building resource link topology templates, and collaborative filtering
WO2003077153A1 (en) * 2002-03-11 2003-09-18 Research In Motion Limited System and method for pushing data to a mobile device
CN102890689B (en) * 2011-07-22 2017-06-06 北京百度网讯科技有限公司 The method for building up and system of a kind of user interest model
CN103139278A (en) * 2011-12-05 2013-06-05 北京网康科技有限公司 Network resource pre-fetching and cache accelerating method and device thereof
US8849731B2 (en) * 2012-02-23 2014-09-30 Microsoft Corporation Content pre-fetching for computing devices
CN103369508B (en) * 2013-06-25 2016-12-28 华为技术有限公司 Data load method and terminal unit
CN103729438B (en) * 2013-12-30 2017-06-16 优视科技有限公司 Webpage preloads method and device
CN103778221A (en) * 2014-01-23 2014-05-07 广东欧珀移动通信有限公司 Method and device for browsing webpage by mobile terminal
CN107016126A (en) * 2017-05-12 2017-08-04 西南交通大学 A kind of multi-user's model movement pattern method based on sequential mode mining

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120290817A1 (en) * 2011-05-13 2012-11-15 Oracle International Corporation Branch target storage and retrieval in an out-of-order processor
CN103581966A (en) * 2013-10-08 2014-02-12 北京工商大学 Real-time monitoring optimizing configuration method for smart phone
CN104008203A (en) * 2014-06-17 2014-08-27 浙江工商大学 User interest discovering method with ontology situation blended in
CN108134691A (en) * 2017-12-18 2018-06-08 广东欧珀移动通信有限公司 Model building method, Internet resources preload method, apparatus, medium and terminal

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11341097B2 (en) 2019-10-16 2022-05-24 Microsoft Technology Licensing, Llc Prefetching based on historical use and real-time signals
WO2021076376A1 (en) * 2019-10-16 2021-04-22 Microsoft Technology Licensing, Llc Prefetching based on historical use and real-time signals
US11544560B2 (en) 2020-04-10 2023-01-03 Microsoft Technology Licensing, Llc Prefetching and/or computing resource allocation based on predicting classification labels with temporal data
CN113676505A (en) * 2020-05-15 2021-11-19 财付通支付科技有限公司 Information pushing method and device, computer equipment and storage medium
CN113676505B (en) * 2020-05-15 2023-11-28 财付通支付科技有限公司 Information pushing method, device, computer equipment and storage medium
CN114513488A (en) * 2020-10-29 2022-05-17 腾讯科技(深圳)有限公司 Resource access method, device, computer equipment and storage medium
CN114513488B (en) * 2020-10-29 2023-11-07 腾讯科技(深圳)有限公司 Resource access method, device, computer equipment and storage medium
CN114027667A (en) * 2021-12-01 2022-02-11 慕思健康睡眠股份有限公司 Method and device for judging bed leaving state, intelligent mattress and medium
CN114027667B (en) * 2021-12-01 2023-08-15 慕思健康睡眠股份有限公司 Method and device for judging out-of-bed state, intelligent mattress and medium
CN114374561A (en) * 2022-01-13 2022-04-19 潍坊学院 Network security state evaluation method and device and storage medium
CN114374561B (en) * 2022-01-13 2023-10-24 潍坊学院 Network security state evaluation method, device and storable medium
CN115022342A (en) * 2022-05-31 2022-09-06 Oppo广东移动通信有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN115174557B (en) * 2022-07-01 2024-03-01 济南浪潮数据技术有限公司 Log downloading scheduling method, device and medium
CN115174557A (en) * 2022-07-01 2022-10-11 济南浪潮数据技术有限公司 Log downloading scheduling method, device and medium
CN115499319A (en) * 2022-09-19 2022-12-20 北京达佳互联信息技术有限公司 Resource distribution method, device, electronic equipment and storage medium
CN115829172A (en) * 2023-02-24 2023-03-21 清华大学 Pollution prediction method, device, computer equipment and storage medium
CN115829172B (en) * 2023-02-24 2023-05-12 清华大学 Pollution prediction method, pollution prediction device, computer equipment and storage medium
CN116389398B (en) * 2023-05-30 2023-10-20 阿里巴巴(中国)有限公司 Data access control method, vehicle control method and device
CN116389398A (en) * 2023-05-30 2023-07-04 阿里巴巴(中国)有限公司 Data access control method, vehicle control method and device
CN116527982B (en) * 2023-06-01 2023-09-15 杭州威灿科技有限公司 Method and system for recording question synchronous audio and video
CN116527982A (en) * 2023-06-01 2023-08-01 杭州威灿科技有限公司 Method and system for recording question synchronous audio and video
CN116708579A (en) * 2023-08-04 2023-09-05 浪潮电子信息产业股份有限公司 Data access method, device, electronic equipment and computer readable storage medium
CN116708579B (en) * 2023-08-04 2024-01-12 浪潮电子信息产业股份有限公司 Data access method, device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN108134691B (en) 2019-10-01
CN108134691A (en) 2018-06-08

Similar Documents

Publication Publication Date Title
WO2019120037A1 (en) Model construction method, network resource preloading method and apparatus, medium, and terminal
CN107896243B (en) Acceleration method and device for network data loading, storage medium and mobile terminal
CN107872523B (en) Network data loading method and device, storage medium and mobile terminal
CN108363593B (en) Application program preloading method and device, storage medium and terminal
CN108647052B (en) Application program preloading method and device, storage medium and terminal
EP3502881B1 (en) Method for preloading application, storage medium, and terminal device
WO2019086043A1 (en) M ethods and systems for preloading applications and generating prediction models
US8849731B2 (en) Content pre-fetching for computing devices
EP3502878B1 (en) Method for preloading application and terminal device
US20170357735A1 (en) Information presentation method, device, and system
CN107678800B (en) Background application cleaning method and device, storage medium and electronic equipment
WO2015081801A1 (en) Method, server, and system for information push
CN113420051B (en) Data query method and device, electronic equipment and storage medium
CN109240991B (en) File recommendation method and device, storage medium and intelligent terminal
CN108958828B (en) Application program preloading method and device, storage medium and terminal
CN109948090B (en) Webpage loading method and device
CN110222288B (en) Page display method, device and storage medium
CN110955486B (en) File caching efficiency tracking method and device, storage medium and terminal
CN110741346A (en) Application management method and terminal
CN112181508B (en) Page automatic refreshing method and device and computer equipment
CN113721803B (en) Data generation method, device, equipment and storage medium
CN111311014B (en) Service data processing method, device, computer equipment and storage medium
CN111858395B (en) Data management method and device
CN116955867A (en) Resource pre-caching method and related device
CN116302148A (en) Application starting method and device, electronic equipment and storage medium

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: 18892606

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18892606

Country of ref document: EP

Kind code of ref document: A1