Method and device for determining cache resources, non-volatile storage medium, and processor

By predicting resource popularity and optimizing storage space allocation in the computing network, cache resources are determined according to user preferences, which solves the problem of reduced hit rate of pre-cached resources caused by user mobility, and improves the speed of user access to network resources and the efficiency of cache resources. Hit rate.

CN115017435BActive Publication Date: 2024-10-15CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210741822.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-10-15
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

The hit rate of pre-cached resources in the existing technology is reduced, mainly due to the dynamic change of the popularity of pre-cached resources caused by user mobility, which fails to effectively solve this problem.

Method used

By determining the resources that can be requested in the computing power network and obtaining information about the resources requested by the target object, predicting the popularity of the resources, combining the user's movement trajectory and request records, optimizing storage space allocation, deciding whether to cache resources, and realizing processing based on user preferences. Resource cache.

Benefits of technology

It improves the hit rate of cached resources, improves the speed for users to access network resources, effectively utilizes edge storage space, and improves the hit rate of pre-cached resources while ensuring user privacy and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115017435B_ABST
    Figure CN115017435B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for determining cache resources, a non-volatile storage medium, and a processor. The method includes: determining the resources that can be requested in the computing power network, and obtaining the first information of the target object requesting the resource, wherein the first information includes: the name of the resource requested by the target object, the time when the target object requests the resource, and the base station accessed by the target object at the time; predicting the popularity of the resource based on the first information, wherein the popularity of the resource is the probability that each resource is requested by the target object; determining the storage space of the computing power resources of the base station accessed by the target object, wherein the computing power resources are resources with data processing capabilities in the computing power base station; determining whether to cache the resource based on the popularity and storage space of the resource. The present application solves the technical problem of the reduced hit rate of pre-cached resources in the prior art caused by the dynamic changes in the popularity of the pre-cached resources due to the mobility of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning and edge computing technology, and in particular to the field of federated learning. Specifically, it relates to a method and device for determining cache resources, a non-volatile storage medium, and a processor. Background Art

[0002] With the development of mobile communication technology, the ultra-high bandwidth and ultra-high latency access between mobile devices and base stations has brought the bottleneck of mobile devices accessing network resources to the network server and network bandwidth. Pre-caching network resources at the edge is an effective way to break through this bottleneck. However, different users have different preferences for network resources, and user preferences may be related to many factors, such as gender, age, and occupation. In addition, the user's location, time, and type of device will also affect the user's preference. Therefore, the popularity of pre-cached network resources changes dynamically due to the user's mobility, resulting in a lower hit rate of pre-cached resources.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method and device for determining cache resources, a non-volatile storage medium, and a processor to at least solve the technical problem of reduced pre-cached resource hit rate in the prior art caused by dynamic changes in the popularity of pre-cached resources due to user mobility.

[0005] According to one aspect of an embodiment of the present application, a method for determining cache resources is provided, including: determining requestable resources in a computing power network, and obtaining first information of a target object requesting resources, wherein the first information includes: the name of the resource requested by the target object, the time when the target object requests the resource, and the base station accessed by the target object at that time; predicting the popularity of the resource based on the first information, wherein the popularity of the above-mentioned resource is the probability that each resource is requested by the target object; determining the storage space of the computing power resources of the base station accessed by the target object, wherein the computing power resources are resources with data processing capabilities in the computing power base station; and determining whether to cache the resource based on the popularity and storage space of the resource.

[0006] Optionally, predicting the popularity of resources based on the first information includes: predicting a first popularity of known resources, wherein the known resources are resources indicated by the first information; and predicting a second popularity of unknown resources, wherein the unknown resources are resources not indicated by the first information.

[0007] Optionally, predicting the first popularity of a known resource includes: predicting the movement trajectory information of the target object within the target time period, and outputting a first prediction result, wherein the movement trajectory information includes the moment when the target object requests the resource within the target time period and the base station accessed by the target object at the above moment; predicting the name of the resource requested by the target object within the target time period, and outputting a second prediction result; and predicting the first popularity based on the first prediction result and the second prediction result.

[0008] Optionally, the first prediction result is outputted by the following method, including: outputting the first prediction result by a first preset algorithm according to the first information.

