CN115600642A - Streaming media-oriented decentralized federal learning method based on neighbor trust aggregation - Google Patents

Streaming media-oriented decentralized federal learning method based on neighbor trust aggregation Download PDF

Info

Publication number
CN115600642A
CN115600642A CN202211234598.1A CN202211234598A CN115600642A CN 115600642 A CN115600642 A CN 115600642A CN 202211234598 A CN202211234598 A CN 202211234598A CN 115600642 A CN115600642 A CN 115600642A
Authority
CN
China
Prior art keywords
user
client
trust
model
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211234598.1A
Other languages
Chinese (zh)
Other versions
CN115600642B (en
Inventor
袁博
沈玉龙
陈森霖
胡凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Baituo Vision Technology Co ltd
Original Assignee
Nanjing Baituo Vision Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Baituo Vision Technology Co ltd filed Critical Nanjing Baituo Vision Technology Co ltd
Priority to CN202211234598.1A priority Critical patent/CN115600642B/en
Publication of CN115600642A publication Critical patent/CN115600642A/en
Application granted granted Critical
Publication of CN115600642B publication Critical patent/CN115600642B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0282Rating or review of business operators or products

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Game Theory and Decision Science (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a decentralized federal learning method based on neighbor trust aggregation and oriented to streaming media, which comprises the following steps that 1, streaming media data collected by a client side are subjected to normalization processing to form a feature vector of a user; step 2, constructing a local model based on a CNN and a Transformer network; selecting a characteristic vector irrelevant to the time sequence from the characteristic vectors, and inputting the characteristic vector into the CNN network; selecting a characteristic vector related to a time sequence from the characteristic vectors, and inputting the characteristic vector into a Transformer network; performing Concat operation on the feature information extracted by convolution and a result output by the Transformer; and 3, training a global model based on a random walk model of a trust mechanism and decentralized federal learning. The model sharing among the clients is realized by adopting a federal learning method, and a peer-to-peer network technology is introduced, so that the networked computer does not depend on a centralized server.

Description

Streaming media-oriented decentralized federal learning method based on neighbor trust aggregation
Technical Field
The invention relates to the field of distributed computing federal learning, in particular to a decentralized federal learning method based on neighbor trust aggregation, which is applied to streaming media data.
Background
In the field of machine learning, some conventional machine learning models such as support vector machines, logistic regression, etc. are applied in specific scenarios such as room price prediction, etc. Because the data trained by the machine learning model come from different clients or different organizations, the data sharing between different clients and different organizations is limited due to the existence of the data security law. Federal learning is designed to analyze data without touching the data. Federal learning is not just a machine learning method, but rather is a business model. Currently, in the fields of medical treatment, finance and the like, federal learning is applied to actual life, such as health detection of wearable equipment, marketing recommendation of financial products and the like. For the field in which the privacy of the user needs to be protected, the model in the application scenario is usually trained by a federal learning method. Peer-to-Peer (P2P) technology is different from the traditional centralized server concept, and by reasonable network optimization and network coordination, the computers participating in networking are changed into a small but perfect network server without depending on a centralized server computer, and each computer is used as a client. The computer of each node is in a peer-to-peer relationship with the computers of other points, and no superior or inferior relationship exists.
In some applications of federal learning, a recommendation model is trained by using block chain technology for federal learning based on some streaming media platforms, for example, a personalized behavior recommendation method based on federal learning is provided in patent number 202111638487.2, personalized recommendation is carried out according to user characteristic behaviors in different regions, and data is stored in each local model for centralized federal learning training; for example, patent No. 202110521197.3 proposes a collaborative online video edge caching method based on federal learning, which utilizes a plurality of users, a plurality of edge nodes and a central server, wherein the plurality of edge nodes serve the plurality of users, which are movable, in the coverage area of the edge nodes and are connected to the central server, and each edge node configures the edge server. In addition to the above two types, the current federal learning is also applied to the financial and medical industries, for example, patent No. 202110493396.8 proposes a method, system and medium for identifying potential customers based on longitudinal federal learning; for example, a medical named entity recognition model training method, a recognition method and a federal learning system are proposed in patent number 202210131792.0. The magic screen of this department's granted patent (CN 202121739511.7 liquid crystal display intelligent display system that can make up in a flexible way) is a show information display system, has user APP and the terminal and discloses the show screen. The magic screen comprises a centralized network architecture of a server side and a terminal, but data transmission is not carried out between the server side and the terminal, and the server side only plays a role in supporting operation and can be regarded as a decentralized structure in nature. The magic screen can be used for tasks such as user preference and action recognition and emotion learning, and the tasks can recommend proper content according to personalized requirements of users. The terminal of the magic screen can form a database at the local end according to the preference of each user, and recommendation is carried out according to the preference of the user. If Chinese likes Chinese red color, and European people like Saint white; the oriental people like freshwater fish, the European and American people like marine products and the like. When the magic screen is used by different users, the magic screen can be adjusted to a certain extent according to the difference of the users, and then the content is recommended.
In the existing federal learning system, the system is based on a centralized model of a server-client architecture, training models of all clients need to be uploaded to a server, the storage pressure and the network transmission pressure of the server are high, and equipment resources including computing resources, communication resources and energy are inevitably consumed. Meanwhile, when the server side is abnormal, the crash of the federal learning system can be directly caused, and therefore the ongoing federal learning process is interrupted. The computer nodes under the P2P technology are mutually equal, so each node can act as a server in the traditional mode and simultaneously has a large amount of resource information, and each network node can provide necessary resources. It is also the reason that the network under P2P technology exhibits unstructured distribution and at the same time the nodes of each network are more distributed. Simply speaking, because we can assume that, if in a limited network, the more nodes are owned, the more resources can be provided, and thus the external performance characteristics in the network become more obvious. Therefore, the existing federal learning and P2P technology has the following disadvantages:
problem 1. The traditional federal learning method needs a reliable centralized server, needs to consume a large amount of equipment resources, and if the centralized server fails, the whole system is paralyzed and cannot run normally.
Problem 2. The peer-to-peer network has no structure distribution, the large data volume can cause long calculation time, and meanwhile, the direct data exchange between the devices is based on the peer-to-peer network, so that the privacy and the safety of the user cannot be protected.
Aiming at the two problems, the invention provides a decentralized federal learning method based on neighbor aggregation and oriented to streaming media.
For problem 1, a decentralized federate learning model is first proposed, and each aggregated client is performed individually. Each client is set as a node, each node has a model, a network architecture is built to allow the model of each node to be used for model walk. And carrying out model aggregation at the nodes receiving the models, and converging the models at each node after repeated iteration to form an optimal model of the client participating in the aggregation. The decentralized federal learning model is built, and a P2P network is used for building, so that the equal status among all clients can be ensured, and the model can be ensured to smoothly walk;
for problem 2, a local model is built in units of individual devices using the federal learning technique. The federated learning aggregation adopts the models trained by respective clients to carry out the model jointly trained, does not relate to the privacy data of the user, and can well solve the privacy security problem of the problem 2. Meanwhile, the problem of overlarge data volume of the peer-to-peer network can be well avoided due to the fact that the framework is based on the federal learning.
Disclosure of Invention
The invention provides a decentralized federal learning method based on neighbor aggregation for streaming media based on CNN and Transformer networks, model wandering, peer-to-peer networks, trust networks and federal learning models, and is used for solving the dependence of federal learning on a reliable center server. The patent algorithm protects the privacy safety of users, and reliable central servers are saved in decentralized federal learning, so that the cost is relatively low.
Federal learning is used as a novel encryption distributed machine learning, and the trust degree of a user on the current artificial intelligence technology is improved. The federal learning model diagram is shown in fig. 1. Federal learning aggregation has a premise: each participant data has a certain correlation, and the correlation comprises a target task, a user ID, a characteristic variable and the like. The invention is a decentralized federal learning method, and large amount of training is needed for local client modeling, so that the invention can carry out weighting according to the performance of a model in the model wandering training stage, and the finally aggregated model performance generalization is ensured to be better. The existing federal learning framework is a federal Averaging algorithm (FedAvg) used at the server, which only performs Averaging processing on parameters uploaded to the server, and does not consider the difference problem among models. In the patent of the invention, the magic screen platform user data is pushed, the user information of each crowd has certain difference, and the average processing effect is poor only by applying. Therefore, aiming at the problem, the de-centralized federal learning adopted by the patent of the invention determines the effect of a global model by using model walk and trust values, and performs client weight distribution according to the data proportion of participants, and an algorithm model diagram of the patent is shown in an attached figure 2.
The invention relates to a decentralized federal learning method for streaming media based on neighbor trust aggregation, which comprises the following steps:
step 1, carrying out normalization processing on streaming media data collected by a client to form a characteristic vector of a user;
step 2, constructing a local model based on a CNN and a Transformer network;
selecting a characteristic vector irrelevant to the time sequence from the characteristic vectors, inputting the characteristic vector into the CNN network, and reserving the characteristic information extracted by the CNN as independent characteristic information;
selecting a characteristic vector related to a time sequence from the characteristic vectors, and inputting the characteristic vector into a Transformer network; performing Concat operation on the feature information extracted by convolution and a result output by the Transformer;
and 3, training a global model by decentralized federal learning based on a random walk model of a trust mechanism.
Further, step 1, carrying out normalization processing on the streaming media data collected by the client to form a feature vector of the user; the method specifically comprises the following steps:
step 1.1, dividing local clients into five types according to age groups of users, wherein children under 16 years old are f 1 From age 16 to age 28, the table year f 2 From 28 to 45 years old, it is known as "Zhuang-years 3 And middle age f from age 45 to 65 4 And aged over 65 f 5 . On the basis of the user age classification, the client terminals which are learned by the federal learning up to now are classified into 10 types of client terminals according to the fact that the users are professional creators or users who only watch videos.
Step 1.2, historical data of behavior characteristics of the magic screen APP user are obtained (a system recommends according to age group), the historical data contain 15 characteristics, and the historical data are mapped into a vector form: x = { X 1 ,x 2 ,x 3 ,…,x 14 ,x 15 In which x 1 Representing an age characteristic of the user; x is a radical of a fluorine atom 2 Representing a gender characteristic of the user; x is the number of 3 Representing a user's preference characteristics; x is a radical of a fluorine atom 4 A comment feature representing a user; x is a radical of a fluorine atom 5 A feature of interest representing a user; x is the number of 6 Representing fan characteristics of the user; x is the number of 7 Video content characteristics representative of a user; x is the number of 8 An approved feature representing a user; x is a radical of a fluorine atom 9 A region feature representing a user; x is the number of 10 Representing a consumption characteristic of the user; x is a radical of a fluorine atom 11 A calendar feature representing a user; x is a radical of a fluorine atom 12 The duration characteristic of the favorite videos of the user is represented; x is the number of 13 A live feature representing a user; x is the number of 14 Representing the online time characteristics of the user; d 15 And representing the online time characteristic of the user. According to client-side acquisitionAnd (4) classifying the clients according to the step 1.1 by using the user characteristics.
Step 1.3, summarizing data collected by all clients, dividing the data into a training set, a testing set and a verification set so as to better train and more accurately evaluate a global model, and calculating the result D 1 Data as training set, D 2 As test set and D 3 As a verification set. Wherein the verification set D 3 In each client, it is used to verify the accuracy of the global model. The ratio of the three data sets is 80% of the training set D 1 10% is test set D 2 And the last 10% is the verification set D 3
Theoretically, the sizes of the data are not uniform and greatly differ, so that the data need to be normalized.
In general, the learning efficiency of the deep learning algorithm is best when the input data is close to the "0" average. The data was mapped between [0,1] using a maximum-minimum normalization on the collected data, the normalization function being as follows:
Figure BDA0003882256780000041
wherein X t Is the feature vector of the non-normalized user at time t, X max Is the maximum value of the user's feature vector, X min Is the minimum value of the feature vector of the user,
Figure BDA0003882256780000051
is the matrix of normalized user feature vectors at time t.
Step 1.4, an input matrix is constructed by the 15 characteristics,
Figure BDA0003882256780000052
the matrix is input for the data after preprocessing.
Further, the transform network comprises an Input Block, an Encoder Block, a Decoder Block and an Output Block; the Output end of the Input Block is respectively connected with the Encoder Block and the Decoder Block, the Output end of the Encoder Block is connected with the Decoder Block, and the Decoder Block outputs the Output Block to the Output Block.
The Encoder Block part consists of N identical networks, specifically: multi-Head Self-extension (MSA) and Feed-Forward Network (FFN), each sub-Network layer adding an Add & Norm layer for residual concatenation and normalization operations;
the Add & Norm layer sums and normalizes the input and output of the Multi-Head Attention layer, then transfers to the FFN layer, and finally carries out the Add & Norm processing again
The Transformer network is formulated as
Figure BDA0003882256780000053
Where Source is a time-dependent feature in the feature vector, similarity (·) represents a similarity function, lx represents the length of the input Source, and query represents some element derived from a given target.
The specific calculation process for the Attention mechanism can be summarized into two stages: the first stage is to calculate a weight coefficient according to the query and the key; and in the second stage, value is subjected to weighted summation according to the weight coefficient.
Further, step 3, training a global model based on a random walk model of a trust mechanism and decentralized federal learning, specifically comprising the following steps:
step 3.1, defining a decentralized federal learning trust network, and giving a client U 0 A trust network of the source node;
let U 0 A client U formed by a client source node in federal learning, a connected client and a client connected with the connected client 0 A trust network that is a source node; defining U as client U 0 Including the client U 1 ,…,U n And then all the clients are clients U 0 Including the client v 1 ,…,v m
When the resource amount of each client node is the same, a DHT technology is adopted, a unique identifier is added for each resource node, a mapping relation between resources and node IP is established, an annular P2P structure is set, starting from any resource node, all resource nodes are intercepted by a global model, and the model migration is completed.
Step 3.2, based on the trust random walk model, completing the TopN recommendation, thereby obtaining n and source client sides U 0 The client related to the user trains the common model;
given target user U 0 Respectively, with which the client U is directly associated 1 ,…,U n Starting from a trusted subnetwork G i =<U i ,TU i >In
Figure BDA0003882256780000061
Utilizing a trust-based random walk model, in an indirect client, according to which a source user U is associated with 0 Performing common model training on interest similarity between the N client sides to complete TopN recommendation, wherein the TopN means obtaining N client sides U corresponding to the source client sides 0 The client associated with the user of (2) performs training of the common model.
Step 3.3, judging whether a client U exists or not 0 Is potentially associated with a client V i (ii) a If V is present i And (4) carrying out k +1 times of random walk model and then carrying out training of a common model.
Further, step 3.3 specifically includes: according to users v and U 0 Model similarity of (u) ISIm 0 V), predicting potential related clients and adding target related clients u 0 Is predicted to be associated with
Figure BDA0003882256780000062
And completing the recommendation of the potential client side until the termination condition of the random walk is met. This random walk is repeated to ensure accuracy and coverage of the algorithm. And finally, sequencing the obtained users according to the interest similarity of the target users to complete TopN recommendation.
Further, when the random walk algorithm is on step k-1 of user u and on step k of its associated client user v, the probability of terminating the walk is
Figure BDA0003882256780000063
Further, the iterative model of each client is w locals Initial local model w per client local Denoted as w according to the label of the client i,local And iterating for T times to achieve the global optimum, and stopping training.
Furthermore, precision, coverage and F-Measure indexes are adopted to evaluate the recommendation accuracy and Coverage. Wherein:
Figure BDA0003882256780000064
in the formula: n is a radical of hydrogen tp For recommending source client U 0 The number of associated recommended clients; and L is the number of the recommended associated clients.
Figure BDA0003882256780000071
In the formula, B u Concentrating source client U for testing 0 The number of associated recommended objects, which represents the source client U 0 The associated recommendation correlates a probability that the client can be recommended. Then F can be put 1 -measure is defined as:
Figure BDA0003882256780000072
further, define X u To select a random variable for which user v is a potential fan, then:
Figure BDA0003882256780000073
thus, the random walk algorithm operates with a probability of 1- φ on user u u,v,k When continuing to walk, the client v E fol U Is selected by the algorithm as the source user U 0 Has a probability of being a potential fan
P(Y u0,u =v)=(1-φ u,v,k )P(X u =v) (13)
Further, the random walk model is given a target client U 0 From the source user U 0 Of a directly associated client U i Starting, all clients of the trust sub-network are traversed. And after the k-1 th step of wandering reaches the client u, judging whether the k-th step of the algorithm wanders to the user Uo client or not, wherein the k-th step of the algorithm is related to the trust values of the client v and the client u. Namely, the model has two choices at this time: (1) with a probability phi u,v,k Terminating the random walk and returning to the target user U selected in the steps 1 to k-1 0 The potential correlation client end completes the random walk; (2) with a probability of 1-phi u,v,k And (4) carrying out the (k + 1) th step of random walk along the concerned edge to the next layer of user v associated client set, and selecting potential associated clients according to the model similarity between the current user and the source user. When the random walk algorithm reaches the user u, if the probability is 1-phi u,v,k And when the user u continues to walk, selecting a user v from the direct association client end set of the user u so as to enable the algorithm to continue, wherein phi is a probability function. Order S ω To select the random variable of v, the probability that user v is selected is related to its confidence value for user omega, i.e.
Figure BDA0003882256780000074
Wherein, tr u,v A trust value for user v for user u. Repeating the above process, the algorithm continues to walk in the model trust network until the algorithm terminates or the maximum walk level is reached.
Further, a trust value is defined, so that U belongs to U and v belongs to fol u The trust value TR of the user v for u may be defined based on comment, forward and mention behaviors as:
(1) Let RT u,v The number of times user u is forwarded for user v, then the trust value based on the forwarding behavior:
Figure BDA0003882256780000081
(2) Order CM u,v And if the number of times of commenting the user u by the user v is greater than the threshold value, the trust value based on the comment behavior is as follows:
Figure BDA0003882256780000082
(3) Let ME u,v For the number of times user v refers to user u in the work, forwarding or review, then based on the trust value of the referring behavior:
Figure BDA0003882256780000083
(4) And integrating the trust values of the 3 online behaviors, and defining the trust value of the user v to u as follows:
Figure BDA0003882256780000084
in the formula Tr rt (u,v)、Tr cm (u, v) and Tr me (u, v) equals 0, then it is made equal to
Figure BDA0003882256780000085
Has the advantages that: sharing the model among the clients by adopting a federal learning method, and analyzing data on the premise of not touching the data; and introduces Peer-to-Peer (P2P) technology, and changes the computers participating in networking into a computer independent of a centralized server for computing through reasonable network optimization and network coordination. .
Drawings
FIG. 1 is a diagram of conventional federal learning;
FIG. 2 is a schematic representation of decentralized federal learning;
FIG. 3 is a diagram of a structure of a local model CNN + Transformer;
FIG. 4 is a diagram of a transform network architecture;
FIG. 5 is an Attention machine drawing;
FIG. 6 is a Self-Attention machine drawing;
FIG. 7 is a Multi Self-Attention machine drawing;
FIG. 8 is a ring level network diagram;
fig. 9 is a P2P network diagram.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it should be understood that they are presented herein only to illustrate and explain the present invention and not to limit the present invention.
Example (b): embodiment introduction and example analysis are performed based on the magic screen APP. The invention provides a decentralized federal learning method based on neighbor aggregation for streaming media based on CNN and Transformer networks, model walk, peer-to-peer networks, trust networks and federal learning models, and is used for solving the dependence of federal learning on a reliable center server. The patent algorithm protects the privacy safety of users, reliable central servers are omitted in decentralized federal learning, and the cost is relatively low. The magic screen disclosed by the invention is a display information display system and is provided with a user APP and a terminal public display screen. The magic screen comprises a centralized network architecture of a server side and a terminal, but data transmission is not carried out between the server side and the terminal, and the server side only plays a role in supporting operation and can be considered as a decentralized structure in nature. The magic screen can be used for tasks such as user preference and action recognition and emotion learning, and the tasks can recommend proper content according to personalized requirements of users. The terminal of the magic screen can form a database at the local end according to the preference of each user, and recommendation is carried out according to the preference of the user. For example, chinese people like Chinese red color, and European people like Saint pure white; the oriental people like freshwater fish, the European people like marine products, and the like. When the magic screen is used by different users, the magic screen can be adjusted to a certain extent according to the difference of the users, and then the content is recommended.
On the basis of protecting user privacy, the algorithm model can learn some characteristics of the users using APP aiming at ID division of different users, and interaction and recommendation among the users are carried out. Federal learning is used as novel distributed machine learning, privacy and safety of users are guaranteed through a distributed encryption training technology, and the trust of the users to current artificial intelligence technology is improved. The federal learning model diagram is shown in fig. 1. Furthermore federal learning has a precondition: each participant data has a certain correlation, and the correlation comprises a target task, a user ID, a characteristic variable and the like. According to the data correlation requirement, the parameters of the patent model of the invention also have certain correlation, so that a model with better generalization performance can be trained. Under a federal learning framework, the privacy of each participant can be well protected by the local client participating in the joint training. The existing federal learning framework is a federal Averaging algorithm (FedAvg) used at the server, which only performs Averaging processing on parameters uploaded to the server, and does not consider the difference problem among models. The invention relates to a behavior characteristic recommendation algorithm, which is used for performing model walk according to a trust value, improving the original average processing, greatly increasing the recommendation efficiency of behavior characteristics, and simultaneously saving the operation cost without the participation of a server side in operation. The algorithm model diagram of the patent is shown in figure 2.
The implementation steps of the invention are three steps:
federal learning is used as a novel encryption distributed machine learning, and the trust degree of a user on the current artificial intelligence technology is improved. The federal learning model diagram is shown in fig. 1. Federal learning aggregation has a premise: each participant data has a certain correlation, and the correlation comprises a target task, a user ID, a characteristic variable and the like. The method is a decentralized federal learning method, and massive training is needed for modeling based on a local client, so that the method can be used for weighting according to the performance of a model in a model walk training stage, and the performance generalization of the finally aggregated model is ensured to be better. The existing federal learning framework is a federal Averaging algorithm (FedAvg) used at the server, which only performs Averaging processing on parameters uploaded to the server, and does not consider the difference problem among models. In the patent of the invention, the magic screen platform user data is pushed, the user information of each crowd has certain difference, and the average processing effect is poor only by applying. Therefore, aiming at the problem, the original federal averaging algorithm is improved to the federal weight averaging algorithm at the server side, and weight distribution is carried out according to the data proportion of the participants, and an algorithm model diagram of the patent is shown in fig. 2.
The specific implementation steps are as follows:
s1: preprocessing of magic screen APP user data
The data based on the invention is recommended to the fans of the magic screen APP users, different users have different preferences, and the APP has different use time and different favorite types of works. The magic screen is a display information display system and is provided with a user APP and a terminal public display screen. The magic screen comprises a centralized network architecture of a server side and a terminal, but data transmission is not carried out between the server side and the terminal, and the server side only plays a role in supporting operation and can be considered as a decentralized structure in nature. The magic screen can be used for tasks such as user preference and action recognition and emotion learning, and the tasks can recommend proper content according to personalized requirements of users. The terminal of the magic screen can form a database at the local end according to the preference of each user, and recommendation is carried out according to the preference of the user. Interaction between the video creator and the fan needs a certain amount of associated users to ensure the continuous creation of the video by the creator. Meanwhile, fans with the same preference can directly recommend creators with the same type, so that the preference type of each user is very important. The user information is generated in 24 hours, and the user information is cached at the local end. The user information mainly includes the following categories: favorite video content, online time, interaction condition, praise type, attention and concerned number and the like, and the specific preprocessing steps are as follows:
1-1: the invention aims at dividing local clients for age groups, and the division is automatically divided according to real-name registration; the age data is divided into five parts according to the real name data 1 (16 years old or younger) teenager f 2 (16-28 years old) and Zhuang-year f 3 (28 years to 45 years), middle age f 4 (45 to 65 years old) and elderly f 5 (age 65 years old or older). On the basis of age classification, users with magic screens and users who only watch videos are classified into two categories, and the clients for federal learning are classified into 10 types of clients.
1-2: acquiring historical data of behavior characteristics of a magic screen APP (application) used by a user (a system recommends according to age group), wherein the historical data contains 15 characteristics and is mapped into a vector form: x = { X 1 ,x 2 ,x 3 ,…,x 14 ,x 15 Wherein x 1 Representing an age characteristic of the user; x is the number of 2 Representing a gender characteristic of the user; x is the number of 3 Representing a user's preference characteristics; x is the number of 4 A comment feature representing a user; x is a radical of a fluorine atom 5 A feature of interest representing a user; x is a radical of a fluorine atom 6 Representing fan characteristics of the user; x is the number of 7 Video content characteristics representative of a user; x is the number of 8 An approved feature representing a user; x is a radical of a fluorine atom 9 A region feature representing a user; x is the number of 10 Representing a consumption characteristic of the user; x is the number of 11 A calendar feature representing a user; x is the number of 12 The duration characteristic of the favorite videos of the user is represented; x is the number of 13 Representing a live feature of a user; x is a radical of a fluorine atom 14 Representing the online time characteristics of the user; x is the number of 15 And representing the online time characteristic of the user. The data features are classified according to the step 1-1, and theoretically, the data sizes are not uniform and have large differences, so that the data need to be normalized.
1-3: after the patent of the invention collects data, the three components of a training set, a test set and a verification set are combined so as to facilitate better training and more accurate evaluation, and D 1 Data as training set, D 2 As test set and D 3 As a verification set. Wherein the verification set D 3 In each client, it is used to verify the accuracy of the global model. The ratio of the three data sets is 80% of the training set D 1 10% is test set D 2 And the last 10% is the verification set D 3 . In general, the learning efficiency of the deep learning algorithm is best when the input data is close to the "0" average. Mapping data to [0,1] using maximum-minimum normalization for the collected data]The normalization function is as follows:
Figure BDA0003882256780000111
wherein X t Is the feature vector of the non-normalized user at time t, X max Is the maximum value of the user's feature vector, X min Is the minimum value of the feature vector of the user,
Figure BDA0003882256780000112
is the matrix of normalized user feature vectors at time t.
1-4: after steps 1-3, all the personalized features are subjected to data preprocessing, an input matrix is constructed by the 15 features,
Figure BDA0003882256780000113
the matrix is input for the data after preprocessing.
S2: local model establishment based on CNN and Transformer network
After the data are preprocessed based on the step one, the characteristics of the step one are used as input and input into the local network model, and in the step two, the invention needs to extract the characteristics of the data. The CNN and the Transformer are adopted as the characteristics extraction, so that the method has the advantages that the data volume is large, the CNN network can well extract the data characteristic information as the Encoder of the Transformer, and the Transformer is obtained in natural language at first, so that the method has a good effect of processing the text information. Meanwhile, the transform network can fully consider the influence and the relation among the time sequences, the potential interest of the user is deeply mined, and the trained model recommendation effect has an obvious improvement effect compared with the traditional network. Feature extraction divides data into two parts, one part is a time sequence feature, and the other part is a non-time sequence feature. The Transformer network has a good key feature extraction effect on the time sequence features, and can enable the trained model to be better if the key attention on the time sequence information is paid. A network model diagram of the local model in this document is given as shown in fig. 3.
2-1: obtaining the time sequence related characteristics of the characteristic vector of the step 1-2 by convolution operation, wherein X in the characteristic vector X 11 、x 12 、x 13 、x 14 And x 15 The information correlation degree with the time sequence is large, in order to reduce the calculation amount in the training network model, the invention can relate to a convolution kernel of 1X 1, and another 10 feature vectors are selected, wherein the feature vector X is changed into a new feature vector X ', namely X' = { X = 1 ,x 2 ,x 3 ,…,x 10 And reserving information proposed by the CNN as independent feature information, and performing feature extraction with step length of 1 by CNN feature extraction according to 1-dimensional convolution. Wherein x 11 、x 12 、x 13 、x 14 And x 15 The characteristics related to the information of the time sequence are input into the Transformer network. Assuming that the convolution kernel size is 1 × 1, the step size is 1, and d is 1, that is, the number of "0" filling weights is 0, the convolution formula is as follows:
Figure BDA0003882256780000121
and performing Concat operation on the feature information extracted by convolution and the result output by the Transformer.
2-2: the time sequence related feature vector is input into a Transformer network, and the time sequence based feature information needs to fully utilize the correlation between time and other parameters. The Transformer solves the problems of gradient disappearance and gradient explosion of the traditional recurrent neural network, and can keep longer time information. The Transformer model is divided into four blocks in total, namely an Input Block, an Encoder Block, a Decoder Block and an Output Block, wherein the most important is a second part of the Encoder Block and a third part of the Decoder Block. The Transformer is characterized by a multi-head self-attention mechanism between an Encoder Block and a Decoder Block and an internal multi-head self-attention mechanism between the Encoder Block and the Decoder Block. The Encoder Block part consists of N identical networks, and each network layer is divided into two parts: multi-Head Self-extension (MSA) and Feed-Forward Network (FFN), each sub-Network layer adds residual concatenation and normalization operations. MSA as described above, FFN is a fully-connected layer composition of a nonlinear transformation. The Decoder Block part is composed of N identical networks, the whole structure is the same as that of the Encoder Block, but the input of the Decoder Block part comes from two aspects. And the Add and Norm layer sums and normalizes the input and Output of the Multi-Head Attention layer, then transmits the sum to the FFN layer, finally carries out the Add and Norm treatment again, outputs the sum to the Output Block of the 4 th module, and outputs all extracted features of the model. The Transformer mechanism is shown in the attached figure 4:
2-3: the calculation of the Transformer mainly comprises a self-attention mechanism and a multi-head self-attention mechanism, wherein the self-attention mechanism is a special form of the self-attention mechanism, and the patent of the invention is introduced from the attention mechanism. Note that the power mechanism may be regarded as a process of assuming that an element in an input source is formed by a series of < key, value > data pairs, obtaining a query of a certain element in a given target, calculating a weight coefficient of the query and a value corresponding to each key, then performing weighted summation on the values, and the query and the key are used to calculate a weight coefficient corresponding to a value, and finally obtaining an output attribute value, which may be expressed by formula (3):
Figure BDA0003882256780000131
where similarity (·) represents a similarity function, and lx represents the length of the input Source. In which data is input, where the input source is x 11 、x 12 、x 13 、x 14 And x 15 A time-license related feature. Detailed calculations regarding the Attention mechanismThe process can be summarized into two stages: the first stage is to calculate a weight coefficient according to the query and the key; and in the second stage, value is subjected to weighted summation according to the weight coefficient. Wherein the first stage comprises two steps:
step one, calculating the similarity or correlation of the query and the key according to the query and the key;
and step two, carrying out normalization processing on the original score obtained in the step one. The calculation process of Attention is therefore as shown in fig. 5:
on the basis of FIG. 5, the description is given on the mathematical expression of the three calculation steps of Attention:
(1) Calculating the similarity between the query and each key to obtain the weight, wherein the similarity between the query and the key can be calculated in various ways, such as three ways, namely concat, dot and general, of formula (4):
Figure BDA0003882256780000132
wherein Q represents query, T represents transpose of matrix, K represents key, and W is weight coefficient.
(2) These weights are normalized using a softmax (·) function, as shown in equation (5):
Figure BDA0003882256780000141
wherein softmax (. Cndot.) is a normalization function, a i The weight value after the ith normalization.
(3) And performing weighted summation on the weights and the corresponding key values to obtain the final Attention, as shown in formula (6):
Figure BDA0003882256780000142
the numerical value of the Attention for the query can be obtained by the above three stages of calculation.
The self-attention mechanism is a special form of attention mechanismIn the self-attention mechanism, since Query = Key = Value, three weight matrices are designed for better feature extraction: w is a group of q 、W K 、W v Then, three new vector Query ', key ', value ' calculation formulas are obtained as shown in (7):
Figure BDA0003882256780000143
solving the value of attribute for each Key by using each Query, and finally obtaining a mathematical operation formula of the self-attention mechanism as shown in (8):
Figure BDA0003882256780000144
wherein T is transposed, d k The number of columns of the K matrix, the dimension of the vector, is the scaling factor, i.e., Q. The schematic diagram of the self-attention mechanism is shown in fig. 6:
the Multi-Head Self-Attention Mechanism (MSA) is actually an improvement of the Attention mechanism, and it mainly uses a plurality of different subspaces to perform individual calculation, and finally outputs and splices together the subspace calculation results, and the final result can consider the relevance of different layers compared with the Attention mechanism, so that the output characteristics can consider more layers of information. MSA is equivalently formed using a combination of multiple self-attention mechanisms. The Q, K and V of the single self-attention mechanism are calculated in a single dimension, and the multi-head self-attention mechanism has multiple heads for model learning at one time. Under the premise that parameters are not shared, the MSA performs scaling dot product attention on Q, K and V through linear transformation and mapping of a parameter matrix, repeats the process for h times, finally splices the results, and performs mapping one head at a time, namely a multi-head self-attention mechanism. MSA carries out multiple mapping, mapping transformation parameters W in each mapping are different, and W can be regarded as a matrix W = [ W ] q ,W K ,W v ]. Mapped by each linear transformationAnd performing attention calculation on Q, K and V, wherein the result of each calculation becomes a head, and the multi-head self-attention mechanism performs Concat operation on the final result to obtain the final result, which is expressed as formulas (9) and (10) in a mathematical form:
MultiHead(Q,K,V)=Concat(head i ,head z ,...head h ,)W o (9)
Figure BDA0003882256780000151
where concat (. Cndot.) represents a splicing operation, W o Is a weight matrix. The multi-headed self-attention mechanism, which is also a Transformer [16 ], can obtain more feature information than the single attention mechanism]The important components of (a). The multi-head attention mechanism is shown in fig. 7.
2-4: and (4) Concat is carried out on the CNN feature extraction and the Transformer extracted features to obtain a local model, and the local network model is shown in the attached drawing 3, so that the local model is built.
S3 decentralized federated learning network construction
Decentralized federal learning does not require a reliable server, and the architecture cost of the service system can be saved. The existing federal learning can not achieve optimal performance under multiple scenes, data in different scenes in real life often have different characteristics and different distributions, and a global model with strong universality does not exist. In order to solve the problem, the invention provides a decentralized Federal learning method for streaming media based on neighbor aggregation. The method provided by the invention can well solve the problems of overhead and attack of the centralized federal learning server side, and is more suitable for actual life application scenes.
3-1: decentralized Federal learning Trust network definition, order U 0 For a client source node in federal learning, i.e. a source node user, connected clients thereof and connected client connectionsThe clients of (A) form a client U 0 A trust network of a source node user (target client). Order to
Figure BDA0003882256780000152
As a source node user client U 0 The set fol of (c) represents the meaning of the set, the trust network can be defined as a directed graph G =ina graph neural network<U,TU>. Wherein U = { U = 0 ,U 1 ,…,U n Is the set of all users in the trust network,
Figure BDA0003882256780000153
and TU is a Trust network client Trust client U for all the edge sets with concern relations. The ring network has a very complex topology, and the ring trust network is defined as U in view of research problems 0 Is a hierarchical ring mesh of source users. As shown in fig. 8, in combination with a magic screen. Each node in the graph represents 1 client, each line represents the connection trust relationship between the clients, and the weight omega of each edge u,v Representing the weight of user v to the trust value of u. Global model parameter is w global The local model parameter is w local . For research purposes, layer 1 client U is defined 1 ,…,U n Is equal to client U 0 Direct fans of, and layer 2 client v 1 ,…,v m And all subsequent clients are clients U 0 Indirect vermicelli, indirect client vermicelli and U 0 The interest similarity of (1) is s.
3-2: client trust recommendation problem description, given target user U 0 The magic screen APP trust network respectively uses the direct vermicelli U 1 ,…,U n Starting from a trusted subnetwork G i =<U i ,TU i >In
Figure BDA0003882256780000161
Utilizing a random walk model based on trust, in indirect fans, according to which the source user U is 0 Performing common model training on interest similarity between the two groups to complete TopN recommendationThereby obtaining n and source client ends U 0 The fans related to the user perform training of the common model.
3-3: giving a target client user U by a random walk model 0 Construct its trust network G =, according to definition 3-1<U,TU>From U 0 Vermicelli made from bean starch
Figure BDA0003882256780000164
Starting, a random walk algorithm is executed in a trust subnet of the client, and a relevant client is recommended to carry out model training. Random walk algorithm slave source user U 0 Of a directly associated client u i And starting to traverse all the clients of the trust subnet. Without loss of generality, when the k-1 th walk reaches the user u, whether the k-th walk reaches the client directly associated with the user u or not is judged by the algorithm, and the algorithm is connected with the client
Figure BDA0003882256780000162
Related to the trust value of user u. Namely, the model has two choices at this time: (1) with a probability phi u,v,k Terminating the random walk and returning to the target user U selected in the steps 1 to k-1 0 The potential vermicelli finishes the random walk; (2) with a probability of 1-phi u,v,k And (4) reaching the next layer of user v fan set along the concerned edge to perform the (k + 1) th step of random walk, and selecting a potential associated client according to the model similarity between the current user and the source user. When the random walk algorithm reaches the user u, if the probability is 1-phi u,v,k And when the user u continues to walk, selecting a user v from the direct fan set of the user u so as to continue the algorithm, wherein phi is a probability function. Order S ω To select a random variable of v, the probability that user v is selected is related to its trust value for user ω, i.e.
Figure BDA0003882256780000163
Wherein, T ru,v A trust value for user v to user u. Repeating the above process, the algorithm continues to walk in the model trust network until the algorithm terminates or reaches the maximum walkAnd (5) walking layers.
3-4: the topology of the peer-to-peer network P2P directly affects how resources flow to users, and different topologies have different network performances. The network topology structure is divided into four types, namely a centralized P2P network, a fully distributed unstructured P2P network, a semi-distributed P2P network and a fully distributed structured P2P network, which is specifically shown in fig. 9. The topological structure of the fully distributed and structured P2P network is the same as that of the fully distributed and unstructured P2P network, but the DHT technology is adopted, a unique identifier is added to each resource node, and the mapping relation between the resources and the node IP is established. The nodes can be accurately positioned, and the problem of communication congestion caused by resource searching is solved. The invention sets a ring P2P structure on the basis, starting from a resource node, all resource nodes are cut by a global model to the end, and the model walk is completed.
3-5: associated client fan prediction, at source user U 0 In a network associated with clients, the random walk algorithm is based on the probability 1-phi on user u u,v,k While continuing to walk, the source user U will be predicted in the fan set of user U 0 Potentially related fans of interest. As previously mentioned, with each user in the fan set of user u
Figure BDA0003882256780000171
And source user U 0 Similarity of interest ISIm (u) between 0 V) selection probability as a potential client. Definition of X u To select a random variable for which user v is a potential fan, then:
Figure BDA0003882256780000172
thus, the random walk algorithm operates with a probability of 1- φ on user u u,v,k When continuing to walk, the client v is belonged to fol U Is selected by algorithm as source user U 0 Has a probability of being a potential fan
P(Y u0,iu =v)=(1-φ u,v, k)P(X u =v) (13)
3-6: trust valueDefine, let U ∈ U, v ∈ fol u The trust value TR of the user v for u may be defined based on the comment, forward and mention behaviors as:
(1) Let RT u If the user u is forwarded for the user v, the trust value based on the forwarding behavior is:
Figure BDA0003882256780000173
(2) Order CM u,v And if the number of times of commenting the user u by the user v is greater than the threshold value, the trust value based on the comment behavior is as follows:
Figure BDA0003882256780000174
(3) Let ME u,v For the number of times user v refers to user u in publishing, forwarding or commenting, then based on the trust value of the mention behavior:
Figure BDA0003882256780000175
(4) And integrating the trust values of 3 online behaviors, and defining the trust value of the user v to u as follows:
Figure BDA0003882256780000181
in the formula Tr rt (u,v)、Tr cm (u, v) and Tr me (u, v) equals 0, then it is made equal to
Figure BDA0003882256780000182
3-7: similarity of client model, data type of fan of associated client and source client U 0 Is defined as a client-side similarity model. In addition, the attention of the user v to u is related to the data type similarity of the user v and the data type similarity, and the higher the similarity is, the higher the similarity is of the model. For user u, its data type and source guestUser end U 0 Are of the same type. The invention takes a magic screen user as an example, extracts key words according to a natural language processing method, so that the data content takes word vectors as an example:
k u ={(e 11 ),(e 22 ),…(e mm )} (18)
in the formula: e.g. of a cylinder i The ith keyword is the keywords, such as 'the action is good tide', 'haha' and the like; omega i Giving weight to the weight of the ith keyword, specifically the number of times of the keyword; m is the number of keywords, specifically the number of the mentioned keywords. The weight of the keyword can be calculated by adopting a classic TF-IDF formula, namely:
Figure BDA0003882256780000183
after obtaining the interest keyword vectors of the client users u and v, the interest similarity can be calculated by using the cosine similarity between the vectors, namely:
Figure BDA0003882256780000184
3-8: associated fan recommendation based on TRW model, wherein the recommendation process is carried out on a target user u 0 In the peer-to-peer network of the fans, the random walk model walks by using the depth-first algorithm of the graph according to the v and u of the users 0 Model similarity of (u) ISIm 0 V) predicting potential related fans, and adding a target associated client u 0 Is predicted to be likely to be associated with
Figure BDA0003882256780000185
And completing the recommendation of the potential client side until the termination condition of the random walk is met. This random walk is repeated to ensure accuracy and coverage of the algorithm. And finally, sequencing the obtained users according to the interest similarity of the target users to complete TopN recommendation.
3-9: and (3) under the condition of random walk termination, when a potential concerned user is predicted on the magic screen fan network based on a trusted random walk model, the termination probability phi of the algorithm at the user node u in the kth step u,v,k The user and the source client U are related to the trust value of the user U to the object concerned by the user U, and the user and the source client U follow the random roaming on the trust network 0 The distance of (2) is larger and larger, and the trust chain is gradually prolonged, then the distance is towards the source client U 0 Will be lower and therefore the termination probability of the algorithm will be increased gradually. In one random roaming, each user is opposite to target user U 0 Gradually decreases. According to the six-degree space theory, the maximum number of walking steps is defined as 6. In summary, when the random walk algorithm is on the user u at the k-1 and on the fan user v at the k, the probability of stopping the walk is
Figure BDA0003882256780000191
3-10: model iteration step, in the above 3-1 to 3-9, the present invention gives the iteration model of each client as w locals Initial local model w per client local From the local model iteration in step 2, denoted as w according to the label of the client i,local And (5) walking according to the models from 3-1 to 3-9, iterating for T times, and stopping training when the global optimum is achieved.
3-11: the global model evaluation method is a TopN recommendation based on the random walk model vermicelli recommendation of trust, has dichotomous property, and is suitable for evaluating the recommendation accuracy and Coverage rate by adopting indexes such as Precision, coverage and F-Measure. Wherein:
Figure BDA0003882256780000192
in the formula: n is a radical of hydrogen tp For recommending source client U 0 The number of associated recommended clients; and L is the number of the recommended associated clients.
Figure BDA0003882256780000193
In the formula, B u Centralizing source client U for testing 0 The number of associated recommended objects, which represents the source client U 0 The associated recommendation-associated fans can be recommended with a probability. Then F can be put 1 -measure is defined as:
Figure BDA0003882256780000194
according to the activity and the number of users of different magic screens APP, the value of the existing general value Precision is set to be not less than 90%, the value of the Coverage is set to be not less than 80%, and the value of the F is set to be not less than 50%, so that the whole content of the invention patent is completed.
3-12: the effect finally achieved by the embodiment is that at a magic screen user APP terminal, the accuracy rate of recommended contents reaches 95% according to the individual characteristics of a user, the favorite degree of the user on the recommended contents reaches 75%, and experimental results show that the method provided by the invention has relatively good performability.
Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A decentralized federation learning method facing streaming media and based on neighbor trust aggregation is characterized by comprising the following steps:
step 1, carrying out normalization processing on streaming media data collected by a client to form a characteristic vector of a user;
step 2, constructing a local model based on a CNN and a Transformer network;
selecting a characteristic vector irrelevant to the time sequence from the characteristic vectors, and inputting the characteristic vector into the CNN network;
selecting a characteristic vector related to a time sequence from the characteristic vectors, and inputting the characteristic vector into a Transformer network; performing Concat operation on the feature information extracted by convolution and a result output by the Transformer;
and 3, training a global model based on a random walk model of a trust mechanism and decentralized federal learning.
2. The method for decentralized federal learning based on neighbor trust aggregation for streaming media according to claim 1, wherein in step 3, based on a random walk model of a trust mechanism, the decentralized federal learning trains a global model, which specifically includes the following steps:
step 3.1, defining a decentralized federal learning trust network, and giving a client U 0 A trust network of the source node; let U 0 A client U formed by a client source node in the federal study, a client connected with the client source node and a client connected with the client 0 A trust network that is a source node; defining U as client U 0 Including the client U 1 ,…,U n And then all the clients are clients U 0 Including the client v 1 ,…,v m
Step 3.2, based on the trust random walk model, completing the TopN recommendation, thereby obtaining n and source client sides U 0 The client directly related to the user carries out the training of the common model;
step 3.3, judging whether a client U exists or not 0 Is potentially associated with a client V i (ii) a If V is present i And (5) carrying out the random walk model for k +1 times, and then carrying out the training of the common model.
3. The streaming media based neighbor trust aggregation-based decentralized federated learning method according to claim 2,step 3.3 is specifically: according to users v and U 0 Model similarity of (u) ISIm 0 V), predicting potential related clients and adding target related clients u 0 Is predicted to be associated with
Figure RE-FDA0003971640060000011
Completing the recommendation of a potential client side until the termination condition of random walk is met; this random walk is repeated to ensure the accuracy and coverage of the algorithm; and finally, sequencing the obtained users according to the interest similarity of the target users to complete TopN recommendation.
4. The streaming media-oriented neighbor trust aggregation-based decentralized federal learning method as claimed in claim 2, wherein when the random walk algorithm is performed on the user u at step k-1 and on the associated client user v at step k, the probability of stopping the walk is
Figure RE-FDA0003971640060000021
The iterative model for each client is w locals Initial local model w per client local Denoted as w according to the label of the client i,local And iterating for T times to achieve the global optimum, and stopping training.
5. The decentralized federal learning method oriented to streaming media and based on neighbor trust aggregation is characterized in that Precision, coverage and F-Measure indexes are adopted to evaluate recommendation accuracy and Coverage; wherein:
Figure RE-FDA0003971640060000022
in the formula: n is a radical of hydrogen tp For recommending source client U 0 The number of associated recommended clients; l is recommended gateThe number of clients;
Figure RE-FDA0003971640060000023
in the formula, B u Concentrating source client U for testing 0 Number of associated recommended objects, which represents source client U 0 The probability that the associated recommendation association client can be recommended; then F can be put 1 -measure is defined as:
Figure RE-FDA0003971640060000024
6. the streaming media-oriented neighbor trust aggregation-based decentralized federated learning method according to claim 2, wherein X is defined u To select a random variable for which user v is a potential fan, then:
Figure RE-FDA0003971640060000025
thus, the random walk algorithm operates with a probability of 1- φ on user u u,v,k When continuing to walk, the client v is belonged to fol U Is selected by algorithm as source user U 0 Has a probability of being a potential fan
P(Y u0,u =v)=(1-φ u,v,k )P(X u =v) (13)。
7. The method for decentralized federal learning based on neighbor trust aggregation for streaming media according to claim 2, wherein the random walk model is a target client U 0 From the source user U 0 Starting from the directly associated client Ui, traversing all clients of the trust subnet; after the k-1 th step of wandering reaches the client U, whether the k-th step of the algorithm wanders to the user U or not 0 Client, and client v and clientu is related to a trust value; namely, the model has two choices at this time: (1) with a probability phi u,v,k Terminating the random walk and returning to the target user U selected in the steps 1 to k-1 0 The potential association client end completes the random walk; (2) with a probability of 1-phi u,v,k The next layer of user v associated client collection is reached along the concerned edge to carry out the (k + 1) th step of random walk, and potential associated clients are selected according to the model similarity between the current user and the source user; when the random walk algorithm reaches the user u, if the probability is 1-phi u,v,k When the user u continues to walk, selecting a user v from the direct association client set of the user u so as to enable the algorithm to continue, wherein phi is a probability function; order S ω To select the random variable of v, the probability that user v is selected is related to its confidence value for user omega, i.e.
Figure RE-FDA0003971640060000031
Wherein, tr u,v A trust value for user v to user u; repeating the above process, the algorithm continues to walk in the model trust network until the algorithm terminates or reaches the maximum walk level.
8. The streaming media-oriented decentralized federated learning method based on neighbor trust aggregation according to claim 7, wherein the trust value is defined such that U belongs to U and v belongs to fol u The trust value TR of the user v for u may be defined based on comment, forward and mention behaviors as:
(1) Let RT u,v The number of times user u is forwarded for user v, then the trust value based on the forwarding behavior:
Figure RE-FDA0003971640060000032
(2) Order CM u,v And if the number of times of commenting the user u by the user v is greater than the threshold value, the trust value based on the comment behavior is as follows:
Figure RE-FDA0003971640060000033
(3) Let ME u,v For the number of times user v refers to user u in the work, forwarding or review, then based on the trust value of the referring behavior:
Figure RE-FDA0003971640060000034
(4) And integrating the trust values of 3 online behaviors, and defining the trust value of the user v to u as follows:
Figure RE-FDA0003971640060000035
in the formula Tr rt (u,v)、Tr cm (u, v) and Tr me (u, v) equals 0, then it is made equal to
Figure RE-FDA0003971640060000036
9. The streaming media-oriented decentralized federated learning method based on neighbor trust aggregation according to claim 2, wherein the transform network includes an Input Block, an Encoder Block, a Decoder Block, and an Output Block; the Output end of the Input Block is respectively connected with an Encoder Block and a Decoder Block, the Output end of the Encoder Block is connected with a Decoder Block, and the Decoder Block outputs to the Output Block;
the Encoder Block part consists of N identical networks, specifically: multi-Head Self-extension (MSA) and Feed-Forward Network, each sub-Network layer adding an Add & Norm layer for residual concatenation and normalization operations;
the Add & Norm layer sums and normalizes the input and output of the Multi-Head Attention layer, then passes to the FFN layer, and finally performs the Add & Norm process again.
10. The streaming media-oriented decentralized federation learning method based on neighbor trust aggregation, as recited in claim 1, wherein the Transformer network is formulated as
Figure RE-FDA0003971640060000041
Where Source is a time-dependent feature in the feature vector, similarity (·) represents a similarity function, lx represents the length of the input Source, and query represents some element derived from a given target.
CN202211234598.1A 2022-10-10 2022-10-10 Stream media-oriented decentralization federation learning method based on neighbor trust aggregation Active CN115600642B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211234598.1A CN115600642B (en) 2022-10-10 2022-10-10 Stream media-oriented decentralization federation learning method based on neighbor trust aggregation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211234598.1A CN115600642B (en) 2022-10-10 2022-10-10 Stream media-oriented decentralization federation learning method based on neighbor trust aggregation

