Information Resource Demand Prediction Method and System Based on User Behavior Patterns
By extracting the multi-dimensional features of user behavior data and using pre-trained models to generate resource demand prediction sets, the problem of unreasonable resource allocation in traditional information resource allocation methods is solved, and more efficient resource allocation and user experience improvement is achieved.
Patent Information
- Application Number
- CN202510678860.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-05-26
AI Technical Summary
The existing information resource allocation methods lack in-depth mining and analysis of user behavior patterns, resulting in unreasonable resource allocation and inability to adapt to complex and changeable user demand scenarios, affecting user experience and system efficiency.
By obtaining the target user's behavior data set, extracting operation intensity, time distribution and context-related features, using the pre-trained demand prediction model to generate resource demand prediction sets, and prioritizing them according to feature weights, triggering resource preloading operations.
It has achieved the improvement of the accuracy and efficiency of information resource allocation, avoided resource waste and increased user waiting time, and improved user experience and system operation efficiency.
Smart Images

Figure CN120216207B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for predicting information resource demand based on user behavior patterns. Background Art
[0002] In today's era of digital information explosion, the contradiction between the richness of information resources and the efficiency of user access to information is becoming increasingly prominent. Traditional information resource allocation methods are mostly based on fixed rules or simple user historical preferences, lacking in-depth mining and analysis of user behavior patterns.
[0003] On the one hand, existing methods often ignore the temporal characteristics of user behavior. For example, users' operation frequency and focus may vary significantly across different time periods, making it difficult for traditional methods to accurately allocate resources based on these temporal distribution characteristics. On the other hand, traditional methods also fail to fully consider the contextual relationships between user operations, making resource allocation unable to adapt to complex and changing user demand scenarios.
[0004] Furthermore, the lack of comprehensive feature extraction and analysis of user behavior data leads to low accuracy in information resource demand forecasting, often leading to irrational resource allocation. For example, popular resources are not loaded in a timely manner, while unpopular resources occupy a large amount of system resources, seriously affecting the user experience and system efficiency. Therefore, a more accurate and intelligent information resource demand forecasting method is urgently needed to solve these problems. Summary of the Invention
[0005] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides an information resource demand prediction method based on user behavior patterns, the method comprising:
[0006] Obtain a user behavior data set of a target user within a preset time period, wherein the user behavior data set includes multiple behavior event units, each behavior event unit consisting of a user operation type, an operation timestamp, and an associated resource identifier;
[0007] Performing behavior feature extraction processing on the user behavior data set to obtain operation intensity features, time distribution features, and context association features of each behavior event unit;
[0008] Inputting the operation intensity feature, the time distribution feature, and the context association feature into a pre-trained demand forecasting model to generate a resource demand forecast set corresponding to the target user;
[0009] Prioritize each resource demand item in the resource demand forecast set according to its feature weight, and generate a resource allocation optimization strategy;
[0010] Send the resource allocation optimization strategy to the resource scheduling system to trigger the resource preloading operation.
[0011] In another aspect, an embodiment of the present invention further provides an information resource demand prediction system based on user behavior patterns, including a processor and a machine-readable storage medium. The machine-readable storage medium is connected to the processor. The machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0012] Based on the above aspects, the embodiment of the present invention obtains the behavior data set of the target user within a preset time period, extracts behavior characteristics from it, obtains multi-dimensional characteristics such as operation intensity, time distribution, and context association, uses a pre-trained demand prediction model to generate a resource demand prediction set, then prioritizes resource demand items according to feature weights to generate a resource allocation optimization strategy, and finally triggers the resource preloading operation, realizing the full-process intelligent processing from user behavior data to resource allocation, overcoming the defect that the traditional information resource allocation method lacks in-depth analysis of user behavior, significantly improving the accuracy of information resource demand prediction and the rationality of resource allocation, avoiding resource waste and the increase of user waiting time, and enhancing the user experience and the operating efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a schematic execution flow diagram of an information resource demand prediction method based on user behavior patterns provided by an embodiment of the present invention.
[0014] Figure 2 is a schematic diagram of exemplary hardware and software components of an information resource demand prediction system based on user behavior patterns provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0015] The present invention will be specifically described below with reference to the accompanying drawings of the specification. Figure 1 is a schematic flow diagram of an information resource demand prediction method based on user behavior patterns provided by an embodiment of the present invention. The information resource demand prediction method based on user behavior patterns will be introduced in detail below.
[0016] Step S110: Obtain a user behavior data set of a target user within a preset time period. The user behavior data set includes multiple behavior event units, and each behavior event unit consists of a user operation type, an operation timestamp, and an associated resource identifier.
[0017] In this embodiment, the preset time period is set as T, and this preset time period T can be determined according to the requirements of user behavior analysis. The behavior data of the target user in various interaction scenarios is collected. For example, assume that the user is active on a certain interaction platform, and there are multiple types of user operations, which are represented by letters U1, U2, U3, etc. For example, U1 may represent the operation of viewing a certain type of information, and U2 may represent the operation of triggering a specific function, etc. The operation timestamp is represented by t, which records the moment when each operation occurs and is generated based on the precise timing mechanism inside the system. The associated resource identifiers are represented by r1, r2, r3, etc., corresponding to different resources respectively. For example, r1 corresponds to a specific document resource, and r2 corresponds to a certain function module resource, etc. Through the data collection module, in chronological order, each behavior generated by the target user within the period T is recorded in the form of a behavior event unit. Each behavior event unit contains the corresponding user operation type (such as U1, U2, etc.), operation timestamp t, and associated resource identifier (such as r1, r2, etc.). Finally, a user behavior data set D is formed, and the user behavior data set D is composed of multiple such behavior event units arranged in an orderly manner.
[0018] Step S120: Perform behavior feature extraction processing on the user behavior data set to obtain the operation intensity feature, time distribution feature, and context association feature of each behavior event unit.
[0019] Step S121: Perform pattern recognition processing on the user operation types in the behavior event unit to extract the operation frequency feature and operation duration feature.
[0020] In this embodiment, for the operation frequency feature, a counter array C is set. Each element C[i] of the counter array C corresponds to an operation type, and the initial value is set to 0. Traverse each behavior event unit in the user behavior data set D. When the recognized operation type is Uj (j is the index of the corresponding operation type), the value of C[j] is incremented by 1. After the traversal, the value of each element in the counter array C represents the number of times the corresponding operation type appears within the preset time period T. The data set represented by this counter array C is the operation frequency feature F. For example, the value of C[1] represents the number of times the operation type U1 appears, and the value of C[2] represents the number of times the operation type U2 appears, etc.
[0021] For the operation duration feature, when an operation starts, record the operation timestamp at this time as ts (starttime), and when the operation ends, record the operation timestamp as te (endtime). Calculate the duration dt of this operation by computing te - ts. Such calculations are performed for each operation in every behavior event unit. Let the set of operation durations be D_t, and the dt value obtained each time is added to the set D_t in order. The set D_t is the operation duration feature. For example, for the operation in the first behavior event unit, calculate dt1 and add it to D_t; for the operation in the second behavior event unit, calculate dt2 and also add it to D_t, and so on, finally forming the complete set D_t of operation duration features.
[0022] Step S122: Perform time window partitioning on the operation timestamps to generate a time distribution feature, where the time distribution feature includes operation period concentration and operation interval dispersion.
[0023] For example, set time windows of different lengths, represented by time window lengths W1, W2, W3, etc. to indicate different window settings. Extract the operation timestamps t of each behavior event unit from the user behavior data set D. For each time window length Wi, starting from the starting time point on the time axis, partition the time window in sequence. For example, starting from the starting point of the time axis, partition the first window with length Wi, then move the length of Wi to partition the next window until the entire preset time period T is covered.
[0024] For the operation period concentration, within each time window, count the number of behavior event units. Let the number of windows be n, and the number of behavior event units in each window be N1, N2,..., Nn respectively. The operation period concentration is determined by analyzing the distribution of these numbers. For example, calculate the proportion Pi = Ni / total number of behavior event units of the number of behavior event units in each window, and then further analyze these proportions Pi, such as calculating the variance or other statistics of the proportions, to measure the concentration degree of the operation period, and finally obtain the operation period concentration index O_c.
[0025] For the operation interval dispersion, within each time window, calculate the time intervals between adjacent operation timestamps. Let the operation timestamps within the time window be t1, t2,..., tm in sequence, and the time intervals be Δt1 = t2 - t1, Δt2 = t3 - t2,..., Δtm - 1 = tm - tm - 1. Through statistical analysis of these time intervals Δt, such as calculating statistics such as their mean and standard deviation, obtain the operation interval dispersion index O_d. Combining the operation period concentration O_c and the operation interval dispersion O_d forms the time distribution feature T_d.
[0026] Step S123: Perform semantic association analysis on the associated resource identifier to extract context association features, where the context association features include resource type association degree and task scenario association degree.
[0027] Step S1231: Obtain a set of resource metadata corresponding to the associated resource identifier in the historical resource access records, where the set of resource metadata includes a resource type label, a task scenario label, and a usage permission label.
[0028] Suppose a behavior event unit in the set of user behavior data contains the associated resource identifier as r. Search for records corresponding to the associated resource identifier r in the historical resource access record set H. The resource metadata included in these records constitutes the set of resource metadata M, which clearly includes a resource type label for identifying the category to which the resource belongs, such as document type, image type, etc.; a task scenario label for indicating in what task scenario the resource is used, such as office scenario, entertainment scenario, etc.; and a usage permission label for specifying the access permission to the resource, like read-only, read-write, etc. permission categories.
[0029] Step S1232: Perform co-occurrence frequency statistics on the resource type label to generate a resource type association degree, where the resource type association degree represents the type matching degree between the current resource identifier and the types of historically accessed resources.
[0030] There are multiple resource types in the historical resource access records, respectively labeled as T1, T2, T3... Count the number of records in the set H that have the same resource type label as the current associated resource identifier r, denoted as count. At the same time, count the total number of occurrences of each resource type in the set H. Let the total number of occurrences of the resource type Tj be total_j.
[0031] To calculate the resource type association degree, considering that the importance of different resource types may be different, assign an importance weight wj to each resource type Tj. When specifically calculating the resource type association degree R_t, first calculate the ratio of count to total_j, that is, count / total_j, and then multiply it by the corresponding importance weight wj. Perform such calculations for all resource types and sum them up to obtain the resource type association degree R_t = ∑(count / total_j)*wj. This resource type association degree R_t represents the type matching degree between the current resource identifier and the types of historically accessed resources. For example, if the resource type T1 appears more frequently and has a higher importance weight, and the number of records of type T1 matching r accounts for a larger proportion in the total number of records of T1, then this part contributes more to R_t.
[0032] Step S1233: Perform context-dependency analysis on the task scenario tag to generate a task scenario association degree, which represents the necessity score of the current resource identifier in a specific task execution sequence.
[0033] There is a set sequence relationship for task scenarios. Let the task scenario sequence be S1->S2->S3..... Perform context-dependency analysis on the task scenario tag. First, determine that the task scenario tag corresponding to the current associated resource identifier r is S. Analyze the position of S in the task scenario sequence and its association degree with the previous and subsequent scenarios.
[0034] Define an association strength value for the association between each task scenario. For example, the association strength from S1 to S2 is s12, and the association strength from S2 to S3 is s23, etc. By analyzing the flow of resources in the task scenario sequence, determine the interaction frequency and importance of resources between the current task scenario and the previous and subsequent scenarios. Let the interaction frequency of the resource from the previous scenario of S to S be f1, and the interaction frequency from S to the next scenario be f2.
[0035] Calculate the task scenario association degree Rs through the following formula: Rs = f1 * s(previous scenario, S) + f2 * s(S, next scenario), where s(previous scenario, S) represents the association strength from the previous scenario to S, and s(S, next scenario) represents the association strength from S to the next scenario. The obtained task scenario association degree Rs represents the necessity score of the current resource identifier in a specific task execution sequence.
[0036] Step S1234: Perform access rule matching on the usage permission tag to generate a permission adaptation degree score, which represents the degree of compliance between the current user role and the resource access rules.
[0037] Obtain the current user role information and the usage permission tag in the resource metadata set M. Conduct a detailed analysis of the usage permission tag to determine the access rules of the resource, which may include access conditions such as specific user groups, specific operation time limits, etc.; access levels, such as high-level permissions, medium-level permissions, low-level permissions, etc.
[0038] Match the current user role with the resource access rules. In the specific matching process, for each condition in the access rules, check whether the user role meets the requirements. For example, if the access rule requires the user role to belong to a specific user group, check whether the current user role is within the group; if a specific access level is required, compare whether the permission level of the current user role meets the requirements. According to the matching situation, assign corresponding scores to each matching content. For example, a higher score is assigned for successful matching of important access conditions, and a lower score is assigned for successful matching of secondary conditions, etc. Add up the scores of all matching contents to obtain the permission adaptation degree score, which represents the degree of compliance between the current user role and the resource access rules.
[0039] Step S1235: Perform dynamic weight assignment processing on the resource type association degree, the task scenario association degree, and the permission adaptation degree score to generate the context association feature.
[0040] Let the dynamic weights be α, β, and γ respectively, and α + β + γ = 1. The assignment of weights is not determined randomly, but is dynamically adjusted based on the degree of importance of the system for resource type association, task scenario association, and permission adaptation degree in different application scenarios. For example, in some scenarios where strict requirements are imposed on the resource type, the value of α is relatively large; if the task scenario association is more critical in a specific task scenario, the value of β will increase correspondingly; when the system focuses on permission management, the value of γ will be increased.
[0041] Multiply the resource type association degree R_t by α, the task scenario association degree R_s by β, and the permission adaptation degree score by γ, and then splice the results of these three weighted processes to generate the context association feature C_c. For example, C_c = [α * R_t, β * R_s, γ * permission adaptation degree score], where [,] represents the splicing operation. The context association feature C_c generated in this way comprehensively considers the resource type association degree, the task scenario association degree, and the permission adaptation degree score.
[0042] Step S124: Perform weighted splicing on the operation frequency feature and the operation duration feature to generate the operation intensity feature.
[0043] Let the operation frequency feature be F and the operation duration feature be D_t. Weights are assigned to the operation frequency feature F and the operation duration feature D_t, denoted as ω1 and ω2 respectively, and ω1 + ω2 = 1. Multiply each element F[i] in the operation frequency feature F by ω1, multiply each element D_t[j] in the operation duration feature D_t by ω2, and then splice the weighted operation frequency feature elements and operation duration feature elements in a set order. For example, first arrange the weighted operation frequency feature elements in sequence, and then arrange the weighted operation duration feature elements. Finally, the operation intensity feature I_s is generated.
[0044] Step S125: Perform feature embedding mapping on the operation intensity feature, the time distribution feature, and the context association feature respectively, and perform standardized conversion processing after unifying the feature dimensions to generate a set of input feature vectors with matching dimensions.
[0045] For the operation intensity feature I_s:
[0046] Process it using the conventional feature embedding mapping function f1 in related technologies. Assume that the operation intensity feature I_s is originally an n-dimensional vector, denoted as I_s = [i1, i2,..., in]. The feature embedding mapping function f1 is based on a predefined mapping rule. For example, it can be a mapping method based on a neural network, and the neural network structure includes an input layer, a hidden layer, and an output layer. The number of nodes in the input layer is n, corresponding to the n dimensions of the operation intensity feature I_s. The number of nodes in the hidden layer is set to m, and the input layer is connected to the hidden layer through a weight matrix W1 (size n×m), and the bias vector is b1 (length m). The hidden layer uses an activation function g1 (such as the ReLU function) for non-linear transformation, that is, the output of the hidden layer h = g1(W1 * I_s + b1). The number of nodes in the output layer is set to k, and the hidden layer is connected to the output layer through a weight matrix W2 (size m×k), and the bias vector is b2 (length k). Finally, after passing through the output layer, the mapped operation intensity feature I_s' = W2 * h + b2. At this time, I_s' is a k-dimensional vector, realizing the mapping of the operation intensity feature from n dimensions to k dimensions.
[0047] For the time distribution feature T_d:
[0048] The time distribution feature \(T_d\) includes the operation period concentration \(O_c\) and the operation interval divergence \(O_d\), and it is assumed that it can originally be represented as a two-dimensional vector \(T_d = [O_c, O_d]\). The feature embedding mapping function \(f2\) is adopted, also based on a similar neural network structure. The number of nodes in the input layer is 2, corresponding to the two dimensions of \(T_d\). The number of nodes in the hidden layer is set to \(p\), and it is connected to the hidden layer through the weight matrix \(W3\) (size \(2\times p\)) and the bias vector \(b3\) (length \(p\)). The hidden layer is transformed through the activation function \(g2\) (such as the tanh function) to obtain \(h' = g2(W3 * T_d + b3)\). The number of nodes in the output layer is also set to \(k\), and it is connected through the weight matrix \(W4\) (size \(p\times k\)) and the bias vector \(b4\) (length \(k\)) to obtain the mapped time distribution feature \(T_d' = W4 * h' + b4\), mapping the time distribution feature from two dimensions to a \(k\)-dimensional vector.
[0049] For the context correlation feature \(C_c\):
[0050] The context correlation feature \(C_c\) is composed of the resource type correlation degree \(R_t\) and the task scenario correlation degree \(R_s\) spliced together, and it is assumed that it is represented as \(C_c = [R_t, R_s]\). The feature embedding mapping function \(f3\) is adopted. The number of nodes in the input layer is 2, corresponding to the two parts of \(C_c\). The number of nodes in the hidden layer is set to \(q\), and it is connected through the weight matrix \(W5\) (size \(2\times q\)) and the bias vector \(b5\) (length \(q\)). After being transformed through the activation function \(g3\) (such as the Sigmoid function), \(h'' = g3(W5 * C_c + b5)\) is obtained. The number of nodes in the output layer is \(k\), and it is connected through the weight matrix \(W6\) (size \(q\times k\)) and the bias vector \(b6\) (length \(k\)) to obtain the mapped context correlation feature \(C_c' = W6 * h'' + b6\), also mapping the context correlation feature to a \(k\)-dimensional vector.
[0051] After feature embedding mapping, \(I_s'\), \(T_d'\) and \(C_c'\) are all \(k\)-dimensional vectors, but their numerical ranges may be different. In order to unify the feature dimensions and perform standardization transformation processing, first standardize each feature. For each element \(i'\) in the mapped operation intensity feature \(I_s'\), it is standardized through the formula \(i'_{norm}=(i' - mean(I_s')) / std(I_s')\), where \(mean(I_s')\) represents the mean of all elements of \(I_s'\), and \(std(I_s')\) represents the standard deviation of all elements of \(I_s'\). The same standardization processing is also performed on the time distribution feature \(T_d'\) and the context correlation feature \(C_c'\), and the standardized \(T_d''\) and \(C_c''\) are obtained respectively. Finally, the standardized operation intensity feature \(I_s''\), time distribution feature \(T_d''\) and context correlation feature \(C_c''\) are spliced in sequence to generate a dimension-matched input feature vector set \(V = [I_s'', T_d'', C_c'']\).
[0052] Step S130: Input the operation intensity feature, the time distribution feature, and the context association feature into a pre-trained demand prediction model to generate a resource demand prediction set corresponding to the target user.
[0053] Input the set V of input feature vectors with dimension matching generated in step S125 into the pre-trained demand prediction model M.
[0054] Step S131: Input the set of input feature vectors into the temporal attention encoding layer of the pre-trained demand prediction model, and extract the dynamic dependence relationship between user behavior and resource demand within different time windows through a multi-level attention mechanism to generate a temporally enhanced feature representation.
[0055] In the temporal attention encoding layer, first perform multi-dimensional time encoding on the set V of input feature vectors in the chronological order of operation timestamps. Assume that each vector v in the set V of input feature vectors corresponds to an operation timestamp t. Through the multi-dimensional time encoding function h, the operation timestamp t is encoded into a sequence E of dynamic embedding vectors containing time interval weights. The multi-dimensional time encoding function h generates a corresponding dynamic embedding vector e for each vector v according to the time interval between timestamps and a preset weight rule, and these dynamic embedding vectors e are sequentially composed into the sequence E of dynamic embedding vectors.
[0056] Adopt a sliding window segmentation strategy to divide the sequence E of dynamic embedding vectors into multiple time segments. Assume that the sliding window length is L and it slides on the sequence E of dynamic embedding vectors with a step size S. Each segment of embedding vectors intercepted by the sliding window each time constitutes a time segment. For the embedding vectors within each time segment, use a multi-head self-attention mechanism. Assume that the number of heads is K. For each head k (k = 1, 2,..., K), calculate the interaction weight between the operation intensity feature and the time distribution feature under this head through the self-attention calculation function att_k. The self-attention calculation function att_k calculates the interaction weight according to the similarity relationship between embedding vectors. Integrate the interaction weights calculated by each head to generate a local attention matrix A. For example, the interaction weight matrices of each head can be concatenated or weighted to obtain the local attention matrix A.
[0057] Construct a cross-window attention sublayer based on the overlapping regions between time segments. Assume that there are overlapping regions between adjacent time segments, and perform time-dependent modeling on the local attention matrix A of adjacent time segments through a bidirectional gated recurrent unit (GRU). The GRU calculates the time decay factor γ and the context transfer weight β between sliding windows according to the input local attention matrix A and combined with the chronological information. The time decay factor γ is used to adjust the weight allocation ratio of the dependence paths between different time segments, and the context transfer weight β is used to transfer information between different time segments.
[0058] Input the local attention matrix A and the context transfer weight β into the dynamic sparse connection layer. In the dynamic sparse connection layer, a learnable weight mask mechanism is adopted, and the long-term dependence path across sliding windows is selected by combining the time decay factor γ. Let the weight mask matrix be M. Through a learning algorithm, the value of the weight mask matrix M is adjusted according to the time decay factor γ and the local attention matrix A. Only the connections with the corresponding position value of 1 in the weight mask matrix M will be retained, so as to select the long-term dependence path across sliding windows. The selected dependence path is nonlinearly fused through a multi-layer perceptron (MLP) aligned in the time dimension. Let the input of the MLP be the selected dependence path. After multiple nonlinear transformations of the MLP, the fused feature matrix F_m is obtained.
[0059] Perform residual connection and layer normalization on the fused feature matrix F_m in the time dimension. In the residual connection, the local attention matrix A input to the dynamic sparse connection layer is added to the fused feature matrix F_m (here the addition is based on the corresponding addition of matrix elements). Before the addition, the time decay factor γ acts on the time dimension of the feature matrix F_m to achieve dynamic compensation of the cross-window weights. Then the result after addition is subjected to layer normalization. Through the layer normalization function ln, the features of each sample in each layer are normalized, and finally the temporal enhanced feature representation S_e containing multi-granularity time dependence relationships is generated.
[0060] Step S132: Input the temporal enhanced feature representation into the resource matching decoding layer of the demand prediction model, construct a resource candidate set based on the metadata labels of the user's historical accessed resources, and calculate the semantic matching degree and access probability of each candidate resource with the temporal enhanced feature representation.
[0061] Extract resource access trajectories with the same task scenario label as the temporal enhanced feature representation \(S_e\) from the user historical behavior log set \(L\). Assume that the user historical behavior log set \(L\) contains multiple log records, and each log record contains resource access information and the corresponding task scenario label. By filtering the log records, find the records whose task scenario labels are consistent with the task scenario label in \(S_e\). Organize the resource access information in these records into a timestamped resource co-occurrence graph \(G\). The nodes in the resource co-occurrence graph \(G\) represent resource demand items, and the edge weights are calculated as follows: Let the resource type correlation be \(R_t\), the reciprocal of the access time interval be \(1 / \Delta t\), and the task sequence continuity score be \(C_s\). Normalize \(R_t\), \(1 / \Delta t\), and \(C_s\) respectively. Let the normalization function be norm, and obtain the normalized \(R_t' = norm(R_t)\), \((1 / \Delta t)' = norm(1 / \Delta t)\), \(C_s' = norm(C_s)\). Then, perform weighted summation according to the preset ratios \(\theta_1\), \(\theta_2\), \(\theta_3\) (\(\theta_1+\theta_2+\theta_3 = 1\)), that is, the comprehensive edge weight \(W=\theta_1*R_t'+\theta_2*(1 / \Delta t)'+\theta_3*C_s'\) to generate the edge weights of the resource co-occurrence graph \(G\).
[0062] In the resource matching decoding layer, input the temporal enhanced feature representation \(S_e\) into the graph attention network (GAT). In GAT, aggregate the metadata features of adjacent nodes in the resource co-occurrence graph \(G\) through multi-head graph convolution operations. Let the number of heads be \(K\). For each head \(k\) (\(k = 1, 2,\cdots, K\)), perform a convolution operation on the metadata features of the nodes in the resource co-occurrence graph \(G\) through the graph convolution calculation function \(conv_k\). The graph convolution calculation function \(conv_k\) aggregates the features of adjacent nodes according to the connection relationship between nodes and the edge weights. Integrate the results calculated by each head to generate a dynamically updated resource semantic representation vector \(R_sv\). For example, the convolution results of each head can be concatenated or weighted to obtain the resource semantic representation vector \(R_sv\).
[0063] The spatial similarity between the temporal enhanced feature representation \(S_e\) and the resource semantic representation vector \(R_sv\) is calculated using a two-stream matching mechanism. In the first stream, the static semantic matching degree \(M_s\) is calculated through the cosine similarity kernel function \(\cos\_sim\). Let the cosine similarity kernel function \(\cos\_sim\) calculate the similarity based on the cosine value of the angle between vectors. The calculated static semantic matching degree \(M_s\) is calibrated by superimposing the resource type correlation degree \(R_t\), obtaining the calibrated static semantic matching degree \(M_s' = M_s+R_t\). In the second stream, a time-aware Transformer encoder is used to capture the dynamic patterns in the historical access sequence. Let the Transformer encoder contain multiple layers, and each layer performs operations such as multi-head self-attention calculation and feed-forward neural network calculation. The historical access sequence is processed by the Transformer encoder to generate the access probability prediction value \(P_p\) based on time decay. Let the Transformer encoder generate a numerical value representing the access probability according to the chronological information and the characteristics of the historically accessed resources.
[0064] The calibrated static semantic matching degree \(M_s'\) and the access probability prediction value \(P_p\) are respectively normalized. Let the normalization function be \(norm\), obtaining the normalized \(M_s'' = norm(M_s')\) and \(P_p' = norm(P_p)\). The normalized \(M_s''\) and \(P_p'\) are input into the gated fusion module. In the gated fusion module, the dynamic weight coefficient \(\delta=\sigma(M_s'' + P_p')\) is generated through the sigmoid function \(\sigma\). The weighted sum of the normalized static semantic matching degree \(M_s''\) and the access probability prediction value \(P_p'\) is calculated according to the dynamic weight coefficient \(\delta\), obtaining the weighted comprehensive matching degree \(M_c=\delta*M_s''+(1 - \delta)*P_p'\).
[0065] Topological pruning is performed on the resource co-occurrence graph \(G\) based on the weighted comprehensive matching degree \(M_c\). Let the adaptive threshold be \(T_a\). By comparing the comprehensive matching degree \(M_c\) with the adaptive threshold \(T_a\), the nodes with a matching degree higher than the adaptive threshold \(T_a\) are retained to form a connected subgraph. The metadata labels of the nodes in the connected subgraph are mapped to generate the resource demand prediction set \(R_p\). For example, the metadata labels such as the resource type label and task scenario label corresponding to each node in the connected subgraph are organized into a set as the resource demand prediction set \(R_p\).
[0066] Step S133: Sort and filter the resource candidate set according to the semantic matching degree and the access probability, retain the resource demand items with a semantic matching degree higher than the first preset threshold and the access probability greater than the second preset threshold, and label the feature weights according to the semantic matching degree and the access probability to generate the resource demand prediction set.
[0067] Let the first preset threshold be T1 and the second preset threshold be T2. For each resource requirement item in the resource candidate set, record its corresponding semantic matching degree as M and the access probability as P. For all resource requirement items in the resource candidate set, perform the following operations in sequence:
[0068] First, compare the semantic matching degree M of each resource requirement item with the first preset threshold T1, and at the same time compare its access probability P with the second preset threshold T2. Only when M is greater than T1 and P is greater than T2 will this resource requirement item be retained; if this condition is not met, this resource requirement item will be filtered out from the resource candidate set.
[0069] For the retained resource requirement items, label their feature weights. Suppose the labeling method of feature weights is calculated based on the semantic matching degree M and the access probability P. Here, a calculation logic is defined. Assume there are two weight coefficients α and β, and α + β = 1. The feature weight W is calculated by the formula W = α * M + β * P, where the values of α and β are determined according to specific system requirements and the degree of emphasis on the semantic matching degree and the access probability. For example, if the system attaches more importance to the impact of the semantic matching degree on resource requirement prediction, the value of α is relatively large; on the contrary, if more importance is attached to the access probability, the value of β is relatively large. Through such calculations, a feature weight W is determined for each retained resource requirement item.
[0070] Collate all the retained resource requirement items with labeled feature weights together to generate a resource requirement prediction set R. Each element in this resource requirement prediction set R contains the relevant information of the resource requirement item and the corresponding feature weight.
[0071] Step S134: Verify the association consistency between the metadata type of each resource requirement item in the resource requirement prediction set and the resource type in the historical operation sequence of the target user, specifically including: check whether the type label of the current resource requirement item appears in the set of resource types accessed by the user historically, and the matching degree between its task scenario label and the scenario label in the user's recent operation sequence exceeds a preset ratio threshold. If the verification passes, retain the resource requirement item; otherwise, exclude it from the resource requirement prediction set.
[0072] Let the set of resource types corresponding to the historical operation sequence of the target user be HRT, and the set of scenario labels in the user's recent operation sequence be HST. For each resource requirement item r in the resource requirement prediction set R, first obtain the type label TL_r and the task scenario label TS_r of this resource requirement item r.
[0073] Check whether the check type tag TL_r exists in the historical access resource type set HRT. If TL_r is not in HRT, then directly remove the resource requirement item r from the resource requirement prediction set R.
[0074] If TL_r is in HRT, then calculate the matching degree between the task scenario tag TS_r and the scenario tag set HST in the user's recent operation sequence. Here, a matching degree calculation method is defined. Assume that there is a similarity measurement method between scenario tags, such as calculating based on semantic similarity or other relevant rules. Let the matching degree be MD. Calculate the similarity value between TS_r and each scenario tag in HST, and then obtain the total matching degree MD through the conventional aggregation method of related technologies (such as averaging or weighted averaging, etc.).
[0075] Let the preset ratio threshold be TP. Compare the calculated matching degree MD with the preset ratio threshold TP. If MD is greater than TP, the verification passes, and the resource requirement item r is retained in the resource requirement prediction set R; if MD is less than or equal to TP, the resource requirement item r is removed from the resource requirement prediction set R. After this series of operations, the final verified resource requirement prediction set R' is obtained. The resource requirement items in this resource requirement prediction set R' have a high association consistency in the metadata type and the resource type in the target user's historical operation sequence.
[0076] Step S140: Perform priority sorting processing according to the feature weights of each resource requirement item in the resource requirement prediction set to generate a resource allocation optimization strategy.
[0077] Step S141: Perform a demand urgency evaluation process on each resource requirement item to generate an urgency score, and the urgency score is determined based on the proximity of the operation timestamp and the task deadline.
[0078] Let each resource requirement item in the resource requirement prediction set R' be ri. For each ri, obtain its operation timestamp ti and the task deadline DLi.
[0079] First, look at the proximity of the operation timestamp. Set the current time as TC, and calculate the time difference Δt = TC - ti. To convert Δt into a dimensionless value N1 that can reflect the proximity degree, construct a time-scale mapping function f. Considering the system's sensitivity to recent operations, use a piecewise linear function to implement f. Set two key time points T1 and T2 (T1 < T2). When Δt <= T1, N1 = a1 * Δt + b1, where a1 and b1 are coefficients. a1 is determined according to the system's emphasis on extremely recent operations, and b1 is used to adjust the value range so that within this time period, N1 can increase rapidly to highlight the urgency of extremely recent operations; when T1 < Δt <= T2, N1 = a2 * Δt + b2, where a2 and b2 are another set of coefficients. a2 is relatively smaller than a1, reflecting that as the time interval increases, the growth rate of urgency slows down; when Δt > T2, N1 = c, where c is a constant, indicating that after exceeding the set time interval, the urgency of the operation tends to a stable lower value.
[0080] For the task deadline DLi, construct a task deadline evaluation function g. Analyze the historical data of various tasks in the system, and statistically analyze the influence degree of different task types on the system resource allocation when approaching the deadline. Assume that tasks are divided into multiple types such as A, B, C, etc., and each type corresponds to different influence weights wA, wB, wC, etc. First, determine the task type to which the resource requirement item ri belongs. Assume it is type j with a weight of wj. Then calculate the remaining time ratio p = (DLi - TC) / DLi (when TC > DLi, p is regarded as 0). Calculate the dimensionless value N2 through the formula g(DLi) = wj * (1 - p). In this way, N2 can reflect the urgency degree of the task deadline. The less the remaining time, the larger the value of N2.
[0081] Set two weight coefficients γ1 and γ2, and γ1 + γ2 = 1. Determine the values of γ1 and γ2 through a large amount of data analysis of historical resource requirements and task execution situations. For example, after analysis, it is found that the influence proportion of the proximity of the operation timestamp on the urgency of resource requirements is 60%, then γ1 = 0.6 and γ2 = 0.4. The urgency score S1 is calculated through the formula S1 = γ1 * N1 + γ2 * N2, so as to obtain a reasonable urgency score S1 that reflects the urgency degree of each resource requirement item ri.
[0082] Step S142: Perform resource utility evaluation processing on each resource requirement item to generate a utility value score, and the utility value score is determined based on the criticality of the resource type and the dependence of the task scenario.
[0083] Let each resource requirement item in the resource requirement prediction set R' be ri, determine its resource type as RTi, and the task scenario as TSi.
[0084] For the criticality of resource types, establish an evaluation system for the criticality degree of resource types. Collect a large amount of historical task data and count the usage frequency of each resource type in different tasks. Let the number of times resource type RTi is used in a task set with a total number of tasks Nt be Ui. At the same time, for each task, according to factors such as the benefits generated after the task is completed and the contribution to the overall system goal, assign a contribution weight Ci to resource type RTi. For example, for a task that improves the performance of the core function of the system, if resource type RTi plays a key role in completing this task, the value of Ci is relatively large; for an auxiliary task, the value of Ci is relatively small. Calculate the criticality value KV of resource type RTi through the formula KV = Ui * Ci / Nt to reflect the criticality degree of the resource type in the overall task.
[0085] For the dependence on task scenarios, construct a task scenario dependence evaluation system. Analyze the association relationship between the resource requirement item ri in task scenario TSi and other resources. Count the number of interactions Ii between resource ri and other resources in task scenario TSi, and assign different weights according to the importance of each interaction to task progress. Let the sum of these weights be Wi. At the same time, evaluate the degree of obstruction Hi to task progress when resource ri is missing. Hi is quantified by analyzing factors such as link interruption and time delay caused by the lack of ri in the task process. Calculate the dependence degree value DV through the formula DV = Ii * Wi * Hi to reflect the dependence degree of the resource in a specific task scenario.
[0086] Set weight coefficients δ1 and δ2, and δ1 + δ2 = 1. Determine the values of δ1 and δ2 according to the different emphases of the system on the criticality of resource types and the dependence on task scenarios in different business scenarios. For example, in some core business scenarios, the criticality of resource types is more important, δ1 can be set to 0.7 and δ2 to 0.3. The utility value score S2 is calculated through the formula S2 = δ1 * KV + δ2 * DV to obtain the utility value score S2 that reflects the value of each resource requirement item ri in terms of resource utility.
[0087] Step S143: Perform an access cost evaluation process on each resource requirement item to generate a cost consumption score, and the cost consumption score includes calculating the resource occupancy rate and network transmission overhead.
[0088] Let each resource requirement item in the resource demand prediction set R' be ri.
[0089] In terms of calculating the resource occupancy rate, for the resource occupancy rate, assume that the computing resource is measured by CPU core time. Let the CPU core time occupied by resource requirement item ri within a period of time T be CRi, and the total available CPU core time of the system within the same period of time T be TCR. Calculate the resource occupancy rate CRo = CRi / TCR.
[0090] For the storage resource occupancy rate, assume that the storage resources are measured by the storage space. Let the storage space size occupied by the resource requirement item ri be SRi, and the total available storage space of the system be TSR. The storage resource occupancy rate SRo = SRi / TSR.
[0091] Calculate the comprehensive computing resource occupancy rate CRo and the storage resource occupancy rate SRo to obtain the comprehensive resource occupancy rate Ro. Let the weight coefficients be ε1 and ε2, and ε1 + ε2 = 1. Determine ε1 and ε2 according to the demand ratio of computing resources and storage resources for the current business of the system. For example, if there are more computing-intensive tasks in the current business, ε1 can be set to 0.7 and ε2 to 0.3. Calculate the comprehensive resource occupancy rate Ro through the formula Ro = ε1 * CRo + ε2 * SRo.
[0092] For the network transmission overhead, let the network data traffic generated by each transmission of the resource requirement item ri be DFi, and the number of transmissions within a period of time be Ni. The total network transmission overhead TO = DFi * Ni.
[0093] Construct a cost conversion function h, considering factors such as the network bandwidth leasing cost and the cost related to the transmission distance between the data center and users. Assume that the unit cost of network bandwidth leasing is C1, the unit cost related to the transmission distance is C2, and the transmission distance is d. Convert the comprehensive resource occupancy rate Ro and the total network transmission overhead TO into a cost consumption score S3 with a unified dimension through the formula h(Ro, TO) = Ro * C1 * d + TO * C2, so as to obtain a cost consumption score S3 that can reflect the access cost for each resource requirement item ri.
[0094] Step S144: Normalize the urgency score, utility value score, and cost consumption score respectively, combine the characteristic weights of each resource requirement item, use a weighted scoring algorithm to generate a comprehensive priority score, and sort the resource demand prediction set according to the comprehensive priority score to generate a resource allocation optimization strategy including priority tags.
[0095] Let the set of urgency score be S1_set, the set of utility value score be S2_set, and the set of cost consumption score be S3_set. For each urgency score S1i in the set of urgency score S1_set, through the normalization function norm1, it is converted into the normalized urgency score NS1i = norm1(S1i). Similarly, for each utility value score S2i in the set of utility value score S2_set, through the normalization function norm2, it is converted into the normalized utility value score NS2i = norm2(S2i); for each cost consumption score S3i in the set of cost consumption score S3_set, through the normalization function norm3, it is converted into the normalized cost consumption score NS3i = norm3(S3i).
[0096] Let the feature weight of each resource requirement item ri in the resource requirement prediction set R' be Wi. Using the weighted scoring algorithm, assume there are three weight coefficients ζ1, ζ2, ζ3, and ζ1 + ζ2 + ζ3 = 1. The comprehensive priority score PSi is calculated by the formula PSi = ζ1 * NS1i * Wi + ζ2 * NS2i * Wi + ζ3 * NS3i * Wi. Here, the values of ζ1, ζ2, ζ3 are determined according to the degree of importance of the system for the urgency score, utility value score, and cost consumption score.
[0097] According to the calculated comprehensive priority score PSi, sort the resource requirement items in the resource requirement prediction set R'. Common sorting algorithms can be used, such as bubble sort, quick sort, etc. Assign priority labels to the sorted resource requirement items in turn, and mark them from high priority to low priority, generating a resource allocation optimization strategy PAS containing priority labels. This resource allocation optimization strategy PAS will guide the subsequent resource preloading operation, enabling resources to be allocated according to reasonable priorities.
[0098] Step S150: Send the resource allocation optimization strategy to the resource scheduling system to trigger the resource preloading operation.
[0099] Step S151: Arrange the preloading order of the resource requirement items according to the priority labels, generating a resource scheduling queue distributed in descending order of priority.
[0100] Let the resource allocation optimization strategy containing priority tags be PAS. Extract each resource requirement item and its corresponding priority tag from PAS. Arrange all resource requirement items in descending order of priority tags. Assume a sorting algorithm, such as a variant of the bubble sort algorithm, is used to compare and swap resource requirement items. For two resource requirement items ri and rj, if the priority tag of ri is higher than that of rj, the order remains unchanged; if the priority tag of ri is lower than that of rj, the positions of ri and rj are swapped. After a series of comparison and swap operations, a resource scheduling queue RSQ distributed in descending order of priority is generated. The resource requirement items in this queue RSQ will perform subsequent resource preloading operations in order of priority from high to low.
[0101] Step S152: For each resource requirement item in the resource scheduling queue, determine the resource parameters required for preloading based on its associated resource type.
[0102] Let each resource requirement item in the resource scheduling queue RSQ be ri. For each ri, determine the resource parameters required for preloading according to its associated resource type RTi. Different resource types RTi correspond to different resource parameter requirements. For example, if the resource type RTi is related to computing resources, then parameters such as the required number of computing cores and memory size may need to be determined. Let the required number of computing cores be CCi and the memory size be Mi; if the resource type RTi is related to storage resources, the required storage space size Si may need to be determined; if it is related to network resources, the required network bandwidth Bi, etc. may need to be determined. Through the analysis of the resource type RTi and relevant configuration information, a set of resource parameters RP_i = {CCi, Mi, Si, Bi,...} required for preloading is determined for each resource requirement item ri. These resource parameters will provide a specific basis for the subsequent resource preloading operation of the resource scheduling system.
[0103] Step S153: After unit normalization of the resource parameters to the computing resource unit, storage unit, and network bandwidth unit defined by the resource scheduling system interface, perform protocol format conversion processing with the corresponding priority tags to generate a multi-dimensional scheduling instruction set that conforms to the resource scheduling system interface standard.
[0104] Let the set of resource parameters of the resource requirement item ri be RP_i = {CCi, Mi, Si, Bi, …}. For the number of computing cores CCi, if its original unit is inconsistent with the computing resource unit defined by the resource scheduling system interface, through the unit conversion function uc1, it is converted into a value NCCi = uc1(CCi) in the computing resource unit defined by the resource scheduling system interface; for the memory size Mi, if its original unit is inconsistent with the storage unit defined by the resource scheduling system interface, through the unit conversion function uc2, it is converted into a value NMi = uc2(Mi) in the storage unit defined by the resource scheduling system interface; for the storage space size Si, through the unit conversion function uc3, it is converted into a value NSi = uc3(Si) in the storage unit defined by the resource scheduling system interface; for the network bandwidth Bi, through the unit conversion function uc4, it is converted into a value NBi = uc4(Bi) in the network bandwidth unit defined by the resource scheduling system interface. After unit standardization processing, the standardized set of resource parameters NRP_i = {NCCi, NMi, NSi, NBi, …} is obtained.
[0105] Perform protocol format conversion processing on the standardized set of resource parameters NRP_i and the corresponding priority label PLi. Assume there is a protocol format conversion function pf, and through this function, NRP_i and PLi are converted into a multi-dimensional scheduling instruction set DSI_i = pf(NRP_i, PLi) that conforms to the resource scheduling system interface standard. For each resource requirement item in the resource scheduling queue RSQ, such unit standardization processing and protocol format conversion processing are performed, and finally a multi-dimensional scheduling instruction set DSI that conforms to the resource scheduling system interface standard is generated, and this multi-dimensional scheduling instruction set DSI will be correctly recognized and executed by the resource scheduling system.
[0106] Step S154: According to the arrangement order of the resource scheduling queue, batch-send the multi-dimensional scheduling instruction set to the resource scheduling system, triggering the resource scheduling system to perform a resource preloading operation according to the multi-dimensional scheduling instruction set.
[0107] Set up a resource scheduling queue RSQ and a multi-dimensional scheduling instruction set DSI. First, determine the rule for batch sending. Assume that according to factors such as the processing capacity of the resource scheduling system and network transmission conditions, the number of resource requirement items sent in each batch is set to B. Starting from the head of the resource scheduling queue RSQ, sequentially retrieve the multi-dimensional scheduling instruction sets corresponding to B resource requirement items. For example, for the first time, retrieve DSI_1 to DSI_B, and send this batch of multi-dimensional scheduling instruction sets to the resource scheduling system. After receiving this batch of instruction sets, the resource scheduling system starts to perform resource preloading operations according to the resource parameters and priority tags in the instruction sets. For each instruction set DSI_i, the resource scheduling system allocates corresponding resources for preloading according to the resource parameters therein, such as the number of computing cores NCCi, memory size NMi, storage space size NSi, network bandwidth NBi, etc. After completing the first batch of resource preloading operations, retrieve the next batch of multi-dimensional scheduling instruction sets corresponding to B resource requirement items from the resource scheduling queue RSQ, and repeat the above process until all the multi-dimensional scheduling instruction sets corresponding to the resource requirement items in the resource scheduling queue RSQ are sent to the resource scheduling system and the resource preloading operations are completed. By such a batch sending method, ensure that the resource scheduling system can perform resource preloading operations stably and efficiently, and meet the demand prediction of target users for resources.
[0108] Step S210: A training method for a demand prediction model, including:
[0109] Step S211: Obtain a training input vector set containing sample operation intensity features, sample time distribution features, and sample context association features after standardized transformation processing, and perform one-hot encoding on the sample resource access annotation set to generate a true demand label vector.
[0110] Assume that the sample data set contains multiple samples. For each sample, first obtain its operation intensity feature, time distribution feature, and context association feature. Perform standardized transformation processing on these operation intensity features, time distribution features, and context association features, which is the same as the standardized transformation processing method for operation intensity features, time distribution features, and context association features in the previous step S125. Assume that the standardized sample operation intensity feature is SSI, the sample time distribution feature is STD, and the sample context association feature is SCC. Combine these standardized features into a training input vector set TV, that is, TV = {SSI, STD, SCC}.
[0111] For the sample resource access annotation set, assume that the sample resource access annotation set contains multiple sample resource access annotation items. Process it using one-hot encoding. Let the number of categories of the sample resource access annotation item be C. For each sample resource access annotation item, create a vector of length C, set the value at the category position corresponding to the sample resource access annotation item to 1, and set the values at the remaining positions to 0. For example, if a sample resource access annotation item belongs to the k-th category, the k-th element in the created vector is 1, and the other elements are 0. In this way, perform one-hot encoding on each annotation item in the sample resource access annotation set to generate the real demand label vector RL.
[0112] Step S212: Construct an initial demand prediction model, and the initial demand prediction model includes a temporal attention encoding layer and a resource matching decoding layer.
[0113] Initialize the demand prediction model M0. The model M0 contains two main layers, namely the temporal attention encoding layer TAC and the resource matching decoding layer RMD. The temporal attention encoding layer TAC is used to perform temporal-related processing on the input feature vector, extract the dynamic dependencies between user behaviors and resource requirements within different time windows, and it includes operation modules such as multi-dimensional time encoding, sliding window segmentation, multi-head self-attention mechanism, cross-window attention sub-layer, dynamic sparse connection layer, and residual connection and layer normalization as described in the previous step S131. The resource matching decoding layer RMD is used to perform operations related to resource matching and demand prediction according to the temporal enhanced feature representation output by the temporal attention encoding layer TAC. It includes relevant modules and operation processes such as constructing a resource candidate set, calculating semantic matching degrees, and access probabilities as described in the previous step S132. In terms of constructing the resource candidate set, starting from the metadata labels of the sample historical accessed resources, in a similar way as described above, based on information such as the task scenario labels of the sample, filter out relevant resources to form a candidate set. When calculating the semantic matching degrees and access probabilities, the two-stream matching mechanism is also adopted. From data such as the resource co-occurrence graph of the sample, through components such as graph attention network, cosine similarity kernel function, and time-aware Transformer encoder, calculate the static semantic matching degree and the access probability prediction value based on time decay respectively, and obtain the comprehensive matching degree through operations such as normalization and gated fusion to determine the sample resource demand prediction. When initializing the model, the parameters of each layer are set to initial values. For example, various weight matrices, bias vectors, etc. in the temporal attention encoding layer, and relevant parameters in the resource matching decoding layer are assigned according to the set initialization strategy, such as random initialization or initialization method based on prior knowledge, to ensure that the model has a reasonable starting state at the beginning of training.
[0114] Step S213: Input the training input vector set into the temporal attention encoding layer, and extract the sample temporal enhanced feature representation through a multi-level attention mechanism.
[0115] Input the training input vector set TV into the temporal attention encoding layer TAC. First, perform multi-dimensional time encoding on the operation intensity feature, time distribution feature, and context association feature in the training input vector set TV in the time order of the operation timestamps. Similar to the description in the previous step S131, assume that each training input vector v corresponds to an operation timestamp t. Through the multi-dimensional time encoding function h, encode the operation timestamp t into a dynamic embedding vector sequence E containing time interval weights. The function h generates the corresponding dynamic embedding vector e for each vector v according to the time interval between timestamps and the preset weight rule, and these dynamic embedding vectors e are sequentially composed into the dynamic embedding vector sequence E.
[0116] Next, adopt a sliding window segmentation strategy to divide the dynamic embedding vector sequence E into multiple time segments. Assume that the sliding window length is L and it slides on the dynamic embedding vector sequence E with a step size of S. Each segment of the embedding vector intercepted by the sliding window each time constitutes a time segment. For the embedding vectors within each time segment, adopt a multi-head self-attention mechanism. Assume that the number of heads is K. For each head k (k = 1, 2,..., K), calculate the interaction weight between the operation intensity feature and the time distribution feature under this head through the self-attention calculation function att_k. The self-attention calculation function att_k calculates the interaction weight according to the similarity relationship between the embedding vectors. Integrate the interaction weights calculated by each head to generate a local attention matrix A. For example, the interaction weight matrices of each head can be concatenated or weighted calculated to obtain the local attention matrix A.
[0117] Then, construct a cross-window attention sublayer based on the overlapping regions between time segments. Assume that there are overlapping regions between adjacent time segments. Perform time-dependency modeling on the local attention matrix A of adjacent time segments through a bidirectional gated recurrent unit (GRU). The GRU calculates the time decay factor γ and the context transfer weight β between the sliding windows according to the input local attention matrix A and in combination with the time order information. The time decay factor γ is used to adjust the weight allocation ratio of the dependence paths between different time segments, and the context transfer weight β is used to transfer information between different time segments.
[0118] After that, the local attention matrix A and the context transfer weight β are input into the dynamic sparse connection layer. In the dynamic sparse connection layer, a learnable weight mask mechanism is adopted, and the long-term dependence path across the sliding window is selected by combining the time decay factor γ. Let the weight mask matrix be M. Through a learning algorithm, the value of the weight mask matrix M is adjusted according to the time decay factor γ and the local attention matrix A. Only the connections with the corresponding position value of 1 in the weight mask matrix M will be retained, so as to select the long-term dependence path across the sliding window. The selected dependence path is non-linearly fused through a multi-layer perceptron (MLP) aligned in the time dimension. Let the input of the MLP be the selected dependence path. After multiple non-linear transformations of the MLP, the fused feature matrix F_m is obtained.
[0119] Finally, residual connection and layer normalization processing are performed on the fused feature matrix F_m in the time dimension. In the residual connection, the local attention matrix A input into the dynamic sparse connection layer is added to the fused feature matrix F_m (here the addition is based on the corresponding addition of matrix elements). Before the addition, the time decay factor γ acts on the time dimension of the feature matrix F_m to achieve dynamic compensation of the cross-window weights. Then, layer normalization processing is performed on the result of the addition. Through the layer normalization function ln, the features of each sample in each layer are normalized, and finally the sample time series enhanced feature representation S_e containing multi-granularity time dependence relationships is generated.
[0120] Step S214: Input the sample time series enhanced feature representation into the resource matching decoding layer, construct a sample candidate resource set based on the metadata labels of the resources accessed by the sample history, and calculate the semantic matching degree and access probability between each sample candidate resource and the sample time series enhanced feature representation.
[0121] Input the sample temporal enhanced feature representation \(S_e\) into the resource matching decoding layer \(RMD\). Extract the resource access trajectories with the same task scenario label as the sample temporal enhanced feature representation \(S_e\) from the sample historical behavior log set \(L_s\). Assume that the sample historical behavior log set \(L_s\) contains multiple log records, and each log record contains resource access information and the corresponding task scenario label. By screening the log records, find the records whose task scenario labels are consistent with the task scenario label in \(S_e\). Organize the resource access information in these records into a timestamped sample resource co-occurrence graph \(G_s\). The nodes in the sample resource co-occurrence graph \(G_s\) represent sample resource requirement items, and the edge weights are calculated as follows: Let the resource type association degree be \(R_t\), the reciprocal of the access time interval be \(1 / \Delta t\), and the task sequence continuity score be \(C_s\). Normalize \(R_t\), \(1 / \Delta t\), and \(C_s\) respectively. Assume the normalization function is \(norm\), and obtain the normalized \(R_t' = norm(R_t)\), \((1 / \Delta t)' = norm(1 / \Delta t)\), \(C_s' = norm(C_s)\). Then, perform weighted summation according to the preset ratios \(\theta_1\), \(\theta_2\), \(\theta_3\) (\(\theta_1+\theta_2+\theta_3 = 1\)), that is, the comprehensive edge weight \(W=\theta_1*R_t'+\theta_2*(1 / \Delta t)'+\theta_3*C_s'\), to generate the edge weights of the sample resource co-occurrence graph \(G_s\).
[0122] In the resource matching decoding layer \(RMD\), input the sample temporal enhanced feature representation \(S_e\) into the graph attention network (\(GAT\)). In \(GAT\), aggregate the metadata features of adjacent nodes in the sample resource co-occurrence graph \(G_s\) through multi-head graph convolution operations. Assume the number of heads is \(K\). For each head \(k\) (\(k = 1, 2,\cdots, K\)), perform a convolution operation on the metadata features of the nodes in the sample resource co-occurrence graph \(G_s\) through the graph convolution calculation function \(conv_k\). The graph convolution calculation function \(conv_k\) aggregates the features of adjacent nodes according to the connection relationship between nodes and the edge weights. Integrate the results calculated by each head to generate a dynamically updated sample resource semantic representation vector \(R_sv\). For example, the convolution results of each head can be concatenated or weighted to obtain the sample resource semantic representation vector \(R_sv\).
[0123] The spatial similarity between the sample temporal enhanced feature representation \(S_e\) and the sample resource semantic representation vector \(R_sv\) is calculated using a two-stream matching mechanism. In the first stream, the static semantic matching degree \(M_s\) is calculated through the cosine similarity kernel function \(\cos\_sim\). Let the cosine similarity kernel function \(\cos\_sim\) calculate the similarity based on the cosine value of the angle between vectors. The calculated static semantic matching degree \(M_s\) is calibrated by superimposing the resource type correlation degree \(R_t\), and the calibrated static semantic matching degree \(M_s' = M_s+R_t\) is obtained. In the second stream, a time-aware Transformer encoder is used to capture the dynamic patterns in the historical access sequence. Let the Transformer encoder contain multiple layers, and each layer performs operations such as multi-head self-attention calculation and feed-forward neural network calculation. The historical access sequence is processed by the Transformer encoder to generate an access probability prediction value \(P_p\) based on time decay. Let the Transformer encoder generate a numerical value representing the access probability according to the chronological information and the features of the historical accessed resources.
[0124] The calibrated static semantic matching degree \(M_s'\) and the access probability prediction value \(P_p\) are respectively normalized. Let the normalization function be \(norm\), and the normalized \(M_s'' = norm(M_s')\), \(P_p' = norm(P_p)\) are obtained. The normalized \(M_s''\) and \(P_p'\) are input into the gated fusion module. In the gated fusion module, the dynamic weight coefficient \(\delta=\sigma(M_s'' + P_p')\) is generated through the sigmoid function \(\sigma\). The weighted sum of the normalized static semantic matching degree \(M_s''\) and the access probability prediction value \(P_p'\) is calculated according to the dynamic weight coefficient \(\delta\), and the weighted comprehensive matching degree \(M_c=\delta*M_s''+(1 - \delta)*P_p'\) is obtained.
[0125] Step S215: Generate a sample resource demand prediction set according to the semantic matching degree and the access probability, and compare the sample resource demand prediction set with the true demand label vector to calculate the loss function value.
[0126] Based on the weighted comprehensive matching degree \(M_c\), topological pruning is performed on the sample resource co-occurrence graph \(G_s\). Let the adaptive threshold be \(T_a\). By comparing the comprehensive matching degree \(M_c\) with the adaptive threshold \(T_a\), the nodes with a matching degree higher than the adaptive threshold \(T_a\) are retained to form a connected subgraph. The metadata labels of the nodes in the connected subgraph are mapped to generate a sample resource demand prediction set \(R_p\). For example, the resource type labels, task scenario labels and other metadata labels corresponding to each node in the connected subgraph are sorted into a set as the sample resource demand prediction set \(R_p\).
[0127] Compare the sample resource demand prediction set \(R_p\) with the true demand label vector \(RL\) to calculate the loss function value. Let the loss function be \(L\), and its calculation method is based on the difference between the sample resource demand prediction set \(R_p\) and the true demand label vector \(RL\). For example, common loss function forms such as cross-entropy loss function or mean squared error loss function can be adopted. Assume that the cross-entropy loss function is used. For each prediction result \(r_{pi}\) in the sample resource demand prediction set \(R_p\) and the corresponding true value \(r_{li}\) in the true demand label vector \(RL\), calculate the loss value of each sample through the set calculation rule (such as \(-\sum(r_{li}*\log(r_{pi}))\), where \(\log\) is the logarithmic function, and the specific calculation rule is based on the definition of the cross-entropy loss function), and then perform operations such as summing or averaging the loss values of all samples (for example, calculating the average value. Let the number of samples be \(n\), and the loss function value \(L = \sum(-\sum(r_{li}*\log(r_{pi}))) / n\)) to obtain the final loss function value \(L\). This loss function value \(L\) reflects the degree of difference between the sample resource demand prediction set \(R_p\) and the true demand label vector \(RL\), and is used for subsequent adjustment of the model parameters.
[0128] Step S216: Based on the loss function value, update the model parameters of the temporal attention encoding layer and the resource matching decoding layer through the backpropagation algorithm, so that the coverage overlap degree between the sample resource demand prediction set and the true demand label vector reaches a preset threshold, and after the association consistency between the metadata type of each resource demand item in the sample resource demand prediction set and the resource type in the true demand label vector is verified, generate the trained demand prediction model.
[0129] Use the backpropagation algorithm to update the model parameters of the temporal attention encoding layer \(TAC\) and the resource matching decoding layer \(RMD\). The backpropagation algorithm is based on the loss function value \(L\), and determines how to adjust the model parameters to reduce the loss function value by calculating the gradient of the loss function with respect to the model parameters. Specifically, starting from the loss function value \(L\), reverse-derive according to the calculation process of the model, and calculate the gradient of the loss function with respect to the output and parameters of each layer. For example, for the parameters in the resource matching decoding layer \(RMD\), such as the weight matrix and bias vector, calculate the gradient of the loss function with respect to them, denoted as \(grad\_RMD\); for the parameters in the temporal attention encoding layer \(TAC\), also calculate the gradient of the loss function with respect to them, denoted as \(grad\_TAC\).
[0130] According to the calculated gradients, an optimization algorithm (such as Stochastic Gradient Descent algorithm, Adam optimization algorithm, etc.) is used to update the model parameters. Taking the Stochastic Gradient Descent algorithm as an example, let the learning rate be η. For each parameter p_TAC in the Temporal Attention Coding layer (TAC), the update formula is p_TAC = p_TAC - η * grad_TAC; for each parameter p_RMD in the Resource Matching Decoding layer (RMD), the update formula is p_RMD = p_RMD - η * grad_RMD. By continuously repeating this process, that is, continuously calculating the loss function value, backpropagating to calculate the gradients, and updating the model parameters, the coverage overlap degree between the sample resource demand prediction set R_p and the true demand label vector RL gradually increases.
[0131] After each update of the model parameters, check whether the coverage overlap degree between the sample resource demand prediction set R_p and the true demand label vector RL reaches the preset threshold, and at the same time verify the association consistency between the metadata type of each resource demand item in the sample resource demand prediction set R_p and the resource type in the true demand label vector RL. The way of verifying the association consistency is similar to that described in the previous step S134, that is, check whether the type label of the current sample resource demand item appears in the set of historical accessed resource types corresponding to the true demand label vector RL, and the matching degree between its task scenario label and the scenario label in the corresponding recent operation sequence in the true demand label vector RL exceeds the preset ratio threshold. If the coverage overlap degree reaches the preset threshold and the association consistency verification passes, it is considered that the model training is completed, and a trained demand prediction model M is generated. Otherwise, continue to repeat the above training process until the conditions are met. Through such a training process, the demand prediction model can accurately predict the user's resource demands based on the input user behavior characteristics, providing reliable model support for subsequent resource demand prediction and allocation.
[0132] Based on the above embodiments, the method may further include:
[0133] Step S160: Generate a dynamic user profile of the target user through behavior pattern clustering and task scenario classification based on the user behavior data set and historical access records.
[0134] Step S170: Associate and match the dynamic user profile with the resource demand prediction set, and generate a personalized resource priority mapping table to correct the resource allocation optimization strategy by strengthening the resource type weights related to the user interest vector in the context association features.
[0135] It should be noted that in the above embodiments, throughout the process of data collection, model training, and application, laws, regulations, and ethical guidelines are always strictly followed, and any situation that violates the law, goes against fairness and justice, or has discrimination and prejudice is prohibited.
[0136] In the data collection phase, ensure that the set of user behavior data collected only contains information related to the user's natural interaction in the system and does not involve any privacy-sensitive data. If it is necessary to collect some sensitive data due to special circumstances, such as certain identification information related to the user's identity, technical means such as data encryption and anonymization need to be used for privacy protection. Data encryption converts sensitive data into ciphertext form for storage and transmission through a set encryption algorithm, and the data can only be restored through authorized decryption operations. Anonymization is to process the identifiable information in the data so that it cannot directly or indirectly identify a specific user. For example, replace the user's real name with a randomly generated unique identifier and ensure that there is no traceable association between the identifier and the real identity.
[0137] In terms of label management, for the sample resource access annotation set and various generated labels, ensure that the definition and annotation process of the labels are fair and just. The formulation of the labels is based on objective user behavior and resource attributes, rather than making distinctions or discriminatory annotations based on specific group characteristics of users (such as gender, race, region, etc.). For example, when annotating labels related to resource requirements, only determine them based on the user's actual access pattern and demand characteristics for resources, and there will be no different annotation criteria because of the specific group to which the user belongs.
[0138] Rule setting runs through all aspects of model training and application. During the model training process, the set training rules, such as the selection of the loss function and the strategy for parameter update, are all aimed at improving the prediction accuracy and generalization ability of the model, rather than favoring or discriminating against a specific user group or resource type. For example, when selecting an optimization algorithm (such as the stochastic gradient descent algorithm, Adam optimization algorithm, etc.) and its parameters, after sufficient experiments and verifications, ensure that the algorithm can fairly learn and optimize the model parameters in different user behavior data characteristics and resource demand scenarios, and there will be no unfair training results due to some external characteristics of the data.
[0139] In the recommendation decision-making stage, that is, in the processes of generating the resource demand prediction set, resource allocation optimization strategy, etc., decisions are strictly made based on the results learned by the model from user behavior characteristics, without introducing any artificial bias factors. For all target users, regardless of their external characteristics, the same prediction model and decision rules are adopted. For example, when generating a resource allocation optimization strategy based on the resource demand prediction set, operations such as unified standard assessment of the urgency of resource requirements, resource utility assessment, access cost assessment, etc. are carried out on the resource demand items of all users, and the assessment criteria or decision results will not be changed due to some irrelevant factors of the users, so as to ensure the fairness and impartiality of the recommendation decision-making and avoid unfair treatment or discrimination against any user group. Through strict control of each of the above links, it is ensured that the entire information resource demand prediction method based on user behavior patterns operates within the framework of legality, morality, and fairness.
[0140] Figure 2 FIG. shows a schematic diagram of exemplary hardware and software components of an information resource demand prediction system 100 based on user behavior patterns that can implement the ideas of the present application provided by some embodiments of the present application. For example, the processor 120 can be used on the information resource demand prediction system 100 based on user behavior patterns and is used to execute the functions in the present application.
[0141] The information resource demand prediction system 100 based on user behavior patterns can be a general-purpose server or a special-purpose server, both of which can be used to implement the information resource demand prediction method based on user behavior patterns of the present application. Although only one server is shown in the present application, for the sake of convenience, the functions described in the present application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0142] For example, the information resource demand prediction system 100 based on user behavior patterns can include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and different forms of storage media 140, such as disks, ROM, or RAM, or any combination thereof. Exemplarily, the information resource demand prediction system 100 based on user behavior patterns can also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application can be implemented according to these program instructions. The information resource demand prediction system 100 based on user behavior patterns also includes an I / O interface 150 between the computer and other input and output devices.
[0143] For ease of explanation, only one processor is described in the information resource demand prediction system 100 based on user behavior patterns. However, it should be noted that the information resource demand prediction system 100 based on user behavior patterns in this application may also include multiple processors. Therefore, the steps performed by one processor described in this application can also be jointly performed or separately performed by multiple processors. For example, if the processor of the information resource demand prediction system 100 based on user behavior patterns performs step A and step B, it should be understood that step A and step B can also be jointly performed by two different processors or separately performed in one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor jointly perform steps A and B.
[0144] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When the processor executes the computer-executable instructions, the above information resource demand prediction method based on user behavior patterns is implemented.
[0145] It should be noted that, in order to simplify the description of the present invention disclosure and thus help the understanding of one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, sometimes multiple features are merged into one embodiment, drawing or description thereof.
Claims
1. A method for predicting information resource demand based on user behavior patterns, characterized in that: The method comprises: Obtain a user behavior data set of a target user within a preset time period, wherein the user behavior data set includes multiple behavior event units, each behavior event unit consisting of a user operation type, an operation timestamp, and an associated resource identifier; Performing behavior feature extraction processing on the user behavior data set to obtain operation intensity features, time distribution features, and context association features of each behavior event unit; Inputting the operation intensity feature, the time distribution feature, and the context association feature into a pre-trained demand forecasting model to generate a resource demand forecast set corresponding to the target user; Prioritize each resource demand item in the resource demand forecast set according to its feature weight, and generate a resource allocation optimization strategy; Sending the resource allocation optimization strategy to a resource scheduling system to trigger a resource preloading operation; The behavioral feature extraction process is performed on the user behavior data set to obtain the operation intensity feature, time distribution feature and context association feature of each behavior event unit, including: Performing pattern recognition processing on the user operation type in the behavior event unit to extract operation frequency features and operation duration features; Performing time window division processing on the operation timestamp to generate time distribution features, wherein the time distribution features include operation period concentration and operation interval dispersion; Performing semantic association analysis on the associated resource identifier to extract context association features, wherein the context association features include resource type association and task scenario association; Performing weighted concatenation of the operation frequency feature and the operation duration feature to generate the operation intensity feature; Performing feature embedding mapping on the operation intensity feature, the time distribution feature, and the context association feature, unifying the feature dimensions and performing standardization conversion processing to generate a dimension-matched input feature vector set; The performing semantic association analysis on the associated resource identifier to extract context association features includes: Obtaining a resource metadata set corresponding to the associated resource identifier in the historical resource access record, wherein the resource metadata set includes a resource type tag, a task scenario tag, and a usage permission tag; Performing co-occurrence frequency statistics on the resource type tags to generate a resource type association degree, wherein the resource type association degree indicates the degree of matching between the current resource identifier and the type of historically accessed resources; Performing context dependency analysis on the task scenario label to generate a task scenario relevance, wherein the task scenario relevance represents a necessity score of the current resource identifier in a specific task execution sequence; Performing access rule matching processing on the usage permission tag to generate a permission suitability score, wherein the permission suitability score indicates the degree of compliance between the current user role and the resource access rule; Dynamic weight distribution processing is performed on the resource type association degree, the task scenario association degree and the authority adaptability score to generate the context association feature.
2. The information resource demand prediction method based on user behavior patterns according to claim 1 is characterized in that: The step of inputting the operation intensity feature, the time distribution feature, and the context association feature into a pre-trained demand forecasting model to generate a resource demand forecast set corresponding to the target user includes: Inputting the input feature vector set into the temporal attention encoding layer of the pre-trained demand forecasting model, extracting the dynamic dependency between user behavior and resource demand in different time windows through a multi-level attention mechanism, and generating a temporal enhanced feature representation; Input the temporal enhancement feature representation into the resource matching decoding layer of the demand forecasting model, construct a resource candidate set based on the metadata tags of the user's historical access resources, and calculate the semantic matching degree and access probability of each candidate resource with the temporal enhancement feature representation; Sorting and filtering the resource candidate set according to the semantic matching degree and the access probability, retaining resource demand items whose semantic matching degree is higher than a first preset threshold and whose access probability is higher than a second preset threshold, and labeling feature weights according to the semantic matching degree and the access probability to generate the resource demand prediction set; Verify the consistency of the metadata type of each resource demand item in the resource demand forecast set with the resource type in the historical operation sequence of the target user, specifically including: checking whether the type label of the current resource demand item appears in the user's historical access resource type set, and whether the matching degree of its task scenario label with the scenario label in the user's recent operation sequence exceeds a preset ratio threshold. If the verification passes, retain the resource demand item; otherwise, remove it from the resource demand forecast set.
3. The information resource demand prediction method based on user behavior patterns according to claim 2 is characterized in that: The input feature vector set is input into the temporal attention encoding layer of the pre-trained demand forecasting model, and the dynamic dependency between user behavior and resource demand in different time windows is extracted through a multi-level attention mechanism to generate a temporal enhanced feature representation, including: Performing multi-dimensional time encoding on the input feature vector set in the time order of the operation timestamps to generate a dynamic embedding vector sequence including time interval weights; In the temporal attention encoding layer, a sliding window segmentation strategy is used to divide the dynamic embedding vector sequence into multiple time segments. The embedding vector in each time segment calculates the interaction weight of the operation intensity feature and the time distribution feature through a multi-head self-attention mechanism to generate a local attention matrix. A cross-window attention sublayer is constructed based on the overlapping regions between time segments. The temporal dependency of the local attention matrices of adjacent time segments is modeled through a bidirectional gated recurrent unit, and the temporal decay factor and context transfer weight between sliding windows are calculated. The local attention matrix and the context transfer weight are input into a dynamic sparse connection layer, and a learnable weight mask mechanism is combined with the time decay factor to select the long-term dependency path across the sliding window, wherein the time decay factor is used to adjust the weight distribution ratio of the dependency paths between different time segments. The weighted dependency paths are nonlinearly fused through a multi-layer perceptron aligned in the time dimension to obtain a fused feature matrix; The fused feature matrix is subjected to residual connection and layer normalization processing in the time dimension to generate the temporal enhanced feature representation containing multi-granularity time dependencies, wherein the time attenuation factor acts on the time dimension of the feature matrix before the residual connection to achieve dynamic compensation of cross-window weights.
4. The information resource demand prediction method based on user behavior patterns according to claim 2 is characterized in that: Inputting the time series enhanced feature representation into the resource matching decoding layer of the demand forecasting model, constructing a resource candidate set based on metadata tags of resources historically accessed by the user, and calculating the semantic matching degree and access probability of each candidate resource with the time series enhanced feature representation include: Extract resource access trajectories with the same task scenario label as the temporal enhancement feature representation from the user's historical behavior log, and construct a resource co-occurrence graph with a timestamp. The nodes in the resource co-occurrence graph represent resource demand items. The edge weight is calculated by normalizing the resource type association, the inverse of the access time interval, and the task sequence continuity score respectively, and then weighting and summing them according to a preset ratio to generate a comprehensive edge weight. In the resource matching decoding layer, the temporal enhanced feature representation is input into the graph attention network, and the metadata features of adjacent nodes in the resource co-occurrence graph are aggregated through a multi-head graph convolution operation to generate a dynamically updated resource semantic representation vector; A two-stream matching mechanism is used to calculate the spatial similarity between the temporal enhanced feature representation and the resource semantic representation vector: in the first stream, the static semantic matching degree is calculated using the cosine similarity kernel function and the resource type association is superimposed for calibration; and in the second stream, a time-aware Transformer encoder is used to capture the dynamic patterns in the historical access sequence and generate access probability prediction values based on time decay. After normalizing the static semantic matching degree and the access probability prediction value, the results are input into the gated fusion module, a dynamic weight coefficient is generated through the sigmoid function, and the normalized static semantic matching degree and the access probability prediction value are weighted and summed according to the dynamic weight coefficient to obtain a weighted comprehensive matching degree; The resource co-occurrence graph is topologically pruned based on the weighted comprehensive matching degree, nodes with matching degrees higher than an adaptive threshold are retained to form a connected subgraph, and metadata labels of the nodes in the connected subgraph are mapped to generate the resource demand prediction set.
5. The information resource demand prediction method based on user behavior patterns according to claim 2 is characterized in that: The training method of the demand forecasting model includes: Obtain a set of training input vectors containing the standardized transformed sample operation intensity features, sample time distribution features, and sample contextual association features, and perform one-hot encoding on the sample resource access annotation set to generate a true demand label vector; Constructing an initialization demand prediction model, wherein the initialization demand prediction model includes a temporal attention encoding layer and a resource matching decoding layer; Inputting the training input vector set into the temporal attention encoding layer, and extracting sample temporal enhanced feature representation through a multi-level attention mechanism; Input the sample time series enhanced feature representation into the resource matching decoding layer, construct a sample candidate resource set based on the metadata tags of the sample's historical access resources, and calculate the semantic matching degree and access probability of each sample candidate resource with the sample time series enhanced feature representation; Generate a sample resource demand prediction set based on the semantic matching degree and the access probability, compare the sample resource demand prediction set with the real demand label vector, and calculate the loss function value; Based on the loss function value, the model parameters of the temporal attention encoding layer and the resource matching decoding layer are updated through the back-propagation algorithm, so that the coverage overlap between the sample resource demand prediction set and the true demand label vector reaches a preset threshold, and the metadata type of each resource demand item in the sample resource demand prediction set and the association consistency with the resource type in the true demand label vector are verified, thereby generating the trained demand prediction model.
6. The information resource demand prediction method based on user behavior patterns according to claim 1 is characterized in that: The step of performing priority sorting according to the feature weights of the respective resource demand items in the resource demand forecast set to generate a resource allocation optimization strategy includes: Performing a demand urgency assessment process on each resource demand item to generate an urgency score, wherein the urgency score is determined based on the proximity of the operation timestamp and the task deadline; Perform resource utility evaluation on each resource requirement item to generate a utility value score, where the utility value score is determined based on the criticality of the resource type and the dependency of the task scenario; Performing access cost evaluation on each resource requirement item to generate a cost consumption score, wherein the cost consumption score includes computing resource occupancy and network transmission overhead; The urgency score, utility value score and cost consumption score are normalized respectively, and a weighted scoring algorithm is used to generate a comprehensive priority score based on the feature weights of each resource demand item. The resource demand forecast set is sorted according to the comprehensive priority score to generate a resource allocation optimization strategy containing priority tags.
7. The method according to claim 6, characterized in that The sending of the resource allocation optimization strategy to the resource scheduling system to trigger the resource preloading operation includes: Arrange the resource demand items in a preloading order according to the priority tags, and generate a resource scheduling queue distributed in descending order of priority; For each resource requirement item in the resource scheduling queue, determining resource parameters required for preloading based on its associated resource type; The resource parameters are standardized into computing resource units, storage units, and network bandwidth units defined by the resource scheduling system interface, and then converted into a protocol format with the corresponding priority tags to generate a multi-dimensional scheduling instruction set that complies with the resource scheduling system interface standard; The multidimensional scheduling instruction set is sent to the resource scheduling system in batches according to the arrangement order of the resource scheduling queue, triggering the resource scheduling system to perform a resource preloading operation according to the multidimensional scheduling instruction set.
8. An information resource demand prediction system based on user behavior patterns, characterized in that: It includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the information resource demand prediction method based on user behavior patterns as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Game platform management method and system based on artificial intelligence
CN119185954A
Remote digital service resource recommendation method and system based on artificial intelligence mining
CN119739929A