Ship energy efficiency complex task automatic processing method and system based on large language model, storage medium and equipment

By pre-training a large language model through the segmentation and encoding of ship energy efficiency data and knowledge, and combining it with intent analysis and automatic task planning, the application difficulties of large language models in the field of ship energy efficiency have been solved, enabling more efficient energy management and data utilization, reducing energy consumption and carbon emissions, and improving operational efficiency.

CN119378115BActive Publication Date: 2025-10-24THE 711TH RES INST OF CHINA STATE SHIPBUILDING CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411463981.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-10-24
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The application of existing technologies in the field of ship energy efficiency using large language models faces problems such as insufficient data quality, illusory output, and difficulties in planning complex tasks, resulting in high energy consumption, high carbon emissions, low operational efficiency, and low data and knowledge utilization.

Method used

By collecting and organizing ship energy efficiency knowledge and datasets, segmenting and encoding them, pre-training them based on a general large language model, constructing a professional domain toolset, using an intent analysis module to understand user intent, and combining nondeterministic finite automata theory to construct a nondeterministic finite automaton for automatic task planning, thereby achieving accurate understanding of user commands and tool invocation.

Benefits of technology

It reduces the probability of illusion output and failure in complex task processing, helps ships reduce energy consumption, reduce carbon emissions, improve operational efficiency, enhance data and knowledge utilization, and improve the digital intelligence level of ship energy efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378115B_ABST
    Figure CN119378115B_ABST
Patent Text Reader

Abstract

The application provides a ship energy efficiency complex task automatic processing method and system based on a large language model, a storage medium and equipment, wherein the ship energy efficiency knowledge set is divided and coded, and the pre-training of the ship energy efficiency large model is carried out based on a general large language model base; the ship energy efficiency tool set and the general tool set are constructed, and the ship energy efficiency large model is given professional field data processing capability; the intention analysis module is used to fully understand and analyze the user intention, and the formatted output of the user intention is formed; the task automatic planning non-deterministic finite automaton is constructed; and the user command understanding and tool calling are carried out based on the task automatic planning result and the trained ship energy efficiency large model, and the execution result is generated. The technical scheme of the application can reduce the illusion output, tool calling and complex task processing failure probability, help the ship reduce energy consumption, reduce carbon emission and improve operation efficiency, further improve the digitalization level of the ship energy efficiency, and improve the data and knowledge utilization rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of ship energy efficiency, and particularly relates to a ship energy efficiency complex task automatic processing method and system based on a large language model, a storage medium and equipment. BACKGROUND

[0002] The development of ship energy efficiency technology urgently needs digital and intelligent transformation. On the one hand, the utilization rate of data and knowledge needs to be improved to solve the problem of "easy collection, difficult utilization". On the other hand, the intelligence level of algorithms and services also needs to be improved, and artificial intelligence technology needs to be fully utilized to improve algorithm performance and enhance user experience. The ship energy efficiency technology based on a large language model can analyze and mine energy efficiency data in the ship operation process through the natural language processing capability of the large language model, find the key points and optimization schemes for energy efficiency improvement, and reduce the interaction difficulty and the requirement for the professional ability of the crew through the dialogue mode.

[0003] The large language model technology is in a period of rapid development, and domestic and foreign Internet giants are paying attention to the technical research and ecological construction of general large language models. The engineering application and exploration based on the large language model are still in the initial stage. Some shipping enterprises and research institutions have begun to apply the large language model to the ship industry, and the landing application research in the field of ship energy efficiency is still very lacking. The application of this technology still faces challenges such as insufficient data quality, hallucination output, and difficulty in complex task planning.

[0004] Therefore, how to provide a ship energy efficiency complex task automatic processing method and system based on a large language model, a storage medium and equipment, which can reduce the hallucination output, tool calling and complex task processing failure probability, help the ship to reduce energy consumption, reduce carbon emissions, improve operation efficiency, further improve the digital and intelligent level of ship energy efficiency, and improve the utilization rate of data and knowledge, has become a technical problem to be solved. SUMMARY

[0005] The embodiment of the application provides a ship energy efficiency complex task automatic processing method and system based on a large language model, a storage medium and equipment, which can reduce the hallucination output, tool calling and complex task processing failure probability, help the ship to reduce energy consumption, reduce carbon emissions, improve operation efficiency, further improve the digital and intelligent level of ship energy efficiency, and improve the utilization rate of data and knowledge.

[0006] In one embodiment of the application, a ship energy efficiency complex task automatic processing method based on a large language model is provided, comprising:

[0007] S101, collect and organize a ship energy efficiency knowledge set and a ship energy efficiency data set, perform fragmentation and coding on the ship energy efficiency knowledge set, and perform pre-training of a ship energy efficiency large model based on a general large language model base;

