[go: up one dir, main page]

CN118626575A - Weather query system and weather query method - Google Patents

Weather query system and weather query method Download PDF

Info

Publication number
CN118626575A
CN118626575A CN202410769171.4A CN202410769171A CN118626575A CN 118626575 A CN118626575 A CN 118626575A CN 202410769171 A CN202410769171 A CN 202410769171A CN 118626575 A CN118626575 A CN 118626575A
Authority
CN
China
Prior art keywords
weather
meteorological
query
language model
answer
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
Application number
CN202410769171.4A
Other languages
Chinese (zh)
Inventor
刘进
陈炜鹏
郑思睿
王恩强
刘子枫
黄勃
崔晓晖
唐永强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN202410769171.4A priority Critical patent/CN118626575A/en
Publication of CN118626575A publication Critical patent/CN118626575A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2237Vectors, bitmaps or matrices
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Remote Sensing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Discloses a weather inquiry system and a weather inquiry method, belonging to the technical field of artificial intelligence. The weather inquiry system comprises: the large language model is connected with a plurality of tools, and the tools comprise real-time weather query tools; the large language model is used for generating a first answer based on first query information input by a user; acquiring first weather data based on the first query information and the real-time weather query tool; a second answer is generated based on the first meteorological data and the first answer. The weather query system can acquire accurate answers based on a large language model when querying weather related knowledge.

Description

气象查询系统和气象查询方法Weather query system and weather query method

技术领域Technical Field

本公开涉及人工智能技术领域,特别涉及一种气象查询系统和气象查询方法。The present disclosure relates to the field of artificial intelligence technology, and in particular to a weather query system and a weather query method.

背景技术Background Art

目前,大语言模型(LLMs,Large Language Models)技术逐渐成熟,在气象交通领域也可以通过LLMs实现查询气象相关的知识。LLMs是基于先进的深度学习技术构建的复杂人工智能系统,专注于理解和生成自然语言文本。At present, the technology of Large Language Models (LLMs) has gradually matured, and LLMs can also be used to query meteorological knowledge in the field of meteorology and transportation. LLMs are complex artificial intelligence systems built based on advanced deep learning technology, focusing on understanding and generating natural language text.

LLMs能够进行精准的信息检索、有效的问题解答,并生成语境相关的连贯回答。此外,LLMs还具备情感分析和用户意图识别的能力,从而更好地适应用户需求和行为。LLMs can perform accurate information retrieval, effective question answering, and generate contextually relevant and coherent responses. In addition, LLMs also have the ability to perform sentiment analysis and user intent recognition, thus better adapting to user needs and behaviors.

然而,在采用LLMs查询气象相关的知识时,仍然存在一些问题。例如,LLMs的训练数据是静态的,因此在需要最新或实时信息的气象方面的查询中,其仅能依赖过时的数据生成回答,导致生成的回答是过时的,过时的回答在一些情况下其实就是错误的回答。又例如,LLMs将知识编码于庞大的参数集中,使得其决策过程和参数的具体含义难以被人类理解,从而难以验证生成答案的可靠性。However, there are still some problems when using LLMs to query meteorological knowledge. For example, the training data of LLMs is static, so in meteorological queries that require the latest or real-time information, it can only rely on outdated data to generate answers, resulting in outdated answers. In some cases, outdated answers are actually wrong answers. For another example, LLMs encode knowledge in a huge set of parameters, making its decision-making process and the specific meaning of the parameters difficult for humans to understand, making it difficult to verify the reliability of the generated answers.

发明内容Summary of the invention

本公开提供了一种气象查询系统和气象查询方法,能够在查询气象相关的知识时,基于大语言模型获取准确的回答。所述技术方案至少包括如下方案:The present disclosure provides a weather query system and a weather query method, which can obtain accurate answers based on a large language model when querying weather-related knowledge. The technical solution at least includes the following solutions:

第一方面,提供了一种气象查询系统,所述气象查询系统包括:大语言模型,所述大语言模型与多个工具连接,所述多个工具包括实时气象查询工具;所述大语言模型用于基于用户输入的第一查询信息生成第一回答;基于所述第一查询信息和所述实时气象查询工具,获取第一气象数据;基于所述第一气象数据和所述第一回答,生成第二回答。In a first aspect, a weather query system is provided, comprising: a large language model, wherein the large language model is connected to a plurality of tools, wherein the plurality of tools include a real-time weather query tool; the large language model is used to generate a first answer based on first query information input by a user; based on the first query information and the real-time weather query tool, first weather data is obtained; and based on the first weather data and the first answer, a second answer is generated.

可选地,所述气象查询系统还包括:微调模块,所述微调模块与所述大语言模型连接;所述微调模块用于基于低秩自适应LoRA技术对所述大语言模型进行微调。Optionally, the weather query system also includes: a fine-tuning module, which is connected to the large language model; the fine-tuning module is used to fine-tune the large language model based on low-rank adaptive LoRA technology.

可选地,所述大语言模型包括网络参数,所述微调模块用于采用如下方式实现所述基于LoRA技术对所述大语言模型进行微调:基于所述大语言模型连接的不同工具,训练第一旁路参数和第二旁路参数,所述第一旁路参数和所述第二旁路参数用于微调所述网络参数,所述网络参数中的多个参数构成d乘d的矩阵,所述第一旁路参数中的多个参数构成r乘d的矩阵,所述第二旁路参数中的多个参数构成d乘r的矩阵。Optionally, the large language model includes network parameters, and the fine-tuning module is used to implement the fine-tuning of the large language model based on LoRA technology in the following manner: based on different tools connected to the large language model, training a first bypass parameter and a second bypass parameter, the first bypass parameter and the second bypass parameter are used to fine-tune the network parameters, multiple parameters in the network parameters constitute a d-by-d matrix, multiple parameters in the first bypass parameters constitute an r-by-d matrix, and multiple parameters in the second bypass parameters constitute a d-by-r matrix.

可选地,所述第一旁路参数和所述第二旁路参数用于采用如下公式微调所述网络参数:Optionally, the first bypass parameter and the second bypass parameter are used to fine-tune the network parameter using the following formula:

W′=W+ABW′=W+AB

其中,W′为微调后的所述网络参数,W为所述网络参数,A为所述第一旁路参数,B为所述第二旁路参数。Wherein, W′ is the fine-tuned network parameter, W is the network parameter, A is the first bypass parameter, and B is the second bypass parameter.

可选地,所述大语言模型与气象向量数据库连接,所述气象向量数据库包括多个气象向量,每个所述气象向量对应一个气象数据,所述大语言模型还用于将所述第一查询信息转换为第一查询向量,将所述第一查询向量与所述多个气象向量进行相似度计算,以确定与所述第一查询向量最接近的m个气象向量,获取与所述m个气象向量对应的m个气象数据,将所述m个气象数据与所述第一查询信息输入所述大语言模型,以得到所述大语言模型输出的所述第一回答。Optionally, the large language model is connected to a meteorological vector database, which includes multiple meteorological vectors, each of which corresponds to a meteorological data. The large language model is also used to convert the first query information into a first query vector, perform similarity calculation on the first query vector and the multiple meteorological vectors to determine the m meteorological vectors closest to the first query vector, obtain m meteorological data corresponding to the m meteorological vectors, and input the m meteorological data and the first query information into the large language model to obtain the first answer output by the large language model.

可选地,所述气象向量数据库采用如下方式构建:获取多个气象知识文本;将所述多个气象知识文本划分为多个气象数据,每个气象数据为一个文本块;基于第一嵌入模型,将所述多个气象数据转换为所述多个气象向量。Optionally, the meteorological vector database is constructed in the following manner: obtaining a plurality of meteorological knowledge texts; dividing the plurality of meteorological knowledge texts into a plurality of meteorological data, each meteorological data being a text block; and converting the plurality of meteorological data into the plurality of meteorological vectors based on a first embedding model.

可选地,所述气象向量数据库还包括索引列表,所述索引列表包括多个索引信息,第一索引信息用于指示第一气象向量,所述第一索引信息为所述多个索引信息中的任一个,所述第一索引信息包括所述第一气象向量的特征信息,所述第一气象向量所对应的气象数据以及所述第一气象向量所对应的气象数据所属的气象知识文本。Optionally, the meteorological vector database also includes an index list, the index list includes multiple index information, the first index information is used to indicate a first meteorological vector, the first index information is any one of the multiple index information, the first index information includes characteristic information of the first meteorological vector, the meteorological data corresponding to the first meteorological vector, and the meteorological knowledge text to which the meteorological data corresponding to the first meteorological vector belongs.

可选地,所述大语言模型还用于:对所述第一回答和所述第二回答进行语句重写和敏感信息检测。Optionally, the large language model is also used to: perform sentence rewriting and sensitive information detection on the first answer and the second answer.

