Data query method, device, electronic device and storage medium
Through the interactive relationship extraction model without labeling samples, multiple feature extraction networks are used to extract and fuse user interaction data, solving the problem of manual labeling dependence in the existing technology, and achieving efficient data query and classification.
Patent Information
- Application Number
- CN202110972694.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-24
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-08-24
AI Technical Summary
The prior art relies on a large number of manual labeling samples in user groups or user content classification, resulting in inefficient classification and high labeling costs.
Using an interactive relationship extraction model without labeling samples, the object interaction data is extracted and fused through at least two different feature extraction networks, and similarity calculation is performed in combination with preset processing tasks and reference features to obtain processing results.
Reduce dependence on manual labeled samples, improve the efficiency of data query, save human resources, and achieve good training results in small or no labeled samples.
Smart Images

Figure CN115718812B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data query method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of deep learning technology and inspired by graph embedding techniques in the field of graph neural networks, automatically learning vector representations of nodes or graphs in networks has become a research hotspot in recent years. Most graph representation learning methods rely heavily on data annotation, but with the massive growth of graph data, this type of supervised learning requires high annotation costs.
[0003] Currently, the main approach to classifying user groups or user content involves manually labeling users based on their interaction data and using this labeled interaction data to train a graph representation model. However, this approach requires a large number of labeled samples to ensure that the graph representation model has good feature extraction and classification capabilities for interaction data. This heavy reliance on manual labeling hinders classification efficiency. Summary of the Invention
[0004] Embodiments of the present invention provide a data query method, device, electronic device, and storage medium, which can reduce the dependence of data query results on manually labeled samples, save human resources, and help improve data query efficiency.
[0005] An embodiment of the present invention provides a data query method, including:
[0006] Obtaining object interaction data and an interaction relationship extraction model, wherein the object interaction data includes an association relationship between a target object interaction operation and an interaction-related object, a training sample of the interaction relationship extraction model includes unlabeled sample interaction data, and the interaction relationship extraction model includes at least two different feature extraction networks;
[0007] Performing feature extraction on the object interaction data through each of the feature extraction networks in the interaction relationship extraction model to obtain interaction features corresponding to each of the feature extraction networks;
[0008] Performing feature fusion on the interaction features corresponding to each of the feature extraction networks to obtain object interaction features corresponding to the object interaction data;
[0009] Based on the object interaction feature and the preset processing task, obtaining a processed interaction feature corresponding to the preset processing task, wherein the preset processing task is related to the target object interaction operation or the interaction-related object;
[0010] Calculating similarity between the processed interaction feature and at least one reference feature corresponding to the preset processing task to obtain similarity between the processed interaction feature and each reference feature;
[0011] A processing result of the preset processing task is obtained based on the similarity.
[0012] Accordingly, an embodiment of the present invention further provides a data query device, comprising:
[0013] a data acquisition unit, configured to acquire object interaction data and an interaction relationship extraction model, wherein the object interaction data includes the association relationship between the target object interaction operation and the interaction-related object, the training samples of the interaction relationship extraction model include unlabeled sample interaction data, and the interaction relationship extraction model includes at least two different feature extraction networks;
[0014] a feature extraction unit, configured to perform feature extraction on the object interaction data through each of the feature extraction networks in the interaction relationship extraction model, and obtain interaction features corresponding to each of the feature extraction networks;
[0015] a feature fusion unit, configured to fuse the interaction features corresponding to the feature extraction networks to obtain object interaction features corresponding to the object interaction data;
[0016] a feature processing unit configured to obtain, based on the object interaction feature and a preset processing task, a processed interaction feature corresponding to the preset processing task, wherein the preset processing task is related to the target object interaction operation or the interaction-related object;
[0017] a similarity calculation unit, configured to perform similarity calculation on the processed interaction feature and at least one reference feature corresponding to the preset processing task, to obtain a similarity between the processed interaction feature and each reference feature;
[0018] A result acquisition unit is used to obtain a processing result of the preset processing task based on the similarity.
[0019] Optionally, the preset processing task includes an object query task related to interactively associated objects, and the reference features corresponding to the object query task are obtained by extracting features of interactively associated objects with which the target object can interact;
[0020] Correspondingly, the feature processing unit is used to obtain object query content features based on the object query task;
[0021] Perform feature fusion based on the object interaction feature and the object query content feature to obtain a processed interaction feature corresponding to the preset processing task;
[0022] The similarity calculation unit is configured to perform similarity calculation on the processed interaction feature and at least one reference feature corresponding to the object query task.
[0023] Optionally, the preset processing task includes an interactive query task related to an interactive operation of a target object, and the reference feature corresponding to the interactive query task is obtained by extracting interactive features from reference interactive data of at least one object using the interactive relationship extraction model;
[0024] Correspondingly, the similarity calculation unit is configured to perform similarity calculation on the processed interaction feature and at least one reference feature corresponding to the interaction query task.
[0025] Optionally, the interaction relationship extraction model includes a first feature extraction network and a second feature extraction network, a first parameter of the first feature extraction network is different from a second parameter of the second feature extraction network, and the second parameter is adjusted based on the first parameter;
[0026] Correspondingly, the feature extraction unit is configured to map the object interaction data into an interaction feature vector space using a first parameter of the first feature extraction network, and obtain a first interaction feature corresponding to the first feature extraction network based on the mapping result;
[0027] The object interaction data is mapped to the interaction feature vector space through the second parameter of the second feature extraction network, and a second interaction feature corresponding to the second feature extraction network is obtained based on the mapping result.
[0028] Optionally, the first feature extraction network includes at least one graph convolution unit, and the second feature extraction network includes at least one graph convolution unit. The feature extraction unit in the embodiment of the present invention is configured to perform feature fusion based on the first interaction feature output by the previous graph convolution unit using the convolution parameter of the current graph convolution unit to obtain the first interaction feature of the current graph convolution unit, wherein if the current graph convolution unit is the first graph convolution unit, the first interaction feature output by the previous graph convolution unit is obtained based on the object interaction data;
[0029] Taking the next graph convolution unit after the current graph convolution unit as the new current graph convolution unit, returning to execute the step of performing feature fusion based on the first interaction feature output by the previous graph convolution unit and obtaining the first interaction feature of the current graph convolution unit by using the convolution parameters of the current graph convolution unit, until the last graph convolution unit outputs the first interaction feature;
[0030] Performing feature fusion based on the second interaction feature output by the previous graph convolution unit using the convolution parameters of the current graph convolution unit to obtain the second interaction feature of the current graph convolution unit, wherein if the current graph convolution unit is the second graph convolution unit, the second interaction feature output by the previous graph convolution unit is obtained based on the object interaction data;
[0031] The next graph convolution unit after the current graph convolution unit is used as the new current graph convolution unit, and the convolution parameters of the current graph convolution unit are returned to execute, and feature fusion is performed based on the second interaction feature output by the previous graph convolution unit to obtain the second interaction feature of the current graph convolution unit, until the last graph convolution unit outputs the second interaction feature.
[0032] Optionally, the data query device provided by the embodiment of the present invention further includes a training feature extraction unit, a training loss calculation unit and a model parameter adjustment unit;
[0033] The training feature extraction unit is used to perform feature extraction on at least two groups of sample interaction data respectively through each feature extraction network to be trained in the interaction relationship extraction model to be trained, and obtain sample interaction features obtained by each of the sample interaction data through each feature extraction network to be trained;
[0034] The training loss calculation unit is used to calculate the loss of the interaction relationship extraction model to be trained based on the sample interaction features obtained by each feature extraction network to be trained through each sample interaction data;
[0035] The model parameter adjustment unit is used to adjust the model parameters of the interaction relationship extraction model to be trained according to the loss to obtain a trained interaction relationship extraction model.
[0036] Optionally, the interaction relationship extraction model to be trained includes a first feature extraction network to be trained and a second feature extraction network to be trained, the first feature extraction network to be trained includes a first graph convolution unit, and the second feature extraction network to be trained includes a second graph convolution unit;
[0037] Correspondingly, the training feature extraction unit is configured to perform first interaction feature extraction on at least two groups of sample interaction data respectively through the first graph convolution unit, and obtain a feature vector corresponding to each of the sample interaction data as a first sample interaction feature;
[0038] The second graph convolution unit is used to extract second interaction features from at least two groups of sample interaction data, respectively, to obtain feature vectors corresponding to each of the sample interaction data as second sample interaction features.
[0039] Optionally, the first feature extraction network to be trained further includes a first feature mapping unit and a feature prediction unit, and the second feature extraction network to be trained further includes a second feature mapping unit;
[0040] The training loss calculation unit is configured to perform feature mapping on the first sample interaction feature corresponding to each sample interaction data through the first feature mapping unit to obtain the first mapping feature corresponding to each sample interaction data;
[0041] Performing feature mapping on the first sample interaction feature corresponding to each sample interaction data by the second feature mapping unit to obtain a second mapping feature corresponding to each sample interaction data;
[0042] By means of the feature prediction unit, feature prediction is performed on the first mapping feature and the second mapping feature corresponding to any group of the sample interaction data to obtain the first prediction feature and the second prediction feature corresponding to the sample interaction data;
[0043] Based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each of the sample interaction data, the loss of the first feature extraction network to be trained is obtained as the loss of the interaction relationship extraction model to be trained.
[0044] Optionally, the model parameter adjustment unit is used to adjust the first network parameters of the first feature extraction network to be trained according to the loss to obtain a trained first feature extraction network;
[0045] Adjusting the second network parameters of the second feature extraction network to be trained based on the first network parameters of the trained first feature extraction network to obtain a trained second feature extraction network;
[0046] A trained interaction relationship extraction model is obtained based on the trained first feature extraction network and the trained second feature extraction network.
[0047] Optionally, before the training feature extraction unit, the data query device provided by the embodiment of the present invention further includes a data augmentation unit, configured to perform data augmentation processing on at least two groups of sample interaction data to obtain augmented sample interaction data corresponding to each of the sample interaction data;
[0048] Correspondingly, the training feature extraction unit is used to perform interaction feature extraction on at least two groups of sample interaction data and the augmented sample interaction data corresponding to each of the sample interaction data through each feature extraction network to be trained in the interaction relationship extraction model to be trained, and obtain the sample interaction features of each of the sample interaction data and the augmented sample interaction data obtained through each of the feature extraction networks to be trained.
[0049] Optionally, the model parameter adjustment unit further includes a semi-supervised training unit, which is used to obtain at least two groups of labeled sample interaction data, and mix the labeled sample interaction data with at least one group of unlabeled sample interaction data to obtain updated sample interaction data;
[0050] Returning to the step of extracting first interaction features on at least two groups of sample interaction data respectively through the first graph convolution unit, and obtaining feature vectors corresponding to each of the sample interaction data as first sample interaction features, until a hybrid training loss of the first feature extraction network to be trained is obtained by calculating based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each of the sample interaction data;
[0051] Using the labeled sample interaction data as sample interaction data, returning to the step of performing first interaction feature extraction on at least two groups of sample interaction data respectively through the first graph convolution unit to obtain a feature vector corresponding to each of the sample interaction data as a first sample interaction feature, until a labeled training loss of the first feature extraction network to be trained is obtained by calculating based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each of the sample interaction data;
[0052] Calculating the prediction loss of the interaction relationship extraction model to be trained based on the prediction result of the labeled sample interaction data and the labeling information of the labeled sample interaction data;
[0053] The loss of the interaction relationship extraction model to be trained is obtained according to the labeled training loss, the hybrid training loss and the prediction loss.
[0054] Correspondingly, an embodiment of the present invention further provides an electronic device, comprising a memory and a processor; the memory stores an application, and the processor is used to run the application in the memory to execute the steps in any data query method provided in the embodiment of the present invention.
[0055] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps in any data query method provided by the embodiment of the present invention.
[0056] By adopting the scheme of the embodiment of the present invention, object interaction data and an interaction relationship extraction model can be obtained, wherein the object interaction data includes the association relationship between the target object interaction operation and the interaction-related object, the training sample of the interaction relationship extraction model includes unlabeled sample interaction data, and the interaction relationship extraction model includes at least two different feature extraction networks. Through each feature extraction network in the interaction relationship extraction model, feature extraction is performed on the object interaction data to obtain the interaction features corresponding to each feature extraction network, and feature fusion is performed on the interaction features corresponding to each feature extraction network to obtain the object interaction features corresponding to the object interaction data. Based on the object interaction features and the preset processing task, the processed interaction features corresponding to the preset processing task are obtained, and the preset processing task is related to the target object interaction operation or the interaction-related object. The processed interaction features A similarity calculation is performed on at least one reference feature corresponding to the preset processing task to obtain the similarity between the processed interaction feature and each reference feature, and the processing result of the preset processing task is obtained based on the similarity; since the interaction relationship extraction model in this embodiment performs two different feature extraction processes when extracting features from the object interaction data, the relationship between the target object interaction operation and the interaction-related object contained in the object interaction data can be better understood by fusing the features of the two different feature extraction processes. Therefore, the interaction relationship extraction model obtained by training with unlabeled sample interaction data can achieve good training effects even when the number of labeled samples is small or all are unlabeled samples, thereby reducing the demand for manually labeled samples for model training, saving human resources, and helping to improve the efficiency of data query. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0058] Figure 1 Schematic diagram of a scenario of a data query method provided by an embodiment of the present invention;
[0059] Figure 2 is a flow chart of a data query method provided by an embodiment of the present invention;
[0060] Figure 3 Schematic diagram of an implementation of an interaction relationship extraction model to be trained provided by an embodiment of the present invention;
[0061] Figure 4 is another flowchart of the data query method provided by an embodiment of the present invention;
[0062] Figure 5 Schematic diagram of the structure of a data query device provided by an embodiment of the present invention;
[0063] Figure 6 is another structural diagram of a data query device provided by an embodiment of the present invention;
[0064] Figure 7 Schematic diagram of the structure of the model training unit provided by an embodiment of the present invention;
[0065] Figure 8 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0066] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0067] The embodiments of the present invention provide a data query method, device, electronic device, and computer-readable storage medium. Specifically, the embodiments of the present invention provide a data query method applicable to a data query device, which can be integrated into an electronic device.
[0068] The electronic device can be a terminal or other device, including but not limited to mobile terminals and fixed terminals. For example, mobile terminals include but are not limited to smartphones, smart watches, tablet computers, laptops, intelligent voice interaction devices, vehicle-mounted terminals, etc., among which fixed terminals include but are not limited to desktop computers, smart home appliances, etc.
[0069] The electronic device can also be a server or other device. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms, but is not limited to these.
[0070] The data query method of the embodiment of the present invention can be implemented by a server, or can be implemented by a terminal and a server together.
[0071] The following describes the method by taking the example of a terminal and a server jointly implementing the data query method.
[0072] like Figure 1 As shown, the data query system provided by the embodiment of the present invention includes a terminal 10 and a server 20, etc.; the terminal 10 and the server 20 are connected via a network, for example, via a wired or wireless network connection, etc., wherein the terminal 10 can exist as a terminal for sending object interaction data to the server 20.
[0073] The terminal 10 may be a terminal for uploading the object interaction data to be analyzed, and is used to send the object interaction data to be processed to the server 20 .
[0074] The server 20 may be configured to obtain object interaction data and an interaction relationship extraction model, wherein the object interaction data includes the relationship between target object interaction operations and interaction-related objects. The training samples of the interaction relationship extraction model include unlabeled sample interaction data, and the interaction relationship extraction model includes at least two different feature extraction networks.
[0075] The server 20 may extract features from the object interaction data using each feature extraction network in the interaction relationship extraction model to obtain interaction features corresponding to each feature extraction network, and perform feature fusion on the interaction features corresponding to each feature extraction network to obtain object interaction features corresponding to the object interaction data;
[0076] Server 20 can obtain the processed interaction features corresponding to the preset processing task based on the object interaction features and the preset processing task. The preset processing task is related to the target object interaction operation or the interaction-related object. The processed interaction features are calculated with at least one reference feature corresponding to the preset processing task for similarity to obtain the similarity between the processed interaction features and each reference feature, and the processing result of the preset processing task is obtained based on the similarity.
[0077] The server 20 may send the processing result to the terminal 10 so that the terminal 10 may further process the processing result, such as displaying the processing result.
[0078] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0079] The embodiment of the present invention will be described from the perspective of a data query device, which can be integrated into a server or a terminal.
[0080] The solution provided by the embodiment of the present invention involves artificial intelligence machine learning, natural language processing and other technologies, such as Figure 2 As shown, the specific process of the data query method of this embodiment can be as follows:
[0081] 201. Obtain object interaction data and an interaction relationship extraction model. The object interaction data includes the association relationship between the target object interaction operation and the interaction-related object. The training samples of the interaction relationship extraction model include unlabeled sample interaction data. The interaction relationship extraction model includes at least two different feature extraction networks.
[0082] The object interaction data may be one or more sets of data generated by the target object interacting with the associated objects over a period of time. The target object may be the object targeted when executing the data query method provided by the embodiments of the present invention. For example, when performing a content query, the target object of this data query method is the user who needs to perform the content query; for another example, when determining whether a user belongs to a certain user type, the target object of this data query method is the user, and so on.
[0083] The interactively associated object may be the associated object targeted by the target object's target object interactive operation. For example, if the target object can view various information or read novels, then the information and novels here can also be understood as interactively associated objects. For another example, if the target object can follow a public account or use a mini-program, then the public account followed and the mini-program used here can also be understood as interactively associated objects. For another example, if the target object can join a group, then the group joined here can also be understood as an interactively associated object. For another example, if the target object can download and participate in a game, then the game here can also be understood as an interactively associated object, and so on.
[0084] For example, when the target object interaction operation is the target object browsing an article, the interaction-related object may be the article; when the target object interaction operation is the target object's payment behavior, the interaction-related object may be the payment merchant, and so on.
[0085] Specifically, when the queried data involves news, information streams, user-generated content (UGC), and so on, object interaction data can be data generated by the target object's search, click, view, and other operations on various content over a period of time. Correspondingly, target object interaction operations can be operations such as search, click, and view. Interaction-related objects can be the various content corresponding to the target object interaction operations. The association between the target object interaction operations and interaction-related objects can be the order in which the target object interaction operations are performed on the various content.
[0086] For another example, when the queried data is a related object of the same type as the target object, the object interaction data can be the data generated by the current user's operation. For example, the target object interaction operation can be the operation of a medical insurance user making a medical insurance payment, and the interactive related objects can be the nodes such as doctors, hospitals, and departments involved in the medical insurance payment process. The relationship between the target object interaction operation and the interactive related objects can be the connection relationship and process sequence of each node in the medical insurance payment process, etc.
[0087] Specifically, the historical period may be the most recent hour, the most recent week, or the time from when the target object first performs a target object interaction operation to when data query is performed, and so on.
[0088] For example, obtaining object interaction data may include receiving object interaction data input by the target object from the device where the data query device is located (such as data imported by the user of the data query device), or reading saved object interaction data from this device, or receiving object interaction data sent by other devices, etc.
[0089] Similarly, the interaction relationship extraction model can also be obtained from other devices, such as other servers or terminals, or it can be obtained from this device (i.e., the device where the data query device is located), for example, directly reading a pre-saved interaction relationship extraction model from this device, or receiving an interaction relationship extraction model sent by other devices.
[0090] The interaction relationship extraction model can extract the association between target object interaction operations and interaction-related objects in object interaction data. In related technologies, parameters of different branch networks within the same model are shared, requiring comparative learning of negative sample pairs to complete model training. However, the interaction relationship extraction model in this embodiment of the present invention includes at least two different branch networks, which can alleviate the reliance on a large number of negative samples during training.
[0091] The process of building an interactive relationship extraction model involves machine learning technology in the field of artificial intelligence. Machine Learning (ML) is a multidisciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory, and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning typically include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0092] It should be noted that when acquiring the object interaction data and the interaction relationship extraction model, they can be acquired simultaneously or separately. When acquiring them separately, the order of acquiring the object interaction data and the interaction relationship extraction model can be irrelevant.
[0093] In some optional examples, the data query method provided by the embodiments of the present invention can also be applied to fields such as maps and autonomous driving. For example, when applied to the map field, the object interaction data can be data generated by target object interaction operations such as the target user's selection of various planned routes to the destination and attractions around the destination (interactively associated objects) during historical map query processes. Ultimately, based on the processing results of this data query method, a route to the destination or recommended attractions are recommended to the target user.
[0094] For another example, when applied to the field of autonomous driving, object interaction data can be data generated based on the target user's setting operations (target object interaction operations) on various driving parameters (interaction-related objects) during historical autonomous driving processes, and ultimately provide the target user with parameter configurations that conform to driving habits based on the data query method provided in an embodiment of the present invention, and so on.
[0095] 202. Perform feature extraction on the object interaction data through each feature extraction network in the interaction relationship extraction model to obtain interaction features corresponding to each feature extraction network.
[0096] It can be understood that the process of feature extraction of object interaction data by each feature extraction network can be a different feature extraction process. In some embodiments, the interaction relationship extraction model can include at least two feature extraction networks with different structures, for example, one feature extraction network includes 3 convolution layers, and the other feature extraction network includes 2 convolution layers; the interaction relationship extraction model can also include at least two feature extraction networks with exactly the same structure, for example, the number of full convolution layers in the three feature extraction networks is 3 layers, but the neural network parameters in the three feature extraction networks are different, and so on.
[0097] Taking the interactive relationship extraction model including two feature extraction networks as an example for description, the interactive relationship extraction model may include a first feature extraction network and a second feature extraction network. The first parameter of the first feature extraction network is different from the second parameter of the second feature extraction network. The second parameter is adjusted based on the first parameter. In this case, step 202 may include:
[0098] Mapping the object interaction data to an interaction feature vector space using a first parameter of a first feature extraction network, and obtaining a first interaction feature corresponding to the first feature extraction network based on the mapping result;
[0099] The object interaction data is mapped into the interaction feature vector space through the second parameter of the second feature extraction network, and a second interaction feature corresponding to the second feature extraction network is obtained based on the mapping result.
[0100] The interactive feature vector space mapped by the first feature extraction network and the interactive feature vector space mapped by the second feature extraction network may be the same vector space, or may be two different vector spaces.
[0101] Among them, the first feature extraction network and the second feature extraction network may include network layers such as convolution layers and pooling layers. For example, the first feature extraction network and the second feature extraction network can perform convolution processing on the object interaction data through the convolution layer, and perform maximum pooling processing, average pooling processing, etc. on the convolution processing results through the pooling layer to obtain the corresponding first interaction features and second interaction features.
[0102] In some optional embodiments, a graph convolutional network may be configured in the first feature extraction network and the second feature extraction network to extract interaction features from the object interaction data. That is, the first feature extraction network may include at least one graph convolutional unit, and the second feature extraction network may include at least one graph convolutional unit.
[0103] Generally, in order to enhance the effect of feature extraction, multiple graph convolution networks (graph convolution units) can be simultaneously set in the first feature extraction network and the second feature extraction network. In this case, the step of "mapping the object interaction data into the interaction feature vector space using the first parameter of the first feature extraction network, and obtaining the first interaction feature corresponding to the first feature extraction network based on the mapping result" may include:
[0104] By using the convolution parameters of the current graph convolution unit, feature fusion is performed based on the first interaction feature output by the previous graph convolution unit to obtain the first interaction feature of the current graph convolution unit. Wherein, if the current graph convolution unit is the first graph convolution unit, the first interaction feature output by the previous graph convolution unit is obtained based on the object interaction data;
[0105] The next graph convolution unit after the current graph convolution unit is used as the new current graph convolution unit, and the convolution parameters of the current graph convolution unit are returned to perform feature fusion based on the first interaction feature output by the previous graph convolution unit to obtain the first interaction feature of the current graph convolution unit, until the last graph convolution unit outputs the first interaction feature;
[0106] Correspondingly, the step of “mapping the object interaction data into the interaction feature vector space using the second parameter of the second feature extraction network, and obtaining a second interaction feature corresponding to the second feature extraction network based on the mapping result” may include:
[0107] By using the convolution parameters of the current graph convolution unit, feature fusion is performed based on the second interaction feature output by the previous graph convolution unit to obtain the second interaction feature of the current graph convolution unit. Wherein, if the current graph convolution unit is the second graph convolution unit, the second interaction feature output by the previous graph convolution unit is obtained based on the object interaction data;
[0108] The next graph convolution unit after the current graph convolution unit is used as the new current graph convolution unit, and the convolution parameters of the current graph convolution unit are returned to perform feature fusion based on the second interaction feature output by the previous graph convolution unit to obtain the second interaction feature of the current graph convolution unit, until the last graph convolution unit outputs the second interaction feature.
[0109] For example, each graph convolution unit obtains the first interaction feature or the second interaction feature of the current graph convolution unit by updating each node in the first interaction feature or the second interaction feature obtained by the previous graph convolution unit. The specific updating method can be as shown in the following formula:
[0110]
[0111] in, represents the representation of node v in the k-th graph convolution unit, N v represents the set of neighbor nodes of node v, represents the representation of node u in the k-1th graph convolutional unit,
[0112] represents the representation of node v in the k-th graph convolution unit, W k is the parameter matrix (convolution parameter) of the kth graph convolution unit, so, Represents the set of all neighbor nodes of node v in the k-1th graph convolution unit.
[0113] Among them, CONCAT represents the vector and Perform vector concatenation. AGGREGATE means concatenating vectors. The vectors in are aggregated. For example, the specific aggregation operation can be maximum pooling or mean pooling. For example, if mean pooling is used for aggregation, the sum of all neighbor features of node v can be divided by the degree of node v to complete the aggregation process. σ is the activation function.
[0114] It is understandable that the interactive relationship extraction model may include more than two feature extraction networks. When there are more than two feature extraction networks in the interactive relationship extraction model, the specific feature extraction method is similar to the above process, and the embodiment of the present invention will not be repeated here.
[0115] 203. Perform feature fusion on the interaction features corresponding to each feature extraction network to obtain object interaction features corresponding to the object interaction data.
[0116] Among them, the method of performing feature fusion may include but is not limited to directly splicing the interactive features corresponding to each feature extraction network, or directly adding the interactive features corresponding to each feature extraction network, or performing weighted summation, etc.
[0117] Taking the interactive relationship extraction model including the first feature extraction network and the second feature extraction network as an example, the feature fusion method can be expressed by the following formula:
[0118]
[0119] in, Represents the object interaction feature obtained after feature fusion, h represents the first interaction feature corresponding to the first feature extraction network, h′ represents the second interaction feature corresponding to the second feature extraction network, Mix λ Represents the feature fusion operation, for example, λ can represent the weight coefficient of the first interaction feature or the second interaction feature in the weighted summation.
[0120] For example, the above formula can also be expressed as The specific value of λ can be arbitrary, and there can be multiple feature fusion methods, which can be set by technicians according to actual conditions.
[0121] It is understandable that when there are more than two feature extraction networks in the interaction relationship extraction model, the specific feature fusion method is similar to the above process, and the embodiment of the present invention will not be described in detail.
[0122] 204. Obtaining a processed interaction feature corresponding to the preset processing task based on the object interaction feature and the preset processing task, wherein the preset processing task is related to the target object interaction operation or the interaction-related object.
[0123] The preset processing task can be a feature processing task set according to data query requirements, and the feature processing task is related to the interactive object. For example, the preset processing task can be an article processing task related to the interactive object (article, news, etc.), or a payment document processing task related to the user's payment behavior, etc.
[0124] In some optional embodiments, the preset processing task may include an object query task related to interactively associated objects. The reference features corresponding to the object query task are obtained by extracting features of interactively associated objects with which the target object can interact. Step 204 may specifically include:
[0125] Based on the object query task, obtain the object query content features;
[0126] Perform feature fusion based on object interaction features and object query content features to obtain processed interaction features corresponding to the preset processing task;
[0127] Correspondingly, the step of “calculating the similarity between the processed interaction feature and at least one reference feature corresponding to the preset processing task” may include:
[0128] A similarity calculation is performed between the processed interaction feature and at least one reference feature corresponding to the object query task.
[0129] For example, when a user (target object) needs to search for content (such as public account articles, news, UGC, music, videos, etc.), the user can enter the query statement in the content platform deployed with the data query device. The content platform can be pre-deployed with a natural language processing model to convert the user's colloquial query content into a feature representation, that is, the user's query content feature.
[0130] The object interaction data may be data generated by a user's historical content browsing behavior. The object interaction features are obtained by performing feature processing on the object interaction data through the interaction relationship extraction model provided by the embodiment of the present invention.
[0131] The specific step of fusing the object interaction features and the object query content features may be to directly concatenate the object interaction features and the object query content features, or to directly add the object interaction features and the object query content features, or to perform weighted summation of the object interaction features and the object query content features, and so on.
[0132] In this case, the object query task related to the interactively associated object may be a content query task related to the content, and the at least one reference feature corresponding to the object query task may include a content representation feature of each content. For example, the content representation feature of each content may be a feature pre-processed using a natural language processing model.
[0133] It is understandable that the natural language processing model used to perform feature processing on each content and the natural language processing model used to process the query content input by the user may be the same or different, and the present invention does not limit this.
[0134] The construction of natural language processing models involves natural language processing technology within the field of artificial intelligence. Natural language processing (NLP) is a key area of research in both computer science and artificial intelligence. It studies the various theories and methods that enable effective communication between humans and computers using natural language. Natural language processing is a discipline that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language we use daily—and is closely linked to the study of linguistics. Natural language processing technologies typically include text processing, semantic understanding, machine translation, robotic question-answering, and knowledge graphs.
[0135] In actual application, in the content recommendation platform, users do not need to input content, and content recommendations are made based on the user's historical object interaction data. At this time, the object query content feature can be empty, or the object query task is not performed. The object query content feature is obtained, and feature fusion is performed based on the object interaction feature and the object query content feature to obtain the processed interaction feature corresponding to the preset processing task.
[0136] In some other optional embodiments, the preset processing task may include an interactive query task related to the target object interactive operation, and the reference feature corresponding to the interactive query task may be obtained by extracting interactive features from reference behavior data of at least one user through an interactive relationship extraction model;
[0137] Correspondingly, the step of “calculating the similarity between the processed interaction feature and at least one reference feature corresponding to the preset processing task” may include:
[0138] A similarity calculation is performed between the processed interaction feature and at least one reference feature corresponding to the interaction query task.
[0139] For example, in the medical insurance field, it is necessary to identify whether a medical insurance user is involved in gang fraud, or in the payment security field, it is necessary to identify whether a user is a high-risk payment user, or in the user analysis field, users need to be classified into categories and other user group classification scenarios. The object interaction features can be obtained by extracting features from the object interaction data of the user to be classified based on the interaction relationship extraction model provided in the embodiment of the present invention.
[0140] At this time, the at least one reference feature corresponding to the interactive query task may be obtained by performing feature extraction and other processing on the interactive data of other users through an interactive relationship extraction model.
[0141] 205. Perform similarity calculation between the processed interaction feature and at least one reference feature corresponding to the preset processing task to obtain similarities between the processed interaction feature and each reference feature.
[0142] In some embodiments, when the processed interaction features and each reference feature are in the form of vectors, the similarity can be obtained by calculating the similarity between the two vectors, for example, calculating the cosine similarity, Euclidean distance, Manhattan distance, etc. between the two vectors. The present invention is not limited to this.
[0143] In other embodiments, the processed interaction features and the reference features may be in the form of identification information of the processed interaction feature identifier and the reference feature identifier. Accordingly, when calculating the similarity, the processed interaction feature identifier and the reference feature identifier may be matched.
[0144] Based on the matching results, the similarity between the processed interactive feature identifier and each reference feature identifier is obtained.
[0145] For example, the similarity can be 1 for a complete match or 0 for a complete mismatch. When the processed interaction feature identifier and each reference feature identifier can include multiple identifiers, the similarity can be the ratio of the number of identifiers of the processed interaction feature identifier and each reference feature identifier to the total number of identifiers, and so on.
[0146] 206. Obtain a processing result of a preset processing task based on the similarity.
[0147] In step 206, the data corresponding to the reference feature with the highest similarity to the processed interaction feature may be used as the processing result, or the data corresponding to the first n reference features with the highest similarity to the processed interaction feature may be used as the processing result, etc. Specifically, the value of n can be set by the technician according to actual application requirements.
[0148] For example, in a content recommendation scenario, the processing result of a preset processing task may be the top n contents whose similarity with the object interaction feature is higher than a preset threshold or whose similarity is the highest; in a user classification scenario, the processing result of a preset processing task may be the top n users whose similarity with the object interaction feature is higher than a preset threshold or whose similarity is the highest, and so on.
[0149] In some examples, after determining the processing results, data can be further filtered based on data query conditions. For example, the data query conditions can also include certain conditions set by the user or pre-set by technical personnel. For example, if a user pre-sets that they do not like songs by certain singers, then in a music recommendation scenario, the audio corresponding to the songs by the singers that the user does not like can be excluded from the processing results, and so on.
[0150] It is understandable that in order to make the interaction relationship extraction model have good interaction relationship extraction capabilities, the interaction relationship extraction model is generally pre-trained. The step "before obtaining object interaction data and interaction relationship extraction model" may also include:
[0151] Performing feature extraction on at least two groups of sample interaction data respectively through each feature extraction network to be trained in the interaction relationship extraction model to be trained, and obtaining sample interaction features obtained by each feature extraction network to be trained for each sample interaction data;
[0152] Based on the sample interaction features obtained by each feature extraction network to be trained based on the interaction data of each sample, the loss of the interaction relationship extraction model to be trained is calculated;
[0153] According to the loss, the model parameters of the interaction relationship extraction model to be trained are adjusted to obtain the trained interaction relationship extraction model.
[0154] In some examples, after adjusting the model parameters of the interaction relationship extraction model to be trained, the step of "extracting features of at least two groups of sample interaction data separately through each feature extraction network to be trained in the interaction relationship extraction model to be trained, and obtaining sample interaction features of each sample interaction data obtained through each feature extraction network to be trained" can be returned to execute, and the above steps can be executed multiple times until the model training end conditions are met to obtain the trained interaction relationship extraction model.
[0155] Among them, the conditions for ending model training include but are not limited to the loss not exceeding a preset loss threshold, or the number of training times of the interaction relationship extraction model is not less than a preset minimum number threshold, or the calculated loss tends to be stable (for example, the loss no longer decreases), etc.
[0156] Taking the interaction relationship extraction model to be trained including two different feature extraction networks as an example: the interaction relationship extraction model to be trained may include a first feature extraction network to be trained and a second feature extraction network to be trained, the first feature extraction network to be trained may include a first graph convolution unit, and the second feature extraction network to be trained may include a second graph convolution unit;
[0157] Correspondingly, the step of “performing feature extraction on at least two groups of sample interaction data respectively through each feature extraction network to be trained in the interaction relationship extraction model to be trained, and obtaining sample interaction features of each sample interaction data obtained by each feature extraction network to be trained” may include:
[0158] Performing first interaction feature extraction on at least two groups of sample interaction data using a first graph convolution unit, and obtaining a feature vector corresponding to each sample interaction data as a first sample interaction feature;
[0159] The second graph convolution unit is used to extract second interaction features from at least two groups of sample interaction data, respectively, to obtain feature vectors corresponding to each sample interaction data as second sample interaction features.
[0160] In actual applications, only the first and second graph convolutional units in the trained interaction relationship extraction model can be retained. To reduce reliance on labeled sample data, the present invention employs two structurally distinct branch networks for training, converting the classification loss used in related techniques into a regression loss for calculating one of the branch networks. This achieves efficient self-supervised contrastive learning without the need for negative sample pairs.
[0161] Specifically, such as Figure 3 As shown, the first feature extraction network to be trained may further include a first feature mapping unit and a feature prediction unit, and the second feature extraction network to be trained may further include a second feature mapping unit. The step of "calculating the loss of the interaction relationship extraction model to be trained based on the sample interaction features obtained by each feature extraction network to be trained for each sample interaction data" may include:
[0162] Performing feature mapping on the first sample interaction features corresponding to each sample interaction data through the first feature mapping unit to obtain the first mapping features corresponding to each sample interaction data;
[0163] Performing feature mapping on the first sample interaction features corresponding to each sample interaction data by a second feature mapping unit to obtain second mapping features corresponding to each sample interaction data;
[0164] By means of a feature prediction unit, feature prediction is performed on the first mapping feature and the second mapping feature corresponding to any set of sample interaction data to obtain the first prediction feature and the second prediction feature corresponding to the sample interaction data;
[0165] Based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each sample interaction data, the loss of the first feature extraction network to be trained is obtained as the loss of the interaction relationship extraction model to be trained.
[0166] The loss of the first feature extraction network to be trained can be obtained by calculating the L2 norm of the outputs of the two feature extraction networks. The specific calculation formula can be shown as follows:
[0167]
[0168] Among them, G i represents the interaction data of the i-th group of samples, G j represents the interaction data of the jth group of samples, zi represents the first mapping feature corresponding to the interaction data of the i-th group of samples, h θ (z i ) represents the first predicted feature obtained after feature prediction of the first mapping feature corresponding to the interaction data of the i-th group of samples, z′ j Represents the second mapping feature corresponding to the j-th group of sample interaction data, z′ i represents the second mapping feature corresponding to the interaction data of the i-th group of samples, h θ (z′ i ) represents the second predicted feature obtained by feature prediction of the second mapping feature corresponding to the interaction data of the i-th group of samples, z j represents the first mapping feature corresponding to the j-th group of sample interaction data, L con (G i ,G j ) represents the loss of the first feature extraction network to be trained.
[0169] The mapping process between the first mapping feature and the second mapping feature can be expressed by the following formula:
[0170] Where z represents the first mapping feature or the second mapping feature, h represents the sample interaction feature, Represents a set of mapping parameters in a mapping unit, represents another set of mapping parameters in the mapping unit, and σ represents the sigmoid activation function.
[0171] It should be noted that and They can be the same or different, and technicians can set them according to actual application conditions.
[0172] The feature prediction process of the feature prediction unit can be expressed by the following formula:
[0173]
[0174] Among them, h θ (z) represents the first prediction feature or the second prediction feature, represents a set of prediction parameters in the feature prediction unit, Represents another set of prediction parameters in the feature prediction unit.
[0175] It should be noted that and They can be the same or different, and technicians can set them according to actual application conditions.
[0176] In this embodiment of the present invention, the parameters of the second feature extraction network are not adjusted based on the loss, but are adjusted based on the adjusted parameters of the first feature extraction network. The step of "adjusting the model parameters of the interaction relationship extraction model to be trained based on the loss to obtain the trained interaction relationship extraction model" may include:
[0177] Adjusting the first network parameters of the first feature extraction network to be trained according to the loss to obtain a trained first feature extraction network;
[0178] Based on the first network parameters of the trained first feature extraction network, adjusting the second network parameters of the second feature extraction network to be trained to obtain the trained second feature extraction network;
[0179] A trained interaction relationship extraction model is obtained according to the trained first feature extraction network and the trained second feature extraction network.
[0180] The second network parameter may be updated by multiplying the first network parameter by a coefficient as the updated second network parameter, or by performing a sliding average on the first network parameter in combination with the unupdated second network parameter. The specific updating process when performing the sliding average can be shown in the following formula:
[0181] θ′ t =τθ′ t-1 +(1-′)θ
[0182] Among them, θ′ t represents the updated second network parameter, θ′ t-1 represents the unupdated second network parameter, θ represents the adjusted first network parameter, and τ represents the sliding average coefficient.
[0183] It is understandable that in order to expand the amount of sample data so that the model can have more training samples, data augmentation processing can be performed on the data before model training. Specifically, before the step of "using the interaction relationship extraction model to be trained to extract interaction features from at least two groups of sample interaction data to obtain sample interaction features corresponding to each sample interaction data", the data query method provided by the embodiment of the present invention may also include:
[0184] Performing data augmentation processing on at least two groups of sample interaction data to obtain augmented sample interaction data corresponding to each sample interaction data;
[0185] Correspondingly, the step of “performing feature extraction on at least two groups of sample interaction data respectively through each feature extraction network to be trained in the interaction relationship extraction model to be trained, and obtaining sample interaction features of each sample interaction data obtained by each feature extraction network to be trained” may include:
[0186] Through each feature extraction network to be trained in the interaction relationship extraction model to be trained, interaction feature extraction is performed on at least two groups of sample interaction data and the augmented sample interaction data corresponding to each sample interaction data, and sample interaction features are obtained by each sample interaction data and the augmented sample interaction data through each feature extraction network to be trained.
[0187] There are many methods for data augmentation on graph data, such as randomly dropping nodes, dropping edges, perturbing features, and sampling subgraphs. When using augmented sample interaction data for model training, the model can reduce the distance between features from the same graph (including graph data with the same nodes, edges, and node features) in the feature space, and increase the distance between features from different graphs in the feature space, thereby learning the topological information of the graph.
[0188] In practical applications, the loss function in the unsupervised scenario is used as a regularization term, and the training method provided by the embodiment of the present invention can be extended to the semi-supervised scenario. Specifically, before the step of "adjusting the model parameters of the interaction relationship extraction model to be trained based on the loss to obtain the trained interaction relationship extraction model", the data query method provided by the embodiment of the present invention can also include:
[0189] Obtain at least two sets of labeled sample interaction data, and mix the labeled sample interaction data with at least one set of unlabeled sample interaction data to obtain updated sample interaction data;
[0190] Returning to the step of performing first interaction feature extraction on the at least two groups of sample interaction data respectively through the first graph convolution unit, obtaining a feature vector corresponding to each sample interaction data as the first sample interaction feature, until a hybrid training loss of the first feature extraction network to be trained is calculated based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to the other group of sample interaction data in each sample interaction data;
[0191] The labeled sample interaction data is used as the sample interaction data, and the steps of performing first interaction feature extraction on the at least two groups of sample interaction data respectively through the first graph convolution unit to obtain a feature vector corresponding to each sample interaction data as the first sample interaction feature, until a labeled training loss of the first feature extraction network to be trained is obtained by calculating based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each sample interaction data;
[0192] Based on the prediction results of the labeled sample interaction data and the annotation information of the labeled sample interaction data, the prediction loss of the interaction relationship extraction model to be trained is calculated;
[0193] According to the labeled training loss, mixed training loss and prediction loss, the loss of the interaction relationship extraction model to be trained is obtained.
[0194] Among them, there is a labeled training loss L supcon The calculation process can be expressed by the following formula:
[0195]
[0196] Among them, K represents the data augmentation factor, Π i≠j Indicates the condition that i and j are not equal, Represents G i and G j The sample interaction data obtained by augmenting the data of the same category of graph data instances or the same graph, L con (G i , G j )The calculation method is as described above and will not be repeated here.
[0197] Among them, the mixed training loss L unsup The calculation process can be expressed by the following formula:
[0198]
[0199] in, Represents sample interaction data.
[0200] Among them, the prediction loss can be obtained by calculating the cross entropy loss of the model.
[0201] In summary, the loss of the interaction relationship extraction model to be trained can be calculated by the following formula:
[0202]
[0203] in, For the labeled sample interaction data, It is the unlabeled sample interaction data.
[0204] It is understandable that technicians can set different calculation coefficients for labeled training loss, mixed training loss and training loss, such as 1, ω, ω · etc. to further improve the accuracy of the calculated loss.
[0205] As disclosed in the data query method of the embodiment of the present invention, the object interaction data, sample interaction data, etc. can be stored on the blockchain.
[0206] As can be seen from the above, the embodiments of the present invention can reduce the demand for manually labeled samples in model training, save human resources, and help improve the efficiency of data query.
[0207] The method described in the above embodiments will be further described in detail below with examples.
[0208] In this embodiment, the Figure 1 The system is described by taking the interactive relationship extraction model including the first feature extraction network and the second feature extraction network, and the preset processing task being the object query task related to the interactively associated objects as an example.
[0209] like Figure 4 As shown, the data query method of this embodiment may have the following specific process:
[0210] 401. The server obtains object interaction data and an interaction relationship extraction model.
[0211] The object interaction data includes the association relationship between the target object interaction operation and the interaction-related object, the training sample of the interaction relationship extraction model includes unlabeled sample interaction data, and the interaction relationship extraction model includes a first feature extraction network and a second feature extraction network.
[0212] For example, if user Zhang San performs a data query at this time, the object interaction data is the data generated by Zhang San performing operations on the interaction-related objects.
[0213] The object interaction data may also include personal information of Zhang San, such as name, gender and / or age.
[0214] 402. The server extracts features from the object interaction data using each feature extraction network in the interaction relationship extraction model to obtain interaction features corresponding to each feature extraction network.
[0215] Specifically, step 402 may include:
[0216] The server maps the object interaction data to the interaction feature vector space using the first parameter of the first feature extraction network, and obtains a first interaction feature corresponding to the first feature extraction network based on the mapping result;
[0217] The server maps the object interaction data to the interaction feature vector space through the second parameter of the second feature extraction network, and obtains the second interaction feature corresponding to the second feature extraction network based on the mapping result.
[0218] The first parameter of the first feature extraction network is different from the second parameter of the second feature extraction network, and the second parameter is adjusted based on the first parameter.
[0219] 403. The server performs feature fusion on the interaction features corresponding to each feature extraction network to obtain object interaction features corresponding to the object interaction data.
[0220] In some optional examples, the feature fusion method can be expressed as follows:
[0221]
[0222] in, Represents the object interaction feature obtained after feature fusion, h represents the first interaction feature corresponding to the first feature extraction network, h′ represents the second interaction feature corresponding to the second feature extraction network, Mix λ Represents the feature fusion operation, for example, λ can represent the weight coefficient of the first interaction feature or the second interaction feature in the weighted summation.
[0223] 404. The server obtains object query content features based on the object query task, and fuses the object interaction features with the object query content features to obtain processed interaction features corresponding to the preset processing task.
[0224] For example, when a user needs to search for content (such as public account articles, news, user interactive content, music, videos, etc.), the user can enter the query statement in the content platform deployed with the data query device. The content platform can be pre-deployed with a natural language processing model to convert the user's colloquial query content into a feature representation, that is, the user's query content feature.
[0225] The specific step of fusing the object interaction features and the object query content features may be to directly concatenate the object interaction features and the object query content features, or to directly add the object interaction features and the object query content features, or to perform weighted summation of the object interaction features and the object query content features, or to perform convolution calculation, etc.
[0226] 405. The server calculates a similarity between the processed interaction feature and at least one reference feature corresponding to the object query task.
[0227] Among them, the processed interaction features and each reference feature can both be in the form of vectors, and the similarity can be obtained by calculating the similarity between the two vectors, for example, calculating the cosine similarity, Euclidean distance, Manhattan distance, etc. between the two vectors, which is not limited in the present invention.
[0228] 406. The server obtains a processing result of the preset processing task based on the similarity.
[0229] The processing result of the preset processing task may be the top n contents with the object interaction feature whose similarity is higher than a preset threshold or the top n contents with the highest similarity, and so on.
[0230] This method considers the problem of graph classification in an unsupervised setting and conducts experiments on multiple graph classification datasets, including sub-attribute classification tasks and social network classification tasks. The evaluation metric is classification accuracy. The baseline model includes graph kernel methods and GNN-based methods (such as InfoGraph and GraphCL). The comparison results are shown in the following table:
[0231]
[0232] This approach achieved state-of-the-art results on three of the datasets and comparable performance to the state-of-the-art methods on the remaining datasets. In particular, this approach was extended to semi-supervised scenarios, verifying the performance of representation learning on graph classification and molecular property prediction tasks. The results for the graph classification task are shown in the following table:
[0233]
[0234] As can be seen from the above, the embodiments of the present invention can reduce the dependence of data query results on manually labeled samples, save human resources, and help improve the efficiency of data queries.
[0235] In order to better implement the above method, accordingly, an embodiment of the present invention further provides a data query device.
[0236] refer to Figure 5 , the data query device includes:
[0237] The data acquisition unit 501 may be used to acquire object interaction data and an interaction relationship extraction model. The object interaction data may include the relationship between the target object interaction operation and the interaction-related object. The training samples of the interaction relationship extraction model may include unlabeled sample interaction data. The interaction relationship extraction model may include at least two different feature extraction networks.
[0238] The feature extraction unit 502 may be configured to extract features from the object interaction data using each feature extraction network in the interaction relationship extraction model to obtain interaction features corresponding to each feature extraction network;
[0239] The feature fusion unit 503 may be used to fuse the interaction features corresponding to each feature extraction network to obtain object interaction features corresponding to the object interaction data;
[0240] The feature processing unit 504 may be configured to obtain a processed interaction feature corresponding to a preset processing task based on the object interaction feature and the preset processing task, where the preset processing task is related to the target object interaction operation or the interaction-related object;
[0241] The similarity calculation unit 505 may be configured to calculate a similarity between the processed interaction feature and at least one reference feature corresponding to a preset processing task, to obtain a similarity between the processed interaction feature and each reference feature;
[0242] The result acquisition unit 506 may be configured to obtain a processing result of a preset processing task based on the similarity.
[0243] In some optional embodiments, the preset processing task may include an object query task related to interactively associated objects, and the reference features corresponding to the object query task are obtained by extracting features of interactively associated objects with which the target object can interact;
[0244] Correspondingly, the feature processing unit 504 may be used to obtain object query content features based on the object query task;
[0245] Perform feature fusion based on object interaction features and object query content features to obtain processed interaction features corresponding to the preset processing task;
[0246] The similarity calculation unit can be used to calculate the similarity between the processed interaction feature and at least one reference feature corresponding to the object query task.
[0247] In some optional embodiments, the preset processing task may include an interactive query task related to an interactive operation with a target object, and the reference features corresponding to the interactive query task are obtained by extracting interactive features from reference interactive data of at least one object using an interactive relationship extraction model;
[0248] Correspondingly, the similarity calculation unit 505 may be configured to perform similarity calculation on the processed interaction feature and at least one reference feature corresponding to the interaction query task.
[0249] In some optional embodiments, the interaction relationship extraction model may include a first feature extraction network and a second feature extraction network, a first parameter of the first feature extraction network is different from a second parameter of the second feature extraction network, and the second parameter is adjusted based on the first parameter;
[0250] Correspondingly, the feature extraction unit 502 may be configured to map the object interaction data to the interaction feature vector space using the first parameter of the first feature extraction network, and obtain a first interaction feature corresponding to the first feature extraction network based on the mapping result;
[0251] The object interaction data is mapped into the interaction feature vector space through the second parameter of the second feature extraction network, and a second interaction feature corresponding to the second feature extraction network is obtained based on the mapping result.
[0252] In some optional embodiments, the first feature extraction network may include at least one graph convolution unit, and the second feature extraction network may include at least one graph convolution unit. The feature extraction unit 502 in the embodiment of the present invention may be configured to perform feature fusion based on the first interaction feature output by the previous graph convolution unit through the convolution parameter of the current graph convolution unit to obtain the first interaction feature of the current graph convolution unit, wherein if the current graph convolution unit is the first graph convolution unit, the first interaction feature output by the previous graph convolution unit is obtained based on the object interaction data;
[0253] The next graph convolution unit after the current graph convolution unit is used as the new current graph convolution unit, and the convolution parameters of the current graph convolution unit are returned to perform feature fusion based on the first interaction feature output by the previous graph convolution unit to obtain the first interaction feature of the current graph convolution unit, until the last graph convolution unit outputs the first interaction feature;
[0254] By using the convolution parameters of the current graph convolution unit, feature fusion is performed based on the second interaction feature output by the previous graph convolution unit to obtain the second interaction feature of the current graph convolution unit. Wherein, if the current graph convolution unit is the second graph convolution unit, the second interaction feature output by the previous graph convolution unit is obtained based on the object interaction data;
[0255] The next graph convolution unit after the current graph convolution unit is used as the new current graph convolution unit, and the convolution parameters of the current graph convolution unit are returned to perform feature fusion based on the second interaction feature output by the previous graph convolution unit to obtain the second interaction feature of the current graph convolution unit, until the last graph convolution unit outputs the second interaction feature.
[0256] In some optional embodiments, such as Figure 6 As shown, before the data acquisition unit 501, the data query device provided by the embodiment of the present invention may further include a model training unit 507, such as Figure 7 As shown, the model training unit 507 may include a training feature extraction unit 5071, a training loss calculation unit 5072 and a model parameter adjustment unit 5073;
[0257] The training feature extraction unit 5071 can be used to perform feature extraction on at least two groups of sample interaction data using each to-be-trained feature extraction network in the to-be-trained interaction relationship extraction model, and obtain sample interaction features obtained by each to-be-trained feature extraction network for each sample interaction data;
[0258] The training loss calculation unit 5072 can be used to calculate the loss of the interaction relationship extraction model to be trained based on the sample interaction features obtained by each feature extraction network to be trained through each sample interaction data;
[0259] The model parameter adjustment unit 5073 can be used to adjust the model parameters of the interaction relationship extraction model to be trained according to the loss to obtain the trained interaction relationship extraction model.
[0260] In some optional embodiments, the interaction relationship extraction model to be trained may include a first feature extraction network to be trained and a second feature extraction network to be trained, the first feature extraction network to be trained may include a first graph convolution unit, and the second feature extraction network to be trained may include a second graph convolution unit;
[0261] Correspondingly, the training feature extraction unit 5071 can be used to perform first interaction feature extraction on at least two groups of sample interaction data respectively through the first graph convolution unit, and obtain a feature vector corresponding to each sample interaction data as the first sample interaction feature;
[0262] The second graph convolution unit is used to extract second interaction features from at least two groups of sample interaction data, respectively, to obtain feature vectors corresponding to each sample interaction data as second sample interaction features.
[0263] In some optional embodiments, the first feature extraction network to be trained may further include a first feature mapping unit and a feature prediction unit, and the second feature extraction network to be trained may further include a second feature mapping unit. The training loss calculation unit 5072 may be configured to perform feature mapping on the first sample interaction feature corresponding to each sample interaction data through the first feature mapping unit to obtain the first mapping feature corresponding to each sample interaction data.
[0264] Performing feature mapping on the first sample interaction features corresponding to each sample interaction data by a second feature mapping unit to obtain second mapping features corresponding to each sample interaction data;
[0265] By means of a feature prediction unit, feature prediction is performed on the first mapping feature and the second mapping feature corresponding to any set of sample interaction data to obtain the first prediction feature and the second prediction feature corresponding to the sample interaction data;
[0266] Based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each sample interaction data, the loss of the first feature extraction network to be trained is obtained as the loss of the interaction relationship extraction model to be trained.
[0267] In some optional embodiments, the model parameter adjustment unit 5073 may be configured to adjust the first network parameters of the first feature extraction network to be trained according to the loss, to obtain the trained first feature extraction network;
[0268] Based on the first network parameters of the trained first feature extraction network, adjusting the second network parameters of the second feature extraction network to be trained to obtain the trained second feature extraction network;
[0269] A trained interaction relationship extraction model is obtained according to the trained first feature extraction network and the trained second feature extraction network.
[0270] In some optional embodiments, before the model training unit 507, the data query device provided by the embodiment of the present invention may further include a data augmentation unit 508, which can be used to perform data augmentation processing on at least two groups of sample interaction data to obtain augmented sample interaction data corresponding to each sample interaction data;
[0271] Correspondingly, the training feature extraction unit 5071 can be used to perform interaction feature extraction on at least two groups of sample interaction data and the augmented sample interaction data corresponding to each sample interaction data through each feature extraction network to be trained in the interaction relationship extraction model to be trained, and obtain sample interaction features of each sample interaction data and the augmented sample interaction data obtained through each feature extraction network to be trained.
[0272] In some optional embodiments, the model parameter adjustment unit 5073 may further include a semi-supervised training unit, which may be used to obtain at least two sets of labeled sample interaction data, and mix the labeled sample interaction data with at least one set of unlabeled sample interaction data to obtain updated sample interaction data;
[0273] Returning to the step of performing first interaction feature extraction on the at least two groups of sample interaction data respectively through the first graph convolution unit, obtaining a feature vector corresponding to each sample interaction data as the first sample interaction feature, until a hybrid training loss of the first feature extraction network to be trained is calculated based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to the other group of sample interaction data in each sample interaction data;
[0274] The labeled sample interaction data is used as the sample interaction data, and the steps of performing first interaction feature extraction on the at least two groups of sample interaction data respectively through the first graph convolution unit to obtain a feature vector corresponding to each sample interaction data as the first sample interaction feature, until a labeled training loss of the first feature extraction network to be trained is obtained by calculating based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each sample interaction data;
[0275] Based on the prediction results of the labeled sample interaction data and the annotation information of the labeled sample interaction data, the prediction loss of the interaction relationship extraction model to be trained is calculated;
[0276] According to the labeled training loss, mixed training loss and prediction loss, the loss of the interaction relationship extraction model to be trained is obtained.
[0277] From the above, it can be seen that through the data query device, the dependence of data query results on manually labeled samples can be reduced, human resources can be saved, and the efficiency of data query can be improved.
[0278] In addition, an embodiment of the present invention further provides an electronic device, which may be a terminal or a server, etc. Figure 8 , which shows a schematic structural diagram of an electronic device involved in an embodiment of the present invention, specifically:
[0279] The computer device may include one or more processing core processors 801, one or more computer readable storage media memories 802, a power supply 803, an input unit 804 and other components. Those skilled in the art will understand that Figure 8 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0280] Processor 801 is the control center of the computer device. It connects the various components of the entire computer device using various interfaces and lines. By running or executing software programs and / or modules stored in memory 802 and accessing data stored in memory 802, it performs various functions of the computer device and processes data, thereby performing overall testing of the computer device. Optionally, processor 801 may include one or more processing cores; preferably, processor 801 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 801.
[0281] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
[0282] The computer device also includes a power supply 803 for supplying power to various components. Preferably, the power supply 803 can be logically connected to the processor 801 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 803 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0283] The computer device may further include an input unit 804, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0284] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 801 in the computer device will load the executable files corresponding to one or more application processes into the memory 802 according to the following instructions, and the processor 801 will run the application stored in the memory 802 to implement various functions as follows:
[0285] Obtaining object interaction data and an interaction relationship extraction model, wherein the object interaction data includes the association relationship between the target object interaction operation and the interaction-related object, the training samples of the interaction relationship extraction model include unlabeled sample interaction data, and the interaction relationship extraction model includes at least two different feature extraction networks;
[0286] Through each feature extraction network in the interaction relationship extraction model, feature extraction is performed on the object interaction data to obtain the interaction features corresponding to each feature extraction network;
[0287] Perform feature fusion on the interaction features corresponding to each feature extraction network to obtain the object interaction features corresponding to the object interaction data;
[0288] Based on the object interaction characteristics and the preset processing task, a post-processing interaction characteristic corresponding to the preset processing task is obtained, where the preset processing task is related to the target object interaction operation or the interaction-related object;
[0289] Calculating similarity between the processed interaction feature and at least one reference feature corresponding to the preset processing task to obtain similarity between the processed interaction feature and each reference feature;
[0290] The processing result of the preset processing task is obtained based on the similarity.
[0291] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0292] To this end, an embodiment of the present invention provides a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps of any of the data query methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:
[0293] Obtaining object interaction data and an interaction relationship extraction model, wherein the object interaction data includes the association relationship between the target object interaction operation and the interaction-related object, the training samples of the interaction relationship extraction model include unlabeled sample interaction data, and the interaction relationship extraction model includes at least two different feature extraction networks;
[0294] Through each feature extraction network in the interaction relationship extraction model, feature extraction is performed on the object interaction data to obtain the interaction features corresponding to each feature extraction network;
[0295] Perform feature fusion on the interaction features corresponding to each feature extraction network to obtain the object interaction features corresponding to the object interaction data;
[0296] Based on the object interaction characteristics and the preset processing task, a post-processing interaction characteristic corresponding to the preset processing task is obtained, where the preset processing task is related to the target object interaction operation or the interaction-related object;
[0297] Calculating similarity between the processed interaction feature and at least one reference feature corresponding to the preset processing task to obtain similarity between the processed interaction feature and each reference feature;
[0298] The processing result of the preset processing task is obtained based on the similarity.
[0299] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0300] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0301] Since the instructions stored in the computer-readable storage medium can execute the steps in any data query method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any data query method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0302] According to one aspect of the present application, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in various optional implementations of the above embodiments.
[0303] The above is a detailed introduction to a data query method, device, electronic device and storage medium provided in an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, based on the ideas of the present invention, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A data query method, characterized in that: include: Obtaining object interaction data and an interaction relationship extraction model, wherein the object interaction data includes an association relationship between a target object interaction operation and an interaction-related object, a training sample of the interaction relationship extraction model includes unlabeled sample interaction data, and the interaction relationship extraction model includes at least two different feature extraction networks; Performing feature extraction on the object interaction data through each of the feature extraction networks in the interaction relationship extraction model to obtain interaction features corresponding to each of the feature extraction networks; Performing feature fusion on the interaction features corresponding to each of the feature extraction networks to obtain object interaction features corresponding to the object interaction data; Based on the object interaction feature and the preset processing task, obtaining a processed interaction feature corresponding to the preset processing task, wherein the preset processing task is related to the target object interaction operation or the interaction-related object; Calculating similarity between the processed interaction feature and at least one reference feature corresponding to the preset processing task to obtain similarity between the processed interaction feature and each reference feature; A processing result of the preset processing task is obtained based on the similarity.
2. The data query method according to claim 1, characterized in that: The preset processing task includes an object query task related to interactively associated objects, and the reference features corresponding to the object query task are obtained by extracting features of interactively associated objects with which the target object can interact; The obtaining, based on the object interaction feature and the preset processing task, a processed interaction feature corresponding to the preset processing task, includes: Based on the object query task, obtaining object query content features; Perform feature fusion based on the object interaction feature and the object query content feature to obtain a processed interaction feature corresponding to the preset processing task; The calculating a similarity between the processed interaction feature and at least one reference feature corresponding to the preset processing task includes: A similarity calculation is performed between the processed interaction feature and at least one reference feature corresponding to the object query task.
3. The data query method according to claim 1, characterized in that: The preset processing task includes an interactive query task related to an interactive operation of a target object, and the reference feature corresponding to the interactive query task is obtained by extracting interactive features from reference interactive data of at least one object using the interactive relationship extraction model; The calculating a similarity between the processed interaction feature and at least one reference feature corresponding to the preset processing task includes: A similarity calculation is performed between the processed interaction feature and at least one reference feature corresponding to the interaction query task.
4. The data query method according to claim 1, characterized in that: The interaction relationship extraction model includes a first feature extraction network and a second feature extraction network, a first parameter of the first feature extraction network is different from a second parameter of the second feature extraction network, and the second parameter is adjusted based on the first parameter; The extracting features of the object interaction data by using each of the feature extraction networks in the interaction relationship extraction model to obtain interaction features corresponding to each of the feature extraction networks includes: Mapping the object interaction data to an interaction feature vector space using a first parameter of the first feature extraction network, and obtaining a first interaction feature corresponding to the first feature extraction network based on the mapping result; The object interaction data is mapped to the interaction feature vector space through the second parameter of the second feature extraction network, and a second interaction feature corresponding to the second feature extraction network is obtained based on the mapping result.
5. The data query method according to claim 4, characterized in that: The first feature extraction network includes at least one graph convolution unit, and the second feature extraction network includes at least one graph convolution unit; Mapping the object interaction data to an interaction feature vector space using a first parameter of the first feature extraction network, and obtaining a first interaction feature corresponding to the first feature extraction network based on the mapping result, includes: Performing feature fusion based on the first interaction feature output by the previous graph convolution unit using the convolution parameters of the current graph convolution unit to obtain the first interaction feature of the current graph convolution unit, wherein if the current graph convolution unit is the first graph convolution unit, the first interaction feature output by the previous graph convolution unit is obtained based on the object interaction data; Taking the next graph convolution unit after the current graph convolution unit as the new current graph convolution unit, returning to execute the step of performing feature fusion based on the first interaction feature output by the previous graph convolution unit and obtaining the first interaction feature of the current graph convolution unit by using the convolution parameters of the current graph convolution unit, until the last graph convolution unit outputs the first interaction feature; Mapping the object interaction data to the interaction feature vector space using the second parameter of the second feature extraction network, and obtaining a second interaction feature corresponding to the second feature extraction network based on the mapping result, includes: Performing feature fusion based on the second interaction feature output by the previous graph convolution unit using the convolution parameters of the current graph convolution unit to obtain the second interaction feature of the current graph convolution unit, wherein if the current graph convolution unit is the second graph convolution unit, the second interaction feature output by the previous graph convolution unit is obtained based on the object interaction data; The next graph convolution unit after the current graph convolution unit is used as the new current graph convolution unit, and the convolution parameters of the current graph convolution unit are returned to execute, and feature fusion is performed based on the second interaction feature output by the previous graph convolution unit to obtain the second interaction feature of the current graph convolution unit, until the last graph convolution unit outputs the second interaction feature.
6. The data query method according to claim 1, characterized in that: Before obtaining the object interaction data and the interaction relationship extraction model, the method further includes: Performing feature extraction on at least two groups of sample interaction data respectively through each feature extraction network to be trained in the interaction relationship extraction model to be trained, and obtaining sample interaction features obtained by each of the sample interaction data through each of the feature extraction networks to be trained; Calculating the loss of the interaction relationship extraction model to be trained based on the sample interaction features obtained by each feature extraction network to be trained from each sample interaction data; According to the loss, the model parameters of the interaction relationship extraction model to be trained are adjusted to obtain a trained interaction relationship extraction model.
7. The data query method according to claim 6, characterized in that: The interaction relationship extraction model to be trained includes a first feature extraction network to be trained and a second feature extraction network to be trained, the first feature extraction network to be trained includes a first graph convolution unit, and the second feature extraction network to be trained includes a second graph convolution unit; The feature extraction network to be trained in the interaction relationship extraction model to be trained is used to extract features from at least two groups of sample interaction data, respectively, to obtain sample interaction features obtained by each of the sample interaction data through each of the feature extraction networks to be trained, including: Performing first interaction feature extraction on at least two groups of sample interaction data respectively through the first graph convolution unit to obtain feature vectors corresponding to each of the sample interaction data as first sample interaction features; The second graph convolution unit is used to extract second interaction features from at least two groups of sample interaction data, respectively, to obtain feature vectors corresponding to each of the sample interaction data as second sample interaction features.
8. The data query method according to claim 7, characterized in that: The first feature extraction network to be trained further includes a first feature mapping unit and a feature prediction unit, and the second feature extraction network to be trained further includes a second feature mapping unit; The calculating the loss of the interaction relationship extraction model to be trained based on the sample interaction features obtained by each feature extraction network to be trained based on each sample interaction data includes: Performing feature mapping on the first sample interaction features corresponding to each sample interaction data by the first feature mapping unit to obtain the first mapping features corresponding to each sample interaction data; Performing feature mapping on the first sample interaction feature corresponding to each sample interaction data by the second feature mapping unit to obtain a second mapping feature corresponding to each sample interaction data; By means of the feature prediction unit, feature prediction is performed on the first mapping feature and the second mapping feature corresponding to any group of the sample interaction data to obtain the first prediction feature and the second prediction feature corresponding to the sample interaction data; Based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each of the sample interaction data, the loss of the first feature extraction network to be trained is obtained as the loss of the interaction relationship extraction model to be trained.
9. The data query method according to claim 7, characterized in that: The adjusting the model parameters of the interaction relationship extraction model to be trained according to the loss to obtain the trained interaction relationship extraction model includes: Adjusting first network parameters of the first feature extraction network to be trained according to the loss to obtain a trained first feature extraction network; Adjusting the second network parameters of the second feature extraction network to be trained based on the first network parameters of the trained first feature extraction network to obtain a trained second feature extraction network; A trained interaction relationship extraction model is obtained based on the trained first feature extraction network and the trained second feature extraction network.
10. The data query method according to claim 6, characterized in that: Before extracting interaction features from at least two groups of sample interaction data using the interaction relationship extraction model to be trained to obtain sample interaction features corresponding to each of the sample interaction data, the method further includes: Performing data augmentation processing on at least two groups of sample interaction data to obtain augmented sample interaction data corresponding to each of the sample interaction data; The feature extraction network to be trained in the interaction relationship extraction model to be trained is used to extract features from at least two groups of sample interaction data, respectively, to obtain sample interaction features obtained by each of the sample interaction data through each of the feature extraction networks to be trained, including: Through each feature extraction network to be trained in the interaction relationship extraction model to be trained, interaction feature extraction is performed on at least two groups of sample interaction data and the augmented sample interaction data corresponding to each of the sample interaction data, and sample interaction features obtained by each of the sample interaction data and the augmented sample interaction data through each of the feature extraction networks to be trained are obtained.
11. The data query method according to claim 8, characterized in that: Before adjusting the model parameters of the interaction relationship extraction model to be trained according to the loss to obtain the trained interaction relationship extraction model, the method further includes: Obtain at least two sets of labeled sample interaction data, and mix the labeled sample interaction data with at least one set of unlabeled sample interaction data to obtain updated sample interaction data; Returning to the step of extracting first interaction features on at least two groups of sample interaction data respectively through the first graph convolution unit, and obtaining feature vectors corresponding to each of the sample interaction data as first sample interaction features, until a hybrid training loss of the first feature extraction network to be trained is obtained by calculating based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each of the sample interaction data; Using the labeled sample interaction data as sample interaction data, returning to the step of performing first interaction feature extraction on at least two groups of sample interaction data respectively through the first graph convolution unit to obtain a feature vector corresponding to each of the sample interaction data as a first sample interaction feature, until a labeled training loss of the first feature extraction network to be trained is obtained by calculating based on the first prediction feature, the second prediction feature, and the first mapping feature and the second mapping feature corresponding to another group of sample interaction data in each of the sample interaction data; Calculating the prediction loss of the interaction relationship extraction model to be trained based on the prediction result of the labeled sample interaction data and the labeling information of the labeled sample interaction data; The loss of the interaction relationship extraction model to be trained is obtained according to the labeled training loss, the hybrid training loss and the prediction loss.
12. A data query device, characterized in that: include: a data acquisition unit, configured to acquire object interaction data and an interaction relationship extraction model, wherein the object interaction data includes the association relationship between the target object interaction operation and the interaction-related object, the training samples of the interaction relationship extraction model include unlabeled sample interaction data, and the interaction relationship extraction model includes at least two different feature extraction networks; a feature extraction unit, configured to perform feature extraction on the object interaction data through each of the feature extraction networks in the interaction relationship extraction model, and obtain interaction features corresponding to each of the feature extraction networks; a feature fusion unit, configured to fuse the interaction features corresponding to the feature extraction networks to obtain object interaction features corresponding to the object interaction data; a feature processing unit configured to obtain, based on the object interaction feature and a preset processing task, a processed interaction feature corresponding to the preset processing task, wherein the preset processing task is related to the target object interaction operation or the interaction-related object; a similarity calculation unit, configured to perform similarity calculation on the processed interaction feature and at least one reference feature corresponding to the preset processing task, to obtain a similarity between the processed interaction feature and each reference feature; A result acquisition unit is used to obtain a processing result of the preset processing task based on the similarity.
13. An electronic device, characterized in that: It comprises a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the data query method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the data query method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the steps in the data query method described in any one of claims 1 to 11.
Citation Information
Patent Citations
Training method and device for multi-target recommendation model based on artificial intelligence
CN111090756A
Entity object type prediction method, device and equipment
CN111369258A