Information processing method and device, equipment, storage medium and program product
By splicing query text and description text to generate fusion text, and using multi-dimensional classification results to filter target objects, the problem of inaccurate information matching and labeling dependence in the existing technology is solved, and the efficiency and accuracy of information retrieval are improved.
Patent Information
- Application Number
- CN202310185875.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-08-23
AI Technical Summary
Existing information processing technology relies on a large amount of manually annotated data, resulting in inaccurate information matching, low accuracy of retrieval results, and problems of annotation errors and high costs.
By splicing the query text and description text to generate a fused text, determine its semantic feature vector, and use multi-dimensional classification results to filter target objects from candidate objects to generate query results, reducing dependence on annotated data.
It improves the efficiency and accuracy of information retrieval, avoids semantic loss, enhances the information interaction between query text and description text, and reduces dependence on annotated data.
Smart Images

Figure CN118535674A
Abstract
Description
Technical Field
[0001] The present application relates to artificial intelligence technology, and in particular to an information processing method, device, equipment, storage medium, and program product. Background Art
[0002] Information processing can process, sort, organize and store information in a certain way, and then accurately search for relevant information according to user needs. Information processing includes information retrieval, which is the query process in which users use keywords to find the required data from the existing information collection according to their needs.
[0003] In the related art, a search engine usually provides a web page interface where users can submit search content on the client side. The search engine obtains search results that match the search content entered by the user and returns these search results to the user. The information processing process in the related art is based on a keyword matching mechanism and requires manual labeling of a large amount of data. When there are errors in the labeled data, it will lead to inaccurate information matching and low accuracy of retrieval results. Summary of the invention
[0004] The embodiments of the present application provide an information processing method, device, electronic device, computer-readable storage medium, and computer program, which can reduce the dependence on labeled data and improve retrieval efficiency and accuracy through multi-dimensional classification.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides an information processing method, the method comprising:
[0007] Obtaining a query text and description texts of multiple candidate objects;
[0008] The query text is concatenated with the description text of each candidate object to obtain a fused text corresponding to each candidate object;
[0009] Determine the semantic feature vector of the fused text of each candidate object, and map the semantic feature vector corresponding to each candidate object into a multi-dimensional classification result;
[0010] Based on the multi-dimensional classification result corresponding to each of the candidate objects, screening out at least one target object from the multiple candidate objects;
[0011] A query retrieval result is generated based on generating the description text corresponding to the at least one target object.
[0012] The present application provides an information processing device, including:
[0013] The information acquisition module is used to acquire a query text and description texts of multiple candidate objects; the query text is respectively concatenated with the description text of each candidate object to obtain a fused text corresponding to each candidate object;
[0014] A feature classification module, used to determine the semantic feature vector of the fused text of each candidate object, map the semantic feature vector corresponding to each candidate object into a multi-dimensional classification result; based on the multi-dimensional classification result corresponding to each candidate object, screen out at least one target object from the multiple candidate objects;
[0015] A result generation module is used to generate a query result based on the description text corresponding to the at least one target object.
[0016] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0017] Memory for storing computer executable instructions or computer programs;
[0018] The processor is used to implement the information processing method provided in the embodiment of the present application when executing the computer executable instructions or computer programs stored in the memory.
[0019] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program for implementing the information processing method provided in the embodiment of the present application when executed by a processor.
[0020] An embodiment of the present application provides a computer program product, including computer executable instructions or a computer program. When the computer program or computer executable instructions are executed by a processor, the information processing method provided by the embodiment of the present application is implemented.
[0021] The embodiments of the present application have the following beneficial effects:
[0022] The query text and the description text are concatenated to obtain a fused text to enhance the information interaction between the query text and the description text. The fused text includes the features of the query text and the description text, which can avoid additional data annotation for the fused text. The semantic feature vector of the fused text is determined to achieve the semantic fusion of the query text and the description text. Compared with the simple use of the texts on both sides for classification in related technologies, the information interaction between the texts on both sides can be enhanced to avoid semantic loss. The target object that meets the multi-dimensional classification results is screened out from multiple candidate objects, and a query result corresponding to the description text of the target object is generated. The query result meets the classification results of multiple dimensions, which can improve the retrieval efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1Ais a schematic diagram of the architecture of an information processing system 100 provided in an embodiment of the present application;
[0024] Figure 1B It is a schematic diagram of an information processing model provided in an embodiment of the present application;
[0025] Figure 1C is a schematic diagram of a fused embedding vector sequence provided in an embodiment of the present application;
[0026] Figure 2 is a schematic diagram of the structure of the server 400 provided in an embodiment of the present application;
[0027] Figure 3A-Figure 3F It is a flowchart of the information processing method provided in the embodiment of the present application;
[0028] Figure 4 is a simplified video retrieval flow chart provided in an embodiment of the present application;
[0029] Figure 5 is a schematic diagram of a video search scenario provided in an embodiment of the present application;
[0030] Figure 6 It is a flow chart of information processing model training provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0032] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0033] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0034] It is understandable that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0036] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0037] 1) Query text, which is the query condition or search keyword set by the user, used to query or select all or part of the data from an information set or other collection. For example, in a video search scenario, the query text can be the video name or video keyword entered by the user into the search engine.
[0038] 2) Description text: a coherent arrangement of a series of words and phrases with complete and independent meanings, which describes the characteristics of the described object in detail. It can also be text associated with the query text, such as the short sentence "Common methods of braised pork in red sauce". Here, the query text can be "braised pork in red sauce" and the description text can be "Common methods of braised pork in red sauce".
[0039] 3) Fusion text: connect the query text and the description text through the start tag and the separation tag to splice them into a fusion text; the fusion text has the semantic features and keywords of the query text and the description text. For example, if the query text is "song" and the description text is "music played by classical instruments", the fusion text can be expressed as "[CLS] song [SEP] music played by classical instruments".
[0040] 4) Multi-dimensional classification: classify the semantic feature vectors from different dimensions, for example, classify based on the semantic similarity between semantic feature vectors or classify based on the matching degree between semantic feature vectors.
[0041] 5) Semantic feature vector: The feature vector obtained by linearly transforming words or phrases is to convert the symbolic representation of the text into a vector representation in the semantic space. The semantic representation of the word can be learned in an unsupervised manner according to the context in which the word is located.
[0042] 6) Classifier: A model used to perform classification tasks on the description text and query text in the fusion text based on the semantic features extracted by the encoder, such as the softmax model, or some machine learning classification methods, such as decision tree, support vector machine, naive Bayes, etc.
[0043] The embodiments of the present application provide an information processing method, apparatus, device, computer-readable storage medium, and computer program product, which can reduce the dependence on labeled data and improve retrieval efficiency and accuracy through multi-dimensional classification. The exemplary application of the electronic device provided by the embodiments of the present application is described below. The device provided by the embodiments of the present application can be implemented as various types of user terminals such as laptops, tablet computers, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), and can also be implemented as servers. Below, an exemplary application when the device is implemented as a terminal or a server will be described.
[0044] See also Figure 1A , Figure 1A It is a schematic diagram of the architecture of the information processing system 100 provided in an embodiment of the present application. To support an information processing application, terminals (terminal 200-1 and terminal 200-2 are shown as examples) are connected to a server 400 via a network 300. The network 300 may be a wide area network or a local area network, or a combination of the two.
[0045] The terminal (terminal 200-1 and terminal 200-2 are shown as examples) initiates an information processing request to the server 400 through the network 300. The server 400 obtains the query text and the description texts of multiple candidate objects based on the information processing request; the server 400 concatenates the query text and each description text to obtain a fused text corresponding to the candidate object; the server 400 determines the semantic feature vector corresponding to the fused text, and maps the semantic feature vector into a multi-dimensional classification result, thereby screening out at least one target object; the server 400 generates a query result based on the description text of the target object, and returns the query result to the terminal through the network 300, and the terminal displays the query result on a graphical interface (graphical interface 210-1 and graphical interface 210-2 are shown as examples).
[0046] The embodiments of the present application can be implemented with the help of artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.
[0047] refer to Figure 1B , Figure 1BIt is a schematic diagram of the information processing model provided in an embodiment of the present application; it includes a semantic understanding model, a first classifier, and a second classifier.
[0048] The embodiments of the present application can be used in scenarios such as information recommendation and search engines. For example, in a search engine scenario, the server 400 obtains "braised pork in red sauce" as a query text, and obtains "common methods of braised pork in red sauce" corresponding to the query text as a description text; the query text and the description text are converted into word granularity (single character) for input, a start mark "CLS" is inserted at the start position of the query text "braised pork in red sauce", a separation mark "SEP" is inserted at the end position of the query text "braised pork in red sauce", and the query text "braised pork in red sauce" and the description text "common methods of braised pork in red sauce" are concatenated to obtain a fused text, wherein T0-T10 represent word embedding vectors; the fused text is input into a semantic understanding model (such as a pre-trained language model) in an information processing model to obtain a semantic feature vector corresponding to the fused text; the semantic feature vector is sequentially input into a first classifier and a second classifier; a first classification process is performed by the first classifier to obtain a target object with the same keywords as the description text; a second classification process is performed by the second classifier to obtain a target object with the same semantics as the query text and the description text; the information processing model generates a query result based on the description text of the target object with the same keywords and the same semantics.
[0049] In some embodiments, the information processing model can be applied to search engines and information recommendation scenarios; and the description text is not limited to text description; for example, in a music search scenario, the description text can be the lyrics of a piece of music, or the name of the creator; in an image search scenario, the description text can be the text or information in the image obtained through image recognition; in a video search scenario, the description text can be an introduction to the video in the video library, or it can be barrage information or subtitle information in the video.
[0050] In some embodiments, the server 400 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0051] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the server 400 provided in an embodiment of the present application, Figure 2The server 400 shown includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 2 Various buses are labeled as bus system 440 .
[0052] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0053] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0054] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0055] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0056] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0057] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0058] In some embodiments, the information processing device provided in the embodiments of the present application can be implemented in software. Figure 2 The information processing device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: an information acquisition module 4551, a feature classification module 4552 and a result generation module 4553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.
[0059] In some embodiments, the terminal or server can implement the information processing method provided by the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APPlication, APP), that is, a program that needs to be installed in the operating system to run; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plug-in.
[0060] refer to Figure 1B , Figure 1B Schematic diagram of the information processing model provided by the embodiment of the present application; the information processing model of the embodiment of the present application includes a semantic understanding model, a first classifier, and a second classifier; the semantic understanding model can be a deep semantic matching model (DSSM, Deep Structured Semantic Models), a long short-term memory network (LSTM, Long Short-Term Memory), etc.; the first and second classifiers can map the data records in the database to a label in a given category, so that they can be applied to data prediction. Classifiers are a general term for methods of classifying samples in data mining, including decision trees, logistic regression, naive Bayes, neural networks and other algorithms. The information processing method provided by the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server provided by the embodiment of the present application.
[0061] The following describes an information processing method provided by an embodiment of the present application. As mentioned above, the electronic device that implements the information recommendation method of an embodiment of the present application may be a server.
[0062] See also Figure 3A , Figure 3A is a flowchart of the information processing method provided in the embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.
[0063] In step 101, a query text and description texts of multiple candidate objects are obtained.
[0064] For example, a real business system database (for example, a backend database of a search engine) is obtained, and a query log is obtained from the real business system database, where the query log is used to store statistical data of search results; a query text is obtained according to search keywords or query conditions input by a user, and the query log is searched based on the query text to obtain a description text of at least one candidate object.
[0065] It should be noted that the data in the query log are statistical data in the real retrieval system; the label of the data can be obtained according to the statistical method of the retrieval system, and different statistical methods can obtain different labels. For example, the number of clicks obtained from the statistical data can be used as the click rate label of the data, and no manual labeling is required.
[0066] In some examples, the query text may be a query condition or keyword set by the user, which is used to query or select all or part of the data from an information set or other collection; the description text is a coherent arrangement of a series of words and phrases, which has a complete and unique meaning and describes the characteristics of the query text in detail. It may also be text associated with the query text, such as different words in the same context have a certain correlation. For example, in the sentence "eat rice with a spoon", the spoon and rice have a certain relationship, and the two together complete the act of eating. Here, the query text may be "spoon", and the description text of the candidate object may be "eat rice with a spoon" or "eat rice".
[0067] In some embodiments, the description text is not limited to text description; for example, in a music search scenario, the description text may be the lyrics of a piece of music, or the name of the composer; in an image search scenario, the description text may be text or information in the image obtained through image recognition; in a video search scenario, the description text may be an introduction to the video in the video library, or it may be barrage information or subtitle information in the video.
[0068] Through the embodiments of the present application, it is possible to obtain a query text, and obtain a corresponding plurality of candidate description texts based on the query text, and obtain statistical data from a real data set to reduce dependence on labeled data.
[0069] In step 102, the query text is concatenated with the description text of each candidate object to obtain a fused text corresponding to each candidate object.
[0070] refer to Figure 3B , Figure 3A The illustrated step 102 may be implemented through steps 1021 to 1022, which are described in detail below.
[0071] The following processing is performed on the description text of each candidate object:
[0072] In step 1021, a start mark is inserted at the start position of the query text, and a separation mark is inserted at the end position of the query text.
[0073] For example, the query text and the description text are separated by a start tag and a separator tag to obtain a query-description sentence pair, the semantic understanding model is called to perform semantic encoding processing on the query-description sentence pair, and the corresponding output (CLS) is used as the semantic representation of the text (semantic feature vector); the input query text and description text are segmented by the separator "[SEP]", and two different semantic feature vectors can be attached to the query text and the description text respectively for distinction.
[0074] In step 1022, the query text with the start mark and the separation mark inserted is concatenated with the description text of the candidate object to obtain a fused text of the candidate object.
[0075] For example, take "red-braised pork" as the query text, and obtain "common methods of red-braised pork" corresponding to the query text as the description text; convert the query text and the description text into word granularity (single character) for input, insert the start marker "[CLS]" at the start position of the query text "red-braised pork", insert the separation marker "[SEP]" at the end position of the query text "red-braised pork", and concatenate the query text "red-braised pork" and the description text "common methods of red-braised pork" to obtain the fused text "[CLS] red-braised pork [SEP] common methods of red-braised pork"; here, each character or marker is presented in the form of word granularity (single character).
[0076] Through the embodiments of the present application, the query text and the description text can be spliced and processed to enhance the information interactivity in the form of fused text.
[0077] In step 103, the semantic feature vector of the fused text of each candidate object is determined.
[0078] refer to Figure 3C , Figure 3A The illustrated step 103 may be implemented through steps 1031 to 1033, which are described in detail below.
[0079] In step 1031, a word embedding vector sequence and a position embedding vector sequence of the fused text of the candidate object are determined.
[0080] For example, the word embedding vector sequence includes the word embedding vector of each element in the fused text of the candidate object, where the element includes characters (in the form of words or words) and symbols (CLS, SEP), and the position embedding vector sequence includes the position embedding vector of each element in the fused text of the candidate object;
[0081] For example, the word embedding vector sequence is obtained by performing word embedding processing on each element in the fused text to represent the word label of each element in the fused text; the position embedding vector sequence is obtained by performing position embedding processing on each element in the fused text to represent the position of each element in the fused text.
[0082] In step 1032, the word embedding vector sequence and the position embedding vector sequence are fused to obtain a fused embedding vector sequence of the fused text of the candidate object.
[0083] For example, according to the word label and position corresponding to each element in the fused text, the word embedding vector sequence and the position embedding vector sequence of each element are fused to obtain the fused embedding vector sequence corresponding to each element, and the fused embedding vector sequence of each element is concatenated to obtain the fused embedding vector sequence corresponding to the fused text of the candidate object.
[0084] refer to Figure 1C , Figure 1C It is a schematic diagram of the fused embedding vector sequence provided in an embodiment of the present application; it includes input (fused text), word embedding vector sequence, and position embedding vector sequence.
[0085] The fused text formed after adding tags to the input is "[CLS] Braised pork in red sauce [SEP] Common method of braised pork in red sauce [SEP]". Here, the query text is "braised pork in red sauce", and the description text is "Common method of braised pork in red sauce". "[CLS]" is used as the starting tag and "[SEP]" is used as the separation tag. The semantic understanding model can analyze the word embedding vector sequence of each word and automatically add a separation word embedding vector sequence for separating sentences; the semantic understanding model automatically generates a corresponding position embedding vector sequence according to the position of each word embedding vector sequence, and adds the word embedding vector sequence of each element and the corresponding position embedding vector sequence to obtain the word label and position information corresponding to each element in the text element sequence.
[0086] In some examples, the position of each element in the fused text may be represented in numerical order, for example, E1, E2, and E3 represent the positions of the first three text elements (E0 represents the position of the start tag), and E1 represents the first (text) element in the fused text. Figure 1C , the arrangement order of the word embedding vector sequence and the position embedding vector sequence corresponds to the position of each element in the fused text, the word embedding vector and the position embedding vector sequence of each element are fused to obtain the fused embedding vector sequence corresponding to each element in the fused text; the fused embedding vector sequence of each element is connected according to the arrangement order of the text elements to obtain the fused embedding vector sequence corresponding to the fused text.
[0087] For example, the word embedding vector sequence and the position embedding vector sequence are fused, and the word embedding vector sequence and the position embedding vector sequence are added together.
[0088] In step 1033, a semantic understanding model is called to perform semantic encoding processing based on the fused embedding vector sequence of the fused text of the candidate object to obtain a semantic feature vector of the fused text of the candidate object.
[0089] For example, the fused embedding vector sequence of the fused text of the candidate object is semantically encoded through a semantic understanding model (BERT, Bidirectional Encoder Representation from Transformers), and the output of the last hidden layer (equivalent to the fully connected layer) of the BERT model is averaged as the semantic feature vector corresponding to the fused text. Here, the semantic feature vector of the fused text includes the semantic feature vector of each element, and the encoding result of the semantic understanding model for "[CLS]" is used as the semantic feature vector of the fused text, where "[CLS]" is used for classification scenarios, and this position can represent the semantics of the entire sentence.
[0090] The encoder of the BERT model contains multiple transformer encoding layers (Transformer encoder), which can encode the input word embedding vector to obtain the semantic feature vector of each fused text, and then call the classifier to perform classification processing on the semantic feature vector, so as to predict the matching degree or semantic similarity between the query text and the description text in the fused text, and output the prediction result. In some embodiments, the semantic understanding model can be a BERT model, or other models such as mBERT (Multi-lingual BERT) model, full binary quantization BERT model, long short-term memory network (LSTM, Long Short-Term Memory), etc. can be used; the BERT model is a pre-trained language model built on the Transformer. One of the characteristics of the BERT model is that all layers are trained in conjunction with the context. That is, when the BERT model processes a word, it can take into account the information of the words before and after the word, so as to obtain the semantic features of the context.
[0091] A classifier is a model used to perform classification tasks on the semantic features of fused text, such as the softmax model, or some machine learning classification methods, such as decision trees, support vector machines, and naive Bayes. The classifier can map the semantic feature vector to a value between 0 and 1, i.e., the classification result of each dimension, and round the dimension value to 0 or 1 as the classification result of a certain dimension.
[0092] Through the embodiments of the present application, the semantic feature vector corresponding to the candidate object fusion text is determined through the semantic understanding model to obtain the contextual relationship of the text and the semantic features (semantic representation) of the text to facilitate subsequent classification processing.
[0093] In step 104, the semantic feature vector corresponding to each candidate object is mapped into a multi-dimensional classification result.
[0094] refer to Figure 3D , Figure 3A The illustrated step 104 may be implemented through steps 1041 to 1042, which are described in detail below.
[0095] In step 1041, a first classifier is called to perform a first classification process based on the semantic feature vector to obtain a text matching result between the query text and the description text.
[0096] For example, the text matching result indicates whether the keywords of the query text and the description text are the same;
[0097] In some examples, the (CLS) semantic feature vector is input into the first classifier, and the first classifier determines whether the query text and the description text of the semantic feature vector match (that is, the description text includes the same characters as the query text), which can be expressed by the following formula:
[0098] ai=Classifyer1(CLS) (1)
[0099] Among them, ai indicates whether the query text matches the description text, and the main value of ai is 0 or 1. Classifyer1 represents the first classifier, and CLS represents the input semantic feature vector.
[0100] Here, when ai is 1, it means that the number of times the query text and the description text appear together in the query log is greater than the first co-occurrence threshold, and the query text and the description text match. When ai is 0, it means that the number of times the query text and the description text appear together in the query log is less than the first co-occurrence threshold, and the query text and the description text do not match. The co-occurrence threshold can be set according to the business scenario, and the size of the co-occurrence threshold is positively correlated with the data flow of the query log.
[0101] In step 1042, a second classifier is called to perform a second classification process based on the semantic feature vector to obtain a semantic matching result between the query text and the description text.
[0102] For example, the semantic matching result indicates whether the semantics of the query text and the description text are the same.
[0103] In some examples, the (CLS) semantic feature vector is input into the second classifier, and the second classifier determines whether the semantic features of the query text and the description text of the semantic feature vector match, which can be expressed by the following formula:
[0104] bi=Classifyer2(CLS) (2)
[0105] Among them, bi indicates whether the query text and the description text have the same semantics, bi mainly takes the value of 0 or 1, Classifyer2 represents the second classifier, and CLS represents the input semantic feature vector.
[0106] Here, when bi is 1, it means that the number of times the query text and the description text appear together in the query log is greater than the second co-occurrence threshold, and the query text and the description text have the same semantics. When bi is 0, it means that the number of times the query text and the description text appear together in the query log is less than the second co-occurrence threshold, and the query text and the description text have different semantics, where the second co-occurrence threshold is greater than the first co-occurrence threshold.
[0107] Here, reference Figure 1B , the semantic feature vector (CLS) can be sequentially input into the first classifier to obtain the semantic feature vector that matches the query text and the description text, and then the semantic feature vector that matches the query text and the description text is input into the second classifier to determine whether the query text and the description text have the same semantics. At this time, when bi is 1, it means that the query text and the description text match and have the same semantics. When bi is 0, it means that the query text and the description text match but have different semantics. For example, the query text is "Apple mobile phone" and the description text is "Apple can be purchased online through mobile phone". At this time, the query text and the description text match but have different semantics.
[0108] Through the embodiments of the present application, it is possible to determine whether the query text and the description text match and whether the semantics are the same through multiple co-occurrence thresholds. Through a two-layer classifier, the fitting of highly consistent query text and description text data is strengthened, thereby capturing the consistency of information.
[0109] In some embodiments, the information processing method is implemented by an information processing model, referring to Figure 1B The information processing model includes a semantic understanding model, a first classifier and a second classifier, wherein the semantic understanding model is used to determine the semantic feature vector of the fused text of the candidate object, and the first classifier and the second classifier are respectively used to determine the classification result of one dimension in the multi-dimensional classification result.
[0110] In step 105, at least one target object is screened out from the multiple candidate objects based on the multi-dimensional classification result corresponding to each candidate object.
[0111] For example, the multi-dimensional classification results include first dimension classification results and second dimension classification results. The first dimension classification results are used to characterize whether the keywords of the query text and the description text are the same, and the second dimension classification results are used to characterize whether the semantics of the query text and the description text are the same.
[0112] In some examples, the first dimension classification result and the second dimension classification result of each candidate object are obtained; the candidate object whose keywords represented by the first dimension classification result are the same as those of the description text and whose semantics are the same as those of the query text and the description text represented by the second dimension classification result is taken as the target object.
[0113] For example, in related technologies, data classification methods are often based only on keyword matching, which relies on a large amount of labeled data, but the cost of labeled data is too high and there are labeling errors. For example, if the query text is "apple", the description text can be "Apple Company" or "apple is a very nutritious fruit". At this time, it is impossible to accurately determine the labels or matching items of the query text and the description text, that is, labeling deviation is inevitable and will affect the classification results.
[0114] Through the embodiments of the present application, classification processing is performed based on classification results of multiple dimensions, which can reduce dependence on labeled data and improve classification accuracy according to word matching and whether semantic features are consistent.
[0115] In step 106, a query result is generated based on the description text corresponding to at least one target object.
[0116] For example, the description text of the target object describes in detail the semantic features of the query text in the current context or situation, and can generate query results that conform to the current context or the semantics of the query text according to the description text.
[0117] In some examples, the description text is "apple" and the target description text is "apple is a very nutritious fruit". At this time, calling the search engine to obtain search data related to "apple and fruit" can make the search more accurate.
[0118] Through the embodiments of the present application, query processing is performed based on the description text of the target object, which can avoid errors caused by different semantics of the same words in different scenarios and can prepare to retrieve relevant content of the target scenario.
[0119] In some embodiments, the information processing method is implemented through an information processing model, which includes a semantic understanding model, a first classifier and a second classifier, wherein the semantic understanding model is used to determine the semantic feature vector of the fused text of the candidate object, and the first classifier and the second classifier are respectively used to determine the classification result of one dimension in the multi-dimensional classification result.
[0120] refer to Figure 3E Before step 101, steps 201 to 207 may be performed to train the information processing model, which will be described in detail below.
[0121] In step 201, a sample query text and a sample description text are obtained, and the sample query text and the sample description text are spliced into a sample fusion text.
[0122] For example, the sample query text and the sample description text can be obtained from the query log, which is used to store the statistical data of the retrieval results. A start mark is inserted at the start position of the sample query text, and a separation mark is inserted at the end position of the sample query text; the sample query text with the start mark and separation mark inserted and the sample description text are spliced to obtain the sample fusion text.
[0123] The sample fusion text can be obtained by the following formula:
[0124] Input = [CLS] Query [SEP] Doc (3)
[0125] Among them, Input represents the input sample fusion text, "[CLS]" represents the start tag, Query represents the sample query text, "[SEP]" represents the separation tag, and Doc represents the sample description text.
[0126] In step 202, the label data of the sample fusion text is determined.
[0127] For example, the labeled data includes first dimension labeled data and second dimension labeled data.
[0128] refer to Figure 3F , Figure 3E The illustrated step 202 may be implemented through steps 2021 to 2023, which are described in detail below.
[0129] In step 2021, the number of co-occurrences of the same keywords in the sample query text and the sample description text is determined.
[0130] For example, the query log or database where the sample query text and the sample description text are located is obtained, and the number of co-occurrences of the keywords of the sample query text and the sample description text in the query log (or other database) is counted.
[0131] In some examples, the sample query text is "how to get concert tickets for someone", and the sample description text is "someone is holding a concert locally"; here, the keywords of the sample query text are "someone", "concert tickets"; the keywords of the sample description text are "someone", "local", and "concert"; the number of times the keywords of the two appear in the query log or database is counted, or the number of times the same keywords of the two appear in the query log or database is counted.
[0132] In step 2022, first dimension tag data is generated correspondingly to indicate whether the two keywords are the same, depending on whether the number of co-occurrences is greater than the first number threshold.
[0133] For example, the first number threshold can be set specifically according to the business scenario. The first number threshold is positively correlated with the size of the data in the query log or database. The first dimension marker data can be obtained by counting whether the number of co-occurrences of the query text and the description text in the query log is greater than the first number threshold. The first dimension marker data represents whether the keywords of the sample query text and the sample description text in the sample fusion text are the same (matched). Here, the keywords are the same or matched, which means that at least one keyword in the sample query text and the sample description text is the same; the keywords are the same or matched, or at least one keyword in the sample query text and the sample description text is a synonym, a near-synonym, or a professional name, etc., or different language representations of the same keyword (for example, Apple, Ping An Guo, and Apple can all be used as mutually matching keywords).
[0134] In step 2023, based on whether the number of co-occurrences is greater than the second numerical threshold, second dimension labeling data is generated to represent whether the semantics of the two are the same.
[0135] For example, the first number threshold is less than the second number threshold, the second number threshold can be set according to the business scenario, and the second number threshold is positively correlated with the size of the query log or the amount of data in the database. The second dimension marker data can be obtained by counting whether the number of co-occurrences of the query text and the description text in the query log is greater than the second number threshold; the second dimension marker data represents whether the semantics of the sample query text and the sample description text in the sample fusion text are the same.
[0136] Continue to refer Figure 3E , in step 203, the semantic understanding model is called to determine the semantic feature vector of the sample fusion text.
[0137] Here, the process of determining to call the semantic understanding model to determine the semantic feature vector of the sample fusion text is the same as step 103, and will not be repeated here.
[0138] In step 204, a first classifier is called to perform a first classification process based on the semantic feature vector of the sample fusion text to obtain a first dimension classification result.
[0139] For example, the first dimension classification result represents whether the keywords of the sample query text and the sample description text in the sample fusion text are the same.
[0140] Here, the encoder of the BERT model contains multiple transformer encoding layers (Transformer encoder), which can encode the input sample fusion text to obtain the semantic feature vector of each sample fusion text, and then call the first classifier to perform classification processing on the semantic feature vector, so as to predict the first dimension classification result of the semantic feature vector of the sample fusion text (whether the keywords of the sample query text and the sample description text are the same), and output the prediction result.
[0141] The first dimension classification result can be expressed by the following formula:
[0142] ai=Classifyer1(CLS)(4)
[0143] Among them, ai represents the classification result of the first dimension, that is, whether the sample query text matches the sample description text. The main value of ai is 0 or 1. Classifyer1 represents the first classifier, and CLS represents the input semantic feature vector.
[0144] In step 205, a second classifier is called to perform a second classification process based on the semantic feature vector of the sample fusion text to obtain a second dimension classification result.
[0145] For example, the second dimension classification result represents whether the semantics of the sample query text and the sample description text in the sample fusion text are the same.
[0146] Here, the second classifier is called to perform classification processing on the semantic feature vector, so as to predict the second dimension classification result of the semantic feature vector of the sample fusion text (whether the semantics of the sample query text and the sample description text are the same), and output the prediction result.
[0147] The second dimension classification result can be expressed by the following formula:
[0148] bi=Classifyer2(CLS) (5)
[0149] Among them, bi represents the classification result of the second dimension, that is, whether the semantics of the sample query text and the sample description text are the same, bi mainly takes the value of 0 or 1, Classifyer2 represents the second classifier, and CLS represents the input semantic feature vector.
[0150] In step 206, a first difference between the first dimension classification result and the first dimension labeled data, and a second difference between the second dimension classification result and the second dimension labeled data are determined.
[0151] For example, the first difference between the first dimension classification result and the first dimension labeled data can be expressed by the following formula:
[0152]
[0153] Among them, loss cls1 represents the first difference between the first dimension classification result and the first dimension labeled data, n represents the total amount of sample data (semantic feature vector of sample fusion text), y i Represents the first dimension labeled data; a i Indicates the classification result of the first dimension of i, y i with a i The value is 0 or 1. When the value is 1, it indicates the first dimension classification result of the sample query text and the sample description text (a i ) or the first dimension labeled data (y i ) is a keyword match. When the value is 0, it indicates the first dimension classification result of the sample query text and the sample description text (a i ) or the first dimension labeled data (y i ) means the keywords do not match.
[0154] Here, the information processing model uses the negative log-likelihood loss function. Probability is the possibility of an event occurring, while likelihood refers to the unknown parameters that affect the probability. In other words, probability is the result obtained when the unknown parameter is known; while likelihood is the parameter that is unknown, and the parameters of the probability model can be estimated based on the observed results.
[0155] The second difference between the second dimension classification result and the second dimension labeled data can be expressed by the following formula:
[0156]
[0157] Among them, loss cls2 represents the second difference between the second dimension classification result and the second dimension labeled data, n represents the total amount of sample data (semantic feature vector of sample fusion text), z i represents the i-th second dimension labeled data; b i represents the classification result of the second dimension of i, z i With b iThe value is 1 or 0. When the value is 1, it indicates the second dimension classification result of the sample query text and the sample description text (b i ) or the second dimension classification result (z i ) are semantically identical, and a value of 0 indicates the second dimension classification result of the sample query text and the sample description text (b i ) or the second dimension classification result (z i ) have different semantics.
[0158] In step 207, the first difference and the second difference are fused into a multi-dimensional classification loss value.
[0159] For example, determine the first product of the loss value of the first classifier and the first hyperparameter, the loss value of the second classifier and the second product of the second hyperparameter; and take the sum of the first product and the second product as the multidimensional classification loss value, that is, the information processing model loss value.
[0160] The first hyperparameter is used to characterize the weight of the loss value of the first classifier, and the second hyperparameter is used to characterize the weight of the loss value of the second classifier.
[0161] For example, the multi-dimensional classification loss value can be expressed by the following formula.
[0162] loss = h1*loss cls1 +h2*loss cls2 (8)
[0163] Among them, loss represents the multi-dimensional classification loss value, loss cls1 Indicates the first difference, loss cls2 represents the second difference, h1 and h2 are hyperparameters, which respectively characterize the integration ratio of the loss values of the first difference and the second difference.
[0164] In step 208, back propagation is performed based on the multi-dimensional classification loss value to update the parameters of the semantic understanding model, the first classifier, and the second classifier.
[0165] For example, the parameters of the semantic understanding model, the first classifier, and the second classifier are adjusted through the multi-dimensional classification loss value to reduce the subsequent first difference (loss value), the second difference (loss value), and the multi-dimensional classification loss value.
[0166] Through the embodiments of the present application, the sample query text and the sample description text are spliced into a sample fusion text, and encoding processing is performed based on the fusion text, which can improve the encoding consistency of the sample query text and the sample description text and enhance the interactivity between the texts; the number of text occurrence statistics is constructed based on the query log, reducing the dependence on data annotation; through the first classifier and the second classifier, the regular fitting of the high-click sample fusion data is strengthened to obtain the consistency of the query text and the description text.
[0167] The following is an explanation of an exemplary application of an embodiment of the present application in a practical application scenario.
[0168] The search system is the basis of information processing. For a search system, the retrieval process is completed by three steps, namely, query text parsing, description text understanding, and query text and description text information matching.
[0169] refer to Figure 4 , Figure 4 It is a simplified video retrieval flow chart provided in an embodiment of the present application; it includes the query text "braised pork in red sauce", the query text and the description text matching, and the description text list.
[0170] In the query text (Query) parsing process, the main purpose is to understand the user's needs and perform semantic understanding, such as semantic understanding through query intent recognition, entity extraction and other technologies. Query text parsing (QU, Query Understanding) is to perform structured analysis of query text from three levels: lexical, syntactic, and semantic. Here, query text exists in many forms. The most common is the query term entered into the search system during the retrieval process, or it can be a question in question-and-answer or reading comprehension, or it can be the chat input of the user in human-computer dialogue. Figure 4 , Figure 4 The query text in is the keyword "red braised pork".
[0171] In the process of understanding the descriptive text (Doc), the main purpose is to understand and parse the main information of the article. Here, the descriptive text is in various modes, such as video, product, picture, text, etc., and the understanding of the descriptive text can be completed by using reading comprehension, information extraction, text matching tags and other technologies. Figure 4 , Figure 4 That is, the understanding of descriptive text in the video retrieval scenario. Here, the descriptive text can be the introduction of the video, or the comments and subtitles in the video.
[0172] Information matching on the query text-description text (Query-Doc) side includes finding results that meet user needs through massive features such as user operations, user information, time information, the above query text parsing and description text understanding, etc. Figure 4, Figure 4 In the video retrieval scenario, the user enters the query text, that is, the keyword "braised pork in red sauce", and the retrieval engine matches the query text with the description text to obtain a list of videos related to braised pork in red sauce. Here, the description text is the title of the video.
[0173] The embodiment of the present application is based on an information processing model (including a BERT model, a first classifier, and a second classifier) to obtain a modeling framework for query text-description text matching. The information processing model can more effectively mine the implicit information of the query text and the description text, and perform effective semantic matching. The embodiment of the present application can not only effectively enhance the semantic matching effect on the query text / description text side, but also complete the construction of text labels based on click data, which can greatly reduce the dependence of the supervised training model on labeled data.
[0174] In the related technology, in the information search scenario, it is necessary to perform a large amount of manual matching feature mining based on the query text and the description text, and then build a query-content (Query-Doc) matching mechanism based on machine learning models such as the extreme gradient boosting (XGBoost, eXtreme Gradient Boosting) model.
[0175] For example, in the process of information search by search engines, the related technology first obtains the query text and the description text, and then performs feature mining on the query text and the description text; the mined features include "hit_word", "hit_pos", etc., which respectively represent the artificial features summarized from the query text and the description text mining; "hit_word" means the hit word mined in the query text or the description text, and "hit_pos" means the position of the hit word ("hit_word") in the description text or the query text; secondly, the hit word and the position of the hit word are used as the input of the decision tree model XGBoost model, and finally the matching result of the query text and the description text is obtained; the query text and the description text can be matched through binary classification, that is, it is determined whether the query text and the description text match.
[0176] In the related art, the mechanism of building a matching model based on the traditional machine learning model needs to mine a large amount of matching features of query texts and description texts based on manual experience for model input, and is more dependent on manual annotation of matching features. The embodiment of the present application is based on the database of the search engine, and counts the query texts and description texts in the query log. The labels of the data can be obtained according to the statistical method of the retrieval system, and different statistical methods can obtain different labels. For example, the number of clicks obtained from the statistical data can be used as the click-through rate label of the data, avoiding the data mining or data annotation process in the related art.
[0177] In the related technology, during the information search process of the search engine, semantic matching is performed based on the twin-tower model. The query text encoder of the twin-tower model is used to perform semantic encoding processing on the query text to obtain a semantic feature vector of the query text, and the vector is input into a matching classifier. The description text encoder of the twin-tower model is used to perform semantic encoding processing on the description text to obtain a semantic feature vector of the description text, and the vector is input into a matching classifier. The matching classifier performs classification processing based on the query text semantic feature vector and the description text semantic feature vector to determine whether the query text and the description text are semantically consistent, that is, to determine whether the vector outputs on both sides are consistent.
[0178] In the related art, the dual-tower model encodes the description text and the query text separately, so that the encoder misses the interactive fusion process of the query information and the description information, resulting in the weakening of the information interaction between the description text and the query text. The embodiment of the present application uses the same encoder to semantically encode multiple-side information (query text, description text), which can strengthen the information interaction between the two sides of the text and avoid semantic loss.
[0179] refer to Figure 5 , Figure 5 It is a schematic diagram of a video search scenario provided in an embodiment of the present application; the video search engine includes an input module, a query module, an information processing model, and a screening module; wherein the information processing model includes a fusion module, a semantic understanding model, a first classifier, and a second classifier.
[0180] refer to Figure 6 , Figure 6 This is a flow chart of information processing model training provided by the embodiment of the present application, which will be combined with Figure 6 The steps shown are explained.
[0181] In step 301, a query text input into a video search engine and a description text corresponding to the query text are obtained.
[0182] For example, the acquisition of query text and description text is not to directly obtain text data and annotate the data in the related art, but to obtain query text and description text from the query log of the real video search engine database. Here, the query text can be the title of the video, the author of the video, etc., and the description text can be video comments, video introduction, video tags, video classification, etc.; the query log is the statistical data in the video search engine database. For example, the statistical video click rate is similar video tag data, which can be used as the label of the query text and description text. This is obtained by query log statistics, and no human intervention or data annotation process is required. In the related art, the information search process will rely on a large amount of annotated data, which requires a lot of labor costs and has annotation errors; for example, the query text is "apple", and the description text is "Apple Company" and "Apple is a very nutritious fruit". It is necessary to combine the specific scene to judge the current context. Therefore, the annotation deviation caused by data annotation will cause mismatch in information processing results.
[0183] In step 302, the query text and the description text are concatenated to obtain a fused text, wherein the query text is used to retrieve the video and the description text is used to explain the video information.
[0184] In an embodiment of the present application, a semantic matching modeling method for query text-description text based on a deep model (i.e., the above-mentioned information processing model) is proposed; the entire process is completed by the information processing model in the video retrieval engine, and the information on both sides of the query text and the description text are uniformly input into a semantic understanding model, wherein the query text is used to retrieve the video, and the description text is used to explain the video information; however, a special processing is performed on the input, i.e., the query text and the description text are input as two linked sentences (the query text and the description text are information of two domains, and [SEP] is required as a separator, and the model can learn this explicit identifier), for example, "Query[SEP]Doc", wherein [SEP] is used as a special splicing symbol, and its main function is to splice the information on both sides, and the query text "Query" and the description text "Doc" are both input into the model at word granularity (word granularity is also called character granularity, which is segmented according to the smallest symbol of a certain language, such as English in letters). For example, the query text is the keyword "concert" entered by the user into the video search engine, and the description text is "concert of classic music" describing the video information, then the fused text can be "[CLS] Concert [SEP] Concert of classic music".
[0185] refer to Figure 1B , Figure 1B It is a schematic diagram of the information processing model provided in an embodiment of the present application; it includes a semantic understanding model, a first classifier, and a second classifier.
[0186] The information processing model as a whole performs two tasks: one is to determine whether the query text and the description text match, and the other is to determine whether the query text and the description text are semantically completely consistent. The embodiment of the present application can strengthen the regular fitting of high-click (click-through rate) query-description text pairs (fused text) data through the prediction of the above two tasks, that is, to learn the statistical laws of high-click query-description text pairs.
[0187] In step 303, the number of occurrences of the fused text in the video retrieval engine database is counted.
[0188] Here, counting the number of occurrences of the fused text refers to counting the number of occurrences of the query-description text pair (Query-Doc) in the video retrieval engine database or the video retrieval engine query log, or it may be the number of co-occurrences of the query text and the description text.
[0189] For example, a first number threshold and a second number threshold are set, wherein the first number threshold is smaller than the second number threshold; the first and second number thresholds are used to filter the number of occurrences of the fused text.
[0190] When the number of occurrences of the fused text is greater than the first threshold value (for example, 10 times), the query-description text pair (query text and description text) matches; when the number of occurrences of the fused text is greater than the second threshold value (for example, 15 times), the query-description text pair (query text and description text) matches and has semantic consistency; that is, the matching confidence of the query text and the description text is higher.
[0191] It can be represented by the following code:
[0192] {Query = 'Concert' The query text is Concert
[0193] Doc = "Concert of Classical Music" describes the text as a concert of classical music.
[0194] Label1=1 indicates that the number of times the query text and the description text co-occur is greater than the first threshold (e.g. 10 times).
[0195] Label2=0 indicates that the number of times the query text and the description text co-occur is less than the second threshold (e.g., 15 times).
[0196] }
[0197] In step 304, the semantic understanding model in the video search engine is called to encode the fused text to obtain a semantic feature vector of the fused text.
[0198] The encoding process can be expressed by the following formula:
[0199] Input=[CLS]Query[SEP]Doc (9)
[0200] Among them, Input represents the input fusion text, "[CLS]" represents the start tag, "Query" represents the query text, "[SEP]" represents the separation tag, and Doc represents the description text.
[0201] CLS,T0,T1...=BERT(Input) (10)
[0202] Among them, CLS represents the start tag, which can be used to represent the semantic feature vector of the fused text; T0 represents the first element of the fused text, T1 represents the second element of the fused text... BERT (Input) means inputting the fused text into the BERT model for encoding processing.
[0203] The specific process can be referred to step 103, which will not be described in detail here.
[0204] In step 305, the semantic feature vector of the fused text is input into the first classifier and the second classifier to obtain the first classification result and the second classification result.
[0205] For example, the first classifier of the information processing model in the video search engine is called to perform a first classification process on the semantic feature vector of the fused text to obtain a first classification result, which can be expressed by the following formula:
[0206] ai=Classifyer1(CLS) (11)
[0207] Among them, ai is the first classification result, indicating whether the query text matches the description text. The main value of ai is 0 or 1. Classifyer1 represents the first classifier, and CLS represents the input semantic feature vector.
[0208] Here, when ai is 1, it means that the number of times the query text and the description text appear together in the query log is greater than the first number threshold, and the query text and the description text match. When ai is 0, it means that the number of times the query text and the description text appear together in the query log is less than the first number threshold, and the query text and the description text do not match. The number threshold can be set according to the business scenario, and the size of the number threshold is positively correlated with the data flow of the query log.
[0209] For example, the second classifier of the information processing model in the video search engine is called to perform a second classification process on the semantic feature vector of the fused text to obtain a second classification result, which can be expressed by the following formula:
[0210] bi=Classifyer2(CLS) (12)
[0211] Among them, bi is the second classification result, indicating whether the query text and the description text have the same semantics. The main value of bi is 0 or 1. Classifyer2 represents the second classifier, and CLS represents the input semantic feature vector.
[0212] Here, when bi is 1, it means that the number of times the query text and the description text appear together in the query log is greater than the second number threshold, and the query text and the description text have the same semantics. When bi is 0, it means that the number of times the query text and the description text appear together in the query log is less than the second number threshold, and the query text and the description text have different semantics, and the second number threshold is greater than the first number threshold.
[0213] Here, reference Figure 1B , the semantic feature vector (CLS) can be sequentially input into the first classifier to obtain the semantic feature vector of the query text and the description text matching (ai=1), and then the semantic feature vector of the query text and the description text matching is input into the second classifier to determine whether the semantics of the query text and the description text are the same. At this time, when bi is 1, it means that the query text and the description text match and have the same semantics. When bi is 0, it means that the query text and the description text match but have different semantics. For example, the query text is "Apple mobile phone" and the description text is "Apple can be purchased online through mobile phone."
[0214] In step 306, the loss value of the information processing model in the video search engine is determined, and back propagation is performed to update the information processing model.
[0215] Determine a first difference between a first classification result and a first label data, wherein the first label data is used to characterize a true value of a first classification result of a query text and a description text obtained by counting query logs, and when the number of co-occurrences is greater than a first number threshold, the first label data takes a value of 1, and the description text matches the query text; when the number of co-occurrences is less than the first number threshold, the first label data takes a value of 0, and the description text does not match the query text; the first label data is the true value of the first classification result.
[0216] For example, the first difference between the first classification result and the first labeled data can be expressed by the following formula:
[0217]
[0218] Among them, loss cls1 represents the first difference between the first classification result and the first labeled data, n represents the total amount of query log data (semantic feature vector of fused text), y i represents the true value of the i-th first classification result obtained by counting the query logs; a i represents the i-th first classification result, yi with a i The value is 0 or 1. When the value is 1, it indicates the first classification result of the query text and the description text (a i ) or the true result (y i ) is a keyword match, and a value of 0 indicates the first classification result of the query text and the description text (a i ) or the true result (y i ) means the keywords do not match.
[0219] Determine a second difference between the second classification result and the second label data, wherein the second label data is used to characterize the predicted value of the second classification result of the query text and the description text obtained based on the statistical query log; when the number of co-occurrences is greater than the second numerical threshold, the second label data takes a value of 1, and the predicted query text and the description text have the same semantics; when the number of co-occurrences is less than the second numerical threshold, the second label data takes a value of 0, and the predicted query text and the description text have different semantics; the second label data is the predicted value of the second classification result.
[0220] The second difference between the second classification result and the second labeled data can be expressed by the following formula:
[0221]
[0222] Among them, loss cls2 represents the second difference between the second classification result and the second labeled data, n represents the total data volume of the query log data (the semantic feature vector of the fused text), z i represents the predicted value of the i-th second classification result; b i represents the i-th second classification result, z i With b i The value is 1 or 0. When the value is 1, it indicates the second classification result of the query text and the description text (b i ) or predicted results (z i ) are semantically identical, and a value of 0 indicates the second classification result of the query text and the description text (b i ) or predicted results (z i ) have different semantics.
[0223] Determine a first product of a loss value of a first classifier and a first hyperparameter, a second product of a loss value of a second classifier and a second hyperparameter; and use a sum of the first product and the second product as a loss value of the information processing model.
[0224] The first hyperparameter is used to characterize the weight of the loss value of the first classifier, and the second hyperparameter is used to characterize the weight of the loss value of the second classifier.
[0225] For example, the information processing model loss value can be expressed by the following formula.
[0226] loss = h1*loss cls1 +h2*loss cls2 (15)
[0227] Among them, loss represents the loss value of the information processing model, loss cls1 Indicates the first difference, loss cls2 represents the second difference, h1 and h2 are hyperparameters, which respectively characterize the integration ratio of the loss values of the first difference and the second difference.
[0228] Back propagation is performed based on the loss value of the information processing model in the video search engine to update the parameters of the semantic understanding model, the first classifier, and the second classifier.
[0229] refer to Figure 5 , Figure 5 It is a schematic diagram of a video search scenario provided in an embodiment of the present application; the video search engine includes an input module, a query module, an information processing model, and a screening module; wherein the information processing model includes a fusion module, a semantic understanding model, a first classifier, and a second classifier.
[0230] The information processing model is obtained after training through the above process. The information processing model can be applied to various search engines or information recommendation models, such as video search engines, music search engines, picture recommendation models, etc.; here, the information processing model is exemplarily shown to be applied to a video search engine in a video search scenario.
[0231] refer to Figure 5, a user enters the video keyword "classic concert" in the video search engine; the input module obtains the video keyword and filters it (for example, filtering irrelevant words, modal particles, etc.) to obtain the query text "concert"; the query text is input into the query module; the query module matches the description text "concert of classic music" corresponding to the query text based on the query log in the video search engine; and sends the query text and the description text to the information processing model; the fusion module in the information processing model inserts a start tag "[CLS]" at the beginning of the query text and a separation tag "[S EP]", and concatenate the query text and the description text to obtain a fused text "[CLS] Concert [SEP] Concert of Classical Music", where the fused text is output in the form of word granularity; the fused text is input into the semantic understanding model for semantic encoding of the fused text to obtain a semantic feature vector of the fused text; the semantic feature vector of the fused text is input into the first classifier and the second classifier respectively; in the first classifier, the semantic feature vector of the fused text is subjected to a first classification process to obtain a fused text in which the keywords (text) of the query text and the description text are matched, as the target object for text matching; in the second classifier, the semantic feature vector of the fused text is subjected to a second classification process to obtain a fused text in which the query text and the description text have the same semantics, as the target object with the same semantics; the screening module of the video search engine obtains the target object with text matching and the target object with the same semantics, and performs screening process to obtain the target object with text matching and the same semantics, and takes the description text of the target object, i.e. "Concert of Classical Music", as the query result, and returns a video list corresponding to the query result.
[0232] Through the embodiment of the present application, the keywords input into the video retrieval engine are used as query text, and the description text describing the video information is obtained, and the query text and the description text are spliced to obtain a fused text, so as to enhance the information interaction between the query text and the description text, which can better meet the user's video retrieval needs, and the fused text includes query text and description text features, which can avoid additional data annotation for the fused text; the semantic feature vector of the fused text is determined, and the semantic fusion of the query text and the description text is realized, and the semantic feature vector is mapped into a multi-dimensional classification result, which can classify the feature vector of the fused text from multiple angles (for example, whether the keywords are the same, whether the keyword semantics are the same); through the first classifier and the second classifier, the feature fitting of the fused text is strengthened, and finally a target object with text matching and the same semantics is obtained, and a query result corresponding to the description text of the target object is generated, and the query result satisfies the classification results of multiple dimensions, which can improve the retrieval efficiency and accuracy of the video search engine.
[0233] The following is a description of an exemplary structure of the information processing device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the information processing device 455 of the memory 440 may include:
[0234] The information acquisition module 4551 is used to obtain the query text and the description text of multiple candidate objects; the query text is spliced with the description text of each candidate object respectively to obtain the fused text corresponding to each candidate object; the feature classification module 4552 is used to determine the semantic feature vector of the fused text of each candidate object, and map the semantic feature vector corresponding to each candidate object into a multi-dimensional classification result; based on the multi-dimensional classification result corresponding to each candidate object, at least one target object is screened out from the multiple candidate objects; the result generation module 4553 is used to generate a query result based on the description text corresponding to at least one target object.
[0235] In some embodiments, the information acquisition module 4551 is also used to perform the following processing on the description text of each candidate object: insert a start mark at the starting position of the query text, insert a separation mark at the end position of the query text, and concatenate the query text with the start mark and separation mark inserted with the description text of the candidate object to obtain a fused text of the candidate object.
[0236] In some embodiments, the information acquisition module 4551 is also used to determine the word embedding vector sequence and position embedding vector sequence of the fused text of the candidate object, wherein the word embedding vector sequence includes the word embedding vector of each element in the fused text of the candidate object, and the position embedding vector sequence includes the position embedding vector of each element in the fused text of the candidate object; the word embedding vector sequence and the position embedding vector sequence are fused to obtain the fused embedding vector sequence of the fused text of the candidate object; based on the fused embedding vector sequence of the fused text of the candidate object, the semantic understanding model is called to perform semantic encoding processing to obtain the semantic feature vector of the fused text of the candidate object.
[0237] In some embodiments, the feature classification module 4552 is also used to perform the following processing on the semantic feature vector corresponding to each candidate object: call the first classifier to perform a first classification processing based on the semantic feature vector to obtain a text matching result between the query text and the description text, wherein the text matching result represents whether the keywords of the query text and the description text are the same; call the second classifier to perform a second classification processing based on the semantic feature vector to obtain a semantic matching result between the query text and the description text, wherein the semantic matching result represents whether the semantics of the query text and the description text are the same.
[0238] In some embodiments, the result generation module 4553 is also used to obtain a sample query text and a sample description text, splice the sample query text and the sample description text into a sample fusion text, and determine the tag data of the sample fusion text, wherein the tag data includes first dimension tag data and second dimension tag data; call the semantic understanding model to determine the semantic feature vector of the sample fusion text; call the first classifier based on the semantic feature vector of the sample fusion text to perform a first classification process to obtain a first dimension classification result, wherein the first dimension classification result represents whether the keywords of the sample query text and the sample description text in the sample fusion text are the same; call the second classifier based on the semantic feature vector of the sample fusion text to perform a second classification process to obtain a second dimension classification result, wherein the second dimension classification result represents whether the semantics of the sample query text and the sample description text in the sample fusion text are the same; determine a first difference between the first dimension classification result and the first dimension tag data, and a second difference between the second dimension classification result and the second dimension tag data; fuse the first difference and the second difference into a multi-dimensional classification loss value; and perform back propagation based on the multi-dimensional classification loss value to update the parameters of the semantic understanding model, the first classifier, and the second classifier.
[0239] In some embodiments, the result generation module 4553 is also used to determine the first product of the loss value of the first classifier and the first hyperparameter, the loss value of the second classifier and the second product of the second hyperparameter; the sum of the first product and the second product is used as the multi-dimensional classification loss value, wherein the first hyperparameter is used to characterize the weight of the loss value of the first classifier, and the second hyperparameter is used to characterize the weight of the loss value of the second classifier.
[0240] In some embodiments, the feature classification module 4552 is also used to determine the number of co-occurrences of the same keywords in the sample query text and the sample description text; based on whether the number of co-occurrences is greater than a first number threshold, corresponding first dimension labeling data representing whether the keywords of the two are the same is generated; based on whether the number of co-occurrences is greater than a second number threshold, corresponding second dimension labeling data representing whether the semantics of the two are the same is generated, wherein the first number threshold is less than the second number threshold.
[0241] In some embodiments, the result generation module 4553 is also used to obtain the first dimension classification results and the second dimension classification results of each candidate object; and take the candidate objects that meet the following conditions as target objects: the first dimension classification results represent that the keywords of the query text and the description text are the same, and the second dimension classification results represent that the query text and the description text have the same semantics.
[0242] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the information processing method described in the embodiment of the present application.
[0243] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the information processing method provided by the present application embodiment, for example, FIG. 3A to FIG. 3F The information processing method shown.
[0244] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0245] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0246] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0247] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0248] In summary, through the embodiments of the present application, the keywords input into the search engine are used as query texts, and the description texts describing the object information are obtained, and the query texts and the description texts are concatenated to obtain fused texts, so as to enhance the information interaction between the query texts and the description texts, which can better meet the user's search needs, and the fused texts include query texts and description text features, which can avoid additional data annotation for the fused texts; the semantic feature vectors of the fused texts are determined, and the semantic fusion of the query texts and the description texts is realized, and the semantic feature vectors are mapped into multi-dimensional classification results, which can classify the feature vectors of the fused texts from multiple angles (for example, whether the keywords are the same, whether the keyword semantics are the same); through the first classifier and the second classifier, the feature fitting of the fused texts is strengthened, and finally a target object with text matching and the same semantics is obtained, and a query result corresponding to the description text of the target object is generated, and the query result satisfies the classification results of multiple dimensions, which can improve the search efficiency and accuracy.
[0249] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. An information processing method, It is characterized in that The method comprises: Obtaining a query text and description texts of multiple candidate objects; The query text is concatenated with the description text of each candidate object to obtain a fused text corresponding to each candidate object; Determine the semantic feature vector of the fused text of each candidate object, and map the semantic feature vector corresponding to each candidate object into a multi-dimensional classification result; Based on the multi-dimensional classification result corresponding to each of the candidate objects, screening out at least one target object from the multiple candidate objects; A query result is generated based on the description text corresponding to the at least one target object.
2. The method according to claim 1, It is characterized in that The step of concatenating the query text with the description text of each candidate object to obtain a fused text corresponding to each candidate object includes: The following processing is performed on the description text of each candidate object: A start mark is inserted at the start position of the query text, a separation mark is inserted at the end position of the query text, and the query text with the start mark and the separation mark inserted is concatenated with the description text of the candidate object to obtain a fused text of the candidate object.
3. The method according to claim 1, It is characterized in that The step of determining the semantic feature vector of the fused text of each candidate object comprises: Determine a word embedding vector sequence and a position embedding vector sequence of the fused text of the candidate object, wherein the word embedding vector sequence includes a word embedding vector of each element in the fused text of the candidate object, and the position embedding vector sequence includes a position embedding vector of each element in the fused text of the candidate object; Fusing the word embedding vector sequence and the position embedding vector sequence to obtain a fused embedding vector sequence of the fused text of the candidate object; Based on the fused embedding vector sequence of the fused text of the candidate object, a semantic understanding model is called to perform semantic encoding processing to obtain a semantic feature vector of the fused text of the candidate object.
4. The method according to claim 1, It is characterized in that Mapping the semantic feature vector corresponding to each candidate object into a multi-dimensional classification result includes: The following processing is performed on the semantic feature vector corresponding to each candidate object: Calling a first classifier to perform a first classification process based on the semantic feature vector to obtain a text matching result between the query text and the description text, wherein the text matching result indicates whether the keywords of the query text and the description text are the same; A second classifier is called to perform a second classification process based on the semantic feature vector to obtain a semantic matching result between the query text and the description text, wherein the semantic matching result indicates whether the semantics of the query text and the description text are the same.
5. The method according to claim 1, It is characterized in that The information processing method is implemented through an information processing model, which includes a semantic understanding model, a first classifier and a second classifier, wherein the semantic understanding model is used to determine the semantic feature vector of the fused text of the candidate object, and the first classifier and the second classifier are respectively used to determine the classification result of one dimension in the multi-dimensional classification result.
6. The method according to claim 5, It is characterized in that The method further comprises: Acquire a sample query text and a sample description text, splice the sample query text and the sample description text into a sample fusion text, and determine tag data of the sample fusion text, wherein the tag data includes first dimension tag data and second dimension tag data; Calling the semantic understanding model to determine the semantic feature vector of the sample fusion text; Based on the semantic feature vector of the sample fusion text, the first classifier is called to perform a first classification process to obtain a first dimension classification result, wherein the first dimension classification result represents whether the keywords of the sample query text and the sample description text in the sample fusion text are the same; Based on the semantic feature vector of the sample fusion text, the second classifier is called to perform a second classification process to obtain a second dimension classification result, wherein the second dimension classification result represents whether the semantics of the sample query text and the sample description text in the sample fusion text are the same; Determine a first difference between the first dimension classification result and the first dimension labeled data, and a second difference between the second dimension classification result and the second dimension labeled data; fusing the first difference and the second difference into a multi-dimensional classification loss value; Back propagation is performed based on the multi-dimensional classification loss value to update the parameters of the semantic understanding model, the first classifier, and the second classifier.
7. The method according to claim 6, It is characterized in that The fusing the first difference and the second difference into a multi-dimensional classification loss value includes: Determine a first product of a loss value of the first classifier and a first hyperparameter, and a second product of a loss value of the second classifier and a second hyperparameter; The sum of the first product and the second product is used as a multi-dimensional classification loss value, wherein the first hyperparameter is used to characterize the weight of the loss value of the first classifier, and the second hyperparameter is used to characterize the weight of the loss value of the second classifier.
8. The method according to claim 6, It is characterized in that The determining of the tag data of the sample fusion text includes: Determining the number of co-occurrences of the same keywords in the sample query text and the sample description text; According to whether the number of co-occurrences is greater than a first number threshold, correspondingly generating first dimension labeling data representing whether the two keywords are the same; According to whether the co-occurrence times are greater than a second number threshold, second dimension labeling data is generated correspondingly to represent whether the semantics of the two are the same, wherein the first number threshold is less than the second number threshold.
9. The method according to any one of claims 1 to 8, It is characterized in that The multi-dimensional classification result includes a first dimension classification result and a second dimension classification result, wherein the first dimension classification result is used to characterize whether the keywords of the query text and the description text are the same, and the second dimension classification result is used to characterize whether the semantics of the query text and the description text are the same; The step of selecting at least one target object from the plurality of candidate objects based on the multi-dimensional classification result corresponding to each of the candidate objects comprises: Obtaining the first dimension classification result and the second dimension classification result of each candidate object; The candidate object that meets the following conditions is taken as the target object: the first dimension classification result indicates that the query text and the description text have the same keywords, and the second dimension classification result indicates that the query text and the description text have the same semantics.
10. An information processing device, It is characterized in that The device comprises: The information acquisition module is used to acquire a query text and description texts of multiple candidate objects; the query text is respectively concatenated with the description text of each candidate object to obtain a fused text corresponding to each candidate object; A feature classification module, used to determine the semantic feature vector of the fused text of each candidate object, map the semantic feature vector corresponding to each candidate object into a multi-dimensional classification result; based on the multi-dimensional classification result corresponding to each candidate object, screen out at least one target object from the multiple candidate objects; A result generation module is used to generate a query result based on the description text corresponding to the at least one target object.
11. An electronic device, It is characterized in that The electronic device comprises: Memory for storing computer executable instructions or computer programs; A processor, configured to implement the information processing method according to any one of claims 1 to 9 when executing the computer executable instructions or computer programs stored in the memory.
12. A computer-readable storage medium storing computer-executable instructions or a computer program, It is characterized in that When the computer executable instructions or computer program are executed by a processor, the information processing method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising computer executable instructions or a computer program, It is characterized in that When the computer executable instructions or computer program are executed by a processor, the information processing method according to any one of claims 1 to 9 is implemented.
