Computing power distribution method and system for equipment terminal

Through the neural network model and triplet set technology, combined with the direct relationship and the inverse relationship, the computing power demand of the equipment terminal is predicted and allocated, which solves the problem of inaccurate computing power allocation under the lack of data and realizes the efficient computing power of the equipment terminal. use.

CN118798348AActive Publication Date: 2024-10-18SHENZHEN HUMENG TECH CO LTD

Patent Information

Application Number
CN202411280307.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-10-18
Estimated Expiration
2044-09-13

Smart Images

  • Figure CN118798348A_ABST
    Figure CN118798348A_ABST
Patent Text Reader

Abstract

The invention discloses a computing power distribution method and system for an equipment terminal, and the method comprises the steps: carrying out the prediction according to operation data, obtaining a computing power prediction result, and building a triple set; guiding a head entity of each relation in the triple set to rotate and translate through a first loss function to obtain first embedding; training the first embedding according to the positive relation triple set to obtain a second embedding; and fusing the computing power prediction result and the second embedding to obtain an actual computing power prediction result, and carrying out real-time dynamic computing power distribution on the plurality of equipment terminals according to the actual computing power prediction result. According to the computing power distribution method and system of the equipment terminals, real-time computing power demand prediction is carried out through the neural network model, and the computing power prediction result of each equipment terminal can be obtained through preliminary calculation; in the embodiment of the invention, the second embedding is calculated in a triple manner, so that the associated information among a plurality of equipment terminals can be further captured, and the problem that the computing power utilization efficiency of the equipment terminals is difficult to improve under the condition of data shortage can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a computing power allocation method and system for a device terminal. Background Art

[0002] The development of new technologies and the emergence of new applications have led to the continuous changes in the performance requirements of device terminals. Real-time dynamic computing power allocation can quickly adjust computing power resources according to the needs of new businesses and applications, ensuring that the system can quickly adapt to new changes and support new businesses and applications; and different types of device terminals may have different performance requirements and load patterns. Through accurate real-time dynamic computing power allocation, it can be ensured that each device can obtain the best computing power resources it needs, thereby achieving efficient use of resources, which helps to avoid the waste of computing power resources. The existing technology mainly collects the operating data of device terminals in real time by deploying tools such as sensors and log collectors, and uses artificial intelligence technologies such as machine learning and deep learning to analyze the historical operating data of device terminals, and then predicts the computing power requirements of the device in the future based on factors such as the real-time operating status, load mode and task type of the device, so as to formulate a real-time dynamic computing power allocation strategy based on the prediction results.

[0003] However, when predicting the computing power requirements of a device, machine learning or statistical models usually require a large amount of diverse training data to ensure accuracy. If operating data is scarce, the model may not be fully trained and may not be able to accurately capture the performance requirements and load characteristics of the device under different operating modes. Therefore, when allocating computing power, the model may not be able to provide accurate prediction results, resulting in inaccurate computing power allocation and difficulty in improving the computing power utilization efficiency of the device terminal. Summary of the invention

[0004] The present invention provides a computing power allocation method and system for a device terminal to solve the problem that it is difficult to improve the computing power utilization efficiency of the device terminal in the case of data scarcity.

[0005] Obtain the operating data of several device terminals under the same device network; According to the operation data, the real-time computing power demand is predicted by a neural network model to obtain a computing power prediction result; Establishing a triple set based on the operation data; wherein the triple set includes a positive relation triple set and an inverse relation triple set; The first loss function is used to guide the head entity of each relationship in the triple set to rotate and translate, and the angle is the same or orthogonal to the tail entity corresponding to each head entity, so as to obtain a first embedding; wherein the first loss function is established according to the correlation score between the triple facts in the positive relationship triple set, combined with the regularization result of the triple facts; Training the first embedding according to the missing relation set of all entities in the positive relation triple set to obtain a second embedding; The computing power prediction result and the second embedding are integrated to obtain an actual computing power prediction result, and real-time dynamic computing power allocation is performed on the plurality of device terminals according to the actual computing power prediction result.

[0006] The present invention uses a neural network model to predict real-time computing power demand and can preliminarily calculate the computing power prediction results. By guiding the head entity of each relationship in the triple set to rotate and translate, so that it has the same or orthogonal angle with the corresponding tail entity, this geometric transformation actually simulates the relationship between entities in the embedding space. This transformation not only considers the direct connection between entities, but also indirectly reflects the complex semantic relationship between entities through geometric properties such as angle and orthogonality. Using the missing relationship set of all entities in the positive relationship triple set to train the first embedding is actually simulating and predicting potential relationships that are not explicitly observed but may exist. This training method enables the model to learn more about the potential associations and patterns between entities and relationships, thereby improving the model's ability to capture complex semantic associations, so that the second embedding accurately reflects the association information between several device terminals; since several device terminals run on the same device network, their network environment and status are likely to be interdependent, and different device terminals may jointly complete a complex business logic, so there will be associations between these device terminals, and through the association information, the situation of such data interaction can be effectively revealed; therefore, by finally fusing the computing power prediction result with the second embedding to obtain the actual computing power prediction result, the computing power requirements of several device terminals can be accurately reflected, ensuring the effectiveness of computing power allocation.

[0007] Compared with the prior art, the present invention uses a neural network model to perform real-time computing power demand prediction, and can preliminarily calculate the computing power prediction result; by calculating the second embedding in a triplet manner, the correlation information between several device terminals can be further captured, so that the actual computing power prediction result obtained by fusing the computing power prediction result and the second embedding can accurately reflect the computing power requirements of several device terminals, thereby solving the problem of difficulty in improving the computing power utilization efficiency of device terminals in the case of data scarcity.

[0008] As a preferred solution, a triple set is established based on the operation data, specifically: Establishing a knowledge graph according to the plurality of equipment terminals and the operation data; Extracting triples corresponding to several types of relations from the knowledge graph to obtain an initial positive relation triple set; wherein each triple in the initial positive relation triple set consists of a head entity, a corresponding relation and a tail entity; By exchanging the positions of several head entities and corresponding tail entities in the initial positive relationship triple set, the corresponding corresponding relationship is converted into an inverse relationship; Generate the inverse relationship triple set according to the plurality of head entities and the corresponding tail entities after the positions are interchanged, and the inverse relationship; According to the inverse relationship triple set, erroneous entities in the initial positive relationship triple set are eliminated to obtain the positive relationship triple set, and the triple set is composed of the positive relationship triple set and the inverse relationship triple set.