[0009] Optionally, the second prediction result is outputted by the following method, including: obtaining second information of the target object, wherein the second information includes at least one of the following resource information: a search record of the target object, a shopping record of the target object, and a browsing record of the target object; determining a feature vector of the target object in the base station through a first preset algorithm according to the second information; correcting a first parameter of the first preset algorithm to a second parameter according to the first information and the feature vector, and uploading the second parameter to the base station; determining multiple second parameters in the base station and multiple first weights corresponding to multiple target objects in the base station, and determining a first arithmetic sum obtained by a first product of each second parameter and each first weight; determining multiple first arithmetic sums of multiple base stations in the computing power network, determining multiple second weights corresponding to the multiple base stations, and determining a second arithmetic sum obtained by a second product of multiple first arithmetic sums and multiple second weights, and determining a second preset algorithm according to the second arithmetic sum, and outputting the second prediction result through the second preset algorithm.

[0010] Optionally, predicting the second popularity of an unknown resource includes: obtaining a first set of resources requested by the target object within a target time period, the first set consisting of known resources; obtaining a second set of resources requested by the target object within the target time period, the second set including unknown resources; and predicting the second popularity of the unknown resource based on the first set and the second set.

[0011] Optionally, determining whether to cache resources is based on the popularity and storage space of the resources, including: determining an average value of the popularity of the resources, and sorting the average values ​​in ascending order to obtain a sorted result of the average value; determining a first number of requestable resources based on the sorted result of the average value; determining the size of each resource in the first number of requestable resources, and determining a third arithmetic sum of the sizes of the requestable resources based on the size of each resource, wherein the third arithmetic sum is less than the storage space; determining the number of requestable resources in the base station to be a second number, and determining to cache the resources if the second number is less than the first number; and refusing to cache the resources if the second number is greater than or equal to the first number.

[0012] According to another aspect of an embodiment of the present application, a device for determining cache resources is also provided, the device comprising: a first determination module, used to determine requestable resources in a computing power network, and obtain first information of a target object requesting resources, wherein the first information comprises: the name of the resource requested by the target object, the time when the target object requests the resource, and the base station accessed by the target object at the time; a prediction module, used to predict the popularity of the resource based on the first information, wherein the popularity of the resource is the probability that each resource is requested by the target object; a second determination module, used to determine the storage space of the computing power resources of the base station accessed by the target object, wherein the computing power resources are resources with data processing capabilities in the computing power network; a third determination module, used to determine whether to cache the resource based on the popularity and storage space of the resource.

[0013] According to another aspect of an embodiment of the present application, a non-volatile storage medium is further provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the method for determining cache resources.

[0014] According to another aspect of an embodiment of the present application, a processor is further provided, the processor being used to run a program stored in a memory, wherein the method for determining cache resources is executed when the program is running.

[0015] In an embodiment of the present application, a method is adopted to determine the requestable resources in the computing power network, and obtain the first information of the target object requesting the resource, wherein the first information includes: the name of the resource requested by the target object, the time when the target object requests the resource, and the base station to which the target object accesses at the time; predict the popularity of the resource according to the first information, wherein the popularity of the resource is the probability that each resource is requested by the target object; determine the storage space of the computing power resources of the base station to which the target object accesses, wherein the computing power resource is a resource with data processing capability in the computing power base station; determine whether to cache the resource according to the popularity and storage space of the resource, by predicting the movement trajectory of the target object and the resource requested by the target object, predicting the popularity of the resource according to the prediction result, and allocating the network resource using the predicted resource popularity and the base station where the target user is located, so as to achieve the purpose of allocating cache resources to the target object according to its preference, thereby achieving the technical effect of improving the hit rate of the cache resource, thereby improving the speed at which the target object accesses the network resource, and further solving the technical problem of reducing the hit rate of the pre-cached resource in the prior art caused by the dynamic change of the popularity of the pre-cached resource affected by the mobility of the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1 is a flow chart of a method for determining cache resources according to an embodiment of the present application;

[0018] Figure 2 is a schematic diagram of a long short-term memory neural network algorithm according to the related art;

[0019] Figure 3 is a schematic diagram of a model for training and predicting user request information according to an embodiment of the present application;

[0020] Figure 4 is a structural diagram of a device for determining cache resources according to an embodiment of the present application;

[0021] Figure 5 is a schematic diagram of a method for predicting user behavior and determining resource pre-caching according to an embodiment of the present application;

