Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7581612B2 - Method, apparatus, electronic device and storage medium for training a semantic search model - Google Patents
[go: Go Back, main page]

JP7581612B2 - Method, apparatus, electronic device and storage medium for training a semantic search model - Google Patents

Method, apparatus, electronic device and storage medium for training a semantic search model Download PDF

Info

Publication number
JP7581612B2
JP7581612B2 JP2023037698A JP2023037698A JP7581612B2 JP 7581612 B2 JP7581612 B2 JP 7581612B2 JP 2023037698 A JP2023037698 A JP 2023037698A JP 2023037698 A JP2023037698 A JP 2023037698A JP 7581612 B2 JP7581612 B2 JP 7581612B2
Authority
JP
Japan
Prior art keywords
semantic search
recall
target query
query sentence
training
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2023037698A
Other languages
Japanese (ja)
Other versions
JP2024006944A (en
Inventor
キュ、インキ
ワン、ハイフェン
ティアン、ハオ
ウ、フア
ウ、ティアン
リウ、ジン
ディン、ユチェン
シン、イラン
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Publication of JP2024006944A publication Critical patent/JP2024006944A/en
Application granted granted Critical
Publication of JP7581612B2 publication Critical patent/JP7581612B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本開示は、コンピュータ技術の分野に関し、具体的に機械学習及び自然言語処理のような人工知能技術の分野に関し、特にセマンティック検索モデルの訓練方法、装置、電子デバイス、及び記憶媒体に関する。 The present disclosure relates to the field of computer technology, specifically to the field of artificial intelligence technologies such as machine learning and natural language processing, and in particular to methods, apparatus, electronic devices, and storage media for training semantic search models.

情報時代は、膨大な量の本、Webページ、ドキュメントから、必要な情報を素早く見つけたいことを希望している。大規模なデータから候補をリコールし、更にリコールされたデータに対して信頼度を採点する再ソートを行うことは、現在の情報検索の主流パターンとなっている。 In the information age, people want to quickly find the information they need among a vast number of books, web pages, and documents. Recalling candidates from a large amount of data, and then re-sorting the recalled data to score its reliability, has become the mainstream pattern in information retrieval today.

その中で、検索タスクのリコール段階では、通常、疎ベクトルによる検索と密ベクトルによる検索の2つの異なる方式がある。そのうち、疎ベクトルによる検索方式では、クエリ文queryと候補言語材料を疎ベクトルに符号化するが、このベクトルの次元は一般的に辞書と大体同じである。この方式は、主に字面マッチング度合いに依存して類似度計算を行う。一般的なアルゴリズムにはBM25などがあるが、疎ベクトルによる検索に対応するセマンティック検索モデルは学習不可能である。この方式は移行能力が高く、特定の分野に制限されない。密ベクトルによる検索方式は、対応するセマンティック検索モデルによりクエリ文queryと候補言語材料とをセマンティック空間内の2つのベクトルにそれぞれ符号化し、ベクトルに基づいて類似度計算を行って相関結果をリコールする。この方式では、訓練データによってセマンティック検索モデルを訓練する必要があり、セマンティック情報を用いてマッチング度合いの判定を行うことができるが、移行能力は劣る。 In the recall stage of a search task, there are usually two different methods: sparse vector search and dense vector search. In the sparse vector search method, the query sentence and the candidate language materials are encoded into a sparse vector, and the dimension of this vector is generally roughly the same as that of a dictionary. This method mainly relies on the degree of character matching to perform similarity calculation. Common algorithms include BM25, but it is impossible to learn a semantic search model that corresponds to sparse vector search. This method has high transfer ability and is not limited to a specific field. In the dense vector search method, the query sentence and the candidate language materials are encoded into two vectors in the semantic space by the corresponding semantic search model, and the similarity is calculated based on the vector to recall the correlation result. In this method, it is necessary to train the semantic search model with training data, and the matching degree can be determined using semantic information, but the transfer ability is poor.

本開示は、セマンティック検索モデルの訓練方法、装置、電子デバイス及び記憶媒体を提供する。 The present disclosure provides a method, apparatus, electronic device, and storage medium for training a semantic search model.

本開示の一態様によれば、少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプであって、前記オリジナルセマンティック検索モデルが様々なタイプのクエリ文を処理する際に最も正確性の高いクエリ文タイプである目標クエリ文タイプを取得し、少なくとも2つのオリジナルセマンティック検索モデルと、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文タイプと、予め構築されたコーパスとに基づいて蒸留データセットを取得し、蒸留データセットに基づいて、目標セマンティック検索モデルを訓練することを含むセマンティック検索モデルの訓練方法が提供される。 According to one aspect of the present disclosure, a method for training a semantic search model is provided, which includes obtaining a target query sentence type corresponding to each of at least two original semantic search models, the target query sentence type being the most accurate query sentence type when the original semantic search models process various types of query sentences, obtaining a distilled dataset based on the at least two original semantic search models, the target query sentence type corresponding to each of the original semantic search models, and a pre-constructed corpus, and training the target semantic search model based on the distilled dataset.

本開示の別の態様によれば、少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプであって、前記オリジナルセマンティック検索モデルが様々なタイプのクエリ文を処理する際に最も正確性の高いクエリ文タイプである目標クエリ文タイプを取得するタイプ取得モジュールと、少なくとも2つのオリジナルセマンティック検索モデル及び予め確立されたコーパスに基づいて蒸留データセットを取得するデータ取得モジュールと、蒸留データセットに基づいて、目標セマンティック検索モデルを訓練する訓練モジュールと、を備えるセマンティック検索モデルの訓練装置が提供される。 According to another aspect of the present disclosure, a training device for a semantic search model is provided, the training device including: a type acquisition module for acquiring a target query sentence type corresponding to each of at least two original semantic search models, the target query sentence type being the most accurate query sentence type when the original semantic search models process various types of query sentences; a data acquisition module for acquiring a distilled dataset based on the at least two original semantic search models and a pre-established corpus; and a training module for training the target semantic search model based on the distilled dataset.

本開示のさらに別の態様によれば、少なくとも1つのプロセッサと、前記少なくも1つのプロセッサと通信可能に接続されたメモリとを備え、前記メモリに前記少なくとも1つのプロセッサにより実行可能なコマンドが記憶されており、前記コマンドが前記少なくとも1つのプロセッサにより実行されると、前記少なくとも1つのプロセッサに上述した態様及び可能な実施形態のいずれかの方法を実行させる電子デバイスが提供される。 According to yet another aspect of the present disclosure, there is provided an electronic device comprising at least one processor and a memory communicatively connected to the at least one processor, the memory storing commands executable by the at least one processor, the commands, when executed by the at least one processor, causing the at least one processor to perform any of the methods of the above-mentioned aspects and possible embodiments.

本開示のさらに別の態様によれば、コンピュータに上述した態様及び可能な実施形態のいずれかの方法を実行させるためのコンピュータコマンドを格納した非一時的なコンピュータ可読記憶媒体が提供される。 According to yet another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored thereon computer instructions for causing a computer to perform any of the methods of the above-described aspects and possible embodiments.

本開示のさらに別の態様によれば、プロセッサにより実行されると、上述した態様及び可能な実施形態のいずれかの方法を実施するコンピュータプログラムを含むコンピュータプログラム製品が提供される。 According to yet another aspect of the present disclosure, there is provided a computer program product including a computer program that, when executed by a processor, performs the method of any of the above aspects and possible embodiments.

本開示の技術によれば、訓練された目標セマンティック検索モデルに少なくとも2つのオリジナルセマンティック検索モデルの検索能力が統合することができるため、単一のセマンティック検索モデルの欠点を克服し、セマンティック検索の正確性を向上させた。 According to the technology disclosed herein, the search capabilities of at least two original semantic search models can be integrated into a trained target semantic search model, thereby overcoming the shortcomings of a single semantic search model and improving the accuracy of semantic search.

理解すべきなのは、本セクションで説明される内容は、本開示の実施形態の重要な又は肝心な特徴を標識することでもなく、本開示の範囲を制限することでもない。本開示の他の特徴は、以下の明細書により容易に理解されるであろう。 It should be understood that the contents described in this section are not intended to identify key or essential features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood from the following specification.

図面は、本技術案をより良く理解するためのものであり、本開示に制限されない。図面において、
本開示の第1実施形態による概略図である。 本開示の第2実施形態による概略図である。 本開示の第3実施形態による概略図である。 本実施形態のセマンティック検索モデルの訓練方法の構成図である。 本開示の第4実施形態による概略図である。 本開示の第5実施形態による概略図である。 本開示の実施形態の方法を実施するための電子デバイスのブロック図である。
The drawings are for better understanding of the technical solution and are not intended to limit the present disclosure.
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure. FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure. FIG. 13 is a schematic diagram according to a third embodiment of the present disclosure. FIG. 1 is a configuration diagram of a method for training a semantic search model according to an embodiment of the present invention. FIG. 13 is a schematic diagram according to a fourth embodiment of the present disclosure. FIG. 13 is a schematic diagram according to a fifth embodiment of the present disclosure. FIG. 1 is a block diagram of an electronic device for implementing the method of an embodiment of the present disclosure.

以下、図面に基づいて、本開示の例示的な実施例を説明する。理解を容易にするために、本開示の実施例の様々な詳細が含まれており、それらは単なる例示と見なされるべきである。従って、当業者は、本開示の範囲及び精神から逸脱することなく、本明細書に記載の実施形態に対して様々な変更及び修正を行うことができることを認識するはずである。同様に、簡明のために、以下の説明では、よく知られた機能と構造の説明は省略される。 Below, exemplary embodiments of the present disclosure will be described based on the drawings. For ease of understanding, various details of the embodiments of the present disclosure are included and should be considered as merely examples. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of simplicity, the following description omits descriptions of well-known functions and structures.

明らかに、記載された実施形態は、本開示の一部の実施形態であり、全ての実施形態ではない。本開示の実施形態に基づいて、当業者が創造的な労働をしていないという前提の下で得た他のすべての実施形態は、本開示の保護の範囲に属する。 Obviously, the described embodiments are only some of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained based on the embodiments of the present disclosure under the premise that a person skilled in the art does not perform creative labor, fall within the scope of protection of the present disclosure.

説明すべきなのは、本開示の実施形態に係る端末装置は、携帯電話、携帯情報端末(Personal Digital Assistant、PDA)、無線ハンドヘルドデバイス、タブレット(Tablet Computer)などのスマートデバイスを含むことができるが、これらに限定されない。表示装置は、パーソナルコンピュータ、テレビ等の表示機能を有する装置を含むことができるが、これらに限定されない。 It should be noted that the terminal device according to the embodiment of the present disclosure may include, but is not limited to, smart devices such as mobile phones, personal digital assistants (PDAs), wireless handheld devices, and tablets. The display device may include, but is not limited to, devices with display capabilities such as personal computers and televisions.

さらに、本明細書における用語「及び/又は」は、単に関連オブジェクトを記述する関連関係であり、3つの関係が存在し得ると意味する。例えば、A及び/又はBは、Aが単独で存在し、AとBが同時に存在し、Bが単独で存在するという三つの状況を意味することができる。また、本明細書における文字「/」は、一般的に前後の関連オブジェクトが「又は」の関係にあることを意味する。 Furthermore, the term "and/or" in this specification is simply a relational relationship describing related objects, and means that three relations can exist. For example, A and/or B can mean three situations: A exists alone, A and B exist simultaneously, and B exists alone. Also, the character "/" in this specification generally means that the related objects before and after it are in an "or" relationship.

従来技術において、疎ベクトルに基づく検索方式と密ベクトルに基づく検索方式は、一般的に単独で使用される。疎ベクトルに基づく検索方式は、字面マッチングしかモデリングできず、内容に対するセマンティック理解が不足し、効果が低い。一方、密ベクトルのみを用いた検索方式では、一部の字面マッチングの情報が欠落してしまう。つまり、上記のいずれかの検索方式を単独で用いると、セマンティック検索の正確性が劣ることになる。 In conventional technology, search methods based on sparse vectors and search methods based on dense vectors are generally used alone. Search methods based on sparse vectors can only model text matching, and lack semantic understanding of the content, making them less effective. On the other hand, search methods that use only dense vectors miss some text matching information. In other words, using either of the above search methods alone results in less accurate semantic search.

図1は本開示の第1実施形態による概略図である。図1に示すように、本実施形態は、セマンティック検索モデルの訓練方法を提供し、具体的に以下のステップを含むことができる。 Figure 1 is a schematic diagram according to a first embodiment of the present disclosure. As shown in Figure 1, the present embodiment provides a method for training a semantic search model, and specifically includes the following steps:

S101において、少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプを取得する。 In S101, a target query sentence type corresponding to each of at least two original semantic search models is obtained.

ここで、オリジナルセマンティック検索モデルに対応する目標クエリ文タイプは、このオリジナルセマンティック検索モデルが様々なタイプのクエリ文を処理する際に最も正確性の高いクエリ文タイプである。 Here, the target query sentence type corresponding to the original semantic search model is the query sentence type that is most accurate when this original semantic search model processes various types of query sentences.

S102において、少なくとも2つのオリジナルセマンティック検索モデルと、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプと、予め構築されたコーパスとに基づいて、蒸留データセットを取得する。 In S102, a distilled dataset is obtained based on at least two original semantic search models, target query sentence types corresponding to each original semantic search model, and a pre-constructed corpus.

S103において、蒸留データセットに基づいて、目標セマンティック検索モデルを訓練する。 At S103, a target semantic search model is trained based on the distilled dataset.

本実施形態のセマンティック検索モデルの訓練方法の実行主体はセマンティック検索モデルの訓練装置であってよい。当該装置は、電子エンティティであっても良く、ソフトウェア統合を採用したアプリケーションであっても良く、使用時にコンピュータデバイス上で動作してセマンティック検索モデルの訓練を実現する。 The entity performing the method for training a semantic search model of this embodiment may be a device for training a semantic search model. The device may be an electronic entity or an application that employs software integration and runs on a computing device when in use to realize training of the semantic search model.

本実施形態の少なくとも2つのセマンティック検索モデルは、疎ベクトルに基づくセマンティック検索モデルと密ベクトルに基づくセマンティック検索モデルとを含むことができる。ここで、疎ベクトルに基づくセマンティック検索モデルは、クエリ文query及び/又は候補言語材料などのいずれかの言語材料の字面上のセマンティックベクトルを辞書に基づいて符号化することができる。一方、密ベクトルに基づくセマンティック検索モデルは、事前に訓練されたニューラルネットワークモデルに基づいて、クエリ文queryと候補言語材料のセマンティックレベルでのセマンティックベクトルを符号化することを実現する。例えば、本実施形態の密ベクトルに基づくセマンティック検索モデルは、RocketQAv2、ColBERT、Phrase-BERT、又はCOILモデルなどに基づいて実現されてよい。 The at least two semantic search models of this embodiment may include a sparse vector-based semantic search model and a dense vector-based semantic search model. Here, the sparse vector-based semantic search model may encode the literal semantic vector of any language material, such as the query sentence query and/or the candidate language material, based on a dictionary. On the other hand, the dense vector-based semantic search model realizes encoding the semantic vector of the query sentence query and the candidate language material at the semantic level based on a pre-trained neural network model. For example, the dense vector-based semantic search model of this embodiment may be realized based on the RocketQAv2, ColBERT, Phrase-BERT, or COIL model, etc.

すなわち、本実施形態の少なくとも2つのオリジナルセマンティック検索モデルは、BM25モデル、RocketQAv2、ColBERT、Phrase-BERT、及びCOILモデル等のうちの少なくとも2つを含むことができる。また、本実施形態で使用されるオリジナルセマンティック検索モデルは、すべて既知であるか、又は訓練されたものである。 That is, the at least two original semantic search models of this embodiment may include at least two of the BM25 model, RocketQAv2, ColBERT, Phrase-BERT, and COIL model, etc. In addition, the original semantic search models used in this embodiment are all known or trained.

各オリジナルセマンティック検索モデルは異なるタイプのクエリ文を処理するため、それに応じた正確性も異なる。処理が得意なクエリ文タイプについては、オリジナルセマンティック検索モデルは処理時の正確性が高い。一方、処理が不得意なクエリ文のタイプについては、オリジナルセマンティック検索モデルは処理時の正確性が低い。これに基づいて、本実施形態では、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプを選択する際に、各オリジナルセマンティック検索モデルが各クエリ文タイプに対応するクエリ文を処理する正確性に基づいて、対応する目標クエリ文タイプを取得することができる。たとえば、最も正確性の高いクエリ文タイプを目標クエリ文タイプとして選択することができる。オプションとして、本実施形態では、実際の必要に応じて各オリジナルセマンティック検索モデルに対応する1つ、2つ又は複数の目標クエリ文タイプを取得することができる。例えば、1つの目標クエリ文タイプだけを取得する場合、選択可能な目標クエリ文の言語材料が不足しているため、これ以上多く目標クエリ文タイプを取得して良い。これは、目標クエリ文タイプはオリジナルセマンティック検索モデルが得意とするクエリ文のタイプであると考えても良い。これにより、目標クエリ文タイプに基づいて蒸留データを取得する際に、対応するオリジナルセマンティック検索モデルの特性をより具現化することができる。さらに、このような蒸留データに基づいて目標セマンティックモデルを訓練する際に、目標セマンティック検索モデルにオリジナルセマンティック検索モデルの特性を学習させることができる。 Each original semantic search model processes different types of query sentences, and the accuracy is different accordingly. For query sentence types that the original semantic search model is good at processing, the accuracy of the processing is high. On the other hand, for query sentence types that the original semantic search model is not good at processing, the accuracy of the processing is low. Based on this, in this embodiment, when selecting a target query sentence type corresponding to each original semantic search model, the corresponding target query sentence type can be obtained based on the accuracy of each original semantic search model processing the query sentence corresponding to each query sentence type. For example, the most accurate query sentence type can be selected as the target query sentence type. Optionally, in this embodiment, one, two or more target query sentence types corresponding to each original semantic search model can be obtained according to actual needs. For example, when only one target query sentence type is obtained, more target query sentence types may be obtained because there is a shortage of language material for selectable target query sentences. This may be considered as the target query sentence type being a type of query sentence that the original semantic search model is good at. This allows the characteristics of the corresponding original semantic search model to be more embodied when distilled data is obtained based on the target query sentence type. Furthermore, when training the target semantic model based on such distilled data, the target semantic search model can learn the characteristics of the original semantic search model.

本実施形態の目標クエリ文タイプは、アドレスを求めるタイプ、答えを求めるクラス、又はリソースを求めるクラスであってよい。あるいは、実際の応用において、分野やシナリオなどに応じてクエリ文タイプを分割して対応する目標クエリ文タイプを取得することも可能である。 The target query sentence type in this embodiment may be an address-seeking type, an answer-seeking class, or a resource-seeking class. Alternatively, in practical applications, it is possible to divide the query sentence type according to the field, scenario, etc., and obtain the corresponding target query sentence type.

本実施形態では、少なくとも2つのオリジナルセマンティック検索モデルと、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプと、予め構築されたコーパスとに基づいて蒸留データセットを取得することができる。この蒸留データセットは、少なくとも2つのオリジナルセマンティック検索モデルに基づいてスクリーニングされるため、各オリジナルセマンティック検索モデルの特性に互換性がある。さらに、蒸留データセットに基づいて、目標セマンティック検索モデルに対して訓練を行うことにより、目標セマンティック検索モデルに各オリジナルセマンティック検索モデルの特性を統合し、単一のセマンティック検索モデルが不正確である欠点を克服し、更に正確にセマンティック検索を行い、リコール結果の正確性を高めることができる。 In this embodiment, a distilled dataset can be obtained based on at least two original semantic search models, the target query sentence types corresponding to each original semantic search model, and a pre-constructed corpus. This distilled dataset is screened based on at least two original semantic search models, so that the characteristics of each original semantic search model are compatible. Furthermore, by training the target semantic search model based on the distilled dataset, the characteristics of each original semantic search model can be integrated into the target semantic search model, overcoming the shortcomings of a single semantic search model being inaccurate, and performing more accurate semantic searches and improving the accuracy of recall results.

本実施形態のセマンティック検索モデルの訓練方法は、少なくとも2つのオリジナルセマンティック検索モデルと予め構築されたコーパスとに基づいて蒸留データセットを取得し、さらに、蒸留データセットに基づいて、目標セマンティック検索モデルを訓練することにより、訓練された目標セマンティック検索モデルに少なくとも2つのオリジナルセマンティック検索モデルの検索能力を統合し、単一のセマンティック検索モデルの欠点を克服し、セマンティック検索の正確性を高めることができる。 The method for training a semantic search model in this embodiment obtains a distilled dataset based on at least two original semantic search models and a pre-constructed corpus, and further trains a target semantic search model based on the distilled dataset, thereby integrating the search capabilities of the at least two original semantic search models into the trained target semantic search model, overcoming the shortcomings of a single semantic search model, and improving the accuracy of semantic search.

図2は本開示の第2実施形態による概略図である。本実施形態のセマンティック検索モデルの訓練方法は、上述した図1に示した実施形態の技術案をもとに、本開示の技術案をさらに詳細に説明する。図2に示すように、本実施形態のセマンティック検索モデルの訓練方法は、具体的に以下のステップを含むことができる。 Figure 2 is a schematic diagram according to a second embodiment of the present disclosure. The method for training a semantic search model of this embodiment is described in more detail based on the technical solution of the embodiment shown in Figure 1 above. As shown in Figure 2, the method for training a semantic search model of this embodiment can specifically include the following steps:

S201において、少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプを取得する。 In S201, a target query sentence type corresponding to each of at least two original semantic search models is obtained.

S202において、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプに基づいて、各オリジナルセマンティック検索モデルに対応する目標クエリ文を取得する。 In S202, a target query sentence corresponding to each original semantic search model is obtained based on the target query sentence type corresponding to each original semantic search model.

S203において、各オリジナルセマンティック検索モデル及び各オリジナルセマンティック検索モデルに対応する目標クエリ文に基づいて、コーパスから所定数のリコール言語材料をリコールする。 In S203, a predetermined number of recall language materials are recalled from the corpus based on each original semantic search model and the target query sentence corresponding to each original semantic search model.

S204において、各オリジナルセマンティック検索モデルに対応する目標クエリ文と、対応するリコールされた所定数のリコール言語材料とに基づいて、蒸留データセットを生成する。 At S204, a distilled dataset is generated based on the target query sentences corresponding to each original semantic search model and the corresponding recalled predetermined number of recall linguistic materials.

生成された蒸留データセットにおける蒸留データが各オリジナルセマンティック検索モデルの特性をより正確に反映するように、本実施形態では、できるだけ各オリジナルセマンティック検索モデルが得意とする数のクエリ文を目標クエリqueryとして選択して言語材料リコールを行う。各セマンティック検索モデルの目標クエリqueryと、対応するリコール言語材料のリコールに基づいて、対応するセマンティック検索モデルの検索能力と検索特性を反映することができる。そこで、本実施形態では、各オリジナルセマンティック検索モデルに対応する目標クエリ文と、リコールされた所定数のリコール言語材料とに基づいて蒸留データセットを生成する。 In order for the distilled data in the generated distilled dataset to more accurately reflect the characteristics of each original semantic search model, in this embodiment, as many query sentences as possible that each original semantic search model excels at are selected as target queries to perform language material recall. Based on the target queries of each semantic search model and the recall of the corresponding recall language materials, the search ability and search characteristics of the corresponding semantic search model can be reflected. Therefore, in this embodiment, a distilled dataset is generated based on the target query sentences corresponding to each original semantic search model and a predetermined number of recalled recall language materials.

本実施形態では、ステップS201において、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプを取得することは、具体的に以下のいずれかの方式を含むことができる。 In this embodiment, in step S201, obtaining the target query sentence type corresponding to each original semantic search model may specifically include any of the following methods:

第1方式は、予め構築された各タイプのクエリ文に対応するテストセットに基づいて、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプを取得する。 The first method obtains target query sentence types corresponding to each original semantic search model based on a test set corresponding to each type of query sentence that has been pre-constructed.

第1方式では、異なるタイプのクエリ文に基づいて、対応するテストセットを事前に構築することができる。例えば、異なるタイプのクエリ文は、アドレスを求めるタイプ、答えを求めるタイプ、又はリソースを求めるタイプを含むことができる。或いは、分野やシナリオに従ってクエリ文のタイプを分けることもできる。 In the first method, a corresponding test set can be pre-constructed based on different types of query sentences. For example, the different types of query sentences can include address-seeking types, answer-seeking types, or resource-seeking types. Alternatively, the types of query sentences can be divided according to domains or scenarios.

この方式では、各タイプのクエリ文に対応するテストセットを用いて、各オリジナルセマンティック検索モデルの正確率を検出することができる。正確率が90%、95%又はその他の比例値のように予め設定された正確率閾値より大きい場合、そのクエリ文タイプをそのオリジナルセマンティック検索モデルに対応する目標クエリ文タイプとすることができる。また、さまざまなクエリ文タイプを正確性の高い順にソートし、最も正確性の高いクエリ文タイプを取得することもできる。本実施形態では、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプは、1つ、2つ又はこれ以上であっても良く、ここでは限定しない。 In this method, a test set corresponding to each type of query sentence can be used to detect the accuracy rate of each original semantic search model. If the accuracy rate is greater than a preset accuracy rate threshold, such as 90%, 95% or other proportional value, the query sentence type can be the target query sentence type corresponding to the original semantic search model. In addition, the various query sentence types can be sorted in order of accuracy to obtain the most accurate query sentence type. In this embodiment, the target query sentence type corresponding to each original semantic search model can be one, two or more, and is not limited here.

第2方式は、各オリジナルセマンティック検索モデルの属性に基づいて、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプを取得する。 The second method obtains a target query sentence type corresponding to each original semantic search model based on the attributes of each original semantic search model.

この実現方式では、オリジナルセマンティック検索モデルの属性があると予め定義することができる。具体的には、オリジナルセマンティック検索モデルの属性は、そのモデルを訓練する際の訓練セットのタイプ、分野又はシナリオに基づいて配置することができる。当該属性は、当該オリジナルセマンティック検索モデルが訓練時に使用された訓練データのタイプ、分野又はシナリオを標識することができ、当該オリジナルセマンティック検索モデルが当該タイプ、分野又はシナリオにおけるクエリ文の処理に得意であり、他のタイプのクエリ文の処理に比べて当該タイプ、分野又はシナリオにおけるクエリ文の処理の正確性が最も高いことを示している。ここで、訓練セットのタイプは、アドレスを求めるタイプ、答えを求めるタイプ、又はリソースを求めるタイプを含むこともできる。これに基づいて、オリジナルセマンティック検索モデルの属性をオリジナルセマンティック検索モデルに対応する目標クエリ文タイプとすることができる。 In this implementation method, the attributes of the original semantic search model can be predefined. Specifically, the attributes of the original semantic search model can be arranged based on the type, field, or scenario of the training set when training the model. The attributes can indicate the type, field, or scenario of the training data used when the original semantic search model was trained, indicating that the original semantic search model is good at processing query sentences in the type, field, or scenario, and has the highest accuracy in processing query sentences in the type, field, or scenario compared with processing query sentences of other types. Here, the type of training set can also include a type for requesting an address, a type for requesting an answer, or a type for requesting a resource. Based on this, the attributes of the original semantic search model can be set as the target query sentence type corresponding to the original semantic search model.

本実施形態では、上記のいずれの方式を採用しても、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプを正確に取得することができる。 In this embodiment, whichever of the above methods is adopted, it is possible to accurately obtain the target query sentence type corresponding to each original semantic search model.

次に、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプに基づいて、各オリジナルセマンティック検索モデルに対応する目標クエリ文を取得する。例えば、ユーザの履歴行動データに基づいて、様々なタイプのクエリ文を収集してクエリ文コーパスに格納することができる。利用時に、目標クエリ文タイプに基づいて、クエリ文コーパスから対応するいずれかのクエリ文を取得して目標クエリ文とすればよい。又は、別の方式で目標クエリ文を取得しても良い。例えば、直接に目標クエリ文タイプに基づいて、ユーザのログから該当するタイプの何れか一つのクエリ文を目標クエリ文として取得する。 Next, a target query sentence corresponding to each original semantic search model is obtained based on the target query sentence type corresponding to each original semantic search model. For example, various types of query sentences can be collected and stored in a query sentence corpus based on the user's historical behavior data. At the time of use, any corresponding query sentence can be obtained from the query sentence corpus based on the target query sentence type and set as the target query sentence. Alternatively, the target query sentence may be obtained in a different manner. For example, any one query sentence of the corresponding type can be obtained from the user's log directly based on the target query sentence type as the target query sentence.

本実施形態では、蒸留データセットを生成する際には、生成したい蒸留データセットの規模の大きさに応じて、上記ステップS202及びステップS203を上記のように繰り返すことにより、各オリジナルセマンティック検索モデル毎に対応する各目標クエリ文と、各目標クエリ文毎にコーパスからリコールされた所定数のリコール言語材料とを取得してよい。すなわち、1つの目標クエリ文、1つのオリジナルセマンティック検索モデルについて、コーパスから所定数のリコール言語材料をリコールすることができる。本実施形態における所定数は、実際の必要に応じて設定することができる。例えば、100個、80個、50個、20個又はその他個のリコール言語材料であって良い。 In this embodiment, when generating a distilled dataset, steps S202 and S203 may be repeated as described above depending on the size of the distilled dataset to be generated, to obtain each target query sentence corresponding to each original semantic search model and a predetermined number of recall linguistic materials recalled from the corpus for each target query sentence. That is, for one target query sentence and one original semantic search model, a predetermined number of recall linguistic materials can be recalled from the corpus. The predetermined number in this embodiment can be set according to actual needs. For example, it may be 100, 80, 50, 20, or other number of recall linguistic materials.

本実施形態では、各オリジナルセマンティック検索モデルに対応する目標クエリ文及びリコールされた所定数のリコール言語材料をそのまま蒸留データとして蒸留データセットに加えることができる。リコール言語材料がすべてオリジナルセマンティック検索モデルに基づいて目標クエリ文に従って取得されるため、蒸留データセットでは正サンプルとしての蒸留データである。従って、目標クエリ文とリコール言語材料の相関度を1として配置してこの蒸留データが正サンプルであることを標識する必要があり、その目標クエリ文が検索されたときに当該リコール言語材料がリコールされる確率が1であることを示して良い。 In this embodiment, the target query sentence corresponding to each original semantic search model and a predetermined number of recalled recall linguistic materials can be added directly to the distilled dataset as distilled data. Since all recall linguistic materials are obtained according to the target query sentence based on the original semantic search model, they are distilled data as positive samples in the distilled dataset. Therefore, it is necessary to mark this distilled data as a positive sample by arranging the correlation between the target query sentence and the recall linguistic materials as 1, and it may be indicated that the probability that the recall linguistic materials will be recalled when the target query sentence is searched is 1.

逆に、蒸留データセットにおける負サンプルの蒸留データを構築する際には、オリジナルセマンティック検索モデルに対応する目標クエリ文及びリコールされた所定数のリコール言語材料を参照してリコール不可能な負サンプル言語材料を構築し、目標クエリ文と当該負サンプル言語材料との相関度が0であるように配置して当該蒸留データが負サンプルであることを標識し、当該目標クエリ文が検索されたときに当該負サンプル言語材料がリコールされる確率が0であることを示して良い。 Conversely, when constructing distilled data of negative samples in a distilled dataset, non-recallable negative sample language material can be constructed by referring to the target query sentence corresponding to the original semantic search model and a predetermined number of recalled recall language materials, and the distilled data can be marked as a negative sample by arranging the negative sample language material so that the correlation between the target query sentence and the negative sample language material is 0, thereby indicating that the probability that the negative sample language material will be recalled when the target query sentence is searched is 0.

ステップS201~S204は、上述した図1に示した実施形態のステップS101の一実施形態である。 Steps S201 to S204 are an embodiment of step S101 in the embodiment shown in Figure 1 above.

S205において、蒸留データセットに基づいて目標セマンティック検索モデルを訓練する。 At S205, a target semantic search model is trained based on the distilled dataset.

本実施形態のセマンティック検索モデルの訓練方法は、各オリジナルセマンティック検索モデルに対応する目標クエリ文と、それに応じてリコールされた所定数のリコール言語材料とを取得して蒸留データセットを生成し、さらに蒸留データセットに基づいて目標セマンティック検索モデルを訓練する。取得された各オリジナルセマンティック検索モデルに対応する目標クエリ文及びそれに応じてリコールされた所定数のリコール言語材料により、各オリジナルセマンティック検索モデルの能力と性能を十分に表現することができるため、生成された蒸留データセットに各オリジナルセマンティック検索モデルの特性を保持することができる。更に、蒸留データセットに基づいて目標セマンティック検索モデルを訓練する時に、訓練された目標セマンティック検索モデルに少なくとも2つのオリジナルセマンティック検索モデルの検索能力を統合し、単一のセマンティック検索モデルの欠点を克服し、効果的にセマンティック検索の正確性を高めることができる。 The method for training a semantic search model in this embodiment obtains a target query sentence corresponding to each original semantic search model and a predetermined number of recalled linguistic materials recalled accordingly to generate a distilled dataset, and further trains a target semantic search model based on the distilled dataset. The target query sentence corresponding to each original semantic search model obtained and the predetermined number of recalled linguistic materials recalled accordingly can fully express the capabilities and performance of each original semantic search model, so that the generated distilled dataset can retain the characteristics of each original semantic search model. Furthermore, when training a target semantic search model based on the distilled dataset, the search capabilities of at least two original semantic search models can be integrated into the trained target semantic search model, overcoming the shortcomings of a single semantic search model and effectively improving the accuracy of semantic search.

図3は本開示の第3実施形態による概略図である。本実施形態のセマンティック検索モデルの訓練方法は、上述した図1に示した実施形態の技術案をもとに、本開示の技術案をさらに詳細に説明する。図3に示すように、本実施形態のセマンティック検索モデルの訓練方法は、具体的には以下のステップを含むことができる。 Figure 3 is a schematic diagram according to a third embodiment of the present disclosure. The method for training a semantic search model of this embodiment is described in more detail based on the technical solution of the embodiment shown in Figure 1 above. As shown in Figure 3, the method for training a semantic search model of this embodiment can specifically include the following steps:

S301において、各タイプのクエリ文に対応する予め設定されたテストセットに基づいて、少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプを取得する。 In S301, a target query sentence type corresponding to each of at least two original semantic search models is obtained based on a pre-defined test set corresponding to each type of query sentence.

具体的な実現方法は、上述した図2に示す実施例に関する記載を参照することができるので、ここでは詳しく説明しない。 The specific implementation method can be seen in the description of the embodiment shown in Figure 2 above, so it will not be described in detail here.

S302において、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプに基づいて、各オリジナルセマンティック検索モデルに対応する目標クエリ文を取得する。 In S302, a target query sentence corresponding to each original semantic search model is obtained based on the target query sentence type corresponding to each original semantic search model.

S303において、各オリジナルセマンティック検索モデル及び各オリジナルセマンティック検索モデルに対応する目標クエリ文に基づいて、所定数のリコール言語材料をコーパスからリコールする。 In S303, a predetermined number of recall language materials are recalled from the corpus based on each original semantic search model and the target query sentence corresponding to each original semantic search model.

S304において、予め訓練されたファインソートモデルを用いて、各オリジナルセマンティック検索モデルに対応する目標クエリ文と、リコールされた所定数のリコール言語材料とをスクリーニングして蒸留データセットを生成する。 At S304, a pre-trained fine sorting model is used to screen the target query sentences corresponding to each original semantic search model and a predetermined number of recalled linguistic materials to generate a distilled dataset.

ステップS301~S304は、上述した図1に示した実施形態のステップS101の一実施形態である。 Steps S301 to S304 are an embodiment of step S101 in the embodiment shown in Figure 1 above.

上記図2に示した実施例とは異なり、本実施例では、スクリーニングにより蒸留データセットを生成する際に、さらにファインソートモデルを用いて、各オリジナルセマンティック検索モデルに対応する目標クエリ文及びリコールされた所定数のリコール言語材料をスクリーニングして蒸留データセットを生成する。例えば、図4は、本実施形態のセマンティック検索モデルの訓練方法の構成図である。これに応じて、図2に示す実施形態の構成図は、図4のファインソートモデルを除いたリコール結果のスクリーニングであってよい。 Unlike the embodiment shown in FIG. 2 above, in this embodiment, when generating a distilled dataset by screening, a fine sorting model is further used to screen the target query sentences and a predetermined number of recalled linguistic materials corresponding to each original semantic search model to generate a distilled dataset. For example, FIG. 4 is a configuration diagram of a training method for a semantic search model in this embodiment. Accordingly, the configuration diagram of the embodiment shown in FIG. 2 may be the screening of the recall results excluding the fine sorting model in FIG. 4.

本実施形態のニューラルネットワーク構造を用いたオリジナルセマンティック検索モデル及び目標セマンティック検索モデルは、いずれも二重塔構造のモデルを用いて、クエリ文queryと候補言語材料のそれぞれの符号化を実現し、さらに符号化結果に基づいて両者のベクトル類似度を計算することができる。本実施形態のファインソートモデルは、注釈データを用いて事前に訓練することにより得られる。ファインソートモデルは、クエリ文queryと候補言語材料との間のやりとり情報をモデリングすることができ、能力が対応する二重塔構造のモデルよりも優れている。したがって、ファインソートモデルを用いて各オリジナルセマンティック検索モデルのリコール結果にスクリーニングとフィルタリングを行うことにより、蒸留データセットにおける蒸留データの品質を効果的に向上させることができる。 The original semantic search model and the target semantic search model using the neural network structure of this embodiment both use a double-tower structure model to realize the encoding of the query sentence query and the candidate linguistic materials, and further calculate the vector similarity between the two based on the encoding result. The fine sort model of this embodiment is obtained by pre-training using annotation data. The fine sort model can model the interaction information between the query sentence query and the candidate linguistic materials, and its ability is superior to that of the corresponding double-tower structure model. Therefore, by using the fine sort model to screen and filter the recall results of each original semantic search model, the quality of the distilled data in the distilled dataset can be effectively improved.

本開示の一実施形態では、ステップS304は、事前に訓練されたファインソートモデルを使用して、各オリジナルセマンティック検索モデルに対応する目標クエリ文と、リコールされた所定数のリコール言語材料とをスクリーニングして蒸留データセットを生成することは、具体的に以下のステップを含むことができる。 In one embodiment of the present disclosure, step S304, using a pre-trained fine sorting model to screen the target query sentences corresponding to each original semantic search model and the recalled predetermined number of recall linguistic materials to generate a distilled dataset, may specifically include the following steps:

(a1)ファインソートモデル、各オリジナルセマンティック検索モデルに対応する目標クエリ文、及びリコールされた所定数のリコール言語材料に基づいて、正サンプルデータをスクリーニングする。 (a1) Screen positive sample data based on the fine sorting model, the target query sentence corresponding to each original semantic search model, and a predetermined number of recalled linguistic materials.

(b1)ファインソートモデル、各オリジナルセマンティック検索モデルに対応する目標クエリ文、及びリコールされた所定数のリコール言語材料に基づいて、負サンプルデータをスクリーニングする。 (b1) Screening negative sample data based on the fine sorting model, the target query sentence corresponding to each original semantic search model, and a predetermined number of recalled linguistic materials.

(c1)正サンプルデータと負サンプルデータを蒸留データセットに格納する。 (c1) Store the positive sample data and negative sample data in a distilled dataset.

例えば、本実施形態では、ファインソートモデルに基づいて、正サンプルデータと負サンプルデータとを別々にスクリーニングして蒸留データとしてまとめて蒸留データセットを構成することができる。具体的には、蒸留データセットにおける正サンプルデータと負サンプルデータとの比率は、実際の必要に応じて設定することができ、例えば、1:1であっても良く、1:2、1:3、1:4であっても良く、他の比率であっても良く、ここでは限定しない。所望なサンプルの数に応じて対応するサンプルデータをスクリーニングすればよい。 For example, in this embodiment, based on the fine sorting model, the positive sample data and the negative sample data can be separately screened and compiled as distilled data to form a distilled dataset. Specifically, the ratio of positive sample data to negative sample data in the distilled dataset can be set according to actual needs, and may be, for example, 1:1, 1:2, 1:3, 1:4, or other ratios, and is not limited here. The corresponding sample data may be screened according to the number of desired samples.

本実施形態では、蒸留データセットが生成される場合に、サンプルを統合する方法又は蒸留データにおいて、正サンプルデータ及び負サンプルデータを標識しなくてもよい。例えば、各蒸留データには、1つのクエリ文、少なくとも2つのリコール言語材料、及び少なくとも2つのリコール言語材料と当該クエリ文との相関度のランキングが含まれてよい。この形式の蒸留データはソフトラベルデータでもよい。この形式の蒸留データにより目標セマンティック検索モデルを訓練することにより、目標セマンティック検索モデルに、異なるリコール言語材料と同じクエリ文との相関度のスコアランキングを学習させることができる。本実施形態では、ステップS304において、予め訓練されたファインソートモデルを用いて、各オリジナルセマンティック検索モデルに対応する目標クエリ文と、リコールされた所定数のリコール言語材料とをスクリーニングして蒸留データセットを生成することは、以下の3つの場合が考えられる。 In this embodiment, when a distilled dataset is generated, the positive sample data and the negative sample data may not be labeled in the method of integrating samples or in the distilled data. For example, each distilled data may include one query sentence, at least two recall language materials, and a ranking of the correlation degree between the at least two recall language materials and the query sentence. This type of distilled data may be soft-labeled data. By training the target semantic search model with this type of distilled data, the target semantic search model can learn a score ranking of the correlation degree between different recall language materials and the same query sentence. In this embodiment, in step S304, the target query sentence corresponding to each original semantic search model and a predetermined number of recall language materials that have been recalled are screened using a pre-trained fine sorting model to generate a distilled dataset in the following three cases.

第1ケースは直接統合である。この場合、各オリジナルセマンティック検索モデルに基づいて、上述の方式に従って正サンプルデータと負サンプルデータを取得し、次に少なくとも2つのオリジナルセマンティック検索モデルの各々によって生成された正サンプルデータと負サンプルデータとを直接に統合して最終的な蒸留データセットを得る必要がある。すなわち、この場合に得られる蒸留データセットには、オリジナルセマンティック検索モデルごとに蒸留された正サンプルデータと負サンプルデータが十分に含まれている。 The first case is direct integration. In this case, it is necessary to obtain positive sample data and negative sample data according to the above-mentioned method based on each original semantic search model, and then directly integrate the positive sample data and negative sample data generated by each of at least two original semantic search models to obtain a final distilled dataset. That is, the distilled dataset obtained in this case sufficiently contains the positive sample data and negative sample data distilled for each original semantic search model.

例えば、それに応じて、この場合におけるステップ(a1)は、以下のステップを含むことができる。 For example, step (a1) in this case may accordingly include the following steps:

(a2)各オリジナルセマンティック検索モデルに対応する目標クエリ文について、ファインソートモデルを用いて目標クエリ文とそれに応じてリコールされた所定数のリコール言語材料のそれぞれとの相関度スコアを計算する。 (a2) For each target query sentence corresponding to each original semantic search model, calculate a correlation score between the target query sentence and each of a predetermined number of recall linguistic materials recalled correspondingly using the fine sort model.

(b2)相関度スコアが予め設定された閾値より小さいリコール言語材料を、所定数のリコール言語材料の最初のN個から削除する。ここで、Nは1より大きい正整数である。 (b2) Removing recall language materials whose correlation scores are less than a preset threshold from the first N of a predetermined number of recall language materials, where N is a positive integer greater than 1.

(c2)目標クエリ文と、所定数のリコール言語材料における最初のN個のうち残りの各リコール言語材料に基づいて、正サンプルデータを構築する。 (c2) Construct positive sample data based on the target query sentence and each of the remaining recall language materials among the first N in the predetermined number of recall language materials.

例えば、この時点で構築された正サンプルデータには、目標クエリ文、所定数のリコール言語材料における最初のN個のうち相関度スコアが予め設定された閾値以上のリコール言語材料が含まれてよい。このサンプルを正サンプルとして目標セマンティック検索モデルを訓練するため、この時点で正サンプルデータの相関度スコアのラベルを1に再配置することにより、目標セマンティック検索モデルに、この目標クエリ文に基づいて対応する正サンプルデータにおけるリコール言語材料をリコールする能力を学習させることができる。 For example, the positive sample data constructed at this point may include the target query sentence, and the first N recall language materials in a predetermined number of recall language materials that have a correlation score equal to or greater than a preset threshold. In order to train the target semantic search model using these samples as positive samples, the correlation score label of the positive sample data at this point can be rearranged to 1, thereby allowing the target semantic search model to learn the ability to recall the recall language materials in the corresponding positive sample data based on the target query sentence.

例えば、これに応じて、この場合にステップ(b1)は、以下のステップを含むことができる。 For example, in this case step (b1) may accordingly include the following steps:

(a3)各オリジナルセマンティック検索モデルに対応する目標クエリ文について、所定数のリコール言語材料のうちN+1番目以降のリコール言語材料から、相関度スコアが予め設定された閾値より小さいリコール言語材料を選択する。Nは1より大きい正整数である。 (a3) For a target query sentence corresponding to each original semantic search model, select recall language materials whose correlation scores are smaller than a preset threshold from among the N+1th and subsequent recall language materials among a predetermined number of recall language materials. N is a positive integer greater than 1.

(b3)目標クエリ文と、所定数のリコール言語材料におけるN+1番目以降のリコール言語材料から選択された相関度スコアが予め設定された閾値より小さいリコール言語材料とに基づいて負サンプルデータを構築する。 (b3) Construct negative sample data based on the target query sentence and recall language materials selected from the N+1th or later recall language materials in a predetermined number of recall language materials, the correlation score of which is less than a preset threshold value.

同様に、この時点で構築される負サンプルデータには、目標クエリ文と、所定数のリコール言語材料におけるN+1番目以降のリコール言語材料のうち相関度スコアが予め設定された閾値よりも小さいリコール言語材料が含まれてよい。このサンプルを負サンプルとして目標セマンティック検索モデルを訓練するため、この時点で負サンプルデータの相関度スコアのラベルを0に再配置することにより、目標セマンティック検索モデルに、この目標クエリ文に基づいて対応する負サンプルデータにおけるリコール言語材料をリコールしない能力を学習させることができる。 Similarly, the negative sample data constructed at this point may include the target query sentence and recall language materials from the N+1th and subsequent recall language materials in the predetermined number of recall language materials whose correlation scores are smaller than a preset threshold. In order to train the target semantic search model using this sample as a negative sample, the correlation score label of the negative sample data at this point is rearranged to 0, so that the target semantic search model can learn the ability to not recall the recall language materials in the corresponding negative sample data based on this target query sentence.

例えば、所定数を100個とした場合に、Nが20をとることを例にする。各オリジナルセマンティック検索モデルがいずれか一つの目標クエリ文に対してリコールした最初の100個のリコール言語材料について、最初の20個のうち相関度スコアが予め設定された閾値よりも小さいリコール言語材料をとることにより、正サンプルの品質を向上させることができる。一方、負サンプルデータは、20個目から100個目までの中から相関度スコアが予め設定された閾値より小さいリコール言語材料をとって構築することができる。当該予め設定された閾値は、0.1、0.2、又は他の数値のように経験的に設定することができる。この方式を採用すれば、蒸留データセットにおける蒸留データの品質を効果的に向上させることができる。 For example, when the predetermined number is 100, N is 20. The quality of the positive sample can be improved by selecting recall language materials having a correlation score smaller than a preset threshold from the first 20 of the first 100 recall language materials recalled by each original semantic search model for any one target query sentence. On the other hand, the negative sample data can be constructed by selecting recall language materials having a correlation score smaller than a preset threshold from the 20th to 100th recall language materials. The preset threshold can be empirically set to 0.1, 0.2, or other numerical values. By adopting this method, the quality of the distilled data in the distilled dataset can be effectively improved.

第2ケースは交差統合である。この場合に、オリジナルセマンティック検索モデルごとに生成された正サンプルデータを取って蒸留データセットに格納することができる。一方、負サンプルデータは、少なくとも2つのオリジナルセマンティック検索モデルによるすべてのリコール結果からスクリーニングすることができる。すなわち、この場合に得られる蒸留データセットには、オリジナルセマンティック検索モデルごとに蒸留された正サンプルデータが十分に含まれているが、負サンプルデータがオリジナルセマンティック検索モデルの一部のみが蒸留されたものである可能性がある。 The second case is cross-integration. In this case, the positive sample data generated for each original semantic search model can be taken and stored in a distilled dataset. Meanwhile, the negative sample data can be screened from all recall results from at least two original semantic search models. That is, the distilled dataset obtained in this case contains sufficient positive sample data distilled for each original semantic search model, but the negative sample data may be distilled from only a portion of the original semantic search models.

例えば、この場合に応じて、ステップ(b1)において、ファインソートモデル、各オリジナルセマンティック検索モデルに対応する目標クエリ文、及びリコールされた所定数のリコール言語材料に基づいて負サンプルデータをスクリーニングすることは、具体的には以下のステップを含むことができる。 For example, depending on this case, in step (b1), screening the negative sample data based on the fine sorting model, the target query sentence corresponding to each original semantic search model, and the recalled predetermined number of recall linguistic materials may specifically include the following steps:

(a4)各オリジナルセマンティック検索モデルに対応する目標クエリ文について、ファインソートモデルを用いて対応する目標クエリ文と、それに応じてリコールされた所定数のリコール言語材料における各リコール言語材料との相関度スコアを計算する。 (a4) For each target query sentence corresponding to each original semantic search model, calculate a correlation score between the corresponding target query sentence and each recall linguistic material in the predetermined number of recall linguistic materials recalled accordingly using the fine sort model.

(b4)各目標クエリ文と各リコール言語材料の相関度スコアに基づいて、少なくとも2つのオリジナルセマンティック検索モデルによる全てのリコール言語材料から、予め設定された方法に従って負サンプルデータをスクリーニングする。 (b4) Based on the correlation score between each target query sentence and each recall language material, negative sample data is screened from all recall language materials from at least two original semantic search models according to a predetermined method.

例えば、相関度スコアが小さい順に、必要な数の負サンプルデータをスクリーニングすることができる。あるいは、相関度スコアが予め設定された閾値よりも小さい全てのリコール言語材料を直接に取得してもよい。あるいは、負サンプルデータを他の方法でスクリーニングすることも可能であるが、ここでは限定しない。このようにして、少なくとも2つのオリジナルセマンティック検索モデルによるすべてのリコール言語材料を参照して、より品質の高い負サンプルデータを選択し、更に蒸留データセットの品質を向上させることができる。 For example, the required number of negative sample data can be screened in ascending order of correlation score. Alternatively, all recall language materials whose correlation scores are smaller than a preset threshold can be directly obtained. Alternatively, the negative sample data can be screened in other ways, but this is not limited thereto. In this way, by referring to all recall language materials from at least two original semantic search models, higher quality negative sample data can be selected, and the quality of the distilled dataset can be further improved.

第3ケースはソフトラベルデータ統合である。この場合、上記2つの場合とは異なり、少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文と、それに応じてリコールされた所定数のリコール言語材料とを、正と負のサンプルを区別することなく、オリジナルセマンティック検索モデルの元のスコア又はランキングをそのまま保持して統合する。この場合に、蒸留データセットを用いて目標セマンティック検索モデルを訓練する際に、目標セマンティック検索モデルがオリジナルセマンティック検索モデルによる異なるサンプルデータに対するスコア或いはランキングを学習するように訓練する。 The third case is soft-label data integration. In this case, unlike the above two cases, the target query sentences corresponding to at least two original semantic search models and a predetermined number of recalled linguistic materials recalled accordingly are integrated without distinguishing between positive and negative samples, while retaining the original scores or rankings of the original semantic search models. In this case, when training the target semantic search model using the distilled dataset, the target semantic search model is trained to learn the scores or rankings for different sample data by the original semantic search model.

実際の応用では、必要に応じて上記3つの場合のいずれかを選択して蒸留データセットを生成することができる。いずれの方法であっても、正確で合理的かつ効果的な蒸留データセットを得ることができる。 In practical applications, one can choose any of the above three cases to generate a distilled dataset as needed. Either way, an accurate, reasonable, and effective distilled dataset can be obtained.

本実施形態では、上記の方式により、蒸留データセットを生成する際に、できるだけ各オリジナルセマンティック検索モデルが得意とする目標クエリ文タイプを採用して関連するタイプの蒸留データを生成することで、各オリジナルセマンティック検索モデルの利点を最大限に利用して利点のある蒸留データを生成する。たとえば、RocketQAv2モデルの方が問題系queryに対して優れている可能性があるため、このステップで蒸留データセットを生成する際のクエリ文の分布を調整し、RocketQAv 2モデルが問題系のクエリ文を扱う割合を大きくして、より効果的な蒸留データを得ることができる。他のオリジナルセマンティック検索モデルも同様であり、より効果的な蒸留データを得るために、処理に得意なクエリ文のタイプを選択するが、ここでは詳しく説明しない。 In this embodiment, when generating a distilled dataset, the above method is used to generate distilled data of a related type by adopting the target query sentence type that each original semantic search model is good at as much as possible, thereby making the most of the advantages of each original semantic search model to generate advantageous distilled data. For example, since the RocketQAv2 model may be better for problem-based queries, the distribution of query sentences when generating the distilled dataset in this step is adjusted, and the proportion of problem-based query sentences handled by the RocketQAv2 model is increased to obtain more effective distilled data. The same applies to other original semantic search models, and in order to obtain more effective distilled data, a query sentence type that is good at processing is selected, but this will not be described in detail here.

S305において、蒸留データセットに基づいて、目標セマンティック検索モデルを訓練する。 At S305, a target semantic search model is trained based on the distilled dataset.

本実施形態の目標セマンティック検索モデルは、二重塔構造のモデルである。 The target semantic search model in this embodiment is a double tower structure model.

異なる蒸留データセットの生成方式について、異なる訓練方式を用いることができる。例えば、蒸留データセットを生成する前記第1ケース及び第2ケース、すなわち 直接統合と交差統合の生成方式について、hard label方式を用いて訓練し、よくある比較学習訓練方式を用いて、交差エントロピー損失を用いて、ロット内負サンプリングを導入して訓練することができる。ソフトラベルデータ統合方式、すなわち前記蒸留データセットを生成する第3ケースについては、marginMSE方式を用いて訓練を行い、サンプルペア間の採点を学習することができる。この2つの方式は訓練の効果に応じて柔軟に選ぶことができる。 Different training methods can be used for different distilled dataset generation methods. For example, for the first and second cases of generating distilled datasets, i.e., the direct integration and cross integration generation methods, the hard label method can be used for training, and a common comparative learning training method can be used to introduce within-lot negative sampling using cross entropy loss. For the soft label data integration method, i.e., the third case of generating the distilled dataset, the margin MSE method can be used for training to learn the scoring between sample pairs. These two methods can be flexibly selected according to the effect of training.

統合された蒸留データを用いて訓練された二重塔構造の目標セマンティック検索モデルは、複数のteacher、即ちオリジナルセマンティック検索モデルの特徴を統合することができ、しかも蒸留データ生成過程で異なるteacherのデータ分布を制御し、優位性があり、差異が大きい部分だけを保持するため、生成される弱ラベル訓練データを最大限に発揮させることができる。 The double-column target semantic search model trained using the integrated distilled data can integrate the features of multiple teachers, i.e., the original semantic search models, and control the data distribution of different teachers during the distilled data generation process, retaining only the parts that are advantageous and have large differences, thereby making the most of the generated weakly labeled training data.

弱ラベルデータの訓練を経て、二重塔構造の目標セマンティック検索モデルの効果は注釈データによる訓練の結果を上回ることができ、しかもより強い汎化性を持ち、注釈データへの過剰適合を弱め、データ偏差によるロバスト性問題を一部解決した。 After training on weakly labeled data, the effectiveness of the double-tower target semantic search model can exceed the results of training on annotated data, and has stronger generalization, reducing over-fitting to the annotated data, and partially resolving the robustness problem caused by data deviation.

本実施形態のセマンティック検索モデルの訓練方法は、ファインソートモデルにより、各オリジナルセマンティック検索モデルの目標クエリ文及びそれに応じてリコールされた所定数のリコール言語材料を取得して蒸留データセットを生成し、更に蒸留データセットの品質を効果的に向上させた。さらに、蒸留データセットに基づいて目標セマンティック検索モデルを訓練することにより、訓練された目標セマンティック検索モデルの正確性をより良くすることができる。 The method for training a semantic search model in this embodiment uses a fine sorting model to obtain the target query sentences of each original semantic search model and a predetermined number of recalled linguistic materials recalled accordingly to generate a distilled dataset, and further effectively improve the quality of the distilled dataset. Furthermore, by training the target semantic search model based on the distilled dataset, the accuracy of the trained target semantic search model can be improved.

本実施形態のセマンティック検索モデルの訓練方法は、少なくとも2種類のオリジナルセマンティック検索モデルの能力を二重塔構造の目標セマンティック検索モデルに統合することができるため、目標セマンティック検索モデルの検索能力を効果的に向上させることができる。 The method for training a semantic search model in this embodiment can integrate the capabilities of at least two types of original semantic search models into a target semantic search model with a double-tower structure, thereby effectively improving the search capability of the target semantic search model.

本実施形態のセマンティック検索モデルの訓練方法は、少なくとも2つのオリジナルセマンティック検索モデルに疎ベクトル検索モデルが含まれることにより、目標セマンティック検索モデルにある程度の疎ベクトル検索の能力を学習させ、字面のファインソートマッチングのシナリオの解決能力を向上させるため、目標語義検索モデルの汎化能力を向上させ、より良いゼロサンプルにおける分野の移行性能を持たせる。 The training method for the semantic search model in this embodiment includes a sparse vector search model in at least two original semantic search models, so that the target semantic search model learns a certain degree of sparse vector search ability, improves the resolution ability of the fine sort matching scenario of the lexical text, improves the generalization ability of the target semantic search model, and gives it better zero-sample domain transfer performance.

また、本開示の実施形態では、既存の二重塔構造のセマンティック検索モデルに対して、二重塔モデルの構造を変更することなく、二重塔モデルの迅速な配置と高検索効率の特徴を維持し、大規模な検索シナリオに広く適用することができる。 In addition, in the embodiment of the present disclosure, for existing double-tower structured semantic search models, the characteristics of rapid deployment and high search efficiency of the double-tower model are maintained without changing the structure of the double-tower model, and it can be widely applied to large-scale search scenarios.

本実施形態のセマンティック検索モデルの訓練方法は、複数種類のオリジナルセマンティック検索モデルの能力を統合するスキームを適用時に柔軟に拡張することができ、ある面でより能力の高いモデル又はシステムが出現した場合に、このスキームを採用することにより、そのシステムの利点を効果的に吸収し、目標セマンティック検索モデルの性能を向上させることができる。 The method for training a semantic search model in this embodiment can be flexibly expanded when applied using a scheme that integrates the capabilities of multiple types of original semantic search models. When a model or system with higher capabilities in some respect emerges, this scheme can be adopted to effectively absorb the advantages of that system and improve the performance of the target semantic search model.

図5は本発明の第4の実施形態による概略図である。図5に示すように、本実施形態は、少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプであって、オリジナルセマンティック検索モデルが様々なタイプのクエリ文を処理する際に最も正確性の高いクエリ文タイプである目標クエリ文タイプを取得するタイプ取得モジュール501と、少なくとも2つのオリジナルセマンティック検索モデル、及び各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプと、予め構築されたコーパスとに基づいて、蒸留データセットを取得するデータ取得モジュール502と、蒸留データセットに基づいて目標セマンティック検索モデルを訓練する訓練モジュール503と、を備えるセマンティック検索モデルの訓練装置500を提供する。 Figure 5 is a schematic diagram according to a fourth embodiment of the present invention. As shown in Figure 5, this embodiment provides a semantic search model training device 500 including: a type acquisition module 501 for acquiring a target query sentence type corresponding to each of at least two original semantic search models, the target query sentence type being the most accurate query sentence type when the original semantic search models process various types of query sentences; a data acquisition module 502 for acquiring a distilled dataset based on at least two original semantic search models, the target query sentence types corresponding to each original semantic search model, and a pre-constructed corpus; and a training module 503 for training the target semantic search model based on the distilled dataset.

本実施形態のセマンティック検索モデルの訓練装置500は、上記モジュールを用いてセマンティック検索モデルの訓練を実現する実現原理及び技術的効果は、上記関連方法の実施形態の実現と同様である。詳細は上記関連方法の実施形態の記載を参照することができ、ここでは詳しく説明しない。 The implementation principle and technical effect of the semantic search model training device 500 of this embodiment, which uses the above modules to realize training of a semantic search model, are similar to those of the implementation of the embodiment of the related method described above. For details, please refer to the description of the embodiment of the related method described above, and a detailed description will not be given here.

図6は本開示の第5実施形態による概略図である。本実施形態は、セマンティック検索モデルの訓練装置600を提供し、上述した図5に示す実施形態の技術案に加えて、本開示の技術案をさらに詳細に説明する。図6に示されるように、本実施形態は、図5に示される同名且つ同機能のモジュールであるタイプ取得モジュール601と、データ取得モジュール602と、訓練モジュール603とを備えるセマンティック検索モデルの訓練装置600を提供する。 Figure 6 is a schematic diagram according to a fifth embodiment of the present disclosure. This embodiment provides a training device 600 for a semantic search model, which further describes the technical solution of the present disclosure in addition to the technical solution of the embodiment shown in Figure 5 above. As shown in Figure 6, this embodiment provides a training device 600 for a semantic search model, which includes a type acquisition module 601, a data acquisition module 602, and a training module 603, which are modules with the same names and functions as those shown in Figure 5.

ここで、データ取得モジュール602は、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプに基づいて、各オリジナルセマンティック検索モデルに対応する目標クエリ文を取得する文取得部6021と、各オリジナルセマンティック検索モデル及び各オリジナルセマンティック検索モデルに対応する目標クエリ文に基づいて、コーパスから所定数のリコール言語材料をリコールする言語材料取得部6022と、各オリジナルセマンティック検索モデルに対応する目標クエリ文と、それに応じてリコールされた所定数のリコール言語材料とに基づいて蒸留データセットを生成する生成部6023と、を備える。 Here, the data acquisition module 602 includes a sentence acquisition unit 6021 that acquires a target query sentence corresponding to each original semantic search model based on a target query sentence type corresponding to each original semantic search model, a language material acquisition unit 6022 that recalls a predetermined number of recall language materials from the corpus based on each original semantic search model and the target query sentence corresponding to each original semantic search model, and a generation unit 6023 that generates a distilled dataset based on the target query sentence corresponding to each original semantic search model and the predetermined number of recall language materials recalled accordingly.

さらに、本開示の一実施形態では、タイプ取得モジュール601は、各タイプのクエリ文に対応する予め設定されたテストセットに基づいて、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプを取得する。 Furthermore, in one embodiment of the present disclosure, the type acquisition module 601 acquires a target query sentence type corresponding to each original semantic search model based on a pre-set test set corresponding to each type of query sentence.

さらに、本開示の一実施形態では、タイプ取得モジュール601は、各オリジナルセマンティック検索モデルの属性に基づいて、各オリジナルセマンティック検索モデルに対応する目標クエリ文タイプを取得する。 Furthermore, in one embodiment of the present disclosure, the type acquisition module 601 acquires a target query sentence type corresponding to each original semantic search model based on the attributes of each original semantic search model.

さらに、本開示の一実施形態では、生成部6023は、あらかじめ訓練されたファインソートモデルを用いて、各オリジナルセマンティック検索モデルに対応する目標クエリ文及びそれに応じてリコールされた所定数のリコール言語材料をスクリーニングして蒸留データセットを生成する。 Furthermore, in one embodiment of the present disclosure, the generation unit 6023 uses a pre-trained fine sorting model to screen the target query sentences corresponding to each original semantic search model and a predetermined number of recalled linguistic materials recalled accordingly to generate a distilled dataset.

さらに、本開示の一実施形態では、生成部6023は、ファインソートモデル、各オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた所定数のリコール言語材料に基づいて、正サンプルデータをスクリーニングし、ファインソートモデル、各オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた所定数のリコール言語材料に基づいて、負サンプルデータをスクリーニングし、正サンプルデータと負サンプルデータを蒸留データセットに格納する。 Furthermore, in one embodiment of the present disclosure, the generation unit 6023 screens positive sample data based on the fine sorting model, the target query sentence corresponding to each original semantic search model, and a predetermined number of recall linguistic materials recalled accordingly, and screens negative sample data based on the fine sorting model, the target query sentence corresponding to each original semantic search model, and a predetermined number of recall linguistic materials recalled accordingly, and stores the positive sample data and the negative sample data in a distilled dataset.

さらに、本開示の一実施形態では、生成部6023は、各オリジナルセマンティック検索モデルに対応する目標クエリ文について、ファインソートモデルを用いて、目標クエリ文と、それに応じてリコールされた所定数のリコール言語材料のそれぞれとの相関度スコアを計算し、所定数のリコール言語材料の最初のN(Nは1より大きい正整数である)個から相関度スコアが予め設定された閾値より小さいリコール言語材料を削除し、目標クエリ文と、所定数のリコール言語材料の最初のN個のうち残りの各リコール言語材料とに基づいて、正サンプルデータを構築する。 Furthermore, in one embodiment of the present disclosure, the generation unit 6023 uses a fine sorting model to calculate a correlation score between the target query sentence and each of a predetermined number of recall linguistic materials recalled correspondingly for a target query sentence corresponding to each original semantic search model, deletes recall linguistic materials having a correlation score smaller than a preset threshold from the first N (N is a positive integer greater than 1) of the predetermined number of recall linguistic materials, and constructs positive sample data based on the target query sentence and each of the remaining recall linguistic materials among the first N of the predetermined number of recall linguistic materials.

さらに、本開示の一実施形態では、生成部6023は、各オリジナルセマンティック検索モデルに対応する目標クエリ文について、所定数のリコール言語材料のうちN+1(Nは1より大きい正整数である)番目以降のリコール言語材料の中から、相関度スコアが予め設定された閾値よりも小さいリコール言語材料を選択し、目標クエリ文と、所定数のリコール言語材料のうちN+1番目以降のリコール言語材料から選択された相関度スコアが予め設定された閾値よりも小さいリコール言語材料とに基づいて、負サンプルデータを構築する。 Furthermore, in one embodiment of the present disclosure, for a target query sentence corresponding to each original semantic search model, the generation unit 6023 selects recall language materials having a correlation score smaller than a preset threshold from among the N+1th (N is a positive integer greater than 1) or later recall language materials among a predetermined number of recall language materials, and constructs negative sample data based on the target query sentence and the recall language materials having a correlation score smaller than a preset threshold selected from the N+1th or later recall language materials among the predetermined number of recall language materials.

さらに、本開示の一実施形態では、生成部6023は、各オリジナルセマンティック検索モデルに対応する目標クエリ文について、ファインソートモデルを用いて、対応する目標クエリ文と、それに応じてリコールされた所定数のリコール言語材料のそれぞれとの相関度スコアを計算し、少なくとも2つのオリジナルセマンティック検索モデルによる全てのリコール言語材料から、予め設定された方法で、各目標クエリ文及び各リコール言語材料の相関度スコアに基づいて負サンプルデータをスクリーニングする。 Furthermore, in one embodiment of the present disclosure, the generation unit 6023 uses a fine sorting model to calculate, for each target query sentence corresponding to each original semantic search model, a correlation score between the corresponding target query sentence and each of a predetermined number of recall language materials recalled accordingly, and screens negative sample data from all recall language materials from at least two original semantic search models in a predetermined manner based on the correlation scores of each target query sentence and each recall language material.

本実施形態のセマンティック検索モデルの訓練装置600は、上記モジュールを用いてセマンティック検索モデルの訓練を実現する実現原理及び技術的効果は、上記関連方法の実施形態の実現と同様である。詳細は上記関連方法の実施形態の記載を参照することができ、ここでは詳しく説明しない。 The implementation principle and technical effect of the semantic search model training device 600 of this embodiment, which uses the above modules to realize training of a semantic search model, are similar to those of the implementation of the above-mentioned related method embodiment. For details, please refer to the description of the above-mentioned related method embodiment, and a detailed description will not be given here.

本開示の技術案において、関わるユーザの個人情報の取得、記憶及び応用等は、いずれも関連法律法規の規定に適合しており、公序良俗に反するものではない。 In the technical solution disclosed herein, the acquisition, storage, application, etc. of personal information of the users involved conforms to the provisions of relevant laws and regulations and is not contrary to public order and morals.

本開示の実施形態によれば、本開示は更に、電子デバイス、可読記憶媒体、及びコンピュータプログラム製品を提供する。 According to embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.

図7は、本開示の実施形態を実施可能な例示的な電子デバイス700の概略的なブロック図を示した。電子デバイスは、ラップトップ、デスクトップコンピュータ、ワークベンチ、サーバ、ブレードサーバ、大型コンピュータ、及び他の適切なコンピュータのような、様々な形態のデジタルコンピュータを表す。電子デバイスは更に、PDA、携帯電話、スマートフォン、ウェアラブルデバイス、及び他の同様のコンピューティングデバイスなどの様々な形態のモバイルデバイスを表すことができる。本明細書に示す構成要素、それらの接続及び関係、ならびにそれらの機能は、単なる一例であり、本明細書に記載及び/又は要求された本開示の実現を制限することではない。 FIG. 7 shows a schematic block diagram of an exemplary electronic device 700 capable of implementing embodiments of the present disclosure. The electronic device represents various forms of digital computers, such as laptops, desktop computers, workbenches, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as PDAs, mobile phones, smartphones, wearable devices, and other similar computing devices. The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present disclosure as described and/or claimed herein.

図7に示すように、デバイス700は、読み取り専用メモリ(ROM)702に記憶されたコンピュータプログラム、又は記憶手段708からランダムアクセスメモリ(RAM)703にロードされたコンピュータプログラムに従って、様々な適切な動作及び処理を実行することができる演算手段701を含む。RAM703には、デバイス700の動作に必要な各種のプログラムやデータが記憶されてもよい。演算手段701、ROM702及びRAM703は、バス704を介して接続されている。入出力(I/O)インターフェース705もバス704に接続されている。 As shown in FIG. 7, the device 700 includes a computing means 701 capable of performing various appropriate operations and processes according to a computer program stored in a read only memory (ROM) 702 or loaded from a storage means 708 into a random access memory (RAM) 703. The RAM 703 may store various programs and data necessary for the operation of the device 700. The computing means 701, the ROM 702, and the RAM 703 are connected via a bus 704. An input/output (I/O) interface 705 is also connected to the bus 704.

例えばキーボード、マウス等の入力手段706と、例えば様々なタイプのディスプレイ、スピーカ等の出力手段707と、例えば磁気ディスク、光ディスク等の記憶手段708と、例えばネットワークカード、モデム、無線通信トランシーバなどの通信手段709を含むデバイス700の複数の構成要素は、I/Oインターフェース705に接続される。通信手段709は、デバイス700が例えばインターネットのコンピュータネットワーク及び/又は様々な電気通信ネットワークを介して他のデバイスと情報/データを交換することを可能にする。 Several components of the device 700 are connected to the I/O interface 705, including input means 706, e.g., a keyboard, a mouse, etc., output means 707, e.g., various types of displays, speakers, etc., storage means 708, e.g., a magnetic disk, an optical disk, etc., and communication means 709, e.g., a network card, a modem, a wireless communication transceiver, etc. The communication means 709 allows the device 700 to exchange information/data with other devices via a computer network, e.g., the Internet, and/or various telecommunication networks.

演算手段701は、処理能力及び演算能力を有する様々な汎用及び/又は専用の処理コンポーネントであってよい。演算手段701のいくつかの例は、中央処理ユニット(CPU)、グラフィック処理ユニット(GPU)、様々な専用の人工知能(AI)演算チップ、機械学習モデルアルゴリズムを実行する様々な演算ユニット、デジタル信号プロセッサ(DSP)、及び任意の適切なプロセッサ、コントローラ、マイクロコントローラなどを含むが、これらに限定されない。演算手段701は、上述した様々な方法及び処理、例えば本開示の前記方法を実行する。例えば、幾つかの実施形態では、本開示の前記方法は、例えば記憶手段708のような機械可読媒体に物理的に組み込まれたコンピュータソフトウェアプログラムとして実装されてもよい。幾つかの実施形態では、コンピュータプログラムの一部又は全部は、ROM702及び/又は通信手段709を介してデバイス700にロード及び/又はインストールすることができる。コンピュータプログラムがRAM703にロードされ、演算手段701により実行されると、前記本開示の上記方法の1つ又は複数のステップを実行することができる。代替的に、他の実施形態では、演算手段701は、本開示の前記方法を実行するように、他の任意の適切な方法で(例えば、ファームウェアを介する)構成されてもよい。 The computing means 701 may be various general-purpose and/or dedicated processing components having processing and computing capabilities. Some examples of the computing means 701 include, but are not limited to, a central processing unit (CPU), a graphic processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing means 701 performs various methods and processes described above, such as the methods of the present disclosure. For example, in some embodiments, the methods of the present disclosure may be implemented as a computer software program physically embodied in a machine-readable medium, such as the storage means 708. In some embodiments, some or all of the computer program may be loaded and/or installed in the device 700 via the ROM 702 and/or the communication means 709. When the computer program is loaded into the RAM 703 and executed by the computing means 701, one or more steps of the above methods of the present disclosure may be performed. Alternatively, in other embodiments, the computing means 701 may be configured in any other suitable manner (e.g., via firmware) to perform the methods of the present disclosure.

本明細書で前述したシステム及び技術の様々な実施形態は、デジタル電子回路システム、集積回路システム、フィールドプログラマブルゲートアレイ(FPGA)、専用集積回路(ASIC)、専用標準製品(ASSP)、システムオンチップシステム(SOC)、ロードプログラマブル論理デバイス(CPLD)、コンピュータハードウェア、ファームウェア、ソフトウェア、及び/又はこれらの組み合わせにおいて実装されてもよい。これらの様々な実施形態は、1つ又は複数のコンピュータプログラムで実施されることを含んで良い。当該1つ又は複数のコンピュータプログラムは、少なくとも1つのプログラマブルプロセッサを含むプログラマブルシステム上で実行及び/又は解釈することができる。当該プログラマブルプロセッサは、専用又は汎用のプログラマブルプロセッサであって、記憶システム、少なくとも1つの入力装置、及び少なくとも1つの出力装置からデータ及び命令を受信し、当該記憶システム、当該少なくとも1つの入力装置、及び当該少なくとも1つの出力装置にデータ及び命令を転送することができる。 Various embodiments of the systems and techniques described herein may be implemented in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being embodied in one or more computer programs. The one or more computer programs may be executed and/or interpreted on a programmable system that includes at least one programmable processor. The programmable processor may be a dedicated or general purpose programmable processor that is capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.

本開示の方法を実施するためのプログラムコードは、1つ又は複数のプログラミング言語の任意の組み合わせを用いて記述することができる。これらのプログラムコードは、汎用コンピュータ、専用コンピュータ、又は他のプログラマブルデータ処理装置のプロセッサ又はコントローラに提供することにより、プログラムコードがプロセッサ又はコントローラにより実行されると、フローチャート及び/又はブロック図に指定された機能/動作を実行するようにすることができる。プログラムコードは、全てがマシン上で実行されても良く、一部がマシン上で実行されても良く、スタンドアロンパッケージとして一部的にマシン上で実行され且つ一部的にリモートマシン上で実行され、或いは全てがリモートマシン又はサーバ上で実行されても良い。 Program codes for implementing the methods of the present disclosure can be written using any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatus such that, when executed by the processor or controller, the program codes perform the functions/operations specified in the flowcharts and/or block diagrams. The program codes can be executed entirely on the machine, partially on the machine, as a stand-alone package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

本開示の文脈では、機械可読媒体は、有形の媒体であって、命令実行システム、装置又はデバイスにより使用され、或いは命令実行システム、装置又はデバイスと合わせて使用されるプログラムを含むか記憶することができる。機械可読媒体は、機械可読信号媒体又は機械可読記憶媒体であってよい。機械可読媒体は、電子的、磁気的、光学的、電磁気的、赤外線的、又は半導体的なシステム、装置又はデバイス、あるいはこれらの任意の適切な組み合わせを含んで良いが、これらに限定されない。機械可読記憶媒体のより具体的な例は、1つ又は複数のラインに基づく電気的接続、ポータブルコンピュータディスク、ハードディスク、ランダムアクセスメモリ(RAM)、読み取り専用メモリ(ROM)、消去可能プログラマブル読み取り専用メモリ(EPROM又はフラッシュメモリ)、光ファイバ、携帯型コンパクトディスク読み取り専用メモリ(CD-ROM)、光学記憶装置、磁気記憶装置、又はこれらの任意の適切な組み合わせを含む。 In the context of this disclosure, a machine-readable medium is a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More specific examples of machine-readable storage media include one or more line-based electrical connections, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination thereof.

ユーザとのインタラクションを提供するために、本明細書に記載されたシステム及び技術は、ユーザに情報を表示するための表示装置(例えば、CRT(陰極線管)又はLCD(液晶ディスプレイ)モニタ)と、ユーザにより入力をコンピュータに提供するキーボード及びポインティングデバイス(例えば、マウス又はトラックボール)と備えるコンピュータ上に実施されてよい。他の種類の装置は、ユーザとのインタラクションを提供するためにも使用され得る。例えば、ユーザに提供されるフィードバックは、任意の形態のセンシングフィードバック(例えば、視覚フィードバック、聴覚フィードバック、又は触覚フィードバック)であって良く、ユーザからの入力を任意の形式(音入力、音声入力、又は触覚入力を含む)で受信して良い。 To provide interaction with a user, the systems and techniques described herein may be implemented on a computer that includes a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user, and a keyboard and pointing device (e.g., a mouse or trackball) for providing input to the computer by the user. Other types of devices may also be used to provide interaction with a user. For example, feedback provided to the user may be any form of sensing feedback (e.g., visual feedback, auditory feedback, or haptic feedback), and input from the user may be received in any form (including sound input, speech input, or haptic input).

本明細書に記載されたシステム及び技術は、バックエンド構成要素を含むコンピューティングシステム(例えば、データサーバとする)、又はミドルウェア構成要素を含むコンピューティングシステム(例えば、アプリケーションサーバ)、又はフロントエンド構成要素を含むコンピューティングシステム(例えば、グラフィカルユーザインターフェースもしくはウェブブラウザを有するクライアントコンピュータであり、ユーザは、当該グラフィカルユーザインターフェースもしくは当該ウェブブラウザを通じて本明細書で説明されるシステムと技術の実施形態とインタラクションすることができる)、そのようなバックエンド構成要素、ミドルウェア構成要素、もしくはフロントエンド構成要素の任意の組合せを含むコンピューティングシステムに実施されることが可能である。システムの構成要素は、任意の形態又は媒体のデジタルデータ通信(例えば、通信ネットワーク)によって相互に接続されることが可能である。通信ネットワークの例は、ローカルエリアネットワーク(「LAN」)、ワイド・エリア・ネットワーク(「WAN」)、インターネットワークを含む。 The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a client computer having a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or any combination of such back-end, middleware, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), and an internetwork.

