Object extension method and device, computer device and storage medium
By extracting and fusing the semantic features of positive and negative classes from the seed object set, the problem of high similarity between extended objects in traditional object extension methods is solved, resulting in more accurate object extension results and meeting diverse needs.
Patent Information
- Application Number
- CN202210830873.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-07-15
AI Technical Summary
In traditional object extension methods, the extended object is highly similar to the seed object, which cannot meet the diverse extension needs in different scenarios, resulting in low accuracy of the extension results.
By extracting semantic features from the positive and negative seed objects in the seed object set, respectively, the corresponding positive and negative sub-semantic features are obtained. Feature fusion processing is then performed to obtain comprehensive semantic features. Subsequently, based on the features of the candidate objects and the comprehensive semantic features, the extended objects that meet the extension conditions are selected from the candidate objects.
It improves the accuracy of object expansion results and can meet the diverse expansion needs in different scenarios.
Smart Images

Figure CN115186676B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer application, in particular to an object expansion method and device, computer equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] With the development of computer technology, object expansion technology appears, which can filter expansion objects matched with a seed object set from a candidate object set corresponding to the seed object set, so as to perform subsequent object recommendation.
[0003] In the traditional technology, candidate objects similar to various seed objects in the seed object set in terms of semantics are determined as expansion objects, so as to realize object expansion based on the seed object set. Therefore, the expansion objects obtained by using the traditional object expansion method are highly similar to the seed objects, and cannot meet the diversity expansion demand in different scenarios. That is, the traditional object expansion method has the shortcoming of low expansion result accuracy. SUMMARY
[0004] Therefore, it is necessary to provide an object expansion method, device, computer equipment, computer readable storage medium and computer program product capable of improving expansion result accuracy in view of the above technical problems.
[0005] In a first aspect, the present application provides an object expansion method. The method comprises:
[0006] obtaining a seed object set and a candidate object set corresponding to the seed object set;
[0007] respectively performing semantic feature extraction on various seed objects in the seed object set to obtain respective sub-semantic features corresponding to the seed objects; the seed objects include positive seed objects and negative seed objects; the sub-semantic features include respective positive sub-semantic features corresponding to the positive seed objects and respective negative sub-semantic features corresponding to the negative seed objects;
[0008] performing feature fusion processing on the positive sub-semantic features and the negative sub-semantic features to obtain a comprehensive semantic feature of the seed object set;
[0009] filtering expansion objects meeting an expansion condition from the candidate objects based on results obtained by respectively performing feature matching between respective candidate object features of the candidate objects in the candidate object set and the comprehensive semantic feature.
[0010] In a second aspect, the present application further provides an object expansion device. The device comprises:
[0011] acquire a seed object set and a candidate object set corresponding to the seed object set;
[0012] extract semantic features from each seed object in the seed object set to obtain a corresponding sub semantic feature of each seed object; the seed object includes a positive class seed object and a negative class seed object; the sub semantic feature includes a positive class sub semantic feature corresponding to each positive class seed object and a negative class sub semantic feature corresponding to each negative class seed object;
[0013] perform feature fusion processing on each positive class sub semantic feature and each negative class sub semantic feature to obtain a comprehensive semantic feature of the seed object set;
[0014] select an expansion object meeting an expansion condition from each candidate object in the candidate object set based on a result of feature matching between a corresponding candidate object feature of each candidate object in the candidate object set and the comprehensive semantic feature.
[0015] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0016] acquire a seed object set and a candidate object set corresponding to the seed object set;
[0017] extract semantic features from each seed object in the seed object set to obtain a corresponding sub semantic feature of each seed object; the seed object includes a positive class seed object and a negative class seed object; the sub semantic feature includes a positive class sub semantic feature corresponding to each positive class seed object and a negative class sub semantic feature corresponding to each negative class seed object;
[0018] perform feature fusion processing on each positive class sub semantic feature and each negative class sub semantic feature to obtain a comprehensive semantic feature of the seed object set;
[0019] select an expansion object meeting an expansion condition from each candidate object in the candidate object set based on a result of feature matching between a corresponding candidate object feature of each candidate object in the candidate object set and the comprehensive semantic feature.
[0020] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0021] obtaining a seed object set and a candidate object set corresponding to the seed object set;
[0022] performing semantic feature extraction on each seed object in the seed object set respectively to obtain a corresponding sub semantic feature of each seed object; the seed object includes a positive class seed object and a negative class seed object; the sub semantic feature includes a positive class sub semantic feature corresponding to each positive class seed object and a negative class sub semantic feature corresponding to each negative class seed object;
[0023] performing feature fusion processing on each positive class sub semantic feature and each negative class sub semantic feature to obtain a comprehensive semantic feature of the seed object set;
[0024] based on the results of feature matching between the candidate object features of each candidate object in the candidate object set and the comprehensive semantic feature, screening an expansion object meeting an expansion condition from each candidate object.
[0025] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the following steps:
[0026] obtaining a seed object set and a candidate object set corresponding to the seed object set;
[0027] performing semantic feature extraction on each seed object in the seed object set respectively to obtain a corresponding sub semantic feature of each seed object; the seed object includes a positive class seed object and a negative class seed object; the sub semantic feature includes a positive class sub semantic feature corresponding to each positive class seed object and a negative class sub semantic feature corresponding to each negative class seed object;
[0028] performing feature fusion processing on each positive class sub semantic feature and each negative class sub semantic feature to obtain a comprehensive semantic feature of the seed object set;
[0029] based on the results of feature matching between the candidate object features of each candidate object in the candidate object set and the comprehensive semantic feature, screening an expansion object meeting an expansion condition from each candidate object.
[0030] The aforementioned object extension method, apparatus, computer device, storage medium, and computer program product extract semantic features from various sub-objects in the seed object set to obtain the positive sub-semantic features corresponding to each positive seed object and the negative sub-semantic features corresponding to each negative seed object. Then, feature fusion processing is performed on the positive and negative sub-semantic features to obtain the comprehensive semantic features of the seed object set. Finally, based on the results of feature matching between the candidate object features corresponding to each candidate object in the candidate object set and the comprehensive semantic features, extended objects that meet the extension conditions are selected from the candidate objects. Since the comprehensive semantic features of the seed object set are obtained by fusing the positive and negative sub-semantic features, these comprehensive semantic features can comprehensively represent the semantics of the seed object set from both positive and negative semantic dimensions. Therefore, the extended objects selected from the candidate objects based on these comprehensive semantic features are not necessarily similar to the seed objects, which can meet the diverse extension needs in different scenarios and improve the accuracy of the object extension results. Attached Figure Description
[0031] Figure 1 This is a diagram illustrating the application environment of the object extension method in one embodiment;
[0032] Figure 2 This is a flowchart illustrating an object extension method in one embodiment;
[0033] Figure 3 This is a schematic diagram illustrating the process of determining the sub-semantic features corresponding to a seed object in one embodiment.
[0034] Figure 4 This is a schematic diagram illustrating the process of determining the comprehensive semantic features corresponding to the seed object set in one embodiment.
[0035] Figure 5 This is a schematic diagram illustrating the process of determining the semantic features of the positive class based on the semantic features of each positive class sub-class in one embodiment.
[0036] Figure 6 This is a flowchart illustrating the object extension method in another embodiment;
[0037] Figure 7 This is a schematic diagram illustrating the implementation process of the object extension method in one embodiment;
[0038] Figure 8 This is a structural block diagram of an object expansion device in one embodiment;
[0039] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0040] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.
[0041] The object expansion method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other servers. In the process of filtering the expansion object from the candidate object set based on the seed object set, the server 104: obtains the seed object set and the candidate object set corresponding to the seed object set; respectively extracts semantic features of each positive class seed object and each negative class seed object in the seed object set, to obtain respective positive class sub-semantic features corresponding to each positive class seed object and respective negative class sub-semantic features corresponding to each negative class seed object; performs feature fusion processing on each positive class sub-semantic feature and each negative class sub-semantic feature to obtain comprehensive semantic features of the seed object set; and filters the expansion object meeting the expansion condition from each candidate object based on the results of feature matching respectively performed between the comprehensive semantic features and respective candidate object features of each candidate object in the candidate object set.
[0042] In one embodiment, the object expansion method provided by the present application, in the case that the computing processing capability of the terminal 102 meets the requirements, the application environment can only involve the terminal 102. Specifically, the terminal 102 obtains the seed object set and the candidate object set corresponding to the seed object set, and filters the expansion object from the candidate object set based on the seed object set.
[0043] The terminal 102 can be, but is not limited to, various desktop computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle-mounted device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers. The terminal 102 and the server 104 can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.
[0044] In one embodiment, as shown in Figure 2 An object expansion method is provided, and the method is applied to Figure 1The method is described by taking the server 104 as an example. It can be understood that the method can also be applied to the terminal 102, and can also be applied to a system including the terminal 102 and the server 104, and is implemented through interaction of the terminal 102 and the server 104. In this embodiment, the method includes the following steps.
[0045] In step 202, a seed object set and a candidate object set corresponding to the seed object set are obtained.
[0046] The seed object set refers to an object set including multiple seed objects. Correspondingly, the candidate object set refers to an object set including multiple candidate objects. The process of object expansion is a process of screening an expanded object from the candidate object set based on the seed object set. The specific form of the seed object can be text, image, or audio, etc.
[0047] Taking the case where the specific form of the seed object is text as an example, the seed object can be an entity class seed object, which is used to represent a specific entity object, such as “Asia”, “Africa”, etc. The seed object can also be a semantic class seed object, which is used to represent multiple entity objects, such as “cities near the desert”, “countries in Asia”, etc. The candidate object can be an entity class candidate object, which is used to represent a specific entity object. The candidate object can also be a knowledge graph including entity objects. The candidate object can also be an object associated with additional information on the basis of an entity object. The additional information can be channel information corresponding to the entity object, such as a purchase channel, an information acquisition channel, etc. The additional information can also be associated information of the entity object, such as an application program, audio information, or image information, etc.
[0048] Specifically, the server obtains a seed object set and a candidate object set corresponding to the seed object set. It can be understood that the candidate object set is an object set related to the seed object set. When performing object expansion, only the candidate objects in the candidate object set have relevance with the seed objects in the seed object set, so that the expansion of the object set can be realized. Taking the case where each seed object and each candidate object is an entity class object as an example, the entity type of the entity object represented by at least part of the candidate objects in the candidate object set is the same as the entity type of the entity object represented by at least part of the seed objects in the seed object set. For example, when the seed object set includes “bread”, “cheese”, and “banana”, the candidate object set includes at least part of the candidate objects representing food.
[0049] Further, the specific manner in which the server obtains the seed object set and the candidate object set corresponding to the seed object set can be active acquisition or passive reception. In one embodiment, the user defines the seed objects through the terminal, the server obtains the seed objects from the terminal, generates a seed object set composed of the seed objects, and determines, based on the seed object set, a candidate object set in which at least some of the candidate objects represent the same entity type as at least some of the seed objects in the seed object set. In another embodiment, the server obtains user information and data, and determines, based on the user information and data, a seed object set matched with the user, and further determines a candidate object set corresponding to the seed object set.
[0050] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the country and region.
[0051] In step 204, semantic feature extraction is performed on each seed object in the seed object set to obtain a sub-semantic feature corresponding to each seed object.
[0052] The sub-semantic feature corresponding to the seed object refers to a semantic feature that can represent the semantic characteristics of the seed object. It can be understood that the sub-semantic feature can also be used to express the characteristics of the entity object represented by the seed object. The specific data form of the sub-semantic feature can be a vector or a matrix, etc. The seed object includes a positive class seed object and a negative class seed object. Correspondingly, the sub-semantic feature includes a positive class sub-semantic feature corresponding to each positive class seed object and a negative class sub-semantic feature corresponding to each negative class seed object.
[0053] Further, the positive class seed object refers to a seed object used to express positive class sub-semantics such as "want" and "like", that is, based on the positive class seed object, an expansion object with the same or similar semantics as the positive class seed object can be selected from the candidate objects. For example, when the positive class seed objects include "Chengdu", "Nanjing" and "Xi'an", expansion objects representing cities such as "Shanghai", "Shenzhen" and "Changsha" can be selected. Correspondingly, the negative class seed object refers to a seed object used to express negative class sub-semantics such as "do not want" and "do not like", that is, based on the negative class seed object, an expansion object different from the negative class seed object can be selected from the candidate objects. For example, when the negative class seed objects include "Qingdao", "Sanya" and "Shenzhen", expansion objects representing cities not near the ocean such as "Wuhan" and "Changsha" can be selected.
[0054] Specifically, the server can extract semantic features from each sub-object in the seed object set by performing semantic analysis on each sub-object, thus obtaining the corresponding sub-semantic features for each sub-object. Furthermore, the specific method by which the server performs semantic analysis on the seed objects is not unique. For example, the server can perform semantic analysis on the seed objects based on introspective generalization, combinatorial analysis, contrastive comparison, or transformational analysis; the server can also perform semantic analysis on the seed objects based on a semantic feature extraction model. This semantic feature extraction model can be any of the following: BERT (Bidirectional Encoder Representation from Transformers), XLNet, and AlBert.
[0055] In one embodiment, step S204 includes: obtaining multiple seed texts containing the same seed object; performing semantic analysis on each type of subtext to determine candidate sub-semantic features of the seed object in each type of subtext; and determining the sub-semantic features corresponding to the seed object based on each candidate sub-semantic feature.
[0056] The seed text contains at least a seed object. Specifically, the semantics of the same seed object may differ in different contexts. For example, the seed object "burden" has different meanings in the seed texts "Keep your burden safe" and "Don't have any mental burdens." Based on this, as... Figure 3 As shown, for a given seed object, the server can retrieve k seed texts containing that seed object from the corpus, such as seed text S1, seed text S2, and seed text S... k Then, semantic analysis is performed on each seed text to obtain candidate sub-semantic features of the seed object in various sub-texts. For example... Figure 3 Candidate sub-semantic features V1 of the seed object in seed text S1, candidate sub-semantic features V2 of the seed object in seed text S2, and the seed object in seed text S... k Candidate sub-semantic features V k Then, the server determines the sub-semantic features corresponding to the seed object based on each candidate sub-semantic feature. The specific method by which the server performs semantic analysis on each seed text is described above in the section on the server's semantic analysis of seed objects, and will not be repeated here.
[0057] In this embodiment, by performing semantic analysis on multiple seed texts containing the same seed object, candidate sub-semantic features of the seed object in different seed texts are obtained, and based on each candidate sub-semantic feature, the sub-semantic feature corresponding to the seed object is determined, which can ensure that the sub-semantic feature can completely represent the semantic characteristics of the seed object, and is conducive to improving the accuracy of the sub-semantic feature, and further improving the accuracy of the object expansion result.
[0058] Further, the specific manner in which the server determines the sub-semantic feature corresponding to the seed object based on each candidate sub-semantic feature is not unique. For example, the server can perform clustering processing on each candidate sub-semantic feature, and determine the semantic feature associated with the clustering center as the sub-semantic feature corresponding to the seed object. In one embodiment, please continue to refer to Figure 3 , based on each candidate sub-semantic feature, determining the sub-semantic feature corresponding to the seed object includes: performing pooling processing on each candidate sub-semantic feature to obtain a pooling semantic feature corresponding to each candidate sub-semantic feature; and performing normalization processing on the pooling semantic feature to obtain the sub-semantic feature corresponding to the seed object.
[0059] Among them, the essence of pooling is dimensionality reduction sampling, which can not only retain the characteristics of each candidate sub-semantic feature, but also reduce information redundancy. Specifically, the server can perform pooling processing on each candidate sub-semantic feature based on an attention mechanism to obtain a pooling semantic feature corresponding to each candidate sub-semantic feature, and then perform normalization processing on the pooling semantic feature through a standardization function to obtain the sub-semantic feature corresponding to the seed object. The normalization function can include at least one of a Z-score function or a Sigmoid function.
[0060] Further, the specific manner in which the server obtains the pooling semantic feature corresponding to each candidate sub-semantic feature based on the attention mechanism is not unique. For example, the server can use non-parametric statistical methods such as average pooling and maximum pooling to calculate the weight of each candidate sub-semantic feature, and then obtain the corresponding pooling semantic feature through weighted summation; the server can also use a parameterized neural network to learn the pooling semantic feature corresponding to each candidate sub-semantic feature.
[0061] In this embodiment, by performing pooling and normalization processing on each candidate sub-semantic feature, the sub-semantic feature corresponding to the seed object is obtained, which can reduce the dimension and complexity of the sub-semantic feature, and is conducive to improving the processing efficiency of the subsequent data processing process.
[0062] Step S206, performing feature fusion processing on each positive class sub-semantic feature and each negative class sub-semantic feature to obtain the comprehensive semantic feature of the seed object set.
[0063] The comprehensive semantic feature of the seed object set refers to a semantic feature represented by each positive class seed object and each negative class seed object in the seed object set, and containing positive class semantics and negative class semantics.
[0064] Specifically, the server can obtain the comprehensive semantic feature of the seed object set by performing feature fusion processing on each positive class sub-semantic feature and each negative class sub-semantic feature. For example, the server can obtain the comprehensive semantic feature of the seed object set by performing feature operation on each positive class sub-semantic feature and each negative class sub-semantic feature, and the feature operation can include at least one of summation, difference, Hadamard product operation, or the like. The server can also obtain the comprehensive semantic feature of the seed object set by performing splicing and dimension reduction processing on each positive class sub-semantic feature and each negative class sub-semantic feature. The server can also obtain the comprehensive semantic feature of the seed object set by first performing feature fusion processing on each positive class sub-semantic feature to obtain a positive class semantic feature commonly represented by each positive class seed object, and performing feature fusion processing on each negative class sub-semantic feature to obtain a negative class semantic feature commonly represented by each negative class seed object, and then performing splicing processing on the positive class semantic feature and the negative class semantic feature.
[0065] In step S208, the server screens an expansion object that satisfies an expansion condition from each candidate object based on a result of feature matching between each candidate object feature corresponding to each candidate object in the candidate object set and the comprehensive semantic feature.
[0066] The candidate object feature corresponding to the candidate object refers to a semantic feature that can represent semantic characteristics of the candidate object. Specifically, the server obtains each candidate object feature corresponding to each candidate object in the candidate object set, and performs feature matching between each candidate object feature and the comprehensive semantic feature of the seed object set to obtain a feature matching result corresponding to each candidate object. Then, the server screens an expansion object that satisfies an expansion condition from each candidate object based on each feature matching result.
[0067] Further, the specific algorithm for the server to perform feature matching between the candidate object feature and the comprehensive semantic feature is not unique. For example, the server can perform feature matching by calculating the cosine similarity between the candidate object feature and the comprehensive semantic feature, or by calculating the Euclidean distance between the candidate object feature and the comprehensive semantic feature. It can be understood that after feature matching, a quantized feature matching result corresponding to each candidate object can be obtained. Taking the case of obtaining the feature matching result based on the cosine similarity as an example, the feature matching result can be represented as a value in the range of [0, 1]. If the candidate object is the same as the positive class seed object, the feature matching result corresponding to the candidate object is 1, if the candidate object is the same as the negative class seed object, the feature matching result corresponding to the candidate object is 0, and in other cases, the feature matching result corresponding to the candidate object is between 0 and 1. Specifically, the greater the value of the feature matching result corresponding to the candidate object, the higher the matching degree of the candidate object with the seed object set. That is, the expansion condition can mean that the feature matching result is greater than a set matching degree threshold, or can mean that the feature matching result is greater than or equal to a set matching degree threshold.
[0068] In the above object expansion method, the semantic features of the seed objects in the seed object set are extracted respectively to obtain the positive class sub-semantic features corresponding to each positive class seed object and the negative class sub-semantic features corresponding to each negative class seed object, then the feature fusion processing is performed on the positive class sub-semantic features and the negative class sub-semantic features to obtain the comprehensive semantic feature of the seed object set, and finally, the expansion object satisfying the expansion condition is selected from the candidate objects based on the results of performing feature matching between the candidate object feature corresponding to each candidate object in the candidate object set and the comprehensive semantic feature. Since the comprehensive semantic feature of the seed object set is obtained by fusing the positive class sub-semantic features and the negative class sub-semantic features, the comprehensive semantic feature can comprehensively represent the semantics of the seed object set from two dimensions of positive class semantics and negative class semantics, and therefore, the expansion object selected from the candidate objects based on the comprehensive semantic feature is not necessarily similar to the seed object, which can meet the diverse expansion requirements in different scenarios and is beneficial to improve the accuracy of the object expansion result.
[0069] As described above, the specific way for the server to perform feature fusion processing on the positive class sub-semantic features and the negative class sub-semantic features to obtain the comprehensive semantic feature of the seed object set is not unique. In one embodiment, step S206 includes: performing feature fusion processing on the sub-semantic features of the same category respectively to obtain the target semantic features corresponding to the sub-semantic features of the same category; and combining the target semantic features including the positive class semantic feature and the negative class semantic feature to obtain the comprehensive semantic feature of the seed object set.
[0070] The target semantic features include positive class semantic features commonly represented by the positive class seed objects and negative class semantic features commonly represented by the negative class seed objects. Specifically, as shown in Figure 4 The server performs feature fusion processing on the respective positive class seed objects e i The respective positive class sub-semantic features x i The feature fusion processing can obtain positive class semantic features S pos corresponding to the respective positive class sub-semantic features; and performs feature fusion processing on the respective negative class seed objects n i The respective negative class sub-semantic features y i The feature fusion processing can obtain negative class semantic features S neg corresponding to the respective negative class sub-semantic features. Then, the comprehensive semantic features q of the seed object set commonly represented by the positive class seed objects and the negative class seed objects are obtained by combining the positive class semantic features S pos and the negative class semantic features S neg .
[0071] In this embodiment, the feature fusion processing is performed on each sub-semantic feature of the same category to obtain the target semantic features corresponding to the sub-semantic features of the same category, and then the comprehensive semantic features of the seed object set are obtained by combining the target semantic features including the positive class semantic features and the negative class semantic features. The algorithm is simple, which is conducive to improving the data processing efficiency of the object expansion method.
[0072] Further, the specific manner of performing feature fusion processing on each sub-semantic feature of the same category to obtain the target semantic features is not unique. For example, the server can obtain the corresponding target semantic features by performing feature operations on each sub-semantic feature of the same category, which can include at least one of the operation modes such as summation, difference, or Hadamard product operation; or the server can obtain the corresponding target semantic features by splicing and dimension reduction processing on each sub-semantic feature of the same category.
[0073] In one embodiment, the feature fusion processing is performed on each sub-semantic feature of the same category to obtain the target semantic features corresponding to the sub-semantic features of the same category, including: obtaining the respective permutation equivariant processing results of each sub-semantic feature of the same category; performing permutation invariant processing on each permutation equivariant processing result to obtain a permutation invariant processing result; and determining the target semantic features corresponding to each sub-semantic feature of the same category according to the permutation invariant processing result.
[0074] Among them, permutation-equivariant processing and permutation-invariant processing are data processing methods defined based on the order of input and output during the processing. The output of permutation-equivariant processing corresponds to the input order of the processed object; the output of permutation-invariant processing is independent of the input order of the processed object. For example, linear operations and transpose processing are permutation-equivariant processing, while clustering and summation processing are permutation-invariant processing.
[0075] Specifically, the server performs permutational equivariance processing on each sub-semantic feature of the same category based on a permutational equivariance function, obtaining the permutational equivariance processing result corresponding to each sub-semantic feature. Then, it performs permutation invariance processing on each permutational equivariance processing result based on a permutation invariance processing function, obtaining the corresponding permutation invariance processing result. Finally, based on the permutation invariance processing results of the same category, the target semantic feature corresponding to each sub-semantic feature of that category can be determined. Furthermore, the specific method by which the server determines the target semantic feature of the corresponding category based on the permutation invariance processing result is not unique. For example, the server can determine the target semantic feature of the corresponding category based on the permutation inequality processing result, or it can normalize the permutation inequality processing result to obtain the target semantic feature of the corresponding category.
[0076] Take the case where the target semantic feature is a positive semantic feature as an example. For example... Figure 5 As shown, the server analyzes the semantic features x of each positive subclass. i By performing permutation and other transformation processes, we can obtain the semantic features x of each positive class sub-sub ... i The permutation invariance processing result is obtained by first processing the corresponding permutation equivariance processing result, and then performing permutation invariance processing on each permutation equivariance processing result to obtain the permutation invariance processing result of the positive class. Finally, the permutation invariance processing result is normalized to obtain the semantic feature S of the positive class. pos .
[0077] In this embodiment, permutation equivariance processing and permutation invariance processing are performed during the feature fusion process of the semantic features of each subclass. This ensures that the final target semantic features have both permutation invariance and permutation equivariance, which can ensure that the target semantic features have strong feature expression capabilities. This is beneficial to improving the accuracy of the comprehensive semantic features obtained based on the target semantic features, thereby improving the accuracy of the object expansion results.
[0078] As described above, the specific manner of the permutation equivariant processing is not unique, and linear operation and transposition processing are all permutation equivariant processing. In an embodiment, the permutation equivariant processing result corresponding to each of the sub-semantic features of the same category is obtained by: performing linear operation on each of the sub-semantic features of the same category based on a learning matrix and a bias feature to obtain a linear operation result corresponding to each of the sub-semantic features; and performing encoding processing on the linear operation result corresponding to each of the sub-semantic features to obtain the permutation equivariant processing result corresponding to each of the sub-semantic features.
[0079] Specifically, the server can perform linear operation on each of the sub-semantic features of different categories based on the same learning matrix and bias feature to obtain a linear operation result corresponding to each of the sub-semantic features, and then perform encoding processing on each of the linear operation results to obtain the permutation equivariant processing result corresponding to each of the sub-semantic features. The server can also configure different learning matrices and bias features for each of the sub-semantic features of different categories, and perform linear operation on each of the sub-semantic features of a semantic category based on the learning matrix and the bias feature corresponding to the semantic category. For example, referring to Figure 5 , the server performs linear operation on each of the positive sub-semantic features x i based on the learning matrix W1 and the bias feature b1 to obtain a linear operation result W1x i corresponding to each of the positive sub-semantic features x i +b1.
[0080] Further, the specific manner of the server performing encoding processing on the linear operation result corresponding to each of the sub-semantic features to obtain the permutation equivariant processing result is not unique. For example, the server can obtain a mapping feature corresponding to each of the linear operation results based on a mapping network, and determine the mapping feature as the permutation equivariant processing result corresponding to the linear operation result.
[0081] In an embodiment, the process of obtaining the permutation equivariant processing result corresponding to the sub-semantic feature includes: performing superposition processing on the linear operation result corresponding to the sub-semantic feature and a nonlinear output of the linear operation result obtained based on a multilayer perception neural network to obtain the permutation equivariant processing result corresponding to the sub-semantic feature.
[0082] Specifically, the server can obtain a nonlinear output of the linear operation result based on a multilayer perception neural network (MLP) containing a nonlinear activation function such as a ReLU function or a Sigmoid function, and then perform superposition processing on the nonlinear output and the existing operation result to obtain the permutation equivariant processing result corresponding to the sub-semantic feature.
[0083] In the above embodiment, the linear operation is performed on each sub-semantic feature of the same category based on the learning matrix and the bias feature, the linear operation result corresponding to each sub-semantic feature is obtained, and the encoding processing is performed on each linear operation result to obtain the permutation invariant processing result corresponding to each sub-semantic feature. The processing algorithm is simple, and the data processing efficiency is improved.
[0084] Further, the specific manner of the permutation invariant processing is not unique, and the clustering and summation processing are both permutation invariant processing. In one embodiment, the permutation invariant processing result is obtained by performing permutation invariant processing on each permutation invariant processing result, including: performing summation processing on each permutation invariant processing result to obtain a summation result; and performing secondary encoding processing on the summation result to obtain the permutation invariant processing result corresponding to each permutation invariant processing result.
[0085] Specifically, the summation processing is performed on the permutation invariant processing result corresponding to each sub-semantic feature by the server to obtain a summation result, and then the secondary encoding processing is performed on the summation result, so that the permutation invariant processing result corresponding to each permutation invariant processing result is obtained. The summation processing can be direct superposition or weighted summation. Further, the specific manner of the secondary encoding processing on the summation result is the same as the manner of the encoding processing on the linear operation result corresponding to each sub-semantic feature by the server, which is not described herein. In one specific embodiment, the specific algorithm of the secondary encoding processing on the summation result is the same as the algorithm of the encoding processing on the linear operation result corresponding to each sub-semantic feature by the server, so as to further simplify the data processing process.
[0086] In the above embodiment, the summation result is obtained by performing summation processing on each permutation invariant processing result, and the permutation invariant processing result corresponding to each permutation invariant processing result is obtained by performing secondary encoding processing on the summation result. The processing algorithm is simple, and the data processing efficiency is further improved.
[0087] In one embodiment, the comprehensive semantic feature of the seed object set is obtained by combining the positive semantic feature and the negative semantic feature, including: performing splicing processing on the positive semantic feature and the negative semantic feature to obtain a spliced semantic feature; and determining the comprehensive semantic feature of the seed object set based on the mapping result of the spliced semantic feature in the semantic space.
[0088] Specifically, the spliced semantic feature fspliced that integrates the positive semantic feature and the negative semantic feature is obtained by performing splicing processing on the positive semantic feature and the negative semantic feature by the server, and then the comprehensive semantic feature of the seed object set represented by the positive seed object and the negative seed object is determined based on the mapping result of the spliced semantic feature in the semantic space.
[0089] It should be noted that the specific manner in which the server splices the positive class semantic features and the negative class semantic features to obtain the spliced semantic features is not unique. For example, the server can directly splice the positive class semantic features and the negative class semantic features based on a feature splicing function to obtain the corresponding spliced semantic features; or the server can first perform feature operations on the positive class semantic features and the negative class semantic features to obtain a feature operation result, and then splice the positive class semantic features, the negative class semantic features, and the feature operation result to obtain the spliced semantic features. The specific content of the feature operation can be one or a combination of multiple operations such as addition, subtraction, dot multiplication, and Hadamard product. Splicing the positive class semantic features, the negative class semantic features, and the feature operation result to obtain the spliced semantic features is beneficial to improving the feature fusion effect and thus improving the accuracy of the comprehensive semantic features.
[0090] Further, the specific manner in which the server determines the comprehensive semantic features of the seed object set based on the mapping result of the spliced semantic features in the semantic space is also not unique. For example, the server can determine the mapping result of the spliced semantic features in the semantic space as the comprehensive semantic features of the seed object set; or the server can obtain the comprehensive semantic features of the seed object set by performing standardization processing on the mapping result of the spliced semantic features in the semantic space.
[0091] In the above embodiments, by splicing and mapping the positive class semantic features and the negative class semantic features to determine the comprehensive semantic features of the seed object set, the complexity of the comprehensive semantic features can be reduced while ensuring that the comprehensive semantic features contain positive and negative class semantics, which is beneficial to improving the subsequent feature matching efficiency and thus improving the data processing efficiency of the object expansion method.
[0092] It should be noted that before step S208, the server also needs to obtain the candidate object features corresponding to each candidate object in each candidate object set. In one embodiment, the object expansion method further includes: performing semantic feature extraction on each candidate object in the candidate object set to obtain candidate semantic features corresponding to each candidate object; and performing encoding processing on each candidate semantic feature to obtain candidate object features corresponding to each candidate object.
[0093] The specific manner in which the server performs semantic feature extraction on the candidate objects is described above in the manner in which the server performs semantic feature extraction on the seed objects, and the specific manner in which the server performs encoding processing on each candidate semantic feature is described above in the manner in which the server performs encoding processing on the linear operation result corresponding to each sub semantic feature, which will not be described here.
[0094] Specifically, the server respectively performs semantic feature extraction on each candidate object in the candidate object set, can obtain the corresponding candidate semantic feature of each candidate object, and then respectively performs encoding processing on each candidate semantic feature, that is, can obtain the corresponding candidate object feature of each candidate object. Further, in order to facilitate subsequent feature matching of the candidate object feature and the comprehensive semantic feature, the server respectively performs semantic feature extraction on the candidate object and the seed object based on the same semantic analysis algorithm; and the encoding processing algorithm used in the process of performing feature fusion processing on each sub semantic feature of the same category to obtain the corresponding target semantic feature is consistent with the encoding processing algorithm used in the process of performing encoding processing on the candidate semantic feature to obtain the corresponding candidate object feature.
[0095] In this embodiment, by performing semantic feature extraction and encoding processing on each candidate object in the candidate object set, the corresponding candidate object feature of each candidate object is obtained, which can ensure that the candidate object feature can accurately represent the semantics of the candidate object, and is beneficial to further improve the accuracy of the object expansion result.
[0096] In one embodiment, the object expansion method is implemented based on a target neural network model, and the process of training the target neural network model includes: obtaining a candidate sample set and a seed sample set, and determining positive class training samples and negative class training samples from the candidate sample set and the seed sample set; using the positive class training samples and the negative class training samples for model training to obtain the target neural network model.
[0097] The target neural network refers to a model obtained based on a neural network and a machine learning algorithm, which reflects many basic characteristics of brain function and is a highly complex nonlinear dynamic learning system that can realize multi-factor and multi-condition information processing. The specific network structure of the target neural network model is not unique, and for example, can include at least one of a convolutional neural network (CNN), a recursive neural network (RNN), or a long short-term memory neural network (LSTM). The positive class training samples include positive class seed samples in the seed sample set; the negative class training samples include negative class seed samples in the seed sample set and negative class candidate samples in the candidate sample set that are different in semantic type from the seed samples in the seed sample set.
[0098] Specifically, the number of negative class samples in the training process can ensure that the target neural network model has better performance to a certain extent. Based on this, the server obtains a candidate sample set and a seed sample set, and obtains negative class candidate samples that are different in semantic type from the seed samples in the seed sample set from the candidate sample set by performing preliminary semantic screening on each candidate sample in the candidate sample set. For example, if each seed sample in the seed sample set is food, the candidate samples that are not food in the candidate sample set can be used as negative class candidate samples. Then, the server performs model training based on positive class training samples including positive class seed samples in the seed sample set, and negative class training samples including negative class candidate samples and negative class seed samples in the seed sample set, to obtain a target neural network model used to calculate the feature matching result of each candidate object in the candidate object set and the seed object set. Further, the loss function used in the process of training the target neural network model can include at least one of a cross-entropy loss function, a distance loss function, or a relative entropy loss function.
[0099] In the above embodiment, the object expansion method is implemented based on the target neural network model, and in the process of training the target neural network model, the negative class candidate samples that are different in semantic type from the seed samples in the seed sample set in the candidate sample set are used as part of the negative class training samples, which can ensure a sufficient number of negative class samples, improve the performance of the target neural network model, and further improve the data processing capability of the object expansion method and the accuracy of the object expansion result.
[0100] In one embodiment, as shown in Figure 6 the object expansion method includes:
[0101] Step S601: obtaining a seed object set and a candidate object set corresponding to the seed object set;
[0102] Step S602: performing semantic feature extraction on each candidate object in the candidate object set to obtain candidate semantic features corresponding to each candidate object;
[0103] Step S603: performing encoding processing on each candidate semantic feature to obtain candidate object features corresponding to each candidate object;
[0104] Step S604: obtaining multiple seed texts containing the same seed object;
[0105] Step S605: performing semantic analysis on each seed text to determine candidate sub-semantic features of the seed object in each seed text;
[0106] Step S606: performing pooling processing on each candidate sub-semantic feature to obtain a pooling semantic feature corresponding to each candidate sub-semantic feature;
[0107] Step S607, the normalized processing is carried out to the pooled semantic feature, and the sub semantic feature corresponding to the seed object is obtained;
[0108] Step S608, the linear operation is carried out to each positive class sub semantic feature based on the learning matrix and the bias feature, and the linear operation result corresponding to each positive class sub semantic feature is obtained;
[0109] Step S609, the linear operation result corresponding to each positive class sub semantic feature and the nonlinear output of the linear operation result obtained based on the multilayer perception neural network are superimposed, and the permutation invariant processing result corresponding to each positive class sub semantic feature is obtained;
[0110] Step S610, the permutation invariant processing result corresponding to each positive class sub semantic feature is summed, and the sum result is obtained, and the sum result is secondary coded, and the permutation invariant processing result corresponding to each positive class sub semantic feature is obtained;
[0111] Step S611, the normalized processing is carried out to the permutation invariant processing result corresponding to each positive class sub semantic feature, and the positive class semantic feature commonly represented by each positive class seed object is obtained;
[0112] Step S612, the linear operation is carried out to each negative class sub semantic feature based on the learning matrix and the bias feature, and the linear operation result corresponding to each negative class sub semantic feature is obtained;
[0113] Step S613, the linear operation result corresponding to each negative class sub semantic feature and the nonlinear output of the linear operation result obtained based on the multilayer perception neural network are superimposed, and the permutation invariant processing result corresponding to each negative class sub semantic feature is obtained;
[0114] Step S614, the permutation invariant processing result corresponding to each negative class sub semantic feature is summed, and the sum result is obtained, and the sum result is secondary coded, and the permutation invariant processing result corresponding to each negative class sub semantic feature is obtained;
[0115] Step S615, the normalized processing is carried out to the permutation invariant processing result corresponding to each negative class sub semantic feature, and the negative class semantic feature commonly represented by each negative class seed object is obtained;
[0116] Step S616, the splicing processing is carried out to the positive class semantic feature and the negative class semantic feature, and the splicing semantic feature is obtained;
[0117] Step S617, the mapping result of the splicing semantic feature in the semantic space is determined as the comprehensive semantic feature of the seed object set;
[0118] Step S618: Based on the results of the feature matching between the candidate object features of each candidate object in the candidate object set and the comprehensive semantic feature, an expansion object that satisfies an expansion condition is selected from the candidate objects.
[0119] In one embodiment, the application further provides a personalized search application scenario, in which the above object expansion method is applied. Specifically, a positive class seed object that the user wants and a negative class seed object that the user does not want are defined by the user through a terminal. Then, the server obtains a seed object set including the positive class seed object and the negative class seed object, and a candidate object set corresponding to the seed object set. The semantic features of each seed object in the seed object set are extracted respectively to obtain the respective corresponding sub-semantic features of each seed object, and the feature fusion processing is performed on the positive class sub-semantic features and the negative class sub-semantic features to obtain the comprehensive semantic feature of the seed object set. Finally, based on the results of the feature matching between the candidate object features of each candidate object in the candidate object set and the comprehensive semantic feature, an expansion object that satisfies an expansion condition is selected from the candidate objects. By using the above object expansion method, the personalized search scenario including negative class semantics can be supported, which is conducive to improving the accuracy of the object expansion result. For example, when the search target is snacks, if the negative class seed object defined by the user includes "peanuts", the snacks containing peanuts will not be used as an expansion object, which can ensure that the expansion object is highly consistent with the user's demand.
[0120] In one embodiment, the application further provides an item recommendation application scenario, in which the above object expansion method is applied. In the item recommendation scenario, the server can obtain the historical behavior records of a user, determine a positive class seed object that the user is interested in based on the behaviors in the historical behavior records that include positive feedback operations, and determine a negative class seed object that the user is not interested in based on the behaviors in the historical behavior records that include negative feedback operations, and then generate a seed object set including the positive class seed object and the negative class seed object. The positive feedback operations include, but are not limited to, operations such as collection, like, praise, download, and purchase, and the negative feedback operations include, but are not limited to, operations such as rejection, poor evaluation, and uninstallation. Then, the server obtains a seed object set including the positive class seed object and the negative class seed object, and a candidate object set corresponding to the seed object set. The semantic features of each seed object in the seed object set are extracted respectively to obtain the respective corresponding sub-semantic features of each seed object, and the feature fusion processing is performed on the positive class sub-semantic features and the negative class sub-semantic features to obtain the comprehensive semantic feature of the seed object set. Finally, based on the results of the feature matching between the candidate object features of each candidate object in the candidate object set and the comprehensive semantic feature, an expansion object that satisfies an expansion condition is selected from the candidate objects, and the expansion object is recommended to the user.
[0121] Specifically, as shown in Figure 7 , for each seed object in the seed object set, the server obtains multiple texts containing the seed object from the corpus, inputs each text into the BERT model, obtains candidate sub-semantic features of the seed object in each text, and then performs average pooling and normalization processing on the multiple candidate sub-semantic features to obtain the sub-semantic feature corresponding to the seed object. Since the seed object set contains positive seed objects and negative seed objects, as shown in Figure 7 , the sub-semantic features include positive sub-semantic features corresponding to each positive seed object and negative sub-semantic features corresponding to each negative seed object. For example, the positive sub-semantic feature can be represented as a d-dimensional semantic vector x i . Further, for each candidate object in the candidate object set, the same method is used to obtain the candidate semantic feature corresponding to each candidate object.
[0122] After obtaining the positive sub-semantic features and the negative sub-semantic features, each sub-semantic feature of the same category is input into a DeepSet model to obtain a semantic feature S of the category with permutation invariance and permutation equivariance. Taking the positive semantic feature S pos as an example, S pos can be represented as:
[0123] S pon =f set (∑f ele (W1x i +b1))
[0124] where W1∈R H×d is a matrix that can be obtained through machine learning, and b1∈R H is a bias vector. To simplify the data processing process, the DeepSet model for obtaining the positive semantic feature S pos and the negative semantic feature S neg can share the same learning matrix W1. The functions f set and f ele are encoding functions with the same network structure but different parameters, which can be represented as:
[0125] f θ (v)=MLP θ (v)+v
[0126] where MLP θ is a two-layer fully connected network containing dropout and a nonlinear activation function.
[0127] Further, in the process of obtaining the semantic feature, a normalization layer can be used to normalize the positive semantic feature S posand negative class semantic features S neg to help the model converge as soon as possible.
[0128] obtain positive class semantic features S pos and negative class semantic features S neg After that, it is necessary to further determine the comprehensive semantic features q of the seed object set. Specifically, first, the positive class semantic features S pos and negative class semantic features S neg are spliced together, and then a simple two-layer perception machine (MLP) is used to map them to the fused semantic space to obtain the comprehensive semantic features q:
[0129] q = MLP ([S pon ; S neg ])
[0130] On the other hand, for each candidate object in the candidate object set, the encoding function is also used to encode it to obtain the candidate object features e j corresponding to each candidate object:
[0131] e j = f candidate (x j )
[0132] In the formula, x j is the candidate semantic features of the candidate object.
[0133] Finally, the cosine similarity between the comprehensive semantic features q of the seed object set and the candidate object features e j of each candidate object is calculated to obtain the similarity list of each candidate object, and the higher the similarity is, the closer the comprehensive semantic of the candidate object is to the seed object set. The server can sort the candidate objects according to the similarity, and determine the candidate objects with higher similarity as the recommended items of the user. For example Figure 7 , the positive class seed objects include chocolate and Sichuan hot sauce, the negative class seed objects include yogurt and popcorn, the semantic matching degree of the candidate object apple is 0.92, the semantic matching degree of the candidate object potato is 0.92, and the semantic matching degree of the candidate object orange milkshake is 0.83. If two items need to be recommended to the user, then the apple and potato with relatively higher semantic matching degree are recommended to the user.
[0134] Further, the above determination process of the recommended object can be realized by a target neural network model, the input of the target neural network model is the seed object set and the candidate object set, and the output is the semantic matching degree sorting list of each candidate object in the candidate object set and the seed object set.
[0135] Generally, the performance of the model benefits from a sufficient number of negative class samples in the training phase. Therefore, in addition to the negative class seed samples provided in the seed sample set , the server further extracts k e negative class candidate samples from the candidate sample set that are dissimilar to the semantic types of the various seed samples in the seed sample set to provide additional supervision. For example, in the case where the various seed samples in the seed sample set are all food, the candidate samples that are not food in the candidate sample set can be used as negative class candidate samples.
[0136] Let denote the union of the negative class candidate samples and the negative class training samples . The model is trained using the positive class training samples and the negative class entity set , predicts the matching degree of each candidate sample in the candidate sample set to the features of the seed sample set, and obtains the target neural network model when the loss function converges. The loss function can be a binary cross-entropy loss function:
[0137]
[0138] To verify the effect of the model, we construct a large-scale data set NED according to the business data. The large-scale data set NED includes two sub-data sets, NED-wiki and NED-hp. Among them, the NED-wiki data set provides 149 million sentences and 1.57 million candidate entities. NED-hp provides 66,518 sentences and 1,967 candidate entities. We annotate 12894 attribute values for 3628 entities of 18 coarse-grained semantic classes in NED-wiki, and annotate 488 attribute values for 122 entities in NED-hp. For NED-wiki, we generate 34,721 samples containing negative class semantics, which describe 1,473 different semantic classes. These semantic classes are composed of an average of 76 positive class entities (P=76) and 41 negative class entities (N=41). For NED-hp, we generate 890 samples containing negative class semantics, which describe 35 different semantic classes, which are composed of an average of 55 positive class entities (P=55) and 28.6 negative class entities (N=28.6).
[0139] In terms of evaluation indicators, we use the traditional indicator MAP@k, that is, the average precision (AP) of the top k expanded entities obtained by each query (i.e., seed set), as the evaluation indicator of the entity set expansion framework.
[0140] In addition to the traditional metric MAP@k, to measure the intrusion of negative semantic entities represented by negative seed entities that are clearly disliked by users, we designed the MeanNeg@k metric, referencing the Top-K metrics commonly used in recommendation and retrieval systems:
[0141]
[0142] Where, if L q The first k entities contain at least one negative class entity seed. The entity in, then Neg k Equals 1, otherwise Neg k =0. A higher MeanNeg@k score means the model tends to recall more entities that users explicitly "dislike," while a lower MeanNeg@k score indicates better model performance.
[0143] As shown in Table 1, on both datasets, our proposed method outperforms traditional entity expansion methods across all metrics. We attribute this improvement to the utilization of negative seed entities and the model's learnability.
[0144] Table 1 Comparison of overall model performance on NED
[0145]
[0146] As shown in Table 2, a higher MeanNeg@k score indicates that the method easily recalls entities that the user "dislikes". We found that on both subsets of the dataset, our proposed method has the lowest MeanNeg@k score compared to other entity expansion schemes. We attribute this to the effective utilization of negative class seed entities, as existing methods lack the ability to utilize negative class seed entities that express "dislike" requirements, resulting in higher NegMean@k scores. For example, although Scheme 3 achieves good MAP@k performance, its low NegMean@k score indicates that it ignores negative class semantics.
[0147] Table 2 Comparison of Negative Entity Intrusion Cases on NED
[0148]
[0149] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.
[0150] Based on the same inventive concept, the embodiments of the present application also provide an object expansion device for implementing the object expansion method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more object expansion device embodiments provided below can refer to the limitations of the object expansion method described above, which will not be repeated here.
[0151] In one embodiment, as shown in Figure 8 An object expansion device 800 is provided, comprising: an acquisition module 801, a semantic feature extraction module 802, a comprehensive semantic feature determination module 803, and an object expansion module 804, wherein:
[0152] The acquisition module 801 is configured to acquire a seed object set and a candidate object set corresponding to the seed object set.
[0153] The semantic feature extraction module 802 is configured to perform semantic feature extraction on each seed object in the seed object set respectively to obtain a corresponding sub-semantic feature of each seed object. The seed object includes a positive class seed object and a negative class seed object. The sub-semantic feature includes a positive class sub-semantic feature corresponding to each positive class seed object and a negative class sub-semantic feature corresponding to each negative class seed object.
[0154] The comprehensive semantic feature determination module 803 is configured to perform feature fusion processing on the positive class sub-semantic features and the negative class sub-semantic features to obtain a comprehensive semantic feature of the seed object set.
[0155] The object expansion module 804 is configured to filter out expansion objects that satisfy an expansion condition from the candidate objects based on the results of feature matching between the comprehensive semantic feature and the candidate object features corresponding to each candidate object in the candidate object set.
[0156] In an embodiment, the semantic feature extraction module 802 comprises: a seed text acquisition unit, configured to acquire a plurality of seed texts containing a same seed object; a semantic analysis unit, configured to perform semantic analysis on each seed text respectively, to determine a candidate sub-semantic feature of the seed object in each seed text; and a sub-semantic feature determination unit, configured to determine a sub-semantic feature corresponding to the seed object based on each candidate sub-semantic feature.
[0157] In an embodiment, the sub-semantic feature determination unit is specifically configured to: perform pooling processing on each candidate sub-semantic feature, to obtain a pooled semantic feature corresponding to each candidate sub-semantic feature; and perform normalization processing on the pooled semantic feature, to obtain the sub-semantic feature corresponding to the seed object.
[0158] In an embodiment, the comprehensive semantic feature determination module 803 comprises: a target semantic feature determination unit, configured to perform feature fusion processing on each sub-semantic feature of the same category respectively, to obtain a target semantic feature corresponding to each sub-semantic feature of the same category; the target semantic feature comprises a positive class semantic feature commonly represented by each positive class seed object, and a negative class semantic feature commonly represented by each negative class seed object; and a comprehensive semantic feature determination unit, configured to combine the positive class semantic feature and the negative class semantic feature, to obtain a comprehensive semantic feature of the seed object set.
[0159] In an embodiment, the target semantic feature determination unit comprises: a permutation equivariant processing sub-unit, configured to acquire a permutation equivariant processing result corresponding to each sub-semantic feature of the same category respectively; a permutation invariant processing sub-unit, configured to perform permutation invariant processing on each permutation equivariant processing result, to obtain a permutation invariant processing result; and a target semantic feature determination sub-unit, configured to determine the target semantic feature corresponding to each sub-semantic feature of the same category according to the permutation invariant processing result.
[0160] In an embodiment, the permutation equivariant processing sub-unit comprises: a linear operation component, configured to perform linear operation on each sub-semantic feature of the same category based on a learning matrix and a bias feature, to obtain a linear operation result corresponding to each sub-semantic feature respectively; and an encoding component, configured to perform encoding processing on the linear operation result corresponding to each sub-semantic feature respectively, to obtain a permutation equivariant processing result corresponding to each sub-semantic feature respectively.
[0161] In an embodiment, the encoding component is specifically configured to: perform superposition processing on the linear operation result corresponding to each sub-semantic feature respectively, and a nonlinear output of the linear operation result obtained based on a multilayer perception neural network, to obtain the permutation equivariant processing result corresponding to each sub-semantic feature respectively.
[0162] In an embodiment, the permutation invariant processing subunit is specifically configured to: perform summation processing on each permutation equivariant processing result to obtain a summation result; and perform secondary coding processing on the summation result to obtain the permutation invariant processing result of each permutation equivariant processing result.
[0163] In an embodiment, the comprehensive semantic feature determination unit comprises: a concatenation subunit configured to perform concatenation processing on the positive class semantic feature and the negative class semantic feature to obtain a concatenated semantic feature; and a comprehensive semantic feature determination subunit configured to determine the comprehensive semantic feature of the seed object set based on a mapping result of the concatenated semantic feature in the semantic space.
[0164] In an embodiment, the concatenation subunit is specifically configured to: perform feature operation on the positive class semantic feature and the negative class semantic feature to obtain a feature operation result; and perform concatenation processing on the positive class semantic feature, the negative class semantic feature, and the feature operation result to obtain the concatenated semantic feature.
[0165] In an embodiment, the object expansion apparatus 800 further comprises a candidate object feature determination module configured to: perform semantic feature extraction on each candidate object in the candidate object set respectively to obtain a candidate semantic feature corresponding to each candidate object respectively; and perform coding processing on each candidate semantic feature respectively to obtain a candidate object feature corresponding to each candidate object respectively.
[0166] In an embodiment, the object expansion method is implemented based on a target neural network model. In the case of this embodiment, the object expansion apparatus 800 further comprises a model training unit configured to: obtain a candidate sample set and a seed sample set, and determine positive class training samples and negative class training samples from the candidate sample set and the seed sample set; and perform model training using the positive class training samples and the negative class training samples to obtain the target neural network model; wherein the positive class training samples comprise positive class seed samples in the seed sample set; and the negative class training samples comprise negative class seed samples in the seed sample set and negative class candidate samples in the candidate sample set that are different in semantic type from the seed samples in the seed sample set.
[0167] Each of the above object expansion apparatuses can be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform the operations corresponding to each of the above modules.
[0168] In an embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 9As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a corpus. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with the terminal outside through the network connection. The computer program is executed by the processor to realize an object extension method.
[0169] Those skilled in the art can understand that, Figure 9 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or less components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0170] In one embodiment, a computer device is also provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the steps in each of the above method embodiments.
[0171] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to realize the steps in each of the above method embodiments.
[0172] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by a processor to realize the steps in each of the above method embodiments.
[0173] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0174] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0175] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. An object extension method, characterized by, The method comprises: acquiring a seed object set and a candidate object set corresponding to the seed object set; respectively performing semantic feature extraction on each seed object in the seed object set to obtain a respective sub semantic feature corresponding to each seed object; the seed object comprises a positive class seed object and a negative class seed object; the sub semantic feature comprises a positive class sub semantic feature corresponding to each positive class seed object and a negative class sub semantic feature corresponding to each negative class seed object; the positive class seed object refers to a seed object expressing a positive class sub semantic, and is used to screen an expansion object similar to the positive class seed object from the candidate object set; the negative class seed object refers to a seed object expressing a negative class sub semantic, and is used to screen an expansion object different from the negative class seed object from the candidate object set; performing feature fusion processing on each positive class sub semantic feature and each negative class sub semantic feature to obtain a comprehensive semantic feature of the seed object set; screening an expansion object satisfying an expansion condition from each candidate object based on a result of feature matching between a respective candidate object feature of each candidate object in the candidate object set and the comprehensive semantic feature.
2. The method of claim 1, wherein, The feature fusion processing on each positive class sub semantic feature and each negative class sub semantic feature to obtain the comprehensive semantic feature of the seed object set comprises: respectively performing feature fusion processing on each sub semantic feature of the same category to obtain a target semantic feature corresponding to each sub semantic feature of the same category; the target semantic feature comprises a positive class semantic feature commonly expressed by each positive class seed object and a negative class semantic feature commonly expressed by each negative class seed object; combining the positive class semantic feature and the negative class semantic feature to obtain the comprehensive semantic feature of the seed object set.
3. The method of claim 2, wherein, The feature fusion processing on each sub semantic feature of the same category to obtain a target semantic feature corresponding to each sub semantic feature of the same category comprises: acquiring a respective permutation invariant processing result of each sub semantic feature of the same category; performing permutation invariant processing on each permutation invariant processing result to obtain a permutation invariant processing result; determining the target semantic feature corresponding to each sub semantic feature of the same category according to the permutation invariant processing result.
4. The method of claim 3, wherein, The acquisition of the respective permutation invariant processing result of each sub semantic feature of the same category comprises: performing linear operation on each sub semantic feature of the same category based on a learning matrix and a bias feature to obtain a respective linear operation result of each sub semantic feature; respectively performing encoding processing on each linear operation result of each sub semantic feature to obtain a respective permutation invariant processing result of each sub semantic feature.
5. The method of claim 4, wherein, The encoding processing on each linear operation result of each sub semantic feature to obtain a respective permutation invariant processing result of each sub semantic feature comprises: The linear operation result corresponding to the sub-semantic feature and the nonlinear output of the linear operation result obtained based on the multilayer perception neural network are superimposed to obtain a permutation invariant processing result corresponding to each sub-semantic feature.
6. The method of claim 3, wherein, The permutation invariant processing result is obtained by performing permutation invariant processing on each permutation equivariant processing result, including: The permutation invariant processing result is obtained by performing permutation invariant processing on each permutation equivariant processing result. The permutation invariant processing result corresponding to each permutation equivariant processing result is obtained by performing second coding processing on the sum result.
7. The method of claim 2, wherein, The comprehensive semantic feature of the seed object set is obtained by combining the positive class semantic feature and the negative class semantic feature, including: The spliced semantic feature is obtained by splicing the positive class semantic feature and the negative class semantic feature. The comprehensive semantic feature of the seed object set is determined based on the mapping result of the spliced semantic feature in the semantic space.
8. The method according to any one of claims 1 to 7, characterized in that, The sub-semantic feature corresponding to each seed object is obtained by respectively performing semantic feature extraction on each sub-object in the seed object set, including: A plurality of seed texts containing the same sub-object are obtained. The candidate sub-semantic feature of the seed object in each seed text is determined by respectively performing semantic analysis on each seed text. The sub-semantic feature corresponding to the seed object is determined based on each candidate sub-semantic feature.
9. The method of claim 8, wherein, The sub-semantic feature corresponding to the seed object is determined based on each candidate sub-semantic feature, including: The pooling semantic feature corresponding to each candidate sub-semantic feature is obtained by performing pooling processing on each candidate sub-semantic feature. The sub-semantic feature corresponding to the seed object is obtained by performing normalization processing on the pooling semantic feature.
10. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The candidate semantic feature corresponding to each candidate object is obtained by respectively performing semantic feature extraction on each candidate object in the candidate object set. The candidate object feature corresponding to each candidate object is obtained by respectively performing encoding processing on each candidate semantic feature.
11. The method according to any one of claims 1 to 7, characterized in that, The object expansion method is realized based on a target neural network model, and the process of training the target neural network model includes: Obtain a candidate sample set and a seed sample set, and determine positive class training samples and negative class training samples from the candidate sample set and the seed sample set; the positive class training samples include positive class seed samples in the seed sample set; the negative class training samples include negative class seed samples in the seed sample set and negative class candidate samples in the candidate sample set that are different in semantic type from each sub-sample in the seed sample set; The target neural network model is obtained by using the positive class training samples and the negative class training samples for model training.
12. An object extension device characterized by comprising: The device includes: An acquisition module is configured to acquire a seed object set and a candidate object set corresponding to the seed object set. The semantic feature extraction module is configured to perform semantic feature extraction on each sub-object in the set of seed objects respectively, and obtain sub-semantic features corresponding to each seed object respectively; the seed objects include positive class seed objects and negative class seed objects; the sub-semantic features include positive class sub-semantic features corresponding to each positive class seed object respectively, and negative class sub-semantic features corresponding to each negative class seed object respectively; the positive class seed object refers to a seed object expressing a positive class sub-semantic, and is used to filter out expansion objects similar to the positive class seed object from the set of candidate objects; the negative class seed object refers to a seed object expressing a negative class sub-semantic, and is used to filter out expansion objects different from the negative class seed object from the set of candidate objects; The comprehensive semantic feature determination module is configured to perform feature fusion processing on each positive class sub-semantic feature and each negative class sub-semantic feature, and obtain a comprehensive semantic feature of the set of seed objects. The object expansion module is configured to filter out expansion objects satisfying an expansion condition from each candidate object based on a result of feature matching between each candidate object feature corresponding to each candidate object in the set of candidate objects and the comprehensive semantic feature.
13. The apparatus of claim 12, wherein, The comprehensive semantic feature determination module includes: A target semantic feature determination unit is configured to perform feature fusion processing on each sub-semantic feature of the same category respectively, and obtain a target semantic feature corresponding to each sub-semantic feature of the same category; the target semantic feature includes a positive class semantic feature commonly expressed by each positive class seed object, and a negative class semantic feature commonly expressed by each negative class seed object; A comprehensive semantic feature determination unit is configured to combine the positive class semantic feature and the negative class semantic feature, and obtain a comprehensive semantic feature of the set of seed objects.
14. The apparatus of claim 13, wherein, The target semantic feature determination unit includes: A permutation invariant processing sub-unit is configured to obtain a permutation invariant processing result of each sub-semantic feature of the same category; A permutation invariant processing sub-unit is configured to perform permutation invariant processing on each permutation invariant processing result, and obtain a permutation invariant processing result; A target semantic feature determination sub-unit is configured to determine a target semantic feature corresponding to each sub-semantic feature of the same category according to the permutation invariant processing result.
15. The apparatus of claim 14, wherein, The permutation invariant processing sub-unit includes: A linear operation component is configured to perform linear operation on each sub-semantic feature of the same category based on a learning matrix and a bias feature, and obtain a linear operation result corresponding to each sub-semantic feature respectively; An encoding component is configured to perform encoding processing on each linear operation result corresponding to each sub-semantic feature respectively, and obtain a permutation invariant processing result corresponding to each sub-semantic feature respectively.
16. The apparatus of claim 15, wherein, The encoding component is specifically configured to: superimpose the linear operation result corresponding to the sub-semantic feature and a nonlinear output of the linear operation result obtained based on a multilayer perception neural network, and obtain a permutation invariant processing result corresponding to each sub-semantic feature.
17. The apparatus of claim 14, wherein, The permutation invariant processing sub-unit is specifically configured to: perform summation processing on each permutation invariant processing result, and obtain a summation result; The second coding processing is performed on the sum result to obtain a permutation-invariant processing result corresponding to each permutation-equivalent processing result.
18. The apparatus of claim 13, wherein, The comprehensive semantic feature determination unit comprises: A concatenation subunit configured to perform concatenation processing on the positive-class semantic features and the negative-class semantic features to obtain concatenated semantic features. A comprehensive semantic feature determination subunit configured to determine a comprehensive semantic feature of the seed object set based on a mapping result of the concatenated semantic features in a semantic space.
19. The apparatus of any of claims 12 to 18, wherein, The semantic feature extraction module comprises: A seed text acquisition unit configured to acquire multiple seed texts containing a same seed object; A semantic analysis unit configured to perform semantic analysis on each seed text to determine a candidate sub-semantic feature of the seed object in each seed text; A sub-semantic feature determination unit configured to determine a sub-semantic feature corresponding to the seed object based on each candidate sub-semantic feature.
20. The apparatus of claim 19, wherein, The sub-semantic feature determination unit is specifically configured to: perform pooling processing on each candidate sub-semantic feature to obtain a pooled semantic feature corresponding to each candidate sub-semantic feature; and perform normalization processing on the pooled semantic feature to obtain the sub-semantic feature corresponding to the seed object.
21. The apparatus of any one of claims 12-18, wherein, The device further comprises a candidate object feature determination module configured to: perform semantic feature extraction on each candidate object in the candidate object set to obtain a candidate semantic feature corresponding to each candidate object; and perform coding processing on each candidate semantic feature to obtain a candidate object feature corresponding to each candidate object.
22. The apparatus of any one of claims 12-18, wherein, The object expansion method is implemented based on a target neural network model, and the device further comprises a model training unit configured to: acquire a candidate sample set and a seed sample set, and determine positive-class training samples and negative-class training samples from the candidate sample set and the seed sample set; the positive-class training samples comprise positive-class seed samples in the seed sample set; and the negative-class training samples comprise negative-class seed samples in the seed sample set and negative-class candidate samples in the candidate sample set that are different from the semantic types of seed samples in the seed sample set; perform model training using the positive-class training samples and the negative-class training samples to obtain the target neural network model. 23.A computer device, comprising a memory and a processor, wherein the memory stores a computer program. The processor implements the steps of the method of any one of claims 1 to 11 when executing the computer program.
24. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 11.
25. A computer program product comprising a computer program, characterised in that, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 11.
Citation Information
Patent Citations
Corpus processing method, related device and equipment
CN113821593A