[0022] Figure 6 is a flowchart of a method for predicting user behavior and determining resource pre-caching according to this embodiment. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] According to an embodiment of the present application, a method embodiment for determining cache resources is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] Figure 1 is a flowchart of a method for determining cache resources provided according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0027] Step S102, determine the requestable resources in the computing network, and obtain first information of the target object requesting resources, wherein the first information includes: the name of the resource requested by the target object, the time when the target object requests the resource, and the base station accessed by the target object at the time.

[0028] The embodiment of the present application provides a method for determining the pre-cached resources of the corresponding network edge terminal (such as edge server, base station, gateways at all levels and routers, etc.) according to the preference of the user (i.e., the target object) in the network. According to the method provided in step S102, the historical request information (i.e., the first information) of the user requesting the network resource stored in the local base station is first obtained, including the name of the resource requested by the user, the time when the user requested the resource, and the base station where the user was when requesting the resource.

[0029] Step S104: predicting the popularity of resources according to the first information, wherein the popularity of resources is the probability of each resource being requested by the target object.

[0030] According to the method provided in step S104, after obtaining the historical request information of the user in step S102, the user's popularity (ie, popularity) for the network resource is predicted based on the request information.

[0031] Step S106, determine the storage space of the computing resources of the base station to which the target object accesses, wherein the computing resources are resources with data processing capabilities in the computing base station.

[0032] According to the method provided in the embodiment of the present application, after predicting the popularity of the resource, it needs to be allocated; before allocation, it is necessary to obtain the storage space of the computing resources in the base station accessed by the user through step S106, thereby knowing the ability of the base station to process information, wherein the above-mentioned computing resources are resources that have the ability to process network information (for example, can calculate hash functions).

[0033] Step S108: Determine whether to cache the resource according to the popularity and storage space of the resource.

[0034] Step S108 executes the resource allocation process, using the popularity of the resources and the storage space of the computing resources obtained through the above steps as basic data to determine the resources to be cached by the user's base station.

[0035] Through the above steps, a resource pre-caching method based on federated learning and user behavior prediction is provided. The method uses federated learning to predict user movement trajectories and user access resources respectively, and then obtains the optimal pre-caching strategy according to the pre-caching decision algorithm. Among them, the records of users accessing network resources and the records of users accessing base stations are only kept locally in the base station. It can improve the hit rate of pre-cached resources while ensuring user privacy and security, thereby improving the speed of users accessing network resources, and effectively utilizing the edge storage space.

[0036] According to an optional embodiment of the present application, predicting the popularity of resources based on first information includes the following: predicting a first popularity of known resources, wherein the known resources are resources indicated by the first information; predicting a second popularity of unknown resources, wherein the unknown resources are resources not indicated by the first information.

[0037] The method provided in the embodiment of the present application can not only predict the popularity of the resources (i.e., known resources) contained in the above historical request information, but also predict the popularity of the resources (i.e., unknown resources) not contained in the above historical request information. The method provided in the embodiment of the present application makes full use of the preferences of each user (i.e., the particularity of the user) and the user's movement trajectory (i.e., the time-space distribution characteristics). By inputting the prediction results of the user terminal (i.e., the prediction results of the user request information) and the user's real-time location, the popularity of the current resource and which base station it is allocated to (i.e., spatial distribution) can be obtained. If the user's real-time location is replaced by the prediction results of the user's location, the popularity of the resource for a period of time in the future can be predicted. Optimizing the storage resources in the computing power network according to the popularity of the resources can reduce the latency of the user's request for network resources and reduce the network burden.

[0038] According to another optional embodiment of the present application, predicting the first popularity of a known resource is achieved by the following method: predicting the movement trajectory information of the target object within the target time period, and outputting a first prediction result, wherein the movement trajectory information includes the moment when the target object requests the resource within the target time period and the base station accessed by the target object at the above moment; predicting the name of the resource requested by the target object within the target time period, and outputting a second prediction result; predicting the first popularity based on the first prediction result and the second prediction result.

[0039] In the method provided in the present application, the prediction of the popularity of a known resource (i.e., the first popularity) needs to be based on the historical request information of the above-mentioned user, and the user's movement trajectory and request information in the future period of time are predicted respectively, and the popularity of the resource is predicted based on the results of the predicted movement trajectory and the predicted request information. In combination with the above-mentioned embodiments, in order to predict the user's location and the resources visited while ensuring the user's privacy, this preferred embodiment adopts a federated learning method to predict the user's movement trajectory and request information in the future period of time. Specifically, two models need to be trained on the user's terminal, one for predicting the user's own movement trajectory, and the other for predicting the resources that the user will request.