[0008] S102, construct a ship energy efficiency tool set and a general tool set, and give the ship energy efficiency large model professional field data processing capability;

[0009] S103, obtain user command input, fully understand and analyze user intent based on an intent analysis module, and form a formatted output of the user intent;

[0010] S104, organize and standardize the analysis result of the user intent;

[0011] S105, based on the theory of non-deterministic finite automata, construct a task automatic planning non-deterministic finite automaton;

[0012] S106, based on the task automatic planning result and the trained ship energy efficiency large model, perform user command understanding and tool calling, and generate an execution result.

[0013] Further, collect and organize a ship energy efficiency knowledge set and a ship energy efficiency data set, perform fragmentation and coding on the ship energy efficiency knowledge set, and perform pre-training of a ship energy efficiency large model based on a general large language model base, including:

[0014] The ship energy efficiency data set at least includes one or more of a ship energy efficiency improvement measure data set, a ship navigation management optimization data set, and a ship energy efficiency equipment maintenance management data set;

[0015] The ship energy efficiency knowledge set at least includes one or more of domestic and foreign ship energy efficiency standard regulations, a ship energy efficiency field public thesis set, and a ship energy efficiency field private knowledge set, and high-quality knowledge set screening is performed;

[0016] The knowledge set fragmentation and coding includes fragmenting and coding long text files for training a general large language model base;

[0017] The large language model pre-training includes training a general large language model using the ship energy efficiency data set and the ship energy efficiency knowledge set to obtain a ship energy efficiency dialogue large language model.

[0018] Further, construct a ship energy efficiency tool set and a general tool set, and give the ship energy efficiency large model professional field data processing capability, including:

[0019] The ship energy efficiency tool set includes one or more of a ship energy efficiency data analysis tool set, a ship navigation management tool set, and a ship energy efficiency data evaluation tool set, for calculating fuel consumption, load rate, battery conversion efficiency, propulsion efficiency, energy flow and distribution, carbon emissions, energy loss, and grade evaluation;

[0020] The general tool set includes one or more of database connection, web page retrieval, and chart generation general tool set, for meeting various application requirements;

[0021] The configuration tool set is configured on the basis of the ship energy efficiency dialogue large model to obtain a ship energy efficiency tool large language model.

[0022] Further, the user command input is obtained, the user intent is fully understood and analyzed based on the intent analysis module, and the formatted output of the user intent is formed, including:

[0023] An intent analysis data set is constructed, which contains common fine-grained and coarse-grained user commands in the use process of the ship energy efficiency system, and each data contains a user command and divided implementation steps;

[0024] A system prompt is created based on a protective fence mechanism, which is constructed in accordance with the format of "identity declaration-work scope-specification format-reply example-illusion boundary-range boundary" to indicate the behavior of the ship energy efficiency large language model;

[0025] The intent analysis capability is enhanced through a prompt training and feedback mechanism, the model is prompted multiple times and feedback is given, so that it can better complete the tasks of intent analysis and understanding;

[0026] The ship energy efficiency large language model is used to generate a Json format intent analysis result.

[0027] Further, the model is given feedback, including:

[0028] The model is given feedback at least "very good" and "not concise" evaluation information.

[0029] Further, the analysis result of the user intent is arranged and standardized, including:

[0030] The intent analysis result is matched with the tool set, the tool capability possessed by the model is obtained, and the intent analysis result is decomposed and matched item by item;

[0031] The successfully matched task input and output parameters are supplemented and a state record is formed;

[0032] According to the tool matching and parameter supplementing conditions, the front and rear sequence association relationship between each step is determined.

[0033] Further, based on the non-deterministic finite automata theory, a task automatic planning non-deterministic finite automata is constructed, including:

[0034] Three basic operations of "and", "connection" and "loop" are defined and constructed, and various cases of task planning are covered by combining the three basic operations;

[0035] A task automatic planning non-deterministic finite automata ATP-NFA is created, and the ATP-NFA is created according to the intention cleaning result by using the three basic operations, and a task flow is formed.

[0036] Further, based on the task automatic planning result and the trained ship energy efficiency large model, the user command understanding and the accurate calling of the tool are realized, and the execution result is generated, including:

[0037] Based on the task flow, the before-and-after sequence relationship and the tool calling instruction contained in the ATP-NFA, the task is implemented until the ATP-NFA execution ends and enters the acceptance state;

[0038] When the task contains a precise chart generation flow, a chart generation tool set is called to complete the parameter transmission and chart generation display of the column chart, pie chart and line chart.

[0039] In another embodiment of the application, a ship energy efficiency complex task automatic processing system based on a large language model is provided, based on any one of the above ship energy efficiency complex task automatic processing methods based on a large language model, including: a first processing module, a second processing module, an input module, a specification module, a third processing module and an execution module.

