Data processing method, device, equipment, readable storage medium and program product
By obtaining multiple modal features of object entities for feature fusion and relationship prediction, it solves the problems of high threshold and one-sided relationships in existing models when matching object relationships, and achieves more accurate and efficient relationship recognition.
Patent Information
- Application Number
- CN202210090399.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-01-25
AI Technical Summary
When existing general models match the relationship between two objects, there are problems such as high threshold for use and too one-sided relationship types, which leads to a prolongation of the real relationship matching process.
By obtaining multiple modal features of the object entities, performing feature fusion processing, and using the relationship prediction model to predict the confidence, determine the target association between the object entities, and improve the efficiency of relationship recognition.
It achieves a more accurate determination of target associations between object entities and improves the efficiency and accuracy of identifying relationships between entities.
Smart Images

Figure CN114417875B
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a data processing method, device, equipment, readable storage medium and program product. Background Art
[0002] With the advent of the digital age, the amount of information is growing faster and faster, and people have higher and higher requirements for the efficiency of sorting information. Matching the relationship between two objects is generally based on some general models. Commonly used general models include translation models, citation analysis models, multivariate statistical analysis models, and deep neural network models.
[0003] These models have a low threshold for use and have good application effects in linguistics, literature and some computer science disciplines. These models usually match the relationship between two objects based only on text content, which will cause the matched relationship type to be too one-sided and prolong the matching process of the real relationship between the two objects. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, apparatus, device, readable storage medium and program product, which can more accurately determine the target association relationship between a first object entity and a second object entity and improve the efficiency of identifying the relationship between entities.
[0005] On the one hand, an embodiment of the present application provides a data processing method, including:
[0006] Obtain first modal features respectively corresponding to n first object modalities included in the first object entity, obtain second modal features respectively corresponding to m second object modalities included in the second object entity, and obtain candidate relationship features between the first object entity and the second object entity; n is a positive integer, and m is a positive integer;
[0007] Perform feature fusion processing on n first modal features to obtain first fused features; perform feature fusion processing on m second modal features to obtain second fused features;
[0008] The confidences among the first fused feature, the second fused feature and the candidate relationship feature are predicted, and the target association relationship between the first object entity and the second object entity is determined based on the confidences.
[0009] Furthermore, predicting the confidence between the first fused feature, the second fused feature and the candidate relationship feature includes:
[0010] Inputting the first fused feature, the second fused feature, and the candidate relationship feature into the relationship prediction model, and mapping the first fused feature, the second fused feature, and the candidate relationship feature to the same vector space based on the relationship prediction model to obtain a first fused vector corresponding to the first fused feature, a second fused vector corresponding to the second fused feature, and a candidate relationship vector corresponding to the candidate relationship feature;
[0011] The difference between a vector obtained by fusing the first fusion vector with the candidate relationship vector and the second fusion vector is determined as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature.
[0012] Furthermore, predicting the confidence between the first fused feature, the second fused feature and the candidate relationship feature includes:
[0013] Inputting the first fused feature, the second fused feature and the candidate relationship feature into the relationship prediction model, using the relationship weight in the relationship prediction model, performing feature fusion conversion on the first fused feature and the second fused feature, and obtaining a prediction relationship vector between the first fused feature and the second fused feature;
[0014] The feature distance between the predicted relationship vector and the candidate relationship feature is obtained, and the feature distance is determined as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature.
[0015] Furthermore, the number of candidate relationship features is d, where d is a positive integer;
[0016] Predicting the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature, including:
[0017] Predict the confidence between the first fusion feature and the second fusion feature and d candidate relationship features respectively;
[0018] Determining a target association relationship between a first object entity and a second object entity based on the confidence level includes:
[0019] Sort the d candidate relationship features based on the confidences corresponding to the d candidate relationship features respectively;
[0020] The candidate relationship corresponding to the candidate relationship feature with the greatest confidence is determined as the target association relationship between the first object entity and the second object entity.
[0021] Further, determining the target association relationship between the first object entity and the second object entity based on the confidence level includes:
[0022] If the confidence level is greater than the object association threshold, the candidate relationship corresponding to the candidate relationship feature is determined as the target association relationship between the first object entity and the second object entity.
[0023] On the one hand, an embodiment of the present application provides another data processing method, including:
[0024] Acquire a sample entity pair, the sample entity pair comprising a first sample entity and a second sample entity;
[0025] Obtain first sample features respectively corresponding to n first sample modes included in the first sample entity, obtain second sample features respectively corresponding to m second sample modes included in the second sample entity; obtain sample relationship features between the first sample entity and the second sample entity; n is a positive integer, and m is a positive integer;
[0026] Perform feature fusion processing on the n first sample features to obtain a first comprehensive sample feature; perform feature fusion processing on the m second sample features to obtain a second comprehensive sample feature;
[0027] Inputting the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature into the initial relationship prediction model for prediction, and obtaining the sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature;
[0028] Based on the sample prediction confidence, the parameters of the initial relationship prediction model are adjusted to obtain the relationship prediction model.
[0029] Further, the sample entity pair includes a positive sample entity pair and a negative sample entity pair; the positive sample entity pair includes a first positive sample entity and a second positive sample entity; the negative sample entity pair includes a first negative sample entity and a second negative sample entity; the sample prediction confidence includes a positive sample prediction confidence corresponding to the positive sample entity pair, and a negative sample prediction confidence corresponding to the negative sample entity pair;
[0030] Based on the sample prediction confidence, the parameters of the initial relationship prediction model are adjusted to obtain the relationship prediction model, including:
[0031] Generate a first loss function for the initial relationship prediction model according to the positive sample prediction confidence and the negative sample prediction confidence;
[0032] According to the first loss function, the parameters of the initial relationship prediction model are adjusted to obtain a relationship prediction model.
[0033] Furthermore, based on the sample prediction confidence, the parameters of the initial relationship prediction model are adjusted to obtain a relationship prediction model, including:
[0034] Obtain sample labels of sample relationship features for sample entity pairs;
[0035] Generate a second loss function for the initial relationship prediction model according to the error between the sample prediction confidence and the sample label;
[0036] According to the second loss function, the parameters of the initial relationship prediction model are adjusted to obtain a relationship prediction model.
[0037] An embodiment of the present application provides a data processing device, including:
[0038] An object acquisition module, used to acquire first modal features respectively corresponding to n first object modalities included in the first object entity, acquire second modal features respectively corresponding to m second object modalities included in the second object entity, and acquire candidate relationship features between the first object entity and the second object entity; n is a positive integer, and m is a positive integer;
[0039] The object fusion module is used to perform feature fusion processing on the n first modal features to obtain a first fused feature; and perform feature fusion processing on the m second modal features to obtain a second fused feature;
[0040] An object prediction module, used to predict the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature;
[0041] The object determination module is used to determine the target association relationship between the first object entity and the second object entity based on the confidence level.
[0042] Among them, the object prediction module includes:
[0043] a feature mapping unit, configured to input the first fused feature, the second fused feature, and the candidate relationship feature into a relationship prediction model, and based on the relationship prediction model, map the first fused feature, the second fused feature, and the candidate relationship feature to the same vector space to obtain a first fused vector corresponding to the first fused feature, a second fused vector corresponding to the second fused feature, and a candidate relationship vector corresponding to the candidate relationship feature;
[0044] The first confidence determination unit is used to determine the difference between the vector obtained by fusing the first fusion vector and the candidate relationship vector and the second fusion vector as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature.
[0045] Among them, the object prediction module also includes:
[0046] A feature fusion unit, used to input the first fused feature, the second fused feature and the candidate relationship feature into the relationship prediction model, and perform feature fusion conversion on the first fused feature and the second fused feature using the relationship weight in the relationship prediction model to obtain a prediction relationship vector between the first fused feature and the second fused feature;
[0047] The second confidence determination unit is used to obtain the feature distance between the predicted relationship vector and the candidate relationship feature, and determine the feature distance as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature.
[0048] Among them, the number of candidate relationship features is d, and d is a positive integer;
[0049] The object prediction module also includes:
[0050] A prediction unit, used to predict the confidence between the first fusion feature and the second fusion feature and the d candidate relationship features respectively;
[0051] The object determination module includes:
[0052] A feature sorting unit, used for sorting the d candidate relationship features based on the confidences respectively corresponding to the d candidate relationship features;
[0053] The relationship determination unit is used to determine the candidate relationship corresponding to the candidate relationship feature with the greatest confidence as the target association relationship between the first object entity and the second object entity.
[0054] The object determination module further includes:
[0055] The confidence matching unit is used to determine the candidate relationship corresponding to the candidate relationship feature as the target association relationship between the first object entity and the second object entity if the confidence is greater than the object association threshold.
[0056] An embodiment of the present application provides a data processing device, including:
[0057] A sample entity acquisition module, used to acquire a sample entity pair, the sample entity pair comprising a first sample entity and a second sample entity;
[0058] A sample feature acquisition module, used to acquire first sample features respectively corresponding to n first sample modes included in the first sample entity, acquire second sample features respectively corresponding to m second sample modes included in the second sample entity; acquire sample relationship features between the first sample entity and the second sample entity; n is a positive integer, and m is a positive integer;
[0059] The sample fusion module is used to perform feature fusion processing on the n first sample features to obtain a first comprehensive sample feature; and perform feature fusion processing on the m second sample features to obtain a second comprehensive sample feature;
[0060] A sample prediction module, used to input the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature into the initial relationship prediction model for prediction, and obtain the sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature;
[0061] The sample adjustment module is used to adjust the parameters of the initial relationship prediction model based on the sample prediction confidence to obtain the relationship prediction model.
[0062] Wherein, the sample entity pair includes a positive sample entity pair and a negative sample entity pair; the positive sample entity pair includes a first positive sample entity and a second positive sample entity; the negative sample entity pair includes a first negative sample entity and a second negative sample entity; the sample prediction confidence includes a positive sample prediction confidence corresponding to the positive sample entity pair, and a negative sample prediction confidence corresponding to the negative sample entity pair;
[0063] The sample adjustment module includes:
[0064] A first generating unit, used to generate a first loss function for the initial relationship prediction model according to the positive sample prediction confidence and the negative sample prediction confidence;
[0065] The first adjustment unit is used to adjust parameters of the initial relationship prediction model according to the first loss function to obtain the relationship prediction model.
[0066] The sample adjustment module also includes:
[0067] A label acquisition unit, used to acquire sample labels of sample relationship features for sample entity pairs;
[0068] A second generating unit, used for generating a second loss function for the initial relationship prediction model according to the error between the sample prediction confidence and the sample label;
[0069] The second adjustment unit is used to adjust the parameters of the initial relationship prediction model according to the second loss function to obtain the relationship prediction model.
[0070] On one hand, the present application provides a computer device, including: a processor, a memory, and a network interface;
[0071] The above-mentioned processor is connected to the above-mentioned memory and the above-mentioned network interface, wherein the above-mentioned network interface is used to provide a data communication function, the above-mentioned memory is used to store a computer program, and the above-mentioned processor is used to call the above-mentioned computer program so that the computer device executes the method in the embodiment of the present application.
[0072] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded by a processor and executing the method in the embodiment of the present application.
[0073] On the one hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in the embodiment of the present application.
[0074] In an embodiment of the present application, first modal features corresponding to n first object modes included in the first object entity are obtained, second modal features corresponding to m second object modes included in the second object entity are obtained, and candidate relationship features between the first object entity and the second object entity are obtained; n is a positive integer, and m is a positive integer; the n first modal features are subjected to feature fusion processing to obtain a first fused feature; the m second modal features are subjected to feature fusion processing to obtain a second fused feature; the confidence between the first fused feature, the second fused feature and the candidate relationship feature is predicted, and the target association relationship between the first object entity and the second object entity is determined based on the confidence. The embodiment of the present application introduces multiple first modal features of the first object entity and multiple second modal features of the second object entity, so that the confidence between the first fused feature, the second fused feature and the candidate relationship feature can better mine the hidden features of the first object entity and the second object entity, and more feature information can be obtained according to the hidden features, so as to more quickly determine the target association relationship between the first object entity and the second object entity. As the total amount of feature information increases, the target association relationship between the first object entity and the second object entity can be determined more accurately, thereby improving the efficiency of identifying the relationship between entities. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0076] Figure 1 It is a schematic diagram of a system architecture provided by an embodiment of the present application;
[0077] Figure 2 is a schematic diagram of a scenario for predicting the relationship between two entity objects provided in an embodiment of the present application;
[0078] Figure 3 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0079] Figure 4It is a structural diagram of a relationship between an object entity and a candidate provided in an embodiment of the present application;
[0080] Figure 5 It is a structural diagram of a confidence acquisition method provided in an embodiment of the present application;
[0081] Figure 6 It is a flowchart of another data processing method provided in an embodiment of the present application;
[0082] Figure 7 It is a structural diagram of a relationship prediction model provided in an embodiment of the present application;
[0083] Figure 8 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0084] Fig. 9 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0085] Fig.10 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0086] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0087] Among them, the present application relates to deep learning technology in the field of artificial intelligence. Through this deep learning technology, the prediction of the association relationship between object entities and the training of relationship prediction models are realized.
[0088] Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0089] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.
[0090] Machine Learning is a discipline that studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance.
[0091] Deep learning (DL) is a new research direction in the field of machine learning (ML). It is introduced into machine learning to make it closer to its original goal - artificial intelligence (AI). Deep learning is the inherent laws and representation levels of learning sample data. The information obtained in the learning process is of great help in the interpretation of data such as text, images and sounds. Its ultimate goal is to enable machines to have analytical learning capabilities like humans and to recognize data such as text, images and sounds. Deep learning is a complex machine learning algorithm that has achieved results in speech and image recognition that far exceed previous related technologies. Deep learning has achieved many results in search technology, data mining, machine learning, machine translation, natural language processing, multimedia learning, speech, recommendation and personalization technology, and other related fields. Deep learning enables machines to imitate human activities such as seeing, hearing and thinking, solves many complex pattern recognition problems, and makes great progress in artificial intelligence related technologies.
[0092] See also Figure 1 , Figure 1 Schematic diagram of a system architecture provided by an embodiment of the present application. Figure 1As shown, the system may include a business server 100 and a terminal cluster, and the terminal cluster may include: terminal device 200a, terminal device 200b, terminal device 200c, ..., terminal device 200n. It is understandable that the above system may include one or more terminal devices, and the present application does not limit the number of terminal devices. Among them, the terminal device mentioned above may be an electronic device, including but not limited to a mobile phone, a tablet computer, a desktop computer, a laptop computer, a PDA, a vehicle-mounted device, an augmented reality / virtual reality (Augmented Reality / Virtual Reality, AR / VR) device, a helmet display, a smart TV, a wearable device, a smart speaker, a digital camera, a camera and other mobile Internet devices (mobile internet device, MID) with network access capability, or terminal devices in scenarios such as trains, ships, and flights.
[0093] Among them, there can be a communication connection between terminal clusters, for example, there is a communication connection between terminal device 200a and terminal device 200b, and there is a communication connection between terminal device 200a and terminal device 200c. At the same time, any terminal device in the terminal cluster can have a communication connection with the business server 100, for example, there is a communication connection between terminal device 200a and business server 100, wherein the above communication connection does not limit the connection method, and can be directly or indirectly connected through a wired communication method, or directly or indirectly connected through a wireless communication method, or through other methods, and this application does not limit it here.
[0094] It should be understood that Figure 1 Each terminal device in the terminal cluster shown in the figure may be installed with an application client. When the application client runs in each terminal device, it can be respectively connected to the above Figure 1 The business server 100 shown in the figure performs data interaction, that is, the above-mentioned communication connection. Among them, the application client can be an application client with a search function such as a short video application, a video application, a live broadcast application, a social application, an instant messaging application, a game application, a music application, a shopping application, a novel application, a browser, etc. Among them, the application client can be an independent client or an embedded sub-client integrated in a client (for example, a social client, an educational client, and a multimedia client, etc.), which is not limited here.
[0095] For the convenience of subsequent understanding and explanation, please refer to Figure 2 , Figure 2 is a schematic diagram of a scenario for predicting the relationship between two object entities provided in an embodiment of the present application. Figure 2In the example, the terminal device 200c is searching for the relationship between two object entities through the application client. At this time, the terminal device 200c can send a predicted relationship request to the business server 100, and the business server 100 can obtain the first object entity and the second object entity corresponding to the terminal device 200c based on the predicted relationship request (for example, the first object entity and the second object entity can be determined based on data such as the search input content of the application client). Figure 2 In the example, the first object entity may be film A, and the second object entity may be actor XX. Then, the business server 100 may perform feature fusion extraction on the first object entity and the second object entity respectively to obtain the first fusion feature and the second fusion feature. At this time, the business server 100 may call the relationship prediction model, input the first fusion feature and the second fusion feature into the relationship prediction model, and output the target association relationship between the first object entity and the second object entity through the relationship prediction model. The business server 100 may match relevant information according to the first object entity, the second object entity, and the target association relationship between the first object entity and the second object entity, and determine the matched relevant information of the first object entity, the relevant information of the second object entity, or the relevant information of the target association relationship between the first object entity and the second object entity as the relevant media data of the target association relationship between the first object entity and the second object entity. Therefore, the business server 100 may push the target association relationship and the relevant media data to the terminal device 200c. For example, the target association relationship pushed to the terminal device 200c can be "acting", then in the terminal device 200c, "The relationship between film A and actor XX is an acting relationship" can be displayed as a link title in the application client, and in the application client, "The relationship between film A and actor XX is an acting relationship" and related media data can be browsed by triggering the link title.
[0096] It is understandable that the method provided in the embodiment of the present application can be executed by a computer device, and the computer device can be a terminal device or a business server, or a system composed of a terminal device and a business server. Among them, the business server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud databases, cloud services, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, car terminals, etc. Among them, the terminal device and the business server can be directly or indirectly connected by wired or wireless means, and the embodiments of the present application are not limited here.
[0097] It is understandable that the above system architecture can be applied to scenarios such as search systems and knowledge graph construction, and specific business scenarios will not be listed one by one here.
[0098] For further information, see Figure 3 , Figure 3 is a flow chart of a data processing method provided in an embodiment of the present application. Figure 3 As shown, the data processing method may at least include the following steps S101 to S104.
[0099] Step S101, obtaining first modal features corresponding to n first object modalities included in the first object entity, obtaining second modal features corresponding to m second object modalities included in the second object entity, and obtaining candidate relationship features between the first object entity and the second object entity; n is a positive integer, and m is a positive integer.
[0100] Specifically, the first object entity may be a first entity obtained from a database of a computer device, wherein the first object entity may be classified according to things in life, such as people, place names, companies, telephones, animals, etc. For example, if the first object entity belongs to the film and television category, the first object entity may be a film, an actor, a theme song, etc. The second object entity may be a second entity obtained from a database of a computer device. It is understandable that the category to which the first object entity belongs may be the same as the category to which the second object entity belongs, or the category to which the first object entity belongs may be different from the category to which the second object entity belongs. For example, when the category to which the first object entity belongs and the category to which the second object entity belongs are both film and television categories, the first object entity may be actor S of film A, and the second object entity may be film A or actor W of film A.
[0101] The first object modality may be n different types of modalities obtained after analyzing the first object entity. For example, the first object modality may be a text modality, a picture modality, or a voice modality, etc. The second object modality may be m different types of modalities obtained after analyzing the second object entity. For example, the second object modality may be a text modality, a picture modality, or a voice modality, etc. Among them, the first object modality and the second object modality may be the same type of modality or different types of modalities. The first modality features corresponding to the n first object modalities included in the first object entity may be obtained by vector conversion, and the second modality features corresponding to the m second object modalities included in the second object entity may be obtained. The candidate relationship between the first object entity and the second object entity may be used to express a certain connection between different entities. Feature extraction is performed on the obtained candidate relationship between the first object entity and the second object entity to obtain the candidate relationship features between the first object entity and the second object entity, wherein the feature extraction method may be vector conversion. For example, for text modality, the word vector representation (word2vec) can be used to extract text vectors. Word2vec uses a neural network machine learning algorithm to train a language model and finds the vector corresponding to a word during the training process. Word2vec is an efficient algorithm model that represents words as real-valued vectors. It uses the idea of deep learning and can simplify the processing of text content into vector operations in a multidimensional vector space through training, and the similarity in the vector space can be used to represent the semantic similarity of the text. For another example, for image modality, the residual network 50 (Residual Network 50, Resnet50) can be used to extract image vectors. The residual network 50 can directly skip multiple layers and introduce the data output of a certain layer of the first several layers into the input part of the later data layer. Resnet50 is used to change the dimension of the feature vector. First, a convolution operation is performed on the input, and then 4 residual blocks are included. Finally, a full connection operation is performed to facilitate the classification task.
[0102] For further information, please see Figure 4 , Figure 4 This is a structural diagram of an object entity and a candidate relationship provided by an embodiment of the present application. Figure 4In the example, assuming that the first object entity is actor XX, n first object modalities of the first object entity are obtained. Assuming that the n first object modalities include text modality, picture modality and voice modality, n first modal features are obtained, including text modality features of actor XX (i.e., text modality features corresponding to text modality), picture modality features of actor XX (i.e., picture modality features corresponding to picture modality), and voice modality features of actor XX (i.e., voice modality features corresponding to voice modality), etc. If the target association relationship between movie A and actor XX is to be obtained, actor XX can be the first object entity, the name of actor XX can be the text modality corresponding to the first object entity (i.e., the first object modality), the picture attribute of actor XX can be the picture modality corresponding to the first object entity (i.e., the first object modality), and in addition, actor XX can also have other modalities such as voice modality. Movie A can be the second object entity, the name of movie A can be the text mode corresponding to the second object entity (i.e., the second object mode), the picture attribute of movie A can be the picture mode corresponding to the second object entity (i.e., the second object mode), and in addition, movie A can also have other modes such as voice mode.
[0103] The first object entity can be represented as: "e1: actor XX, picture: url". "e1" represents the first object entity, "actor XX" represents the text modality corresponding to the first object entity, "picture" represents the picture modality corresponding to the first object entity, and "url" represents the picture modality content corresponding to the first object entity, which can be the entity picture associated with the first object entity or the location of the entity picture associated with the first object entity.
[0104] The second object entity can be represented as: "e2: Movie A, Picture: url2". "e2" represents the second object entity, "Movie A" represents the text modality corresponding to the second object entity, "Picture" represents the picture modality corresponding to the second object entity, and "url2" represents the picture modality content corresponding to the second object entity, which can be the entity picture associated with the second object entity or the location of the entity picture associated with the second object entity.
[0105] Optionally, the computer device may obtain the first modal information corresponding to the first object entity under n first object modes, obtain the information types corresponding to the n first modal information, perform feature extraction on the n first modal information, and obtain the first modal features corresponding to the n first modal information. The information type corresponds to the first object mode, such as the text mode corresponds to the text information type, the picture mode corresponds to the picture information type, and the voice mode corresponds to the voice information type. Different information types may correspond to different feature extraction methods. Using different feature extraction methods to extract features from the modal information of the corresponding information type can improve the efficiency of feature extraction. For example, the feature extraction method for the text information type can be the word2vec method. Assuming that the text modal information under the text information type of the first object entity is recorded as V_e1_name, the process of feature extraction of the text modal information of the first object entity can be recorded as V_e1-text=word2vec(e1_name). V_e1-text can represent the text modal features corresponding to the first object entity, word2vec can represent the text vector extraction process, and e1_name can represent the text modal information corresponding to the first object entity. For another example, the feature extraction method for the image information type can be the Resnet50 method. Assuming that the image modal information under the text information type of the first object entity is recorded as V_e1_img, the process of feature extraction of the image modal information of the first object entity can be recorded as V_e1-img = Resnet50 (e1_img). V_e1-img can represent the image modal features corresponding to the first object entity, Resnet50 can represent the image vector extraction process, and e1_img can represent the image modality corresponding to the first object entity. By analogy, we can get: V_e2-text = word2vec (e2_name); V_e2-img = Resnet50 (e2_img).
[0106] Since different methods are used for feature extraction of data corresponding to different information types, it is possible to obtain the information types corresponding to the n first modal information, and use the feature extraction method corresponding to the information type to perform feature extraction on the corresponding first modal information, so as to achieve personalized feature analysis of data of different information types and improve the efficiency of feature extraction.
[0107] Step S102, performing feature fusion processing on the n first modal features to obtain a first fused feature; performing feature fusion processing on the m second modal features to obtain a second fused feature.
[0108] Specifically, a feature fusion method is used to perform feature fusion processing on n first modal features to obtain a first fused feature; and feature fusion processing is performed on m second modal features to obtain a second fused feature. The feature fusion method may be vector dot multiplication, vector addition, vector subtraction, and a combination of multiple feature fusion methods, that is, the n first modal features may be feature fused according to the selected feature fusion method. For example, taking vector dot multiplication as an example, assuming that the computer device can perform feature fusion processing on n first modal features, assuming that the n first modal features include text modal features and image modal features of the first object entity, the process can be shown in the first fusion feature acquisition formula ①:
[0109] V_e1=V_e1-text·V_e1-img ①
[0110] As shown in the first fusion feature acquisition formula ①, V_e1-text can represent the text modal feature corresponding to the first object entity, V_e1-img can represent the image modal feature corresponding to the first object entity, "·" can represent the vector dot product, and V_e1 can represent the first fusion feature. Optionally, when the n first modal features include more than just the text modal features and the image modal features of the first object entity, the n first modal features can be processed by vector dot product based on formula ① to achieve feature fusion processing of the n first modal features to obtain the first fusion feature.
[0111] Assuming that the computer device can perform feature fusion processing on n second modal features, the process can be shown in the second fusion feature acquisition formula ②:
[0112] V_e2=V_e2-text·V_e2-img ②
[0113] As shown in the second fusion feature acquisition formula ②, V_e2-text can represent the text modal feature corresponding to the second object entity, V_e2-img can represent the image modal feature corresponding to the second object entity, "·" can represent the vector dot product, and V_e2 can represent the second fusion feature. Optionally, when the m second modal features include more than just the text modal features and the image modal features of the second object entity, the m second modal features can be processed by vector dot product based on formula ② to achieve feature fusion processing of the m second modal features to obtain the second fusion feature.
[0114] Step S103: predicting the confidence between the first fused feature, the second fused feature and the candidate relationship feature.
[0115] Specifically, the first fusion feature, the second fusion feature and the candidate relationship feature are predicted and processed, and then the confidence of the candidate relationship corresponding to the candidate relationship feature is obtained. Among them, the number of candidate relationships between the first fusion feature and the second fusion feature can be d, and d confidences between the first fusion feature and the second fusion feature and the d candidate relationship features are predicted. The confidence prediction method can adopt methods such as logistic regression, distribution relationship learning, hidden state learning, dimensionality reduction factor analysis and convolution.
[0116] For further information, please see Figure 4 .exist Figure 4 In the figure, the candidate relationship corresponding to the candidate relationship feature between the first fusion feature corresponding to the first object entity (i.e., actor XX) and the second fusion feature corresponding to the second object entity (i.e., movie A) can be "starring". Then, prediction processing is performed to obtain the confidence level of the candidate relationship (i.e., "starring") between the first fusion feature corresponding to the first object entity (i.e., actor XX) and the second fusion feature corresponding to the second object entity (i.e., movie A).
[0117] It can be understood that the first fusion feature, the second fusion feature and the candidate relationship feature are input into the relationship prediction model, and based on the relationship prediction model, the first fusion feature, the second fusion feature and the candidate relationship feature are mapped to the same vector space to obtain the first fusion vector corresponding to the first fusion feature, the second fusion vector corresponding to the second fusion feature, and the candidate relationship vector corresponding to the candidate relationship feature; the difference between the vector obtained by fusing the first fusion vector with the candidate relationship vector and the second fusion vector is determined as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature. When the triple consisting of the first fusion vector, the second fusion vector and the candidate relationship vector is established, the condition should theoretically be satisfied: the vector sum between the first fusion vector and the candidate relationship vector is equal to the second fusion vector.
[0118] Optionally, the confidence value range can be between 0 and 1. When the confidence value is 0, it means that the probability that the association relationship between the first fusion feature and the second fusion feature is the candidate relationship corresponding to the candidate relationship feature is 100%. When the confidence value is 1, it means that the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is 0%. Therefore, the closer the confidence is to 0, the closer the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is to 100%. If the confidence is closer to 1, the closer the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is to 0%.
[0119] Optionally, the difference between the vector obtained by fusing the first fusion vector and the candidate relationship vector and the second fusion vector can be determined as the default confidence, and the difference between the default confidence and the difference can be determined as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature. At this time, the greater the confidence, the greater the probability that the triple formed by the first fusion vector, the second fusion vector and the candidate relationship vector is established. Among them, the first fusion feature, the second fusion feature and the candidate relationship feature are not necessarily in the same vector space. Therefore, the first fusion feature, the second fusion feature and the candidate relationship feature can be mapped to the same vector space respectively, and the vector corresponding to the first fusion feature mapped to the same vector space is determined as the first fusion vector, the vector corresponding to the second fusion feature mapped to the same vector space is determined as the second fusion vector, and the vector corresponding to the candidate relationship feature mapped to the same vector space is determined as the candidate relationship vector. The same vector space mapped can be recorded as the reference vector space. Optionally, a vector space can be selected from the vector space where the first fusion feature, the second fusion feature or the candidate relationship feature is located as the reference vector space. Optionally, another vector space different from the vector space where the three features are located can be selected as the reference vector space. Through the relationship prediction model, the first fused feature can be mapped from its vector space to the reference vector space to obtain the first fused vector corresponding to the first fused feature in the reference vector space; through the relationship prediction model, the second fused feature can be mapped from its vector space to the reference vector space to obtain the second fused vector corresponding to the second fused feature in the reference vector space; through the relationship prediction model, the candidate relationship feature can be mapped from its vector space to the reference vector space to obtain the candidate relationship vector corresponding to the candidate relationship feature in the reference vector space.
[0120] It can be understood that the reference vector space can be selected by random sampling, and the randomly selected vector space is used as the reference vector space. The random sampling method has good general applicability and can be used in many situations. The reference vector space can be selected by the mean distance method to obtain the spatial distance between the vector space where the first fusion feature is located and the vector space where the second fusion feature is located, and the middle distance vector space between the vector space where the first fusion feature is located and the vector space where the second fusion feature is located is determined as the reference vector space; optionally, the middle space between the vector space where the first fusion feature is located and the vector space where the candidate relationship feature is located can be determined as the reference vector space; optionally, the middle distance vector space between the vector space where the second fusion feature is located and the vector space where the candidate relationship feature is located can be determined as the reference vector space; if at least two of the first fusion feature, the second fusion feature and the candidate relationship feature are in the same space, the space where the at least two features are located is determined as the reference vector space.
[0121] For further information, please see Figure 5 , Figure 5 Schematic diagram of a structure for obtaining confidence provided in an embodiment of the present application. Figure 5 In the method, the computer device may map the first fused feature, the second fused feature and the candidate relationship feature to a reference vector space, where the first fused vector corresponding to the first fused feature may be a head (head), represented by the initial letter h, the second fused vector corresponding to the second fused feature may be a tail (tail), represented by the initial letter t, and the candidate relationship vector corresponding to the candidate relationship feature may be a relation (relation), represented by the initial letter r.
[0122] Optionally, the confidence between the first fused feature, the second fused feature and the candidate relationship feature can be predicted by a weighted prediction method. The first fused feature, the second fused feature and the candidate relationship feature are input into the relationship prediction model, and the relationship weight in the relationship prediction model is used to perform feature fusion conversion on the first fused feature and the second fused feature to obtain a predicted relationship vector between the first fused feature and the second fused feature; the feature distance between the predicted relationship vector and the candidate relationship feature is obtained, and the feature distance is determined as the confidence between the first fused feature, the second fused feature and the candidate relationship feature.
[0123] Among them, factor analysis, principal component method, entropy method, independence weight method and information weight method can be used to calculate the weight of the first fusion feature and the weight of the second fusion feature in the relationship prediction model. After the weight of the first fusion feature and the weight of the second fusion feature are processed respectively, the first fusion feature and the second fusion feature are fused according to the corresponding weights to obtain a predicted relationship vector. The predicted relationship vector can be the judgment of the relationship between the first fusion feature and the second fusion feature by the relationship prediction model. The predicted relationship vector can be compared with the candidate relationship feature. By obtaining the feature distance between the predicted relationship vector and the candidate relationship feature, the correlation relationship between the predicted relationship vector and the candidate relationship feature is obtained, and the feature distance is determined as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature. The confidence value range can be between 0 and 1. When the confidence value is 0, it means that the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is 100%. When the confidence value is 1, it means that the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is 0%. Therefore, if the confidence is closer to 0, the probability that the first fused feature and the second fused feature are candidate relations corresponding to the candidate relation features is closer to 100%. If the confidence is closer to 1, the probability that the first fused feature and the second fused feature are candidate relations corresponding to the candidate relation features is closer to 0%.
[0124] Furthermore, the number of candidate relationship features is d, where d is a positive integer; the confidences between the first fusion feature and the second fusion feature and the d candidate relationship features are predicted.
[0125] Among them, the first fusion feature, the second fusion feature and the d candidate relationship features can form d feature triplets, each feature triplet corresponds to a candidate relationship feature, and the confidence corresponding to the d candidate relationship feature triplets is predicted. For example, if the first fusion feature is e1, the second fusion feature is e2, and the d candidate relationship features are R1, R2, ..., Rd, then the d feature triplets composed of the first fusion feature, the second fusion feature and the d candidate relationship features can be<e1,R1,e2> ,<e1,R2,e2> , …,<e1,Rd,e2> . Predict d candidate relationship feature triplets<e1,R1,e2> ,<e1,R2,e2> , …,<e1,Rd,e2> The corresponding confidence levels.
[0126] Step S104, determining a target association relationship between the first object entity and the second object entity based on the confidence level;
[0127] Specifically, based on the value range of the confidence, the relationship corresponding to the confidence between the first object entity and the second object entity is determined as the target association relationship between the first object entity and the second object entity.
[0128] When the confidence is larger, the probability of forming a feature triple between the first fusion feature, the second fusion feature and the candidate relationship feature is larger. When the confidence value is 1, the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is 100%. When the confidence value is 0, the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is 0%. Therefore, if the confidence is closer to 1, the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is closer to 100%. If the confidence is closer to 0, the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is closer to 0%.
[0129] Optionally, the d candidate relationship features are sorted based on the confidences respectively corresponding to the d candidate relationship features; and the candidate relationship corresponding to the candidate relationship feature with the largest confidence is determined as the target association relationship between the first object entity and the second object entity.
[0130] Further, the confidences corresponding to the d candidate relationship features are sorted from large to small (or from small to large), and the candidate relationship features are adjusted according to the corresponding confidences to obtain corresponding candidate relationship features, thereby obtaining a sorted list of d candidate relationship features. The candidate relationship feature with the largest confidence is selected from the sorted list of d candidate relationship features, and the candidate relationship corresponding to the candidate relationship feature with the largest confidence is determined as the target association relationship between the first object entity and the second object entity.
[0131] It can be understood that the size of d can be adaptively adjusted over time. If the time is calculated in seconds, compared with the time calculated in minutes, the d value corresponding to the time calculated in seconds can be small, and the target association relationship can be obtained even in a few candidate relationship features; the d value corresponding to the time calculated in minutes can be large, and a more accurate target association relationship can be obtained in more candidate relationship features.
[0132] Optionally, if the confidence level is greater than the object association threshold, the candidate relationship corresponding to the candidate relationship feature is determined as the target association relationship between the first object entity and the second object entity.
[0133] The object association threshold may be a determination limit of a candidate relationship establishment criterion. If the confidence is greater than the object association threshold, that is, the candidate relationship corresponding to the confidence greater than the object association threshold is established. Then the candidate relationship corresponding to the candidate relationship feature is determined as the target association relationship between the first object entity and the second object entity. The number of candidate relationship features may be f, where f is a positive integer.
[0134] When the confidence is smaller, the probability of forming a feature triple between the first fusion feature, the second fusion feature and the candidate relationship feature is greater. When the confidence value is 0, the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is 100%. When the confidence value is 1, the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is 0%. Therefore, if the confidence is closer to 0, the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is closer to 100%. If the confidence is closer to 1, the probability that the first fusion feature and the second fusion feature are the candidate relationship corresponding to the candidate relationship feature is closer to 0%.
[0135] Optionally, the d candidate relationship features are sorted based on the confidences respectively corresponding to the d candidate relationship features; and the candidate relationship corresponding to the candidate relationship feature with the smallest confidence is determined as the target association relationship between the first object entity and the second object entity.
[0136] Further, the confidences corresponding to the d candidate relationship features are sorted from small to large (or from large to small), and the candidate relationship features are adjusted according to the corresponding confidences to obtain corresponding candidate relationship features, thereby obtaining a sorted list of d candidate relationship features. The candidate relationship feature with the smallest confidence is selected from the sorted list of d candidate relationship features, and the candidate relationship corresponding to the candidate relationship feature with the smallest confidence is determined as the target association relationship between the first object entity and the second object entity.
[0137] It can be understood that the size of d can be adaptively adjusted over time. If the time is calculated in seconds, compared with the time calculated in minutes, the d value corresponding to the time calculated in seconds can be small, and the target association relationship can be obtained even in a few candidate relationship features; the d value corresponding to the time calculated in minutes can be large, and a more accurate target association relationship can be obtained in more candidate relationship features.
[0138] Optionally, if the confidence level is less than the object association threshold, the candidate relationship corresponding to the candidate relationship feature is determined as the target association relationship between the first object entity and the second object entity.
[0139] The object association threshold may be a determination limit of a candidate relationship establishment criterion. If the confidence is less than the object association threshold, that is, the candidate relationship corresponding to the confidence less than the object association threshold is established. Then the candidate relationship corresponding to the candidate relationship feature is determined as the target association relationship between the first object entity and the second object entity. The number of candidate relationship features may be f, where f is a positive integer.
[0140] Optionally, when the number of candidate relationship features is d, the candidate relationships corresponding to the candidate relationship features whose confidences meet the object association threshold can also be determined as qualified relationships, and the qualified relationships can all be determined as target association relationships between the first object entity and the second object entity. Among them, the qualified relationship with the smallest confidence can be directly output. If the computer device receives more qualified relationship output requests from the application client, it continues to output the qualified relationship with the second smallest confidence, and so on. Alternatively, the qualified relationship can be sorted based on the confidence of the qualified relationship, and the sorted qualified relationship can be output.
[0141] In the embodiment of the present application, the first modal features corresponding to the n first object modes included in the first object entity are obtained, the second modal features corresponding to the m second object modes included in the second object entity are obtained, and the candidate relationship features between the first object entity and the second object entity are obtained; n is a positive integer, and m is a positive integer; the n first modal features are subjected to feature fusion processing to obtain the first fusion feature; the m second modal features are subjected to feature fusion processing to obtain the second fusion feature; the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature is predicted, and the target association relationship between the first object entity and the second object entity is determined based on the confidence. The embodiment of the present application introduces multiple first modal features of the first object entity and multiple second modal features of the second object entity, so that the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature can better mine the hidden features of the first object entity and the second object entity, and more feature information can be obtained based on the hidden features, so as to more quickly determine the target association relationship between the first object entity and the second object entity. As the total amount of feature information increases, the target association relationship between the first object entity and the second object entity can be determined more accurately, thereby improving the efficiency of identifying the relationship between entities.
[0142] For details on the training process of the relationship prediction model, please refer to the following Figure 6 Corresponding embodiment.
[0143] For further information, see Figure 6 , wherein the specific implementation of the relationship prediction model in the above step S103 can be found in Figure 6 , Figure 6is a flow chart of a data processing method provided in an embodiment of the present application. Figure 6 As shown, the data processing method may at least include the following steps S201-S205.
[0144] Step S201, obtaining a sample entity pair, the sample entity pair including a first sample entity and a second sample entity;
[0145] Specifically, the first sample entity may be a sample entity obtained from a first type of object entity, and the second sample entity may be a sample entity obtained from a second type of object entity. The first sample entity and the second sample entity may be sample entities selected in advance, and the first sample entity and the second sample entity may be used to train a relationship prediction model. The first sample entity and the second sample entity are obtained, and the first sample entity and the second sample entity are determined as a sample entity pair. The sample entity pair may be input into an initial relationship prediction model for sample relationship prediction.
[0146] Step S202, obtaining first sample features respectively corresponding to n first sample modes included in the first sample entity, obtaining second sample features respectively corresponding to m second sample modes included in the second sample entity; obtaining sample relationship features between the first sample entity and the second sample entity; n is a positive integer, and m is a positive integer;
[0147] Specifically, the first sample modality may be a modality obtained by analyzing the first sample entity, the first sample feature may be a detailed feature of the first sample entity, the second sample modality may be a modality obtained by analyzing the second sample entity, and the second sample feature may be a detailed feature of the second sample entity. The characteristics of the first sample modality, the first sample feature, the second sample modality, and the second sample feature may refer to the above Figure 3 The description of the first object modality in step S101 is not repeated here.
[0148] Among them, the first sample entity may be a sample entity that has been manually labeled with n first sample modalities in the database of the computer device, and the second sample entity may be a sample entity that has been manually labeled with m first sample modalities in the database of the computer device; the first sample entity may also be a sample entity that has been labeled with n first sample modalities in the database of the computer device, and the second sample entity may also be a sample entity that has been labeled with m first sample modalities in the database of the computer device.
[0149] Step S203, performing feature fusion processing on the n first sample features to obtain a first comprehensive sample feature; performing feature fusion processing on the m second sample features to obtain a second comprehensive sample feature;
[0150] Specifically, the first comprehensive sample feature is obtained by performing feature fusion processing on n first sample features, and the second comprehensive sample feature is obtained by performing feature fusion processing on m second sample features. For feature fusion processing, please refer to the above Figure 3 The description of the feature fusion processing part in step S102 will not be repeated here.
[0151] Step S204, inputting the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature into the initial relationship prediction model for prediction, and obtaining the sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature;
[0152] Specifically, the sample prediction confidence can represent the probability that the first sample entity corresponding to the first comprehensive sample feature and the second sample entity corresponding to the second comprehensive sample feature have a sample relationship corresponding to the sample relationship feature. Please refer to the above for the specific prediction steps of the initial relationship prediction model. Figure 3 The description of the prediction part in step S103 is not repeated here.
[0153] Optionally, sample prediction relationship matching corresponding to sample relationship features can be performed based on sample prediction confidence. The number of sample prediction relationships can be k, where k is a positive integer; the sample prediction relationship can include a true sample relationship between a first sample entity and a second sample entity. The sample prediction relationship can be used to obtain a hidden relationship between the first sample entity and the second sample entity.
[0154] When the sample prediction confidence is larger, it means that the probability of forming a sample triplet between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature is larger. When the sample prediction confidence is 1, it means that the probability of the sample prediction relationship between the first comprehensive sample feature and the second comprehensive sample feature corresponding to the sample relationship feature is 100%. When the sample prediction confidence is 0, it means that the probability of the sample prediction relationship between the first comprehensive sample feature and the second comprehensive sample feature corresponding to the sample relationship feature is 0%. Therefore, if the sample prediction confidence is closer to 1, the probability of the sample prediction relationship between the first comprehensive sample feature and the second comprehensive sample feature corresponding to the sample relationship feature is closer to 100%. If the sample prediction confidence is closer to 0, the probability of the sample prediction relationship between the first comprehensive sample feature and the second comprehensive sample feature corresponding to the sample relationship feature is closer to 0%.
[0155] When the sample prediction confidence is smaller, the probability that the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature form a sample triple is greater. When the sample prediction confidence is 0, the probability that the first comprehensive sample feature and the second comprehensive sample feature are sample prediction relationships corresponding to the sample relationship features is 100%. When the sample prediction confidence is 1, the probability that the first comprehensive sample feature and the second comprehensive sample feature are sample prediction relationships corresponding to the sample relationship features is 0%. Therefore, if the sample prediction confidence is closer to 0, the probability that the first comprehensive sample feature and the second comprehensive sample feature are sample prediction relationships corresponding to the sample relationship features is closer to 100%. If the sample prediction confidence is closer to 1, the probability that the first comprehensive sample feature and the second comprehensive sample feature are sample prediction relationships corresponding to the sample relationship features is closer to 0%.
[0156] Step S205: Based on the sample prediction confidence, adjust the parameters of the initial relationship prediction model to obtain a relationship prediction model.
[0157] Specifically, according to the sample prediction confidence, a loss function of the initial relationship prediction model can be determined, and the parameters of the initial relationship prediction model are adjusted according to the loss function of the initial relationship prediction model, and the adjusted initial relationship prediction model is determined as the iterative relationship prediction model. The iterative relationship prediction model is used again to predict the sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature, and the loss function of the iterative relationship prediction model is obtained. The parameters of the iterative relationship prediction model are adjusted according to the loss function of the iterative relationship prediction model to obtain the relationship prediction model.
[0158] Furthermore, the sample entity pairs include positive sample entity pairs and negative sample entity pairs; the positive sample entity pairs include a first positive sample entity and a second positive sample entity; the negative sample entity pairs include a first negative sample entity and a second negative sample entity; the sample prediction confidence includes a positive sample prediction confidence corresponding to the positive sample entity pairs, and a negative sample prediction confidence corresponding to the negative sample entity pairs; based on the positive sample prediction confidence and the negative sample prediction confidence, a first loss function for the initial relationship prediction model is generated; based on the first loss function, the parameters of the initial relationship prediction model are adjusted to obtain a relationship prediction model.
[0159] It can be understood that the first positive sample vector corresponding to the first comprehensive positive sample feature is obtained according to the first comprehensive sample feature, the second positive sample vector corresponding to the second comprehensive positive sample feature is obtained according to the second comprehensive sample feature, and the difference between the fusion vector between the first positive sample vector and the sample relationship vector corresponding to the sample relationship feature and the second positive sample vector is determined as the positive sample prediction confidence. The first negative sample vector corresponding to the first comprehensive negative sample feature is obtained according to the first comprehensive sample feature, the second negative sample vector corresponding to the second comprehensive negative sample feature is obtained according to the second comprehensive sample feature, and the difference between the fusion vector between the first negative sample vector and the sample relationship vector corresponding to the sample relationship feature and the second negative sample vector is determined as the negative sample prediction confidence. For example, the first positive sample vector may be e1, the second positive sample vector may be e2, and the sample relationship vector may be R. Then, the difference between the fusion vector between the first positive sample vector e1 and the sample relationship vector R and the second positive sample vector e2 may be D(e1+R, e2), i.e., the positive sample prediction confidence; the difference between the fusion vector between the first negative sample vector e1 and the sample relationship vector R and the second negative sample vector e2' may be D(e1+R, e2'), i.e., the negative sample prediction confidence. Then, according to the positive sample prediction confidence D(e1+R, e2) and the negative sample prediction confidence D(e1+R, e2'), the first loss function for the initial relationship prediction model may be generated: Loss=∑ S ∑ s′ [δ+D(e1+R,e2)-D(e1+R,e2′)]; According to the first loss function, the parameters of the initial relationship prediction model are adjusted to obtain the relationship prediction model.
[0160] If the second positive sample vector e2 is actor U, then the second negative sample vector e2' may be actor V. Actor U and actor V may be obtained from the same type of object entity, that is, both are obtained from the second type of object entity.
[0161] Optionally, the first negative sample vector may also be e1', and the second negative sample vector may be e2. Then, the difference between the fusion vector between the first negative sample vector e1' and the sample relationship vector R and the second negative sample vector e2 may be D(e1'+R, e2), i.e., the negative sample prediction confidence. Then, according to the positive sample prediction confidence D(e1+R, e2) and the negative sample prediction confidence D(e1'+R, e2), the first loss function for the initial relationship prediction model may be generated: Loss = ∑ s ∑ S′ [δ+D(e1+R,e2)-De1′+R,e2; According to the first loss function, the parameters of the initial relationship prediction model are adjusted to obtain the relationship prediction model.
[0162] Optionally, obtain sample labels for sample entity pairs based on sample relationship features; generate a second loss function for the initial relationship prediction model based on the error between the sample prediction confidence and the sample label; and adjust parameters of the initial relationship prediction model based on the second loss function to obtain a relationship prediction model.
[0163] It is understandable that the sample label may include a positive sample label and a negative sample label. Among them, the positive sample label may be 1, and the negative sample label may be 0. If the sample entity pair is a positive sample, a second loss function for the initial relationship prediction model is generated according to the error between the prediction confidence of the disputed positive sample and the positive sample label; if the sample entity pair is a negative sample, a second loss function for the initial relationship prediction model is generated according to the error between the prediction confidence of the disputed negative sample and the negative sample label; according to the second loss function, the parameters of the initial relationship prediction model are adjusted to obtain a relationship prediction model.
[0164] In an embodiment of the present application, a more robust relationship prediction model can be obtained by predicting the sample entity pairs input into the initial relationship prediction model and then adjusting the loss function for the initial relationship prediction model. Since the embodiment of the present application introduces a loss function to adjust the initial relationship prediction model, the initial relationship prediction model obtained by training can better predict the sample relationship between two sample entities, and further, it can reduce the time for determining the association between sample entities, increase the accuracy of identifying the relationship between entities, and improve the efficiency of identifying the relationship between entities.
[0165] See also Figure 7 , Figure 7 is a schematic diagram of a relationship prediction model provided in an embodiment of the present application. Figure 7 As shown in FIG. 1 , the first object entity (actor XX), the second object entity (film A), and the candidate relationship (acting) are input into the relationship prediction model. Figure 3 The text feature extraction formula and the image feature extraction formula in step S101 are feature mapped to obtain two first modal features corresponding to the first object entity (actor XX) (i.e., text modal feature V_e1-text and image modal feature V_e1-img), two second modal features corresponding to the second object entity (film A) (i.e., text modal feature V_e2-text and image modal feature V_e2-img), and candidate relationship features corresponding to the candidate relationship (starring). Figure 3 The first fusion feature acquisition formula in step S102 performs feature fusion of the two first modal features to obtain the first fusion feature V_e1, using Figure 3The second fusion feature acquisition formula in step S102 fuses the two second modal features to obtain the second fusion feature V_e2. The first fusion feature, the second fusion feature and the candidate relationship feature are obtained as follows: Figure 3 The confidence obtaining step in step S103 performs confidence obtaining processing to obtain the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature, as shown in the following example: Figure 3 In the target association relationship obtaining step in step S104, the target association relationship can be obtained according to the confidence between the first fusion feature, the second fusion feature and the candidate relationship features.
[0166] It should be noted that the selection of the vector direction between the first fusion vector corresponding to the first fusion feature, the second fusion vector corresponding to the second fusion feature and the candidate relationship vector corresponding to the candidate relationship feature obtained according to the relationship prediction model does not affect the composition of the triplet, and the target association relationship between the first object entity and the second object entity is mutual. For example, the first fusion vector corresponding to the first object entity (actor XX) points to the second fusion vector corresponding to the second object entity (film A), which can be candidate relationship 1 (starring), and the second fusion vector corresponding to the second object entity (film A), points to the first fusion vector corresponding to the first object entity (actor XX), which can be candidate relationship 2 (being starred).
[0167] In an embodiment of the present application, the first modal features corresponding to the two first object modalities included in the first object entity are obtained, the second modal features corresponding to the two second object modalities included in the second object entity are obtained, and the candidate relationship features between the first object entity and the second object entity are obtained; the two first modal features are subjected to feature fusion processing to obtain the first fusion feature; the two second modal features are subjected to feature fusion processing to obtain the second fusion feature; the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature is predicted, and the target association relationship between the first object entity and the second object entity is determined based on the confidence. The embodiment of the present application introduces two first modal features of the first object entity, two second modal features of the second object entity, and the fusion of text modality and image modality, which can increase the total feature information, and then more quickly determine the target association relationship between the first object entity and the second object entity. With the increase in the total amount of feature information, the target association relationship between the first object entity and the second object entity can be determined more accurately, and the efficiency of inter-entity relationship recognition can be improved.
[0168] For further information, see Figure 8 , Figure 8: is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. The above-mentioned data processing device may be a computer program (including program code) running in a computer device, for example, the data processing device is an application software; the device may be used to execute the corresponding steps in the method provided in an embodiment of the present application. Figure 8 As shown, the data processing device 1 may include: an object acquisition module 11 , an object fusion module 12 , an object prediction module 13 and an object determination module 14 .
[0169] The object acquisition module 11 is used to acquire first modal features respectively corresponding to n first object modalities included in the first object entity, acquire second modal features respectively corresponding to m second object modalities included in the second object entity, and acquire candidate relationship features between the first object entity and the second object entity; n is a positive integer, and m is a positive integer;
[0170] The object fusion module 12 is used to perform feature fusion processing on the n first modal features to obtain a first fused feature; and perform feature fusion processing on the m second modal features to obtain a second fused feature;
[0171] The object prediction module 13 is used to predict the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature;
[0172] The object determination module 14 is used to determine the target association relationship between the first object entity and the second object entity based on the confidence level.
[0173] The specific functional implementation of the object acquisition module 11, the object fusion module 12, the object prediction module 13 and the object determination module 14 can be referred to in the above Figure 3 Steps S101 to S104 in the corresponding embodiment will not be described in detail here.
[0174] See also Figure 8 , wherein the object prediction module 13 comprises:
[0175] The feature mapping unit 131 is used to input the first fused feature, the second fused feature and the candidate relationship feature into the relationship prediction model, and based on the relationship prediction model, map the first fused feature, the second fused feature and the candidate relationship feature to the same vector space to obtain a first fused vector corresponding to the first fused feature, a second fused vector corresponding to the second fused feature, and a candidate relationship vector corresponding to the candidate relationship feature;
[0176] The first confidence determination unit 132 is used to determine the difference between the vector obtained by fusing the first fusion vector and the candidate relationship vector and the second fusion vector as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature.
[0177] The specific functional implementation of the feature mapping unit 131 and the first confidence determination unit 132 can be found in the above Figure 3 The step S103 in the corresponding embodiment will not be described in detail here.
[0178] See also Figure 8 , wherein the object prediction module 13 further includes:
[0179] A feature fusion unit 133 is used to input the first fused feature, the second fused feature and the candidate relationship feature into the relationship prediction model, and perform feature fusion conversion on the first fused feature and the second fused feature using the relationship weight in the relationship prediction model to obtain a prediction relationship vector between the first fused feature and the second fused feature;
[0180] The second confidence determination unit 134 is used to obtain the feature distance between the predicted relationship vector and the candidate relationship feature, and determine the feature distance as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature.
[0181] The specific functional implementation of the feature fusion unit 133 and the second confidence determination unit 134 can be found in the above Figure 3 The step S103 in the corresponding embodiment will not be described in detail here.
[0182] See also Figure 8 , where the number of candidate relationship features is d, and d is a positive integer;
[0183] The object prediction module 13 further includes:
[0184] A prediction unit 135 is used to predict the confidence between the first fused feature and the second fused feature and the d candidate relationship features respectively;
[0185] The specific implementation of the prediction unit 135 can refer to the above Figure 3 The step S103 in the corresponding embodiment will not be described in detail here.
[0186] The object determination module 14 includes:
[0187] A feature sorting unit 141 is used to sort the d candidate relationship features based on the confidences respectively corresponding to the d candidate relationship features;
[0188] The relationship determination unit 142 is used to determine the candidate relationship corresponding to the candidate relationship feature with the greatest confidence as the target association relationship between the first object entity and the second object entity.
[0189] The specific functional implementation of the feature sorting unit 141 and the relationship determination unit 142 can be found in the above Figure 3 The step S104 in the corresponding embodiment will not be described in detail here.
[0190] See also Figure 8 , wherein the object determination module 14 further includes:
[0191] The confidence matching unit 143 is configured to determine the candidate relationship corresponding to the candidate relationship feature as the target relationship between the first object entity and the second object entity if the confidence is greater than the object association threshold.
[0192] The specific functional implementation of the confidence matching unit 143 can be found in the above Figure 3 The step S104 in the corresponding embodiment will not be described in detail here.
[0193] In the embodiment of the present application, the first modal features corresponding to the n first object modes included in the first object entity are obtained, the second modal features corresponding to the m second object modes included in the second object entity are obtained, and the candidate relationship features between the first object entity and the second object entity are obtained; n is a positive integer, and m is a positive integer; the n first modal features are subjected to feature fusion processing to obtain the first fusion feature; the m second modal features are subjected to feature fusion processing to obtain the second fusion feature; the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature is predicted, and the target association relationship between the first object entity and the second object entity is determined based on the confidence. The embodiment of the present application introduces multiple first modal features of the first object entity and multiple second modal features of the second object entity, so that the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature can better mine the hidden features of the first object entity and the second object entity, and more feature information can be obtained based on the hidden features, so as to more quickly determine the target association relationship between the first object entity and the second object entity. As the total amount of feature information increases, the target association relationship between the first object entity and the second object entity can be determined more accurately, thereby improving the efficiency of identifying the relationship between entities.
[0194] For further information, see Fig. 9 , Fig. 9 : is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. The above-mentioned data processing device may be a computer program (including program code) running in a computer device, for example, the data processing device is an application software; the device may be used to execute the corresponding steps in the method provided in an embodiment of the present application. Fig. 9 As shown, the data processing device 2 may include: a sample entity acquisition module 21, a sample feature acquisition module 22, a sample fusion module 23, a sample prediction module 24 and a sample adjustment module 25.
[0195] A sample entity acquisition module 21 is used to acquire a sample entity pair, where the sample entity pair includes a first sample entity and a second sample entity;
[0196] The sample feature acquisition module 22 is used to acquire the first sample features respectively corresponding to the n first sample modes included in the first sample entity, acquire the second sample features respectively corresponding to the m second sample modes included in the second sample entity; acquire the sample relationship feature between the first sample entity and the second sample entity; n is a positive integer, and m is a positive integer;
[0197] The sample fusion module 23 is used to perform feature fusion processing on the n first sample features to obtain a first comprehensive sample feature; and perform feature fusion processing on the m second sample features to obtain a second comprehensive sample feature;
[0198] The sample prediction module 24 is used to input the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature into the initial relationship prediction model for prediction, and obtain the sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature;
[0199] The sample adjustment module 25 is used to adjust the parameters of the initial relationship prediction model based on the sample prediction confidence to obtain the relationship prediction model.
[0200] The specific functional implementation of the sample entity acquisition module 21, the sample feature acquisition module 22, the sample fusion module 23, the sample prediction module 24 and the sample adjustment module 25 can be found in the above Figure 3 Steps S101 to S105 in the corresponding embodiment are not described in detail here.
[0201] See also Fig. 9 , wherein the sample entity pair includes a positive sample entity pair and a negative sample entity pair; the positive sample entity pair includes a first positive sample entity and a second positive sample entity; the negative sample entity pair includes a first negative sample entity and a second negative sample entity; the sample prediction confidence includes a positive sample prediction confidence corresponding to the positive sample entity pair, and a negative sample prediction confidence corresponding to the negative sample entity pair;
[0202] The sample adjustment module 25 includes:
[0203] A first generating unit 251, configured to generate a first loss function for an initial relationship prediction model according to the positive sample prediction confidence and the negative sample prediction confidence;
[0204] The first adjustment unit 252 is used to adjust the parameters of the initial relationship prediction model according to the first loss function to obtain the relationship prediction model.
[0205] The specific functional implementation of the first generating unit 251 and the first adjusting unit 252 can be referred to above. Figure 3 Step S105 in the embodiment will not be described in detail here.
[0206] See also Fig. 9 , wherein the sample adjustment module 25 further includes:
[0207] A label acquisition unit 253 is used to acquire a sample label of a sample relationship feature for a sample entity pair;
[0208] A second generating unit 254, configured to generate a second loss function for the initial relationship prediction model according to an error between the sample prediction confidence and the sample label;
[0209] The second adjustment unit 255 is used to adjust the parameters of the initial relationship prediction model according to the second loss function to obtain the relationship prediction model.
[0210] The specific functional implementation of the label acquisition unit 253, the second generation unit 254 and the second adjustment unit 255 can be referred to above. Figure 3 Step S105 in the embodiment will not be described in detail here.
[0211] In the embodiment of the present application, the first modal features corresponding to the n first object modes included in the first object entity are obtained, the second modal features corresponding to the m second object modes included in the second object entity are obtained, and the candidate relationship features between the first object entity and the second object entity are obtained; n is a positive integer, and m is a positive integer; the n first modal features are subjected to feature fusion processing to obtain the first fusion feature; the m second modal features are subjected to feature fusion processing to obtain the second fusion feature; the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature is predicted, and the target association relationship between the first object entity and the second object entity is determined based on the confidence. The embodiment of the present application introduces multiple first modal features of the first object entity and multiple second modal features of the second object entity, so that the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature can better mine the hidden features of the first object entity and the second object entity, and more feature information can be obtained based on the hidden features, so as to more quickly determine the target association relationship between the first object entity and the second object entity. As the total amount of feature information increases, the target association relationship between the first object entity and the second object entity can be determined more accurately, thereby improving the efficiency of identifying the relationship between entities.
[0212] For further information, see Fig.10 , Fig.10 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig.10As shown, the computer device 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and a keyboard (Keyboard), and the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As shown in FIG. Fig.10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application.
[0213] exist Fig.10 In the computer device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0214] Obtain first modal features corresponding to n first object modalities included in the first object entity, obtain second modal features corresponding to m second object modalities included in the second object entity, and obtain candidate relationship features between the first object entity and the second object entity; n is a positive integer, and m is a positive integer; perform feature fusion processing on the n first modal features to obtain a first fused feature; perform feature fusion processing on the m second modal features to obtain a second fused feature; predict the confidence between the first fused feature, the second fused feature and the candidate relationship feature, and determine the target association relationship between the first object entity and the second object entity based on the confidence.
[0215] In one embodiment, the processor 1001 further performs the following steps when predicting the confidence between the first fused feature, the second fused feature and the candidate relationship feature:
[0216] The first fused feature, the second fused feature and the candidate relationship feature are input into the relationship prediction model. Based on the relationship prediction model, the first fused feature, the second fused feature and the candidate relationship feature are mapped to the same vector space to obtain a first fused vector corresponding to the first fused feature, a second fused vector corresponding to the second fused feature, and a candidate relationship vector corresponding to the candidate relationship feature; the difference between the vector obtained by fusing the first fused vector with the candidate relationship vector and the second fused vector is determined as the confidence between the first fused feature, the second fused feature and the candidate relationship feature.
[0217] In one embodiment, the processor 1001 further performs the following steps when predicting the confidence between the first fused feature, the second fused feature and the candidate relationship feature:
[0218] The first fused feature, the second fused feature and the candidate relationship feature are input into the relationship prediction model, and the relationship weight in the relationship prediction model is used to perform feature fusion transformation on the first fused feature and the second fused feature to obtain a predicted relationship vector between the first fused feature and the second fused feature; the feature distance between the predicted relationship vector and the candidate relationship feature is obtained, and the feature distance is determined as the confidence between the first fused feature, the second fused feature and the candidate relationship feature.
[0219] In one embodiment, the processor 1001 sets the number of candidate relationship features to d, where d is a positive integer;
[0220] When predicting the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature, the following steps are also performed:
[0221] Predict the confidence between the first fusion feature and the second fusion feature and d candidate relationship features respectively;
[0222] In one embodiment, the processor 1001 sets the number of candidate relationship features to d, where d is a positive integer;
[0223] When determining the target association relationship between the first object entity and the second object entity based on the confidence, the following steps are further performed:
[0224] Based on the confidences respectively corresponding to the d candidate relationship features, the d candidate relationship features are sorted; and the candidate relationship corresponding to the candidate relationship feature with the largest confidence is determined as the target association relationship between the first object entity and the second object entity.
[0225] In one embodiment, when determining the target association relationship between the first object entity and the second object entity based on the confidence, the processor 1001 further performs the following steps:
[0226] If the confidence level is greater than the object association threshold, the candidate relationship corresponding to the candidate relationship feature is determined as the target association relationship between the first object entity and the second object entity.
[0227] In one embodiment, the processor 1001 further performs the following steps:
[0228] A sample entity pair is obtained, the sample entity pair includes a first sample entity and a second sample entity; first sample features corresponding to n first sample modes included in the first sample entity are obtained, and second sample features corresponding to m second sample modes included in the second sample entity are obtained; sample relationship features between the first sample entity and the second sample entity are obtained; n is a positive integer, and m is a positive integer; the n first sample features are subjected to feature fusion processing to obtain a first comprehensive sample feature; the m second sample features are subjected to feature fusion processing to obtain a second comprehensive sample feature; the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature are input into an initial relationship prediction model for prediction, and sample prediction confidences between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature are obtained; based on the sample prediction confidences, parameters of the initial relationship prediction model are adjusted to obtain a relationship prediction model.
[0229] In one embodiment, the processor 1001 includes a sample entity pair including a positive sample entity pair and a negative sample entity pair; the positive sample entity pair includes a first positive sample entity and a second positive sample entity; the negative sample entity pair includes a first negative sample entity and a second negative sample entity; the sample prediction confidence includes a positive sample prediction confidence corresponding to the positive sample entity pair, and a negative sample prediction confidence corresponding to the negative sample entity pair;
[0230] Based on the sample prediction confidence, the parameters of the initial relationship prediction model are adjusted. When the relationship prediction model is obtained, the following steps are also performed:
[0231] A first loss function for the initial relationship prediction model is generated according to the positive sample prediction confidence and the negative sample prediction confidence; and parameters of the initial relationship prediction model are adjusted according to the first loss function to obtain a relationship prediction model.
[0232] In one embodiment, when the processor 1001 adjusts the parameters of the initial relationship prediction model based on the sample prediction confidence to obtain the relationship prediction model, it further performs the following steps:
[0233] Obtain sample labels for sample entity pairs based on sample relationship features; generate a second loss function for the initial relationship prediction model based on the error between the sample prediction confidence and the sample label; and adjust parameters of the initial relationship prediction model based on the second loss function to obtain a relationship prediction model.
[0234] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 2 , Figure 3 , Figure 4 , Figure 5 ,as well as Figure 6 The description of the data processing method in the corresponding embodiment can also be performed as described above. Fig. 9 The description of the data processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.
[0235] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, Figure 2 , Figure 3 , Figure 4 , Figure 5 as well as Figure 6 For details on the data processing methods provided in each step, please refer to the above Figure 2 , Figure 3 , Figure 4 , Figure 5 as well as Figure 6 The implementation methods provided by each step will not be described in detail here. In addition, the description of the beneficial effects of adopting the same method will not be described in detail here either.
[0236] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0237] The embodiment of the present application also provides a computer program product or a computer program, the computer program product or the computer program includes a computer instruction, the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device can execute the above Figure 2 , Figure 3 , Figure 4 , Figure 5 as well as Figure 6 The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here.
[0238] The term "comprising" and any variations thereof in the description, claims and drawings of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment comprising a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, devices, products or equipment.
[0239] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0240] The method and related apparatus provided by the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided by the embodiment of the present application. Specifically, each process and / or box in the method flow chart and / or structural diagram, as well as the combination of the processes and / or boxes in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or structures Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or structures Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A flow or multiple flows and / or structures illustrate the steps of the functions specified in one block or multiple blocks.
[0241] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method, characterized in that: include: Acquire first modal features respectively corresponding to n first object modalities included in the first object entity, acquire second modal features respectively corresponding to m second object modalities included in the second object entity, acquire a candidate relationship between the first object entity and the second object entity, perform feature extraction on the candidate relationship, and obtain a candidate relationship feature between the first object entity and the second object entity; n is a positive integer, m is a positive integer; the candidate relationship is used to express a certain connection between different entities; Perform feature fusion processing on n first modal features to obtain a first fused feature; Perform feature fusion processing on the m second modal features to obtain a second fused feature; Predicting confidences between the first fused feature, the second fused feature, and the candidate relationship feature, and determining a target association relationship between the first object entity and the second object entity based on the confidences; The predicting of the confidence between the first fusion feature, the second fusion feature, and the candidate relationship feature includes: Inputting the first fused feature, the second fused feature, and the candidate relationship feature into a relationship prediction model, and mapping the first fused feature, the second fused feature, and the candidate relationship feature to the same vector space based on the relationship prediction model to obtain a first fused vector corresponding to the first fused feature, a second fused vector corresponding to the second fused feature, and a candidate relationship vector corresponding to the candidate relationship feature; The difference between a vector obtained by fusing the first fusion vector with the candidate relationship vector and the second fusion vector is determined as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature.
2. The method according to claim 1, characterized in that The number of candidate relationship features is d, where d is a positive integer; The predicting the confidence between the first fusion feature, the second fusion feature, and the candidate relationship feature includes: Predicting the confidence between the first fused feature and the second fused feature and d candidate relationship features respectively; The determining, based on the confidence level, a target association relationship between the first object entity and the second object entity comprises: Sorting the d candidate relationship features based on the confidences respectively corresponding to the d candidate relationship features; The candidate relationship corresponding to the candidate relationship feature with the greatest confidence is determined as the target association relationship between the first object entity and the second object entity.
3. The method according to claim 1, characterized in that The determining, based on the confidence level, a target association relationship between the first object entity and the second object entity comprises: If the confidence level is greater than an object association threshold, the candidate relationship corresponding to the candidate relationship feature is determined as a target association relationship between the first object entity and the second object entity.
4. A data processing method, characterized in that: include: Acquire a sample entity pair, wherein the sample entity pair includes a first sample entity and a second sample entity; Obtain first sample features respectively corresponding to n first sample modes included in the first sample entity, and obtain second sample features respectively corresponding to m second sample modes included in the second sample entity; obtain sample relationship features of the relationship between the first sample entity and the second sample entity; n is a positive integer, and m is a positive integer; the relationship between the first sample entity and the second sample entity is used to express a certain connection between the first sample entity and the second sample entity; Perform feature fusion processing on the n first sample features to obtain a first comprehensive sample feature; perform feature fusion processing on the m second sample features to obtain a second comprehensive sample feature; Inputting the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature into an initial relationship prediction model for prediction, and obtaining a sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature; Based on the sample prediction confidence, adjusting parameters of the initial relationship prediction model to obtain a relationship prediction model; The step of inputting the first comprehensive sample feature, the second comprehensive sample feature, and the sample relationship feature into an initial relationship prediction model for prediction to obtain the sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature, and the sample relationship feature includes: Inputting the first comprehensive sample feature, the second comprehensive sample feature, and the sample relationship feature into an initial relationship prediction model, and mapping the first comprehensive sample feature, the second comprehensive sample feature, and the sample relationship feature to the same vector space based on the initial relationship prediction model to obtain a first sample fusion vector corresponding to the first comprehensive sample feature, a second sample fusion vector corresponding to the second comprehensive sample feature, and a candidate sample relationship vector corresponding to the sample relationship feature; The difference between a vector obtained by fusing the first sample fusion vector with the candidate sample relationship vector and the second sample fusion vector is determined as the sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature.
5. The method according to claim 4, characterized in that The sample entity pair includes a positive sample entity pair and a negative sample entity pair; the positive sample entity pair includes a first positive sample entity and a second positive sample entity; the negative sample entity pair includes a first negative sample entity and a second negative sample entity; the sample prediction confidence includes a positive sample prediction confidence corresponding to the positive sample entity pair, and a negative sample prediction confidence corresponding to the negative sample entity pair; The step of adjusting parameters of the initial relationship prediction model based on the sample prediction confidence to obtain the relationship prediction model includes: Generating a first loss function for the initial relationship prediction model according to the positive sample prediction confidence and the negative sample prediction confidence; According to the first loss function, parameters of the initial relationship prediction model are adjusted to obtain a relationship prediction model.
6. The method according to claim 4, characterized in that The step of adjusting parameters of the initial relationship prediction model based on the sample prediction confidence to obtain the relationship prediction model includes: Obtaining a sample label of the sample relationship feature for the sample entity pair; Generating a second loss function for the initial relationship prediction model according to the error between the sample prediction confidence and the sample label; According to the second loss function, parameters of the initial relationship prediction model are adjusted to obtain a relationship prediction model.
7. A data processing device, characterized in that: include: An object acquisition module, used to acquire first modal features respectively corresponding to n first object modalities included in a first object entity, acquire second modal features respectively corresponding to m second object modalities included in a second object entity, acquire a candidate relationship between the first object entity and the second object entity, perform feature extraction on the candidate relationship, and obtain a candidate relationship feature between the first object entity and the second object entity; n is a positive integer, m is a positive integer; the candidate relationship is used to express a certain connection between different entities; The object fusion module is used to perform feature fusion processing on the n first modal features to obtain a first fused feature; and perform feature fusion processing on the m second modal features to obtain a second fused feature; An object prediction module, used to predict the confidence between the first fused feature, the second fused feature and the candidate relationship feature; an object determination module, configured to determine a target association relationship between the first object entity and the second object entity based on the confidence level; Wherein, the object prediction module includes: a feature mapping unit, configured to input the first fused feature, the second fused feature, and the candidate relationship feature into a relationship prediction model, and based on the relationship prediction model, map the first fused feature, the second fused feature, and the candidate relationship feature to the same vector space to obtain a first fused vector corresponding to the first fused feature, a second fused vector corresponding to the second fused feature, and a candidate relationship vector corresponding to the candidate relationship feature; The first confidence determination unit is used to determine the difference between the vector obtained by fusing the first fusion vector and the candidate relationship vector and the second fusion vector as the confidence between the first fusion feature, the second fusion feature and the candidate relationship feature.
8. A data processing device, characterized in that: include: A sample entity acquisition module, used to acquire a sample entity pair, wherein the sample entity pair includes a first sample entity and a second sample entity; A sample feature acquisition module, used to acquire first sample features respectively corresponding to n first sample modes included in a first sample entity, and to acquire second sample features respectively corresponding to m second sample modes included in a second sample entity; to acquire sample relationship features of the relationship between the first sample entity and the second sample entity; n is a positive integer, and m is a positive integer; the relationship between the first sample entity and the second sample entity is used to express a certain connection between the first sample entity and the second sample entity; The sample fusion module is used to perform feature fusion processing on the n first sample features to obtain a first comprehensive sample feature; and perform feature fusion processing on the m second sample features to obtain a second comprehensive sample feature; A sample prediction module, used for inputting the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature into an initial relationship prediction model for prediction, and obtaining a sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature; A sample adjustment module, used to adjust the parameters of the initial relationship prediction model based on the sample prediction confidence to obtain a relationship prediction model; Wherein, the sample prediction module is specifically used for: Inputting the first comprehensive sample feature, the second comprehensive sample feature, and the sample relationship feature into an initial relationship prediction model, and mapping the first comprehensive sample feature, the second comprehensive sample feature, and the sample relationship feature to the same vector space based on the initial relationship prediction model to obtain a first sample fusion vector corresponding to the first comprehensive sample feature, a second sample fusion vector corresponding to the second comprehensive sample feature, and a candidate sample relationship vector corresponding to the sample relationship feature; The difference between a vector obtained by fusing the first sample fusion vector with the candidate sample relationship vector and the second sample fusion vector is determined as the sample prediction confidence between the first comprehensive sample feature, the second comprehensive sample feature and the sample relationship feature.
9. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store program code, and the processor is used to call the program code to execute the method described in any one of claims 1-3, or execute the method described in any one of claims 4-6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 3, or executing the method according to any one of claims 4 to 6.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the method described in any one of claims 1 to 3 is implemented, or the method described in any one of claims 4 to 6 is executed.
