CN118377881A - Intelligent question answering method, system, device, computer equipment and readable storage medium - Google Patents
Intelligent question answering method, system, device, computer equipment and readable storage medium Download PDFInfo
- Publication number
- CN118377881A CN118377881A CN202410805923.8A CN202410805923A CN118377881A CN 118377881 A CN118377881 A CN 118377881A CN 202410805923 A CN202410805923 A CN 202410805923A CN 118377881 A CN118377881 A CN 118377881A
- Authority
- CN
- China
- Prior art keywords
- vector representation
- text
- question
- paragraph
- question text
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 75
- 239000013598 vector Substances 0.000 claims abstract description 236
- 238000012545 processing Methods 0.000 claims abstract description 30
- 238000004590 computer program Methods 0.000 claims description 31
- 230000008569 process Effects 0.000 claims description 23
- 230000011218 segmentation Effects 0.000 claims description 16
- 238000004458 analytical method Methods 0.000 claims description 11
- 238000004422 calculation algorithm Methods 0.000 claims description 11
- 238000010219 correlation analysis Methods 0.000 claims description 8
- 238000013507 mapping Methods 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 5
- 238000012216 screening Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 12
- 238000011017 operating method Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 101100481876 Danio rerio pbk gene Proteins 0.000 description 3
- 101100481878 Mus musculus Pbk gene Proteins 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 239000012634 fragment Substances 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 238000010561 standard procedure Methods 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000003058 natural language processing Methods 0.000 description 2
- 238000012015 optical character recognition Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000001427 coherent effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3344—Query execution using natural language analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/194—Calculation of difference between files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Mathematical Physics (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请涉及一种智能问答方法、系统、装置、计算机设备和可读存储介质。所述方法包括:获取用户输入的问题文本;基于问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在预设知识库中进行检索,得到问题文本对应的多个候选结果;根据第一向量表示与各候选结果构建任务提示模版;基于大语言模型对任务提示模版中第一向量表示和候选结果的关联关系进行分析处理,得到问题文本对应的目标结果。采用本方法能够提高智能问答方法进行回复的准确性。
The present application relates to an intelligent question-answering method, system, device, computer equipment and readable storage medium. The method comprises: obtaining a question text input by a user; searching a preset knowledge base based on the similarity between a first vector representation corresponding to the question text and each second vector representation existing in a preset knowledge base, and obtaining multiple candidate results corresponding to the question text; constructing a task prompt template based on the first vector representation and each candidate result; analyzing and processing the correlation between the first vector representation and the candidate results in the task prompt template based on a large language model, and obtaining a target result corresponding to the question text. The use of this method can improve the accuracy of the intelligent question-answering method in replying.
Description
技术领域Technical Field
本申请涉及人工智能技术领域,特别是涉及一种智能问答方法、系统、装置、计算机设备和可读存储介质。The present application relates to the field of artificial intelligence technology, and in particular to an intelligent question-answering method, system, device, computer equipment, and readable storage medium.
背景技术Background technique
随着企业中业务的发展,工厂员工在上岗前需要接受培训,以明确操作规程(SOP,Standard Operation Procedure)手册中的内容,由于操作规程手册通常较为庞大,新员工在面对具体问题时需要花费大量时间进行查找。As the business of an enterprise develops, factory employees need to receive training before taking up their posts to clarify the contents of the operating procedure (SOP) manual. Since the operating procedure manual is usually large, new employees need to spend a lot of time searching when faced with specific problems.
传统技术中,企业可以构建工厂对应领域的问答系统,采用基于规则或关键词匹配的方法,针对用户提出的问题进行检索和匹配。首先,传统的问答系统需要确定用户提出问题中包含的关键词,基于该关键词和文档管理系统中的文件名或标签等元素数据进行检索,将关键词对应的文件作为用户提出问题的解答。In traditional technology, enterprises can build a question-and-answer system for the corresponding field of the factory, and use a rule-based or keyword matching method to search and match the questions raised by users. First, the traditional question-and-answer system needs to determine the keywords contained in the questions raised by users, and search based on the keywords and element data such as file names or tags in the document management system, and use the files corresponding to the keywords as the answers to the questions raised by users.
然而,传统技术的问答系统中,由于基于规则或关键词的匹配方法存在局限性,使得问答系统难以确定不同用户提出问题的语义和意图,且问答系统输出的解答是文件的形式,文件中的内容较多,与用户出问题的关联性较低,导致传统技术中问答系统输出解答内容的准确性较差。However, in traditional question-and-answer systems, due to the limitations of rule-based or keyword-based matching methods, it is difficult for the question-and-answer system to determine the semantics and intentions of questions asked by different users. In addition, the answers output by the question-and-answer system are in the form of files with more content and lower relevance to the questions asked by users, resulting in poor accuracy of the answers output by the traditional question-and-answer system.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种智能问答方法、系统、装置、计算机设备和可读存储介质。Based on this, it is necessary to provide an intelligent question-answering method, system, device, computer equipment and readable storage medium to address the above technical issues.
第一方面,本申请提供了一种智能问答方法,包括:In a first aspect, the present application provides an intelligent question-answering method, comprising:
获取用户输入的问题文本;Get the question text entered by the user;
基于所述问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在所述预设知识库中进行检索,得到所述问题文本对应的多个候选结果;Based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, a search is performed in the preset knowledge base to obtain multiple candidate results corresponding to the question text;
根据所述第一向量表示与各所述候选结果构建任务提示模版;constructing a task prompt template according to the first vector representation and each of the candidate results;
基于大语言模型对所述任务提示模版中所述第一向量表示和所述候选结果的关联关系进行分析处理,得到所述问题文本对应的目标结果。Based on the large language model, the correlation between the first vector representation and the candidate result in the task prompt template is analyzed and processed to obtain a target result corresponding to the question text.
在其中一个实施例中,所述基于所述问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在所述预设知识库中进行检索,得到所述问题文本对应的多个候选结果,包括:In one embodiment, the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base is searched in the preset knowledge base to obtain multiple candidate results corresponding to the question text, including:
根据文本向量化模型对所述问题文本进行向量化处理,得到所述问题文本对应的第一向量表示;Performing vectorization processing on the question text according to a text vectorization model to obtain a first vector representation corresponding to the question text;
基于预设向量相似度算法计算所述第一向量表示与预设知识库中的各第二向量表示的相似度;Calculating the similarity between the first vector representation and each second vector representation in a preset knowledge base based on a preset vector similarity algorithm;
将所述相似度大于预设阈值的各第二向量表示作为所述问题文本对应的候选结果。Each second vector representation whose similarity is greater than a preset threshold is taken as a candidate result corresponding to the question text.
在其中一个实施例中,所述基于大语言模型对所述任务提示模版中所述第一向量表示和所述候选结果的关联关系进行分析处理,得到所述问题文本对应的目标结果,包括:In one embodiment, the analyzing and processing the association relationship between the first vector representation and the candidate result in the task prompt template based on the large language model to obtain the target result corresponding to the question text includes:
基于大语言模型对所述任务提示模版中的所述第一向量表示和所述候选结果分别进行语义理解,得到所述问题文本对应的第一语义信息和所述候选结果对应的第二语义信息;Based on the large language model, semantic understanding is performed on the first vector representation and the candidate result in the task prompt template to obtain first semantic information corresponding to the question text and second semantic information corresponding to the candidate result;
基于所述大语言模型对所述第一语义信息和第二语义信息进行关联性分析,得到语义关联信息;Performing a correlation analysis on the first semantic information and the second semantic information based on the large language model to obtain semantic correlation information;
基于所述语义关联信息对所述候选结果进行筛选,得到目标候选结果,并根据所述目标候选结果生成目标结果。The candidate results are screened based on the semantic association information to obtain target candidate results, and a target result is generated based on the target candidate results.
在其中一个实施例中,所述基于所述语义关联信息对所述候选结果进行筛选,得到目标候选结果,并根据所述目标候选结果生成目标结果之后,所述方法还包括:In one of the embodiments, after screening the candidate results based on the semantic association information to obtain a target candidate result, and generating a target result based on the target candidate result, the method further includes:
确定所述目标候选结果在所述预设知识库中对应的文本块标记;Determine the text block tag corresponding to the target candidate result in the preset knowledge base;
根据所述文本块标记与文件路径之间的对应关系,确定所述目标候选结果的目标文件路径或链接;Determine the target file path or link of the target candidate result according to the correspondence between the text block mark and the file path;
将所述目标文件路径或所述链接进行反馈。The target file path or the link is fed back.
在其中一个实施例中,所述获取用户输入的问题文本之前,所述方法还包括:In one embodiment, before obtaining the question text input by the user, the method further includes:
获取多模态知识数据;Acquire multimodal knowledge data;
对所述多模态知识数据进行切片处理,得到多个段落切片;Slicing the multimodal knowledge data to obtain a plurality of paragraph slices;
基于文本向量化模型对各所述段落切片进行数据处理,得到每个所述段落切片对应的第二向量表示,并确定各所述第二向量表示对应的文本块标记;Performing data processing on each of the paragraph slices based on a text vectorization model to obtain a second vector representation corresponding to each of the paragraph slices, and determining a text block tag corresponding to each of the second vector representations;
根据所述第二向量表示和所述第二向量表示对应的文本块标记构建预设知识库。A preset knowledge base is constructed according to the second vector representation and the text block mark corresponding to the second vector representation.
在其中一个实施例中,所述对所述多模态知识数据进行切片处理,得到多个段落切片,包括:In one embodiment, the slicing process of the multimodal knowledge data to obtain a plurality of paragraph slices includes:
基于多模态模型将所述多模态知识数据转换为文本数据;Converting the multimodal knowledge data into text data based on a multimodal model;
基于段落标志对所述文本数据进行段落切分,得到段落切片和所述段落切片对应的文本块标记。The text data is segmented into paragraphs based on paragraph marks to obtain paragraph slices and text block marks corresponding to the paragraph slices.
在其中一个实施例中,所述基于文本向量化模型对各所述段落切片进行数据处理,得到每个所述段落切片对应的第二向量表示,并确定各所述第二向量表示对应的文本块标记,包括:In one embodiment, the data processing of each paragraph slice based on the text vectorization model to obtain a second vector representation corresponding to each paragraph slice, and determining a text block mark corresponding to each second vector representation, includes:
针对每一所述段落切片,根据分词工具对所述段落切片进行分词处理,得到每一所述段落切片中各子词的词序列;For each of the paragraph slices, segment the paragraph slices according to a segmentation tool to obtain a word sequence of each subword in each of the paragraph slices;
基于文本向量化模型对各所述段落切片包含的所述词序列进行映射处理,得到初始第二向量表示;Mapping the word sequence contained in each paragraph slice based on a text vectorization model to obtain an initial second vector representation;
将每一所述段落切片中包含的各所述初始第二向量表示进行合并或加权平均,得到每一所述段落切片对应的第二向量表示。The initial second vector representations contained in each of the paragraph slices are merged or weighted averaged to obtain the second vector representation corresponding to each of the paragraph slices.
第二方面,本申请还提供了一种智能问答系统,包括:In a second aspect, the present application also provides an intelligent question-answering system, comprising:
用户端,用于获取问题文本并将所述问题文本反馈至服务端;The client terminal is used to obtain the question text and feed the question text back to the server terminal;
服务端,用于获取用户输入的问题文本;基于所述问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在所述预设知识库中进行检索,得到所述问题文本对应的多个候选结果;根据所述第一向量表示与各所述候选结果构建任务提示模版;基于大语言模型对所述任务提示模版中所述第一向量表示和所述候选结果的关联关系进行分析处理,得到所述问题文本对应的目标结果。The server is used to obtain a question text input by a user; search the preset knowledge base based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base to obtain multiple candidate results corresponding to the question text; construct a task prompt template based on the first vector representation and each candidate result; analyze and process the association relationship between the first vector representation and the candidate results in the task prompt template based on a large language model to obtain a target result corresponding to the question text.
第三方面,本申请还提供了一种智能问答装置,包括:In a third aspect, the present application also provides an intelligent question-answering device, comprising:
第一获取模块,用于获取用户输入的问题文本;The first acquisition module is used to obtain the question text input by the user;
检索模块,用于基于所述问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在所述预设知识库中进行检索,得到所述问题文本对应的多个候选结果;A retrieval module, configured to search the preset knowledge base based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, to obtain a plurality of candidate results corresponding to the question text;
第一构建模块,用于根据所述第一向量表示与各所述候选结果构建任务提示模版;A first construction module, configured to construct a task prompt template according to the first vector representation and each of the candidate results;
分析模块,用于基于大语言模型对所述任务提示模版中所述第一向量表示和所述候选结果的关联关系进行分析处理,得到所述问题文本对应的目标结果。The analysis module is used to analyze and process the association between the first vector representation and the candidate result in the task prompt template based on the large language model to obtain the target result corresponding to the question text.
在其中一个实施例中,所述检索模块具体用于根据文本向量化模型对所述问题文本进行向量化处理,得到所述问题文本对应的第一向量表示;In one embodiment, the retrieval module is specifically used to perform vectorization processing on the question text according to a text vectorization model to obtain a first vector representation corresponding to the question text;
基于预设向量相似度算法计算所述第一向量表示与预设知识库中的各第二向量表示的相似度;Calculating the similarity between the first vector representation and each second vector representation in a preset knowledge base based on a preset vector similarity algorithm;
将所述相似度大于预设阈值的各第二向量表示作为所述问题文本对应的候选结果。Each second vector representation whose similarity is greater than a preset threshold is taken as a candidate result corresponding to the question text.
在其中一个实施例中,所述分析模块具体用于基于大语言模型对所述任务提示模版中的所述第一向量表示和所述候选结果分别进行语义理解,得到所述问题文本对应的第一语义信息和所述候选结果对应的第二语义信息;In one embodiment, the analysis module is specifically used to perform semantic understanding on the first vector representation and the candidate result in the task prompt template based on a large language model, to obtain first semantic information corresponding to the question text and second semantic information corresponding to the candidate result;
基于所述大语言模型对所述第一语义信息和第二语义信息进行关联性分析,得到语义关联信息;Performing a correlation analysis on the first semantic information and the second semantic information based on the large language model to obtain semantic correlation information;
基于所述语义关联信息对所述候选结果进行筛选,得到目标候选结果,并根据所述目标候选结果生成目标结果。The candidate results are screened based on the semantic association information to obtain target candidate results, and a target result is generated based on the target candidate results.
在其中一个实施例中,所述装置还包括:In one embodiment, the device further comprises:
第一确定模块,用于确定所述目标候选结果在所述预设知识库中对应的文本块标记;A first determination module is used to determine the text block mark corresponding to the target candidate result in the preset knowledge base;
第二确定模块,用于根据所述文本块标记与文件路径之间的对应关系,确定所述目标候选结果的目标文件路径或链接;A second determination module, configured to determine a target file path or link of the target candidate result according to a correspondence between the text block mark and the file path;
反馈模块,用于将所述目标文件路径或所述链接进行反馈。The feedback module is used to provide feedback on the target file path or the link.
在其中一个实施例中,所述装置还包括:In one embodiment, the device further comprises:
第二获取模块,用于获取多模态知识数据;A second acquisition module is used to acquire multimodal knowledge data;
切片模块,用于对所述多模态知识数据进行切片处理,得到多个段落切片;A slicing module, used for slicing the multimodal knowledge data to obtain a plurality of paragraph slices;
向量化处理模块,用于基于文本向量化模型对各所述段落切片进行数据处理,得到每个所述段落切片对应的第二向量表示,并确定各所述第二向量表示对应的文本块标记;A vectorization processing module, used for performing data processing on each of the paragraph slices based on a text vectorization model to obtain a second vector representation corresponding to each of the paragraph slices, and determining a text block mark corresponding to each of the second vector representations;
第二构建模块,用于根据所述第二向量表示和所述第二向量表示对应的文本块标记构建预设知识库。The second construction module is used to construct a preset knowledge base according to the second vector representation and the text block mark corresponding to the second vector representation.
在其中一个实施例中,所述切片模块具体用于基于多模态模型将所述多模态知识数据转换为文本数据;In one of the embodiments, the slicing module is specifically used to convert the multimodal knowledge data into text data based on a multimodal model;
基于段落标志对所述文本数据进行段落切分,得到段落切片和所述段落切片对应的文本块标记。The text data is segmented into paragraphs based on paragraph marks to obtain paragraph slices and text block marks corresponding to the paragraph slices.
在其中一个实施例中,所述向量化处理模块具体用于针对每一所述段落切片,根据分词工具对所述段落切片进行分词处理,得到每一所述段落切片中各子词的词序列;In one embodiment, the vectorization processing module is specifically used to perform word segmentation processing on each paragraph slice according to a word segmentation tool to obtain a word sequence of each subword in each paragraph slice;
基于文本向量化模型对各所述段落切片包含的所述词序列进行映射处理,得到初始第二向量表示;Mapping the word sequence contained in each paragraph slice based on a text vectorization model to obtain an initial second vector representation;
将每一所述段落切片中包含的各所述初始第二向量表示进行合并或加权平均,得到每一所述段落切片对应的第二向量表示。The initial second vector representations contained in each of the paragraph slices are merged or weighted averaged to obtain the second vector representation corresponding to each of the paragraph slices.
第四方面,本申请还提供了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
获取用户输入的问题文本;Get the question text entered by the user;
基于所述问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在所述预设知识库中进行检索,得到所述问题文本对应的多个候选结果;Based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, a search is performed in the preset knowledge base to obtain multiple candidate results corresponding to the question text;
根据所述第一向量表示与各所述候选结果构建任务提示模版;constructing a task prompt template according to the first vector representation and each of the candidate results;
基于大语言模型对所述任务提示模版中所述第一向量表示和所述候选结果的关联关系进行分析处理,得到所述问题文本对应的目标结果。Based on the large language model, the correlation between the first vector representation and the candidate result in the task prompt template is analyzed and processed to obtain a target result corresponding to the question text.
第五方面,本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
获取用户输入的问题文本;Get the question text entered by the user;
基于所述问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在所述预设知识库中进行检索,得到所述问题文本对应的多个候选结果;Based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, a search is performed in the preset knowledge base to obtain multiple candidate results corresponding to the question text;
根据所述第一向量表示与各所述候选结果构建任务提示模版;constructing a task prompt template according to the first vector representation and each of the candidate results;
基于大语言模型对所述任务提示模版中所述第一向量表示和所述候选结果的关联关系进行分析处理,得到所述问题文本对应的目标结果。Based on the large language model, the correlation between the first vector representation and the candidate result in the task prompt template is analyzed and processed to obtain a target result corresponding to the question text.
第六方面,本申请还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:In a sixth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
获取用户输入的问题文本;Get the question text entered by the user;
基于所述问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在所述预设知识库中进行检索,得到所述问题文本对应的多个候选结果;Based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, a search is performed in the preset knowledge base to obtain multiple candidate results corresponding to the question text;
根据所述第一向量表示与各所述候选结果构建任务提示模版;constructing a task prompt template according to the first vector representation and each of the candidate results;
基于大语言模型对所述任务提示模版中所述第一向量表示和所述候选结果的关联关系进行分析处理,得到所述问题文本对应的目标结果。Based on the large language model, the correlation between the first vector representation and the candidate result in the task prompt template is analyzed and processed to obtain a target result corresponding to the question text.
上述智能问答方法、系统、装置、计算机设备和可读存储介质,根据问题文本对应的第一向量表示和预设知识库中存在的各第二向量表示的相似度检索问题文本对应的候选结果,可以快速地在大量表征多模态知识数据的第二向量表示中确定与问题文本具有语义相似性的候选结果。进而,将候选结果结合问题文本构建任务提示模版,实现大语言模型可以基于问题文本和候选结果的关联关系,来明确任务提示模板中的问题文本的语义,并生成贴合问题文本的语境的目标结果。任务提示模版中的候选结果还可以限制大语言模型的输出范围,使大语言模型更专注于生成与问题文本更具相关性的内容,提供更加准确和具体的目标结果,从而避免大语言模型生成泛化的描述,提高智能问答方法进行回复的准确性。The above-mentioned intelligent question-answering method, system, device, computer equipment and readable storage medium can retrieve candidate results corresponding to the question text according to the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, and can quickly determine the candidate results with semantic similarity to the question text in the second vector representation representing a large amount of multimodal knowledge data. Furthermore, the candidate results are combined with the question text to construct a task prompt template, so that the large language model can clarify the semantics of the question text in the task prompt template based on the association between the question text and the candidate results, and generate a target result that fits the context of the question text. The candidate results in the task prompt template can also limit the output range of the large language model, so that the large language model is more focused on generating content that is more relevant to the question text, and provide more accurate and specific target results, thereby avoiding the large language model from generating generalized descriptions and improving the accuracy of the intelligent question-answering method in replying.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对本申请实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
图1为一个实施例中智能问答方法的流程示意图;FIG1 is a schematic diagram of a flow chart of an intelligent question-answering method in one embodiment;
图2为一个实施例中在预设知识库中检索候选结果的流程示意图;FIG2 is a schematic diagram of a process of retrieving candidate results in a preset knowledge base in one embodiment;
图3为一个实施例中大语言模型生成目标结果的流程示意图;FIG3 is a schematic diagram of a process of generating a target result by a large language model in one embodiment;
图4为一个实施例中对目标结果的扩展参考内容进行反馈的流程示意图;FIG4 is a schematic diagram of a process of providing feedback on extended reference content of a target result in one embodiment;
图5为一个实施例中构建预设知识库的流程示意图;FIG5 is a schematic diagram of a process for constructing a preset knowledge base in one embodiment;
图6为一个具体的实施例中构建预设知识库的示意图;FIG6 is a schematic diagram of building a preset knowledge base in a specific embodiment;
图7为一个实施例中多模态知识数据进行切片处理的流程示意图;FIG7 is a schematic diagram of a process of slicing multimodal knowledge data in one embodiment;
图8为一个实施例中对多模态知识数据进行进行向量化处理的流程示意图;FIG8 is a schematic diagram of a process of vectorizing multimodal knowledge data in one embodiment;
图9为一个实施例中一种智能问答方法的示例的流程示意图;FIG9 is a flow chart of an example of an intelligent question-answering method according to an embodiment;
图10为一个实施例中智能问答装置的结构框图;FIG10 is a block diagram of a smart question-answering device according to an embodiment;
图11为一个实施例中计算机设备的内部结构图。FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
在一个实施例中,如图1所示,提供了一种智能问答方法,本实施例以该方法应用于服务器进行举例说明,可以理解的是,该方法也可以应用于终端,还可以应用于包括终端和服务器的系统,并通过终端和服务器的交互实现。本实施例中,该方法包括以下步骤:In one embodiment, as shown in FIG1 , an intelligent question-answering method is provided. This embodiment is illustrated by applying the method to a server. It is understandable that the method can also be applied to a terminal, or to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
步骤102,获取用户输入的问题文本。Step 102: Obtain the question text input by the user.
本申请实施例中,在企业的工厂新员工上岗前,需要接受培训,了解工业场景下操作规程(SOP)手册中的内容,以及新员工的日常工作中,在面对具体的问题时需要依据操作规程手册中的规定来解决问题。此时,工厂的员工作为用户进行提问,即向终端输入当前面临的问题或查询某些情况下的解决方案,进而服务器接收并获取用户输入的问题文本。In the embodiment of the present application, before new factory employees of the enterprise take up their posts, they need to receive training and understand the contents of the operating procedures (SOP) manual in industrial scenarios, and in their daily work, when faced with specific problems, they need to solve the problems according to the provisions in the operating procedures manual. At this time, the factory employees ask questions as users, that is, input the current problems or query solutions in certain situations into the terminal, and then the server receives and obtains the question text entered by the user.
在一个可选的实施例中,用户也可以通过语音的方式进行提问,终端响应于用户的提问操作,接收包含用户提问内容的音频数据,将该音频数据上传至预先设置的语音识别服务中,通过语音识别服务将音频数据转换为文本数据,进而得问题文本,并将问题文本发送至服务器。其中,还可以在话筒上添加降噪功能。这意味着用户可以通过语音与系统进行交互,而无需受到现场噪音的干扰,且语音输入的交互方式提高了在作业现场的操作效率,尤其适用于手部操作不便或视线受限的场景。通过语音输入,工人可以在操作机器或携带物品时更方便地提出问题,使得信息获取更加快捷和自然。In an optional embodiment, the user can also ask questions by voice, and the terminal responds to the user's question operation, receives audio data containing the user's question content, uploads the audio data to a pre-set voice recognition service, converts the audio data into text data through the voice recognition service, and then obtains the question text, and sends the question text to the server. Among them, a noise reduction function can also be added to the microphone. This means that users can interact with the system through voice without being disturbed by on-site noise, and the interactive method of voice input improves the operating efficiency at the work site, especially suitable for scenes with inconvenient hand operation or limited vision. Through voice input, workers can ask questions more conveniently when operating machines or carrying items, making information acquisition faster and more natural.
在一个可选的实施例中,由于工厂内时效性工艺和SOP的特殊需求,预设知识库具有预先设置的失效日期,预设知识库的管理员可以在维护预设知识库的同时,灵活设置知识数据的过期时间。具体地,预设知识库中的每条知识数据包含对应的过期时间,对于超过过期时间的知识数据,服务器可以将其删除,或者,在后续进行候选结果的检索时,服务器仅对未超过过期时间的知识数据对应的第二向量表示进行检索,防止生成包含过期知识数据的目标结果,进而保证智能问答方法进行回复的准确性。In an optional embodiment, due to the special requirements of time-sensitive processes and SOPs in the factory, the preset knowledge base has a preset expiration date, and the administrator of the preset knowledge base can flexibly set the expiration time of the knowledge data while maintaining the preset knowledge base. Specifically, each piece of knowledge data in the preset knowledge base contains a corresponding expiration time. For knowledge data that exceeds the expiration time, the server can delete it, or, when retrieving candidate results later, the server only retrieves the second vector representation corresponding to the knowledge data that has not exceeded the expiration time, to prevent the generation of target results containing expired knowledge data, thereby ensuring the accuracy of the intelligent question-answering method's response.
在一个可选的实施例中,根据用户的角色和权限级别,服务器对其可访问的预设知识库的内容进行明确划分。例如,工厂的操作员可能只能访问与操作流程、设备使用等相关的基础的知识数据,工程师可以访问更深层次的技术资料,管理人员则可以检索财务和运营等核心数据。In an optional embodiment, the server clearly divides the contents of the preset knowledge base that users can access based on their roles and permission levels. For example, factory operators may only be able to access basic knowledge data related to operating procedures, equipment usage, etc., engineers can access more in-depth technical information, and managers can retrieve core data such as finance and operations.
步骤104,基于问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在预设知识库中进行检索,得到问题文本对应的多个候选结果。Step 104 , searching the preset knowledge base based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, to obtain a plurality of candidate results corresponding to the question text.
本申请实施例中,预设知识库中包含预先存储的知识数据对应的第二向量表示,知识数据可以是由多种数据源获取到的工业作业环境下的相关说明文档、技术文档、常见问题解答等。这些文档可能包含了各种与工业作业相关的信息,例如,操作步骤、设备说明、安全规范等。In the embodiment of the present application, the preset knowledge base includes a second vector representation corresponding to pre-stored knowledge data, and the knowledge data may be related instruction documents, technical documents, FAQs, etc. in an industrial operation environment obtained from a variety of data sources. These documents may contain various information related to industrial operations, such as operating procedures, equipment instructions, safety specifications, etc.
服务器在获取到用户输入的问题文本后,为了确定与当前问题文本的内容具有一定相关性的知识数据,将与问题文本具有相关性的知识数据作为参考,终端可以根据嵌入模型对问题文本进行向量化处理,得到第一向量表示。其中,嵌入模型的模型结构可以是Word2Vec(Word to Vector一群用来产生词向量的相关模型)、GloVe(Global Vectors forWord Representation,基于全局词频统计的词表征工具)、FastText(一种快速文本分类器)等。After the server obtains the question text input by the user, in order to determine the knowledge data that has a certain relevance to the content of the current question text, the knowledge data that has relevance to the question text is used as a reference, and the terminal can vectorize the question text according to the embedding model to obtain the first vector representation. Among them, the model structure of the embedding model can be Word2Vec (Word to Vector, a group of related models used to generate word vectors), GloVe (Global Vectors for Word Representation, a word representation tool based on global word frequency statistics), FastText (a fast text classifier), etc.
服务器通过对预设知识库中已存储的第二向量表示进行遍历,通过相似度算法(例如,余弦相似度算法)计算第一向量表示与每个第二向量表示之间的相似度,基于第一向量表示与第二向量表示之间的相似度可以确定出与问题文本相关的候选结果,第一向量表示与第二向量表示的相似度可以表征问题文本和预设知识库中存储的知识数据的相关性。其中,将第二向量表示确定为候选结果的依据可以是对相似度进行分析,并将相似度与预先设置的阈值进行比较,服务器可以将大于该阈值的第二向量表示作为候选结果,或者,终端还可以对相似度进行排名,得到相似度的排名结果,并将排名结果TopK个相似度对应的第二向量表示确定为候选结果。The server traverses the second vector representations stored in the preset knowledge base, and calculates the similarity between the first vector representation and each second vector representation through a similarity algorithm (e.g., a cosine similarity algorithm). Based on the similarity between the first vector representation and the second vector representation, a candidate result related to the question text can be determined. The similarity between the first vector representation and the second vector representation can characterize the correlation between the question text and the knowledge data stored in the preset knowledge base. The basis for determining the second vector representation as a candidate result can be to analyze the similarity and compare the similarity with a preset threshold. The server can use the second vector representation greater than the threshold as a candidate result, or the terminal can also rank the similarity to obtain a ranking result of the similarity, and determine the second vector representation corresponding to the TopK similarities in the ranking result as a candidate result.
步骤106,根据第一向量表示与各候选结果构建任务提示模版。Step 106: construct a task prompt template according to the first vector representation and each candidate result.
本申请实施例中,任务提示模版可以为结构化数据,用于引导模型生成与特定主题、内容或关注点相关的回复文本。具体地,服务器可以将第一向量表示与多个候选结果(基于第一向量表示与第二向量表示的相似度对第二向量表示筛选得到第二向量表示)进行拼接,构建任务提示模版。In an embodiment of the present application, the task prompt template may be structured data, which is used to guide the model to generate a reply text related to a specific topic, content, or focus. Specifically, the server may concatenate the first vector representation with multiple candidate results (the second vector representation is obtained by screening the second vector representation based on the similarity between the first vector representation and the second vector representation) to construct a task prompt template.
在一个可选的实施例中,任务提示模版可以通过用户的问题文本动态生成,基于预先存储的模版关键词和模版片段,根据问题文本中包含的关键词或短语对模版关键词和模版片段进行匹配,按照预先设置的模版结构将关键词和模版片段结合问题文本中原本包含的关键词或短语构建任务提示模版。In an optional embodiment, a task prompt template can be dynamically generated through the user's question text. Based on pre-stored template keywords and template fragments, the template keywords and template fragments are matched according to the keywords or phrases contained in the question text, and the keywords and template fragments are combined with the keywords or phrases originally contained in the question text according to a pre-set template structure to construct a task prompt template.
步骤108,基于大语言模型对任务提示模版中第一向量表示和候选结果的关联关系进行分析处理,得到问题文本对应的目标结果。Step 108: Analyze and process the correlation between the first vector representation in the task prompt template and the candidate results based on the large language model to obtain the target result corresponding to the question text.
本申请实施例中,服务器利用大型语言模型(Large Language Model,大语言模型),对任务提示模板中的文本进行语义理解,通过大语言模型理解问题文本与候选结果之间的关系,并将任务提示模版中提供的候选结果作为依据,在候选结果中提取出与问题文本最相关的信息或答案(即目标结果)。并将与问题文本最相关的信息或答案反馈至终端进行输出显示。In the embodiment of the present application, the server uses a large language model (Large Language Model) to perform semantic understanding on the text in the task prompt template, understands the relationship between the question text and the candidate results through the large language model, and uses the candidate results provided in the task prompt template as a basis to extract the information or answer (i.e., the target result) most relevant to the question text from the candidate results. The information or answer most relevant to the question text is fed back to the terminal for output display.
上述智能问答方法中,根据问题文本对应的第一向量表示和预设知识库中存在的各第二向量表示的相似度检索问题文本对应的候选结果,可以快速地在大量表征多模态知识数据的第二向量表示中确定与问题文本具有语义相似性的候选结果。进而,将候选结果结合问题文本构建任务提示模版,实现大语言模型可以基于问题文本和候选结果的关联关系,来明确任务提示模板中的问题文本的语义,并生成贴合问题文本的语境的目标结果。任务提示模版中的候选结果还可以限制大语言模型的输出范围,使大语言模型更专注于生成与问题文本更具相关性的内容,提供更加准确和具体的目标结果,从而避免大语言模型生成泛化的描述,提高智能问答方法回复的准确性。In the above-mentioned intelligent question-answering method, the candidate results corresponding to the question text are retrieved according to the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, and the candidate results with semantic similarity to the question text can be quickly determined in the second vector representation of a large amount of multimodal knowledge data. Furthermore, the candidate results are combined with the question text to construct a task prompt template, so that the large language model can clarify the semantics of the question text in the task prompt template based on the association between the question text and the candidate results, and generate a target result that fits the context of the question text. The candidate results in the task prompt template can also limit the output range of the large language model, so that the large language model can focus more on generating content that is more relevant to the question text, and provide more accurate and specific target results, thereby avoiding the large language model from generating generalized descriptions and improving the accuracy of the intelligent question-answering method's responses.
在一个示例性的实施例中,如图2所示,步骤104包括步骤202至步骤206。其中:In an exemplary embodiment, as shown in FIG2 , step 104 includes steps 202 to 206. Among them:
步骤202,根据文本向量化模型对问题文本进行向量化处理,得到问题文本对应的第一向量表示。Step 202: vectorize the question text according to the text vectorization model to obtain a first vector representation corresponding to the question text.
本申请实施例中,服务器根据文本向量化模型对问题文本进行向量化处理,将问题文本映射为高维度的第一向量表示,其中,第一向量表示的维度数量由文本向量化模型的模型结构和参数决定,高维的第一向量表示可以包含更加丰富的语义信息,每个维度可以看作问题文本的一个特征,使用向量来表示文本,则每个维度可能对应一个词语或者是某种语言学特征,例如,特征可以是词语的出现频率、词性、上下文信息等。In an embodiment of the present application, the server vectorizes the question text according to the text vectorization model, and maps the question text into a high-dimensional first vector representation, wherein the number of dimensions of the first vector representation is determined by the model structure and parameters of the text vectorization model. The high-dimensional first vector representation can contain richer semantic information, and each dimension can be regarded as a feature of the question text. When a vector is used to represent the text, each dimension may correspond to a word or some linguistic feature. For example, the feature may be the frequency of occurrence of a word, part of speech, contextual information, etc.
步骤204,基于预设向量相似度算法计算第一向量表示与预设知识库中的各第二向量表示的相似度。Step 204: Calculate the similarity between the first vector representation and each second vector representation in the preset knowledge base based on a preset vector similarity algorithm.
本申请实施例中,预设向量相似度算法可以为基于余弦相似度或欧氏距离的相似度计算方法,按照预设向量相似度算法,服务器可以通过第一向量表示和第二向量表示之间的点积计算第一向量表示和第二向量表示之间的相似度。相似度计算通过比较第一向量表示和第二向量表示之间的相似程度来评估问题文本和知识数据之间的关联程度,具体为通过余弦相似度或欧氏距离来度量第一向量表示和第二向量表示在语义相似度上的差异,进而得出问题文本和知识数据之间的关联程度。In the embodiment of the present application, the preset vector similarity algorithm may be a similarity calculation method based on cosine similarity or Euclidean distance. According to the preset vector similarity algorithm, the server may calculate the similarity between the first vector representation and the second vector representation through the dot product between the first vector representation and the second vector representation. The similarity calculation evaluates the degree of association between the question text and the knowledge data by comparing the degree of similarity between the first vector representation and the second vector representation, specifically by measuring the difference in semantic similarity between the first vector representation and the second vector representation through cosine similarity or Euclidean distance, thereby obtaining the degree of association between the question text and the knowledge data.
步骤206,将相似度大于预设阈值的各第二向量表示作为问题文本对应的候选结果。Step 206: taking each second vector representation having a similarity greater than a preset threshold as a candidate result corresponding to the question text.
本申请实施例中,不同问题文本与知识库中的文档可能具有不同的语义相似度。通过设定一个相似度阈值,可以在一定程度上过滤掉与问题文本的语义关联度较低的知识数据,当计算出问题文本的第一向量表示与每个候选文本的第二向量表示的相似度后,服务器会筛选出相似度大于预设阈值的候选结果,该候选结果代表了与用户提出问题的问题文本语义相近的知识数据。In the embodiment of the present application, different question texts may have different semantic similarities with documents in the knowledge base. By setting a similarity threshold, knowledge data with a low semantic relevance to the question text can be filtered out to a certain extent. After calculating the similarity between the first vector representation of the question text and the second vector representation of each candidate text, the server will filter out candidate results with a similarity greater than a preset threshold, which represents knowledge data with semantics similar to the question text of the question raised by the user.
在一个可选的实施例中,服务器还可以根据历史对话记录进行语义匹配,根据历史对话记录对应的向量表示与问题文本对应的第一向量进行相似度计算,并将相似度大于预设阈值的历史对话记录对应的向量表示也作为候选结果,为大语言模型的数据分析提供参考。In an optional embodiment, the server may also perform semantic matching based on historical conversation records, calculate similarity between the vector representation corresponding to the historical conversation record and the first vector corresponding to the question text, and use the vector representation corresponding to the historical conversation record whose similarity is greater than a preset threshold as a candidate result to provide a reference for data analysis of the large language model.
本实施例中,利用包含第二向量表示的预设知识库和相似度算法,可以快速地在大量知识数据中检索出与用户输入的问题文本在语义上相似的知识数据,提高了信息检索的速度和准确性。In this embodiment, by using a preset knowledge base including the second vector representation and a similarity algorithm, knowledge data that is semantically similar to the question text input by the user can be quickly retrieved from a large amount of knowledge data, thereby improving the speed and accuracy of information retrieval.
在一个示例性的实施例中,如图3所示,步骤108包括步骤302至步骤306。其中:In an exemplary embodiment, as shown in FIG3 , step 108 includes steps 302 to 306. Among them:
步骤302,基于大语言模型对任务提示模版中的第一向量表示和候选结果分别进行语义理解,得到问题文本对应的第一语义信息和候选结果对应的第二语义信息。Step 302 , based on the large language model, semantic understanding is performed on the first vector representation and the candidate results in the task prompt template respectively, to obtain first semantic information corresponding to the question text and second semantic information corresponding to the candidate results.
本申请实施例中,服务器将任务提示模版输入至大语言模型中,通过大语言模型对第一向量表示进语义理解,得到第一语义信息,可以更深层次地理解用户提出问题的语义和意图。以及对候选结果进行语义理解,针对候选结果进行词汇、短语以及语句级别的语义理解,得到第二语义信息。其中,第一语义信息包括对问题文本的意图、主题、以及所包含的实体或概念的理解,第一语义信息可以帮助大语言模型理解用户提出的问题是什么,以及用户期望得到的答案可能涉及的领域和范围;第二语义信息包括知识数据中涉及的实体、事件、概念,以及与问题相关的背景信息,帮助大语言模型理解候选结果中提供的可能答案或问题相关的上下文,有助于确定哪些信息对于回答问题是最重要的。In an embodiment of the present application, the server inputs the task prompt template into the large language model, and the large language model performs semantic understanding on the first vector representation to obtain the first semantic information, which can understand the semantics and intention of the user's question at a deeper level. And the candidate results are semantically understood, and the candidate results are semantically understood at the vocabulary, phrase and sentence levels to obtain the second semantic information. Among them, the first semantic information includes the understanding of the intention, theme, and entities or concepts contained in the question text. The first semantic information can help the large language model understand what the user's question is, and the fields and scopes that the user expects to get. The second semantic information includes the entities, events, concepts involved in the knowledge data, and background information related to the question, which helps the large language model understand the possible answers provided in the candidate results or the context related to the question, and helps to determine which information is most important for answering the question.
基于高维的第一向量表示和第二向量表示,大语言模型可以从第一向量表示和第二向量表示的内容上进行语义理解,还包括对第一向量表示和第二向量表示进行上下文分析,理解问题文本和候选结果在上下文中的含义,包括通过问题文本和候选结果的上下文分析,可以确定用户提出问题的背景和候选结果对应的语境,作为生成目标结果的依据,保证大语言模型输出内容的准确性。Based on the high-dimensional first vector representation and the second vector representation, the large language model can perform semantic understanding from the content of the first vector representation and the second vector representation, and also include contextual analysis of the first vector representation and the second vector representation to understand the meaning of the question text and the candidate results in the context. Through the contextual analysis of the question text and the candidate results, the background of the user's question and the context corresponding to the candidate results can be determined as the basis for generating the target result, thereby ensuring the accuracy of the output content of the large language model.
步骤304,基于大语言模型对第一语义信息和第二语义信息进行关联性分析,得到语义关联信息。Step 304: Perform a correlation analysis on the first semantic information and the second semantic information based on the large language model to obtain semantic correlation information.
本申请实施例中,在语义理解得到第一语义信息和第二语义信息后,服务器通过语言模型分析问题文本和候选结果之间的语义关联,包括词汇、短语或句子级别的关联,即对第一语义信息和第二语义信息进行关联性分析,分析问题文本与候选结果之间的关联程度,包括第一语义信息和第二语义信息之间的语义相似度、问题文本和候选结果之间的逻辑关系、共现关系或其他相关性指标,得到表征第一向量表示和候选结果中具有关联性特征的语义关联信息。In an embodiment of the present application, after the first semantic information and the second semantic information are obtained through semantic understanding, the server analyzes the semantic association between the question text and the candidate results through a language model, including associations at the vocabulary, phrase or sentence level, that is, performs a correlation analysis on the first semantic information and the second semantic information, analyzes the degree of association between the question text and the candidate results, including the semantic similarity between the first semantic information and the second semantic information, the logical relationship, co-occurrence relationship or other correlation indicators between the question text and the candidate results, and obtains semantic association information that characterizes the first vector representation and the candidate results with correlation characteristics.
步骤306,基于语义关联信息对候选结果进行筛选,得到目标候选结果,并根据目标候选结果生成目标结果。Step 306 , screening the candidate results based on the semantic association information to obtain target candidate results, and generating target results based on the target candidate results.
本申请实施例中,基于第一向量表示和候选结果之间的关联性分析结果的语义关联信息,大语言模型可以对候选结果进行筛选,选择与问题文本最相关的候选答案,以排除一些不相关或不合适的候选结果,从而缩小大语言模型的分析范围。具体地,大语言模型首先计算问题文本的第一向量表示与作为候选结果的每个第二向量表示之间的相似度,相似度计算包括余弦相似度、欧氏距离、皮尔逊相关系数或曼哈顿距离等。然后,大语言模型可以根据计算的相似度结果进行排序,将相似度较高的候选结果排在前面,并将相似度最高的候选结果作为依据,进行进一步处理,生成问题文本对应的目标结果。其中,根据候选结果生成目标结果的过程还包括文本排重、文本匹配、上下文分析和逻辑推理的过程,以生成语序连贯、逻辑合理且贴合问题语境的目标结果。In an embodiment of the present application, based on the semantic association information of the correlation analysis results between the first vector representation and the candidate results, the large language model can screen the candidate results and select the candidate answers that are most relevant to the question text to exclude some irrelevant or inappropriate candidate results, thereby narrowing the analysis scope of the large language model. Specifically, the large language model first calculates the similarity between the first vector representation of the question text and each second vector representation as a candidate result, and the similarity calculation includes cosine similarity, Euclidean distance, Pearson correlation coefficient or Manhattan distance, etc. Then, the large language model can sort according to the calculated similarity results, put the candidate results with higher similarity in front, and use the candidate results with the highest similarity as a basis for further processing to generate the target result corresponding to the question text. Among them, the process of generating the target result based on the candidate results also includes the process of text repetition, text matching, context analysis and logical reasoning to generate a target result with coherent word order, reasonable logic and fitting the context of the question.
在一个可选的实施例中,用户可以根据返回的目标结果进行反馈,帮助完善预设知识库,用户可以针对不在预设知识库范围内的问题进行维护。维护完成后,经审核人员审核通过,即可将新内容加入到预设知识库中,供后续检索使用。In an optional embodiment, users can provide feedback based on the returned target results to help improve the preset knowledge base, and users can perform maintenance on issues that are not within the scope of the preset knowledge base. After the maintenance is completed, the new content can be added to the preset knowledge base for subsequent retrieval after being reviewed and approved by the reviewer.
本实施例中,大语言模型分别从问题文本和候选结果中提取语义信息,并分析二者之间的语义关联,以便更好地理解问题和候选结果的关联性,使大语言模型能够更全面、准确地理解问题的背景和候选结果的语境,进而生成更加准确的目标结果,提高智能问答方法回复的准确性。In this embodiment, the large language model extracts semantic information from the question text and the candidate results respectively, and analyzes the semantic association between the two, so as to better understand the relevance between the question and the candidate results, so that the large language model can more comprehensively and accurately understand the background of the question and the context of the candidate results, thereby generating more accurate target results and improving the accuracy of the intelligent question-answering method's responses.
在一个示例性的实施例中,服务器生成目标结果后,还可以将生成目标结果的依据进行输出展示,如图4所示,步骤306包括步骤402至步骤406。其中:In an exemplary embodiment, after the server generates the target result, it can also output and display the basis for generating the target result, as shown in FIG4 , step 306 includes steps 402 to 406. Among them:
步骤402,确定目标候选结果在预设知识库中对应的文本块标记。Step 402: determine the text block tag corresponding to the target candidate result in the preset knowledge base.
本申请实施例中,在预设知识库中,每个知识数据的第二向量表示具有其对应的文本块标记,服务器根据大语言模型对候选结果的筛选得到的目标候选结果和第二向量表示与文本块标记之间的对应关系,确定目标候选结果对应的文本块标记,为后续基于目标候选结果在预设知识库中对应的具体文本块标记进行定位和检索提供基础。In an embodiment of the present application, in a preset knowledge base, the second vector representation of each knowledge data has its corresponding text block tag. The server determines the text block tag corresponding to the target candidate result based on the correspondence between the target candidate result and the second vector representation and the text block tag obtained by screening the candidate results with a large language model, thereby providing a basis for subsequent positioning and retrieval based on the specific text block tag corresponding to the target candidate result in the preset knowledge base.
步骤404,根据文本块标记与文件路径之间的对应关系,确定目标候选结果的目标文件路径或链接。Step 404: Determine the target file path or link of the target candidate result according to the correspondence between the text block mark and the file path.
本申请实施例中,服务器根据文本块标记与文件路径之间的对应关系,确定目标候选结果所在的具体文件路径或链接,该对应关系可以是一个索引表或预设知识库中的映射关系,用来将文本块标记与相应的文件路径或链接进行对应。In an embodiment of the present application, the server determines the specific file path or link where the target candidate result is located based on the correspondence between the text block mark and the file path. The correspondence can be a mapping relationship in an index table or a preset knowledge base, which is used to correspond the text block mark with the corresponding file path or link.
步骤406,将目标文件路径或链接进行反馈。Step 406, feeding back the target file path or link.
本申请实施例中,服务器将确定的目标文件路径或链接反馈至用户终端。这样用户就可以直接通过提供的链接或文件路径访问到相关的知识库文档或信息,从而获取更详细和全面的信息支持。其中,反馈的内容可以以文本形式呈现,也可以是一个可点击的链接或文件路径,用户点击后即可跳转到相应的文档、网页或文件夹。In the embodiment of the present application, the server feeds back the determined target file path or link to the user terminal. In this way, the user can directly access the relevant knowledge base documents or information through the provided link or file path, thereby obtaining more detailed and comprehensive information support. Among them, the feedback content can be presented in text form, or it can be a clickable link or file path, and the user can jump to the corresponding document, web page or folder after clicking it.
本实施例中,通过将目标结果的依据(即对应的预设知识库中的知识数据或信息)进行清晰的输出展示,使用户能够方便地查看和获取相关信息,有助于用户参考确认答案的真实有效性,避免了因大语言模型可能带来的幻觉问题。通过明确目标结果的依据和来源,增强了用户对目标结果的信任感和可靠性,提高目标结果的透明度和可信度,进而保证目标结果的准确性。In this embodiment, by clearly outputting the basis of the target result (i.e., the knowledge data or information in the corresponding preset knowledge base), the user can easily view and obtain relevant information, which helps the user to refer to and confirm the authenticity and validity of the answer, avoiding the illusion problem that may be caused by the large language model. By clarifying the basis and source of the target result, the user's trust and reliability in the target result are enhanced, the transparency and credibility of the target result are improved, and the accuracy of the target result is guaranteed.
在一个示例性的实施例中,如图5所示,步骤102之前,该方法还包括步骤502至步骤508。其中:In an exemplary embodiment, as shown in FIG5 , before step 102, the method further includes steps 502 to 508. Among them:
步骤502,获取多模态知识数据。Step 502: Acquire multimodal knowledge data.
本申请实施例中,多模态知识数据可以是工厂的工业作业环境下的相关说明文档、技术文档、常见问题解答等,服务器读取预先存储的多模态知识数据,以便后续对多模态知识数据进行进一步处理。In an embodiment of the present application, the multimodal knowledge data may be relevant instruction documents, technical documents, FAQs, etc. in the industrial operation environment of the factory. The server reads the pre-stored multimodal knowledge data to facilitate further processing of the multimodal knowledge data.
步骤504,对多模态知识数据进行切片处理,得到多个段落切片。Step 504: Slice the multimodal knowledge data to obtain multiple paragraph slices.
本申请实施例中,服务器对多模态知识数据进行段落切分,根据段落标记(例如,换行符、段落标签、分页符或预先设置的长度等)将文档切分成段落切片,每个段落切片作为切片处理的基本单位。In an embodiment of the present application, the server segments the multimodal knowledge data into paragraphs, and segments the document into paragraph slices according to paragraph marks (for example, line breaks, paragraph tags, page breaks, or pre-set lengths, etc.), with each paragraph slice serving as a basic unit of slicing processing.
步骤506,基于文本向量化模型对各段落切片进行数据处理,得到每个段落切片对应的第二向量表示,并确定各第二向量表示对应的文本块标记。Step 506 , performing data processing on each paragraph slice based on the text vectorization model to obtain a second vector representation corresponding to each paragraph slice, and determining a text block mark corresponding to each second vector representation.
本申请实施例中,以预设知识库为业务知识库进行说明,如图6所示,服务器将包含业务文本数据的文档内容、问答对、语料或知识库导入至文本向量化模型,通过文本向量化模型对每个段落切片进行向量化处理,得到每个段落切片对应的第二向量表示,得到向量形式的业务数据。在段落切片过程中,服务器可以根据切片过程预先存储切片后的段落切片对应的文本块标记,表征段落切片所属的文档,记录该文本块在原始文档中的位置信息,以便后续还原原始文档的语义结构。进而根据段落切片对应文本块标记可以确定出第二向量表示对应的文本块标记,为构建向量索引提供依据。In the embodiment of the present application, the preset knowledge base is used as the business knowledge base for explanation. As shown in FIG6 , the server imports the document content, question-answer pairs, corpus or knowledge base containing business text data into the text vectorization model, and vectorizes each paragraph slice through the text vectorization model to obtain the second vector representation corresponding to each paragraph slice, and obtains the business data in vector form. During the paragraph slicing process, the server can pre-store the text block mark corresponding to the paragraph slice after slicing according to the slicing process, characterize the document to which the paragraph slice belongs, and record the position information of the text block in the original document, so as to restore the semantic structure of the original document later. Then, according to the text block mark corresponding to the paragraph slice, the text block mark corresponding to the second vector representation can be determined, providing a basis for constructing a vector index.
步骤508,根据第二向量表示和第二向量表示对应的文本块标记构建预设知识库。Step 508: construct a preset knowledge base according to the second vector representation and the text block mark corresponding to the second vector representation.
本申请实施例中,服务器将向量形式的业务数据,即第二向量表示和第二向量表示对应的文本块标记进行对应存储,可以使用数据库或文件系统等方式存储向量,确保后续可以高效地检索和使用,以构建包含向量索引和知识数据对应的第二向量表示的预设知识库。In an embodiment of the present application, the server stores the business data in vector form, i.e., the second vector representation and the text block mark corresponding to the second vector representation, and can use a database or file system to store the vector to ensure that it can be efficiently retrieved and used later to construct a preset knowledge base containing the vector index and the second vector representation corresponding to the knowledge data.
本实施例中,通过将多模态知识数据进行切片和向量化存储的方式构建预设知识库,可以提高智能问答方法中对候选结果进行检索的效率,保持与原始多模态知识数据的关联性,还能够保证多模态知识数据进行存储的完整性和准确性。In this embodiment, by constructing a preset knowledge base by slicing and vectorizing the multimodal knowledge data, the efficiency of retrieving candidate results in the intelligent question-answering method can be improved, the relevance with the original multimodal knowledge data can be maintained, and the integrity and accuracy of the storage of the multimodal knowledge data can be ensured.
在一个示例性的实施例中,如图7所示,步骤504包括步骤702至步骤704。其中:In an exemplary embodiment, as shown in FIG7 , step 504 includes steps 702 to 704. Among them:
步骤702,基于多模态模型将多模态知识数据转换为文本数据。Step 702: Convert the multimodal knowledge data into text data based on the multimodal model.
本申请实施例中,多模态知识数据可以由多种格式的知识源得到,例如,Word(文字处理器应用程序)文档、TXT(一种文本格式)文档、PDF(Portable Document Format,便携式文档格式)文档或图片等,服务器可以根据针对性的文档加载器或多模态模型将不同格式的多模态知识数据进行格式转换,将其转换成大语言模型能够理解的纯文本格式的文本数据。例如,针对PDF文件格式的多模态知识数据,服务器可以使用PDF提取器提取多模态知识数据中的文本内容;对于图片格式的多模态知识数据,服务器可以使用OCR(OpticalCharacter Recognition,光学字符识别)技术识别并转换其中的文字信息,得到文本数据。In the embodiment of the present application, multimodal knowledge data can be obtained from knowledge sources in various formats, such as Word (word processor application) documents, TXT (a text format) documents, PDF (Portable Document Format) documents or pictures, etc. The server can convert the multimodal knowledge data in different formats according to the targeted document loader or multimodal model, and convert it into text data in a plain text format that can be understood by the large language model. For example, for multimodal knowledge data in PDF file format, the server can use a PDF extractor to extract the text content in the multimodal knowledge data; for multimodal knowledge data in picture format, the server can use OCR (Optical Character Recognition) technology to identify and convert the text information therein to obtain text data.
在一个可选的实施例中,服务器完成针对多模态知识数据的格式转换后,服务器可以对格式转换后的文本数据进行预处理,包括去除文本数据中的特殊字符、空白字符等,减少噪声数据。In an optional embodiment, after the server completes the format conversion for the multimodal knowledge data, the server may preprocess the text data after the format conversion, including removing special characters, blank characters, etc. in the text data to reduce noise data.
步骤704,基于段落标志对文本数据进行段落切分,得到段落切片和段落切片对应的文本块标记。Step 704, segment the text data into paragraphs based on the paragraph marks to obtain paragraph slices and text block marks corresponding to the paragraph slices.
本申请实施例中,服务器按照步骤504中对多模态知识数据进行段落切分相同的原理,对文本数据进行段落切分,得到段落切片和段落切片对应的文本块标记,对于段落切分的具体过程本实施例不再进行赘述。In the embodiment of the present application, the server performs paragraph segmentation on the text data according to the same principle as the paragraph segmentation on the multimodal knowledge data in step 504, and obtains paragraph slices and text block marks corresponding to the paragraph slices. The specific process of paragraph segmentation will not be described in detail in this embodiment.
本实施例中,通过对文本数据格式的多模态知识数据进行段落切分得到段落切片和段落切片对应的文本块标记,可以提高信息检索的效率和后续进行过文本定位的准确性。In this embodiment, by segmenting multimodal knowledge data in a text data format into paragraphs to obtain paragraph slices and text block tags corresponding to the paragraph slices, the efficiency of information retrieval and the accuracy of subsequent text positioning can be improved.
在一个示例性的实施例中,如图8所示,步骤506包括步骤802至步骤806。其中:In an exemplary embodiment, as shown in FIG8 , step 506 includes steps 802 to 806. Among them:
步骤802,针对每一段落切片,根据分词工具对段落切片进行分词处理,得到每一段落切片中各子词的词序列。Step 802: for each paragraph slice, perform word segmentation processing on the paragraph slice according to the word segmentation tool to obtain the word sequence of each subword in each paragraph slice.
本申请实施例中,分词工具可以是NLTK(Natural Language Toolkit,自然语言处理工具包)或Spacy(一种工业级自然语言处理工具)等,服务器使用分词工具对段落切片进行分词处理,将段落切片对应的文本数据拆分成单词或子词的词序列。词序列为自然语言处理中,一段文本数据经过分词处理后,将文本中的连续词语按照它们在文本中出现的顺序排列而形成的序列,每个词语在词序列中占据一个位置,位置的顺序代表了该词语在原始文本中的出现顺序。In the embodiment of the present application, the word segmentation tool can be NLTK (Natural Language Toolkit) or Spacy (an industrial-grade natural language processing tool), etc. The server uses the word segmentation tool to perform word segmentation on the paragraph slices, and splits the text data corresponding to the paragraph slices into word sequences of words or subwords. In natural language processing, a word sequence is a sequence formed by arranging consecutive words in the text in the order in which they appear in the text after a piece of text data has been processed by word segmentation. Each word occupies a position in the word sequence, and the order of the positions represents the order in which the words appear in the original text.
步骤804,基于文本向量化模型对各段落切片包含的词序列进行映射处理,得到初始第二向量表示。Step 804 , mapping the word sequence contained in each paragraph slice based on the text vectorization model to obtain an initial second vector representation.
本申请实施例中,服务器将分词后的单词或词序列映射到文本向量化模型(例如,词嵌入模型)中,获取每个单词对应的初始第二向量表示,即词向量。若词序列不在词嵌入模型的词汇表中,可以使用特殊的处理方法(例如,随机初始化向量)进行单词向量化。In the embodiment of the present application, the server maps the segmented words or word sequences to a text vectorization model (e.g., a word embedding model) to obtain the initial second vector representation corresponding to each word, i.e., the word vector. If the word sequence is not in the vocabulary of the word embedding model, a special processing method (e.g., random initialization vector) can be used for word vectorization.
步骤806,将每一段落切片中包含的各初始第二向量表示进行合并或加权平均,得到每一段落切片对应的第二向量表示。Step 806: merge or weighted average the initial second vector representations contained in each paragraph slice to obtain the second vector representation corresponding to each paragraph slice.
本申请实施例中,服务器将每个段落切片的文本数据中所有单词的第一向量表示进行合并或加权平均,得到每个段落切片完整文本数据的第二向量表示。常用的方法包括求取所有单词的平均向量或加权平均向量,并将第二向量表示存储到向量库中,得到预设知识库。其中,服务器可以使用数据库或文件系统等方式存储第二向量表示,确保后续可以高效地检索和使用。In an embodiment of the present application, the server merges or weighted averages the first vector representations of all words in the text data of each paragraph slice to obtain a second vector representation of the complete text data of each paragraph slice. A common method includes obtaining the average vector or weighted average vector of all words, and storing the second vector representation in a vector library to obtain a preset knowledge base. Among them, the server can use a database or a file system to store the second vector representation to ensure that it can be efficiently retrieved and used later.
本实施例中,通过将文本数据转换成第二向量表示,并将生成的第二向量表示存储到向量库中构建预设知识库,以便后续的文本检索、相似度计算等任务,提高了文档处理和检索的效率,还保证了信息的完整性和准确性。In this embodiment, a preset knowledge base is constructed by converting text data into a second vector representation and storing the generated second vector representation in a vector library to facilitate subsequent text retrieval, similarity calculation and other tasks, thereby improving the efficiency of document processing and retrieval and ensuring the integrity and accuracy of information.
在一个具体的实施例中,提供了一种智能问答方法的示例,如图9所示,包括步骤901至步骤905。其中:In a specific embodiment, an example of an intelligent question-answering method is provided, as shown in FIG9 , including steps 901 to 905. Among them:
步骤901,将终端用户的问题输入给文本向量化模型,得到用户问题对应的第一向量表示;Step 901, inputting the terminal user's question into the text vectorization model to obtain a first vector representation corresponding to the user's question;
步骤902,将第一向量表示输入至业务向量数据库;Step 902, inputting the first vector representation into a business vector database;
步骤903,根据第一向量表示与业务向量数据库中的业务向量的相似度检索得到TopK个检索结果,作为候选结果;Step 903, searching based on the similarity between the first vector representation and the business vector in the business vector database to obtain TopK search results as candidate results;
步骤904,将TopK个候选结果整合为prompt形式的任务提示模版,并输入至LLM问答模型中;Step 904, integrating the TopK candidate results into a task prompt template in the form of prompt, and inputting it into the LLM question answering model;
步骤905,将问答模型生成的问答结果和第一向量表示在业务向量数据库中的检索结果返回至用户终端。Step 905: Return the question and answer result generated by the question and answer model and the search result of the first vector representation in the business vector database to the user terminal.
在其中一个实施例中,提供了一种智能问答系统,该系统包括用户端和服务端,其中:In one embodiment, an intelligent question-answering system is provided, the system comprising a user end and a server end, wherein:
用户端,用于获取问题文本并将问题文本反馈至服务端;The client side is used to obtain the question text and feed the question text back to the server side;
服务端,用于获取用户输入的问题文本;基于问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在预设知识库中进行检索,得到问题文本对应的多个候选结果;根据第一向量表示与各候选结果构建任务提示模版;基于大语言模型对任务提示模版中第一向量表示和候选结果的关联关系进行分析处理,得到问题文本对应的目标结果。The server is used to obtain the question text input by the user; search in the preset knowledge base based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base to obtain multiple candidate results corresponding to the question text; construct a task prompt template based on the first vector representation and each candidate result; analyze and process the correlation between the first vector representation and the candidate results in the task prompt template based on the large language model to obtain the target result corresponding to the question text.
可选的,服务器得到问题文本对应的目标结果后,将该目标结果反馈至终端。Optionally, after obtaining the target result corresponding to the question text, the server feeds back the target result to the terminal.
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的智能问答方法的智能问答装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个智能问答装置实施例中的具体限定可以参见上文中对于智能问答方法的限定,在此不再赘述。Based on the same inventive concept, the embodiment of the present application also provides an intelligent question-answering device for implementing the intelligent question-answering method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more intelligent question-answering device embodiments provided below can refer to the limitations of the intelligent question-answering method above, and will not be repeated here.
在一个示例性的实施例中,如图10所示,提供了一种智能问答装置,包括:第一获取模块1001、检索模块1002、第一构建模块1003和分析模块1004,其中:In an exemplary embodiment, as shown in FIG10 , an intelligent question-answering device is provided, comprising: a first acquisition module 1001, a retrieval module 1002, a first construction module 1003 and an analysis module 1004, wherein:
第一获取模块1001,用于获取用户输入的问题文本;The first acquisition module 1001 is used to acquire the question text input by the user;
检索模块1002,用于基于问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在预设知识库中进行检索,得到问题文本对应的多个候选结果;A retrieval module 1002 is used to search in a preset knowledge base based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, and obtain multiple candidate results corresponding to the question text;
第一构建模块1003,用于根据第一向量表示与各候选结果构建任务提示模版;A first construction module 1003, configured to construct a task prompt template according to the first vector representation and each candidate result;
分析模块1004,用于基于大语言模型对任务提示模版中第一向量表示和候选结果的关联关系进行分析处理,得到问题文本对应的目标结果。The analysis module 1004 is used to analyze and process the association between the first vector representation and the candidate results in the task prompt template based on the large language model to obtain the target result corresponding to the question text.
在其中一个实施例中,检索模块1002具体用于根据文本向量化模型对问题文本进行向量化处理,得到问题文本对应的第一向量表示;In one embodiment, the retrieval module 1002 is specifically used to perform vectorization processing on the question text according to the text vectorization model to obtain a first vector representation corresponding to the question text;
基于预设向量相似度算法计算第一向量表示与预设知识库中的各第二向量表示的相似度;Calculating the similarity between the first vector representation and each second vector representation in the preset knowledge base based on a preset vector similarity algorithm;
将相似度大于预设阈值的各第二向量表示作为问题文本对应的候选结果。Each second vector representation having a similarity greater than a preset threshold is regarded as a candidate result corresponding to the question text.
在其中一个实施例中,分析模块1004具体用于基于大语言模型对任务提示模版中的第一向量表示和候选结果分别进行语义理解,得到问题文本对应的第一语义信息和候选结果对应的第二语义信息;In one embodiment, the analysis module 1004 is specifically used to perform semantic understanding on the first vector representation and the candidate results in the task prompt template based on the large language model, and obtain the first semantic information corresponding to the question text and the second semantic information corresponding to the candidate results;
基于大语言模型对第一语义信息和第二语义信息进行关联性分析,得到语义关联信息;Performing a correlation analysis on the first semantic information and the second semantic information based on the large language model to obtain semantic correlation information;
基于语义关联信息对候选结果进行筛选,得到目标候选结果,并根据目标候选结果生成目标结果。The candidate results are screened based on the semantic association information to obtain the target candidate results, and the target results are generated based on the target candidate results.
在其中一个实施例中,该装置1000还包括:In one embodiment, the apparatus 1000 further includes:
第一确定模块,用于确定目标候选结果在预设知识库中对应的文本块标记;A first determination module is used to determine the text block mark corresponding to the target candidate result in a preset knowledge base;
第二确定模块,用于根据文本块标记与文件路径之间的对应关系,确定目标候选结果的目标文件路径或链接;A second determination module is used to determine a target file path or link of a target candidate result according to a correspondence between a text block mark and a file path;
反馈模块,用于将目标文件路径或链接进行反馈。The feedback module is used to feedback the target file path or link.
在其中一个实施例中,该装置1000还包括:In one embodiment, the apparatus 1000 further includes:
第二获取模块,用于获取多模态知识数据;A second acquisition module is used to acquire multimodal knowledge data;
切片模块,用于对多模态知识数据进行切片处理,得到多个段落切片;The slicing module is used to slice the multimodal knowledge data to obtain multiple paragraph slices;
向量化处理模块,用于基于文本向量化模型对各段落切片进行数据处理,得到每个段落切片对应的第二向量表示,并确定各第二向量表示对应的文本块标记;A vectorization processing module is used to perform data processing on each paragraph slice based on a text vectorization model to obtain a second vector representation corresponding to each paragraph slice, and determine a text block mark corresponding to each second vector representation;
第二构建模块,用于根据第二向量表示和第二向量表示对应的文本块标记构建预设知识库。The second building module is used to build a preset knowledge base according to the second vector representation and the text block mark corresponding to the second vector representation.
在其中一个实施例中,切片模块具体用于基于多模态模型将多模态知识数据转换为文本数据;In one of the embodiments, the slicing module is specifically used to convert the multimodal knowledge data into text data based on the multimodal model;
基于段落标志对文本数据进行段落切分,得到段落切片和段落切片对应的文本块标记。The text data is segmented into paragraphs based on the paragraph marks to obtain paragraph slices and text block tags corresponding to the paragraph slices.
在其中一个实施例中,向量化处理模块具体用于针对每一段落切片,根据分词工具对段落切片进行分词处理,得到每一段落切片中各子词的词序列;In one embodiment, the vectorization processing module is specifically used to perform word segmentation processing on each paragraph slice according to a word segmentation tool to obtain a word sequence of each subword in each paragraph slice;
基于文本向量化模型对各段落切片包含的词序列进行映射处理,得到初始第二向量表示;Based on the text vectorization model, the word sequence contained in each paragraph slice is mapped to obtain an initial second vector representation;
将每一段落切片中包含的各初始第二向量表示进行合并或加权平均,得到每一段落切片对应的第二向量表示。The initial second vector representations contained in each paragraph slice are merged or weighted averaged to obtain the second vector representation corresponding to each paragraph slice.
上述智能问答装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above intelligent question-answering device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
在一个示例性的实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图11所示。该计算机设备包括处理器、存储器、输入/输出接口(Input/Output,简称I/O)和通信接口。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储预设知识库中存在的第二向量表示。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种智能问答方法。In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG11. The computer device includes a processor, a memory, an input/output interface (Input/Output, referred to as I/O) and a communication interface. The processor, the memory and the input/output interface are connected via a system bus, and the communication interface is connected to the system bus via the input/output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the second vector representation present in the preset knowledge base. The input/output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an intelligent question-answering method is implemented.
本领域技术人员可以理解,图11中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
在一个示例性的实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
获取用户输入的问题文本;Get the question text entered by the user;
基于所述问题文本对应的第一向量表示与预设知识库中存在的各第二向量表示的相似度在所述预设知识库中进行检索,得到所述问题文本对应的多个候选结果;Based on the similarity between the first vector representation corresponding to the question text and each second vector representation existing in the preset knowledge base, a search is performed in the preset knowledge base to obtain multiple candidate results corresponding to the question text;
根据所述第一向量表示与各所述候选结果构建任务提示模版;constructing a task prompt template according to the first vector representation and each of the candidate results;
基于大语言模型对所述任务提示模版中所述第一向量表示和所述候选结果的关联关系进行分析处理,得到所述问题文本对应的目标结果。Based on the large language model, the correlation between the first vector representation and the candidate result in the task prompt template is analyzed and processed to obtain a target result corresponding to the question text.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
根据文本向量化模型对所述问题文本进行向量化处理,得到所述问题文本对应的第一向量表示;Performing vectorization processing on the question text according to a text vectorization model to obtain a first vector representation corresponding to the question text;
基于预设向量相似度算法计算所述第一向量表示与预设知识库中的各第二向量表示的相似度;Calculating the similarity between the first vector representation and each second vector representation in a preset knowledge base based on a preset vector similarity algorithm;
将所述相似度大于预设阈值的各第二向量表示作为所述问题文本对应的候选结果。Each second vector representation whose similarity is greater than a preset threshold is taken as a candidate result corresponding to the question text.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
基于大语言模型对所述任务提示模版中的所述第一向量表示和所述候选结果分别进行语义理解,得到所述问题文本对应的第一语义信息和所述候选结果对应的第二语义信息;Based on the large language model, semantic understanding is performed on the first vector representation and the candidate result in the task prompt template to obtain first semantic information corresponding to the question text and second semantic information corresponding to the candidate result;
基于所述大语言模型对所述第一语义信息和第二语义信息进行关联性分析,得到语义关联信息;Performing a correlation analysis on the first semantic information and the second semantic information based on the large language model to obtain semantic correlation information;
基于所述语义关联信息对所述候选结果进行筛选,得到目标候选结果,并根据所述目标候选结果生成目标结果。The candidate results are screened based on the semantic association information to obtain target candidate results, and a target result is generated based on the target candidate results.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
确定所述目标候选结果在所述预设知识库中对应的文本块标记;Determine the text block tag corresponding to the target candidate result in the preset knowledge base;
根据所述文本块标记与文件路径之间的对应关系,确定所述目标候选结果的目标文件路径或链接;Determine the target file path or link of the target candidate result according to the correspondence between the text block mark and the file path;
将所述目标文件路径或所述链接进行反馈。The target file path or the link is fed back.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
获取多模态知识数据;Acquire multimodal knowledge data;
对所述多模态知识数据进行切片处理,得到多个段落切片;Slicing the multimodal knowledge data to obtain a plurality of paragraph slices;
基于文本向量化模型对各所述段落切片进行数据处理,得到每个所述段落切片对应的第二向量表示,并确定各所述第二向量表示对应的文本块标记;Performing data processing on each of the paragraph slices based on a text vectorization model to obtain a second vector representation corresponding to each of the paragraph slices, and determining a text block tag corresponding to each of the second vector representations;
根据所述第二向量表示和所述第二向量表示对应的文本块标记构建预设知识库。A preset knowledge base is constructed according to the second vector representation and the text block mark corresponding to the second vector representation.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
基于多模态模型将所述多模态知识数据转换为文本数据;Converting the multimodal knowledge data into text data based on a multimodal model;
基于段落标志对所述文本数据进行段落切分,得到段落切片和所述段落切片对应的文本块标记。The text data is segmented into paragraphs based on paragraph marks to obtain paragraph slices and text block marks corresponding to the paragraph slices.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
针对每一所述段落切片,根据分词工具对所述段落切片进行分词处理,得到每一所述段落切片中各子词的词序列;For each of the paragraph slices, segment the paragraph slices according to a segmentation tool to obtain a word sequence of each subword in each of the paragraph slices;
基于文本向量化模型对各所述段落切片包含的所述词序列进行映射处理,得到初始第二向量表示;Mapping the word sequence contained in each paragraph slice based on a text vectorization model to obtain an initial second vector representation;
将每一所述段落切片中包含的各所述初始第二向量表示进行合并或加权平均,得到每一所述段落切片对应的第二向量表示。The initial second vector representations contained in each of the paragraph slices are merged or weighted averaged to obtain the second vector representation corresponding to each of the paragraph slices.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要符合相关规定。It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性存储器和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(Resistive Random Access Memory,ReRAM)、磁变存储器(Magnetoresistive RandomAccess Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。本申请提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器、人工智能(Artificial Intelligence,AI)处理器等,不限于此。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本申请记载的范围。The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410805923.8A CN118377881A (en) | 2024-06-21 | 2024-06-21 | Intelligent question answering method, system, device, computer equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410805923.8A CN118377881A (en) | 2024-06-21 | 2024-06-21 | Intelligent question answering method, system, device, computer equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118377881A true CN118377881A (en) | 2024-07-23 |
Family
ID=91909122
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410805923.8A Pending CN118377881A (en) | 2024-06-21 | 2024-06-21 | Intelligent question answering method, system, device, computer equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118377881A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118643054A (en) * | 2024-08-12 | 2024-09-13 | 无锡雪浪数制科技有限公司 | Vector database question-answering processing method, device and storage medium integrating semantic graph |
CN119202142A (en) * | 2024-11-28 | 2024-12-27 | 杭州数智元宇科技有限公司 | User question response method, system, computer device and readable storage medium |
CN119250080A (en) * | 2024-12-05 | 2025-01-03 | 清华大学深圳国际研究生院 | Method for analyzing consistency of achievements and targets of scientific and invasive projects |
CN119250080B (en) * | 2024-12-05 | 2025-02-18 | 清华大学深圳国际研究生院 | A method for analyzing the consistency between scientific and technological innovation project results and goals |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117056471A (en) * | 2023-07-11 | 2023-11-14 | 数字郑州科技有限公司 | Knowledge base construction method and question-answer dialogue method and system based on generation type large language model |
CN117708309A (en) * | 2024-02-18 | 2024-03-15 | 粤港澳大湾区数字经济研究院(福田) | Method, system, equipment and medium for searching question and answer |
CN117708274A (en) * | 2023-12-28 | 2024-03-15 | 上海氪信信息技术有限公司 | Search question-answering system based on large model, method and electronic equipment thereof |
CN117951269A (en) * | 2023-12-27 | 2024-04-30 | 北京易华录信息技术股份有限公司 | Question-answering system based on large language model |
-
2024
- 2024-06-21 CN CN202410805923.8A patent/CN118377881A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117056471A (en) * | 2023-07-11 | 2023-11-14 | 数字郑州科技有限公司 | Knowledge base construction method and question-answer dialogue method and system based on generation type large language model |
CN117951269A (en) * | 2023-12-27 | 2024-04-30 | 北京易华录信息技术股份有限公司 | Question-answering system based on large language model |
CN117708274A (en) * | 2023-12-28 | 2024-03-15 | 上海氪信信息技术有限公司 | Search question-answering system based on large model, method and electronic equipment thereof |
CN117708309A (en) * | 2024-02-18 | 2024-03-15 | 粤港澳大湾区数字经济研究院(福田) | Method, system, equipment and medium for searching question and answer |
Non-Patent Citations (3)
Title |
---|
化柏林: "文本信息分析与全文检索技术", 31 August 2008, 科学技术文献出版社, pages: 197 * |
张艳: "全媒体客户中心管理", 31 August 2016, 成都时代出版社, pages: 157 - 158 * |
龙志勇等: "大模型时代", 31 May 2023, 中译出版社, pages: 262 - 269 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118643054A (en) * | 2024-08-12 | 2024-09-13 | 无锡雪浪数制科技有限公司 | Vector database question-answering processing method, device and storage medium integrating semantic graph |
CN118643054B (en) * | 2024-08-12 | 2024-11-05 | 无锡雪浪数制科技有限公司 | Semantic graph-fused vector database question-answering processing method, device and storage medium |
CN119202142A (en) * | 2024-11-28 | 2024-12-27 | 杭州数智元宇科技有限公司 | User question response method, system, computer device and readable storage medium |
CN119250080A (en) * | 2024-12-05 | 2025-01-03 | 清华大学深圳国际研究生院 | Method for analyzing consistency of achievements and targets of scientific and invasive projects |
CN119250080B (en) * | 2024-12-05 | 2025-02-18 | 清华大学深圳国际研究生院 | A method for analyzing the consistency between scientific and technological innovation project results and goals |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109885672B (en) | Question-answering type intelligent retrieval system and method for online education | |
US8370278B2 (en) | Ontological categorization of question concepts from document summaries | |
CN111767716B (en) | Method and device for determining enterprise multi-level industry information and computer equipment | |
CN118170894B (en) | A knowledge graph question answering method, device and storage medium | |
CN111797214A (en) | Question screening method, device, computer equipment and medium based on FAQ database | |
US20170103329A1 (en) | Knowledge driven solution inference | |
US20180097749A1 (en) | Interactive virtual conversation interface systems and methods | |
CN118377881A (en) | Intelligent question answering method, system, device, computer equipment and readable storage medium | |
CN111782763A (en) | Information retrieval method based on voice semantics and related equipment thereof | |
CN117743390A (en) | Query method and system for financial information and storage medium | |
CN117725203A (en) | Document abstract generation method, device, computer equipment and storage medium | |
Li et al. | A policy-based process mining framework: mining business policy texts for discovering process models | |
CN114491079A (en) | Knowledge graph construction and query method, device, equipment and medium | |
CN117540004B (en) | Industrial domain intelligent question-answering method and system based on knowledge graph and user behavior | |
CN118606438A (en) | Data analysis method, device, computer equipment, readable storage medium and program product | |
CN118689979A (en) | A question-answering method and device based on multimodal knowledge fusion enhancement | |
CN118395970A (en) | Document processing method and device based on natural language, computer equipment and storage medium | |
CN118093839A (en) | Knowledge operation question-answer dialogue processing method and system based on deep learning | |
CN113807429B (en) | Enterprise classification method, enterprise classification device, computer equipment and storage medium | |
WO2019043380A1 (en) | Semantic parsing | |
CN115827847A (en) | Knowledge graph construction method and device, electronic equipment and storage medium | |
CN117786066B (en) | Document-oriented knowledge question-answering method, device, equipment and medium | |
US20240362412A1 (en) | Entropy based key-phrase extraction | |
CN114036949B (en) | Method and device for determining investment strategy based on information analysis | |
CN119378672A (en) | Method, device, equipment and medium for constructing question-answer knowledge database for professional fields |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Country or region after: China Address after: Building 007, West Union Factory, No. 62 South Shixin Road, Jinxiu Avenue, Shushan District, Hefei City, Anhui Province, 230031 Applicant after: Hefei pinecone Zhizao Intelligent Technology Co.,Ltd. Applicant after: Beijing Apacolan Technology Group Co.,Ltd. Address before: Building 007, West Union Factory, No. 62 South Shixin Road, Jinxiu Avenue, Shushan District, Hefei City, Anhui Province, 230031 Applicant before: Hefei pinecone Zhizao Intelligent Technology Co.,Ltd. Country or region before: China Applicant before: Beijing apoco Blue Technology Co.,Ltd. |
|
CB02 | Change of applicant information |