[0040] The first processing module is used for collecting and arranging a ship energy efficiency knowledge set and a ship energy efficiency data set, performing slicing and coding on the ship energy efficiency knowledge set, and pre-training a ship energy efficiency large model based on a general large language model base.

[0041] The second processing module is used for constructing a ship energy efficiency tool set and a general tool set, and giving the ship energy efficiency large model professional field data processing capability.

[0042] The input module is used for obtaining user command input, fully understanding and analyzing user intention based on an intention analysis module, and forming a formatted output of the user intention.

[0043] The specification module is used for arranging and standardizing the analysis result of the user intention.

[0044] The third processing module is used for constructing a task automatic planning non-deterministic finite automata based on the non-deterministic finite automata theory.

[0045] The execution module is used to understand user commands and call tools based on the task automatic planning results and the trained ship energy efficiency model to generate execution results.

[0046] In another embodiment of the present invention, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the above-mentioned methods for automatically processing complex tasks of ship energy efficiency based on a large language model.

[0047] In another embodiment of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for automatically processing complex tasks related to ship energy efficiency based on a large language model as described above is implemented.

[0048] The beneficial effects brought about by the present invention are as follows:

[0049] As can be seen from the above scheme, the embodiment of the present invention provides a method, system, storage medium and device for automatically processing complex tasks of ship energy efficiency based on a large language model. By collecting and organizing ship energy efficiency knowledge sets and ship energy efficiency data sets, the ship energy efficiency knowledge sets are segmented and encoded, and pre-training of the ship energy efficiency large model is carried out based on the general large language model base; a ship energy efficiency tool set and a general tool set are constructed to give the ship energy efficiency large model professional field data processing capabilities; user command input is obtained, and the user intention is fully understood and analyzed based on the intention analysis module to form a formatted output of the user intention; the analysis results of the user intention are sorted and standardized; based on the theory of non-deterministic finite automata, a task automatic planning non-deterministic finite automaton is constructed; based on the task automatic planning results and the trained ship energy efficiency large model, user command understanding and tool call are performed to generate execution results. The technical solution of the present invention can reduce the probability of hallucination output, tool call and failure in complex task processing, help ships reduce energy consumption, reduce carbon emissions, improve operational efficiency, further improve the digital intelligence level of ship energy efficiency, and improve data and knowledge utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 A flow chart showing a method for automatically processing complex tasks related to ship energy efficiency based on a large language model according to an embodiment of the present invention;

[0051] Figure 2 A schematic diagram showing the overall architecture of a method for automatically processing complex tasks related to ship energy efficiency based on a large language model according to an embodiment of the present invention;

[0052] Figure 3A ship energy efficiency large language model overall architecture schematic diagram of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application is shown in the figure.

[0053] Figure 4 A system prompt example diagram of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application is shown in the figure.

[0054] Figure 5 An intent cleaning flowchart of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application is shown in the figure.

[0055] Figure 6 A basic operation-parallel operation schematic diagram of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application is shown in the figure.

[0056] Figure 7 A basic operation-connection operation schematic diagram of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application is shown in the figure.

[0057] Figure 8 A basic operation-loop operation schematic diagram of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application is shown in the figure.

[0058] Figure 9 A task automatic planning flowchart of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application is shown in the figure.

[0059] Figure 10 An electronic device schematic diagram of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0060] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described below in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without any creative work fall within the scope of protection of the present application.

[0061] In an embodiment of the present application, a ship energy efficiency complex task automatic processing method based on a large language model is provided to realize the application of a large language model in the field of ship energy efficiency and to provide a feasible method for reducing the probability of hallucination output, tool calling and complex task processing failure. Thus, personalized energy efficiency optimization suggestions are provided for ships to help ships reduce energy consumption, reduce carbon emissions and improve operational efficiency. At the same time, the digital level of ship energy efficiency is improved, the utilization rate of data and knowledge is improved, and the requirement for the professional ability of the crew is reduced.

[0062] As shown in Figure 1 , Figure 1 The present application provides a ship energy efficiency complex task automatic processing method based on a large language model.

[0063] Figure 1 In an embodiment of the present application, a ship energy efficiency complex task automatic processing method based on a large language model is provided to realize the application of a large language model in the field of ship energy efficiency and to provide a feasible method for reducing the probability of hallucination output, tool calling and complex task processing failure. Thus, personalized energy efficiency optimization suggestions are provided for ships to help ships reduce energy consumption, reduce carbon emissions and improve operational efficiency. At the same time, the digital level of ship energy efficiency is improved, the utilization rate of data and knowledge is improved, and the requirement for the professional ability of the crew is reduced.

[0064] S101, collect and organize a ship energy efficiency knowledge set and a ship energy efficiency data set, perform slicing and coding on the ship energy efficiency knowledge set, and perform pre-training of a ship energy efficiency large model based on a general large language model base;

