Phase diagram question reply method and device, storage medium and computing equipment

By generating query vectors and intelligent model processing, quickly searching the phase graph database, solving the problem that users find it difficult to quickly obtain phase graph data, and achieving efficient and accurate phase graph problem responses.

CN119938991APending Publication Date: 2025-05-06SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510045345.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, it is difficult for users to quickly obtain data from different phase diagrams, resulting in high efficiency and cost of phase diagram research.

Method used

By generating a query vector, searching based on the phase graph database, similar phase graph information is generated, and phase graph reply data is generated using intelligent models and preset model reply parameters.

Benefits of technology

It realizes that users query phase graph information through natural language, quickly obtain similar phase graph information similar to query vectors, reduces user query level requirements, improves query efficiency, and reduces the cost of answering questions in the phase graph field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938991A_ABST
    Figure CN119938991A_ABST
Patent Text Reader

Abstract

The invention provides a phase diagram question answering method and device, a storage medium and computing equipment, and the method comprises the steps: generating a query vector according to phase diagram query information; based on the query vector, searching a phase diagram database to generate similar phase diagram information; the phase diagram reply data is generated based on the similar phase diagram information, the intelligent model and the preset model reply parameters, so that a user can query problems in the phase diagram field through a natural language, a computing device can adapt to various query formats and problem complexity, and the query level requirement of the user is reduced; the computing device supports the conversion of a natural language of a user into a vector, then queries in a phase diagram database exclusive to the phase diagram field to obtain similar phase diagram information similar to the query vector, and finally efficiently obtains phase diagram reply data in real time according to the similar phase diagram information and an intelligent model and the expansibility degree of the model. Therefore, the question answering cost of the phase diagram field is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of phase diagram technology, and more particularly to a method for answering phase diagram questions. Background Art

[0002] As a lightweight structural material, magnesium alloy is widely used in aerospace, automobile manufacturing, electronic products and other fields due to its excellent specific strength, vibration resistance and good electromagnetic shielding ability. However, in order to meet the industrial demand for high-strength, excellent corrosion resistance and high-temperature stability materials, the development of new magnesium alloy systems has become a research hotspot.

[0003] At present, the improvement of magnesium alloy performance mainly depends on the optimization of microstructure, and the evolution of microstructure is determined by the phase diagram information of the material. Phase diagram information is important information that describes the phase stability of the material under different temperature, composition and pressure conditions, and plays a guiding role in the optimization of material heat treatment process and alloy design.

[0004] At present, the technical means of phase diagram research mainly include experimental methods, which are to obtain experimental data through metallographic analysis of heat treatment process, X-ray diffraction (XRD), differential scanning calorimetry (DSC), transmission electron microscope (TEM), etc. The experimental data includes phase diagram information. However, such methods are time-consuming and costly, and it is difficult for users to quickly obtain data of different phase diagrams. Summary of the invention

[0005] In view of this, the embodiments of this specification provide a method for answering phase diagram questions. One or more embodiments of this specification also relate to a device for answering phase diagram questions, a computing device, a computer-readable storage medium, and a computer program to solve the technical defect in the prior art that it is difficult for users to quickly obtain data of different phase diagrams.

[0006] According to a first aspect of an embodiment of this specification, a method for answering a phase diagram problem is provided, comprising: Generate a query vector according to the phase diagram query information; Based on the query vector, searching a phase diagram database to generate similar phase diagram information, wherein the phase diagram database includes a plurality of phase diagram information; Phase diagram response data is generated based on the similar phase diagram information, the intelligent model and the preset model response parameters.

[0007] In a possible implementation, before generating phase diagram response data based on the similar phase diagram information, the intelligent model and the preset model response parameters, the method further includes: Through supervised fine-tuning technology, a training set in the form of question-answer pairs is generated based on the training database; The intelligent model is trained based on the training set to generate the trained intelligent model.

[0008] In a possible implementation, the phase diagram database includes an embedding vector, and the embedding vector corresponds to the phase diagram information; Accordingly, searching the phase diagram database based on the query vector to generate similar phase diagram information includes: Based on the query vector and the plurality of embedding vectors, generating a vector similarity corresponding to each of the embedding vectors; Filtering a target vector similarity from the plurality of vector similarities; The similar phase diagram information is determined based on the phase diagram information corresponding to the target vector similarity.

[0009] In a possible implementation, the generating, based on the query vector and the plurality of embedding vectors, a vector similarity corresponding to each of the embedding vectors includes: The vector similarity is generated based on the query vector and the embedding vector through a cosine similarity formula.