[0040] According to another optional embodiment of the present application, the first prediction result is outputted by the following method, including: outputting the first prediction result by a first preset algorithm according to the first information.

[0041] This embodiment uses the Long Short Term Memory networks (LSTM) algorithm in the deep neural network (i.e., the first preset algorithm), and uses the above algorithm as a model for predicting the user's motion trajectory. The above model for predicting the user's motion trajectory is trained according to the user's historical movement trajectory (i.e., the above historical request information). It is relatively simple to predict the user's own motion trajectory without the need for federated learning. It only needs to download the trained model to the local computer to predict the user's motion trajectory. Specifically, this embodiment uses the following formula to represent the user's motion trajectory:

[0042] traj={(p1, t1), (p2, t2),..., (p n , t n )}

[0043] Among them, traj represents the motion trajectory, t i Indicates the time when the user requested the resource, t i <t i+1 , p i Indicates the base station that the user is connected to at that moment. Figure 2 This is a schematic diagram of the long short-term memory neural network algorithm. The motion trajectory is input into Figure 2 The position of t in the Long Short Term Memory networks (LSTM) algorithm shown in Figure 1 is used to obtain the prediction results of the motion trajectory. Figure 2 The corresponding formula is as follows:

[0044] f t =δ(W f ·[x t ,h t-1]+b f )

[0045] i t =δ(W i ·[x t ,h t-1 ]+b i )

[0046] o t =δ(W o ·[x t ,h t-1 ]+b o )

[0047] C t =i t tanh(W ff ·[x t ,h t-1 ]+b f )+f t ·C t-1

[0048] h t =o t tanh(C t )

[0049] For LSTM, its input is a vector and its output is a real number vector; where [x t ,h t-1 ] means connecting two vectors into a longer vector, C is the state added to the hidden layer, called the unit state, and h represents a state of the hidden layer. Figure 2 As shown, x t ,h t-1 C t-1 are the three inputs of LSTM, where x t represents the output value of the network at the current moment, h t-1 Represents the output value of LSTM at the previous moment, C t-1 Indicates the unit state at the previous moment; h t and C t are the two outputs of LSTM, where h t is the output value of LSTM at the current moment, C t is the cell state of LSTM at the current moment. t , f t and t These are the three “gates” of LSTM, which is essentially a fully connected layer. t is the forget gate, which is based on the weight matrix W of the forget gate f ,[x t ,h t-1] and the bias b of the forget gate f Determined by the δ activation function; i t is the input gate, which is based on the weight matrix W of the input gate i ,[x t ,h t-1 ] and the bias b of the input gate i Determined by the δ activation function; o t is the output gate, which is based on the weight matrix W of the output gate o ,[x t ,h t -1 ] and the bias b of the output gate o Determined by the δ activation function. For LSTM, its final output h t By output gate o t and the current cell state C t It is jointly determined by the hyperbolic tangent function tanh.

[0050] According to another optional embodiment of the present application, the second prediction result is outputted by the following method, including the following steps: obtaining second information of the target object, wherein the second information includes at least one of the following resource information: a search record of the target object, a shopping record of the target object, and a browsing record of the target object; determining a feature vector of the target object in the base station through a first preset algorithm according to the second information; correcting a first parameter of the first preset algorithm to a second parameter according to the first information and the feature vector, and uploading the second parameter to the base station; determining multiple second parameters in the base station and multiple first weights corresponding to multiple target objects in the base station, and determining a first arithmetic sum obtained by a first product of each second parameter and each first weight; determining multiple first arithmetic sums of multiple base stations in the computing power network, determining multiple second weights corresponding to the multiple base stations, and determining a second arithmetic sum obtained by a second product of multiple first arithmetic sums and multiple second weights, and determining a second preset algorithm according to the second arithmetic sum, and outputting the second prediction result through the second preset algorithm.