[0065] S102, construct a ship energy efficiency tool set and a general tool set, and give the ship energy efficiency large model professional field data processing capability;

[0066] S103, obtain user command input, fully understand and analyze user intent based on an intent analysis module, and form a formatted output of the user intent;

[0067] S104, organize and standardize the analysis result of the user intent;

[0068] S105, based on the theory of non-deterministic finite automata, construct a task automatic planning non-deterministic finite automaton;

[0069] S106, based on the task automatic planning result and the trained ship energy efficiency large model, perform user command understanding and tool calling, and generate an execution result.

[0070] In an embodiment of the present application, a ship energy efficiency complex task automatic processing method based on a large language model is provided to realize the application of a large language model in the field of ship energy efficiency and to provide a feasible method for reducing the probability of hallucination output, tool calling and complex task processing failure. Thus, personalized energy efficiency optimization suggestions are provided for ships to help ships reduce energy consumption, reduce carbon emissions and improve operational efficiency. At the same time, the digital level of ship energy efficiency is improved, the utilization rate of data and knowledge is improved, and the requirement for the professional ability of the crew is reduced.

[0071] The ship energy efficiency data set at least includes one or more of a ship energy efficiency improvement measure data set, a ship navigation management optimization data set and a ship energy efficiency equipment maintenance management data set;

[0072] The ship energy efficiency knowledge set at least includes one or more of the following: domestic and foreign ship energy efficiency standard regulations, ship energy efficiency field open thesis set, and ship energy efficiency field private knowledge set, and high-quality knowledge set screening is performed;

[0073] The knowledge set fragmentation and coding includes: fragmenting and coding long text files for training a general large language model base;

[0074] The large language model pre-training includes: training a general large language model using the ship energy efficiency dataset and the ship energy efficiency knowledge set to obtain a ship energy efficiency dialogue large language model.

[0075] In an embodiment of the present application, a ship energy efficiency tool set and a general tool set are constructed, and the ship energy efficiency large model is given professional field data processing capability, including:

[0076] The ship energy efficiency tool set at least includes one or more of the following: ship energy efficiency data analysis tool set, ship navigation management tool set, and ship energy efficiency data evaluation tool set, which are used to calculate fuel consumption, load rate, battery conversion efficiency, propulsion efficiency, energy flow and distribution, carbon emission, energy loss, and grade evaluation;

[0077] The general tool set at least includes one or more of the following: database connection, web search, and chart generation general tool set, which is used to meet various application requirements;

[0078] The configuration tool set is configured on the basis of the ship energy efficiency dialogue large model to obtain a ship energy efficiency tool large language model.

[0079] In an embodiment of the present application, user command input is obtained, the user intent is fully understood and analyzed based on an intent analysis module, and a formatted output of the user intent is formed, including:

[0080] An intent analysis dataset is constructed, which contains common fine-grained and coarse-grained user commands in the use process of the ship energy efficiency system, and each data contains a user command and divided implementation steps;

[0081] A system prompt is created based on a protective fence mechanism, and the system prompt is constructed in accordance with the format of "identity declaration-work scope-specification format-reply example-illusion boundary-range boundary", which is used to indicate the behavior mode of the ship energy efficiency large language model;

[0082] The intent analysis capability is enhanced through a prompt training and feedback mechanism, the model is prompted multiple times and feedback is given, so that it can better complete the tasks of intent analysis and understanding;

[0083] The ship energy efficiency large language model is used to generate a Json format intent analysis result.

[0084] In one embodiment of the present application, feedback is given to the model, including:

[0085] The feedback given to the model is at least the evaluation information of "very good" and "not concise enough".

[0086] In one embodiment of the present application, the analysis result of the user's intention is sorted and standardized, including:

[0087] The intention analysis result is matched with the tool set to obtain the tool capability possessed by the intention analysis result and the model, and the intention analysis result is decomposed and matched item by item.

[0088] The successfully matched task input and output parameters are supplemented and a state record is formed.

[0089] According to the matching and parameter supplementing of each tool, the front and rear sequence association relationship between each step is determined.

[0090] In one embodiment of the present application, based on the theory of non-deterministic finite automata, a task automatic planning non-deterministic finite automaton is constructed, including:

[0091] Three basic operations of "and", "connection" and "loop" are defined and constructed, and various cases of task planning are covered by combining the three basic operations.

[0092] A task automatic planning non-deterministic finite automaton ATP-NFA is created, and according to the intention cleaning result, the three basic operations are used to create the ATP-NFA to form a task flow.

[0093] In one embodiment of the present application, based on the task automatic planning result and the trained ship energy efficiency large model, the user command understanding and accurate calling of the tool are realized, and the execution result is generated, including:

[0094] Based on the task flow, the front and rear sequence relationship and the tool calling instruction contained in the ATP-NFA, the task is implemented until the ATP-NFA execution ends and enters the acceptance state.