[0010] In a possible implementation, the step of selecting a target vector similarity from the plurality of vector similarities includes: Sorting the vector similarities from large to small to generate a high ranking result; The target vector similarity is determined based on the similarities of a first preset number of vectors in the high ranking results.

[0011] In a possible implementation, the phase diagram response data is expressed in a form including at least one of text, table, and graph.

[0012] In a possible implementation, the intelligent model includes a large language model.

[0013] According to a second aspect of an embodiment of this specification, a device for answering a phase diagram question is provided, comprising: A first generating module is configured to generate a query vector according to the phase diagram query information; A second generating module is configured to search a phase diagram database based on the query vector to generate similar phase diagram information, wherein the phase diagram database includes a plurality of phase diagram information; The third generation module is configured to generate phase diagram response data based on the similar phase diagram information, the intelligent model and the preset model response parameters.

[0014] According to a third aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method for answering the phase diagram problem are implemented.

[0015] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the method for answering the phase diagram problem are implemented.

[0016] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the method for answering the above-mentioned phase diagram problem.

[0017] An embodiment of the present specification implements a method, apparatus, storage medium and computing device for answering phase diagram questions, the method comprising: generating a query vector according to phase diagram query information; searching a phase diagram database based on the query vector to generate similar phase diagram information; generating phase diagram answer data based on the similar phase diagram information, an intelligent model and preset model answer parameters, so that users can query questions in the field of phase diagrams through natural language, and the computing device can adapt to a variety of query formats and question complexities, reducing the level requirements of user queries; the computing device supports converting the user's natural language into a vector, and then querying a phase diagram database exclusive to the phase diagram field to obtain similar phase diagram information similar to the query vector, and finally obtaining phase diagram answer data based on the similar phase diagram information and the intelligent model according to the degree of scalability of the model to answer the user's question, whether it is a simple binary alloy or a complex ternary or multi-component phase diagram problem, the intelligent model can efficiently provide answers, providing an efficient, accurate and easy-to-use solution for scientific research and industrial applications, and reducing the cost of answering questions in the field of phase diagrams. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a flow chart of a method for answering a phase diagram question provided by one embodiment of this specification; Figure 2 is a schematic diagram of an LLM framework provided by an embodiment of this specification; Figure 3 is a schematic diagram of a reply page provided by an embodiment of this specification; Figure 4 It is a schematic diagram of the structure of a device for answering phase diagram questions provided by one embodiment of this specification; Figure 5 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0018] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0019] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0020] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0021] In the related technologies, the technical means of phase diagram research mainly include experimental methods, traditional thermodynamic calculation methods or machine learning methods. By studying phase diagrams through experimental methods, experimental data can be directly obtained. The experimental data has a high degree of credibility and can discover new unknown phases. However, it is time-consuming and costly, especially for multi-component phase diagram research. It is also difficult to cover a wide range of alloy compositions and temperature ranges due to the limitations of experimental equipment and conditions.

[0022] The traditional thermodynamic calculation method is to calculate the phase diagram information of magnesium alloys based on existing software. The traditional thermodynamic calculation method is used to study the phase diagram, which has a mature theoretical basis and is suitable for binary, ternary and multi-component phase diagram prediction. It is combined with experimental data to gradually optimize the model accuracy. However, the software operation is complex, requires a high professional background of the user, the calculation process is cumbersome, the optimization and iteration cycle is long, and the processing ability of rare phases and high-dimensional data is limited.

[0023] The machine learning method predicts phase diagram information based on traditional machine learning models such as neural networks and support vector machines (SVM). It can automatically analyze data patterns, and the model training speed is relatively fast, which is suitable for some simple phase diagram prediction tasks. However, it is difficult to handle high-dimensional, multi-component complex data, and has poor prediction capabilities for complex phase diagrams (especially rare phases and multi-component systems); it lacks the support of a dedicated knowledge base and has limited generalization capabilities; without field fine-tuning, the generated content is prone to errors, and has poor adaptability to high-dimensional complex data and non-material field problems, making it difficult to ensure scientificity and accuracy, and unable to accurately respond to complex material science problems.

[0024] In order to quickly answer questions related to the phase diagram field, this manual provides a method for answering phase diagram questions. Figure 1 is a flow chart of a method for answering a phase diagram question provided by an embodiment of this specification, such as Figure 1 As shown, the method includes: Step 101: The computing device generates a query vector based on the phase diagram query information.