コンピュータシステムは、クライアントとサーバーを含み得る。クライアントとサーバーは、一般的に互いから遠く離れており、通常は、通信ネットワークを通じてインタラクトする。クライアントとサーバとの関係は、相応するコンピュータ上で実行され、互いにクライアント-サーバの関係を有するコンピュータプログラムによって生じる。サーバはクラウドサーバであっても良く、分散システムのサーバであっても良く、ブロックチェーンを組み合わせたサーバであってもよい。 The computer system may include clients and servers. The clients and servers are generally remote from each other and typically interact through a communication network. The relationship between the clients and servers arises by computer programs running on the corresponding computers and having a client-server relationship with each other. The servers may be cloud servers, servers in a distributed system, or servers in combination with a blockchain.

以上で示された様々な形式のフローを使用して、ステップを並べ替え、追加、又は削除できることを理解されたい。例えば、本開示に説明される各ステップは、並列の順序又は順次的な順序で実施されてもよいし、又は異なる順序で実行されてもよく、本開示で開示された技術案の望ましい結果が達成できる限り、ここで制限されない。 It should be understood that steps can be rearranged, added, or removed using the various types of flows shown above. For example, each step described in this disclosure may be performed in a parallel order or sequential order, or may be performed in a different order, and is not limited thereto, so long as the desired results of the technical proposal disclosed in this disclosure are achieved.