[0051] To predict the popularity of resources, it is also necessary to determine a method for predicting the requests of the target object, that is, the model for predicting the resources that the user will request mentioned in the above embodiment. This embodiment provides a preferred method for training the above model for predicting the resources that the user will request. Because the user's preferences, location, and time will affect the resources requested by the user, the data used to train the user request resource prediction model should include the user feature vector and the first information above. In this embodiment, we represent it as (C, p i , t i , k i ), where C is the user feature vector, t i and p iare the time when the user requests resources and the user’s location at that time (i.e., the base station the user accesses), k i It is the relevant information of the resource specifically requested by the user, including the name of the resource, the size of the resource, etc. The user feature vector can be obtained by inputting the user's privacy data (i.e., the second information) such as browsing history, search history, online shopping history, etc. into the autoencoder (i.e., the first preset algorithm), wherein the autoencoder is a type of artificial neural network in the deep neural network, which can realize the function of taking the input information as the learning target and characterizing the input information. i , t i , k i ) is input into the deep neural network to obtain the user's preference prediction for various resources. The specific training adopts the method of federated learning.

[0052] Figure 3 is a schematic diagram of a model for training and predicting user request information provided by this embodiment. As shown in the figure, in each round of training, each user terminal first uses its own data set, that is, the above-mentioned user privacy data, to train the deep neural network, and then uses the formula The first parameter ω1 of the first algorithm is modified to the second parameter ω2, where F k (ω1) is calculated by weighted average method for the loss function on each client; then the second parameter ω2 of the trained model is uploaded to the connected base station, and the formula is used at the base station Perform local aggregation on the second parameter ω2, where ρ i is the weight of the ith user (i.e., the first weight), ω i The training result ω2 (i.e., the second parameter) of the i-th user is used to obtain the first arithmetic sum ω3. Finally, the ω3 of each base station in the network is further calculated through Aggregation obtains the second arithmetic sum ω4 and obtains a new model, where ω i is the training result ω3 of the i-th base station. Finally, the new model is distributed to each user terminal (ie, client). The new model is a model for predicting the user's request information (ie, a method for predicting the request of the target object).

[0053] Based on the model for predicting the user's request information and the model for predicting the user's own movement trajectory obtained in the above embodiment, the user's own requested resources and location are predicted, and a first prediction result and a second prediction result are output. The popularity of each known resource (i.e., the first popularity) is predicted based on the first prediction result and the second prediction result. j After obtaining the user's prediction of their own location and requested resource prediction results, we can use the formula Get the popularity of each known resource K in the future, where P k is the popularity of resource K, R ik For each user p i The possibility of requesting a known resource K, |{U i |p i =B j}|Indicates that the accessed base station is B j User p i The collection U i .

[0054] According to some optional embodiments of the present application, predicting the second popularity of an unknown resource includes the following steps: obtaining a first set of resources requested by a target object within a target time period, wherein the first set consists of known resources; obtaining a second set of resources requested by the target object within the target time period, wherein the second set includes unknown resources; and predicting the second popularity of the unknown resource based on the first set and the second set.

[0055] As mentioned in the above optional embodiment, the method provided by the present application can also predict the popularity of unknown resources (i.e., the second popularity). This embodiment provides a preferred method for predicting the popularity of unknown resources. In this embodiment, the set of known resources is denoted as K, and the unknown resources are denoted as x. For new resources that may appear, The popularity of the new resource cannot be predicted using the method mentioned in the above embodiment; according to basic common sense, users with similar historical request information have a high overlap in their preferred resources, that is, among users with similar historical requests, if some users request a new resource x, then other users are likely to request the new resource x as well. Therefore, the collaborative filtering method can be used to estimate the popularity of the new resource (i.e., the second popularity), and the specific method is as follows:

[0056] First, by the formula Calculate the Jaccard similarity coefficient J(U i , U j ), where U i represents user i, U j represents user j, K i is the set of resources requested by user i within a certain period of time (i.e., the first set), K j is the set of resources requested by user j within a certain period of time, K j Contains unknown resource x.

[0057] S represents the set of users who requested unknown resources. S When a resource x that is not in the known resource set K is requested, the probability that other users will request the resource is expressed as R ix =maxj∈S J(U i , U j ), then the base station can calculate the P after including the new resource x k . And in the subsequent steps according to the new P k Make precaching decisions for unknown resources.

[0058] In the embodiment provided in the present application, after obtaining the popularity of the resource (including the first popularity and the second popularity), and predicting the popularity of the resource according to the first information, the method for determining the cached resource further includes: normalizing the popularity. The popularity of the resource is calculated by the formula The obtained popularity is normalized to obtain the weight of each resource, where P ky is the weight of each resource K, P k is the popularity of each resource K in resource set K1.