[0025] In some embodiments, the computing device includes but is not limited to a mobile phone, a desktop computer, a laptop computer, a wearable device or a server. The phase diagram query information includes information about the phase diagram that needs to be queried, and the phase diagram query information can be input into the computing device by a user. The phase diagram query information can be a natural language input by the user into the computing device. For example, the phase diagram query information includes alloy ratio information and temperature information. The phase diagram query information is "what is the phase composition when the aluminum content is 96%, the zinc content is 2%, and the temperature is 350°C". The computing device converts the phase diagram query information into a vector through vectorization technology to generate a query vector.

[0026] Step 102: The computing device searches the phase diagram database based on the query vector to generate similar phase diagram information, wherein the phase diagram database includes a plurality of phase diagram information.

[0027] In some embodiments, the phase diagram information includes magnesium alloy phase diagram information, and the magnesium alloy phase diagram information includes multiple information such as aluminum content, zinc content, temperature, phase composition information, etc. The phase diagram information usually includes aluminum content, zinc content, temperature and phase composition information, and the phase composition information includes phase composition.

[0028] The computing device searches the phase diagram query information in the form of a query vector in the phase diagram database, searches out at least one similar phase diagram information, and uses at least one similar phase diagram information as the similar phase diagram information. The preset number of similar phase diagram information to be searched can be adjusted, and the preset number is an integer less than or equal to the total number value and greater than or equal to 1, and the total number value is the number of all phase diagram information in the phase diagram database. However, the preset number is usually adjusted to be greater than 1, and multiple similar phase diagram information is searched out, for example, it is set to search out 10 similar phase diagram information.

[0029] Step 103: The computing device generates phase diagram response data based on the similar phase diagram information, the intelligent model and the preset model response parameters.

[0030] In some embodiments, model response parameters refer to parameters that control the diversity and certainty of model output. Users can set model response parameters based on their own needs to control the extent to which the intelligent model responds to phase diagram query information. Phase diagram response data is the response result corresponding to the phase diagram query information, and the expression form of the phase diagram response data includes at least one of text, table, and graph. The intelligent model includes a large language model (LLM). Phase diagram response data includes at least one of phase composition, phase diagram, and material design suggestions. For example, the phase composition and material design suggestions are expressed in the form of text, the phase diagram is expressed in the form of a graph, and the material design suggestions can also be expressed in the form of text and a table.

[0031] The model response parameter may include a numerical value, and the degree of response is set by the numerical value. For example, the value range of the model response parameter is greater than 0 and less than 2. For the phase diagram query information, "What is the phase composition when the aluminum content is 96%, the zinc content is 2%, and the temperature is 350°C", when the model response parameter is 1, the intelligent model tends to give a targeted response, and the intelligent model will generate the phase composition, and will also generate a phase diagram displayed in a black and white line diagram based on the similar phase diagram information, and the phase diagram response data includes data such as the phase composition and the phase diagram; when the model response parameter is less than 1 and greater than 0, the intelligent model tends to give a rigorous response, and the intelligent model will generate the phase composition, and the phase diagram response data includes the phase composition, so that the output is more accurate, and the intelligent model will also generate data such as the phase diagram according to the adaptability of the model response parameter; when the model response parameter is greater than 1 and less than 2, the intelligent model tends to give an expansive response, and the intelligent model will not only generate the phase composition and the phase diagram, but also generate data such as material design suggestions according to the expansibility of the model response parameter, and the phase diagram response data includes data such as the phase composition, material design suggestions, and the phase diagram, so that the output is more creative. The model response parameters may also be presented in other forms. For example, the model response parameters include extended responses, targeted responses, or rigorous responses, which will not be elaborated here.

[0032] The present specification provides a method for answering phase diagram questions, which generates a query vector based on phase diagram query information; based on the query vector, searches the phase diagram database to generate similar phase diagram information, wherein the phase diagram database includes multiple phase diagram information; generates phase diagram answer data based on the similar phase diagram information, an intelligent model and preset model answer parameters, so that users can query questions in the field of phase diagrams through natural language, and the computing device can adapt to a variety of query formats and question complexities, reducing the level requirements of user queries; the computing device supports converting the user's natural language into a vector, and then queries the phase diagram database exclusive to the phase diagram field to obtain similar phase diagram information similar to the query vector, and finally obtains the phase diagram answer data based on the similar phase diagram information and the intelligent model according to the scalability of the model to answer the user's question. Whether it is a simple binary alloy or a complex ternary or multi-component phase diagram problem, the intelligent model can efficiently provide answers, providing an efficient, accurate and easy-to-use solution for scientific research and industrial applications, and reducing the cost of answering questions in the field of phase diagrams.