[0009] This preferred solution can expose possible errors in the initial positive relationship triple set by exchanging the positions of the head entity and the tail entity to generate an inverse relationship triple. Therefore, the erroneous entities in the initial positive relationship triple set can be eliminated based on the inverse relationship triple set to ensure the validity of the initial positive relationship triple set. In many cases, a relationship may be expressed in only one direction. By generating inverse relationship triples, the system can automatically fill in the missing inverse relationship, thereby enhancing the integrity of the relationship data.

[0010] As a preferred solution, the erroneous entities in the initial positive relationship triple set are eliminated according to the inverse relationship triple set to obtain the positive relationship triple set, specifically: Establish a mapping between the inverse relation triple set and corresponding elements in the initial positive relation triple set; If the first inverse relation triple in the inverse relation triple set does not have a first mapping in the first positive relation triple corresponding to the initial positive relation triple set, or if the first mapping exists, the head entity and the tail entity of the first inverse relation triple are not interchanged, then the first positive relation triple is eliminated; The inverse relation triple set and the initial positive relation triple set are traversed to obtain the positive relation triple set after eliminating a number of positive relation triples.

[0011] This preferred solution can clearly identify which inverse relationship triples have a direct correspondence with the initial positive relationship triples by mapping the corresponding elements in the inverse relationship triple set and the initial positive relationship triple set; under the condition that the mapping exists, check whether the head entity and the tail entity of the inverse relationship triple are interchanged, which is to verify the correctness of the inverse relationship. If the head and tail entities are not interchanged, it means that there are errors or inconsistencies in the initial positive relationship triple or the inverse relationship triple. If there is a mapping but the head and tail entities are not interchanged, then there are errors in the triple. Therefore, data elimination can ensure that the data used is accurate, consistent and reliable, thereby supporting the efficient and accurate execution of subsequent tasks.

[0012] As a preferred solution, the first loss function is used to guide the head entity of each relationship in the triple set to rotate and translate, and the angles are the same or orthogonal to the tail entities corresponding to the head entities, so as to obtain the first embedding, specifically: Mapping the entities and relations of the triple set to a low-dimensional vector space through a distance model, and guiding the head entity of each relation in the triple set to rotate and translate according to the first loss function, so that the angles are the same or orthogonal to the tail entities corresponding to the head entities, thereby obtaining the first embedding; In which, the distance model is obtained by optimizing the distance function through the second loss function, and the second loss function is established with the goal of ensuring that the embedding representation of the positive relationship triple set is closer than the embedding representation of the negative relationship triple set. The negative relationship triple set is obtained by randomly combining the entities and corresponding relationships in the positive relationship triple set, and the distance function is established based on the embedding representation in the positive relationship triple set.

[0013] This preferred solution embeds the entities and relations of the triple set into a low-dimensional vector space. This low-dimensional embedding method helps to reduce the complexity and computational complexity of the data while retaining the key information between the entities and relations, so that the association between the entities and relations can be effectively expressed in a relatively small space. Guided by the loss function, the model will learn during the training process how to make the head entity and the tail entity with an association closer in the vector space, while making the head entity and the tail entity without an association farther apart. This learning process can accurately capture the semantic similarity between entities and relations; so that the embedded vector can reflect the true association of the data; requiring the head entity and the tail entity to be the same or orthogonal in angle, which further enhances the accuracy and robustness of the embedded representation.

[0014] As a preferred solution, the first loss function is established based on the correlation scores between the triple facts in the positive relationship triple set and the regularization results of the triple facts, specifically: Based on the distance model, a scoring function capable of expressing a relevance score is established according to the combination possibility of the head entity, the corresponding relationship and the tail entity in the positive relationship triple set and the negative relationship triple set; By controlling the positive and negative values ​​of the weights of the positive and negative samples, a positive sample logarithmic loss term and a negative sample logarithmic loss term are established based on the scoring function; Converting the head entity, the corresponding relationship and the tail entity in the positive relationship triple set into regularization terms; The first loss function is established according to the positive sample logarithmic loss term, the negative sample logarithmic loss term and the regularization term.

[0015] This preferred solution controls the weights of positive and negative samples so that the positive sample logarithmic loss term and the negative sample logarithmic loss term can be optimized for positive relationship triples and negative relationship triples respectively. The positive sample loss term encourages the model to improve the score of positive relationship triples, while the negative sample loss term encourages the model to reduce the score of negative relationship triples, which helps the model better distinguish between real triples and randomly combined triples. In addition, the regularization term can prevent the model from overfitting during the training process by converting the head entity, corresponding relationship and tail entity in the positive relationship triple set into constraints, so as to reduce the model's excessive dependence on training data and thus improve the model's generalization ability.

[0016] As a preferred solution, by controlling the positive and negative values ​​of the weights of the positive and negative samples, a positive sample logarithmic loss term and a negative sample logarithmic loss term are established based on the scoring function, specifically: Based on the positive relation triple set, establishing the positive sample logarithmic loss term by setting the scoring function to a negative value; Based on the negative relation triple set, the negative sample logarithmic loss term is established by setting the scoring function to a positive value.

[0017] As a preferred solution, the first loss function is specifically: ; Among them, h, r and t are the head entity, corresponding relationship and tail entity in the positive relationship triple set respectively. is the scoring function of the positive relation triple set, is the set of positive relation triples, , and are respectively the head entity, corresponding relationship and tail entity in the negative relationship triple set, is the scoring function of the negative relation triple set, is the negative relation triple set, is a hyperparameter.

[0018] As a preferred solution, the first embedding is trained according to the missing relationship set of all entities in the positive relationship triple set to obtain the second embedding, specifically: By calculating the cosine similarity between the relation embedding vectors in the positive relation triple set, a distance value set is obtained; Based on the distance value set, a penalty term is added to the first loss function to penalize similar relationships whose distance exceeds a preset threshold, thereby obtaining a loss function training model; According to the missing relationship set of all entities in the positive relationship triple set, the first embedding is trained by the loss function training model to obtain the second embedding.

[0019] In this preferred solution, cosine similarity is used as an effective measurement method to obtain the similarity of vectors in direction, which helps to capture semantic associations; based on the calculated distance value set, a penalty term is added to the first loss function to penalize similar relationships whose distance exceeds a preset threshold. This actually encourages the relationship embedding learned by the model to maintain a sufficient distance in the vector space, which helps to distinguish those semantically similar but different relationships, allowing the model to more accurately learn the subtle differences between relationships, thereby capturing more complex semantic associations. Since missing relationships may be potential relationships that are not explicitly expressed, by using this information to train the first embedding, the model can more comprehensively understand the complex relationships between entities and relationships, thereby obtaining a more accurate embedding representation.

[0020] As a preferred solution, according to the operation data, a neural network model is used to predict the real-time computing power demand to obtain a computing power prediction result, which is specifically: Inputting the operation data into a long short-term memory network to predict the real-time computing power requirements of a plurality of device terminals, and obtaining the computing power prediction result; The long short-term memory network is obtained by updating the weights and bias items of the initial long short-term memory network using gradient descent and adjusting the learning rate.

[0021] The present invention also provides a computing power allocation system for a device terminal, comprising a data module, a prediction module, a group module, an embedding module, a training module and an allocation module; Wherein, the data module is used to obtain the operation data of several device terminals under the same device network; The prediction module is used to predict the real-time computing power demand through a neural network model according to the operation data to obtain a computing power prediction result; The grouping module is used to establish a triple set based on the operation data; wherein the triple set includes a positive relationship triple set and an inverse relationship triple set; The embedding module is used to guide the head entity of each relationship in the triple set to rotate and translate through a first loss function, so that the angle is the same as or orthogonal to the tail entity corresponding to each head entity, so as to obtain a first embedding; wherein the first loss function is established according to the correlation score between the triple facts in the positive relationship triple set, combined with the regularization result of the triple facts; The training module is used to train the first embedding according to the missing relationship set of all entities in the positive relationship triple set to obtain a second embedding; The allocation module is used to fuse the computing power prediction result and the second embedding to obtain an actual computing power prediction result, and to perform real-time dynamic computing power allocation to the plurality of device terminals according to the actual computing power prediction result. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flowchart of a computing power allocation method for a device terminal provided in an embodiment of the present application; Figure 2 It is a structural diagram of a computing power allocation device for a device terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "several" means two or more.

[0025] A computing power allocation method for a device terminal provided in an embodiment of the present application is mainly used in situations where it is necessary to obtain the dynamic real-time computing power required by different types of device terminals under the same device network, so as to accurately allocate computing power and improve the utilization efficiency of computing power.

[0026] Embodiment 1: See also Figure 1 The embodiment of the present application provides a computing power allocation method for a device terminal, including S1 to S6, and the specific implementation steps are as follows: S1. Obtain the operating data of several device terminals in the same device network.

[0027] Step S1 of the embodiment of the present application is specifically as follows: Obtain the operation data of several device terminals under the same device network, and obtain the relevant data of the current task; the operation data includes device performance parameters (such as CPU, memory, storage and network bandwidth, etc.) and application resource consumption, etc.; the relevant data of the current task includes characteristic data such as task submission mode, task execution time, resource usage mode, etc.; Based on the relevant data of the current task, the task arrival rate, task type distribution and other features are extracted from the task submission mode. The average execution time, maximum execution time, shortest execution time and other statistical features are extracted from the task execution time. The average value, peak value and other features of indicators such as CPU usage, memory occupancy, and disk I / O are extracted from the resource usage pattern to obtain the task characteristic data.

[0028] S2. Based on the operating data, the real-time computing power demand is predicted through the neural network model to obtain the computing power prediction result.

[0029] Step S2 of the embodiment of the present application includes S2.1 to S2.2; specifically, it is: S2.1. Obtain historical operation data of several equipment terminals, and perform preprocessing on the historical operation data including data cleaning, standardization, normalization and other operations; Initialize the weights and bias items of the initial long short-term memory network (LSTM network); The initial LSTM network is iteratively trained using historical operation data of several device terminals. In each iteration, a batch of training data is input into the network, and the prediction results are calculated through the network's forward propagation. The loss function is then used to calculate the difference between the prediction results and the actual computing power requirements to obtain the loss value. The loss function is established based on the mean absolute error between the prediction results and the actual computing power requirements. According to the loss value, use stochastic gradient descent SGD for back propagation, calculate the gradient of each parameter in the network, and use the gradient descent algorithm to update the weights and bias items of the initial long short-term memory network; In addition, during the training process, exponential decay is used to adjust the learning rate, so that the loss value of the initial long short-term memory network can be quickly reduced in the early stage of training, and the parameters can be adjusted more finely in the later stage of training; The iterative training process is repeated until a preset number of training times or a preset loss value converges to a certain degree, and a long short-term memory network is obtained.

[0030] S2.2, fusing the operation data and task feature data of several equipment terminals to create a complete input feature vector, and ensuring that the input vector after feature fusion can simultaneously reflect the operation status of several equipment terminals and the characteristics of the current task, to obtain comprehensive data; The comprehensive data is input into the long short-term memory network to predict the real-time computing power requirements of several device terminals, and the computing power prediction results are obtained through forward propagation calculation.

[0031] S3. Establish a triple set based on the operating data; wherein the triple set includes a positive relationship triple set and an inverse relationship triple set.

[0032] Step S3 of the embodiment of the present application includes S3.1 to S3.2; specifically, it is: S3.1. Based on the operation data, a knowledge graph is established with several equipment terminals as nodes, operation data as attributes, and the relationship between several equipment terminals as boundaries; Extract the triplets corresponding to several types of relations from the knowledge graph to obtain an initial positive relation triple set; each triple in the initial positive relation triple set consists of a head entity, a corresponding relation, and a tail entity, such as (device A, CPU frequency, 2.4 GHz); By exchanging the positions of several head entities and corresponding tail entities in the initial positive relationship triple set, the corresponding corresponding relationship is converted into an inverse relationship; According to several head entities and corresponding tail entities after swapping positions, as well as inverse relations, a set of inverse relation triples is generated.

[0033] S3.2, mapping the corresponding elements in the inverse relation triple set and the initial positive relation triple set; If the first inverse relation triple in the inverse relation triple set does not have a first mapping in the first positive relation triple corresponding to the initial positive relation triple set, or if the first mapping exists, the head entity and the tail entity of the first inverse relation triple are not interchanged, then the first positive relation triple is eliminated; Traversing the inverse relation triple set and the initial positive relation triple set, obtaining a positive relation triple set formed by eliminating a number of positive relation triples from the initial positive relation triple set; The triple set is composed of the positive relation triple set and the inverse relation triple set.

[0034] In this embodiment S3, by exchanging the positions of the head entity and the tail entity to generate an inverse relationship triple, possible errors in the initial positive relationship triple set can be exposed. Therefore, the erroneous entities in the initial positive relationship triple set can be eliminated according to the inverse relationship triple set to ensure the validity of the initial positive relationship triple set. In many cases, a relationship may be expressed in only one direction. By generating an inverse relationship triple, the system can automatically fill in the missing inverse relationship, thereby enhancing the integrity of the relationship data. Moreover, by mapping the corresponding elements in the inverse relationship triple set and the initial positive relationship triple set, it is possible to clearly identify which inverse relationship triples have a direct correspondence with the initial positive relationship triple; under the condition that the mapping exists, check whether the head entity and the tail entity of the inverse relationship triple are interchanged, which is to verify the correctness of the inverse relationship. If the head and tail entities are not interchanged, it means that there are errors or inconsistencies in the initial positive relationship triple or the inverse relationship triple. If there is a mapping but the head and tail entities are not interchanged, then there is an error in the triple. Therefore, data elimination can ensure that the data used is accurate, consistent and reliable, thereby supporting the efficient and accurate execution of subsequent tasks.

[0035] S4. Guide the head entity of each relationship in the triple set to rotate and translate through the first loss function, so that the angle is the same or orthogonal to the tail entity corresponding to the head entity, and obtain the first embedding; wherein the first loss function is established based on the correlation score between the triple facts in the positive relationship triple set, combined with the regularization result of the triple facts.

[0036] Step S4 of the embodiment of the present application includes S4.1 to S4.2; specifically, as follows: S4.1. Based on the distance model, a scoring function that can represent the relevance score is established according to the combination possibility of the head entity, the corresponding relationship and the tail entity in the positive relationship triple set and the negative relationship triple set; Based on the set of positive relation triples, a positive sample logarithmic loss term is established by setting the scoring function to a negative value; Based on the set of negative relation triples, a negative sample logarithmic loss term is established by setting the scoring function to a positive value; The head entity, corresponding relation and tail entity in the positive relation triple set are converted into regularization terms; Establish a first loss function L based on the positive sample logarithmic loss term, the negative sample logarithmic loss term and the regularization term; Among them, the first loss function is: ; Among them, h, r and t are the head entity, corresponding relationship and tail entity in the positive relationship triple set respectively. is the scoring function for the set of positive relation triples, is a set of positive relation triples, , and They are the head entity, corresponding relationship and tail entity in the negative relationship triple set. is the scoring function for the set of negative relation triples, is a set of negative relation triples, is a hyperparameter; and, is the positive sample logarithmic loss term, is the negative sample logarithmic loss term, is the regularization term.

[0037] In this embodiment S4.1, by controlling the positive and negative values ​​of the weights of positive and negative samples, the positive sample logarithmic loss term and the negative sample logarithmic loss term can be optimized for positive relationship triples and negative relationship triples respectively. The positive sample loss term encourages the model to improve the score of positive relationship triples, while the negative sample loss term encourages the model to reduce the score of negative relationship triples, which helps the model to better distinguish between real triples and randomly combined triples. In addition, the regularization term can prevent the model from overfitting during the training process by converting the head entity, corresponding relationship, and tail entity in the positive relationship triple set into constraints, so as to reduce the model's excessive dependence on training data, thereby improving the generalization ability of the model.