第二方面,还提供了一种气象查询方法,包括:获取第一查询信息;将所述第一查询信息输入气象查询系统,所述气象查询系统包括:大语言模型,所述大语言模型与多个工具连接,所述多个工具包括实时气象查询工具,所述大语言模型用于基于用户输入的第一查询信息生成第一回答,基于所述第一查询信息和所述实时气象查询工具,获取第一气象数据,基于所述第一气象数据和所述第一回答,生成第二回答;获取所述气象查询系统输出的所述第二回答。In a second aspect, a weather query method is also provided, including: obtaining first query information; inputting the first query information into a weather query system, the weather query system including: a large language model, the large language model is connected to multiple tools, the multiple tools include a real-time weather query tool, the large language model is used to generate a first answer based on the first query information input by a user, based on the first query information and the real-time weather query tool, obtain first weather data, based on the first weather data and the first answer, generate a second answer; obtain the second answer output by the weather query system.

本公开实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solution provided by the embodiments of the present disclosure include at least:

在本公开实施例中,由于气象查询系统中的大语言模型与多个工具连接,其中多个工具包括实时气象查询工具,因此气象查询系统能够获取到实时的气象数据(也即是第一气象数据),并基于大语言模型的回答和通过工具查询到的第一气象数据生成第二回答。这样,能够增强大语言模型的专业知识和实时信息获取能力,且第一气象数据的存在使得大语言模型的决策过程具有可解释性,进而能够提升用户体验,使复杂工具的使用变得更加易于接触和操作,从而为用户提供更精准和个性化的响应。In the disclosed embodiment, since the large language model in the weather query system is connected to multiple tools, wherein the multiple tools include a real-time weather query tool, the weather query system can obtain real-time weather data (that is, the first weather data), and generate a second answer based on the answer of the large language model and the first weather data queried by the tool. In this way, the professional knowledge and real-time information acquisition capabilities of the large language model can be enhanced, and the existence of the first weather data makes the decision-making process of the large language model explainable, which can improve the user experience and make the use of complex tools easier to access and operate, thereby providing users with more accurate and personalized responses.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本公开实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

图1示出了本公开一个示例性实施例提供的气象查询系统的结构示意图;FIG1 shows a schematic diagram of the structure of a weather query system provided by an exemplary embodiment of the present disclosure;

图2示出了本公开另一个示例性实施例提供的气象查询系统的结构示意图;FIG2 shows a schematic structural diagram of a weather query system provided by another exemplary embodiment of the present disclosure;

图3是微调大语言模型的示意图;FIG3 is a schematic diagram of fine-tuning a large language model;

图4是大语言模型基于用户输入的第一查询信息生成第一回答的流程图;FIG4 is a flow chart of a large language model generating a first answer based on first query information input by a user;

图5示出了本公开一个示例性实施例提供的气象查询方法的流程图;FIG5 shows a flow chart of a weather query method provided by an exemplary embodiment of the present disclosure;

图6是本公开实施例提供的计算机设备的结构示意图。FIG. 6 is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure.

具体实施方式DETAILED DESCRIPTION

除非另作定义,此处使用的技术术语或者科学术语应当为本公开所属领域内具有一般技能的人士所理解的通常意义。本公开专利申请说明书以及权利要求书中使用的“第一”、“第二”、“第三”以及类似的词语并不表示任何顺序、数量或者重要性,而只是用来区分不同的组成部分。同样,“一个”或者“一”等类似词语也不表示数量限制,而是表示存在至少一个。“包括”或者“包含”等类似的词语意指出现在“包括”或者“包含”前面的元件或者物件涵盖出现在“包括”或者“包含”后面列举的元件或者物件及其等同,并不排除其他元件或者物件。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。A和/或B,表示存在三种情况:A,B,以及A和B。Unless otherwise defined, the technical or scientific terms used herein shall have the usual meanings understood by persons of ordinary skill in the field to which the present disclosure belongs. The words "first", "second", "third" and similar words used in the patent application specification and claims of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "one" do not indicate a quantitative limitation, but indicate the existence of at least one. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before "include" or "comprise" include the elements or objects listed after "include" or "comprise" and their equivalents, and do not exclude other elements or objects. Words such as "connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. A and/or B means that there are three situations: A, B, and A and B.

为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.

图1示出了本公开一个示例性实施例提供的气象查询系统的结构示意图,参见图1,该气象查询系统100包括大语言模型11,大语言模型11与多个工具12连接,多个工具12中包括实时气象查询工具。FIG1 shows a schematic diagram of the structure of a weather query system provided by an exemplary embodiment of the present disclosure. Referring to FIG1 , the weather query system 100 includes a large language model 11 , and the large language model 11 is connected to a plurality of tools 12 , wherein the plurality of tools 12 include a real-time weather query tool.

大语言模型11用于基于用户输入的第一查询信息生成第一回答,基于第一查询信息和实时气象查询工具,获取第一气象数据,基于第一气象数据和第一回答,生成第二回答。The large language model 11 is used to generate a first answer based on first query information input by a user, obtain first meteorological data based on the first query information and a real-time meteorological query tool, and generate a second answer based on the first meteorological data and the first answer.

在本公开实施例中,大语言模型11与多个工具12通过API(ApplicationProgramming Interface,应用程序接口)连接。In the disclosed embodiment, the large language model 11 is connected to the plurality of tools 12 via an API (Application Programming Interface).

这里,基于用户输入的第一查询信息生成第一回答,也即是将用户输入的第一查询信息输入大语言模型11,大语言模型11针对第一查询信息生成的输出即为第一回答。同理,基于第一气象数据和第一回答,生成第二回答,也即是将第一气象数据和第一回答均输入大语言模型11,大语言模型11针对第一气象数据和第一回答生成的输出即为第二回答。Here, the first answer is generated based on the first query information input by the user, that is, the first query information input by the user is input into the large language model 11, and the output generated by the large language model 11 for the first query information is the first answer. Similarly, the second answer is generated based on the first meteorological data and the first answer, that is, the first meteorological data and the first answer are both input into the large language model 11, and the output generated by the large language model 11 for the first meteorological data and the first answer is the second answer.

可选地,实时气象查询工具用于查询实时的气象数据、交通数据或者气象交通数据。这里,气象交通数据也即是对铁路或公路沿线的天气实况监测和预测的相关数据。Optionally, the real-time weather query tool is used to query real-time weather data, traffic data or weather traffic data. Here, weather traffic data is data related to the real-time monitoring and prediction of weather conditions along railways or highways.

可选地,实时气象查询工具包括但不限于气象官方网站、交通气象官方网站或者能够查询交通气象官方网站中的气象数据的软件等等。Optionally, the real-time weather query tool includes but is not limited to an official weather website, an official traffic weather website, or software capable of querying weather data in an official traffic weather website, and the like.

对于气象数据、交通数据或者气象交通数据而言,获取到的数据需要极高的时效性才能保证是准确的。气象情况、交通情况或者气象交通情况是瞬息万变的,可能1小时前的气象预报在一小时后就不准确了。故在通过大语言模型查询气象数据、交通数据或者气象交通数据时,需要保证大语言模型的回答是基于实时的数据生成的,而不能是基于过时的数据生成的。如果大语言模型的回答是基于过时的数据生成的,则生成的回答可能就不准确。For meteorological data, traffic data, or meteorological traffic data, the acquired data needs to be extremely timely to ensure accuracy. Meteorological conditions, traffic conditions, or meteorological traffic conditions are changing rapidly, and the weather forecast one hour ago may be inaccurate one hour later. Therefore, when querying meteorological data, traffic data, or meteorological traffic data through a large language model, it is necessary to ensure that the answer of the large language model is generated based on real-time data, rather than outdated data. If the answer of the large language model is generated based on outdated data, the generated answer may be inaccurate.

在本公开实施例中,由于气象查询系统100中的大语言模型与多个工具连接,其中多个工具包括实时气象查询工具,因此气象查询系统100能够获取到实时的气象数据(也即是第一气象数据),并基于大语言模型的回答和通过工具查询到的第一气象数据生成第二回答。这样,能够增强LLMs获取实时信息的能力,且第一气象数据的存在使得LLMs的决策过程具有可解释性,进而能够提升用户体验,使复杂工具的使用变得更加易于接触和操作,从而为用户提供更精准和个性化的响应。In the disclosed embodiment, since the large language model in the weather query system 100 is connected to multiple tools, wherein the multiple tools include a real-time weather query tool, the weather query system 100 can obtain real-time weather data (that is, the first weather data), and generate a second answer based on the answer of the large language model and the first weather data queried by the tool. In this way, the ability of LLMs to obtain real-time information can be enhanced, and the existence of the first weather data makes the decision-making process of LLMs explainable, which can improve the user experience and make the use of complex tools easier to access and operate, thereby providing users with more accurate and personalized responses.