[0033] The following combination Figure 1 , the answering method of the phase diagram question is further described. In a possible implementation, step 101 may include: the computing device generates a query vector according to the phase diagram query information by using a vectorization technology.

[0034] In some embodiments, the vectorization technique includes converting the phase image query information into a vector through the OpenAI text-embedding-ada-002 model.

[0035] In a possible implementation, before step 102, the process also includes: a computing device generates multiple phase diagram information through thermodynamic software; based on the multiple phase diagram information, an embedded vector corresponding to each phase diagram information is generated through vectorization technology; and a phase diagram database is generated based on the multiple phase diagram information and the embedded vector corresponding to each phase diagram information.

[0036] In some embodiments, before step 102, the computing device constructs a phase diagram database, and thermodynamic software is run on the computing device to calculate the phase diagram information of the multi-component magnesium-aluminum-zinc (Mg-Al-Zn) ternary alloy by the CALPHAD method. For example, the phase diagram information includes aluminum content, zinc content, temperature and phase composition information, the aluminum content is in the range of 0%-100%, the zinc content is in the range of 0%-100%, the temperature is in the range of 25°C-750°C, the temperature step is 5°C, and the computing device constructs a phase diagram database including 750,000 phase diagram information.

[0037] The computing device generates an embedded vector corresponding to the phase diagram information through vectorization technology, and stores the embedded vector in a vector database. The phase diagram database includes a vector database, and the vector database includes multiple embedded vectors. Thus, the phase diagram information is converted into a high-dimensional vector for storage, and the phase diagram database has a retrieval function, which provides a basis for subsequent data retrieval and model training.

[0038] In a possible implementation, step 102 includes: the computing device searches the phase diagram database based on the query vector by using the Retrieval-Augmented Generation (RAG) technology to generate similar phase diagram information.

[0039] In some embodiments, the computing device may use RAG technology to retrieve at least one embedding vector close to the query vector from the phase diagram database through similarity calculation, and use the phase diagram information corresponding to the at least one close embedding vector as the close phase diagram information. Step 102 may specifically include: Step 1021: The computing device generates a vector similarity corresponding to each embedded vector based on the query vector and the multiple embedded vectors.

[0040] In some embodiments, the computing device generates vector similarity based on the query vector and the embedding vector by using the cosine similarity formula. The computing device generates a dot product result based on the query vector and the embedding vector by using the cosine similarity formula; normalizes the query vector to generate a normalized query vector, and normalizes the embedding vector to generate a normalized embedding vector; generates a product result based on the normalized query vector and the normalized embedding vector; and uses the ratio of the dot product result to the product result as the vector similarity. Wherein, normalizing the vector includes performing a Euclidean norm operation on the vector, the computing device performs a Euclidean norm operation on the query vector to generate a normalized query vector, and performs a Euclidean norm operation on the embedding vector to generate a normalized embedding vector.

[0041] The cosine similarity formula is CS= . Where A represents the query vector and B represents the embedding vector. represents the normalized query vector, represents the normalized embedding vector, and CS represents the vector similarity. Thus, the semantic relevance between the phase image query information and the phase image information in the phase image database is measured by the cosine similarity formula. The greater the vector similarity, the higher the relevance between the phase image query information and the phase image information.

[0042] Step 1022: The computing device selects a target vector similarity from multiple vector similarities.

[0043] In some embodiments, the computing device sorts the multiple vector similarities from large to small to generate a high-ranking result; and determines the target vector similarity based on the first preset number of vector similarities in the high-ranking result.

[0045] For example, the computing device sorts the multiple vector similarities in order from large to small, and selects the first preset number of vector similarities from the multiple vector similarities in order from front to back, and uses the first preset number of vector similarities as the target vector similarity. Alternatively, the sorting may be performed in order from small to large to generate a low sorting result; the target vector similarity is determined based on the last preset number of vector similarities in the low sorting result. Alternatively, a larger preset number of vector similarities may be selected from the multiple vector similarities as the target vector similarity by other means, and the order of sorting is not limited in the embodiment of the present invention. Step 1023: The computing device determines similar phase diagram information based on the phase diagram information corresponding to the target vector similarity.

[0046] In some embodiments, since the vector similarity corresponds to the embedding vector and the embedding vector corresponds to the phase diagram information, the vector similarity corresponds to the phase diagram information.