[0059] According to some optional embodiments of the present application, determining whether to cache resources is based on the popularity and storage space of the resources, which is achieved by the following method: determining an average value of the popularity of the resources, and sorting the average values ​​in ascending order to obtain a sorting result of the average value; determining a first number of requestable resources based on the sorting result of the average value; determining the size of each resource in the first number of requestable resources, and determining a third arithmetic sum of the sizes of the requestable resources based on the size of each resource, wherein the third arithmetic sum is less than the storage space; determining the number of requestable resources in the base station to be a second number, and if the second number is less than the first number, determining to cache the resources; if the second number is greater than or equal to the first number, refusing to cache the resources.

[0060] In combination with the above embodiments of the present application, after obtaining the popularity of a resource, it is necessary to allocate the resource. In this embodiment, a preferred method for allocating resources (i.e., resource pre-storage decision) is provided. According to the method provided in this embodiment, the resource popularity P is obtained. k After the spatial distribution, the computing power network storage resources are allocated according to the following formula. The specific allocation method is as follows:

[0061] First, determine the appropriate f according to different network conditions t1 With f t2 , so that the optimization task conforms to the current network situation. Among them, f t1 and f t2 is a function of resource K, f t1 is the transmission cost from the computing power network to the user, and the specific requested resource size m k Related, t2 is the cost of requesting resources from the Internet; t1 and f t2can be defined as the transmission delay when requesting resources. t1 <<f t2 And f t1 (m k ) and f t2 (m k ) are all monotonically increasing functions, so they can be solved by the following steps:

[0062] Step 1: Determine the average value of the popularity of the resource, and sort the average values ​​in ascending order to obtain the sorting result of the average values.

[0063] For example, to solve the P of users accessing the current computing resources k The average values ​​of and sort the above average values;

[0064] Step 2: Determine a first number of requestable resources based on the sorting result of the average value; determine the size of each resource in the first number of requestable resources, and determine the third arithmetic sum of the sizes of the requestable resources based on the size of each resource, wherein the third arithmetic sum represents the number of bytes occupied by all the above-mentioned requestable resources, and the third arithmetic sum is less than the storage space.

[0065] For example, in Under the constraint of , we can sort the P k Take as many of the first L terms as possible so that The obtained L is f t1 (m k ) and f t2 (m k ), where m k is the size of the Kth resource, M i S is the computing resource i Storage space, D ik is the computing resource S i The decision of whether to cache resource K should be explained as follows: t1 With f t2 If the above conditions are not met, it is necessary to search for the optimal solution in the feasible domain, which can be done by heuristic algorithms such as particle swarm optimization. t1 With f t2 All of the above conditions are met.

[0066] Step three: determine that the number of resources that can be requested in the base station is a second number, and if the second number is less than the first number, determine to cache the resources; if the second number is greater than or equal to the first number, reject to cache the resources.

[0067] For example, combined with the solution to the optimization problem in step 2 (i.e., f t1 、f t2Solution) Make resource cache decisions for each base station according to the following formula:

[0068]

[0069] Where N i To be assigned to base station B i The number of users, P kij To be assigned to B i The probability distribution of the jth user's request for each resource. ik The value of determines whether to cache the resource. If D ik If the value of D is 1, the resource is cached. ik If the value is 0, the resource is not cached.

[0070] Figure 4 is a structural diagram of a device for determining cache resources according to this embodiment, such as Figure 4 As shown, the device comprises:

[0071] The first determination module 40 is used to determine the resources that can be requested in the computing network, and obtain the first information of the resource requested by the target object, wherein the first information includes: the name of the resource requested by the target object, the time when the target object requests the resource, and the base station accessed by the target object at the time;

[0072] A prediction module 42, configured to predict the popularity of a resource based on the first information, wherein the popularity of a resource is a probability that each resource is requested by a target object;

[0073] A second determination module 44 is used to determine the storage space of the computing resources of the base station to which the target object is connected, wherein the computing resources are resources with data processing capabilities in the computing network;

[0074] The third determination module 46 is used to determine whether to cache a resource according to the popularity and storage space of the resource.

[0075] It should be noted that Figure 4 The preferred implementation of the illustrated embodiment can be found in Figure 1 The relevant description of the illustrated embodiment will not be repeated here.