上記の具体的な実施形態は本開示の保護範囲に対する制限を構成しない。設計要件及び他の要因に従って、様々な修正、組み合わせ、部分的組み合わせ及び置換を行うことができることを当業者は理解するべきである。本開示の精神及び原則の範囲内で行われる修正、同等の置換、改善は、何れも本開示の保護範囲内に含まれるべきである。 The above specific embodiments do not constitute limitations on the scope of protection of the present disclosure. Those skilled in the art should understand that various modifications, combinations, subcombinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure should be included within the scope of protection of the present disclosure.

Claims (21)

コンピュータが実行する、セマンティック検索モデルの訓練方法であって、
少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプであって、前記オリジナルセマンティック検索モデルが様々なタイプのクエリ文を処理する際に最も正確性の高いクエリ文タイプである目標クエリ文タイプを取得することと、
少なくとも2つのオリジナルセマンティック検索モデルと、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文タイプと、予め構築されたコーパスとに基づいて、蒸留データセットを取得することと、
蒸留データセットに基づいて、目標セマンティック検索モデルを訓練することと、を含む、
セマンティック検索モデルの訓練方法。
1. A computer-implemented method for training a semantic search model, comprising:
Obtaining a target query sentence type corresponding to each of at least two original semantic search models, the target query sentence type being the most accurate query sentence type when the original semantic search models process various types of query sentences;
Obtaining a distilled dataset based on at least two original semantic search models, a target query sentence type corresponding to each of the original semantic search models, and a pre-constructed corpus;
training a target semantic search model based on the distilled dataset;
How to train a semantic search model.
少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプを取得することは、
各種タイプのクエリ文に対応する予め設定されたテストセットに基づいて、各前記オリジナルセマンティック検索モデルに対応する前記目標クエリ文タイプを取得すること、を含む、
請求項1に記載のセマンティック検索モデルの訓練方法。
Obtaining a target query sentence type corresponding to each of the at least two original semantic search models includes:
Obtaining the target query sentence type corresponding to each of the original semantic search models based on a pre-defined test set corresponding to various types of query sentences;
The method for training a semantic search model according to claim 1 .
少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプを取得することは、
各前記オリジナルセマンティック検索モデルの属性に基づいて、各前記オリジナルセマンティック検索モデルに対応する前記目標クエリ文タイプを取得すること、を含む、
請求項1に記載のセマンティック検索モデルの訓練方法。
Obtaining a target query sentence type corresponding to each of the at least two original semantic search models includes:
obtaining the target query sentence type corresponding to each of the original semantic search models based on attributes of each of the original semantic search models;
The method for training a semantic search model according to claim 1 .
少なくとも2つのオリジナルセマンティック検索モデルと、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文タイプと、予め構築されたコーパスとに基づいて、蒸留データセットを取得することは、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文タイプに基づいて、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文を取得することと、
各前記オリジナルセマンティック検索モデルと、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文とに基づいて、前記コーパスから所定数のリコール言語材料をリコールすることと、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料とに基づいて前記蒸留データセットを生成することと、を含む、
請求項1~3のいずれか1項に記載のセマンティック検索モデルの訓練方法。
Obtaining a distilled dataset based on at least two original semantic search models, a target query sentence type corresponding to each of the original semantic search models, and a pre-constructed corpus includes:
Obtaining a target query sentence corresponding to each of the original semantic search models according to a target query sentence type corresponding to each of the original semantic search models;
Recalling a predetermined number of recall language materials from the corpus based on each of the original semantic search models and a target query sentence corresponding to each of the original semantic search models;
generating the distilled dataset based on target query sentences corresponding to each of the original semantic search models and the predetermined number of recall linguistic materials recalled accordingly;
A method for training a semantic search model according to any one of claims 1 to 3.
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料とに基づいて前記蒸留データセットを生成することは、
予め訓練されたファインソートモデルを使用して、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料とをスクリーニングして前記蒸留データセットを生成すること、を含む、
請求項4に記載のセマンティック検索モデルの訓練方法。
generating the distilled dataset based on the target query sentences corresponding to each of the original semantic search models and the predetermined number of recall linguistic materials recalled accordingly,
using a pre-trained fine sorting model to screen the target query sentences corresponding to each of the original semantic search models and the predetermined number of recalled linguistic materials recalled accordingly to generate the distilled dataset;
The method for training a semantic search model according to claim 4.
予め訓練されたファインソートモデルを使用して、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料とをスクリーニングして前記蒸留データセットを生成することは、
前記ファインソートモデル、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた前記所定数のリコール言語材料に基づいて、正サンプルデータをスクリーニングすることと、
前記ファインソートモデル、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた前記所定数のリコール言語材料に基づいて、負サンプルデータをスクリーニングすることと、
前記正サンプルデータ及び前記負サンプルデータを前記蒸留データセットに格納することと、を含む、
請求項5に記載のセマンティック検索モデルの訓練方法。
Using a pre-trained fine sorting model to screen the target query sentences corresponding to each of the original semantic search models and the predetermined number of recall linguistic materials recalled accordingly to generate the distilled dataset,
Screening positive sample data based on the fine sorting model, the target query sentence corresponding to each of the original semantic search models, and the predetermined number of recall linguistic materials recalled accordingly;
Screening negative sample data based on the fine sorting model, the target query sentence corresponding to each of the original semantic search models, and the predetermined number of recall linguistic materials recalled accordingly;
storing the positive sample data and the negative sample data in the distilled data set.
The method for training a semantic search model according to claim 5.
前記ファインソートモデル、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた前記所定数のリコール言語材料に基づいて、正サンプルデータをスクリーニングすることは、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文について、前記ファインソートモデルを用いて、前記目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料のそれぞれとの相関度スコアを計算することと、
前記所定数のリコール言語材料における最初のN(Nは1より大きい正整数である)個から前記相関度スコアが予め設定された閾値よりも小さいリコール言語材料を削除することと、
前記目標クエリ文と、前記所定数のリコール言語材料における最初のN個のうち残りの各リコール言語材料とに基づいて、前記正サンプルデータを構築することと、を含む、
請求項6に記載のセマンティック検索モデルの訓練方法。
Screening positive sample data based on the fine sorting model, the target query sentence corresponding to each of the original semantic search models, and the predetermined number of recall linguistic materials recalled accordingly,
For each target query sentence corresponding to the original semantic search model, calculating a correlation score between the target query sentence and each of the predetermined number of recall linguistic materials recalled correspondingly using the fine sort model;
removing recall language materials having the correlation score smaller than a preset threshold from the first N (N is a positive integer greater than 1) of the predetermined number of recall language materials;
constructing the positive sample data based on the target query sentence and each remaining recall linguistic material among the first N in the predetermined number of recall linguistic materials;
The method for training a semantic search model according to claim 6.
前記ファインソートモデル、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた前記所定数のリコール言語材料に基づいて、負サンプルデータをスクリーニングすることは、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文について、前記所定数のリコール言語材料におけるN+1(Nは1より大きい正整数である)番目以降のリコール言語材料から、相関度スコアが予め設定された閾値より小さいリコール言語材料を選択することと、
前記目標クエリ文と、前記所定数のリコール言語材料におけるN+1番目以降のリコール言語材料から選択された相関度スコアが予め設定された閾値より小さいリコール言語材料とに基づいて、負サンプルデータを構築することと、を含む、
請求項6に記載のセマンティック検索モデルの訓練方法。
Screening negative sample data based on the fine sorting model, the target query sentence corresponding to each of the original semantic search models, and the predetermined number of recall linguistic materials recalled accordingly,
For each target query sentence corresponding to the original semantic search model, select recall language materials having a correlation score smaller than a preset threshold from among the N+1th (N is a positive integer greater than 1) or later recall language materials in the predetermined number of recall language materials;
and constructing negative sample data based on the target query sentence and recall language materials selected from the N+1th or later recall language materials in the predetermined number of recall language materials, the correlation score of which is less than a preset threshold value.
The method for training a semantic search model according to claim 6.
前記ファインソートモデル、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた前記所定数のリコール言語材料に基づいて、負サンプルデータをスクリーニングすることは、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文について、前記ファインソートモデルを用いて、対応する前記目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料のそれぞれとの相関度スコアを計算することと、
前記少なくとも2つのオリジナルセマンティック検索モデルによるすべてのリコール言語材料から、予め設定された方法で、各前記目標クエリ文及び各前記リコール言語材料の相関度スコアに基づいて前記負サンプルデータをスクリーニングすることと、を含む、
請求項6に記載のセマンティック検索モデルの訓練方法。
Screening negative sample data based on the fine sorting model, the target query sentence corresponding to each of the original semantic search models, and the predetermined number of recall linguistic materials recalled accordingly,
For each target query sentence corresponding to the original semantic search model, calculating a correlation score between the corresponding target query sentence and each of the predetermined number of recall linguistic materials recalled correspondingly using the fine sort model;
and screening the negative sample data from all recall language materials according to the at least two original semantic search models based on a correlation score between each of the target query sentences and each of the recall language materials in a preset manner.
The method for training a semantic search model according to claim 6.
セマンティック検索モデルの訓練装置であって、
少なくとも2つのオリジナルセマンティック検索モデルのそれぞれに対応する目標クエリ文タイプであって、前記オリジナルセマンティック検索モデルが様々なタイプのクエリ文を処理する際に最も正確性の高いクエリ文タイプである目標クエリ文タイプを取得するタイプ取得モジュールと、
少なくとも2つのオリジナルセマンティック検索モデルと、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文タイプと、予め構築されたコーパスとに基づいて、蒸留データセットを取得するデータ取得モジュールと、
蒸留データセットに基づいて、目標セマンティック検索モデルを訓練する訓練モジュールと、を備える、
セマンティック検索モデルの訓練装置。
An apparatus for training a semantic search model, comprising:
a type acquisition module for acquiring a target query sentence type corresponding to each of at least two original semantic search models, the target query sentence type being the most accurate query sentence type when the original semantic search model processes various types of query sentences;
A data acquisition module for acquiring a distilled dataset based on at least two original semantic search models, a target query sentence type corresponding to each of the original semantic search models, and a pre-constructed corpus;
a training module for training a target semantic search model based on the distilled dataset;
A training device for semantic retrieval models.
前記タイプ取得モジュールは、
各種タイプのクエリ文に対応する予め設定されたテストセットに基づいて、各前記オリジナルセマンティック検索モデルに対応する前記目標クエリ文タイプを取得する、
請求項10に記載のセマンティック検索モデルの訓練装置。
The type acquisition module includes:
Obtaining the target query sentence type corresponding to each of the original semantic search models according to a pre-defined test set corresponding to various types of query sentences;
An apparatus for training a semantic search model according to claim 10.
前記タイプ取得モジュールは、
各前記オリジナルセマンティック検索モデルの属性に基づいて、各前記オリジナルセマンティック検索モデルに対応する前記目標クエリ文タイプを取得する、
請求項10に記載のセマンティック検索モデルの訓練装置。
The type acquisition module includes:
obtaining the target query sentence type corresponding to each of the original semantic search models based on the attributes of each of the original semantic search models;
An apparatus for training a semantic search model according to claim 10.
前記データ取得モジュールは、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文タイプに基づいて、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文を取得する文取得部と、
各前記オリジナルセマンティック検索モデルと、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文とに基づいて、前記コーパスから所定数のリコール言語材料をリコールする言語材料取得部と、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料とに基づいて前記蒸留データセットを生成する生成部と、を備える、
請求項10~12のいずれか1項に記載のセマンティック検索モデルの訓練装置。
The data acquisition module includes:
a sentence acquisition unit that acquires a target query sentence corresponding to each of the original semantic search models according to a target query sentence type corresponding to each of the original semantic search models;
a language material acquisition unit that recalls a predetermined number of recall language materials from the corpus based on each of the original semantic search models and a target query sentence corresponding to each of the original semantic search models;
A generator that generates the distilled dataset based on a target query sentence corresponding to each of the original semantic search models and the predetermined number of recall linguistic materials recalled accordingly.
An apparatus for training a semantic search model according to any one of claims 10 to 12.
前記生成部は、
予め訓練されたファインソートモデルを使用して、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料とをスクリーニングして前記蒸留データセットを生成する、
請求項13に記載のセマンティック検索モデルの訓練装置。
The generation unit is
Using a pre-trained fine sorting model, screen the target query sentences corresponding to each of the original semantic search models and the predetermined number of recalled linguistic materials recalled accordingly to generate the distilled dataset.
An apparatus for training a semantic search model according to claim 13.
前記生成部は、
前記ファインソートモデル、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた前記所定数のリコール言語材料に基づいて、正サンプルデータをスクリーニングし、
前記ファインソートモデル、各前記オリジナルセマンティック検索モデルに対応する目標クエリ文、及びそれに応じてリコールされた前記所定数のリコール言語材料に基づいて、負サンプルデータをスクリーニングし、
前記正サンプルデータ及び前記負サンプルデータを前記蒸留データセットに格納する、
請求項14に記載のセマンティック検索モデルの訓練装置。
The generation unit is
Screening positive sample data based on the fine sorting model, the target query sentence corresponding to each of the original semantic search models, and the predetermined number of recall linguistic materials recalled accordingly;
Screening negative sample data based on the fine sorting model, the target query sentence corresponding to each of the original semantic search models, and the predetermined number of recall linguistic materials recalled accordingly;
storing the positive sample data and the negative sample data in the distilled data set;
An apparatus for training a semantic search model according to claim 14.
前記生成部は、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文について、前記ファインソートモデルを用いて、前記目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料のそれぞれとの相関度スコアを計算し、
前記所定数のリコール言語材料における最初のN(Nは1より大きい正整数である)個から前記相関度スコアが予め設定された閾値よりも小さいリコール言語材料を削除し、
前記目標クエリ文と、前記所定数のリコール言語材料における最初のN個のうち残りの各リコール言語材料とに基づいて、前記正サンプルデータを構築する、
請求項15に記載のセマンティック検索モデルの訓練装置。
The generation unit is
For each target query sentence corresponding to the original semantic search model, calculate a correlation score between the target query sentence and each of the predetermined number of recall linguistic materials recalled correspondingly using the fine sort model;
Removing recall language materials having correlation scores smaller than a preset threshold from the first N (N is a positive integer greater than 1) of the predetermined number of recall language materials;
constructing the positive sample data based on the target query sentence and each remaining recall linguistic material among the first N of the predetermined number of recall linguistic materials;
An apparatus for training a semantic search model according to claim 15.
前記生成部は、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文について、前記所定数のリコール言語材料におけるN+1(Nは1より大きい正整数である)番目以降のリコール言語材料から、相関度スコアが予め設定された閾値より小さいリコール言語材料を選択し、
前記目標クエリ文と、前記所定数のリコール言語材料におけるN+1番目以降のリコール言語材料から選択された相関度スコアが予め設定された閾値より小さいリコール言語材料とに基づいて、負サンプルデータを構築する、
請求項15に記載のセマンティック検索モデルの訓練装置。
The generation unit is
For each target query sentence corresponding to the original semantic search model, select recall language materials having a correlation score smaller than a preset threshold from among the N+1th (N is a positive integer greater than 1) or later recall language materials in the predetermined number of recall language materials;
constructing negative sample data based on the target query sentence and recall language materials selected from the N+1th or later recall language materials in the predetermined number of recall language materials, the correlation score of which is less than a preset threshold value;
An apparatus for training a semantic search model according to claim 15.
前記生成部は、
各前記オリジナルセマンティック検索モデルに対応する目標クエリ文について、前記ファインソートモデルを用いて、対応する前記目標クエリ文と、それに応じてリコールされた前記所定数のリコール言語材料のそれぞれとの相関度スコアを計算し、
前記少なくとも2つのオリジナルセマンティック検索モデルによるすべてのリコール言語材料から、予め設定された方法で、各前記目標クエリ文及び各前記リコール言語材料の相関度スコアに基づいて前記負サンプルデータをスクリーニングする、
請求項15に記載のセマンティック検索モデルの訓練装置。
The generation unit is
For each target query sentence corresponding to the original semantic search model, calculate a correlation score between the corresponding target query sentence and each of the predetermined number of recall linguistic materials recalled correspondingly using the fine sort model;
Screening the negative sample data from all the recall language materials according to the at least two original semantic search models based on a correlation score between each of the target query sentences and each of the recall language materials in a preset manner;
An apparatus for training a semantic search model according to claim 15.
少なくとも1つのプロセッサと、
前記少なくとも1つのプロセッサと通信可能に接続されたメモリとを備え、
前記メモリに前記少なくとも1つのプロセッサにより実行可能なコマンドが記憶されており、前記コマンドが前記少なくとも1つのプロセッサにより実行されると、前記少なくとも1つのプロセッサに請求項1~3のいずれか1項に記載のセマンティック検索モデルの訓練方法を実行させる電子デバイス。
At least one processor;
a memory communicatively coupled to the at least one processor;
An electronic device having stored in the memory instructions executable by the at least one processor, the commands, when executed by the at least one processor, causing the at least one processor to perform the method for training a semantic search model described in any one of claims 1 to 3.
コンピュータに請求項1~3のいずれか1項に記載のセマンティック検索モデルの訓練方法を実行させるためのコンピュータコマンドを記憶する非一時的なコンピュータ可読記憶媒体。 A non-transitory computer-readable storage medium storing computer commands for causing a computer to execute the method for training a semantic search model according to any one of claims 1 to 3. プロセッサにより実行されると、請求項1~3のいずれか1項に記載のセマンティック検索モデルの訓練方法を実現するコンピュータプログラム。 A computer program that, when executed by a processor, realizes the method for training a semantic search model according to any one of claims 1 to 3.
JP2023037698A 2022-06-30 2023-03-10 Method, apparatus, electronic device and storage medium for training a semantic search model Active JP7581612B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210769033.7A CN115168537B (en) 2022-06-30 2022-06-30 Training method and device for semantic retrieval model, electronic equipment and storage medium
CN202210769033.7 2022-06-30