[0095] When the task contains a precise chart generation flow, a chart generation tool set is called to complete the parameter transmission and chart generation display of the column chart, pie chart and line chart.

[0096] In the embodiment of the present application, the model is trained based on a large number of ship energy efficiency data sets and knowledge sets, and a rich set of ship energy efficiency related tools is additionally configured, and the ship energy efficiency field has stronger professional ability. Through the series of processes of intention analysis, intention cleaning, and task automatic planning, it is ensured that the model can automatically analyze the task implementation process when dealing with coarse-grained instructions, and accurately complete tool calling and parameter passing. Through the task automatic planning non-deterministic finite automaton, the strict correspondence and accurate matching between the steps in the process and the tools equipped by the model are realized. Through the construction of the chart generation tool set, the accurate chart based on data and semantics is generated. It is ensured that the model accurately and stably generates and outputs in actual application.

[0097] The model is equipped with a rich and complete set of ship energy efficiency tools, and the algorithm process is interpretable. Based on the non-deterministic finite automaton theory, the model has automatic planning ability, and compared with completely relying on large language model for task planning, the model has higher interpretability and reliability. The output standard format is set in the intermediate process such as intention analysis and intention cleaning, and when an error occurs in the task execution process, the error can be traced back, and the large model capability is used to realize correction and correction.

[0098] The application of large language model in the field of ship energy efficiency mainly needs to solve the following problems: the general large language model has insufficient professional ability in the field of ship energy efficiency; the users of the large model in the field of ship energy efficiency usually use coarse instructions to interact with the model, and the automation degree and accuracy of the large model in complex task processing need to be improved. Engineering application pays attention to accuracy and reliability, and the calculation ability of traditional large language model related to ship energy efficiency, the accuracy of chart generation and the level of stable processing of complex tasks are low. The present application solves the above problems by a kind of ship energy efficiency complex task automatic processing method based on large language model, and provides overall architecture design and technical foundation for constructing ship energy efficiency large language model.

[0099] As shown in Figures 2 to 9 , the present application provides a kind of ship energy efficiency complex task automatic processing method based on large language model, as shown in Figure 2 , the present application provides a kind of ship energy efficiency complex task automatic processing method based on large language model, as shown in Figure 3 , the present application provides a kind of ship energy efficiency complex task automatic processing method based on large language model, as shown in Figure 4 , the present application provides a kind of ship energy efficiency complex task automatic processing method based on large language model, as shown in Figure 5 , the present application provides a kind of ship energy efficiency complex task automatic processing method based on large language model, as shown in Figure 6 , the present application provides a kind of ship energy efficiency complex task automatic processing method based on large language model, as shown in Figure 7A connection operation schematic diagram of a basic operation of a ship energy efficiency complex task automatic processing method based on a large language model, Figure 8 A loop operation schematic diagram of a basic operation of a ship energy efficiency complex task automatic processing method based on a large language model, Figure 9 A task automatic planning flowchart of a ship energy efficiency complex task automatic processing method based on a large language model.

[0100] In the figure, a ship energy efficiency complex task automatic processing method based on a large language model overall architecture schematic diagram includes: collecting and organizing ship energy efficiency dataset and knowledge set, fragmenting and encoding ship energy efficiency knowledge set, and pre-training ship energy efficiency large model based on general large language model base; constructing ship energy efficiency tool set and general tool set, and giving ship energy efficiency large model professional field data processing capability. Intention analysis obtains user command input, fully understands and analyzes user intention by using intention analysis module, and forms formatted output; the intention analysis result is further arranged and standardized by intention cleaning; task automatic planning, based on the theory of non-deterministic finite automata, constructs task automatic planning non-deterministic finite automata; task execution. Based on the task automatic planning result and the trained ship energy efficiency large model, user command understanding and accurate tool calling are realized, and execution result is generated. Precise chart generation occurs in the chart generation task execution process, to meet the related functional requirements of data monitoring and statistics in engineering.

[0101] Before processing the ship energy efficiency user command, it includes:

[0102] Constructing a ship energy efficiency dataset D SEE , including ship energy efficiency improvement measure dataset, ship navigation management optimization dataset, ship energy efficiency equipment maintenance management dataset, etc. The dataset is stored in Json format, and the storage format of each data is:

[0103]

[0104] Collecting and organizing ship energy efficiency knowledge set K SEE . Contains domestic and foreign ship energy efficiency standard regulations, ship energy efficiency field public thesis set, ship energy efficiency field private knowledge set, etc. High-quality knowledge set screening is carried out;

[0105] Knowledge set fragmentation and coding. The long text file is fragmented and coded to train the general large language model base;

[0106] Large language model pre-training. Use ship energy efficiency dataset D SEE and ship energy efficiency knowledge set K SEETrain a general large language model to obtain a ship energy efficiency dialogue large language model ShipEnEff-LLM-Chat.