图2示出了本公开另一个示例性实施例提供的气象查询系统的结构示意图,参见图2,该气象查询系统100包括大语言模型11、微调模块13和气象向量数据库14。大语言模型11分别与微调模块13、气象向量数据库14和多个工具12连接。多个工具12中包括实时气象查询工具。气象向量数据库14包括多个气象向量,每个气象向量对应一个气象数据。FIG2 shows a schematic diagram of the structure of a weather query system provided by another exemplary embodiment of the present disclosure. Referring to FIG2 , the weather query system 100 includes a large language model 11, a fine-tuning module 13, and a weather vector database 14. The large language model 11 is respectively connected to the fine-tuning module 13, the weather vector database 14, and a plurality of tools 12. The plurality of tools 12 include a real-time weather query tool. The weather vector database 14 includes a plurality of weather vectors, each of which corresponds to a piece of weather data.

在本公开实施例中,在气象查询系统100获取到用户输入的第一查询信息之前,需要建立气象向量数据库14。In the embodiment of the present disclosure, before the weather query system 100 obtains the first query information input by the user, it is necessary to establish a weather vector database 14.

气象向量数据库14是一个用于存储和处理向量形式气象数据的数据库系统,它通过将气象知识文本或其他类型的数据转换为向量表示,以支持高效的数学运算和快速的数据检索。这种数据库在处理大规模数据集、实现快速的查询匹配以及支持复杂的查询操作(如模糊匹配和语义搜索)时能够有效提高处理效率。气象向量数据库14利用机器学习模型将气象知识文本转化为语义丰富的向量,这些向量捕获了气象知识文本的深层语义关系而不仅仅是字面含义,从而能够在查询时,即便存在词汇上的差异(例如同义词)也能找到内容上相关的结果。The meteorological vector database 14 is a database system for storing and processing meteorological data in vector form. It supports efficient mathematical operations and fast data retrieval by converting meteorological knowledge text or other types of data into vector representations. This database can effectively improve processing efficiency when processing large-scale data sets, achieving fast query matching, and supporting complex query operations (such as fuzzy matching and semantic search). The meteorological vector database 14 uses machine learning models to convert meteorological knowledge text into semantically rich vectors. These vectors capture the deep semantic relationships of meteorological knowledge texts rather than just the literal meaning, so that when querying, even if there are lexical differences (such as synonyms), relevant results can be found.

可选地,气象向量数据库14采用如下三步创建:Optionally, the meteorological vector database 14 is created using the following three steps:

第一步,获取多个气象知识文本。The first step is to obtain multiple meteorological knowledge texts.

多个气象知识文本可以从气象局数据以及中国气象网数据等公开数据中获取。多个气象知识文本包括与天气、气候、气象科学及相关领域的知识文本。Multiple meteorological knowledge texts can be obtained from public data such as the meteorological bureau data and China Meteorological Network data. Multiple meteorological knowledge texts include knowledge texts related to weather, climate, meteorological science and related fields.

可选地,第一步还包括:将多个气象知识文本构建为气象知识文本库。Optionally, the first step also includes: constructing a plurality of meteorological knowledge texts into a meteorological knowledge text library.

第二步,将多个气象知识文本划分为多个气象数据。The second step is to divide multiple meteorological knowledge texts into multiple meteorological data.

每个气象数据为一个文本块。Each meteorological data is a text block.

可选地,在存在气象知识文本库的情况下,第二步包括:对气象知识文本库中的多个气象知识进行预处理。Optionally, in the case where there is a meteorological knowledge text library, the second step includes: preprocessing the multiple meteorological knowledge in the meteorological knowledge text library.

对气象知识文本库中的多个气象知识进行预处理包括:从气象知识文本库中筛选出高质量和相关性强的信息,并保留每个气象知识文本的来源信息(例如每个气象知识文本来源于哪个网站或者软件等)。清除气象知识文本中的无关信息、重复内容以及可能错误的气象知识文本,以提高气象知识文本库中存储的气象知识文本的质量和准确性。以及进行文本分词、去除停用词等预处理动作,以保证气象知识文本的一致性和可搜索性。Preprocessing multiple meteorological knowledge in the meteorological knowledge text library includes: selecting high-quality and highly relevant information from the meteorological knowledge text library, and retaining the source information of each meteorological knowledge text (such as which website or software each meteorological knowledge text comes from). Removing irrelevant information, repeated content, and potentially erroneous meteorological knowledge texts in the meteorological knowledge texts to improve the quality and accuracy of the meteorological knowledge texts stored in the meteorological knowledge text library. And performing preprocessing actions such as text segmentation and stop word removal to ensure the consistency and searchability of the meteorological knowledge texts.

经过预处理中的文本分词、去除停用词等动作后,能够得到经过初步划分的气象数据。但这些经过初步划分的气象数据的文本长度不一样长,并且部分文本还是相当大的文本块,如果直接使用这些大的文本块构建气象向量数据库14,会引入很多的噪声以及多余的上下文,并且大型语言模型受到最大上下文长度限制,也无法处理这些大的文本块。After the preprocessing of text segmentation and stop word removal, the meteorological data that has been preliminarily divided can be obtained. However, the text lengths of these preliminarily divided meteorological data are not the same, and some of the texts are still quite large text blocks. If these large text blocks are directly used to build the meteorological vector database 14, a lot of noise and redundant context will be introduced, and the large language model is limited by the maximum context length and cannot process these large text blocks.

因此,需要通过适当的分块策略,将这些大的文本块划分更小的文本块。更小的文本块更能够专注于单一或少数几个概念,减少不相关信息(也就是噪声)的干扰。这样,可以为用户提供更准确、更相关的信息。Therefore, it is necessary to divide these large text blocks into smaller text blocks through appropriate chunking strategies. Smaller text blocks are more able to focus on a single or a few concepts and reduce the interference of irrelevant information (that is, noise). In this way, more accurate and relevant information can be provided to users.

在本公开实施例中,分块策略通过滑窗实现。示例性地,滑窗的窗口大小为500字节,步长为100字节。滑窗的窗口大小和步长可以按照需求进行设置,例如需要将文本块分的较小的时候就可以减少滑窗的窗口的大小;而如果需要在一个大的文本块的基础上得到更多的小的文本块,则可以减少滑窗的步长。In the disclosed embodiment, the block division strategy is implemented by a sliding window. Exemplarily, the window size of the sliding window is 500 bytes and the step size is 100 bytes. The window size and step size of the sliding window can be set according to the requirements. For example, when the text blocks need to be divided into smaller ones, the window size of the sliding window can be reduced; and if more small text blocks need to be obtained based on a large text block, the step size of the sliding window can be reduced.

第三步,基于第一嵌入模型,将多个气象数据转换为多个气象向量。In the third step, based on the first embedding model, multiple meteorological data are converted into multiple meteorological vectors.

在机器学习和自然语言处理中,文本嵌入(text embedding)是指将文本的词表示成固定长度的稠密向量,也称为词向量(word vector)。这里,第一嵌入模型用于通过文本嵌入的方式,将气象数据转换为多个气象向量。In machine learning and natural language processing, text embedding refers to representing words in a text as dense vectors of fixed length, also known as word vectors. Here, the first embedding model is used to convert meteorological data into multiple meteorological vectors by text embedding.

可选地,第一嵌入模型还用于对每个气象向量进行嵌入查询。嵌入查询用于查询多个气象向量中,每个气象向量与其他气象向量之间的距离。例如,存在100个气象向量,则需要查询任一个气象向量与其他99个气象向量之间的距离。Optionally, the first embedding model is also used to perform an embedding query on each meteorological vector. The embedding query is used to query the distance between each meteorological vector and other meteorological vectors in multiple meteorological vectors. For example, if there are 100 meteorological vectors, it is necessary to query the distance between any meteorological vector and the other 99 meteorological vectors.

在确定了每个气象向量与其他气象向量之间的距离后,即可基于距离确定气象向量数据库14中每个气象向量与其他气象向量的相关程度。例如,可以将某个气象向量与其他气象向量之间的距离按照从小到大的顺序进行排序,将排序中的前n个向量作为与该气象向量相关的向量。其中,n为正整数。n的具体取值按照经验设定,本公开实施例对此不做限定。After determining the distance between each meteorological vector and other meteorological vectors, the correlation between each meteorological vector and other meteorological vectors in the meteorological vector database 14 can be determined based on the distance. For example, the distances between a certain meteorological vector and other meteorological vectors can be sorted in ascending order, and the first n vectors in the sorting are taken as vectors related to the meteorological vector. Where n is a positive integer. The specific value of n is set according to experience, and the embodiment of the present disclosure does not limit this.