[0047] The computing device uses the phase diagram information corresponding to the similarity of a preset number of target vectors as the similar phase diagram information, so that users can query the phase diagram information through natural language. The database has a retrieval function, and the most relevant data can be quickly retrieved through cosine similarity. Compared with the experimental methods and traditional thermodynamic methods in related technologies, it avoids tedious calculation steps and manual parameter adjustment, improves query efficiency, greatly reduces query time, and significantly reduces the time to obtain phase diagram information. It can directly obtain the similar phase diagram information that is most relevant to the phase diagram query information. Through RAG technology, the computing device can adapt to a variety of query formats and problem complexities in the process of retrieving phase diagram knowledge, whether it is a simple binary alloy or a complex ternary or multivariate phase diagram problem, it can provide answers efficiently.

[0048] In a possible implementation, before step 103, the step also includes: the computing device generates a training set in the form of question-answer pairs based on the training database through supervised fine-tuning technology; and trains the intelligent model based on the training set to generate a trained intelligent model.

[0049] In some embodiments, the intelligent model includes an LLM. The computing device converts the training database into a question-answer pair through the supervised fine-tuning (SFT) technology, and generates a training set in JSON format from the question-answer pair. For example, the question-answer pair is: "What is the phase composition of 96% aluminum, 2% zinc, and 350°C?", and the corresponding answer is "liquid phase". The computing device performs targeted fine-tuning on the pre-trained intelligent model through the OpenAI model interface, and generates an adjusted intelligent model through the training set in JSON format. Among them, the training database may include a phase diagram database, and at the same time, the training database may also include other knowledge related to thermodynamics. For example, the LLM model is fine-tuned using proprietary data in the field of magnesium alloy phase diagrams. Databases, scientific research results, theoretical knowledge and papers related to the field of magnesium alloy phase diagrams are used as the most credible data. Scientific research conjectures related to the field of magnesium alloy phase diagrams and related content on interactive websites are used as relatively credible data. The LLM is trained together to optimize the model's domain knowledge. This allows the intelligent model to specialize in learning proprietary knowledge in the field of magnesium alloy phase diagrams, which can significantly improve the accuracy of answers to knowledge in the field, as well as the accuracy of magnesium alloy phase diagram predictions and the logic of generated content, thereby avoiding possible reasoning errors or fuzzy outputs in unoptimized models, thereby ensuring prediction accuracy.

[0050] The computing device also sets query response parameters for the intelligent model through prompt engineering. Query response parameters include model response parameter ranges or multiple model response parameters, and can also include system instructions. The computing device sets specific system prompts through prompt engineering, thereby improving the relevance, accuracy, rigor, randomness or diversity of the generated content through model response parameters, and guiding the intelligent model to focus on the prediction and generation of magnesium alloy phase diagram problems through system instructions. For example, the query prompt is "You are an expert in the field of materials science phase diagrams. Please provide phase composition predictions for the following conditions."

[0051] In a possible implementation, before step 103, the process also includes: the computing device determines a model response parameter.

[0052] In some embodiments, the computing device may display a model answer parameter range, and the user may select a model answer parameter that meets their needs from the model answer parameter range in advance; or the computing device may pre-set a default model answer parameter from the model answer parameter range. Alternatively, the computing device may display multiple model answer parameters, for example, multiple model answer parameters are expansive answers, targeted answers, and rigorous answers, and the user may select a model answer parameter that meets their needs from multiple model answer parameters in advance; or the computing device may pre-set a default model answer parameter from multiple model answer parameters. Thus, the model answer parameters can be preset before the intelligent model answers the question, and the rigor or expansibility of the LLM when answering the question can be controlled.

[0053] In a possible implementation, step 103 includes: the computing device determines the target phase diagram information based on the intelligent model and the similar phase diagram information; and generates phase diagram response data based on the intelligent model, the phase diagram query information and the model response parameters.