[0076] Figure 5 is a schematic diagram of a method for predicting user behavior and determining resource pre-caching according to the prediction result according to this embodiment, such as Figure 5 As shown, assuming that there are K data resources in the network, denoted as These resources are likely to be requested by all users, and their popularity is recorded as (P k ) K×1, which is essentially the probability distribution of all users’ requests for these resources. This probability distribution represents the common interests of all users in the entire computing network. k ) K×1 , these resources can be cached in the computing nodes in this area to reduce the access to these resources on the Internet and reduce the latency of user data requests. By using the joint learning method, we analyze each user and predict each user's request for each resource. Combined with the user location prediction, we can get the (P k ) K×1 Distribution, and based on this, optimize the resource caching strategy in the computing power network, so that the resource cache of the entire network is in the optimal state in real time.

[0077] Figure 6 is a flowchart of a method for predicting user behavior and determining resource pre-caching according to the prediction result according to this embodiment, such as Figure 6 As shown, the method includes the following steps: collecting user historical access information; using historical data to calculate user similarity; if a user accesses a new network resource, using the similarity between other users and the user to estimate the preference of other users for the new resource; and updating the resource pre-caching decision.

[0078] By executing the above process, the method of federated learning is used to predict the user's mobile trajectory and the user's access resources respectively, and then the optimal pre-caching strategy is obtained according to the pre-caching decision algorithm; and for resources that do not belong to historical access information, the collaborative filtering method is used to process new resources in real time, predict the popularity of new resources and use this as the basis for resource pre-caching to adjust the cache decision in real time. This method takes into account the user's possible requests and analyzes the user's mobile trajectory, caches resources in the most appropriate location, and can improve the speed of users accessing network resources while ensuring user privacy and security.

[0079] An embodiment of the present application further provides a non-volatile storage medium, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above method for determining cache resources.

[0080] The above-mentioned non-volatile storage medium is used to store programs that perform the following functions: determine the resources that can be requested in the computing power network, and obtain first information of the target object requesting the resource, wherein the first information includes: the name of the resource requested by the target object, the time when the target object requests the resource, and the base station accessed by the target object at the time; predict the popularity of the resource based on the first information, wherein the popularity of the resource is the probability that each resource is requested by the target object; determine the storage space of the computing power resources of the base station accessed by the target object, wherein the computing power resources are resources with data processing capabilities in the computing power base station; determine whether to cache the resource based on the popularity and storage space of the resource.

[0081] An embodiment of the present application further provides a processor, which is used to run a program stored in a memory, wherein the above method for determining cache resources is executed when the program is running.

[0082] The above-mentioned processor is used to run a program that performs the following functions: determine the resources that can be requested in the computing power network, and obtain first information of the target object requesting the resource, wherein the first information includes: the name of the resource requested by the target object, the time when the target object requests the resource, and the base station accessed by the target object at the time; predict the popularity of the resource based on the first information, wherein the popularity of the resource is the probability that each resource is requested by the target object; determine the storage space of the computing power resources of the base station accessed by the target object, wherein the computing power resources are resources with data processing capabilities in the computing power base station; determine whether to cache the resource based on the popularity and storage space of the resource.

[0083] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0084] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0085] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0086] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0087] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0088] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0089] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for determining cache resources, characterized in that: include: Determine a resource that can be requested in the computing power network, and obtain first information of a target object requesting the resource, wherein the first information includes: a name of the resource requested by the target object, a time when the target object requests the resource, and a base station accessed by the target object at the time; Predicting popularity of the resource according to the first information, wherein the popularity of the resource is a probability that each resource is requested by the target object; Determining the storage space of the computing resources of the base station to which the target object is accessed, wherein the computing resources are resources with data processing capabilities in the computing network; determining whether to cache the resource according to popularity of the resource and the storage space; Predicting the popularity of the resource based on the first information includes: predicting a first popularity of a known resource, wherein the known resource is a resource indicated by the first information; predicting a second popularity of an unknown resource, wherein the unknown resource is a resource not indicated by the first information; The predicting of the first popularity of the known resource includes: predicting movement trajectory information of the target object within a target time period, and outputting a first prediction result, wherein the movement trajectory information includes the time when the target object requests the resource within the target time period and the base station accessed by the target object at the time; predicting the name of the resource requested by the target object within the target time period, and outputting a second prediction result; and predicting the first popularity based on the first prediction result and the second prediction result. The process of determining the second prediction result includes: obtaining second information of the target object, wherein the second information includes at least one of the following resource information: the search record of the target object, the shopping record of the target object and the browsing record of the target object; determining the feature vector of the target object in the base station through a first preset algorithm based on the second information; correcting the first parameter of the first preset algorithm to a second parameter based on the first information and the feature vector, and uploading the second parameter to the base station; determining multiple second parameters in the base station and multiple first weights corresponding to multiple target objects in the base station, and determining a first arithmetic sum obtained by the first product of each second parameter and each first weight; determining multiple first arithmetic sums of multiple base stations in the computing power network, determining multiple second weights corresponding to multiple base stations, and determining a second arithmetic sum obtained by the second product of multiple first arithmetic sums and multiple second weights, and determining a second preset algorithm based on the second arithmetic sum, and outputting the second prediction result through the second preset algorithm.