Publications (2)

Publication Number Publication Date
JP2024006944A JP2024006944A (en) 2024-01-17
JP7581612B2 true JP7581612B2 (en) 2024-11-13

Family

ID=83489579

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023037698A Active JP7581612B2 (en) 2022-06-30 2023-03-10 Method, apparatus, electronic device and storage medium for training a semantic search model

Country Status (2)

Country Link
JP (1) JP7581612B2 (en)
CN (1) CN115168537B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076598A (en) * 2023-05-09 2023-11-17 中国科学院计算技术研究所 Semantic retrieval model fusion method and system based on adaptive weights
CN116662512B (en) * 2023-06-12 2024-11-29 北京百度网讯科技有限公司 Training method of retrieval model, information retrieval method, device, equipment and medium
CN118427209A (en) * 2024-04-22 2024-08-02 浪潮通信信息系统有限公司 Question and answer processing method, device, electronic device and storage medium
CN118070776A (en) * 2024-04-25 2024-05-24 江西风向标智能科技有限公司 Physical test question duplicate checking method and system
CN118312608B (en) * 2024-06-11 2024-08-27 山东齐鲁壹点传媒有限公司 Method for establishing advertisement semantic retrieval model based on ANN and LLM
CN118820400A (en) * 2024-07-17 2024-10-22 浪潮云信息技术股份公司 Multi-channel recall retrieval enhancement generation method and device based on real-time data index
CN119149687B (en) * 2024-08-19 2025-06-20 北京清程极智科技有限公司 Recall accuracy assessment methods, systems, equipment, media and products
CN118939848B (en) * 2024-10-10 2025-05-13 博云视觉(北京)科技有限公司 Unstructured data processing system based on large language model and vector database
CN119377384A (en) * 2024-10-25 2025-01-28 华东师范大学 A legal article retrieval method based on legal data embedding optimization and retrieval effect evaluation
CN119719323B (en) * 2024-12-19 2025-10-03 北京百度网讯科技有限公司 Query statement generation method, device, equipment and storage medium
CN119807507A (en) * 2025-03-12 2025-04-11 优视科技有限公司 Data processing method, electronic device and computer storage medium
CN119848099A (en) * 2025-03-20 2025-04-18 天津美腾科技股份有限公司 Index platform-based data retrieval method and device, electronic equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112307048A (en) 2020-10-30 2021-02-02 中国平安财产保险股份有限公司 Semantic matching model training method, matching device, equipment and storage medium
JP2022002023A (en) 2020-06-22 2022-01-06 パナソニックIpマネジメント株式会社 Learning device, learning method, and program

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491518B (en) * 2017-08-15 2020-08-04 北京百度网讯科技有限公司 Search recall method and device, server and storage medium
US10984388B2 (en) * 2018-12-14 2021-04-20 International Business Machines Corporation Identifying complaints from messages
US10970278B2 (en) * 2019-03-29 2021-04-06 Microsoft Technology Licensing, Llc Querying knowledge graph with natural language input
CN110377905A (en) * 2019-06-28 2019-10-25 北京百度网讯科技有限公司 Semantic expressiveness processing method and processing device, computer equipment and the readable medium of sentence
CN110826337B (en) * 2019-10-08 2023-06-16 西安建筑科技大学 Short text semantic training model acquisition method and similarity matching algorithm
CN110717339B (en) * 2019-12-12 2020-06-30 北京百度网讯科技有限公司 Method, device, electronic device and storage medium for processing semantic representation model
CN111651578B (en) * 2020-06-02 2023-10-03 北京百度网讯科技有限公司 Human-machine dialogue methods, devices and equipment
CN111709252B (en) * 2020-06-17 2023-03-28 北京百度网讯科技有限公司 Model improvement method and device based on pre-trained semantic model
CN112507091A (en) * 2020-12-01 2021-03-16 百度健康(北京)科技有限公司 Method, device, equipment and storage medium for retrieving information
CN113157727B (en) * 2021-05-24 2022-12-13 腾讯音乐娱乐科技(深圳)有限公司 Method, apparatus and storage medium for providing recall result
CN113220864B (en) * 2021-07-08 2021-10-01 中航信移动科技有限公司 Intelligent question answering data processing system
CN113988157B (en) * 2021-09-30 2023-10-13 北京百度网讯科技有限公司 Semantic retrieval network training method, device, electronic equipment and storage medium
CN113886531B (en) * 2021-10-28 2024-08-02 中国平安人寿保险股份有限公司 Intelligent question-answer operation determining method, device, computer equipment and storage medium
CN114238564B (en) * 2021-12-09 2025-05-13 阳光保险集团股份有限公司 Information retrieval method, device, electronic device and storage medium
CN114416927B (en) * 2022-01-24 2024-04-02 招商银行股份有限公司 Intelligent question-answering method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022002023A (en) 2020-06-22 2022-01-06 パナソニックIpマネジメント株式会社 Learning device, learning method, and program
CN112307048A (en) 2020-10-30 2021-02-02 中国平安财产保险股份有限公司 Semantic matching model training method, matching device, equipment and storage medium