通过确定气象向量数据库14中每个气象向量与其他气象向量的相关程度,可以简化后续将第一查询向量与多个气象向量进行相似度计算的流程。By determining the correlation between each meteorological vector and other meteorological vectors in the meteorological vector database 14, the subsequent process of calculating the similarity between the first query vector and multiple meteorological vectors can be simplified.

在本公开实施例中,在气象数据中进行文本嵌入的嵌入模型和进行嵌入查询的嵌入模型为同一嵌入模型,也即是第一嵌入模型。In the embodiment of the present disclosure, the embedding model for performing text embedding in meteorological data and the embedding model for performing embedded query are the same embedding model, that is, the first embedding model.

可选地,第一嵌入模型为thenlper/get-base-zh。thenlper/get-base-zh是通过预测下一个词以及预测屏蔽token等任务,在非常大的文本语料库中进行预训练的,这使得它能够学会在N个维度上表示token,并捕获语义信息。Optionally, the first embedding model is thenlper/get-base-zh. Thenlper/get-base-zh is pre-trained on a very large text corpus through tasks such as predicting the next word and predicting the masked token, which enables it to learn to represent tokens in N dimensions and capture semantic information.

有关thenlper/get-base-zh的实现方式,相关技术中较多,在此省略详述。There are many implementation methods of thenlper/get-base-zh in the related technologies, so detailed description is omitted here.

在得到多个气象向量后,即可将多个气象向量存储至气象向量数据库14中。After obtaining the multiple meteorological vectors, the multiple meteorological vectors may be stored in the meteorological vector database 14 .

可选地,在存在气象向量数据库14的情况下,还可以建立气象向量数据库14中的多个气象向量的索引列表,以便能够被快速检索到每个气象向量。Optionally, in the case where the meteorological vector database 14 exists, an index list of multiple meteorological vectors in the meteorological vector database 14 may be established so that each meteorological vector can be quickly retrieved.

索引列表包括多个索引信息。对于索引列表中的第一索引信息而言,该第一索引信息用于指示第一气象向量。该第一索引信息可以包括第一气象向量的特征信息,第一气象向量所对应的气象数据以及第一气象向量所对应的气象数据所属的气象知识文本。The index list includes a plurality of index information. For the first index information in the index list, the first index information is used to indicate the first meteorological vector. The first index information may include feature information of the first meteorological vector, meteorological data corresponding to the first meteorological vector, and meteorological knowledge text to which the meteorological data corresponding to the first meteorological vector belongs.

这里,第一索引信息为索引列表的多个索引信息中的任一个。索引列表中的其他索引信息的结构与第一索引信息相同。Here, the first index information is any one of the multiple index information in the index list. The structure of the other index information in the index list is the same as that of the first index information.

第一气象向量的特征信息用于唯一指示第一气象向量。例如可以是第一气象向量的名称或者关键词等。The characteristic information of the first meteorological vector is used to uniquely indicate the first meteorological vector, and may be, for example, the name or keyword of the first meteorological vector.

在实现时,可以Postgres和pgvector建立索引列表,将第一索引信息以三元组的形式保存,该三元组包括:文本,来源和嵌入。文本也即是第一气象向量所对应的气象数据,来源也即是第一气象向量所对应的气象数据所属的气象知识文本,嵌入也即是第一气象向量的特征信息。In implementation, an index list can be created using Postgres and pgvector, and the first index information is saved in the form of a triple, which includes: text, source, and embedding. The text is the meteorological data corresponding to the first meteorological vector, the source is the meteorological knowledge text to which the meteorological data corresponding to the first meteorological vector belongs, and the embedding is the feature information of the first meteorological vector.

有关Postgres和pgvector的实现方式,相关技术中较多,在此省略详述。There are many implementation methods of Postgres and pgvector in the related technologies, so detailed description is omitted here.

可选地,工作人员需要每经过设定的天数就手动更新气象向量数据库14,以提高气象向量数据库14中的气象向量的可靠程度。设定的天数的取值范围可以为1至15天,例如可以为1天、3天、5天、10天或者15天。Optionally, the staff needs to manually update the meteorological vector database 14 every set number of days to improve the reliability of the meteorological vectors in the meteorological vector database 14. The set number of days may range from 1 to 15 days, for example, 1 day, 3 days, 5 days, 10 days or 15 days.

相关技术中的大语言模型,在训练完成后就不会更新数据,只会基于现有的数据生成回答,相当于完全不具有时效性。而本公开实施例中,通过定期更新气象向量数据库14,能够实现定期更新气象领域的专业知识,从而提高了气象向量数据库14的时效性。The large language model in the related art will not update the data after training is completed, and will only generate answers based on the existing data, which is equivalent to being completely out of time. In the embodiment of the present disclosure, by regularly updating the meteorological vector database 14, it is possible to regularly update the professional knowledge in the meteorological field, thereby improving the timeliness of the meteorological vector database 14.

在大语言模型11与多个工具12连接的情况下,由于不同的工具所需的输入的数据格式是不同的,且不同的工具所输出的数据的格式也是不同的。因此,需要通过大语言模型11还需要进行工具训练,以使大语言模型11能够准确地使用不同的工具。这里,大语言模型11使用不同的工具也即是大语言模型11能够根据不同的工具将需要输入该工具的数据转化为该工具所需的输入的数据格式。When the large language model 11 is connected to multiple tools 12, different tools require different input data formats, and different tools output data formats are also different. Therefore, tool training is required through the large language model 11 so that the large language model 11 can accurately use different tools. Here, the large language model 11 uses different tools, which means that the large language model 11 can convert the data required to be input into the input data format required by the tool according to different tools.

示例性的,需要输入某个工具的数据为“查询某城市在C月D日的天气预报”,而该工具所需输入的数据格式为:地点,日期。则经过工具训练的大语言模型11则能够将该需要输入该工具的数据转换为该工具所需的输入的数据格式,也即是转换为“某城市,C月D日”。For example, the data to be input into a tool is "query the weather forecast for a certain city on C month D day", and the data format required by the tool is: location, date. The large language model 11 trained by the tool can convert the data to be input into the data format required by the tool, that is, "a certain city, C month D day".

在多个工具12的情况下,对于用户输入的第一查询信息,大语言模型11需要确定第一查询信息利用哪个工具进行获取气象数据。并且,将第一查询信息输入某个工具后,由于工具的输出一般属于格式化输出,而不是大语言模型11能够理解的指令,故大语言模型11还需要能够理解工具输出的内容的具体含义。In the case of multiple tools 12, for the first query information input by the user, the large language model 11 needs to determine which tool is used to obtain meteorological data for the first query information. In addition, after the first query information is input into a tool, since the output of the tool is generally formatted output rather than an instruction that the large language model 11 can understand, the large language model 11 also needs to be able to understand the specific meaning of the content output by the tool.

本公开实施例中的微调模块13就是用于训练大语言模型11,使得大语言模型用于能够准确地基于用户输入的查询信息确定要将该查询信息输入哪个工具,以及使大语言模型11能够理解工具输出的内容的具体含义。The fine-tuning module 13 in the disclosed embodiment is used to train the large language model 11, so that the large language model can accurately determine which tool to input the query information based on the query information input by the user, and enable the large language model 11 to understand the specific meaning of the content output by the tool.

微调模块13用于基于低秩自适应(Low Rank Adaption,LoRA)技术对大语言模型11进行微调。The fine-tuning module 13 is used to fine-tune the large language model 11 based on the Low Rank Adaption (LoRA) technology.

可选地,大语言模型包括网络参数,在这种情况下,微调模块13基于LoRA技术对所述大语言模型进行微调,包括:基于大语言模型11连接的不同工具,训练第一旁路参数和第二旁路参数,第一旁路参数和第二旁路用于微调网络参数。Optionally, the large language model includes network parameters. In this case, the fine-tuning module 13 fine-tunes the large language model based on the LoRA technology, including: training a first bypass parameter and a second bypass parameter based on different tools connected to the large language model 11, and the first bypass parameter and the second bypass are used to fine-tune the network parameters.

其中,网络参数中的多个参数构成d乘d的矩阵,第一旁路参数中的多个参数构成r乘d的矩阵,第二旁路参数中的多个参数构成d乘r的矩阵。Among them, multiple parameters in the network parameters constitute a d-by-d matrix, multiple parameters in the first bypass parameters constitute an r-by-d matrix, and multiple parameters in the second bypass parameters constitute a d-by-r matrix.