Publications (2)

Publication Number Publication Date
CN115600642A true CN115600642A (en) 2023-01-13
CN115600642B CN115600642B (en) 2024-02-06

Family

ID=84845977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211234598.1A Active CN115600642B (en) 2022-10-10 2022-10-10 Stream media-oriented decentralization federation learning method based on neighbor trust aggregation

Country Status (1)

Country Link
CN (1) CN115600642B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117275098A (en) * 2023-11-13 2023-12-22 南京栢拓视觉科技有限公司 Federal increment method oriented to action recognition and based on topology data analysis

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200137083A1 (en) * 2018-10-24 2020-04-30 Nec Laboratories America, Inc. Unknown malicious program behavior detection using a graph neural network
CN112288094A (en) * 2020-10-09 2021-01-29 武汉大学 Federal network representation learning method and system
CN113378243A (en) * 2021-07-14 2021-09-10 南京信息工程大学 Personalized federal learning method based on multi-head attention mechanism
CN114219160A (en) * 2021-12-20 2022-03-22 湖南大学 Federal learning-based production chain cooperative scheduling method
CN114265913A (en) * 2021-12-30 2022-04-01 内蒙古大学 Space-time prediction algorithm based on federal learning on industrial Internet of things edge equipment
CN114679332A (en) * 2022-04-14 2022-06-28 浙江工业大学 APT detection method of distributed system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200137083A1 (en) * 2018-10-24 2020-04-30 Nec Laboratories America, Inc. Unknown malicious program behavior detection using a graph neural network
CN112288094A (en) * 2020-10-09 2021-01-29 武汉大学 Federal network representation learning method and system
CN113378243A (en) * 2021-07-14 2021-09-10 南京信息工程大学 Personalized federal learning method based on multi-head attention mechanism
CN114219160A (en) * 2021-12-20 2022-03-22 湖南大学 Federal learning-based production chain cooperative scheduling method
CN114265913A (en) * 2021-12-30 2022-04-01 内蒙古大学 Space-time prediction algorithm based on federal learning on industrial Internet of things edge equipment
CN114679332A (en) * 2022-04-14 2022-06-28 浙江工业大学 APT detection method of distributed system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117275098A (en) * 2023-11-13 2023-12-22 南京栢拓视觉科技有限公司 Federal increment method oriented to action recognition and based on topology data analysis
CN117275098B (en) * 2023-11-13 2024-02-27 南京栢拓视觉科技有限公司 Federal increment method oriented to action recognition and based on topology data analysis