[0107] Construct a ship energy efficiency tool set T SEE , including a ship energy efficiency data analysis tool set, a ship navigation management tool set, a ship energy efficiency data evaluation tool set, etc., to accurately calculate fuel consumption, load rate, battery conversion efficiency, propulsion efficiency, energy flow and distribution, carbon emissions, energy loss, and rating evaluation, etc.

[0108] Construct a general tool set T COMM , including database connection, web search, chart generation, etc. general tool set to meet various application requirements.

[0109] Configure the tool set. On the basis of the ship energy efficiency dialogue large model, configure the tool set to obtain a ship energy efficiency tool large language model ShipEnEff-LLM-Tool.

[0110] After obtaining the user command, intent analysis, including:

[0111] Construct an intent analysis data set D InAn . The data set contains common fine-grained and coarse-grained user commands in the use process of the ship energy efficiency system, and each data contains user commands and divided implementation steps. The data set is stored in a vector database for continuous enhancement and expansion. It is expressed in Json format as follows:

[0112]

[0113]

[0114] Create system prompts based on the protective fence mechanism. The system prompts are constructed according to the format of "identity declaration-work scope-specification format-reply example-illusion boundary-range boundary". In each dialogue, the system prompts remind the ShipEnEff-LLM-Chat of the identity and work content, indicating and constraining the behavior of the ship energy efficiency large language model. The reply format adopts the Json format, which is convenient for subsequent intent cleaning and task automatic planning. Give an example as shown in Figure 4 .

[0115] Enhance its intent analysis ability through prompt training and feedback mechanism. Prompt multiple times and give the model feedback, such as "very good", "not concise" etc. so that it can better complete the task of intent analysis and understanding. The analysis results with positive feedback will be saved to the vector database.

[0116] Generate intent analysis result Res IAMThe ship energy efficiency large language model is used to generate a Json format intention analysis result.

[0117] In an embodiment of the present application, the generated intention analysis result Res IAM is cleaned, including:

[0118] The intention analysis result Res IAM is matched with the tool set. The Res IAM is matched with the tool capability possessed by the model, and the Res IAM is decomposed and matched item by item.

[0119] The parameters are matched and supplemented. The successfully matched task input and output parameters are supplemented and formed into a state record.

[0120] The sequence relationship before and after the steps is determined. According to the tool matching and parameter supplementing, the sequence relationship between the steps is determined.

[0121] Figure 5 In the embodiment, the tool capability Res IAM equipped with the model is obtained in the early preparation stage, and the Res IAM is analyzed. The completion of all steps is matched as the end condition of intention cleaning. All steps need to be matched with tools. For steps that do not need to call tools, automatic generation or step reduction is performed. If tool matching can be realized according to semantics, tool calling is preferred. The steps that successfully match tools and have complete parameters are defined as independent steps, otherwise they are defined as associated steps. For independent steps, the matched tool name, parameter list and output type are recorded. For associated steps, the parameters are supplemented as much as possible, and the sequence relationship between the steps is determined according to the source of the parameters. The supplemented associated steps are converted into independent steps. Finally, all steps in Res IAM are converted into independent steps, and the intention cleaning result containing steps, matched tools and sequence steps is obtained, which is used for task automatic planning. The standard format is as follows, and the intention cleaning result is denoted as Res IWM . The example format is as follows:

[0122]

[0123] In the embodiment of the present application, the task automatic planning includes the following steps:

[0124] The basic operation relationship is constructed. Three basic operations of "and", "connection" and "cycle" are defined and constructed. By combining the three basic operations, various cases of task planning can be covered.

[0125] Basic operation explanation table

[0126]

[0127]

[0128] Among them, the parallel operation is usually used in the case that the total task can be divided into two or more parallel tasks, task a and task b are independent of each other and do not affect each other, and contribute to the total task, represented by "∪". The connection operation is used in the case that the total task can be divided into two or more tasks, and there is a single direction dependence or progressive relationship between the tasks, the execution result of task a may be used as the input or restriction condition of task b, the connection operation is represented by "·", which can be omitted. The loop operation is used in the case that the total task can be completed by multiple rounds of execution of a certain task, denoted as "*". Unlike ordinary regular expression operations, the three basic operations of the automatic planning module also integrate the question and answer and tool calling functions of the large language model, embed the error correction mechanism of the large language model, and set the maximum error cycle threshold to prevent endless loop of the model.

[0129] Create task automatic planning nondeterministic finite automaton ATP-NFA. The ATP-NFA is represented by a five-tuple , where n represents the number of steps contained in Res IWM , Q is a finite set of task completion states q0 is the initial state, representing that all tasks are not completed. is the acceptance state, representing that all tasks are completed, the unfinished task is represented by 0, and the completed task is represented by 1. T is the tool set equipped with ShipEnEff-LLM-Tool; δ is the transition function According to the intention cleaning result, create ATP-NFA using three basic operations to form the task flow.

