Large language model-based ship energy efficiency complex task automatic processing method and system, storage medium and equipment
Through the use of large language models in the field of ship's energy efficiency field to process ship's energy efficiency data and knowledge, build a special tool set and conduct intention analysis and task planning, solve the problem of insufficient data quality and complex task planning, and achieve more efficient energy management And operation optimization.
Patent Information
- Application Number
- CN202411463981.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-21
AI Technical Summary
The existing technology faces problems of insufficient data quality, hallucination output and complex task planning difficulties in the application of ship energy efficiency, resulting in high energy consumption, high carbon emissions and low operational efficiency.
By collecting and organizing ship energy efficiency data sets and knowledge sets, shards and codes, and pre -training based on the base of the general -purpose large language model, build a ship energy efficiency tool set and general tool set, obtain user orders, and use intention analysis, intention cleaning and intention cleaning and intention. The automatic planning of the task is not defined with the theory of poor automatic machines for processing, and the execution results are generated.
It reduces the probability of failure to output and complex task processing, helps ships reduce energy consumption, reduce carbon emissions, improve operating efficiency, and improve the level of wisdom and data and knowledge of ship energy efficiency.
Smart Images

Figure CN119378115A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ship energy efficiency, and in particular relates to a method, system, storage medium and device for automatically processing complex tasks of ship energy efficiency based on a large language model. Background Art
[0002] The development of ship energy efficiency technology urgently needs digital transformation. On the one hand, it is necessary to improve the utilization rate of data and knowledge and solve the problem of "easy to collect, difficult to use" of data. On the other hand, the intelligence level of algorithms and services needs to be improved, and it is necessary to make full use of artificial intelligence technology to improve algorithm performance and enhance user experience. Ship energy efficiency technology based on large language models can deeply analyze and mine energy efficiency data during ship operations by utilizing the natural language processing capabilities of large language models, discover key points and optimization solutions for energy efficiency improvement, and reduce the difficulty of interaction and the requirements for the professional capabilities of crew members through dialogue.
[0003] The technology of big language models is in a period of rapid development. Internet giants at home and abroad are paying attention to the technical research and ecological construction of general big language models. The engineering application and exploration based on big language models are still in their infancy. Some shipping companies and research institutions have begun to try to apply big language models to the shipbuilding industry, but there is still a lack of research on the implementation of big language models in the field of ship energy efficiency. The application of this technology still faces challenges such as insufficient data quality, hallucination output, and difficulty in planning complex tasks.
[0004] Therefore, how to provide a method, system, storage medium and equipment for automatic processing of complex tasks of ship energy efficiency based on a large language model, which 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 digitalization level of ship energy efficiency, and improve the utilization rate of data and knowledge, has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present invention provide a method, system, storage medium and device for automatically processing complex tasks of ship energy efficiency based on a large language model, which can reduce the probability of hallucination output, tool call and failure in complex task processing, help ships reduce energy consumption, reduce carbon emissions, and improve operational efficiency, further improve the digitalization level of ship energy efficiency, and improve the utilization rate of data and knowledge.
[0006] In one embodiment of the present invention, a method for automatically processing complex tasks of ship energy efficiency based on a large language model is provided, comprising:
[0007] S101, collecting and organizing ship energy efficiency knowledge sets and ship energy efficiency data sets, segmenting and encoding the ship energy efficiency knowledge sets, and pre-training a ship energy efficiency large model based on a general large language model base;
[0008] S102, constructing a ship energy efficiency tool set and a general tool set to give the ship energy efficiency large model professional data processing capabilities;
[0009] S103, obtaining user command input, fully understanding and analyzing the user intention based on the intention analysis module, and forming a formatted output of the user intention;
[0010] S104, organizing and standardizing the analysis results of the user intention;
[0011] S105. Based on the theory of non-deterministic finite automata, construct a non-deterministic finite automata for automatic task planning;
[0012] S106. Based on the automatic task planning results and the trained ship energy efficiency model, user commands are understood and tools are called to generate execution results.
[0013] Furthermore, the ship energy efficiency knowledge set and the ship energy efficiency data set are collected and sorted, the ship energy efficiency knowledge set is segmented and encoded, and the pre-training of the ship energy efficiency large model is carried out based on the general large language model base, including:
[0014] The ship energy efficiency data set includes at least one or more of: a ship energy efficiency improvement measures 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 includes at least one or more of: domestic and foreign ship energy efficiency standards and regulations, public papers in the field of ship energy efficiency, and private knowledge sets in the field of ship energy efficiency, and high-quality knowledge sets are screened;
[0016] The knowledge set segmentation and encoding includes: segmenting and encoding long text files for training a universal large language model base;
[0017] The large language model pre-training includes: using the ship energy efficiency data set and the ship energy efficiency knowledge set to train a general large language model to obtain a ship energy efficiency dialogue large language model.
[0018] Furthermore, a ship energy efficiency tool set and a general tool set are constructed to give the ship energy efficiency large model professional data processing capabilities, including:
[0019] The ship energy efficiency tool set includes at least 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, which are used to calculate 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 at least one or more of the general tool sets of database connection, web page retrieval and chart generation, which are used to meet various application requirements;
[0021] The configuration tool set is configured on the basis of the ship energy efficiency dialogue large model to obtain the ship energy efficiency tool large language model.
[0022] Further, obtaining user command input, fully understanding and analyzing the user intent based on the intent analysis module, and forming a formatted output of the user intent, including:
[0023] Construct an intent analysis dataset, which contains common fine-grained and coarse-grained user commands during the use of ship energy efficiency systems. Each data contains a user command and divided implementation steps.
[0024] Create system prompts based on the protective fence mechanism. The system prompts are constructed in the format of "identity statement-work scope-standard format-response example-illusion boundary-scope boundary" to indicate the behavior of the ship energy efficiency large language model;
[0025] Enhance its intention analysis capability through prompt training and feedback mechanism. Prompt multiple times and give feedback to the model so that it can better complete the task of intention analysis and understanding.
[0026] The ship energy efficiency large language model is used to generate intent analysis results in Json format.
[0027] Furthermore, feedback is given to the model, including:
[0028] Give the model feedback of at least "excellent" and "not concise enough".
[0029] Furthermore, the analysis results of the user intention are sorted and standardized, including:
[0030] Match the intent analysis results with the tool set, obtain the intent analysis results and the tool capabilities of the model, and perform decomposition and item-by-item matching of the intent analysis results;
[0031] Complete the input and output parameters of the successfully matched tasks and form a status record;
[0032] According to the matching of each tool and the supplement of parameters, the sequence relationship between each step is determined.
[0033] Furthermore, based on the theory of non-deterministic finite automata, a non-deterministic finite automaton for automatic task planning is constructed, including:
[0034] Define and construct three basic operations: "and", "connect", and "loop", and cover various situations of task planning by combining the three basic operations;
[0035] Create a task automatic planning non-deterministic finite automaton ATP-NFA, clean the results according to the intention, create ATP-NFA using the three basic operations, and form a task flow.
[0036] Furthermore, based on the automatic task planning results and the trained ship energy efficiency model, the user command understanding and tool calling are accurately realized, and the execution results are generated, including:
[0037] Implement tasks based on the task flow, sequence relationships, and tool call instructions contained in ATP-NFA until ATP-NFA execution ends and enters the accepting state;
[0038] When the task includes a precise chart generation process, the chart generation toolset is called to complete the parameter transfer and chart generation display of bar charts, pie charts, and line charts.
[0039] In another embodiment of the present invention, a system for automatically processing complex tasks of ship energy efficiency based on a large language model is provided, and a method for automatically processing complex tasks of ship energy efficiency based on a large language model as described above comprises: 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 to collect and organize the ship energy efficiency knowledge set and the ship energy efficiency data set, segment and encode the ship energy efficiency knowledge set, and pre-train the ship energy efficiency large model based on the general large language model base;
[0041] The second processing module is used to construct a ship energy efficiency tool set and a general tool set, and endow the ship energy efficiency large model with professional data processing capabilities;
[0042] The input module is used to obtain user command input, fully understand and analyze the user intention based on the intention analysis module, and form a formatted output of the user intention;
[0043] The standardization module is used to organize and standardize the analysis results of the user intention;
[0044] The third processing module is used to construct a task automatic planning non-deterministic finite automaton based on the non-deterministic finite automaton 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, the method for automatically processing complex tasks of ship energy efficiency based on a large language model as described in any of the above items is implemented.
[0047] In another embodiment of the present invention, an electronic device is provided, including 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 of ship energy efficiency based on a large language model as described above is implemented.
[0048] The beneficial effects brought by the present invention are as follows:
[0049] It can be seen from the above scheme that 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 sorting the ship energy efficiency knowledge set and the ship energy efficiency data set, the ship energy efficiency knowledge set is segmented and encoded, and the 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 of 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 of ship energy efficiency based on a large language model according to an embodiment of the present invention;
[0052] Figure 3A schematic diagram showing the overall architecture of a large language model for ship energy efficiency of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention;
[0053] Figure 4 A diagram showing an example of a system prompt of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention;
[0054] Figure 5 An intention cleaning flow chart showing a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention;
[0055] Figure 6 A schematic diagram showing a basic operation-parallel operation of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention;
[0056] Figure 7 A schematic diagram showing basic operations and connection operations of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention;
[0057] Figure 8 A schematic diagram showing basic operations and cyclic operations of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention;
[0058] Fig. 9 A task automatic planning flow chart showing a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention;
[0059] Fig.10 A schematic diagram of an electronic device showing a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] In an embodiment of the present invention, a method for automatically processing complex tasks of ship energy efficiency based on a large language model provides a feasible method for implementing the application of large language models in the field of ship energy efficiency, thereby reducing the probability of hallucination output, tool calls and failure in complex task processing as much as possible. This provides personalized energy efficiency optimization suggestions for ships, helps ships reduce energy consumption, reduce carbon emissions, and improve operational efficiency. At the same time, it improves the digital intelligence level of ship energy efficiency, improves the utilization rate of data and knowledge, and reduces the requirements for the professional capabilities of crew members.
[0062] like Figure 1 As shown, Figure 1 A flow chart of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention is shown.
[0063] Figure 1 In this paper, a method for automatically processing complex tasks of ship energy efficiency based on a large language model is proposed, including:
[0064] S101, collecting and organizing a ship energy efficiency knowledge set and a ship energy efficiency data set, segmenting and encoding the ship energy efficiency knowledge set, and pre-training a ship energy efficiency large model based on a general large language model base;
[0065] S102, constructing a ship energy efficiency tool set and a general tool set to give the ship energy efficiency large model professional data processing capabilities;
[0066] S103, obtaining user command input, fully understanding and analyzing the user intention based on the intention analysis module, and forming a formatted output of the user intention;
[0067] S104, organizing and standardizing the analysis results of the user intention;
[0068] S105. Based on the theory of non-deterministic finite automata, construct a non-deterministic finite automata for automatic task planning;
[0069] S106. Based on the automatic task planning results and the trained ship energy efficiency model, user commands are understood and tools are called to generate execution results.
[0070] In one embodiment of the present invention, a ship energy efficiency knowledge set and a ship energy efficiency data set are collected and sorted, the ship energy efficiency knowledge set is segmented and encoded, and pre-training of a ship energy efficiency large model is carried out based on a general large language model base, including:
[0071] The ship energy efficiency data set includes at least one or more of: a ship energy efficiency improvement measures 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 includes at least one or more of: domestic and foreign ship energy efficiency standards and regulations, public papers in the field of ship energy efficiency, and private knowledge sets in the field of ship energy efficiency, and high-quality knowledge sets are screened;
[0073] The knowledge set segmentation and encoding includes: segmenting and encoding long text files for training a universal large language model base;
[0074] The large language model pre-training includes: using the ship energy efficiency data set and the ship energy efficiency knowledge set to train a general large language model to obtain a ship energy efficiency dialogue large language model.
[0075] In one embodiment of the present invention, a ship energy efficiency tool set and a general tool set are constructed to give the ship energy efficiency large model professional data processing capabilities, including:
[0076] The ship energy efficiency tool set includes at least 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, which are used to calculate fuel consumption, load rate, battery conversion efficiency, propulsion efficiency, energy flow and distribution, carbon emissions, energy loss and grade evaluation;
[0077] The general tool set includes at least one or more of the general tool sets of database connection, web page retrieval and chart generation, which are 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 the ship energy efficiency tool large language model.
[0079] In one embodiment of the present invention, obtaining a user command input, fully understanding and analyzing the user intent based on the intent analysis module, and forming a formatted output of the user intent includes:
[0080] Construct an intent analysis dataset, which contains common fine-grained and coarse-grained user commands during the use of ship energy efficiency systems. Each data contains a user command and divided implementation steps.
[0081] Create system prompts based on the protective fence mechanism. The system prompts are constructed in the format of "identity statement-work scope-standard format-response example-illusion boundary-scope boundary" to indicate the behavior of the ship energy efficiency large language model;
[0082] Enhance its intention analysis capability through prompt training and feedback mechanism. Prompt multiple times and give feedback to the model so that it can better complete the task of intention analysis and understanding.
[0083] The ship energy efficiency large language model is used to generate intent analysis results in Json format.
[0084] In one embodiment of the present invention, providing feedback to the model includes:
[0085] Give the model feedback of at least "excellent" and "not concise enough".
[0086] In one embodiment of the present invention, the analysis results of the user intention are sorted and standardized, including:
[0087] Match the intent analysis results with the tool set, obtain the intent analysis results and the tool capabilities of the model, and perform decomposition and item-by-item matching of the intent analysis results;
[0088] Complete the input and output parameters of the successfully matched tasks and form a status record;
[0089] According to the matching of each tool and the supplement of parameters, the sequence relationship between each step is determined.
[0090] In one embodiment of the present invention, based on the theory of non-deterministic finite automata, a task automatic planning non-deterministic finite automata is constructed, including:
[0091] Define and construct three basic operations: "and", "connect", and "loop", and cover various situations of task planning by combining the three basic operations;
[0092] Create a task automatic planning non-deterministic finite automaton ATP-NFA, clean the results according to the intention, create ATP-NFA using the three basic operations, and form a task flow.
[0093] In one embodiment of the present invention, based on the automatic task planning results and the trained ship energy efficiency model, the user command understanding and the accurate calling of the tool are realized, and the execution results are generated, including:
[0094] Implement tasks based on the task flow, sequence relationships, and tool call instructions contained in ATP-NFA until ATP-NFA execution ends and enters the accepting state;
[0095] When the task includes a precise chart generation process, the chart generation toolset is called to complete the parameter transfer and chart generation display of bar charts, pie charts, and line charts.
[0096] In the embodiment of the present invention, the model is trained based on a large number of ship energy efficiency data sets and knowledge sets, and is additionally equipped with a rich set of ship energy efficiency related tools, which makes the professional capabilities in the field of ship energy efficiency stronger. Through a series of processes including intent analysis, intent cleaning, and automatic task planning, it is ensured that the model can automatically analyze the task implementation process and accurately complete tool calls and parameter transfer when dealing with coarse-grained instructions. Through the automatic task planning of non-deterministic finite automata, strict correspondence and accurate matching between the steps in the process and the tools equipped with the model are achieved. By constructing a chart generation toolset, accurate charts based on data and semantics are generated. Ensure that the model is accurately and stably generated and output in practical applications.
[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 theory of non-deterministic finite automata, the model has automatic planning capabilities. Compared with relying entirely on large language models for task planning, the model is more interpretable and reliable. Intermediate processes such as intent analysis and intent cleaning are set to output standard formats, which facilitates tracing errors when errors occur during task execution, and uses large model capabilities to achieve deviation correction.
[0098] The application of large language models in the field of ship energy efficiency mainly needs to solve the following problems: general large language models lack professional capabilities in the field of ship energy efficiency; users of large models in the field of ship energy efficiency usually use rough instructions to interact with the models, and the large models need to improve the degree of automation and accuracy in complex task processing. Engineering applications focus on accuracy and reliability. The traditional large language models have low ship energy efficiency-related algorithm computing power, chart generation accuracy, and stable processing of complex tasks. The present invention solves the above problems through a method for automatic processing of complex tasks of ship energy efficiency based on a large language model, providing an overall architecture design and technical foundation for constructing a large language model for ship energy efficiency.
[0099] like Figures 2 to 9 As shown, Figure 2 A schematic diagram showing the overall architecture of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention is shown. Figure 3 A schematic diagram of the overall architecture of a large language model for ship energy efficiency according to an automatic processing method for complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention is shown, Figure 4 A system prompt example diagram showing a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention, Figure 5 The intention cleaning flow chart of the method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention is shown. Figure 6 A schematic diagram showing a basic operation-parallel operation of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention, Figure 7A schematic diagram of basic operations and connection operations of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention is shown, Figure 8 A schematic diagram of basic operations and cyclic operations of a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention is shown, Fig. 9 A task automatic planning flow chart showing a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention.
[0100] In the figure, a schematic diagram of the overall architecture of a method for automatically processing complex tasks of ship energy efficiency based on a large language model is shown, including: collecting and organizing ship energy efficiency data sets and knowledge sets, slicing and encoding ship energy efficiency knowledge sets, and pre-training ship energy efficiency large models based on a general large language model base; building ship energy efficiency tool sets and general tool sets to give the ship energy efficiency large model professional data processing capabilities. Intent analysis obtains user command input, uses the intent analysis module to fully understand and analyze user intent, and forms formatted output; further organizes and standardizes the intent analysis results through intent cleaning; automatic task planning, based on the theory of non-deterministic finite automata, constructs a non-deterministic finite automaton for automatic task planning; task execution. Based on the results of automatic task planning and the trained large model of ship energy efficiency, accurate user command understanding and tool calling are achieved to generate execution results. Accurate chart generation occurs during the execution of chart generation tasks to meet the relevant functional requirements such as data monitoring and statistics in engineering.
[0101] Before processing a ship energy efficiency user order, include:
[0102] Constructing ship energy efficiency dataset D SEE Including ship energy efficiency improvement measures data set, ship navigation management optimization data set, ship energy efficiency equipment maintenance management data set, etc. The data set is stored in Json format, and the storage format of each data is:
[0103]
[0104] Collection and organization of ship energy efficiency knowledge set K SEE . Contains knowledge sets such as domestic and international ship energy efficiency standards and regulations, public papers in the field of ship energy efficiency, and private knowledge sets in the field of ship energy efficiency, and screens high-quality knowledge sets;
[0105] Knowledge set fragmentation and encoding. Fragment and encode long text files to train the universal large language model base;
[0106] Large language model pre-training. Using the ship energy efficiency dataset D SEE Ship Energy Efficiency Knowledge Set K SEETrain the general large language model and obtain the ship energy efficiency dialogue large language model ShipEnEff-LLM-Chat.
[0107] Building a Ship Energy Efficiency Toolkit SEE . Including ship energy efficiency data analysis toolset, ship navigation management toolset, ship energy efficiency data evaluation toolset, etc., to accurately calculate fuel consumption, load rate, battery conversion efficiency, propulsion efficiency, energy flow and distribution, carbon emissions, energy loss, grade evaluation, etc.;
[0108] Building a general toolset T COMM . Includes general tool sets such as database connection, web page retrieval, and chart generation to meet various application needs;
[0109] Configure the tool set. Configure the tool set based on the ship energy efficiency dialogue model to obtain the ship energy efficiency tool language model ShipEnEff-LLM-Tool.
[0110] After receiving the user command, the intent is analyzed, including:
[0111] Constructing the intention analysis dataset D InAn This dataset contains common fine-grained and coarse-grained user commands during the use of ship energy efficiency systems. Each piece of data contains user commands and divided implementation steps. The dataset 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 in the format of "identity declaration-work scope-standard format-reply example-illusion boundary-scope boundary". In each conversation, the system prompts will remind the identity and work content of the recovery of ShipEnEff-LLM-Chat, indicating and constraining the behavior of the ship energy efficiency large language model. The reply format uses Json format to facilitate subsequent intention cleaning and automatic task planning. An example is given as follows Figure 4 shown.
[0115] Enhance its intent analysis capabilities through prompt training and feedback mechanisms. Prompt the model multiple times and give feedback, such as "very good" or "not concise enough", so that it can better complete the task of intent analysis and understanding. The analysis results that receive positive feedback will be saved in the vector database.
[0116] Generate intent analysis results Res IAM. Using the large language model of ship energy efficiency, the intent analysis results in Json format are generated.
[0117] In one embodiment of the present invention, the generated intention analysis result Res IAM Perform intention cleansing, including:
[0118] Matching intent analysis results Res IAM With the toolset. Get Res IAM With the tool capabilities of the model, Res IAM Decomposition and item-by-item matching;
[0119] Match and supplement parameters. Complete the input and output parameters of the successfully matched tasks and form a status record;
[0120] Determine the sequence of steps. Determine the sequence of steps based on the matching of each tool and the supplement of parameters.
[0121] Figure 5 In the early preparation stage, you need to obtain Res IAM The tool capabilities equipped with the model and parsing Res IAM . The condition for ending the intention cleaning is that all steps are matched. All steps need to be matched with tools. Steps that do not require tool calls are automatically generated or deleted. If tool matching can be achieved based on semantics, tool calls are given priority. Steps with successful tool matching and complete parameters are defined as independent steps, otherwise they are defined as associated steps. For independent steps, record the matched tool name, parameter list, and output type. For associated steps, complete the parameters as much as possible, and determine the order of each step based on the source of the parameter. The completed associated steps are transformed into independent steps. Finally, Res IAM All steps included in are transformed into independent steps, and the intention cleaning results including steps, matching tools, and preceding and following steps are obtained for automatic task planning. The standard format is as follows. The intention cleaning result is recorded as Res IWM , the example format is as follows:
[0122]
[0123] In an embodiment of the present invention, automatic task planning includes the following steps:
[0124] Construct basic operation relationships. Define and construct the three basic operations of "and", "connect", and "loop". By combining the three basic operations, you can cover various situations in task planning.
[0125] Basic operation description table
[0126]
[0127]
[0128] Among them, the union operation is usually used when the total task can be divided into two or more parallel tasks. Task a and task b are independent of each other, do not affect each other, and contribute to the total task together, which is represented by "∪". The connection operation is used when the total task can be decomposed into two or more tasks, and there is a unidirectional dependency or progressive relationship between the tasks. The execution result of task a may be used as the input or constraint condition of task b. The connection operation is represented by "·" and can be omitted. The loop operation is used when the total task can be completed by executing a certain task in multiple rounds, which is recorded as "*". Different from ordinary regular expression operations, the three basic operations of the automatic planning module also integrate the question-answering and tool calling functions of the large language model, embed the correction mechanism of the large language model, and set the maximum error cycle threshold to prevent the model from endlessly looping.
[0129] Create a non-deterministic finite automaton ATP-NFA for task automatic planning. ATP-NFA uses five-tuples Indicates, where n represents Res IWM The number of steps contained in Q is a finite set of task completion states. q0 is the starting state, indicating that all tasks are not completed. is the accepting state, indicating that all tasks are completed, unfinished tasks are represented by 0, and completed tasks are represented by 1. T is the tool set equipped by ShipEnEff-LLM-Tool; δ is the transfer function According to the intention cleaning results, ATP-NFA is created using three basic operations to form a task flow.
[0130] Task execution, including:
[0131] Implement tasks based on the task flow, sequence relationships, tool call instructions, etc. contained in ATP-NFA until ATP-NFA execution ends and enters the accepting state;
[0132] Fig. 9 In the above example, we assume that Res IWM It 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 status 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 toolset, and update the current state of ATP-NFA. If there is a predecessor step, find the id of the predecessor step and determine whether the predecessor step is completed. If the predecessor step is completed, the current task can be completed based on the result generated by the predecessor step. If not completed, read the first unfinished task among the remaining tasks and repeat the above process.
[0133] In particular, when the task includes a precise chart generation process, the chart generation tool set is called to complete the parameter transfer and chart generation display of bar charts, pie charts, and line charts.
[0134] In another embodiment of the present invention, a system for automatically processing complex tasks of ship energy efficiency based on a large language model is provided, and a method for automatically processing complex tasks of ship energy efficiency based on a large language model as described above comprises: 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 used to collect and organize the ship energy efficiency knowledge set and the ship energy efficiency data set, segment and encode the ship energy efficiency knowledge set, and pre-train the ship energy efficiency large model based on the general large language model base;
[0136] The second processing module is used to construct a ship energy efficiency tool set and a general tool set, and endow the ship energy efficiency large model with professional data processing capabilities;
[0137] The input module is used to obtain user command input, fully understand and analyze the user intention based on the intention analysis module, and form a formatted output of the user intention;
[0138] The standardization module is used to organize and standardize the analysis results of the user intention;
[0139] The third processing module is used to construct a task automatic planning non-deterministic finite automaton based on the non-deterministic finite automaton theory;
[0140] 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.
[0141] In one 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, the method for automatically processing complex tasks of ship energy efficiency based on a large language model as described in any of the above items is implemented.
[0142] like Fig.10 As shown, Fig.10 A schematic diagram of an electronic device showing a method for automatically processing complex tasks of ship energy efficiency based on a large language model according to an embodiment of the present invention.
[0143] Fig.10 In the invention, 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 when the processor executes the program, the method for automatically processing complex tasks of ship energy efficiency based on a large language model described in any one of the above is implemented.
[0144] In the embodiment of the present invention, a feasible method is provided for realizing the application of large language models in the field of ship energy efficiency, which can reduce the probability of hallucination output, tool calling and failure in complex task processing as much as possible. Thus, personalized energy efficiency optimization suggestions are provided for ships, helping ships to reduce energy consumption, reduce carbon emissions and improve operational efficiency. At the same time, the digital intelligence level of ship energy efficiency is improved, the utilization rate of data and knowledge is improved, and the requirements for the professional ability of crew members are further reduced.
[0145] The above are preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for automatically processing complex tasks of ship energy efficiency based on a large language model, characterized in that: The method comprises: S101, collecting and organizing a ship energy efficiency knowledge set and a ship energy efficiency data set, segmenting and encoding the ship energy efficiency knowledge set, and pre-training a 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 to give the ship energy efficiency large model professional data processing capabilities; S103, obtaining user command input, fully understanding and analyzing the user intention based on the intention analysis module, and forming a formatted output of the user intention; S104, organizing and standardizing the analysis results of the user intention; S105. Based on the theory of non-deterministic finite automata, construct a non-deterministic finite automata for automatic task planning; S106. Based on the automatic task planning results and the trained ship energy efficiency model, user commands are understood and tools are called to generate execution results.
2. According to claim 1, a method for automatically processing complex tasks of ship energy efficiency based on a large language model is characterized in that: Collect and organize ship energy efficiency knowledge sets and ship energy efficiency data sets, segment and encode the ship energy efficiency knowledge sets, and pre-train the ship energy efficiency large model based on the general large language model base, including: The ship energy efficiency data set includes at least one or more of: a ship energy efficiency improvement measures data set, a ship navigation management optimization data set, and a ship energy efficiency equipment maintenance management data set; The ship energy efficiency knowledge set includes at least one or more of: domestic and foreign ship energy efficiency standards and regulations, public papers in the field of ship energy efficiency, and private knowledge sets in the field of ship energy efficiency, and high-quality knowledge sets are screened; The knowledge set segmentation and encoding includes: segmenting and encoding long text files for training a universal large language model base; The large language model pre-training includes: using the ship energy efficiency data set and the ship energy efficiency knowledge set to train a general large language model to obtain a ship energy efficiency dialogue large language model.
3. According to claim 1, a method for automatically processing complex tasks of ship energy efficiency based on a large language model is characterized in that: Construct a ship energy efficiency tool set and a general tool set to give the ship energy efficiency large model professional data processing capabilities, including: The ship energy efficiency tool set includes at least 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, which are used to calculate fuel consumption, load rate, battery conversion efficiency, propulsion efficiency, energy flow and distribution, carbon emissions, energy loss and grade evaluation; The general tool set includes at least one or more of the general tool sets of database connection, web page retrieval and chart generation, which are used to meet various application requirements; The configuration tool set is configured on the basis of the ship energy efficiency dialogue large model to obtain the ship energy efficiency tool large language model.
4. According to claim 1, a method for automatically processing complex tasks of ship energy efficiency based on a large language model is characterized in that: Obtain user command input, fully understand and analyze the user intent based on the intent analysis module, and form a formatted output of the user intent, including: Construct an intent analysis dataset, which contains common fine-grained and coarse-grained user commands during the use of ship energy efficiency systems. Each data contains a user command and divided implementation steps. Create system prompts based on the protective fence mechanism. The system prompts are constructed in the format of "identity statement-scope of work-specification format-response example-illusion boundary-scope boundary" to indicate the behavior of the ship energy efficiency large language model; Enhance its intention analysis capability through prompt training and feedback mechanism. Prompt multiple times and give feedback to the model so that it can better complete the task of intention analysis and understanding. The ship energy efficiency large language model is used to generate intent analysis results in Json format.
5. The method for automatically processing complex tasks of ship energy efficiency based on a large language model according to claim 4 is characterized in that: Give feedback to the model, including: Give the model feedback of at least "very good" and "not concise enough".
6. The method for automatically processing complex tasks of ship energy efficiency based on a large language model according to claim 1 is characterized in that: The analysis results of the user intention are collated and standardized, including: Match the intent analysis results with the tool set, obtain the intent analysis results and the tool capabilities of the model, and perform decomposition and item-by-item matching of the intent analysis results; Complete the input and output parameters of the successfully matched tasks and form a status record; According to the matching of each tool and the supplement of parameters, the sequence relationship between each step is determined.
7. The method for automatically processing complex tasks of ship energy efficiency based on a large language model according to claim 1 is characterized in that: Based on the theory of non-deterministic finite automata, a non-deterministic finite automaton for automatic task planning is constructed, including: Define and construct the three basic operations of "join", "connect", and "loop", and cover various situations of task planning by combining the three basic operations; Create a task automatic planning non-deterministic finite automaton ATP-NFA, clean the results according to the intention, create ATP-NFA using the three basic operations, and form a task flow.
8. The method for automatically processing complex tasks of ship energy efficiency based on a large language model according to claim 7 is characterized in that: Based on the automatic task planning results and the trained ship energy efficiency model, the user command understanding and tool calling are accurately realized, and the execution results are generated, including: Implement tasks based on the task flow, sequence relationships, and tool call instructions contained in ATP-NFA until ATP-NFA execution ends and enters the accepting state; When the task includes a precise chart generation process, the chart generation toolset is called to complete the parameter transfer and chart generation display of bar charts, pie charts, and line charts.
9. A system for automatically processing complex tasks of ship energy efficiency based on a large language model, based on a method for automatically processing complex tasks of ship energy efficiency based on a large language model as claimed in 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 organize the ship energy efficiency knowledge set and the ship energy efficiency data set, segment and encode the ship energy efficiency knowledge set, and pre-train the ship energy efficiency large model based on the 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 endow the ship energy efficiency large model with professional data processing capabilities; The input module is used to obtain user command input, fully understand and analyze the user intention based on the intention analysis module, and form a formatted output of the user intention; The standardization module is used to organize and standardize the analysis results of the user intention; The third processing module is used to construct a task automatic planning non-deterministic finite automaton based on the non-deterministic finite automaton theory; 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.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a method for automatically processing complex tasks of ship energy efficiency based on a large language model as described in any one of claims 1 to 8 is implemented.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements a method for automatically processing complex tasks of ship energy efficiency based on a large language model as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Traffic data analysis complex task intelligent disassembly and completion method based on large language model
CN117194624A
Navigation big data exploration interaction method and system based on natural language processing
CN117196034A
Generative AI-driven marine engine operation and maintenance system
CN117905579A
A ship test training scenario question and answer method, system, device and medium
CN118113855A
Method and system for realizing industrial digital intelligence based on artificial intelligence
CN118228694A
Cited By
Marine engine operation and maintenance method, system and terminal based on vibration signal and LLM
CN120907844A
Cross-domain ship large model training method and device, computer equipment, storage medium and computer program product
CN121614874A
Cross-domain ship large model training method and device, computer device, storage medium and computer program product
CN121614874B