Flight table data generation method and system, computer equipment and medium
By pre-training and generating knowledge plug-in libraries for large language models, the problem of low accuracy in generating flight table data is solved, and a higher accuracy of aviation output tables is achieved.
Patent Information
- Application Number
- CN202510050989.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
AI Technical Summary
Existing large language models have low accuracy when generating flight table data and cannot reliably understand table data.
Pre-training the large language model uses preset training airline tabular data and generates fine-tuned large language model. Combining preset table generation attributes to generate knowledge plug-ins, it is used to assist in fine-tuning of large language models to understand airline table generation tasks.
The accuracy of fine-tuning large language models on aviation output tables is improved, and the problem of low accuracy caused by large language models cannot reliably understand the task of air table generation.
Smart Images

Figure CN119886079A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data generation, and in particular to a method, system, computer device and medium for generating flight table data. Background Art
[0002] With the advent of the information age, tables have become an important carrier for storing and displaying information in daily life. Tables can not only display the results of information processing more intuitively and clearly, but also serve as samples for large language model training to infer the corresponding table information. Currently, this inference method is widely used in the aviation field, which requires statistics and generation of large amounts of data; However, although the large language model can generate tabular data in the corresponding form according to user needs, most of the current large language models are pre-trained on natural language text and code from the Internet or books. Tabular data is different from natural language text and code, so the large language model may not be able to reliably understand the table. Since text and code are one-dimensional, and tables are two-dimensional, the large language model needs to be able to read the table vertically, which leads to the problem of low accuracy of the tabular data generated by the large language model when performing table operation tasks. Therefore, how to realize a tabular data generation method that can be applied in the aviation field and can improve the accuracy of tabular data generation by the large language model has become an urgent problem to be solved. Summary of the invention
[0003] Based on this, it is necessary to propose a flight table data generation method, system, computer equipment and medium that can accurately generate tabular data in the aviation field through a large language model to address the above problems.
[0004] The present invention provides a flight table data generation method, which is used to generate flight table data through a large language model, comprising: S1. Obtaining preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; S2. Acquire a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; S3, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library for similarity matching, so as to match the model guidance data corresponding to the aviation form generation task; S4. Output the model guidance data and the aviation form generation task to the fine-tuned large language model, and output an aviation output form matching the aviation form generation task through the fine-tuned large language model.
[0005] Furthermore, the S1 specifically includes: S1a, adding a bypass for connecting a preset first model adjustment matrix and a preset second model adjustment matrix on one side of the large language model, wherein the first model adjustment matrix and the second model adjustment matrix are low-rank matrices for fine-tuning preset model parameters in the large language model; S1b, performing an initialization operation on the first model adjustment matrix and the second model adjustment matrix, thereby generating a first parameter matrix and a second parameter matrix; S1c, training the first parameter matrix and the second parameter matrix by using the training aviation table data, and multiplying and merging the first parameter matrix and the second parameter matrix at the end of the training, thereby generating model parameters to be merged; S1d, merging the model parameters to be merged with the preset model parameters, so as to generate the fine-tuned large language model.
[0006] Furthermore, the step S1b specifically includes: S1e, performing an initialization operation on the first model adjustment matrix through a random Gaussian distribution, thereby generating the first parameter matrix; S1c, performing an initialization operation on the second model adjustment matrix using a zero matrix algorithm to generate the second parameter matrix.
[0007] Further, the table generation attributes include a departure city attribute, an arrival city attribute, a flight number attribute, an airline attribute, a take-off airport attribute, and a landing airport attribute; Then the step S2 specifically includes: S2a, generating corresponding table generation rules according to the departure city attribute, the arrival city attribute, the flight number attribute, the airline attribute, the take-off airport attribute, and the landing airport attribute; S2b, converting each of the table generation rules into a numerical vector after word segmentation, and storing it in the setting knowledge base collected in advance, thereby generating the knowledge plug-in library; S2c, plug the knowledge plug-in library into the fine-tuned large language model.
[0008] Furthermore, the step S2a specifically includes: S2d, generating corresponding table generation rules according to the departure city attribute, the arrival city attribute, the flight number attribute, the airline attribute, the departure airport attribute, and the landing airport attribute, respectively, wherein the table generation rules specifically include: A. The departure city attribute is a city that exists in reality and has an airport, and the table column data corresponding to the departure city attribute is different from the table column data corresponding to the arrival city attribute; B. The arrival city attribute is a city that exists in reality and has an airport, and the table column data corresponding to the arrival city attribute is different from the table column data corresponding to the departure city attribute; C. The flight number attribute is composed of six-digit set characters, and the set characters are used to describe the flight information of each flight; D. The airline attribute is a real airline and matches the set character; E. The departure airport attribute is an airport that actually exists in the departure city, and the table column data corresponding to the departure airport attribute cannot be the same as the table column data corresponding to the landing airport attribute, and the departure airport attribute matches the departure city attribute; F. The landing airport attribute is an airport that actually exists in the landing city. Meanwhile, the table column data corresponding to the landing airport attribute cannot be the same as the table column data corresponding to the take-off airport attribute. Meanwhile, the landing airport attribute matches the arrival city attribute.
[0009] Furthermore, the generation rule of "the flight number attribute is composed of six-digit set characters, and the set characters are used to describe the flight information of each flight" specifically includes: The flight number attribute is composed of six-digit set characters, the first two digits of the set characters match the airline attribute, and the last four digits of the set characters respectively represent the first area number corresponding to the take-off base matching the airline attribute, the second area number matching the landing airport attribute, the flight number corresponding to the flight, and the status number of the current flight.
[0010] Furthermore, the step S3 specifically includes: S3a, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library, so as to perform similarity matching with each of the form generation rules; S3b, combining the table generation rules whose matching degree exceeds the set value into the guidance data output by the knowledge plug-in library, thereby generating the model guidance data.
[0011] The present invention also provides a flight table data generation system, which is used to generate flight table data through a large language model, including: A pre-training unit, used to obtain preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; A knowledge base generation unit, used to obtain a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; A matching unit, for, when an aviation form generation task is input, inputting the aviation form generation task into the knowledge plug-in library for similarity matching, thereby matching model guidance data corresponding to the aviation form generation task; A table output unit is used to output the model guidance data and the aviation table generation task to the fine-tuned large language model, and output an aviation output table matching the aviation table generation task through the fine-tuned large language model.
[0012] The present invention further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps: S1. Obtaining preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; S2. Acquire a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; S3, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library for similarity matching, so as to match the model guidance data corresponding to the aviation form generation task; S4. Output the model guidance data and the aviation form generation task to the fine-tuned large language model, and output an aviation output form matching the aviation form generation task through the fine-tuned large language model.
[0013] The present invention also provides a computer readable medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the following steps: S1. Obtaining preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; S2. Acquire a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; S3, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library for similarity matching, so as to match the model guidance data corresponding to the aviation form generation task; S4. Output the model guidance data and the aviation form generation task to the fine-tuned large language model, and output an aviation output form matching the aviation form generation task through the fine-tuned large language model.
[0014] The above-mentioned flight table data generation method, system, computer device and medium, after pre-training the large language model with preset training aviation table data and generating a fine-tuned large language model, generate a knowledge plug-in library plug-in on the fine-tuned large language model through preset table generation attributes, so that when an aviation table generation task is obtained, the model guidance data can be first matched through the knowledge plug-in library, and then the final output result of the fine-tuned large language model can be guided by the model guidance data. The knowledge plug-in library is set to assist the fine-tuned large language model in understanding the input aviation table generation task, which solves the problem in the prior art that the large language model cannot reliably understand the input aviation table generation task, resulting in low accuracy of the tabular data generated by the large language model, and improves the accuracy of the aviation output table of the fine-tuned large language model. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in 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 creative work.
[0016] Figure 1 A method flow chart of a method for generating flight table data in one embodiment; Figure 2 A system structure diagram of a flight table data generation system in one embodiment; Figure 3 1 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0018] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0019] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0020] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0021] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by ordinary technicians in the field to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0022] refer to Figure 1 The present invention provides a flight table data generation method, which is used to generate flight table data through a large language model, comprising: S1. Obtaining preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; As described in step S1 above, the background system obtains preset aviation table data for training. It can be understood that the aviation table data for training is used to pre-train the large language model, thereby generating the fine-tuned large language model; It can be understood that in this embodiment, the large language model is a chatglm3 model, and in view of the fact that the large language model in the prior art has poor understanding ability of tabular data, a plurality of the training aviation tabular data are used to fine-tune the LoRA parameters, and the large language model is trained by the fine-tuned data set, so as to enhance the table understanding ability of the large language model. In the aviation field involved in this application, since the flight data in the aviation field belongs to the general field category, the understanding ability of the large language model chatglm3 in the aviation field is improved by conducting a preliminary experiment on the large language model chatglm3; In addition, the purpose of the LoRA fine-tuning training is to add low-rank matrices to the weight matrix of the fine-tuned large language model. These low-rank matrices can be regarded as fine-tuning of the original weights of the fine-tuned large language model, so that the fine-tuned large language model can capture the features that the model needs to adapt to the input aviation form generation task with a smaller amount of parameters. In addition, in the LoRA fine-tuning, the parameters of the low-rank matrix can be shared across layers, which means that the weight matrices of different layers can be adjusted using the same low-rank matrix, thereby reducing the number of parameters when training the large language model. Finally, in the LoRA fine-tuning stage, the original weights of the large language model remain unchanged, and only the parameters of the low-rank matrix will be updated. This allows the large language model to quickly adapt to new tasks without destroying the pre-training knowledge.
[0023] S2. Acquire a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; As described in the above step S2, the background system obtains several preset table generation attributes, and the table generation attributes are used to generate a knowledge plug-in library plug-in on the fine-tuned large language model. It can be understood that in this embodiment, the knowledge plug-in library refers to a knowledge base system that combines a large language model (LLM) and retrieval-augmented generation (RAG) technology. This system combines a large pre-trained language model with an external knowledge base to improve the performance and accuracy of the model in specific fields or tasks.
[0024] S3, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library for similarity matching, so as to match the model guidance data corresponding to the aviation form generation task; As described in the above step S3, when the background system obtains the aviation form generation task input by the user, the background system inputs the aviation form generation task into the knowledge plug-in library for similarity matching. At this time, the knowledge plug-in library can perform similarity matching based on the aviation form generation task, thereby matching the model guidance data corresponding to the aviation form generation task. It can be understood that in this embodiment, the model guidance data is actually a model prompt for guiding the fine-tuned large language model to output.
[0025] S4. Output the model guidance data and the aviation form generation task to the fine-tuned large language model, and output an aviation output form matching the aviation form generation task through the fine-tuned large language model.
[0026] As described in step S4 above, the background system outputs the model guidance data and the aviation form generation task to the fine-tuned large language model. At this time, the fine-tuned large language model can fully understand the aviation form generation task based on the model guidance data, and finally output the aviation output form that matches the aviation form generation task and has higher accuracy according to the aviation form generation task, thereby achieving the effect of improving the accuracy of the final aviation output form by improving the understanding of the aviation form generation task by the fine-tuned large language model.
[0027] This embodiment uses the above method to pre-train the large language model using the preset training aviation table data and generate a fine-tuned large language model, and then generates a knowledge plug-in library plug-in on the fine-tuned large language model through the preset table generation attributes, so that when an aviation table generation task is obtained, the model guidance data can be first matched through the knowledge plug-in library, and then the final output result of the fine-tuned large language model can be guided by the model guidance data. The knowledge plug-in library is set to assist the fine-tuned large language model in understanding the input aviation table generation task, which solves the problem in the prior art that the large language model cannot reliably understand the input aviation table generation task, resulting in low accuracy of the tabular data generated by the large language model, and improves the accuracy of the aviation output table of the fine-tuned large language model.
[0028] In one embodiment, the S1 specifically includes: S1a, adding a bypass for connecting a preset first model adjustment matrix and a preset second model adjustment matrix on one side of the large language model, wherein the first model adjustment matrix and the second model adjustment matrix are low-rank matrices for fine-tuning preset model parameters in the large language model; S1b, performing an initialization operation on the first model adjustment matrix and the second model adjustment matrix, thereby generating a first parameter matrix and a second parameter matrix; S1c, training the first parameter matrix and the second parameter matrix by using the training aviation table data, and multiplying and merging the first parameter matrix and the second parameter matrix at the end of the training, thereby generating model parameters to be merged; S1d, merging the model parameters to be merged with the preset model parameters, so as to generate the fine-tuned large language model.
[0029] As described in the above embodiment, the background system adds a bypass for connecting the preset first model adjustment matrix and the second model adjustment matrix on one side of the large language model. It can be understood that the first model adjustment matrix and the second model adjustment matrix are low-rank matrices for fine-tuning the preset model parameters in the large language model. Then, the background system initializes the first model adjustment matrix and the second model adjustment matrix to generate a first parameter matrix and a second parameter matrix and trains the first parameter matrix and the second parameter matrix through the training aviation table data, and multiplies and merges the first parameter matrix and the second parameter matrix at the end of the training to generate model parameters to be merged. It can be understood that the model parameters to be merged are used to fine-tune the original weight parameters in the large language model. Then, the background system merges and multiplies the model parameters to be merged with the preset model parameters to generate the fine-tuned large language model after the weight parameters are fine-tuned.
[0030] In one embodiment, the step S1b specifically includes: S1e, performing an initialization operation on the first model adjustment matrix through a random Gaussian distribution, thereby generating the first parameter matrix; S1c, performing an initialization operation on the second model adjustment matrix using a zero matrix algorithm to generate the second parameter matrix.
[0031] As described in the above embodiment, the background system initializes the first model adjustment matrix through random Gaussian distribution to generate the first parameter matrix. At the same time, the background system also initializes the second model adjustment matrix through the zero matrix algorithm to generate the second parameter matrix, thereby realizing the simultaneous initialization operation of the first model adjustment matrix and the second model adjustment matrix.
[0032] In one embodiment, the table generation attributes include a departure city attribute, an arrival city attribute, a flight number attribute, an airline attribute, a departure airport attribute, and a landing airport attribute; Then the step S2 specifically includes: S2a, generating corresponding table generation rules according to the departure city attribute, the arrival city attribute, the flight number attribute, the airline attribute, the take-off airport attribute, and the landing airport attribute; S2b, converting each of the table generation rules into a numerical vector after word segmentation, and storing it in the setting knowledge base collected in advance, thereby generating the knowledge plug-in library; S2c, plug the knowledge plug-in library into the fine-tuned large language model.
[0033] As described in the above embodiment, the table generation attributes include the departure city attribute, the arrival city attribute, the flight number attribute, the airline attribute, the take-off airport attribute and the landing airport attribute, a total of 6, then the background system generates a number of the table generation rules according to the above-mentioned table generation attributes. It can be understood that the table generation rules are used to generate the knowledge plug-in library. At this time, the background system converts each of the table generation rules into a numerical vector after word segmentation, and stores it in a preset blank knowledge base, thereby generating the knowledge plug-in library. After that, the background system plugs the knowledge plug-in library into the fine-tuned large language model, so that the knowledge plug-in library can assist the fine-tuned large language model in understanding the input aviation table generation task; In addition, it can be understood that the table generation attributes may also include other preset attributes, and the table generation attributes may be pre-included in the setting knowledge base and directly converted into numerical vectors. The setting knowledge base is a large knowledge set, which contains several setting rules. The fine-tuned large language model is generated after conversion.
[0034] In one embodiment, the step S2a specifically includes: S2d, generating corresponding table generation rules according to the departure city attribute, the arrival city attribute, the flight number attribute, the airline attribute, the departure airport attribute, and the landing airport attribute, respectively, wherein the table generation rules specifically include: A. The departure city attribute is a city that exists in reality and has an airport, and the table column data corresponding to the departure city attribute is different from the table column data corresponding to the arrival city attribute; B. The arrival city attribute is a city that exists in reality and has an airport, and the table column data corresponding to the arrival city attribute is different from the table column data corresponding to the departure city attribute; C. The flight number attribute is composed of six-digit set characters, and the set characters are used to describe the flight information of each flight; D. The airline attribute is a real airline and matches the set character; E. The departure airport attribute is an airport that actually exists in the departure city, and the table column data corresponding to the departure airport attribute cannot be the same as the table column data corresponding to the landing airport attribute, and the departure airport attribute matches the departure city attribute; F. The landing airport attribute is an airport that actually exists in the landing city. Meanwhile, the table column data corresponding to the landing airport attribute cannot be the same as the table column data corresponding to the take-off airport attribute. Meanwhile, the landing airport attribute matches the arrival city attribute.
[0035] As described in the above embodiment, the background system generates corresponding table generation rules according to the departure city attribute, the arrival city attribute, the flight number attribute, the airline attribute, the departure airport attribute, and the landing airport attribute. The table generation rules include the following six items: A. The departure city attribute is a city that exists in reality and has an airport, and the table column data corresponding to the departure city attribute is different from the table column data corresponding to the arrival city attribute; B. The arrival city attribute is a city that exists in reality and has an airport, and the table column data corresponding to the arrival city attribute is different from the table column data corresponding to the departure city attribute; C. The flight number attribute is composed of six-digit set characters, and the set characters are used to describe the flight information of each flight; E. The airline attribute is a real airline and matches the set character; F. The departure airport attribute is an airport that actually exists in the departure city, and the table column data corresponding to the departure airport attribute cannot be the same as the table column data corresponding to the landing airport attribute, and the departure airport attribute matches the departure city attribute; G. The landing airport attribute is an airport that actually exists in the landing city, and the table column data corresponding to the landing airport attribute cannot be the same as the table column data corresponding to the departure airport attribute, and the landing airport attribute matches the arrival city attribute; The backend system can then generate rule AG according to the table and input it into the knowledge plug-in library for similarity matching, thereby matching the model guidance data.
[0036] In one embodiment, the generation rule of "C. The flight number attribute is composed of six-digit set characters, and the set characters are used to describe the flight information of each flight" specifically includes: The flight number attribute is composed of six-digit set characters, the first two digits of the set characters match the airline attribute, and the last four digits of the set characters respectively represent the first area number corresponding to the take-off base matching the airline attribute, the second area number matching the landing airport attribute, the flight number corresponding to the flight, and the status number of the current flight.
[0037] As described in the above embodiment, the flight number attribute is composed of the six-digit set characters, and the first two digits of the set characters match the airline attribute. It can be understood that in this embodiment, the airline attribute is actually the English abbreviation of the corresponding airline, such as CA-China International Airlines, CZ-China Southern Airlines and EK-Emirates Airlines, etc. In addition, the last four digits of the set characters represent the first area number matching the departure airport, the second area number matching the landing airport attribute, the flight number corresponding to the flight, and the status number of the current flight. It can be understood that, for example, in the first area number and the second area number, the number 1 represents North China, 2 represents Northwest China, 3 represents South China, 4 represents Southwest China, 5 represents East China, 6 represents Northeast China, 8 represents Xiamen, and 9 represents Xinjiang. In addition, the flight number can be set by the user. The status number of the current flight is specifically expressed as follows: when the number is singular, it represents a flight flying out of the departure airport, and when the number is plural, it represents a return flight returning to the departure airport.
[0038] In one embodiment, step S3 specifically includes: S3a, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library, so as to perform similarity matching with each of the form generation rules; S3b, combining the table generation rules whose matching degree exceeds the set value into the guidance data output by the knowledge plug-in library, thereby generating the model guidance data.
[0039] As described in the above embodiment, when the fine-tuned large language model acquires the aviation form generation task, the aviation form generation task is input into the knowledge plug-in library through the set bypass, so as to perform similarity matching with the form generation rule AG, and the form generation rules whose matched similarity exceeds the set threshold are combined into the guidance data output by the knowledge plug-in library, thereby generating the model guidance data that can guide the fine-tuned large language to perform model output.
[0040] refer to Figure 2 The present invention also provides a flight table data generation system, which is used to generate flight table data through a large language model, including: A pre-training unit 10, used to obtain preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; A knowledge base generation unit 20 is used to obtain a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; The matching unit 30 is used for, when obtaining the input aviation form generation task, inputting the aviation form generation task into the knowledge plug-in library for similarity matching, thereby matching the model guidance data corresponding to the aviation form generation task; The table output unit 40 is used to output the model guidance data and the aviation table generation task to the fine-tuned large language model, and output an aviation output table matching the aviation table generation task through the fine-tuned large language model.
[0041] The above-mentioned units are for executing the above-mentioned flight table data generation system, and will not be introduced one by one here.
[0042] Figure 3 FIG. 1 shows an internal structure diagram of a computer device in an embodiment. The computer device may be a server, including but not limited to a high-performance computer and a high-performance computer cluster. Figure 3 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement the flight table data generation method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may execute the flight table data generation method.
[0043] In one embodiment, the flight table data generation method provided by the present invention can be implemented in the form of a computer program. The computer program can be used in Figure 3 The computer device shown in the figure is run. The memory of the computer device can store various program templates constituting the flight table data generation system. For example: 10 - pre-training unit, 20 - knowledge base generation unit, 30 - matching unit, 40 - table output unit.
[0044] A computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1. Obtaining preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; S2. Acquire a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; S3, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library for similarity matching, so as to match the model guidance data corresponding to the aviation form generation task; S4. Output the model guidance data and the aviation form generation task to the fine-tuned large language model, and output an aviation output form matching the aviation form generation task through the fine-tuned large language model.
[0045] From the above embodiments, it can be seen that the greatest beneficial effect of the present invention is that after pre-training the large language model with the preset training aviation table data and generating a fine-tuned large language model, a knowledge plug-in library plug-in on the fine-tuned large language model is generated through the preset table generation attributes, so that when an aviation table generation task is obtained, the model guidance data can be first matched through the knowledge plug-in library, and then the final output result of the fine-tuned large language model can be guided by the model guidance data. The knowledge plug-in library is set to assist the fine-tuned large language model in understanding the input aviation table generation task, which solves the problem that the large language model in the prior art cannot reliably understand the input aviation table generation task, resulting in low accuracy of the tabular data generated by the large language model, and improves the accuracy of the aviation output table of the fine-tuned large language model.
[0046] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for generating flight table data, for generating flight table data by using a large language model, characterized in that: include: S1. Obtaining preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; S2. Acquire a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; S3, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library for similarity matching, so as to match the model guidance data corresponding to the aviation form generation task; S4. Output the model guidance data and the aviation form generation task to the fine-tuned large language model, and output an aviation output form matching the aviation form generation task through the fine-tuned large language model.
2. The flight table data generation method according to claim 1, characterized in that: The S1 specifically includes: S1a, adding a bypass for connecting a preset first model adjustment matrix and a preset second model adjustment matrix on one side of the large language model, wherein the first model adjustment matrix and the second model adjustment matrix are low-rank matrices for fine-tuning preset model parameters in the large language model; S1b, performing an initialization operation on the first model adjustment matrix and the second model adjustment matrix, thereby generating a first parameter matrix and a second parameter matrix; S1c, training the first parameter matrix and the second parameter matrix by using the training aviation table data, and multiplying and merging the first parameter matrix and the second parameter matrix at the end of the training, thereby generating model parameters to be merged; S1d, merging the model parameters to be merged with the preset model parameters, so as to generate the fine-tuned large language model.
3. The flight table data generation method according to claim 2, characterized in that: The step S1b specifically includes: S1e, performing an initialization operation on the first model adjustment matrix through a random Gaussian distribution, thereby generating the first parameter matrix; S1c, performing an initialization operation on the second model adjustment matrix using a zero matrix algorithm to generate the second parameter matrix.
4. The flight table data generation method according to claim 1, characterized in that: The table generation attributes include a departure city attribute, an arrival city attribute, a flight number attribute, an airline attribute, a take-off airport attribute, and a landing airport attribute; Then the step S2 specifically includes: S2a, generating corresponding table generation rules according to the departure city attribute, the arrival city attribute, the flight number attribute, the airline attribute, the take-off airport attribute, and the landing airport attribute; S2b, converting each of the table generation rules into a numerical vector after word segmentation, and storing it in the setting knowledge base collected in advance, thereby generating the knowledge plug-in library; S2c, plug the knowledge plug-in library into the fine-tuned large language model.
5. The flight table data generation method according to claim 4, characterized in that: The step S2a specifically includes: S2d, generating corresponding table generation rules according to the departure city attribute, the arrival city attribute, the flight number attribute, the airline attribute, the departure airport attribute, and the landing airport attribute, respectively, wherein the table generation rules specifically include: A. The departure city attribute is a city that exists in reality and has an airport, and the table column data corresponding to the departure city attribute is different from the table column data corresponding to the arrival city attribute; B. The arrival city attribute is a city that exists in reality and has an airport, and the table column data corresponding to the arrival city attribute is different from the table column data corresponding to the departure city attribute; C. The flight number attribute is composed of six-digit set characters, and the set characters are used to describe the flight information of each flight; D. The airline attribute is a real airline and matches the set character; E. The departure airport attribute is an airport that actually exists in the departure city, and the table column data corresponding to the departure airport attribute cannot be the same as the table column data corresponding to the landing airport attribute, and the departure airport attribute matches the departure city attribute; F. The landing airport attribute is an airport that actually exists in the landing city. Meanwhile, the table column data corresponding to the landing airport attribute cannot be the same as the table column data corresponding to the take-off airport attribute. Meanwhile, the landing airport attribute matches the arrival city attribute.
6. The flight table data generation method according to claim 5, characterized in that: The flight number attribute is composed of six-digit set characters, and the set characters are used to describe the generation rule of flight information of each flight, specifically including: The flight number attribute is composed of six-digit set characters, the first two digits of the set characters match the airline attribute, and the last four digits of the set characters respectively represent the first area number corresponding to the take-off base matching the airline attribute, the second area number matching the landing airport attribute, the flight number corresponding to the flight, and the status number of the current flight.
7. The flight table data generation method according to claim 1, characterized in that: The step S3 specifically includes: S3a, when the aviation form generation task is obtained, the aviation form generation task is input into the knowledge plug-in library, so as to perform similarity matching with each of the form generation rules; S3b, combining the table generation rules whose matching degree exceeds the set value into the guidance data output by the knowledge plug-in library, thereby generating the model guidance data.
8. A flight table data generation system, used to generate flight table data through a large language model, characterized in that: include: A pre-training unit, used to obtain preset aviation table data for training, wherein the aviation table data for training is used to pre-train the large language model, thereby generating a fine-tuned large language model; A knowledge base generation unit, used to obtain a set knowledge base collected in advance, wherein the set knowledge base is used to generate a knowledge plug-in base plug-in on the fine-tuned large language model in combination with a preset table generation attribute; A matching unit, for, when an aviation form generation task is input, inputting the aviation form generation task into the knowledge plug-in library for similarity matching, thereby matching model guidance data corresponding to the aviation form generation task; A table output unit is used to output the model guidance data and the aviation table generation task to the fine-tuned large language model, and output an aviation output table matching the aviation table generation task through the fine-tuned large language model.
9. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the flight table data generating method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the flight table data generating method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Form generation method and device based on large language model, equipment and medium
CN117077643A
Item type self-growth self-evolution and classification method based on large model
CN119128148A
Flight service system based on knowledge graph and large model
CN119295018A