[0130] Task execution, including:

[0131] Implement tasks based on the task flow, pre-post sequence relationship, tool calling instructions and the like contained in the ATP-NFA, until the ATP-NFA ends and enters the acceptance state;

[0132] Figure 9 In Res IWM contains three steps, then q0={0,0,0}, q7={1,1,1}, get the current state q i , if q i= q7, the construction of ATP-NFA is completed, otherwise, read the first task with task state 0. Determine whether it is an independent step through relation, if it is an independent step, implement the task through the large language model and the configured tool set, and update the state of the current ATP-NFA. If there is a previous step, find the id of the previous step and determine whether the previous step is completed. If the previous step is completed, the current task can be implemented according to the previous step to generate the result. If it is not completed, read the first unfinished task in the remaining tasks and repeat the above process.

[0133] In particular, when the task contains a precise chart generation process, the chart generation tool set is called to complete the parameter transmission and chart generation display of the bar chart, pie chart and line chart.

[0134] In another embodiment of the application, a ship energy efficiency complex task automatic processing system based on a large language model is provided, based on any one of the above ship energy efficiency complex task automatic processing methods based on a large language model, comprising: a first processing module, a second processing module, an input module, a specification module, a third processing module and an execution module.

[0135] The first processing module is configured to collect and organize ship energy efficiency knowledge sets and ship energy efficiency data sets, perform sharding and encoding on the ship energy efficiency knowledge sets, and pre-train a ship energy efficiency large model based on a general large language model base.

[0136] The second processing module is configured to construct a ship energy efficiency tool set and a general tool set, and give the ship energy efficiency large model professional field data processing capability.

[0137] The input module is configured to obtain user command input, fully understand and analyze the user intent based on an intent analysis module, and form a formatted output of the user intent.

[0138] The specification module is configured to organize and standardize the analysis results of the user intent.

[0139] The third processing module is configured to construct a task automatic planning non-deterministic finite automaton based on the theory of non-deterministic finite automata.

[0140] The execution module is configured to perform user command understanding and tool calling based on the task automatic planning results and the trained ship energy efficiency large model, and generate an execution result.

[0141] In one embodiment of the application, a storage medium having a computer program stored thereon is provided, wherein the computer program is executed by a processor to implement any one of the above ship energy efficiency complex task automatic processing methods based on a large language model.

[0142] AsFigure 10 As shown, Figure 10 An electronic device schematic diagram of a ship energy efficiency complex task automatic processing method based on a large language model according to an embodiment of the present application.

[0143] Figure 10 In an embodiment, an electronic device 20 is provided, comprising a memory 21, a processor 22, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of the preceding embodiments when executing the program.

[0144] In an embodiment of the present application, a feasible method is provided to realize the application of a large language model in the field of ship energy efficiency, and to reduce the probability of hallucination output, tool calling, and complex task processing failure as much as possible. Thus, personalized energy efficiency optimization suggestions are provided for ships to help ships reduce energy consumption, reduce carbon emissions, and improve operational efficiency. At the same time, the digitalization level of ship energy efficiency is improved, the utilization rate of data and knowledge is improved, and the requirement for the professional ability of the crew is further reduced.

[0145] The above is a preferred embodiment of the present application. It should be noted that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should also be considered within the scope of protection of the present application.

Claims

1. A large language model-based automatic processing method for complex tasks of ship energy efficiency, characterized in that, The method comprises: S101, collecting and organizing ship energy efficiency knowledge set and ship energy efficiency data set, fragmenting and coding the ship energy efficiency knowledge set, and pre-training the ship energy efficiency large model based on a general large language model base; S102, constructing a ship energy efficiency tool set and a general tool set, and giving the ship energy efficiency large model professional field data processing capability; S103, obtaining user command input, fully understanding and analyzing user intent based on an intent analysis module, and forming a formatted output of the user intent; S104, organizing and standardizing the analysis results of the user intent; S105, constructing a task automatic planning non-deterministic finite automaton based on the theory of non-deterministic finite automaton; S106, based on the task automatic planning result and the trained ship energy efficiency large model, performing user command understanding and tool calling to generate an execution result.

2. The method according to claim 1, wherein, Collecting and organizing ship energy efficiency knowledge set and ship energy efficiency data set, fragmenting and coding the ship energy efficiency knowledge set, and pre-training the ship energy efficiency large model based on a general large language model base, comprising: The ship energy efficiency data set at least includes one or more of the ship energy efficiency improvement measure data set, the ship navigation management optimization data set, and the ship energy efficiency equipment maintenance management data set; The ship energy efficiency knowledge set at least includes one or more of the domestic and foreign ship energy efficiency standard regulations, the ship energy efficiency field public thesis set, and the ship energy efficiency field private knowledge set, and high-quality knowledge set screening is performed; The knowledge set fragmentation and coding includes fragmenting and coding long text files for training a general large language model base; The large language model pre-training includes training a general large language model using the ship energy efficiency data set and the ship energy efficiency knowledge set to obtain a ship energy efficiency dialogue large language model.