Also Published As

Publication number Publication date
CN115600642B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
Zhang et al. A cross-domain recommender system with kernel-induced knowledge transfer for overlapping entities
CN106682991B (en) Information propagation model based on online social network and propagation method thereof
CN116842258A (en) Group recommendation method for feature enhancement based on meta-path context
Liu et al. Identifying experts in community question answering website based on graph convolutional neural network
CN115600642A (en) Streaming media-oriented decentralized federal learning method based on neighbor trust aggregation
Hajibabaei et al. Women and key positions in scientific collaboration networks: analyzing central scientists’ profiles in the artificial intelligence ecosystem through a gender lens
Aylani et al. Community detection in social network based on useras social activities
Meng et al. POI recommendation for occasional groups Based on hybrid graph neural networks
Wu et al. A Federated Deep Learning Framework for Privacy-Preserving Consumer Electronics Recommendations
He et al. A topic community-based method for friend recommendation in online social networks via joint nonnegative matrix factorization
Cheng et al. Social role identification via dual uncertainty minimization regularization
Chen et al. Link prediction and node classification based on multitask graph autoencoder
Sun et al. Mapping users across social media platforms by integrating text and structure information
Qi et al. Breaking the barrier to transferring link information across networks
Cui et al. Identification of Micro-blog Opinion Leaders based on User Features and Outbreak Nodes.
Liang et al. The graph embedded topic model
Zhou et al. The deep fusion of topological structure and attribute information for link prediction
Ma et al. Friend closeness based user matching cross social networks
Wang et al. Federated Graph Attention Network for Rumor Detection
Zarghami et al. Elevating prediction accuracy in trust-aware collaborative filtering recommenders through t-index metric and toptrustee lists
Qin et al. Recommender resources based on acquiring user's requirement and exploring user's preference with Word2Vec model in web service
Zhang et al. SARC: Split-and-recombine networks for knowledge-based recommendation
Luo et al. Identification of opinion leaders by using social network embedding
Huang et al. Social network coalescence based on multilayer network model
Cheng et al. Community detection based on directed weighted signed graph convolutional networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant