A decentralized trust relationship collaborative prediction method and related device
By using graph neural networks within a blockchain and federated learning framework, we have achieved trust relationship prediction in multi-source distributed scenarios. This solves the accuracy and adaptability issues of traditional methods in cross-institutional scenarios and improves the accuracy and flexibility of trust assessment.
Patent Information
- Application Number
- CN202411928491.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing trust relationship prediction schemes are typically geared towards centralized scenarios and cannot be used in scenarios where different institutions are distributed across different locations. Furthermore, federated learning-based schemes fail to adequately consider feature propagation across clients, resulting in low trust assessment accuracy.
A decentralized collaborative prediction method for trust relationships is adopted. Through a blockchain system and a federated learning framework, a user feature extraction and relationship prediction model is built locally. A public knowledge graph is used for feature updates and model training. A graph neural network is combined to perform cross-client feature propagation and model fusion, thereby achieving accurate prediction of trust relationships.
While protecting data privacy, the system makes full use of multi-source data, improving the accuracy and generalization ability of trust relationship prediction, adapting to different application scenarios with flexibility and scalability, and enhancing the accuracy and stability of trust assessment.
Smart Images

Figure CN119691080B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of trust relationship prediction, and particularly relates to a decentralized trust relationship collaborative prediction method and related device. BACKGROUND
[0002] Trust evaluation is a process of evaluating trust by quantifying the attributes that affect trust, and has many applications in sensor networks, social networks, mobile crowdsourcing, blockchains, etc. Traditional trust evaluation schemes are based on heuristic trust theories, and usually fuse user attributes and user ratings based on pre-defined trust models to obtain the comprehensive trust score of users or the trust relationship between users. The effectiveness of such methods greatly depends on the pre-defined model, and they have poor universality and cannot be flexibly applied to different scenarios. In view of the limitations of traditional trust evaluation algorithms, some scholars have applied machine learning algorithms to trust evaluation, automatically processing trust-related data through machine learning models, extracting user trust features, and predicting the trust relationship between users. Traditional trust evaluation algorithms based on machine learning are usually based on matrix decomposition theory, which represents the trust relationship between users as a matrix, decomposes the matrix, obtains the node trust features and trusted features, and then performs matrix multiplication to obtain the complete trust relationship matrix. For example, Fazeli et al. explored the effectiveness of different measurement methods in matrix decomposition-based trust relationship evaluation and proposed a matrix decomposition trust evaluation algorithm based on implicit trust ratings, which integrates implicit trust ratings into matrix decomposition instead of explicit trust relationships, and proves through experiments that the model can achieve similar performance without explicit trust ratings. Similar work has also been applied in. The matrix decomposition-based method has shown good effectiveness, but this method cannot mine deep complex features of nodes because it is based on a shallow model, and it is difficult to effectively discover the complex nonlinear mapping relationship between user trust features and trust relationships.
[0003] To solve the above problems, some scholars introduce deep learning models for trust feature extraction and trust relationship prediction. By modeling the trust relationship as a graph and using a graph convolutional neural network for processing, such models have achieved good results. For example: Guardian uses a graph convolutional neural network to process two trust features of users separately and fuse them, and builds a trust relationship prediction scheme based on a graph convolutional neural network; On this basis, KGTrust further integrates other social networks in addition to the trust relationship network to expand the trust relationship graph and achieve certain performance improvement; GATTrust integrates trust features from different fields based on an attention mechanism to improve trust prediction performance; Some works further consider the dynamics of trust and build a dynamic trust relationship prediction mechanism based on a dynamic graph neural network, such as TrustGuard. The above works have solved the trust relationship prediction problem well.
[0004] However, the above work has the following problems:
[0005] 1. Existing neural network-based trust relationship prediction schemes are usually designed for centralized scenarios and do not consider multi-source distributed trust relationship data scenarios, and cannot predict trust relationships in scenarios where trust relationship data is distributed across different institutions;
[0006] 2. Existing federated learning-based trust relationship prediction schemes do not consider cross-client feature propagation, and the learned features are not sufficient, resulting in low accuracy of trust evaluation. SUMMARY
[0007] The purpose of the present application is to provide a decentralized trust relationship collaborative prediction method and related device to solve the above problems.
[0008] To achieve the above purpose, the present application adopts the following technical solutions:
[0009] In a first aspect, the present application provides a decentralized trust relationship collaborative prediction method, comprising:
[0010] Starting a blockchain system and publishing public security parameters and an initialization model on the blockchain, and loading a consensus algorithm on a consensus node;
[0011] Constructing a local complete graph using local data, pre-training a user feature extraction and relationship prediction model on the local graph to obtain user node features;
[0012] Establishing a public graph based on public knowledge, and sending the public graph to a blockchain consensus node for consensus confirmation of the public graph;
[0013] Through the disclosed graph as an intermediate node, the features of the user nodes are updated, the user feature extraction and relationship prediction model is trained, the trained model is sent to the blockchain, the model fusion is completed based on the federated average algorithm, until the target function converges, and the final trust relationship prediction model is output.
[0014] Further, the blockchain system is started and the public security parameter and the initialization model are published on the blockchain, and the consensus algorithm is loaded on the consensus node, including:
[0015] A group of nodes are selected as the consensus nodes of the blockchain, and the consensus nodes negotiate the public key and the public security parameter of the encryption system;
[0016] The consensus mechanism is established, and the blockchain is started;
[0017] The consensus node randomizes the model parameters and fuses them by using the smart contract, and publishes the blockchain or the public security parameter on the blockchain.
[0018] Further, the local complete graph is constructed by using the local data, including:
[0019] Each client The user social behavior graph is constructed by using the local data And the trust relationship graph The local complete graph is constructed with the user as the center ;
[0020] For the user behavior data of each client locally, other entity nodes outside the user are introduced, the interaction relationship between the user and the user and the user and other objects is collected with the user as the center, the interaction objects are taken as nodes, and the interaction relationship is taken as edges, and a social relationship graph under this perspective is constructed ;
[0021] The edge features are generated for the edge information, for numerical data, standardization and discretization processing are performed, and then the one-hot encoding is used to construct the edge features; for complex data such as text comments and picture comments, a feature extractor is used for feature extraction;
[0022] For the user node, the personal public attribute information is used for modeling; for the commodity, article and movie nodes, the attribute information and public description are comprehensively used, and a multi-modal feature extractor is used for feature initialization.
[0023] Further, the user feature extraction and relationship prediction model is obtained by pre-training on the local graph, and the features of the user nodes are obtained, including:
[0024] Each client , for a given node , its features in the graph The neighbor set is , the node , and the edge of the node is denoted as , and the feature is denoted as , then The attention parameter of is calculated by the following formula:
[0025]
[0026] The attention score is obtained After that, the output of the given layer is , and the output of the layer is:
[0027]
[0028] Based on the attention mechanism, a multi-head attention mechanism is further designed, that is, containing Independent attention respectively extracts features and performs feature fusion; assuming that the feature extracted by the Attention mechanism is , the output of the layer is:
[0029]
[0030] Feature output: after completing the feature extraction of all Layers, output the final feature .
[0031] Further, the public knowledge graph based on the public knowledge is established, and the public graph is sent to the block chain consensus node. The consensus confirmation of the public graph is carried out, including:
[0032] For non-user nodes of goods, movies and music, search for related expected data for knowledge graph construction according to node types;
[0033] Use named entity recognition and relationship extraction to extract knowledge from the corpus, extract the relationship between nodes, and form a public knowledge graph , It should cover the non-user node entities contained in the user client local data;
[0034] The graph based on the public knowledge is denoted as , It is sent to the block chain consensus node, and the consensus node verifies the correctness of the knowledge graph content. After verification, the consensus algorithm is called to complete the consensus confirmation of .
[0035] Further, the public graph is used as an intermediate node to update the features of the user nodes, train the user feature extraction and relationship prediction model, send the trained model to the blockchain, complete the fusion of the model based on the federated average algorithm, until the target function converges, output the final trust relationship prediction model, including:
[0036] Each client updates the user features by discovering cross-client neighbors and propagating features as an intermediate node, and completes the training of the model , and sends the features of the knowledge entities contained in to the blockchain, which fuses the knowledge entity features sent by different clients using a graph attention mechanism and publishes them on the blockchain;
[0037] The client sends the locally trained model to the blockchain, and the blockchain consensus node verifies the validity of the model, and when a sufficient number of models are collected or the waiting time exceeds the pre-set rain, the model fusion smart contract is loaded, and the fusion of the model is completed based on the federated average algorithm, and the fusion method is as follows:
[0038]
[0039] Then, the blockchain consensus mechanism is called to complete the consensus of , and it is published on the blockchain;
[0040] Each client and blockchain consensus node cycles until the target function converges, outputting the final trust relationship prediction model ;
[0041] The client loads the final model to process local data, given a user and , its trust features are extracted , and trust relationship prediction results .
[0042] Further, federated learning and cross-client feature propagation include the following steps:
[0043] Local graph expansion based on public knowledge graph: the client fuses the local graph with the public knowledge graph , first extracts the non-user node set in the local graph , and uses it as a constraint in The subgraph is extracted And And Fusion is
[0044] The multi-head attention mechanism is used to process Output the updated features of the user And The features of the nodes And publish the feature set on the blockchain;
[0045] The blockchain smart contract uses the preloaded GCN model to simply aggregate the node features, and for the node , the feature representation from different clients is represented as , and the comprehensive feature is And publish the result on the blockchain.
[0046] In a second aspect, the present application provides a decentralized trust relationship collaborative prediction system, comprising:
[0047] The initialization module is used to start the blockchain system and publish the public security parameters and the initialization model on the blockchain, and load the consensus algorithm on the consensus node;
[0048] The graph construction module is used to construct a local complete graph using local data, pre-train the user feature extraction and relationship prediction model on the local graph, and obtain the features of the user nodes;
[0049] The public graph construction module is used to establish a public graph based on public knowledge, and the public graph is sent to the blockchain consensus node for consensus confirmation of the public graph;
[0050] The training output module is used to update the features of the user nodes through the public graph as an intermediate node, train the user feature extraction and relationship prediction model, send the trained model to the blockchain, complete the fusion of the model based on the federated average algorithm, until the target function converges, and output the final trust relationship prediction model.
[0051] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to realize the steps of the decentralized trust relationship collaborative prediction method.
[0052] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to realize the steps of the decentralized trust relationship collaborative prediction method.
[0053] Compared with the prior art, the present application has the following technical effects:
[0054] The decentralized trust relationship collaborative prediction method based on federated learning and graph neural network of the present application aims to solve the limitations of traditional trust evaluation methods in multi-source distributed scenarios and improve the accuracy of trust relationship prediction.
[0055] The present application realizes model training and feature extraction under the premise that data does not leave the local by introducing a federated learning framework. Each client (such as a social platform) can independently build a local social behavior graph and trust relationship graph and perform collaborative training through a federated learning mechanism. This decentralized processing method not only protects data privacy but also enables the model to fully utilize multi-source data, improving the accuracy and generalization ability of trust relationship prediction.
[0056] The present application breaks down the data barriers between different clients by introducing a public knowledge graph as an intermediate layer. The knowledge graph contains rich entity and relationship information, which can provide additional supplements and enhancements for user trust features. Through feature propagation and updating on the knowledge graph by the graph neural network, the user's trust features are more rich and comprehensive, thereby improving the accuracy of trust relationship prediction.
[0057] The present application combines the advantages of federated learning and graph neural network, enabling the model to fully utilize multi-source data and external knowledge to extract user trust features and predict trust relationships between users. This comprehensive prediction method that integrates multiple aspects of information is more accurate and reliable than traditional single methods.
[0058] In the fields of social network platforms, mobile crowdsourcing, blockchains, etc., accurate trust relationship prediction is of great significance in improving user experience, reducing transaction risk, promoting social interaction, etc. The application of the present application can significantly improve the trust evaluation capability in these fields and provide strong support for the healthy development of related businesses.
[0059] The method of the present application can be flexibly adjusted according to different application scenarios and requirements. For example, specific knowledge graphs and model parameters can be constructed for different social platforms or business fields to adapt to different trust evaluation requirements.
[0060] The method of the present application can be easily extended to more application scenarios and data types. For example, more external data sources can be introduced to enrich the content of the knowledge graph, or more advanced graph neural network models can be used to improve the ability of feature extraction and relationship prediction.
[0061] In summary, the present application creates a decentralized trust relationship collaborative prediction method based on federated learning and graph neural network. This method not only supports cross-source trust relationship prediction, but also enriches the trust features of users by introducing external knowledge, thereby improving the accuracy and precision of trust evaluation. At the same time, this method also has good flexibility and scalability, providing strong support for the future development of trust evaluation technology. BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1 The flowchart of the present application. DETAILED DESCRIPTION
[0063] The present application is further illustrated below in conjunction with the accompanying drawings:
[0064] Example 1, please refer to Figure 1 The present application provides a decentralized trust relationship collaborative prediction method, comprising:
[0065] Starting the blockchain system and publishing the public security parameters and initialization model on the blockchain, loading the consensus algorithm on the consensus node;
[0066] Constructing a complete local graph using local data, pre-training the user feature extraction and relationship prediction model on the local graph to obtain the features of the user nodes;
[0067] Establishing a public graph based on public knowledge, sending the public graph to the blockchain consensus node for consensus confirmation of the public graph;
[0068] Updating the features of the user nodes through the public graph as an intermediate node, training the user feature extraction and relationship prediction model, sending the trained model to the blockchain, and completing the fusion of the model based on the federated average algorithm until the target function converges, outputting the final trust relationship prediction model.
[0069] By publishing the public security parameters and initialization model on the blockchain and utilizing the distributed and tamper-proof characteristics of the blockchain, the security and integrity of the data are ensured.
[0070] The user data is preprocessed and feature extracted locally, avoiding direct uploading of raw data to the central server, thereby effectively protecting the user privacy.
[0071] Constructing a complete local graph using local data and pre-training, so that the model can fully learn the characteristics of the local data.
[0072] Updating the features of the user nodes through the public graph as an intermediate node, further enriching the learning content of the model and improving the generalization ability of the model.
[0073] The method adopts a decentralized architecture, with each node independently training and updating local models, and then fusing the models through blockchain and federated averaging algorithm.
[0074] This decentralized approach avoids single point of failure and centralized data monopoly problems, improving system stability and reliability.
[0075] The introduction of public graph provides more background knowledge and associated information for the model, which helps to better understand the relationship and trust between users.
[0076] The application of federated averaging algorithm enables each node's model to learn from each other, continuously optimizing and improving the accuracy of prediction.
[0077] The establishment of public graph and consensus confirmation mechanism promotes knowledge sharing and updating. Each node can jointly maintain and update the public graph to ensure its timeliness and accuracy.
[0078] This knowledge sharing approach helps to improve the intelligence level and prediction ability of the entire system.
[0079] This method has high flexibility and scalability. Model parameters and algorithms can be adjusted according to actual needs to adapt to different application scenarios and data sets.
[0080] At the same time, with the development of blockchain technology and federated learning, new technologies and algorithms can be introduced to further improve the performance and effect of the method.
[0081] In summary, this decentralized trust relationship collaborative prediction method combines blockchain technology and federated learning principles to accurately predict user trust relationships while protecting user privacy and data security, with broad application prospects and important practical value.
[0082] In embodiment 2, the present application provides a decentralized trust relationship collaborative prediction method, which specifically includes:
[0083] System initialization: consensus nodes load consensus algorithm, agree on public security parameters, initialize model parameters , start the blockchain system and publish the public security parameters and initialized model on the blockchain;
[0084] Image construction module: each client constructs user social behavior graph and trust relationship graph with user as the center, constructs local complete graph ;
[0085] Disclosed knowledge graph modeling: for specific application scenarios, the disclosed information is modeled by graph to break through the data barriers of different clients, and the graph established based on the disclosed knowledge is denoted as , It is sent to the blockchain consensus node, and the consensus node verifies the correctness of the knowledge graph content. After verification, the consensus algorithm is called to complete the consensus confirmation of ;
[0086] Local learning and feature propagation: each client pre-trains the user feature extraction and relationship prediction model in the local graph , obtains the features of the user nodes ;
[0087] Joint learning and cross-client feature propagation: each client discovers cross-client neighbors through as an intermediate node and performs feature propagation to update the user features, complete the training of the model , and send the features of the knowledge entities contained in to the blockchain. The blockchain fuses the knowledge entity features sent by different clients using a graph attention mechanism and publishes them on the blockchain.
[0088] Model fusion based on weighted federated average algorithm: the client sends the locally trained model to the blockchain, and the blockchain consensus node verifies the validity of the model. When a sufficient number of models are collected or the waiting time exceeds the pre-set rain, the model fusion smart contract is loaded, and the model fusion is completed based on the federated average algorithm. The fusion method is as follows:
[0089]
[0090] Then, the consensus mechanism of the blockchain is called to complete the consensus of , and it is published on the blockchain.
[0091] Model training: each client and the blockchain consensus node complete the above (4)-(6) in a cycle until the target function converges, and output the final trust relationship prediction model ;
[0092] Model application: the client loads the final model to process local data, given user and , the trust features , and trust relationship prediction results are extracted.
[0093] The system initialization mainly includes the following steps:
[0094] Select a group of suitable nodes as blockchain consensus nodes, and the consensus nodes negotiate public security parameters such as public keys and encryption systems;
[0095] Establish a consensus mechanism, such as Practical Byzantine Fault Tolerance Algorithm (PBFT), Raft, Proof of Stake (PoS), Algorand, Dfinity, etc., and start the blockchain;
[0096] The consensus nodes randomize the model parameters and fuse them using smart contracts, and publish the blockchain or public security parameters on the blockchain;
[0097] The composition module mainly includes the following steps:
[0098] For each client's local user behavior data, introduce other entity nodes outside the user, take the user (such as ) as the center, collect the interaction relationship between users (such as attention, trust relationship, etc.) and other objects (such as goods, articles, etc.), take these interaction objects as nodes, and take the interaction relationship as edges, and construct a social relationship graph in this perspective ;
[0099] Edge feature extraction: generate edge features for edge information. For numerical data (such as ratings), standardize and discretize the data, and then use one-hot encoding to construct edge features. For complex data (such as text comments, picture comments, etc.), use feature extractors for feature extraction, such as CLIP, BERT, Convolutional Neural Network (CNN), etc.
[0100] Node feature extraction: For user nodes, use their personal public attribute information for modeling; for other nodes (such as goods, articles, movies, etc.), use their attribute information, public description, etc., and flexibly use multi-modal feature extractors for feature initialization.
[0101] The public knowledge graph modeling mainly includes the following steps:
[0102] Corpus construction: For non-user nodes (such as goods, movies, music, etc.), search for related pre-estimated data for knowledge graph construction according to node types;
[0103] Knowledge graph construction: knowledge extraction is performed on the corpus using named entity recognition and relation extraction to extract the relationships between nodes and form a knowledge graph , Non-user node entities contained in the user client local data should be covered;
[0104] The local learning and feature propagation based on the multi-head graph attention network mainly includes the following steps:
[0105] Feature propagation and fusion based on attention mechanism: each client For a given node , its graph neighbor set is , node , and the edge of node is , and the feature is , then the attention parameter of is calculated as follows:
[0106]
[0107] The attention score is obtained, and the output of the th layer is , then the output of the th layer is:
[0108]
[0109] Multi-head attention mechanism: based on the attention mechanism, a multi-head attention mechanism is further designed, that is, it contains independent attention mechanisms to extract features and perform feature fusion. Assuming that the feature extracted by the th attention mechanism is , then the output of the th layer is:
[0110]
[0111] Feature output: after completing the feature extraction of all layers, the final feature is output;
[0112] The joint learning and cross-client feature propagation module mainly includes the following steps:
[0113] Local graph expansion based on public knowledge graph: the client expands the local graph with the public knowledge graph Fusion is performed first, the local graph is extracted , and the subgraph is extracted with the constraint , and and are fused into
[0114] Feature propagation and update: use multi-head attention mechanism to process , output the updated features of users and , and publish the feature set on the blockchain; The blockchain smart contract uses the preloaded GCN model to simply aggregate the node features. For node
[0115] , its feature from different clients is represented as , and its comprehensive feature is , and the result is published on the blockchain.
[0116] For trust evaluation in social network platforms such as ubiquitous social networks and mobile crowdsourcing, the platform mainly includes social network platforms and users. For easy representation, this patent represents the th social platform as , different social platforms provide different online social services, such as instant messaging, information, shopping, etc. At the same time, they are responsible for predicting trust relationships according to user trust relationships and social behavior to better serve users. The algorithms involved in this patent are all deployed on social platforms. For , the platform maintains local social behavior graph and trust relationship graph , which are further fused into a complete local graph centered on users; in addition, we assume that different clients share a common knowledge graph to connect different social platform data; the algorithm designed in this patent is based on federated learning, which coordinates the collaborative training between different clients (i.e. social platforms). This patent introduces a blockchain system to build a decentralized learning platform, and uses a blockchain smart contract to fuse the models or features learned by different clients; the user set is represented as , and users use the social services provided by , and form trust or distrust trust relationship information with other users according to personal preferences.
[0117] A graph neural network is used as a basic feature extraction model, a multi-source collaborative trust relationship evaluation scheme is constructed by combining the federated learning idea, external knowledge is introduced as an intermediate layer, the distributed node features of cross clients are organically fused, and accurate trust evaluation is realized in a distributed scene.
[0118] In another embodiment of the application, a decentralized trust relationship collaborative prediction system is provided, which can be used to realize the above-mentioned decentralized trust relationship collaborative prediction method.
[0119] The initialization module is used to start the blockchain system and publish the public security parameters and the initialization model on the blockchain, and load the consensus algorithm on the consensus node.
[0120] The graph construction module is used to construct a local complete graph using local data, pre-train the user feature extraction and relationship prediction model on the local graph, and obtain the features of the user nodes.
[0121] The public graph construction module is used to establish a public graph based on public knowledge, and the public graph is sent to the blockchain consensus node for consensus confirmation.
[0122] The training output module is used to update the features of the user nodes by taking the public graph as an intermediate node, train the user feature extraction and relationship prediction model, send the trained model to the blockchain, complete the fusion of the model based on the federated average algorithm, until the target function converges, and output the final trust relationship prediction model.
[0123] The division of the modules in the embodiments of the application is illustrative, and is only a logical function division.
[0124] In another embodiment of the present application, a computer device is provided, which comprises a processor and a memory, the memory is configured to store a computer program, the computer program comprises program instructions, and the processor is configured to execute the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are particularly suitable for loading and executing one or more instructions in the computer storage medium to implement a corresponding method process or a corresponding function; the processor in the embodiments of the present application can be used for the operation of the decentralized trust relationship collaborative prediction method.
[0125] In another embodiment of the present application, the present application further provides a storage medium, specifically a computer readable storage medium (Memory), which is a memory device in a computer device, and is configured to store programs and data. It can be understood that the computer readable storage medium herein can include an internal storage medium in the computer device, and of course can also include an expansion storage medium supported by the computer device. The computer readable storage medium provides a storage space, and the storage space stores an operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and the instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory. One or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the above-mentioned embodiments of the decentralized trust relationship collaborative prediction method.
[0126] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.
[0127] The present application is described in reference to the flowchart and / or block diagrams of the method, apparatus (system) and computer program product according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0128] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.
[0130] Finally, it should be noted that the above-mentioned embodiments are merely intended for describing the technical solutions of the present application, but not for limiting it. Although the present application is described in detail with reference to the above embodiments, those skilled in the field should understand that the specific embodiments of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and any modification or equivalent replacement without departing from the spirit and scope of the present application should be covered in the protection scope of the claims of the present application.
Claims
1. A method for collaborative prediction of decentralized trust relationships, characterized in that, The method comprises the following steps: starting a blockchain system and publishing public security parameters and an initialization model on the blockchain, and loading a consensus algorithm on a consensus node; constructing a local complete graph using local data, pre-training the local graph to obtain a user feature extraction and relationship prediction model, and obtaining features of user nodes; establishing a public graph based on public knowledge, sending the public graph to a blockchain consensus node, and performing consensus confirmation on the public graph; updating the features of the user nodes using the public graph as an intermediate node, training the user feature extraction and relationship prediction model, sending the trained model to the blockchain, completing fusion of the model based on a federated average algorithm, until the target function converges, and outputting a final trust relationship prediction model; The method for establishing a public knowledge graph based on public knowledge and sending the public graph to a blockchain consensus node for consensus confirmation on the public graph comprises the following steps: For non-user nodes of commodities, movies, and music, search for related expected data for knowledge graph construction according to the node type; The corpus is subjected to knowledge extraction by named entity recognition and relation extraction to extract the relations between nodes to form a public knowledge graph , The non-user node entities contained in the user client local data should be covered. The graph established based on the public knowledge is denoted as , is sent to a blockchain consensus node, the consensus node verifies the correctness of the knowledge graph content, and after verification, a consensus algorithm is called to complete the consensus confirmation of the . The method for updating the features of the user nodes using the public graph as an intermediate node, training the user feature extraction and relationship prediction model, sending the trained model to the blockchain, completing fusion of the model based on a federated average algorithm, until the target function converges, and outputting a final trust relationship prediction model comprises the following steps: Each client through As an intermediary node, it discovers neighbors across clients and performs feature propagation, updating user features and simultaneously optimizing the model. The training, and The features of the knowledge entities contained therein are sent to the blockchain. The blockchain uses a graph attention mechanism to fuse the features of the knowledge entities sent by different clients and publishes them on the blockchain. The client sends the locally trained model to the blockchain, the blockchain consensus nodes then verify the validity of the model, when a sufficient number of models are collected or the waiting time exceeds the pre-set threshold, the model fusion smart contract is loaded, and the fusion of the models is completed based on the federated averaging algorithm. The fusion method is as follows: Subsequently, a blockchain consensus mechanism is called to complete consensus on and publish it on the blockchain; The various clients and blockchain consensus nodes circulate until the objective function converges, outputting a final trust relationship prediction model ; Client loads final model Process local data, given user And , with Extract its trust features , And trust relationship prediction results ; The federated learning and cross-client feature propagation comprise the following steps: Local graph augmentation based on public knowledge graphs: Client Local map With public knowledge graphs To perform the fusion, the local map is first extracted. non-user node set in and use this as a constraint Extracting subgraphs and will and To merge into Utilizing a multi-head attention mechanism to process output updated features of the user and features of the intermediate nodes and publish the set of features on a blockchain; The blockchain smart contract utilizes the preloaded GCN model to simply aggregate the node features, and the node is represented as from different clients, and the comprehensive features thereof are obtained as , and the result is published on the blockchain.
2. The method of claim 1, wherein, The method for starting a blockchain system and publishing public security parameters and an initialization model on the blockchain, and loading a consensus algorithm on a consensus node comprises the following steps: selecting a group of nodes as blockchain consensus nodes, and negotiating public keys and public security parameters of an encryption system by the consensus nodes; establishing a consensus mechanism and starting a blockchain; randomizing model parameters by the consensus nodes, fusing the model by using a smart contract, and publishing the blockchain or the public security parameters on the blockchain.
3. The method of claim 1, wherein, The method for constructing a local complete graph using local data comprises the following steps: Various clients Constructing user social behavior graphs with local data And trust graphs User-centric, local complete graph construction ; For the user behavior data local to each client, other entity nodes outside the user are introduced, the user is taken as the center, the interaction relationship between users and other objects is collected, the interaction objects are taken as nodes, the interaction relationship is taken as edges, and a social relationship graph under this perspective is constructed ; generating edge features for edge information, standardizing and discretizing numerical data, and then constructing edge features by using one-hot encoding; for complex data such as text comments and picture comments, a feature extractor is used for feature extraction; for user nodes, modeling is performed using personal public attribute information; for commodity, article, and movie nodes, attribute information and public descriptions are comprehensively utilized, and a multi-modal feature extractor is used for feature initialization.
4. The method of claim 1, wherein, The method for pre-training a user feature extraction and relationship prediction model on a local graph to obtain features of user nodes comprises the following steps: Each client For a given node Its neighbors are The set of neighbors is The node , And the edge from node Is denoted And the feature is denoted Then The attention parameters Are computed using the following formula: obtaining an attention score After that, given the layer output is then the output of the layer is: Based on the attention mechanism, a multi-head attention mechanism is further designed, that is, containing independent attentions respectively extracting features and performing feature fusion; assuming that the features extracted by the first attention mechanism are , the output of the first layer is: Feature output: when all layers are done the final features are output . 5.A decentralized trust relationship collaborative prediction system, characterized in that, The method comprises the following steps: an initialization module for starting a blockchain system and publishing public security parameters and an initialization model on the blockchain, and loading a consensus algorithm on a consensus node; a graph construction module for constructing a local complete graph using local data, pre-training the local graph to obtain a user feature extraction and relationship prediction model, and obtaining features of user nodes; a public graph construction module for establishing a public graph based on public knowledge, sending the public graph to a blockchain consensus node, and performing consensus confirmation on the public graph; The training output module is configured to update the features of the user nodes by using the public graph as an intermediate node, train the user feature extraction and relationship prediction model, send the trained model to the blockchain, complete the fusion of the model based on a federated average algorithm, until the target function converges, and output the final trust relationship prediction model. The public knowledge graph is established based on the public knowledge, and the public graph is sent to the consensus node of the blockchain for consensus confirmation of the public graph, including: For non-user nodes of commodities, movies, and music, search for related expected data for knowledge graph construction according to the node type; The corpus is subjected to knowledge extraction by named entity recognition and relation extraction to extract the relations between nodes to form a public knowledge graph , Should cover non-user node entities contained in the user client local data; The graph established based on the public knowledge is denoted as , is sent to a blockchain consensus node, the consensus node verifies the correctness of the knowledge graph content, and after verification, a consensus algorithm is called to complete the consensus confirmation of the . The training output module is configured to update the features of the user nodes by using the public graph as an intermediate node, train the user feature extraction and relationship prediction model, send the trained model to the blockchain, complete the fusion of the model based on a federated average algorithm, until the target function converges, and output the final trust relationship prediction model. Each client through As an intermediary node, it discovers neighbors across clients and performs feature propagation, updating user features and simultaneously optimizing the model. The training, and The features of the knowledge entities contained therein are sent to the blockchain. The blockchain uses a graph attention mechanism to fuse the features of the knowledge entities sent by different clients and publishes them on the blockchain. The client sends the locally trained model to the blockchain, the blockchain consensus nodes then verify the validity of the model, when a sufficient number of models are collected or the waiting time exceeds the pre-set threshold, the model fusion smart contract is loaded, and the fusion of the models is completed based on the federated averaging algorithm. The fusion method is as follows: Subsequently, a blockchain consensus mechanism is called to complete consensus on and publish it on the blockchain; The various clients and blockchain consensus nodes circulate until the objective function converges, outputting a final trust relationship prediction model ; Client loads final model Process local data, given user And , with Extract its trust features , And trust relationship prediction results ; The federated learning and cross-client feature propagation include the following steps: Local graph augmentation based on public knowledge graphs: Client Local map With public knowledge graphs To perform the fusion, the local map is first extracted. non-user node set in and use this as a constraint Extracting subgraphs and will and To merge into Using multi-head attention mechanism Process the data and output the updated user features. and Features of middle nodes And publish the feature set on the blockchain; The blockchain smart contract utilizes the preloaded GCN model to simply aggregate the node features, and the node characteristics from different clients are represented as , and the comprehensive features are obtained as , and the results are published on the blockchain.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the decentralized trust relationship collaborative prediction method according to any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, wherein the computer program comprises the following steps of: receiving a request for a resource from a client; determining whether the client is authorized to access the resource; and if the client is authorized to access the resource, providing the resource to the client. The computer program is executed by the processor to implement the steps of the decentralized trust relationship collaborative prediction method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Knowledge graph verification and updating method based on block chain distributed double consensus
CN111460168A
Federal knowledge graph enhancement method and system based on block chain privacy protection
CN118504030A