Also Published As

Publication number Publication date
CN115168537B (en) 2023-06-27
JP2024006944A (en) 2024-01-17
CN115168537A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
JP7581612B2 (en) Method, apparatus, electronic device and storage medium for training a semantic search model
CN112560912B (en) Classification model training methods, devices, electronic equipment and storage media
US20220129448A1 (en) Intelligent dialogue method and apparatus, and storage medium
CN113836925B (en) Training method, device, electronic device and storage medium of pre-trained language model
Ma et al. Label embedding for zero-shot fine-grained named entity typing
US10146874B2 (en) Refining topic representations
CN114357105B (en) Pre-training method and model fine-tuning method of geographic pre-training model
CN111625635A (en) Question answering processing, language model training method, apparatus, equipment and storage medium
US20230214689A1 (en) Method and apparatus for processing dialogue, electronic device, and storage medium
JP7160986B2 (en) Search model training method, apparatus, device, computer storage medium, and computer program
CN111831814B (en) Pre-training method and device for abstract generation model, electronic equipment and storage medium
JP6801350B2 (en) Descriptive topic label generation
CN112507706B (en) Training method and device for knowledge pre-training model and electronic equipment
CN108717408A (en) A kind of sensitive word method for real-time monitoring, electronic equipment, storage medium and system
CN112541362B (en) Generalization processing method, device, equipment and computer storage medium
CN110727769B (en) Corpus generation method and device and man-machine interaction processing method and device
CN110321537A (en) A kind of official documents and correspondence generation method and device
CN113761125B (en) Dynamic summary determination method and device, computing device and computer storage medium
CN116401345A (en) Intelligent question answering method, device, storage medium and equipment
CN104871151A (en) Method for summarizing document
US12462108B1 (en) Remediating hallucinations in language models
CN111523019A (en) Method, apparatus, device and storage medium for outputting information
CN114091439B (en) Method and device for generating Chinese character confusion set and computer readable storage medium
CN115640375A (en) Method for Extracting Technical Problems in Patent Documents and Related Equipment
US20260072912A1 (en) Semantic search in high-dimensional spaces using euclidean distance and cluster-based optimization

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230310

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240424

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240507

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240717

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20241001

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20241011

R150 Certificate of patent or registration of utility model

Ref document number: 7581612

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150