[0038] S4.2, mapping the entities and relations of the triple set to a low-dimensional vector space through a distance model, and guiding the head entity of each relation in the triple set to rotate and translate according to the first loss function L, so that the angles of the tail entities corresponding to the head entities are the same or orthogonal, and a first embedding is obtained; Among them, the distance model is constructed as follows: The second loss function is established with the goal of ensuring that the embedding representation of the positive relationship triple set is closer than the embedding representation of the negative relationship triple set. ; According to the random combination of entities and corresponding relations in the positive relation triple set, the negative relation triple set is obtained; According to the distance between the target parameter and the tail entity in the positive relationship triple set, a distance function is established, and based on the distance function, Model; where the target parameter is the sum of the head entity and the corresponding relationship; Randomly select a small batch of triplets from the positive relation triple set and input the triplets in the small batch into The model obtains the embedding vectors of entities and relations through embedding lookup tables, and calculates the predicted values ​​according to the model architecture; the second loss function is used Compute the loss between the predicted and target values ​​for the triplets in the mini-batch; Use an automatic differentiation library (e.g. PyTorch, TensorFlow's autograd) to calculate the loss relative to The gradient of the model parameters in the model is obtained to obtain a first gradient; the absolute value of the first gradient is adjusted to a preset range by multiplying the first gradient with a preset learning rate to obtain a second gradient; By moving in the direction of the second gradient descent The model parameters of the model are updated by subtracting the product of the second gradient and the learning rate from the current parameter value The model parameters of the model are used to obtain the distance model; Among them, the second loss function is: ; Among them, h, r and t are the head entity, corresponding relationship and tail entity in the positive relationship triple set respectively. is the distance function of the set of positive relation triples, is a set of positive relation triples, , and They are the head entity, corresponding relationship and tail entity in the negative relationship triple set. is the distance function of the set of negative relation triples; is a margin hyperparameter that controls the distinction between positive and negative examples.

[0039] And, max(0, ...) is a hinge function, which is used to ensure that the embedding representation of the positive relationship triple set is only when the distance between the embedding representation of the negative relationship triple set is less than the margin , it will contribute to the loss function.

[0040] Overall, this embodiment S4 embeds the entities and relations of the triple set into a low-dimensional vector space. This low-dimensional embedding method helps to reduce the complexity and computation of the data, while retaining the key information between the entities and relations, so that the association between the entities and relations can be effectively expressed in a relatively small space. Guided by the loss function, the model will learn how to make the head entity and the tail entity with association closer in the vector space, and the head entity and the tail entity without association farther apart during the training process. This learning process can accurately capture the semantic similarity between entities and relations; so that the embedded vector can reflect the true association of the data; requiring the head entity and the tail entity to be the same or orthogonal in angle, which further enhances the accuracy and robustness of the embedded representation.

[0041] S5. Train the first embedding according to the missing relation set of all entities in the positive relation triple set to obtain the second embedding.

[0042] Step S5 of the embodiment of the present application includes S5.1 to S5.2; specifically, it is: S5.1. Calculate the similarity between the embedding vector of the first entity in the positive relation triple set and the embedding vectors of other entities in the knowledge graph to obtain a similarity value set; Based on the similarity value set, a similar entity set is established according to entities with similarity values ​​higher than a threshold; Compare the relationship set of the first entity with the relationship set of the similar entity, find out the relationship that only exists in the similar entity but not in the first entity, and obtain the missing relationship; Traverse each entity in the positive relation triple set to find their respective possible missing relations, and obtain a missing relation set consisting of several missing relations.

[0043] S5.2, obtaining a distance value set by calculating the cosine similarity between the relation embedding vectors in the positive relation triple set; Based on the distance value set, through the first loss function A penalty term is added to penalize similar relationships whose distance exceeds a preset threshold, and a loss function training model is obtained; According to the missing relation set of all entities in the positive relation triple set, the first embedding is trained by the loss function training model to obtain the second embedding; Among them, the calculation method of cosine similarity is: ; The first distance value in the distance value set can be expressed as: ; in, and are the first relation embedding vector and the second relation embedding vector in the positive relation triple set, and denote the modulus of the first relation embedding vector and the modulus of the second relation embedding vector, respectively. is the cosine similarity.

[0044] In this embodiment S5, cosine similarity is used as an effective metric to obtain the similarity of vectors in direction, which helps to capture semantic associations; based on the calculated distance value set, a penalty term is added to the first loss function to penalize similar relationships whose distance exceeds a preset threshold, which actually encourages the relationship embedding learned by the model to maintain a sufficient distance in the vector space, which helps to distinguish those semantically similar but different relationships, so that the model can more accurately learn the subtle differences between relationships, thereby capturing more complex semantic associations. Since missing relationships may be potential relationships that are not explicitly expressed, by using this information to train the first embedding, the model can more comprehensively understand the complex relationships between entities and relationships, thereby obtaining a more accurate embedding representation.

[0045] S6. The computing power prediction result and the second embedding are integrated to obtain the actual computing power prediction result, and the computing power is dynamically allocated to a number of device terminals in real time according to the actual computing power prediction result.

[0046] Step S6 of the embodiment of the present application is specifically as follows: Normalize the computing power prediction results and the second embedding; The normalized computing power prediction result is fused with the second embedding to obtain the actual computing power prediction result, and the computing power is dynamically allocated to several device terminals in real time according to the actual computing power prediction result.

[0047] Overall, the embodiments of the present application have the following beneficial effects: The present invention uses a neural network model to predict real-time computing power demand and can preliminarily calculate the computing power prediction results. By guiding the head entity of each relationship in the triple set to rotate and translate, so that it has the same or orthogonal angle with the corresponding tail entity, this geometric transformation actually simulates the relationship between entities in the embedding space. This transformation not only considers the direct connection between entities, but also indirectly reflects the complex semantic relationship between entities through geometric properties such as angle and orthogonality. Using the missing relationship set of all entities in the positive relationship triple set to train the first embedding is actually simulating and predicting potential relationships that are not explicitly observed but may exist. This training method enables the model to learn more about the potential associations and patterns between entities and relationships, thereby improving the model's ability to capture complex semantic associations, so that the second embedding accurately reflects the association information between several device terminals; since several device terminals run on the same device network, their network environment and status are likely to be interdependent, and different device terminals may jointly complete a complex business logic, so there will be associations between these device terminals, and through the association information, the situation of such data interaction can be effectively revealed; therefore, by finally fusing the computing power prediction result with the second embedding to obtain the actual computing power prediction result, the computing power requirements of several device terminals can be accurately reflected, ensuring the effectiveness of computing power allocation.

[0048] Embodiment 2: See also Figure 2 , an embodiment of the present application provides a computing power allocation system for a device terminal, including a data module 10, a prediction module 20, a group module 30, an embedding module 40, a training module 50 and an allocation module 60; Among them, the data module 10 is used to obtain the operation data of several device terminals under the same device network; The prediction module 20 is used to predict the real-time computing power demand through a neural network model according to the operation data to obtain a computing power prediction result; A set module 30, for establishing a triple set based on the operation data; wherein the triple set includes a positive relation triple set and an inverse relation triple set; The embedding module 40 is used to guide the head entity of each relationship in the triple set to rotate and translate through a first loss function, so that the angle of the tail entity corresponding to each head entity is the same or orthogonal, so as to obtain a first embedding; wherein the first loss function is established according to the correlation score between the triple facts in the positive relationship triple set, combined with the regularization result of the triple facts; A training module 50 is used to train the first embedding according to the missing relationship set of all entities in the positive relationship triple set to obtain a second embedding; The allocation module 60 is used to integrate the computing power prediction result and the second embedding to obtain the actual computing power prediction result, and to perform real-time dynamic computing power allocation to a number of device terminals according to the actual computing power prediction result.

[0049] In one embodiment, the data module 10 is specifically: Obtain the operation data of several device terminals under the same device network, and obtain the relevant data of the current task; the operation data includes device performance parameters (such as CPU, memory, storage and network bandwidth, etc.) and application resource consumption, etc.; the relevant data of the current task includes characteristic data such as task submission mode, task execution time, resource usage mode, etc.; Based on the relevant data of the current task, the task arrival rate, task type distribution and other features are extracted from the task submission mode. The average execution time, maximum execution time, shortest execution time and other statistical features are extracted from the task execution time. The average value, peak value and other features of indicators such as CPU usage, memory occupancy, and disk I / O are extracted from the resource usage pattern to obtain the task characteristic data.

[0050] In one embodiment, the prediction module 20 includes a network unit and a prediction unit; The network unit is used to obtain the historical operation data of several equipment terminals and perform preprocessing on the historical operation data including data cleaning, standardization, normalization and other operations; The network unit is also used to initialize the weights and bias items of the initial long short-term memory network (LSTM network); The network unit is also used to iteratively train the initial long short-term memory network using the historical operation data of several device terminals; in each iteration, a batch of training data is input into the network, the prediction result is calculated through the forward propagation of the network, and then the difference between the prediction result and the actual computing power requirement is calculated using the loss function to obtain the loss value; wherein the loss function is established based on the mean absolute error between the prediction result and the actual computing power requirement; The network unit is also used to perform back propagation using stochastic gradient descent (SGD) according to the loss value, calculate the gradient of each parameter in the network, and use the gradient descent algorithm to update the weights and bias items of the initial long short-term memory network; In addition, during the training process, exponential decay is used to adjust the learning rate, so that the loss value of the initial long short-term memory network can be quickly reduced in the early stage of training, and the parameters can be adjusted more finely in the later stage of training; The network unit is also used to repeat the iterative training process until a preset number of training times or a preset loss value convergence degree is reached to obtain a long short-term memory network.

[0051] The prediction unit is used to fuse the operation data of several equipment terminals and the task feature data to create a complete input feature vector, and ensure that the input vector after feature fusion can simultaneously reflect the operation status of several equipment terminals and the characteristics of the current task to obtain comprehensive data; The prediction unit is also used to input comprehensive data into the long short-term memory network to predict the real-time computing power requirements of several device terminals, and obtain the computing power prediction results through forward propagation calculation.

[0052] In one embodiment, the group module 30 includes an inverse relationship unit and a composition unit; The inverse relationship unit is used to establish a knowledge graph based on the operation data, with several device terminals as nodes, the operation data as attributes, and the relationship between several device terminals as boundaries; The inverse relation unit is also used to extract the triples corresponding to several types of relations from the knowledge graph to obtain an initial positive relation triple set; each triple in the initial positive relation triple set consists of a head entity, a corresponding relation, and a tail entity, such as (device A, CPU frequency, 2.4GHz); The inverse relation unit is further used to convert the corresponding corresponding relation into an inverse relation by exchanging the positions of several head entities and corresponding tail entities in the initial positive relation triple set; The inverse relation unit is also used to generate an inverse relation triple set according to several head entities and corresponding tail entities after the positions are interchanged, as well as the inverse relation.

[0053] A constituent unit, used for mapping the inverse relation triple set and the corresponding elements in the initial positive relation triple set; The constituent unit is further used for eliminating the first positive relationship triple if the first inverse relationship triple in the inverse relationship triple set does not have a first mapping in the first positive relationship triple corresponding to the initial positive relationship triple set, or if the first mapping exists, the head entity and the tail entity of the first inverse relationship triple are not interchanged; The constituting unit is also used to traverse the inverse relation triple set and the initial positive relation triple set to obtain a positive relation triple set formed by eliminating a number of positive relation triples from the initial positive relation triple set; The constituent unit is also used to form a triple set from a positive relation triple set and an inverse relation triple set.

[0054] In this embodiment, the grouping module 30 generates an inverse relationship triple by exchanging the positions of the head entity and the tail entity, which can expose possible errors in the initial positive relationship triple set. Therefore, the erroneous entities in the initial positive relationship triple set can be eliminated according to the inverse relationship triple set to ensure the validity of the initial positive relationship triple set. In many cases, a relationship may be expressed in only one direction. By generating an inverse relationship triple, the system can automatically fill in the missing inverse relationship, thereby enhancing the integrity of the relationship data. Moreover, by mapping the corresponding elements in the inverse relationship triple set and the initial positive relationship triple set, it is possible to clearly identify which inverse relationship triples have a direct correspondence with the initial positive relationship triple; under the condition that the mapping exists, check whether the head entity and the tail entity of the inverse relationship triple are interchanged, which is to verify the correctness of the inverse relationship. If the head and tail entities are not interchanged, it means that there are errors or inconsistencies in the initial positive relationship triple or the inverse relationship triple. If there is a mapping but the head and tail entities are not interchanged, then there is an error in the triple. Therefore, data elimination can ensure that the data used is accurate, consistent and reliable, thereby supporting the efficient and accurate execution of subsequent tasks.

[0055] In one embodiment, the embedding module 40 includes a function unit and an embedding unit; The function unit is used to establish a scoring function capable of expressing the relevance score based on the distance model and the combination possibility of the head entity, the corresponding relationship and the tail entity in the positive relationship triple set and the negative relationship triple set; The function unit is also used to establish a positive sample logarithmic loss term by setting the scoring function to a negative value based on the positive relation triple set; The function unit is also used to establish a negative sample logarithmic loss term by setting the scoring function to a positive value based on the negative relation triple set; The function unit is also used to convert the head entity, the corresponding relation and the tail entity in the positive relation triple set into regularization terms; The function unit is further used to establish a first loss function L according to the positive sample logarithmic loss term, the negative sample logarithmic loss term and the regularization term; Among them, the first loss function is: ; Among them, h, r and t are the head entity, corresponding relationship and tail entity in the positive relationship triple set respectively. is the scoring function for the set of positive relation triples, is a set of positive relation triples, , and They are the head entity, corresponding relationship and tail entity in the negative relationship triple set. is the scoring function for the set of negative relation triples, is a set of negative relation triples, is a hyperparameter; and, is the positive sample logarithmic loss term, is the negative sample logarithmic loss term, is the regularization term.

[0056] The function unit of this embodiment controls the positive and negative values ​​of the weights of positive and negative samples so that the positive sample logarithmic loss term and the negative sample logarithmic loss term can be optimized for positive relationship triples and negative relationship triples respectively. The positive sample loss term encourages the model to improve the score of positive relationship triples, while the negative sample loss term encourages the model to reduce the score of negative relationship triples, which helps the model to better distinguish between real triples and randomly combined triples. In addition, the regularization term can prevent the model from overfitting during the training process by converting the head entity, corresponding relationship and tail entity in the positive relationship triple set into constraints, so as to reduce the model's excessive dependence on training data, thereby improving the generalization ability of the model.

[0057] An embedding unit, used to map the entities and relations of the triple set into a low-dimensional vector space through a distance model, and guide the head entity of each relation in the triple set to rotate and translate according to a first loss function L, so that the angles of the tail entities corresponding to the head entities are the same or orthogonal, thereby obtaining a first embedding; Among them, the distance model is constructed as follows: The second loss function is established with the goal of ensuring that the embedding representation of the positive relationship triple set is closer than the embedding representation of the negative relationship triple set. ; According to the random combination of entities and corresponding relations in the positive relation triple set, the negative relation triple set is obtained; According to the distance between the target parameter and the tail entity in the positive relationship triple set, a distance function is established, and based on the distance function, Model; where the target parameter is the sum of the head entity and the corresponding relationship; Randomly select a small batch of triplets from the positive relation triple set and input the triplets in the small batch into The model obtains the embedding vectors of entities and relations through embedding lookup tables, and calculates the predicted values ​​according to the model architecture; the second loss function is used Compute the loss between the predicted and target values ​​for the triplets in the mini-batch; Use an automatic differentiation library (e.g. PyTorch, TensorFlow's autograd) to calculate the loss relative to The gradient of the model parameters in the model is obtained to obtain a first gradient; the absolute value of the first gradient is adjusted to a preset range by multiplying the first gradient with a preset learning rate to obtain a second gradient; By moving in the direction of the second gradient descent The model parameters of the model are updated by subtracting the product of the second gradient and the learning rate from the current parameter value The model parameters of the model are used to obtain the distance model; Among them, the second loss function is: ; Among them, h, r and t are the head entity, corresponding relationship and tail entity in the positive relationship triple set respectively. is the distance function of the set of positive relation triples, is a set of positive relation triples, , and They are the head entity, corresponding relationship and tail entity in the negative relationship triple set. is the distance function of the set of negative relation triples; is a margin hyperparameter that controls the distinction between positive and negative examples.

[0058] And, max(0, ...) is a hinge function, which is used to ensure that the embedding representation of the positive relationship triple set is only when the distance between the embedding representation of the negative relationship triple set is less than the margin , it will contribute to the loss function.

[0059] Overall, the embedding module 40 of this embodiment embeds the entities and relations of the triple set into a low-dimensional vector space. This low-dimensional embedding method helps to reduce the complexity and computational complexity of the data, while retaining the key information between the entities and relations, so that the association between the entities and relations can be effectively expressed in a relatively small space. Guided by the loss function, the model will learn how to make the head entity and the tail entity with association closer in the vector space, and the head entity and the tail entity without association farther apart during the training process. This learning process can accurately capture the semantic similarity between entities and relations; so that the embedded vector can reflect the true association of the data; requiring the head entity and the tail entity to be the same or orthogonal in angle, which further enhances the accuracy and robustness of the embedded representation.

[0060] In one embodiment, the training module 50 includes a relation unit and a training unit; The relation unit is used to calculate the similarity between the embedding vector of the first entity in the positive relation triple set and the embedding vectors of other entities in the knowledge graph to obtain a similarity value set; The relationship unit is further used to establish a set of similar entities based on the entities having similarity values ​​above a threshold value, based on the set of similarity values; The relationship unit is further used to compare the relationship set of the first entity with the relationship set of the similar entity, find out the relationship that only exists in the similar entity but not in the first entity, and obtain the missing relationship; The relation unit is also used to traverse each entity in the positive relation triple set to find their respective possible missing relations and obtain a missing relation set consisting of several missing relations.

[0061] A training unit, used for obtaining a distance value set by calculating the cosine similarity between the relation embedding vectors in the positive relation triple set; The training unit is also used to set the distance value based on the first loss function. A penalty term is added to penalize similar relationships whose distance exceeds a preset threshold, and a loss function training model is obtained; The training unit is further used to train the first embedding through a loss function training model according to the missing relationship set of all entities in the positive relationship triple set to obtain the second embedding; Among them, the calculation method of cosine similarity is: ; The first distance value in the distance value set can be expressed as: ; in, and are the first relation embedding vector and the second relation embedding vector in the positive relation triple set, and denote the modulus of the first relation embedding vector and the modulus of the second relation embedding vector, respectively. is the cosine similarity.

[0062] In the training module 50 of this embodiment, cosine similarity is used as an effective metric to obtain the similarity of vectors in direction, which helps to capture semantic associations; based on the calculated distance value set, a penalty term is added to the first loss function to penalize similar relationships whose distance exceeds a preset threshold, which actually encourages the relationship embedding learned by the model to maintain a sufficient distance in the vector space, which helps to distinguish those semantically similar but different relationships, so that the model can more accurately learn the subtle differences between relationships, thereby capturing more complex semantic associations. Since missing relationships may be potential relationships that are not explicitly expressed, by using this information to train the first embedding, the model can more comprehensively understand the complex relationships between entities and relationships, thereby obtaining a more accurate embedding representation.

[0063] In one embodiment, the allocation module 60 is specifically: Normalize the computing power prediction results and the second embedding; The normalized computing power prediction result is fused with the second embedding to obtain the actual computing power prediction result, and the computing power is dynamically allocated to several device terminals in real time according to the actual computing power prediction result.

[0064] Overall, the embodiments of the present application have the following beneficial effects: The present invention uses a neural network model to predict real-time computing power demand and can preliminarily calculate the computing power prediction results. By guiding the head entity of each relationship in the triple set to rotate and translate, so that it has the same or orthogonal angle with the corresponding tail entity, this geometric transformation actually simulates the relationship between entities in the embedding space. This transformation not only considers the direct connection between entities, but also indirectly reflects the complex semantic relationship between entities through geometric properties such as angle and orthogonality. Using the missing relationship set of all entities in the positive relationship triple set to train the first embedding is actually simulating and predicting potential relationships that are not explicitly observed but may exist. This training method enables the model to learn more about the potential associations and patterns between entities and relationships, thereby improving the model's ability to capture complex semantic associations, so that the second embedding accurately reflects the association information between several device terminals; since several device terminals run on the same device network, their network environment and status are likely to be interdependent, and different device terminals may jointly complete a complex business logic, so there will be associations between these device terminals, and through the association information, the situation of such data interaction can be effectively revealed; therefore, by finally fusing the computing power prediction result with the second embedding to obtain the actual computing power prediction result, the computing power requirements of several device terminals can be accurately reflected, ensuring the effectiveness of computing power allocation.

[0065] Embodiment three: An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the computing power allocation method of a device terminal; Wherein, the computing power allocation method of a device terminal, if implemented in the form of a software functional unit and used as an independent product, can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0066] The above are preferred embodiments of the present invention. It should be noted that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for allocating computing power of a device terminal, characterized in that: include: Obtain the operating data of several device terminals under the same device network; According to the operation data, the real-time computing power demand is predicted by a neural network model to obtain a computing power prediction result; Establishing a triple set based on the operation data; wherein the triple set includes a positive relation triple set and an inverse relation triple set; The first loss function is used to guide the head entity of each relationship in the triple set to rotate and translate, and the angle is the same or orthogonal to the tail entity corresponding to each head entity, so as to obtain a first embedding; wherein the first loss function is established according to the correlation score between the triple facts in the positive relationship triple set, combined with the regularization result of the triple facts; Training the first embedding according to the missing relation set of all entities in the positive relation triple set to obtain a second embedding; The computing power prediction result and the second embedding are integrated to obtain an actual computing power prediction result, and real-time dynamic computing power allocation is performed on the plurality of device terminals according to the actual computing power prediction result.

2. A computing power allocation method for a device terminal as claimed in claim 1, characterized in that: According to establishing a triple set based on the operation data, specifically: Establishing a knowledge graph according to the plurality of equipment terminals and the operation data; Extracting triples corresponding to several types of relations from the knowledge graph to obtain an initial positive relation triple set; wherein each triple in the initial positive relation triple set consists of a head entity, a corresponding relation and a tail entity; By exchanging the positions of several head entities and corresponding tail entities in the initial positive relationship triple set, the corresponding corresponding relationship is converted into an inverse relationship; Generate the inverse relationship triple set according to the plurality of head entities and the corresponding tail entities after the positions are interchanged, and the inverse relationship; According to the inverse relationship triple set, erroneous entities in the initial positive relationship triple set are eliminated to obtain the positive relationship triple set, and the triple set is composed of the positive relationship triple set and the inverse relationship triple set.

3. A computing power allocation method for a device terminal as claimed in claim 2, characterized in that: Eliminating the erroneous entities in the initial positive relationship triple set according to the inverse relationship triple set to obtain the positive relationship triple set is specifically: Establish a mapping between the inverse relation triple set and corresponding elements in the initial positive relation triple set; If the first inverse relation triple in the inverse relation triple set does not have a first mapping in the first positive relation triple corresponding to the initial positive relation triple set, or if the first mapping exists, the head entity and the tail entity of the first inverse relation triple are not interchanged, then the first positive relation triple is eliminated; The inverse relation triple set and the initial positive relation triple set are traversed to obtain the positive relation triple set after eliminating a number of positive relation triples.

4. A computing power allocation method for a device terminal as claimed in claim 1, characterized in that: The first loss function is used to guide the head entity of each relationship in the triple set to rotate and translate, and the angles are the same or orthogonal to the tail entities corresponding to the head entities, so as to obtain the first embedding, which is specifically: Mapping the entities and relations of the triple set to a low-dimensional vector space through a distance model, and guiding the head entity of each relation in the triple set to rotate and translate according to the first loss function, so that the angles are the same or orthogonal to the tail entities corresponding to the head entities, thereby obtaining the first embedding; In which, the distance model is obtained by optimizing the distance function through the second loss function, and the second loss function is established with the goal of ensuring that the embedding representation of the positive relationship triple set is closer than the embedding representation of the negative relationship triple set. The negative relationship triple set is obtained by randomly combining the entities and corresponding relationships in the positive relationship triple set, and the distance function is established based on the embedding representation in the positive relationship triple set.

5. A method for allocating computing power of a device terminal as claimed in claim 4, characterized in that: The first loss function is established based on the correlation scores between the triple facts in the positive relationship triple set and the regularization results of the triple facts, specifically: Based on the distance model, a scoring function capable of expressing a relevance score is established according to the combination possibility of the head entity, the corresponding relationship and the tail entity in the positive relationship triple set and the negative relationship triple set; By controlling the positive and negative values ​​of the weights of the positive and negative samples, a positive sample logarithmic loss term and a negative sample logarithmic loss term are established based on the scoring function; Converting the head entity, the corresponding relationship and the tail entity in the positive relationship triple set into regularization terms; The first loss function is established according to the positive sample logarithmic loss term, the negative sample logarithmic loss term and the regularization term.

6. A method for allocating computing power of a device terminal as claimed in claim 5, characterized in that: By controlling the positive and negative values ​​of the weights of the positive and negative samples, a positive sample logarithmic loss term and a negative sample logarithmic loss term are established based on the scoring function, specifically: Based on the positive relation triple set, establishing the positive sample logarithmic loss term by setting the scoring function to a negative value; Based on the negative relation triple set, the negative sample logarithmic loss term is established by setting the scoring function to a positive value.

7. A method for allocating computing power of a device terminal as claimed in claim 5, characterized in that: The first loss function is specifically: ; Among them, h, r and t are the head entity, corresponding relationship and tail entity in the positive relationship triple set respectively. is the scoring function of the positive relation triple set, is the set of positive relation triples, , and are respectively the head entity, corresponding relationship and tail entity in the negative relationship triple set, is the scoring function of the negative relation triple set, is the negative relation triple set, is a hyperparameter.

8. A computing power allocation method for a device terminal as claimed in claim 1, characterized in that: The first embedding is trained according to the missing relation set of all entities in the positive relation triple set to obtain the second embedding, specifically: By calculating the cosine similarity between the relation embedding vectors in the positive relation triple set, a distance value set is obtained; Based on the distance value set, a penalty term is added to the first loss function to penalize similar relationships whose distance exceeds a preset threshold, thereby obtaining a loss function training model; According to the missing relationship set of all entities in the positive relationship triple set, the first embedding is trained by the loss function training model to obtain the second embedding.

9. A method for allocating computing power of a device terminal as claimed in claim 1, characterized in that: According to the operation data, the real-time computing power demand is predicted through the neural network model to obtain the computing power prediction result, which is specifically: Inputting the operation data into a long short-term memory network to predict the real-time computing power requirements of a plurality of device terminals, and obtaining the computing power prediction result; The long short-term memory network is obtained by updating the weights and bias items of the initial long short-term memory network using gradient descent and adjusting the learning rate.

10. A computing power distribution system for a device terminal, characterized in that: It includes data module, prediction module, group module, embedding module, training module and allocation module; Wherein, the data module is used to obtain the operation data of several device terminals under the same device network; The prediction module is used to predict the real-time computing power demand through a neural network model according to the operation data to obtain a computing power prediction result; The grouping module is used to establish a triple set based on the operation data; wherein the triple set includes a positive relationship triple set and an inverse relationship triple set; The embedding module is used to guide the head entity of each relationship in the triple set to rotate and translate through a first loss function, so that the angle is the same as or orthogonal to the tail entity corresponding to each head entity, so as to obtain a first embedding; wherein the first loss function is established according to the correlation score between the triple facts in the positive relationship triple set, combined with the regularization result of the triple facts; The training module is used to train the first embedding according to the missing relationship set of all entities in the positive relationship triple set to obtain a second embedding; The allocation module is used to fuse the computing power prediction result and the second embedding to obtain an actual computing power prediction result, and to perform real-time dynamic computing power allocation to the plurality of device terminals according to the actual computing power prediction result.

Citation Information

Patent Citations

  • Knowledge graph embedding model training method and system and electronic equipment

    CN112182245A

  • Link prediction method and model in mapping knowledge domain embedding based on complex space cyclic correlation model

    CN117875423A

  • Knowledge graph link prediction method

    CN117952206A

  • Calculation power configuration detection method and system based on big data

    CN118626831A

Cited By

  • Computing power demand prediction system using deep learning

    CN119271973A

  • AI cluster training method adopting distributed energy and related device

    CN119808890A