3. The method according to claim 1, wherein, Constructing a ship energy efficiency tool set and a general tool set to give the ship energy efficiency large model professional field data processing capability, comprising: The ship energy efficiency tool set at least includes one or more of the ship energy efficiency data analysis tool set, the ship navigation management tool set, and the ship energy efficiency data evaluation tool set, which is used for calculating fuel consumption, load rate, battery conversion efficiency, propulsion efficiency, energy flow and distribution, carbon emission, energy loss, and grade evaluation; The general tool set at least includes one or more of the general tools for database connection, web search, and chart generation, which is used to meet various application requirements; On the basis of the ship energy efficiency dialogue large model, the tool set is configured to obtain a ship energy efficiency tool large language model.

4. The method according to claim 1, wherein, Obtaining user command input, fully understanding and analyzing user intent based on an intent analysis module, and forming a formatted output of the user intent, comprising: An intent analysis data set is constructed, which contains common fine-grained and coarse-grained user commands in the use process of the ship energy efficiency system, and each data contains user commands and divided implementation steps; A system prompt is created based on a protective fence mechanism, which is constructed in accordance with the format of "identity declaration-work scope-specification format-reply example-illusion boundary-range boundary" to indicate the behavior of the ship energy efficiency large language model. Through prompting training and feedback mechanism to enhance its intent analysis ability, multiple prompts and feedback are given to the model to make it better complete the task of intent analysis and understanding; The ship energy efficiency large language model is used to generate an intent analysis result in Json format.

5. The method according to claim 4, wherein, The model is given feedback, including: The model is given feedback at least "very good" and "not concise" evaluation information.

6. The method according to claim 1, wherein, The analysis result of the user intent is arranged and standardized, including: Matching the intent analysis result with the tool set to obtain the tool capability possessed by the intent analysis result and the model, and decomposing and matching each item of the intent analysis result; Successful matching task input and output parameters are supplemented and a state record is formed; According to the matching and parameter supplementing of each tool, the front and rear sequence association relationship between each step is determined.

7. The method according to claim 1, wherein, Based on the theory of non-deterministic finite automata, a task automatic planning non-deterministic finite automaton is constructed, including: Defining and constructing three basic operations of "and", "connection" and "cycle", which cover various cases of task planning by combining the three basic operations; Creating a task automatic planning non-deterministic finite automaton ATP-NFA, creating ATP-NFA using the three basic operations according to the intent cleaning result, and forming a task flow.

8. The method according to claim 7, wherein, Based on the task automatic planning result and the trained ship energy efficiency large model, the user command understanding and accurate calling of the tool are realized, and the execution result is generated, including: Based on the task flow, the front and rear sequence relationship and the tool calling instruction contained in the ATP-NFA, the task is implemented until the ATP-NFA execution ends and enters the acceptance state; When the task contains a precise chart generation flow, the chart generation tool set is called to complete the parameter transmission and chart generation display of column chart, pie chart and line chart.

9. A large language model-based automatic processing system for complex tasks of ship energy efficiency, based on a large language model-based automatic processing method for complex tasks of ship energy efficiency according to any one of claims 1 to 8, characterized in that, The automatic processing system comprises a first processing module, a second processing module, an input module, a specification module, a third processing module and an execution module. The first processing module is used to collect and arrange ship energy efficiency knowledge set and ship energy efficiency data set, to slice and encode the ship energy efficiency knowledge set, and to pre-train a ship energy efficiency large model based on a general large language model base; The second processing module is used to construct a ship energy efficiency tool set and a general tool set, and to give the ship energy efficiency large model professional field data processing capability; The input module is used to obtain user command input, to fully understand and analyze user intent based on an intent analysis module, and to form a formatted output of the user intent; The specification module is used to arrange and standardize the analysis result of the user intent; The third processing module is used to construct a task automatic planning non-deterministic finite automaton based on the theory of non-deterministic finite automata; The execution module is used to understand user commands and call tools based on the task automatic planning result and the trained ship energy efficiency large model, and to generate execution results.

10. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by a processor to implement a ship energy efficiency complex task automatic processing method based on a large language model according to any one of claims 1 to 8.

11. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method according to any one of claims 1-8 when executing the program.

Citation Information

Patent Citations

  • Navigation big data exploration interaction method and system based on natural language processing

    CN117196034A

  • Generative AI-driven marine engine operation and maintenance system

    CN117905579A