[0054] In some embodiments, the intelligent model includes an LLM. Based on the LLM, the computing device determines the closest phase diagram information from at least one similar phase diagram information, and uses the closest phase diagram information as the target phase diagram information. The intelligent model combines the user's query, obtains the problem result from the target phase diagram information, and determines the divergence of the generated phase diagram response data according to the model response parameters. For example, the phase diagram query information is "What is the phase composition when the aluminum content is 96%, the zinc content is 2%, and the temperature is 350°C", and the computing device obtains the phase composition as a liquid phase based on the target phase diagram information, and then performs an extended response based on the value of the model response parameter. The value range of the model response parameter is greater than 0 and less than 2. When the model response parameter is 1, the intelligent model tends to give targeted responses, and will also generate phase diagrams displayed in black and white lines based on similar phase diagram information. The phase diagram response data includes data such as phase composition and phase diagram; when the model response parameter is less than 1 and greater than 0, the intelligent model tends to give rigorous responses. The smaller the model response parameter, the more rigorous the generated content will be, and the data credibility will be high, but it will also lead to a relatively simple response; when the model response parameter is greater than 1 and less than 2, the intelligent model tends to give extensible responses. The larger the model response parameter, the more diverse the generated content will be, and corresponding material design suggestions will be given, but at the same time, the credibility of the phase diagram response data will be reduced, and inaccurate data will be included. The intelligent model outputs the phase diagram response data in JSON format, so that users can directly use it for subsequent analysis or recording.

[0055] Figure 2 is a schematic diagram of an LLM framework provided by an embodiment of this specification, such as Figure 2As shown in the figure, the LLM framework includes RAG, fine-tuning and prompt engineering. The prepared database includes a large amount of thermodynamics-related knowledge. The LLM model is fine-tuned in a targeted manner, and prompts are set for the LLM through prompt engineering to obtain a fine-tuned LLM. The user inputs the question into the computing device, and the embedding model (fine-tuned LLM) converts the question into a query vector, and searches the vector database for the embedding vector related to the query vector; combined with thermodynamic knowledge and prompt engineering, the phase diagram answer data is obtained, and the phase diagram answer data is displayed to the user as an answer. The prompt engineering prompts LLM to focus on the prediction and generation of magnesium alloy phase diagram problems. For example, the prompt engineering content is "You are an expert in phase diagrams and thermodynamics, specializing in phase equilibrium of material systems (such as binary and ternary phase diagrams). You have a deep understanding of eutectic reactions, peritectic reactions, and liquid-solid phase transitions, and can calculate and predict phase stability under various conditions. Your goal is to provide accurate, clear and correct answers to problems related to phase transitions, solid solutions, and multiphase equilibrium, giving priority to correctness while only showing the key steps of the reasoning process. When the user provides you with composition and temperature conditions, you can accurately determine the phase composition under these conditions. Whether the user is seeking phase diagram analysis, thermodynamic background knowledge, or material optimization suggestions, you can give precise answers. Note: Even if you are not sure, you must provide clear answers to help users evaluate accuracy. The response should be output in JSON format."

[0056] In a possible implementation, after step 103 , the method further includes: the computing device displays a response page, where the response page includes the phase diagram response data.

[0057] In some embodiments, the reply page also includes at least one of processing progress, system instructions, phase diagram query information, response format, function buttons and model configuration, and the model configuration includes at least one of model reply parameter range, maximum number of tokens, stop sequence, top P, frequency penalty and presence penalty, wherein the model reply parameter can be represented by temperature. Functions corresponding to the function buttons include Generate function, Clear function, Code view function and Compare function. Figure 3 is a schematic diagram of a reply page provided by an embodiment of this specification, such as Figure 3As shown, the reply page includes processing progress, system instructions, phase diagram query information, response format, function buttons, model configuration and phase diagram reply data. Model configuration includes model reply parameter range, maximum number of tokens, stop sequence, top P, frequency penalty and existence penalty. The processing progress is located on the left side of the reply page. The processing progress includes chat, real-time processing, model output, text-to-speech and completion.

[0058] like Figure 3 As shown, the system instructions are located at the top of the interface, including the functional description and operation rules of the intelligent model, so as to clarify the professional background of the model, such as the professionalism in the field of material thermodynamic phase diagrams, and explain that the model gives priority to correctness when dealing with phase diagram composition, phase change and multiphase equilibrium problems, while providing a clear reasoning process, emphasizing the output of JSON format results, and providing clear answers even if the model is uncertain. The user input area provides an input box for users, and users can set the processing progress to chat. In the input box, users query relevant content in the field of phase diagrams in natural language format. The model output area provides an output box, which is located below the user input box. When the computing device processes the user's query, it sets the processing progress to implementation processing. After obtaining the output result, the computing device sets the processing progress to model output, displays the phase diagram reply data generated by the model according to the input in the output box, and sets the processing progress to chat. The model reply parameter is greater than 0 and less than or equal to 1. The intelligent model will generate richer, more random, and more open content as the model reply parameter increases, and generate more rigorous and more deterministic content as the model reply parameter decreases. The maximum number of tokens is the maximum number of characters specified for output. The stop sequence is used to set the termination flag for generating content. Top P, frequency penalty, and existence penalty are advanced parameters for adjusting the diversity, repeatability, and penalty of model output. The Generate function is used to generate the response of the model; the Clear function is used to clear the content, for example, the Clear function is used to clear the user input content. The Code View function is used to view the code, and the Compare function is used to compare the generated results of different models, so that the intuitive input and real-time feedback design supports non-professional users to quickly obtain structured results.