在本公开实施例中,当多个工具12中的工具的数量增加或者减少时,就需要通过微调模块13对大语言模型11进行训练。由于大语言模型11的网络参数的数量很多,如果每增加或者减少一个工具,就重新训练大语言模型11的网络参数,无疑会大大增加成本。故在本公开实施例中,微调模块13通过采用LoRA技术对大语言模型11进行微调,在需要增加或者减少工具时,仅需训练第一旁路参数和第二旁路参数即可,而网络参数保持不变,通过训练出的第一旁路参数和第二旁路参数实现对网络参数的微调。In the disclosed embodiment, when the number of tools in the plurality of tools 12 increases or decreases, it is necessary to train the large language model 11 through the fine-tuning module 13. Since the number of network parameters of the large language model 11 is large, if the network parameters of the large language model 11 are retrained every time a tool is added or reduced, it will undoubtedly greatly increase the cost. Therefore, in the disclosed embodiment, the fine-tuning module 13 fine-tunes the large language model 11 by using the LoRA technology. When it is necessary to add or reduce tools, it is only necessary to train the first bypass parameter and the second bypass parameter, while the network parameters remain unchanged, and the fine-tuning of the network parameters is achieved through the trained first bypass parameter and the second bypass parameter.

这里,在训练大语言模型的过程中,需要存储待训练的参数。那么,待训练的参数越多,所需存储的数据量就越大,且花费的时间就越长。在本公开实施例中,网络参数中的多个参数构成d乘d的矩阵,也即是存在d乘d个网络参数,而第一旁路参数中的多个参数构成r乘d的矩阵,第二旁路参数中的多个参数构成d乘r的矩阵,也即是第一旁路参数和第二旁路参数中总共存在两倍的d乘r个参数。那么,在r足够小的情况下,两倍的d乘r是远小于d乘d的,也即是,与训练整个网络参数相比,训练第一旁路参数和第二旁路参数时所需存储的待训练参数的数量大大降低。故在本公开实施例中,通过在微调时仅训练第一旁路参数和第二旁路参数,而不训练网络参数,可以大大降低训练过程所需存储的数据量,减少所需花费的时间,提高微调的效率。Here, in the process of training a large language model, it is necessary to store the parameters to be trained. Then, the more parameters to be trained, the larger the amount of data to be stored, and the longer the time spent. In the embodiment of the present disclosure, multiple parameters in the network parameters constitute a d-by-d matrix, that is, there are d-by-d network parameters, and multiple parameters in the first bypass parameters constitute an r-by-d matrix, and multiple parameters in the second bypass parameters constitute a d-by-r matrix, that is, there are twice the d-by-r parameters in the first bypass parameters and the second bypass parameters. Then, when r is small enough, twice d times r is much smaller than d times d, that is, compared with training the entire network parameters, the number of parameters to be trained that need to be stored when training the first bypass parameters and the second bypass parameters is greatly reduced. Therefore, in the embodiment of the present disclosure, by training only the first bypass parameters and the second bypass parameters during fine-tuning, without training the network parameters, the amount of data required to be stored in the training process can be greatly reduced, the time required to be spent can be reduced, and the efficiency of fine-tuning can be improved.

可选地,第一旁路参数和第二旁路参数用于采用公式(1)微调网络参数:Optionally, the first bypass parameter and the second bypass parameter are used to fine-tune the network parameters using formula (1):

W′=W+AB (1)W′=W+AB (1)

在公式(1)中,W′为微调后的网络参数,W为网络参数,A为第一旁路参数,B为第二旁路参数。可以看出,在仅训练第一旁路参数和第二旁路参数实现微调网络参数时,网络参数是不发生变化的。由于第一旁路参数中的多个参数构成r乘d的矩阵,第二旁路参数中的多个参数构成d乘r的矩阵,故AB后得到的也是d乘d的矩阵,因此可以与W相加。In formula (1), W′ is the fine-tuned network parameter, W is the network parameter, A is the first bypass parameter, and B is the second bypass parameter. It can be seen that when only the first bypass parameter and the second bypass parameter are trained to fine-tune the network parameter, the network parameter does not change. Since the multiple parameters in the first bypass parameter constitute an r-by-d matrix, and the multiple parameters in the second bypass parameter constitute a d-by-r matrix, the matrix obtained after AB is also a d-by-d matrix, so it can be added to W.

可选地,在微调完成后,将微调后的网络参数进行保存,例如保存为低秩权重。Optionally, after fine-tuning is completed, the fine-tuned network parameters are saved, for example, saved as low-rank weights.

示例性地,在大语言模型11的网络参数经过微调后,大语言模型11用于采用公式(2)对输入的数据进行处理。Exemplarily, after the network parameters of the large language model 11 are fine-tuned, the large language model 11 is used to process input data using formula (2).

h=xW′=x(W+AB)=xW+xAB (2)h=xW′=x(W+AB)=xW+xAB (2)

在公式(2)中,h为大语言模型输出的数据,x为输入大语言模型11的数据。公式(2)中的其他参数的含义与公式(1)中相同,在此省略详述。In formula (2), h is the data output by the large language model, and x is the data input to the large language model 11. The meanings of other parameters in formula (2) are the same as those in formula (1), and detailed description is omitted here.

图3是微调大语言模型的示意图。如图3所示,输入的数据x是一个d维向量,网络参数W中的多个参数构成d乘d的矩阵,第一旁路参数A中的多个参数构成r乘d的矩阵,第二旁路参数B中的多个参数构成d乘r的矩阵。在微调模块13微调大语言模型11的过程中,输入的数据x经过微调后的网络参数处理的过程可以分为两个部分,一部分是x经过网络参数W处理,这一步得到的是公式(2)中的xW;另一部分是输入的数据x经过第一旁路参数A和第二旁路参数B处理,这一步得到的是公式(2)中的xAB。将二者相加,得到的就是大语言模型输出的数据h。图3中,在初始状态下,第一旁路参数是经过随机初始化的均值为0,方差为σ的参数,也即是A=N(0,σ2);第二旁路参数初始化为0,也即是B=0。在微调模块13微调大语言模型11的过程中,第一旁路参数和第二旁路参数会逐渐变化,直至得到合适的第一旁路参数和第二旁路参数。FIG3 is a schematic diagram of fine-tuning a large language model. As shown in FIG3 , the input data x is a d-dimensional vector, multiple parameters in the network parameter W constitute a d-by-d matrix, multiple parameters in the first bypass parameter A constitute an r-by-d matrix, and multiple parameters in the second bypass parameter B constitute a d-by-r matrix. In the process of fine-tuning the large language model 11 by the fine-tuning module 13, the process of processing the input data x through the fine-tuned network parameters can be divided into two parts. One part is that x is processed by the network parameter W, and this step obtains xW in formula (2); the other part is that the input data x is processed by the first bypass parameter A and the second bypass parameter B, and this step obtains xAB in formula (2). Adding the two together, the data h output by the large language model is obtained. In FIG3 , in the initial state, the first bypass parameter is a parameter with a mean of 0 and a variance of σ after random initialization, that is, A=N(0,σ 2 ); the second bypass parameter is initialized to 0, that is, B=0. During the process of fine-tuning the large language model 11 by the fine-tuning module 13, the first bypass parameter and the second bypass parameter will gradually change until appropriate first bypass parameters and second bypass parameters are obtained.

在本公开实施例中,微调模块13是对预训练的大语言模型11进行微调。预训练的大语言模型11可以使用Hugging Face的Transformers库实现加载。在一些示例中,加载预训练的大语言模型11的同时还可以加载分词器。In the disclosed embodiment, the fine-tuning module 13 fine-tunes the pre-trained large language model 11. The pre-trained large language model 11 can be loaded using the Transformers library of Hugging Face. In some examples, a word segmenter can also be loaded while loading the pre-trained large language model 11.

示例性地,预训练的大语言模型11可以是ChatGLM3-6B模型。Exemplarily, the pre-trained large language model 11 may be a ChatGLM3-6B model.

在实现微调模块13时,可以先通过预处理将输入大语言模型11的数据转换成适合模型的格式(这里输入大语言模型11的数据也即是用于训练或者验证的数据),包括输入张量(input_ids)、注意力掩码(attn_mask)和标签(labels)。然后,通过LoRA(Low-RankAdaptation)技术对模型权重进行调整,以优化大语言模型11的响应性和泛化能力。在训练过程中,可以利用Accelerate库实现多GPU(Graphics Processing Unit,图像处理器)环境下的模型训练,提高处理效率。采用AdamW作为优化器,并结合余弦预热学习率调度策略,以稳定和高效地推进训练过程。最终,在训练完成后保存调整过的模型权重,为后续的模型推理和应用打好基础。When implementing the fine-tuning module 13, the data input to the large language model 11 can be converted into a format suitable for the model through preprocessing (here, the data input to the large language model 11 is also the data used for training or verification), including input tensors (input_ids), attention masks (attn_mask) and labels (labels). Then, the model weights are adjusted through the LoRA (Low-Rank Adaptation) technology to optimize the responsiveness and generalization ability of the large language model 11. During the training process, the Accelerate library can be used to implement model training in a multi-GPU (Graphics Processing Unit, image processor) environment to improve processing efficiency. AdamW is used as the optimizer, combined with the cosine warm-up learning rate scheduling strategy to stably and efficiently advance the training process. Finally, the adjusted model weights are saved after the training is completed to lay a good foundation for subsequent model reasoning and application.

