WO2023045187A1 - Procédé et appareil de recherche sémantique basés sur un réseau neuronal, dispositif et support de stockage - Google Patents

Procédé et appareil de recherche sémantique basés sur un réseau neuronal, dispositif et support de stockage Download PDF

Info

Publication number
WO2023045187A1
WO2023045187A1 PCT/CN2022/071219 CN2022071219W WO2023045187A1 WO 2023045187 A1 WO2023045187 A1 WO 2023045187A1 CN 2022071219 W CN2022071219 W CN 2022071219W WO 2023045187 A1 WO2023045187 A1 WO 2023045187A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
entity
vector
corpus
neural network
Prior art date
Application number
PCT/CN2022/071219
Other languages
English (en)
Chinese (zh)
Inventor
刘波
王彦
马骏
王少军
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2023045187A1 publication Critical patent/WO2023045187A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3347Query execution using vector based model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present application relates to the technical field of artificial intelligence, in particular to a neural network-based semantic search method, device, equipment and storage medium.
  • Semantic search as a branch of information search and natural language processing, has received more and more attention.
  • the semantic search engine can search out sentences with the same or similar semantics to the sentences entered by users from hundreds of millions of texts.
  • As the basis for computer semantic understanding and human-computer interaction it has been widely used in intelligent customer service, intelligent Question answering, recommendation system and other fields, and play an important role in these fields.
  • TF-IDF Term Frequency–Inverse Document Frequency
  • the existing semantic search engine system stores hundreds of millions of texts in the search database, resulting in a large space for data storage in the search database and low data transmission efficiency, which cannot cope with semantic search in big data, multi-service and multi-task scenarios.
  • existing semantic search engines cannot achieve distributed computing, resulting in low efficiency of search algorithms and low efficiency of data transmission. All in all, the existing semantic search engines have the problems of slow search speed, low search accuracy, narrow application scenarios, and inability to return search results in real time.
  • the embodiment of the present application provides a neural network-based semantic search method, device, device and storage medium, which can realize precise understanding of text semantics and distributed search, and improve search Speed and accuracy of searches.
  • the embodiment of the present application provides a semantic search method based on a neural network, including:
  • Obtaining a corpus wherein the corpus includes at least one training corpus, and each training corpus in the at least one training corpus corresponds to the same business type;
  • Input at least one training corpus into a preset combined neural network for training to obtain a semantic extraction model, wherein the combined neural network is composed of at least two sub-neural networks, and the at least two sub-neural networks include at least one model generation neural network and at least a model optimization neural network, the model optimization neural network is used to optimize the model generated by the model generation neural network;
  • each training corpus in the at least one training corpus into the semantic extraction model to obtain at least one corpus semantic vector, wherein at least one corpus semantic vector corresponds to at least one training corpus;
  • Entity generation is performed according to each training corpus in at least one training corpus, at least one entity is obtained, and at least one entity and at least one corpus semantic vector are stored in a distributed search server, wherein at least one entity and at least one training corpus—— correspond;
  • the retrieval request includes the text to be retrieved
  • the implementation of the present application provides a neural network-based semantic search device, including:
  • a collection module configured to obtain a corpus, wherein the corpus includes at least one training corpus, and each training corpus in the at least one training corpus corresponds to the same business type;
  • the training module is used to input at least one training corpus into a preset combined neural network for training to obtain a semantic extraction model, wherein the combined neural network is composed of at least two sub-neural networks, and at least two sub-neural networks include at least one model generating a neural network and at least one model optimizing neural network, the model optimizing neural network is used to optimize the model generated by the model generating neural network;
  • a processing module configured to input each training corpus in at least one training corpus into the semantic extraction model to obtain at least one corpus semantic vector, wherein at least one corpus semantic vector corresponds to at least one training corpus;
  • the entity generation module is used to generate entities according to each training corpus in at least one training corpus, obtain at least one entity, and store at least one entity and at least one corpus semantic vector in the distributed search server, wherein at least one entity and At least one training corpus has one-to-one correspondence;
  • a receiving module configured to obtain a retrieval request, where the retrieval request includes text to be retrieved;
  • the retrieval module is used to input the text to be retrieved into the semantic extraction model to obtain the retrieval semantic vector, and transfer the retrieval semantic vector to the distributed search server for semantic retrieval to obtain the retrieval result.
  • an embodiment of the present application provides an electronic device, including: a processor, the processor is connected to a memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs as described in A method in one aspect, the method comprising:
  • the corpus includes at least one training corpus, and each training corpus in the at least one training corpus corresponds to the same business type;
  • the at least one training corpus is input into a preset combined neural network for training to obtain a semantic extraction model, wherein the combined neural network is composed of at least two sub-neural networks, and the at least two sub-neural networks include at least one a model-generating neural network and at least one model-optimizing neural network for optimizing a model generated by the model-generating neural network;
  • each training corpus in the at least one training corpus into the semantic extraction model to obtain at least one corpus semantic vector, wherein the at least one corpus semantic vector corresponds to the at least one training corpus;
  • Entity generation is performed according to each training corpus in the at least one training corpus to obtain at least one entity, and the at least one entity and the at least one corpus semantic vector are stored in a distributed search server, wherein the at least one There is a one-to-one correspondence between the entity and the at least one training corpus;
  • the search request includes the text to be searched
  • the search semantic vector is transmitted to the distributed search server to perform semantic search, and search results are obtained.
  • an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program causes the computer to execute the method according to the first aspect, the method comprising:
  • the corpus includes at least one training corpus, and each training corpus in the at least one training corpus corresponds to the same business type;
  • the at least one training corpus is input into a preset combined neural network for training to obtain a semantic extraction model, wherein the combined neural network is composed of at least two sub-neural networks, and the at least two sub-neural networks include at least one a model-generating neural network and at least one model-optimizing neural network for optimizing a model generated by the model-generating neural network;
  • each training corpus in the at least one training corpus into the semantic extraction model to obtain at least one corpus semantic vector, wherein the at least one corpus semantic vector corresponds to the at least one training corpus;
  • Entity generation is performed according to each training corpus in the at least one training corpus to obtain at least one entity, and the at least one entity and the at least one corpus semantic vector are stored in a distributed search server, wherein the at least one There is a one-to-one correspondence between the entity and the at least one training corpus;
  • the search request includes the text to be searched
  • the search semantic vector is transmitted to the distributed search server to perform semantic search, and search results are obtained.
  • the implementation of the embodiments of the present application improves the accuracy of the subsequent semantic search, improves the search speed, and broadens the application scenarios.
  • FIG. 1 is a schematic diagram of the hardware structure of a neural network-based semantic search device provided in an embodiment of the present application
  • FIG. 2 is a schematic flow diagram of a neural network-based semantic search method provided in an embodiment of the present application
  • FIG. 3 is a schematic flow diagram of a method for inputting at least one training corpus into a preset combined neural network for training to obtain a semantic extraction model provided by an embodiment of the present application;
  • FIG. 4 is an overall architecture diagram of a second model provided in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of the architecture of a second model fusion convolutional neural network provided in an embodiment of the present application
  • FIG. 6 is a schematic flowchart of a method for whitening a third model to obtain a semantic extraction model provided in an embodiment of the present application
  • FIG. 7 is a schematic flowchart of a method for generating entities according to each training corpus in at least one training corpus to obtain at least one entity provided by an embodiment of the present application;
  • FIG. 8 is a schematic diagram of a data structure composition of a different entity provided in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a storage required format provided by the embodiment of the present application.
  • Fig. 10 is a schematic structural diagram of a semantic search engine combining Elasticsearch, gRPC, HNSW and tensorflow serving provided by the embodiment of the present application;
  • FIG. 11 is an overall structural diagram of a semantic search engine provided in an embodiment of the present application.
  • FIG. 12 is a block diagram of functional modules of a neural network-based semantic search device provided in an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 1 is a schematic diagram of a hardware structure of a neural network-based semantic search device provided in an embodiment of the present application.
  • the neural network-based semantic search device 100 includes at least one processor 101 , a communication line 102 , a memory 103 and at least one communication interface 104 .
  • the processor 101 may be a general-purpose central processing unit (central processing unit, CPU), a microprocessor, a specific application integrated circuit (application-specific integrated circuit, ASIC), or one or more An integrated circuit that controls the program execution of the program of this application.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • Communication line 102 which may include a path, transmits information between the aforementioned components.
  • the communication interface 104 may be any device such as a transceiver (such as an antenna) for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (wireless local area networks, WLAN) and the like.
  • a transceiver such as an antenna
  • WLAN wireless local area networks
  • Memory 103 may be read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types that can store information and instructions
  • Type of dynamic storage device also can be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), read-only disc (compact disc read-only memory, CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be used by Any other medium accessed by a computer, but not limited to.
  • the memory 103 may exist independently and be connected to the processor 101 through the communication line 102 .
  • the memory 103 can also be integrated with the processor 101 .
  • the memory 103 provided in this embodiment of the present application may generally be non-volatile.
  • the memory 103 is used to store computer-executed instructions for implementing the solutions of the present application, and the execution is controlled by the processor 101 .
  • the processor 101 is used to execute the computer-executed instructions stored in the memory 103, so as to implement the methods provided in the following embodiments of the present application.
  • computer-executed instructions may also be referred to as application code, which is not specifically limited in the present application.
  • the processor 101 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 1 .
  • the neural network-based semantic search apparatus 100 may include multiple processors, such as processor 101 and processor 107 in FIG. 1 .
  • processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the neural network-based semantic search device 100 may be an independent server, or it may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, Cloud servers for basic cloud computing services such as cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
  • the neural network-based semantic search apparatus 100 may further include an output device 105 and an input device 106 .
  • Output device 105 is in communication with processor 101 and may display information in a variety of ways.
  • the output device 105 may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a cathode ray tube (cathode ray tube, CRT) display device, or a projector (projector) wait.
  • the input device 106 communicates with the processor 101 and can receive user input in various ways.
  • the input device 106 may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
  • the above-mentioned neural network-based semantic search apparatus 100 may be a general-purpose device or a special-purpose device.
  • the embodiment of the present application does not limit the type of the neural network-based semantic search device 100 .
  • AI artificial intelligence
  • 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.
  • Artificial intelligence basic technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
  • FIG. 2 is a schematic flowchart of a neural network-based semantic search method provided in an embodiment of the present application.
  • the neural network-based semantic search method includes the following steps:
  • the corpus may include at least one training corpus, and each training corpus in the at least one training corpus corresponds to the same service type.
  • the corpus corresponding to the same business can be stored in the same corpus, so that a dedicated search library for a certain business can be generated to improve the efficiency of subsequent semantic searches.
  • the combined neural network can be composed of at least two sub-neural networks, and the at least two sub-neural networks include at least one model generation neural network and at least one model optimization neural network, and the model optimization neural network is used to optimize the model.
  • the at least two sub-neural networks may include: a teacher neural network (teacher network), a student neural network (student network), and a convolutional neural network (Convolutional Neural Networks, CNN).
  • the present application provides a method of inputting at least one training corpus into a preset combined neural network for training to obtain a semantic extraction model, as shown in Figure 3, the method includes:
  • the first model can be obtained by pre-training the teacher's neural network on the masked language model task using the corpus.
  • the structure of the student neural network is basically the same as that of the teacher neural network (BERT), the difference is that the student neural network reduces the number of layers of BERT to half of the original one. And each layer of the student's neural network is initialized, and the initialization of each layer is the parameter of the teacher's neural network. And the distilled first model, the second model, made the encoding speed of the neural network 60% faster. As shown in Fig. 4, Fig. 4 shows an overall architecture diagram of the second model.
  • the third model can be understood as the second model after parameters are fine-tuned.
  • the output vector of the second model may be input into the one-dimensional convolution layer of the convolutional neural network to obtain at least one first vector. Then, perform maximum pooling on each first vector in the at least one first vector, and concatenate each first vector after maximum pooling to obtain a second vector. Then input the second vector into the fully connected layer of the convolutional neural network to obtain the first matrix. Finally, the first matrix is classified by softmax, and the second model is optimized and adjusted according to the classification result to obtain the third model.
  • FIG. 5 shows a schematic architecture diagram of a second model fusion convolutional neural network.
  • the output of the second model (DistilBERT) is input into the one-dimensional convolutional layer, and then the vector obtained after convolution is subjected to max-pooling and concatenate splicing, and finally passes through a fully connected layer (full connected layer), outputs a matrix of shape (batch_size, num_classes).
  • a regression model such as softmax, is used for classification.
  • the business data is used to fine-tune the parameters of DistilBERT on the classification task, which further improves the accuracy of semantic coding.
  • this embodiment provides a method for whitening the third model, as shown in FIG. 6 , the method includes:
  • the first parameter u can be expressed by formula 1:
  • N is the number of elements in the output vector xi of the third model.
  • 603 Perform singular value decomposition on the covariance matrix A of the output vector of the third model to obtain a first characteristic matrix B and a second characteristic matrix C.
  • the covariance matrix A, the first characteristic matrix B and the second characteristic matrix C of the output vector of the third model satisfy the formula 2:
  • BT represents the transposition matrix of the first feature matrix B
  • the second parameter W, the first characteristic matrix B and the second characteristic matrix C satisfy the formula 3:
  • the whitening vector It is the whitening result of the third model.
  • the optimized encoding method of DistilBERT, CNN, and Whitening is adopted to further accelerate the semantic encoding speed and semantic understanding accuracy of the neural network, thereby improving the efficiency and accuracy of the subsequent similarity calculation tasks.
  • dimensionality reduction processing may also be performed on the whitened third model to obtain a semantic extraction model, thereby further improving the semantic encoding speed and semantic understanding accuracy of the neural network.
  • the at least one corpus semantic vector is in one-to-one correspondence with at least one training corpus.
  • the distributed search server may be an Elasticsearch search server, and the at least one entity corresponds to at least one training corpus.
  • this embodiment provides a method for generating entities according to each training corpus in at least one training corpus to obtain at least one entity, as shown in FIG. 7 , the method includes:
  • FIG. 8 shows a schematic diagram of data structure composition of different entities included in this embodiment.
  • the entities provided in this embodiment may include: a text search entity, an intent recognition entity, a question-and-answer entity, a similar sentence query entity, an emotion recognition entity (customer/agent) and a text quality inspection entity (customer/agent).
  • An entity can select different data to store in the entity according to the characteristics of its corresponding business type. For example, for a text search entity, since the text search task focuses on search results, the entity may include: text, search results, topics corresponding to search results, and categories corresponding to search results.
  • the entity model of the emotion recognition entity is taken as an example, and its data structure is: character, text, emotion corresponding to the text, and the degree of the emotion. Based on this, first determine the role information corresponding to each training corpus, and then perform emotion recognition and emotion degree determination on the training corpus.
  • emotion recognition entity following the example of the above-mentioned emotion recognition entity, role information, training corpus, emotion recognition results and degree determination results can be packaged to form an emotion recognition entity.
  • the index name corresponding to the at least one entity can also be determined, so as to determine a storage in the Elasticsearch search server according to the index name location, or use the index name to mark the location where the at least one entity and at least one corpus semantic vector are stored in the Elasticsearch search server, so that in subsequent use, the at least one entity and at least one entity can be used by the index name
  • a retrieval library formed by corpus semantic vectors is used for fast positioning.
  • At least one generated entity can also be serialized, for example, each entity is serialized through the structural data serialization tool protobuf, and the data, the serialized entity and the entity sequence are associated Entity pairs composed of corpus semantic vectors are converted to the format required for storage and stored in the Elasticsearch search server.
  • the format required for storage is shown in FIG. 9 . Since serialized entities can be compressed and reduce storage space, a faster transmission rate can be obtained, thereby supporting larger-scale storage searches and improving security.
  • the retrieval semantic vector can be transmitted to the Elasticsearch search server through the gRPC service, and then the retrieval semantic vector can be semantically retrieved through a vector index algorithm, such as the HNSW (Hierarchical Navigable Small World) algorithm, to obtain a sequence of retrieval results.
  • the retrieval result sequence may include at least one candidate result, and the at least one candidate result is arranged in descending order of the similarity between each candidate result and the retrieval semantic vector in the retrieval result sequence.
  • the retrieval quantity n is determined, so that the first n candidate results in the retrieval result sequence are used as the retrieval results.
  • the semantic search method provided in this embodiment combines Elasticsearch, gRPC, HNSW, etc. to realize distributed computing of big data. Among them, combined with the HNSW algorithm, accurate search at the millisecond level on tens of millions of data can be realized.
  • the semantic search method in this embodiment can also be combined with tensorflow serving to realize simultaneous online and hot update of multiple neural network encoders, thereby realizing Multi-service and multi-task support, and increase the transmission rate through gRPC services to provide efficient services.
  • Figure 10 shows a schematic structural diagram of a semantic search engine that combines Elasticsearch, gRPC, HNSW and tensorflow serving. Based on the semantic search engine in Figure 10, the search method is as follows:
  • the user sends a search request, which may include the text to be retrieved, the index name, and the number n of similar texts to be retrieved.
  • encode the text to be retrieved through the neural network encoder loaded by tensorflow serving to obtain the text vector.
  • retrieve through the HNSW algorithm return n texts and entities similar to the text, and the similarity scores, and sort them according to the size of the similarity scores.
  • Elasticsearch is an efficient distributed architecture
  • the HNSW algorithm is an efficient and accurate graph search algorithm.
  • gRPC service is a fast and secure service framework. Compared with http service, gRPC service has faster transmission speed. Based on this, the Elasticsearch distributed architecture backs up data to each node in the cluster through distributed computing, and combined with the HNSW algorithm, performs multi-machine joint retrieval to give full play to the big data search capability, and finally interacts the search results through the gRPC service , which can realize accurate search in milliseconds on tens of millions of data.
  • this embodiment also proposes a semantic search engine, as shown in FIG. 11 , which shows an overall structural diagram of the semantic search engine.
  • the left part of Figure 11 is the corpus encoding and entity generation storage part. Through this part, each business user can encode the corpus corresponding to his own business through the neural network, and the corresponding entity is generated by the entity generator, and the generated entity and Other data are sent to Elasticsearch for storage and corresponding indexes are established.
  • the right part of Figure 11 is the real-time text search part, where the user inputs the text to be searched, the number of similar texts to be searched and the index name.
  • the semantic search engine provided by this embodiment realizes real-time semantic search of multi-task and multi-service with high precision and high accuracy, and supports distributed big data.
  • the combined neural network is trained and optimized through the corpus, and a neural network-based coding model is generated to extract the semantics of the text, thereby realizing the semantic search of the text. Accurate understanding, and further improve the accuracy of subsequent semantic search.
  • different entities can support different tasks, and can extend support for newly added tasks, enabling multi-task and multi-service support for a single-semantic search engine.
  • the serialized entity can be compressed to reduce storage space and obtain faster transmission rate, thus supporting larger-scale storage search and improving security.
  • semantic search is carried out through the Elasticsearch search server, which realizes distributed computing of big data, further improves the search speed, and broadens the application scenarios.
  • FIG. 12 is a block diagram of functional modules of a neural network-based semantic search device provided in an embodiment of the present application.
  • the neural network-based semantic search device 1200 includes:
  • the acquisition module 1201 is configured to acquire a corpus, wherein the corpus includes at least one training corpus, and each of the at least one training corpus corresponds to the same business type;
  • the training module 1202 is used to input at least one training corpus into a preset combined neural network for training to obtain a semantic extraction model, wherein the combined neural network is composed of at least two sub-neural networks, and at least one of the at least two sub-neural networks includes A model generation neural network and at least one model optimization neural network, the model optimization neural network is used to optimize the model generated by the model generation neural network;
  • the processing module 1203 is configured to input each training corpus in the at least one training corpus into the semantic extraction model to obtain at least one corpus semantic vector, wherein at least one corpus semantic vector corresponds to at least one training corpus;
  • the entity generation module 1204 is used to generate entities according to each training corpus in at least one training corpus, obtain at least one entity, and store at least one entity and at least one corpus semantic vector in the distributed search server, wherein at least one entity One-to-one correspondence with at least one training corpus;
  • a receiving module 1205, configured to obtain a retrieval request, where the retrieval request includes the text to be retrieved;
  • the retrieval module 1206 is used to input the text to be retrieved into the semantic extraction model to obtain the retrieval semantic vector, and transfer the retrieval semantic vector to the distributed search server for semantic retrieval to obtain the retrieval result.
  • At least two sub-neural networks include: a teacher neural network, a student neural network, and a convolutional neural network. Based on this, at least one training corpus is input into a preset combined neural network for training to obtain semantic
  • the training module 1202 is specifically used for:
  • the training module 1202 is specifically used for:
  • the first matrix is classified by the regression model, and the second model is optimized and adjusted according to the classification result to obtain the third model.
  • the training module 1202 is specifically used for:
  • the output vector x i of the third model determine the first parameter u, wherein, the output vector x i of the third model and the first parameter u satisfy the formula 5:
  • N is the number of elements in the output vector x i of the third model
  • Singular value decomposition is performed on the covariance matrix A of the output vector of the third model to obtain the first characteristic matrix B and the second characteristic matrix C, wherein the covariance matrix A of the output vector of the third model, the first characteristic matrix B and The second characteristic matrix C satisfies the formula 6:
  • BT represents the transposition matrix of the first feature matrix B
  • the first characteristic matrix B and the second characteristic matrix C determine the second parameter W, wherein, the second parameter W, the first characteristic matrix B and the second characteristic matrix C satisfy the formula 7:
  • the output vector x i of the third model is whitened to obtain a whitening vector Among them, the first parameter u, the second parameter W, the output vector x i of the third model and the whitening vector Satisfy the formula 8:
  • the whitening vector is the whitening result of the third model.
  • the entity generation module 1204 in terms of generating entities according to each training corpus in at least one training corpus to obtain at least one entity, is specifically used for:
  • data collection is performed on each training corpus to obtain at least one entity data
  • the entity generation module 1204 is specifically used for:
  • At least one entity sequence and at least one corpus semantic vector are one-to-one corresponded to obtain at least one group entity pair;
  • the retrieval module 1206 is specifically used to:
  • the retrieval result sequence includes at least one candidate result, and at least one candidate result is in the retrieval result sequence, according to each candidate result and the retrieval semantic vector
  • the similarity between them is arranged in order from large to small;
  • the first n candidate results are taken as the search results.
  • FIG. 13 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • an electronic device 1300 includes a transceiver 1301 , a processor 1302 and a memory 1303 . They are connected through a bus 1304 .
  • the memory 1303 is used to store computer programs and data, and can transmit the data stored in the memory 1303 to the processor 1302 .
  • the processor 1302 is used to read the computer program in the memory 1303 to perform the following operations:
  • Obtaining a corpus wherein the corpus includes at least one training corpus, and each training corpus in the at least one training corpus corresponds to the same business type;
  • Input at least one training corpus into a preset combined neural network for training to obtain a semantic extraction model, wherein the combined neural network is composed of at least two sub-neural networks, and the at least two sub-neural networks include at least one model generation neural network and at least a model optimization neural network, the model optimization neural network is used to optimize the model generated by the model generation neural network;
  • each training corpus in the at least one training corpus into the semantic extraction model to obtain at least one corpus semantic vector, wherein at least one corpus semantic vector corresponds to at least one training corpus;
  • Entity generation is performed according to each training corpus in at least one training corpus, at least one entity is obtained, and at least one entity and at least one corpus semantic vector are stored in a distributed search server, wherein at least one entity and at least one training corpus—— correspond;
  • the retrieval request includes the text to be retrieved
  • At least two sub-neural networks include: a teacher neural network, a student neural network, and a convolutional neural network. Based on this, at least one training corpus is input into a preset combined neural network for training to obtain semantic
  • the processor 1302 is specifically configured to perform the following operations:
  • the processor 1302 is specifically configured to perform the following operations:
  • the first matrix is classified by the regression model, and the second model is optimized and adjusted according to the classification result to obtain the third model.
  • the processor 1302 is specifically configured to perform the following operations:
  • the first parameter u is determined, wherein the output vector xi of the third model and the first parameter u satisfy the formula 9:
  • N is the number of elements in the output vector x i of the third model
  • Singular value decomposition is performed on the covariance matrix A of the output vector of the third model to obtain the first characteristic matrix B and the second characteristic matrix C, wherein the covariance matrix A of the output vector of the third model, the first characteristic matrix B and The second characteristic matrix C satisfies the formula 10:
  • BT represents the transposition matrix of the first feature matrix B
  • the first characteristic matrix B and the second characteristic matrix C determine the second parameter W, wherein, the second parameter W, the first characteristic matrix B and the second characteristic matrix C satisfy the formula
  • the output vector x i of the third model is whitened to obtain a whitening vector Among them, the first parameter u, the second parameter W, the output vector x i of the third model and the whitening vector satisfy the formula
  • the whitening vector is the whitening result of the third model.
  • the processor 1302 in terms of generating entities according to each training corpus in at least one training corpus to obtain at least one entity, the processor 1302 is specifically configured to perform the following operations:
  • data collection is performed on each training corpus to obtain at least one entity data
  • the processor 1302 in terms of storing at least one entity and at least one corpus semantic vector in the distributed search server, the processor 1302 is specifically configured to perform the following operations:
  • At least one entity sequence and at least one corpus semantic vector are one-to-one corresponded to obtain at least one group entity pair;
  • the processor 1302 is specifically configured to perform the following operations in terms of transferring the retrieval semantic vector to the distributed search server for semantic retrieval and obtaining retrieval results:
  • the retrieval result sequence includes at least one candidate result, and at least one candidate result is in the retrieval result sequence, according to each candidate result and the retrieval semantic vector
  • the similarity between them is arranged in order from large to small;
  • the first n candidate results are taken as the search results.
  • the semantic search device based on the neural network in the present application can include smart phones (such as Android mobile phones, iOS mobile phones, Windows Phone mobile phones, etc.), tablet computers, palmtop computers, notebook computers, mobile Internet equipment MID (Mobile Internet Devices, Abbreviation: MID), robot or wearable device, etc.
  • smart phones such as Android mobile phones, iOS mobile phones, Windows Phone mobile phones, etc.
  • tablet computers palmtop computers
  • notebook computers mobile Internet equipment MID (Mobile Internet Devices, Abbreviation: MID), robot or wearable device, etc.
  • MID Mobile Internet Devices, Abbreviation: MID
  • robot or wearable device etc.
  • the above-mentioned semantic search device based on neural network is only an example, not exhaustive, including but not limited to the above-mentioned semantic search device based on neural network.
  • the above-mentioned neural network-based semantic search device may also include: intelligent vehicle-mounted terminals, computer equipment, and the like.
  • the embodiments of the present application also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement any one of the above-mentioned method implementations based on Some or all of the steps of the semantic search method for neural networks.
  • the storage medium may include a hard disk, a floppy disk, an optical disk, a magnetic tape, a magnetic disk, a flash memory, and the like.
  • the storage medium involved in this application such as a computer-readable storage medium, may be non-volatile or volatile.
  • the embodiments of the present application also provide a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause the computer to execute the method as described in the above-mentioned method embodiment. Some or all of the steps of any neural network-based semantic search method.
  • the disclosed device may be implemented in other ways.
  • the device implementation described above is only illustrative.
  • the division of the units is only a logical function division.
  • multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical or other forms.
  • the integrated units may be stored in a computer-readable memory if implemented in the form of a software program module and sold or used as an independent product.
  • the technical solution of the present application is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • the aforementioned memory includes: various media that can store program codes such as U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk.

Abstract

L'invention concerne un procédé et un appareil de recherche sémantique basés sur un réseau neuronal, un dispositif et un support de stockage. Le procédé comprend les étapes consistant : à obtenir un corpus (201) ; à entrer au moins un corpus d'entraînement dans un réseau neuronal combiné prédéfini pour l'entraînement afin d'obtenir un modèle d'extraction sémantique (202) ; à entrer chaque corpus d'apprentissage dans ledit au moins un corpus d'entraînement dans le modèle d'extraction sémantique pour obtenir au moins un vecteur sémantique de corpus (203) ; à effectuer une génération d'entité en fonction de chaque corpus d'entraînement dans ledit au moins un corpus d'entraînement pour obtenir au moins une entité, et à stocker ladite au moins une entité et ledit au moins un vecteur sémantique de corpus dans un serveur de recherche distribué (204) ; à obtenir une requête de recherche, la requête de recherche contenant un texte à rechercher (205) ; à entrer ledit texte dans le modèle d'extraction sémantique pour obtenir un vecteur sémantique de recherche (206) ; et à transmettre le vecteur sémantique de recherche dans le serveur de recherche distribué pour une recherche sémantique afin d'obtenir un résultat de recherche (207).
PCT/CN2022/071219 2021-09-23 2022-01-11 Procédé et appareil de recherche sémantique basés sur un réseau neuronal, dispositif et support de stockage WO2023045187A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111118260.5 2021-09-23
CN202111118260.5A CN113806487B (zh) 2021-09-23 2021-09-23 基于神经网络的语义搜索方法、装置、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2023045187A1 true WO2023045187A1 (fr) 2023-03-30

Family

ID=78896404

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071219 WO2023045187A1 (fr) 2021-09-23 2022-01-11 Procédé et appareil de recherche sémantique basés sur un réseau neuronal, dispositif et support de stockage

Country Status (2)

Country Link
CN (1) CN113806487B (fr)
WO (1) WO2023045187A1 (fr)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806487B (zh) * 2021-09-23 2023-09-05 平安科技(深圳)有限公司 基于神经网络的语义搜索方法、装置、设备和存储介质
CN114757659A (zh) * 2022-05-19 2022-07-15 浙江大学 研发项目智能管理系统及其管理方法
CN115525743B (zh) * 2022-08-18 2023-11-14 贝壳找房(北京)科技有限公司 基于自学习白化网络的人机交互方法及电子设备
CN116610776A (zh) * 2022-12-30 2023-08-18 摩斯智联科技有限公司 车联网智能问答系统

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190251455A1 (en) * 2018-02-13 2019-08-15 International Business Machines Corporation Combining chemical structure data with unstructured data for predictive analytics in a cognitive system
CN110674292A (zh) * 2019-08-27 2020-01-10 腾讯科技(深圳)有限公司 一种人机交互方法、装置、设备及介质
CN111400607A (zh) * 2020-06-04 2020-07-10 浙江口碑网络技术有限公司 搜索内容输出方法、装置、计算机设备及可读存储介质
CN112131883A (zh) * 2020-09-30 2020-12-25 腾讯科技(深圳)有限公司 语言模型训练方法、装置、计算机设备和存储介质
CN112183101A (zh) * 2020-10-13 2021-01-05 深圳壹账通智能科技有限公司 文本意图识别方法、装置、电子设备及存储介质
CN113139060A (zh) * 2021-05-13 2021-07-20 杭州网易再顾科技有限公司 文本分析模型训练及文本分析方法、介质、装置及设备
CN113326358A (zh) * 2021-08-04 2021-08-31 中国测绘科学研究院 基于知识图谱语义匹配的地震灾害信息服务方法和系统
CN113806487A (zh) * 2021-09-23 2021-12-17 平安科技(深圳)有限公司 基于神经网络的语义搜索方法、装置、设备和存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110309267B (zh) * 2019-07-08 2021-05-25 哈尔滨工业大学 基于预训练模型的语义检索方法和系统
CN110598213A (zh) * 2019-09-06 2019-12-20 腾讯科技(深圳)有限公司 一种关键词提取方法、装置、设备及存储介质
CN111814058A (zh) * 2020-08-20 2020-10-23 深圳市欢太科技有限公司 基于用户意图的推送方法、装置、电子设备及存储介质
CN112579870A (zh) * 2020-12-22 2021-03-30 北京三快在线科技有限公司 检索匹配模型的训练方法、装置、设备及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190251455A1 (en) * 2018-02-13 2019-08-15 International Business Machines Corporation Combining chemical structure data with unstructured data for predictive analytics in a cognitive system
CN110674292A (zh) * 2019-08-27 2020-01-10 腾讯科技(深圳)有限公司 一种人机交互方法、装置、设备及介质
CN111400607A (zh) * 2020-06-04 2020-07-10 浙江口碑网络技术有限公司 搜索内容输出方法、装置、计算机设备及可读存储介质
CN112131883A (zh) * 2020-09-30 2020-12-25 腾讯科技(深圳)有限公司 语言模型训练方法、装置、计算机设备和存储介质
CN112183101A (zh) * 2020-10-13 2021-01-05 深圳壹账通智能科技有限公司 文本意图识别方法、装置、电子设备及存储介质
CN113139060A (zh) * 2021-05-13 2021-07-20 杭州网易再顾科技有限公司 文本分析模型训练及文本分析方法、介质、装置及设备
CN113326358A (zh) * 2021-08-04 2021-08-31 中国测绘科学研究院 基于知识图谱语义匹配的地震灾害信息服务方法和系统
CN113806487A (zh) * 2021-09-23 2021-12-17 平安科技(深圳)有限公司 基于神经网络的语义搜索方法、装置、设备和存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Master's Theses", 1 June 2017, HANGZHOU UNIVERSITY OF ELECTRONIC SCIENCE AND TECHNOLOGY, CN, article ZHANG, TINGKAI: "Research on Construction Method of Entity Semantic Vector in Science and Technology Field", pages: 1 - 57, XP009544902 *

Also Published As

Publication number Publication date
CN113806487A (zh) 2021-12-17
CN113806487B (zh) 2023-09-05

Similar Documents

Publication Publication Date Title
WO2023045187A1 (fr) Procédé et appareil de recherche sémantique basés sur un réseau neuronal, dispositif et support de stockage
US20220222920A1 (en) Content processing method and apparatus, computer device, and storage medium
CN111753060B (zh) 信息检索方法、装置、设备及计算机可读存储介质
US11899681B2 (en) Knowledge graph building method, electronic apparatus and non-transitory computer readable storage medium
CN110442777B (zh) 基于bert的伪相关反馈模型信息检索方法及系统
CN102955848B (zh) 一种基于语义的三维模型检索系统和方法
JP2022522020A (ja) 意味画像検索
CN112100332A (zh) 词嵌入表示学习方法及装置、文本召回方法及装置
US11120214B2 (en) Corpus generating method and apparatus, and human-machine interaction processing method and apparatus
CN115203421A (zh) 一种长文本的标签生成方法、装置、设备及存储介质
CN111400473A (zh) 意图识别模型的训练方法及装置、存储介质及电子设备
CN111581364B (zh) 一种面向医疗领域的中文智能问答短文本相似度计算方法
WO2022141872A1 (fr) Procédé et appareil de génération de résumé de document, dispositif informatique et support de stockage
CN115238053A (zh) 基于bert模型的新冠知识智能问答系统及方法
Chai Design and implementation of English intelligent communication platform based on similarity algorithm
CN116821307B (zh) 内容交互方法、装置、电子设备和存储介质
CN116578729B (zh) 内容搜索方法、装置、电子设备、存储介质和程序产品
CN116662495A (zh) 问答处理方法、训练问答处理模型的方法及装置
WO2023137903A1 (fr) Procédé et appareil de détermination de déclaration de réponse basés sur une sémantique grossière, et dispositif électronique
CN116361428A (zh) 一种问答召回方法、装置和存储介质
CN115292533A (zh) 视觉定位驱动的跨模态行人检索方法
CN114818727A (zh) 关键句抽取方法及装置
WO2023159753A1 (fr) Procédé et appareil de génération de questions basée sur une ligne directrice de réponse, dispositif et support de stockage
US20230147798A1 (en) Search method, computing device and storage medium
CN117591511A (zh) 用于构建搜索数据库的方法及装置、搜索方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22871255

Country of ref document: EP

Kind code of ref document: A1