2. The method according to claim 1, characterized in that Outputting the first prediction result by the following method includes: According to the first information, the first prediction result is outputted through a first preset algorithm.

3. The method according to claim 1, characterized in that Predict the second popularity of unknown resources, including: Acquire a first set of the resources requested by the target object within the target time period, where the first set consists of the known resources; Acquire a second set of resources requested by the target object within the target time period, where the second set includes the unknown resource; A second popularity of the unknown resource is predicted based on the first set and the second set.

4. The method according to claim 1, wherein Determining whether to cache the resource according to the popularity of the resource and the storage space includes: Determine an average value of the popularity of the resource, and sort the average values ​​in ascending order to obtain a sorting result of the average values; Determining a first number of requestable resources according to the sorting result of the average values; determining a size of each resource in the first number of requestable resources, and determining a third arithmetic sum of the sizes of the requestable resources according to the size of each resource, wherein the third arithmetic sum is less than the storage space; determining that the number of requestable resources in the base station is a second number, and if the second number is less than the first number, determining to cache the resources; If the second number is greater than or equal to the first number, refusing to cache the resource.

5. A device for determining cache resources, characterized in that: include: A first determining module is configured to determine a requestable resource in a computing power network and obtain first information of a target object requesting the resource, wherein the first information includes: a name of the resource requested by the target object, a time when the target object requests the resource, and a base station accessed by the target object at the time; A prediction module, configured to predict the popularity of the resource based on the first information, comprising: predicting a first popularity of a known resource, the known resource being a resource indicated by the first information, and predicting a second popularity of an unknown resource, the unknown resource being a resource not indicated by the first information, wherein the popularity of the resource is a probability that each resource is requested by the target object; the predicting the first popularity of the known resource comprising: predicting movement trajectory information of the target object within a target time period, and outputting a first prediction result, the movement trajectory information comprising a time at which the target object requests the resource within the target time period and a base station accessed by the target object at the time; predicting a name of the resource requested by the target object within the target time period, and outputting a second prediction result; predicting the first popularity based on the first prediction result and the second prediction result; a process for determining the second prediction result comprising: acquiring second information of the target object, wherein the second information comprises at least one of the following resource information: a search record of the target object, a shopping record of the target object, and a browsing record of the target object; Determine a feature vector of the target object in the base station through a first preset algorithm according to the second information; correct a first parameter of the first preset algorithm to a second parameter according to the first information and the feature vector, and upload the second parameter to the base station; determine a plurality of the second parameters in the base station and a plurality of first weights corresponding to a plurality of target objects in the base station, and determine a first arithmetic sum obtained by multiplying each second parameter by each first weight; determine a plurality of first arithmetic sums of the plurality of base stations in the computing power network, determine a plurality of second weights corresponding to the plurality of base stations, and determine a second arithmetic sum obtained by multiplying the plurality of the first arithmetic sums by the second product of the plurality of the second weights, determine a second preset algorithm according to the second arithmetic sum, and output the second prediction result through the second preset algorithm; a second determining module, configured to determine a storage space of computing resources of the base station to which the target object is connected, wherein the computing resources are resources in the computing network that have data processing capabilities; The third determining module is configured to determine whether to cache the resource according to the popularity of the resource and the storage space.

6. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the method for determining cache resources according to any one of claims 1 to 4.

7. A processor, characterized in that: The processor is configured to run a program stored in a memory, wherein the program executes the method for determining cache resources according to any one of claims 1 to 4 when running.