这里,Hugging Face是一家公司,该公司提供的Transformers库包括多个预训练的大语言模型。Here, Hugging Face is a company that provides a Transformers library that includes multiple pre-trained large language models.

Accelerate库是一个为PyTorch用户设计的库,能够帮助简化分布式训练和混合精度训练的过程。PyTorch是torch的python版本,是一个开源的神经网络框架,专门针对GPU加速的深度神经网络编程。The Accelerate library is a library designed for PyTorch users that can help simplify the process of distributed training and mixed precision training. PyTorch is the python version of torch, an open source neural network framework specifically for GPU-accelerated deep neural network programming.

AdamW是一种改进的优化算法,在Adam优化算法的基础上加入了权重衰减(weightdecay)的机制。AdamW可以有效地防止模型过拟合,提高模型的泛化能力。AdamW is an improved optimization algorithm that adds a weight decay mechanism to the Adam optimization algorithm. AdamW can effectively prevent model overfitting and improve the generalization ability of the model.

余弦预热学习率调度策略也即是采用预热的方式训练学习率,采用余弦退火的方式调整学习率。The cosine warm-up learning rate scheduling strategy is to train the learning rate by warm-up and adjust the learning rate by cosine annealing.

有关Huggingface的Transformers库、Accelerate库、AdamW、采用预热的方式训练学习率以及采用余弦退火的方式调整学习率的实现方式,相关技术中较多,在此省略详述。There are many related technologies about Huggingface's Transformers library, Accelerate library, AdamW, how to train the learning rate by preheating, and how to adjust the learning rate by cosine annealing, so detailed description is omitted here.

通过微调模块13,确保了大语言模型11在特定任务上的表现得到显著提升,也即是大语言模型11可以基于用户的第一查询信息准确地确定将第一查询信息输入至哪个工具,同时也提高了训练过程的经济性和效率。The fine-tuning module 13 ensures that the performance of the large language model 11 on specific tasks is significantly improved, that is, the large language model 11 can accurately determine which tool to input the first query information based on the user's first query information, while also improving the economy and efficiency of the training process.

在本公开实施例中,大语言模型11用于基于用户输入的第一查询信息生成第一回答,基于第一查询信息和实时气象查询工具,获取第一气象数据,基于第一气象数据和第一回答,生成第二回答。In the disclosed embodiment, the large language model 11 is used to generate a first answer based on first query information input by a user, obtain first meteorological data based on the first query information and a real-time meteorological query tool, and generate a second answer based on the first meteorological data and the first answer.

图4是大语言模型基于用户输入的第一查询信息生成第一回答的流程图,参见图4,大语言模型11用于采用如下步骤a-c实现基于用户输入的第一查询信息生成第一回答:FIG4 is a flow chart of the large language model generating a first answer based on the first query information input by the user. Referring to FIG4 , the large language model 11 is used to implement the generation of the first answer based on the first query information input by the user by adopting the following steps a-c:

步骤a,将第一查询信息转换为第一查询向量。Step a: converting the first query information into a first query vector.

可选地,在将第一查询信息转换为第一查询向量时,也通过第一嵌入模型,以文本嵌入的方式实现将第一查询信息转换为第一查询向量。Optionally, when converting the first query information into the first query vector, the first query information is converted into the first query vector by text embedding through the first embedding model.

这样,能够保证第一查询向量与气象向量数据库14中存储的多个气象向量在同一维度空间内,以便于后续进行气象向量的相似度计算。In this way, it can be ensured that the first query vector and the multiple meteorological vectors stored in the meteorological vector database 14 are in the same dimensional space, so as to facilitate the subsequent similarity calculation of the meteorological vectors.

步骤b,将第一查询向量与多个气象向量进行相似度计算,以确定与第一查询向量最接近的m个气象向量。Step b: performing similarity calculation between the first query vector and a plurality of meteorological vectors to determine m meteorological vectors that are closest to the first query vector.

可选地,采用余弦相似度技术实现将第一查询向量与多个气象向量进行相似度计算,从而可以得到第一查询向量与每个气象向量的相似度。Optionally, a cosine similarity technique is used to calculate the similarity between the first query vector and a plurality of meteorological vectors, so that the similarity between the first query vector and each meteorological vector can be obtained.

在得到了第一查询向量与每个气象向量的相似度后,可以将这些相似度按照从小到大的顺序进行排序,将前m个相似度对应的气象向量作为与第一查询向量最接近的m个气象向量,以便于进行后续的处理。After obtaining the similarity between the first query vector and each meteorological vector, these similarities can be sorted in ascending order, and the meteorological vectors corresponding to the first m similarities are taken as the m meteorological vectors closest to the first query vector for subsequent processing.

步骤c,获取与m个气象向量对应的m个气象数据,将m个气象数据与第一查询信息输入大语言模型11,以得到大语言模型11输出的第一回答。Step c: obtaining m meteorological data corresponding to the m meteorological vectors, and inputting the m meteorological data and the first query information into the large language model 11 to obtain a first answer output by the large language model 11.

其中,m为正整数。m的具体取值按照经验设定,本公开实施例对此不做限定。Wherein, m is a positive integer. The specific value of m is set according to experience, and the embodiment of the present disclosure does not limit this.

上述步骤a-c又称检索增强生成(RAG,Retrieval-Augmented Generation)技术。The above steps a-c are also called Retrieval-Augmented Generation (RAG) technology.

可选地,在执行步骤c之前,大语言模型11还用于:对与m个气象向量对应的m个气象数据进行过滤和精简处理,以保证过滤和精简处理后的气象数据与第一查询信息高度相关,从而提高了得到的第一回答的准确性。Optionally, before executing step c, the large language model 11 is also used to filter and simplify the m meteorological data corresponding to the m meteorological vectors to ensure that the filtered and simplified meteorological data are highly relevant to the first query information, thereby improving the accuracy of the first answer obtained.

在存在过滤和精简处理后的气象数据的情况下,步骤c包括:将过滤和精简处理后的气象数据与第一查询信息输入大语言模型11,以得到大语言模型11输出的第一回答。In the case where there is filtered and simplified meteorological data, step c includes: inputting the filtered and simplified meteorological data and the first query information into the large language model 11 to obtain a first answer output by the large language model 11.

通过对气象数据进行过滤和精简处理,能够提高第一回答的准确性和相关性。By filtering and streamlining the meteorological data, the accuracy and relevance of the first answer can be improved.

在本公开实施例中,在采用上述步骤a-c生成第一回答时,由于气象向量数据库14中的数据会定期更新,因此生成的第一回答具有一定的时效性。且由于一些专业知识的更新速度较慢,定期更新气象向量数据库14中的数据就能够保证气象向量数据库14中的专业知识是最新(或者较新)的数据。故在专业知识方面,采用上述步骤a-c生成的第一回答具有较强的时效性。In the disclosed embodiment, when the first answer is generated by adopting the above steps a-c, the data in the meteorological vector database 14 is updated regularly, so the generated first answer has a certain timeliness. And because some professional knowledge is updated slowly, regularly updating the data in the meteorological vector database 14 can ensure that the professional knowledge in the meteorological vector database 14 is the latest (or newer) data. Therefore, in terms of professional knowledge, the first answer generated by adopting the above steps a-c has a strong timeliness.

在得到第一回答以后,大语言模型11即可执行基于第一查询信息和实时气象查询工具,获取第一气象数据;基于第一气象数据和第一回答,生成第二回答。After obtaining the first answer, the large language model 11 can execute based on the first query information and the real-time weather query tool to obtain the first weather data; based on the first weather data and the first answer, generate the second answer.

由于大语言模型11已经经过了工具训练过程,且大语言模型11已经经过了微调模块13的微调,故大语言模型11能够明白需要将第一查询信息输入实时气象查询工具,且大语言模型11也能够准确地将第一查询信息输入实时气象查询工具,以实现获取第一气象数据。Since the large language model 11 has undergone the tool training process and the large language model 11 has been fine-tuned by the fine-tuning module 13, the large language model 11 can understand the need to input the first query information into the real-time meteorological query tool, and the large language model 11 can also accurately input the first query information into the real-time meteorological query tool to obtain the first meteorological data.