[0059] In a possible implementation, step 103 further includes: the computing device plays the phase diagram response data.

[0060] In some embodiments, Figure 3 As shown, the page progress includes text-to-speech, and the computing device includes a speaker, which is used to play the phase diagram reply data. Alternatively, the computing device is connected to the user device for communication, and the computing device sends the phase diagram reply data to the user device, and the user device plays the phase diagram reply data.

[0061] The present specification provides a method for answering phase diagram questions, which generates a query vector based on phase diagram query information; based on the query vector, searches the phase diagram database to generate similar phase diagram information, wherein the phase diagram database includes multiple phase diagram information; generates phase diagram answer data based on the similar phase diagram information, an intelligent model and preset model answer parameters, so that users can query questions in the field of phase diagrams through natural language, and the computing device can adapt to a variety of query formats and question complexities, reducing the level requirements of user queries; the computing device supports converting the user's natural language into a vector, and then queries the phase diagram database exclusive to the phase diagram field to obtain similar phase diagram information similar to the query vector, and finally obtains the phase diagram answer data based on the similar phase diagram information and the intelligent model according to the scalability of the model to answer the user's question. Whether it is a simple binary alloy or a complex ternary or multi-component phase diagram problem, the intelligent model can provide answers efficiently, achieving a balance between technology and user needs in existing material phase diagram research, providing an efficient, accurate and easy-to-use solution for scientific research and industrial applications, and reducing the cost of answering questions in the field of phase diagrams.

[0062] Corresponding to the above method embodiment, this specification also provides an embodiment of a device for answering phase diagram questions, Figure 4 is a schematic diagram of a structure of a device for answering phase diagram questions provided by an embodiment of this specification, such as Figure 4 As shown, it includes: a first generation module 401, a second generation module 402 and a third generation module 403. The first generation module 401 is connected to the second generation module 402, and the second generation module 402 is connected to the third generation module 403.

[0063] The first generation module 401 is configured to generate a query vector based on the phase diagram query information; the second generation module 402 is configured to search the phase diagram database based on the query vector to generate similar phase diagram information, wherein the phase diagram database includes multiple phase diagram information; the third generation module 403 is configured to generate phase diagram response data based on the similar phase diagram information, the intelligent model and the preset model response parameters.

[0064] In a possible implementation, the device further includes: a fourth generation module 404 and a fifth generation module 405. The fourth generation module 404 is connected to the fifth generation module 405, and the fifth generation module 405 is connected to the third generation module 403.

[0065] The fourth generation module 404 is configured to generate a training set in the form of question-answer pairs based on the training database through supervised fine-tuning technology; the fifth generation module 405 is configured to train the intelligent model based on the training set to generate a trained intelligent model.

[0066] In one possible implementation, the phase diagram database includes an embedding vector, which corresponds to the phase diagram information; the second generation module 402 is configured to generate a vector similarity corresponding to each embedded vector based on the query vector and multiple embedded vectors; filter the target vector similarity from the multiple vector similarities; and determine similar phase diagram information based on the phase diagram information corresponding to the target vector similarity.

[0067] In a possible implementation, the second generating module 402 is configured to generate vector similarity based on the query vector and the embedded vector by using a cosine similarity formula.

[0068] In a possible implementation, the second generating module 402 is configured to sort the multiple vector similarities from large to small to generate a high-ranking result; and determine the target vector similarity based on the first preset number of vector similarities in the high-ranking result.

[0069] In a possible implementation, the phase diagram response data is expressed in a form including at least one of text, table, and graph.

[0070] In a possible implementation, the device further includes: a display module 406. The display module 406 is connected to the third generating module 403. The display module 406 is configured to display a reply page, and the reply page includes phase diagram reply data.

[0071] In one possible implementation, the intelligent model includes a large language model.