实时气象查询工具能够查询到实时更新的气象数据,例如某个时刻的温度、湿度等等参数。因此,在实时的气象数据方面,基于第一气象数据和第一回答生成的第二回答具有较强的时效性。时效性越强,第二回答准确的可能性也就越高。The real-time weather query tool can query the real-time updated weather data, such as the temperature, humidity and other parameters at a certain moment. Therefore, in terms of real-time weather data, the second answer generated based on the first weather data and the first answer has a strong timeliness. The stronger the timeliness, the higher the possibility that the second answer is accurate.

可选地,大语言模型11还用于:对第一回答和第二回答进行语句重写和敏感信息检测。Optionally, the large language model 11 is also used to perform sentence rewriting and sensitive information detection on the first answer and the second answer.

可选地,在敏感信息检测检测到敏感信息的情况下,大语言模型11还用于:过滤第一回答和/或第二回答中的敏感信息。Optionally, when sensitive information is detected by the sensitive information detection, the large language model 11 is further used to: filter the sensitive information in the first answer and/or the second answer.

当第一回答中存在敏感信息时,大语言模型11用于过滤第一回答中的敏感信息。When sensitive information exists in the first answer, the large language model 11 is used to filter the sensitive information in the first answer.

当第二回答中存在敏感信息时,大语言模型11用于过滤第二回答中的敏感信息。When there is sensitive information in the second answer, the large language model 11 is used to filter the sensitive information in the second answer.

当第一回答和第二回答中均中存在敏感信息时,大语言模型11用于过滤第一回答和第二回答中的敏感信息。When sensitive information exists in both the first answer and the second answer, the large language model 11 is used to filter the sensitive information in the first answer and the second answer.

一些情况下生成的回答中可能存在敏感信息,且不易理解。通过对第一回答和第二回答进行语句重写,能够使第一回答和第二回答变得易于理解。而通过对第一回答和第二回答进行敏感信息检测,并在检测到敏感信息时过滤敏感信息,则能够提高生成的回答的安全性。In some cases, the generated answers may contain sensitive information and be difficult to understand. By rewriting the first answer and the second answer, the first answer and the second answer can be made easier to understand. By detecting sensitive information in the first answer and the second answer and filtering sensitive information when sensitive information is detected, the security of the generated answers can be improved.

在本公开实施例中,通过检索增强技术生成第一回答,结合通过工具查询到的专业知识生成第二回答,既增强了模型的专业知识和实时信息获取能力,又提高了决策过程的可解释性和透明度。工作人员在得到第二回答时,可以追溯到第一回答和第一气象数据,从而提高了第二回答的生成过程的可解释性和透明度。In the disclosed embodiment, the first answer is generated by the search enhancement technology, and the second answer is generated by combining the professional knowledge queried by the tool, which not only enhances the professional knowledge and real-time information acquisition capabilities of the model, but also improves the interpretability and transparency of the decision-making process. When the staff obtains the second answer, they can trace it back to the first answer and the first meteorological data, thereby improving the interpretability and transparency of the generation process of the second answer.

此外,通过检索增强技术生成第一回答,结合通过工具查询到的专业知识生成第二回答,能够减少对于参数化知识(例如气象向量数据库14中的数据)的依赖,多个工具12的存在使大语言模型11更加鲁棒,不易受到对抗性攻击的影响。且气象方面的专业工具的使用过程较为复杂,门槛较高,通过大语言模型11实现将第一查询信息输入工具,能够使复杂工具的使用变得更加易于接触和操作,从而为用户提供更精准和个性化的响应。In addition, by generating the first answer through the search enhancement technology and combining the professional knowledge queried through the tool to generate the second answer, the reliance on parameterized knowledge (such as data in the meteorological vector database 14) can be reduced. The existence of multiple tools 12 makes the large language model 11 more robust and less susceptible to adversarial attacks. In addition, the use process of professional tools in meteorology is relatively complex and has a high threshold. By inputting the first query information into the tool through the large language model 11, the use of complex tools can be made easier to access and operate, thereby providing users with more accurate and personalized responses.

需要说明的是:上述实施例提供的气象查询系统进行查询气象时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that: when the weather query system provided in the above embodiment is used to query the weather, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

本公开实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时也可以有另外的划分方式,另外,在本公开各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成为一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。The division of modules in the embodiments of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present disclosure may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台终端设备(可以是个人计算机,手机,或者通信设备等)或处理器(processor)执行本公开各个实施例该方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-onlymemory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a terminal device (which can be a personal computer, a mobile phone, or a communication device, etc.) or a processor (processor) to perform all or part of the steps of the method of each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

以下是本申请的方法实施例,对于方法实施例中未详细描述的细节,可以参考上述气象查询系统实施例。The following is a method embodiment of the present application. For details not described in detail in the method embodiment, reference can be made to the above-mentioned weather query system embodiment.

图5示出了本公开一个示例性实施例提供的气象查询方法的流程图,该方法可以由计算机设备执行,参见图5,该方法包括:FIG5 shows a flow chart of a weather query method provided by an exemplary embodiment of the present disclosure. The method may be executed by a computer device. Referring to FIG5 , the method includes:

在步骤501中,获取第一查询信息。In step 501, first query information is obtained.

在步骤502中,将第一查询信息输入气象查询系统。In step 502, first query information is input into a weather query system.

气象查询系统包括:大语言模型,大语言模型与多个工具连接,多个工具包括实时气象查询工具,大语言模型用于基于用户输入的第一查询信息生成第一回答,基于第一查询信息和实时气象查询工具,获取第一气象数据,基于第一气象数据和第一回答,生成第二回答。The weather query system includes: a large language model, the large language model is connected to multiple tools, the multiple tools include a real-time weather query tool, the large language model is used to generate a first answer based on first query information input by a user, based on the first query information and the real-time weather query tool, obtain first weather data, based on the first weather data and the first answer, generate a second answer.

这里,步骤502中的气象查询系统可以参见前述图1或者图2中的气象查询系统100,在此省略详述。Here, the weather query system in step 502 may refer to the weather query system 100 in FIG. 1 or 2 , and detailed description is omitted here.

在步骤503中,获取气象查询系统输出的第二回答。In step 503, a second answer output by the weather query system is obtained.

图6是本公开实施例提供的计算机设备的结构示意图。如图6所示,该计算机设备600包括:处理器601和存储器602。FIG6 is a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure. As shown in FIG6 , the computer device 600 includes: a processor 601 and a memory 602 .

处理器601可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器601可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器601也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器601可以在集成有GPU,GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器601还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 601 may be integrated with a GPU, which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

存储器602可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器602还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器602中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器601所执行以实现本公开实施例中提供的气象查询方法。The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 602 is used to store at least one instruction, which is used to be executed by the processor 601 to implement the weather query method provided in the embodiment of the present disclosure.

本领域技术人员可以理解,图6中示出的结构并不构成对计算机设备600的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art will appreciate that the structure shown in FIG. 6 does not limit the computer device 600 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

本公开实施例还提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由计算机设备的处理器执行时,使得计算机设备能够执行本公开实施例中提供的气象查询方法。The embodiment of the present disclosure also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by the processor of a computer device, the computer device can execute the weather query method provided in the embodiment of the present disclosure.

本公开实施例还提供了一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现本公开实施例中提供的气象查询方法。The embodiment of the present disclosure also provides a computer program product, including a computer program/instruction, which implements the weather query method provided in the embodiment of the present disclosure when the computer program/instruction is executed by a processor.

以上所述仅为本公开的可选实施例,并不用以限制本公开,凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。The above description is only an optional embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (9)

1.一种气象查询系统,其特征在于,所述气象查询系统包括:大语言模型,所述大语言模型与多个工具连接,所述多个工具包括实时气象查询工具;1. A weather query system, characterized in that the weather query system comprises: a large language model, the large language model is connected to a plurality of tools, the plurality of tools comprises a real-time weather query tool; 所述大语言模型用于基于用户输入的第一查询信息生成第一回答;The large language model is used to generate a first answer based on first query information input by a user; 基于所述第一查询信息和所述实时气象查询工具,获取第一气象数据;Based on the first query information and the real-time weather query tool, obtaining first weather data; 基于所述第一气象数据和所述第一回答,生成第二回答。A second answer is generated based on the first weather data and the first answer. 2.根据权利要求1所述的气象查询系统,其特征在于,所述气象查询系统还包括:微调模块,所述微调模块与所述大语言模型连接;2. The weather query system according to claim 1, characterized in that the weather query system further comprises: a fine-tuning module, the fine-tuning module is connected to the large language model; 所述微调模块用于基于低秩自适应LoRA技术对所述大语言模型进行微调。The fine-tuning module is used to fine-tune the large language model based on low-rank adaptive LoRA technology. 3.根据权利要求2所述的气象查询系统,其特征在于,所述大语言模型包括网络参数,所述微调模块用于采用如下方式实现所述基于LoRA技术对所述大语言模型进行微调:3. The weather query system according to claim 2, characterized in that the large language model includes network parameters, and the fine-tuning module is used to implement the fine-tuning of the large language model based on LoRA technology in the following manner: 基于所述大语言模型连接的不同工具,训练第一旁路参数和第二旁路参数,所述第一旁路参数和所述第二旁路参数用于微调所述网络参数,所述网络参数中的多个参数构成d乘d的矩阵,所述第一旁路参数中的多个参数构成r乘d的矩阵,所述第二旁路参数中的多个参数构成d乘r的矩阵。Based on different tools connected to the large language model, a first bypass parameter and a second bypass parameter are trained, wherein the first bypass parameter and the second bypass parameter are used to fine-tune the network parameters, wherein multiple parameters of the network parameters constitute a d-by-d matrix, multiple parameters of the first bypass parameters constitute an r-by-d matrix, and multiple parameters of the second bypass parameters constitute a d-by-r matrix. 4.根据权利要求3所述的气象查询系统,其特征在于,所述第一旁路参数和所述第二旁路参数用于采用如下公式微调所述网络参数:4. The weather query system according to claim 3, characterized in that the first bypass parameter and the second bypass parameter are used to fine-tune the network parameter using the following formula: W′=W+ABW′=W+AB 其中,W′为微调后的所述网络参数,W为所述网络参数,A为所述第一旁路参数,B为所述第二旁路参数。Wherein, W′ is the fine-tuned network parameter, W is the network parameter, A is the first bypass parameter, and B is the second bypass parameter. 5.根据权利要求2至4任一项所述的气象查询系统,其特征在于,所述大语言模型与气象向量数据库连接,所述气象向量数据库包括多个气象向量,每个所述气象向量对应一个气象数据,所述大语言模型还用于将所述第一查询信息转换为第一查询向量,将所述第一查询向量与所述多个气象向量进行相似度计算,以确定与所述第一查询向量最接近的m个气象向量,获取与所述m个气象向量对应的m个气象数据,将所述m个气象数据与所述第一查询信息输入所述大语言模型,以得到所述大语言模型输出的所述第一回答。5. The weather query system according to any one of claims 2 to 4 is characterized in that the large language model is connected to a weather vector database, the weather vector database includes multiple weather vectors, each weather vector corresponds to a weather data, and the large language model is also used to convert the first query information into a first query vector, perform similarity calculation on the first query vector and the multiple weather vectors to determine the m weather vectors closest to the first query vector, obtain m weather data corresponding to the m weather vectors, and input the m weather data and the first query information into the large language model to obtain the first answer output by the large language model. 6.根据权利要求5所述的气象查询系统,其特征在于,所述气象向量数据库采用如下方式构建:6. The weather query system according to claim 5, characterized in that the weather vector database is constructed in the following manner: 获取多个气象知识文本;Obtain multiple meteorological knowledge texts; 将所述多个气象知识文本划分为多个气象数据,每个气象数据为一个文本块;Dividing the plurality of meteorological knowledge texts into a plurality of meteorological data, each meteorological data being a text block; 基于第一嵌入模型,将所述多个气象数据转换为所述多个气象向量。Based on the first embedding model, the plurality of meteorological data are converted into the plurality of meteorological vectors. 7.根据权利要求6所述的气象查询系统,其特征在于,所述气象向量数据库还包括索引列表,所述索引列表包括多个索引信息,7. The weather query system according to claim 6, characterized in that the weather vector database further comprises an index list, wherein the index list comprises a plurality of index information. 第一索引信息用于指示第一气象向量,所述第一索引信息为所述多个索引信息中的任一个,所述第一索引信息包括所述第一气象向量的特征信息,所述第一气象向量所对应的气象数据以及所述第一气象向量所对应的气象数据所属的气象知识文本。The first index information is used to indicate a first meteorological vector. The first index information is any one of the multiple index information. The first index information includes characteristic information of the first meteorological vector, meteorological data corresponding to the first meteorological vector, and meteorological knowledge text to which the meteorological data corresponding to the first meteorological vector belongs. 8.根据权利要求2至4任一项所述的气象查询系统,其特征在于,所述大语言模型还用于:对所述第一回答和所述第二回答进行语句重写和敏感信息检测。8. The weather query system according to any one of claims 2 to 4, characterized in that the large language model is also used to: perform sentence rewriting and sensitive information detection on the first answer and the second answer. 9.一种气象查询方法,其特征在于,所述方法包括:9. A weather query method, characterized in that the method comprises: 获取第一查询信息;Obtaining first query information; 将所述第一查询信息输入气象查询系统,所述气象查询系统包括:大语言模型,所述大语言模型与多个工具连接,所述多个工具包括实时气象查询工具,所述大语言模型用于基于用户输入的第一查询信息生成第一回答,基于所述第一查询信息和所述实时气象查询工具,获取第一气象数据,基于所述第一气象数据和所述第一回答,生成第二回答;Inputting the first query information into a weather query system, the weather query system comprising: a large language model, the large language model being connected to a plurality of tools, the plurality of tools comprising a real-time weather query tool, the large language model being used to generate a first answer based on the first query information input by a user, acquiring first weather data based on the first query information and the real-time weather query tool, and generating a second answer based on the first weather data and the first answer; 获取所述气象查询系统输出的所述第二回答。The second answer output by the weather query system is obtained.
CN202410769171.4A 2024-06-14 2024-06-14 Weather query system and weather query method Pending CN118626575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410769171.4A CN118626575A (en) 2024-06-14 2024-06-14 Weather query system and weather query method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410769171.4A CN118626575A (en) 2024-06-14 2024-06-14 Weather query system and weather query method

Publications (1)

Publication Number Publication Date
CN118626575A true CN118626575A (en) 2024-09-10

Family

ID=92606175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410769171.4A Pending CN118626575A (en) 2024-06-14 2024-06-14 Weather query system and weather query method

Country Status (1)

Country Link
CN (1) CN118626575A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119577097A (en) * 2024-12-12 2025-03-07 浪潮云信息技术股份公司 Meteorological data analysis method, device, equipment and medium based on large model intelligent agent
US20250124393A1 (en) * 2023-10-11 2025-04-17 Fusion Risk Management, Inc. Large language model (llm) integration for scenario generation in a risk management platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20250124393A1 (en) * 2023-10-11 2025-04-17 Fusion Risk Management, Inc. Large language model (llm) integration for scenario generation in a risk management platform
CN119577097A (en) * 2024-12-12 2025-03-07 浪潮云信息技术股份公司 Meteorological data analysis method, device, equipment and medium based on large model intelligent agent

Similar Documents

Publication Publication Date Title
CN111191002B (en) Neural code searching method and device based on hierarchical embedding
WO2022007823A1 (en) Text data processing method and device
CN112149410A (en) Semantic recognition method, apparatus, computer equipment and storage medium
AU2023437681A1 (en) Systems and methods for generating query responses
CN118626575A (en) Weather query system and weather query method
WO2020010834A1 (en) Faq question and answer library generalization method, apparatus, and device
CN120409710B (en) A large model training data synthesis method, system, device and storage medium
CN118504663A (en) Fine tuning data screening method, fine tuning data screening device, computer equipment and readable storage medium
CN117131273A (en) Resource search methods, devices, computer equipment, media and products
CN113934835A (en) Retrieval type reply dialogue method and system combining keywords and semantic understanding representation
CN112988952A (en) Multi-level-length text vector retrieval method and device and electronic equipment
CN119357408A (en) A method for constructing electric power knowledge graph based on large language model
CN117093686A (en) Intelligent question-answer matching method, device, terminal and storage medium
CN118503454A (en) Data query method, device, storage medium and computer program product
CN118210874A (en) Data processing method, device, computer equipment and storage medium
CN118052289A (en) Question-answer reasoning method and system for hierarchical hyperbolic graph representation on knowledge graph
CN114328894A (en) Document processing method, document processing device, electronic equipment and medium
CN117435685A (en) Document retrieval method, document retrieval device, computer equipment, storage medium and product
CN117252173A (en) Intelligent log text template mining method, device, equipment and storage medium
CN119578559B (en) Intelligent agent automatic configuration method and system based on large model, knowledge base and tools
CN114218214A (en) Data processing method, system and storage medium based on Tapas model
CN116108836B (en) Text emotion recognition method and device, computer equipment and readable storage medium
CN115146596B (en) Recall text generation method and device, electronic equipment and storage medium
CN112614024B (en) Intelligent recommendation method and system, device and medium for legal articles based on case facts
CN117573956B (en) Metadata management method, device, equipment and storage medium

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