[0072] The present specification provides a device for answering phase diagram questions, wherein a first generation module 401 is configured to generate a query vector according to phase diagram query information; a second generation module 402 is configured to search a phase diagram database based on the query vector to generate similar phase diagram information, wherein the phase diagram database includes multiple phase diagram information; a third generation module 403 is configured to generate phase diagram answer data based on similar phase diagram information, an intelligent model and preset model answer parameters, so that users can query questions in the field of phase diagrams through natural language, and the computing device can adapt to a variety of query formats and question complexities, reducing the level requirements of user queries; the computing device supports converting the user's natural language into a vector, and then querying in a phase diagram database exclusive to the phase diagram field to obtain similar phase diagram information similar to the query vector, and finally obtaining phase diagram answer data based on the similar phase diagram information and the intelligent model according to the scalability of the model to answer the user's question, whether it is a simple binary alloy or a complex ternary or multi-component phase diagram problem, the intelligent model can efficiently provide answers, providing an efficient, accurate and easy-to-use solution for scientific research and industrial applications, and reducing the cost of answering questions in the field of phase diagrams.

[0073] The above is a schematic scheme of a device for answering a phase diagram problem of this embodiment. It should be noted that the technical scheme of the device for answering a phase diagram problem and the technical scheme of the method for answering a phase diagram problem described above are of the same concept, and the details of the technical scheme of the device for answering a phase diagram problem that are not described in detail can all be referred to the description of the technical scheme of the method for answering a phase diagram problem described above.

[0074] Figure 5 5 is a block diagram of a computing device 500 provided in one embodiment of the present specification. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.

[0075] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0076] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0077] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 500 may also be a mobile or stationary server.

[0078] The processor 520 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the method for answering the phase diagram problem. The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the method for answering the phase diagram problem belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can all be found in the description of the technical scheme of the method for answering the phase diagram problem.

[0079] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method for answering the phase diagram problem.

[0080] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the method for answering the phase diagram problem described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the method for answering the phase diagram problem described above.

[0081] An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the method for answering the phase diagram problem described above.

[0082] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the method for answering the phase diagram problem described above are of the same concept, and the details not described in detail in the technical scheme of the computer program can be found in the description of the technical scheme of the method for answering the phase diagram problem described above.

[0083] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0084] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0085] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0086] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0087] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A method for answering a phase diagram problem, characterized in that: include: Generate a query vector according to the phase diagram query information; Based on the query vector, searching a phase diagram database to generate similar phase diagram information, wherein the phase diagram database includes a plurality of phase diagram information; Phase diagram response data is generated based on the similar phase diagram information, the intelligent model and the preset model response parameters.

2. The method according to claim 1, characterized in that Before generating phase diagram response data based on the similar phase diagram information, the intelligent model and the preset model response parameters, the method further includes: Through supervised fine-tuning technology, a training set in the form of question-answer pairs is generated based on the training database; The intelligent model is trained based on the training set to generate the trained intelligent model.

3. The method according to claim 1, characterized in that The phase diagram database includes an embedded vector, and the embedded vector corresponds to the phase diagram information; Accordingly, searching the phase diagram database based on the query vector to generate similar phase diagram information includes: Based on the query vector and the plurality of embedding vectors, generating a vector similarity corresponding to each of the embedding vectors; Filtering a target vector similarity from the plurality of vector similarities; The similar phase diagram information is determined based on the phase diagram information corresponding to the target vector similarity.

4. The method according to claim 3, characterized in that The step of generating a vector similarity corresponding to each of the embedded vectors based on the query vector and the plurality of embedded vectors includes: The vector similarity is generated based on the query vector and the embedding vector through a cosine similarity formula.

5. The method according to claim 3, characterized in that: The step of selecting a target vector similarity from the plurality of vector similarities comprises: Sorting the vector similarities from large to small to generate a high ranking result; The target vector similarity is determined based on the similarities of a first preset number of vectors in the high ranking results.

6. The method according to claim 1, characterized in that The phase diagram response data may be expressed in at least one of text, table, and graph.

7. The method according to any one of claims 1 to 6, characterized in that: The intelligent model includes a large language model.

8. A device for answering phase diagram questions, characterized in that: include: A first generating module is configured to generate a query vector according to the phase diagram query information; A second generating module is configured to search a phase diagram database based on the query vector to generate similar phase diagram information, wherein the phase diagram database includes a plurality of phase diagram information; The third generation module is configured to generate phase diagram response data based on the similar phase diagram information, the intelligent model and the preset model response parameters.

9. A computing device, characterized in that include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method for answering the phase diagram problem described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method for answering the phase diagram problem described in any one of claims 1 to 7.