Intelligent interaction method and system based on AI large model and shipping service system
By using an AI-based big data model-driven intelligent interaction method, we can construct prompts for commonly used business functions, parse user input, generate execution plans, and automatically call the shipping business system interface. This solves the problems of lengthy user interaction modes and professional adaptation in existing technologies, and achieves efficient business processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI COSCO INFORMATION & TECH
- Filing Date
- 2026-01-28
- Publication Date
- 2026-05-19
AI Technical Summary
The existing user interaction mode of shipping service websites has a lengthy operation path, high user learning cost, and non-professional users have difficulty understanding the natural language requirements. The intelligent interaction solution is difficult to adapt to the professional needs of the shipping industry and cannot be deeply integrated with the business function interface.
Based on the AI big data model and shipping business system, the system constructs common business function prompts, obtains multimodal user input, analyzes intent recognition results, selects matching shipping knowledge retrieval strategies, generates a call execution plan, automatically calls the business function interfaces of the shipping business system, and generates response data.
It achieves precise matching between user input data and the business functions of the shipping business system, reduces user learning costs, shortens operation paths, improves business processing efficiency, adapts to the professional needs of the shipping industry, and realizes automated linkage of business functions.
Smart Images

Figure CN122064720A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of artificial intelligence interaction technology and shipping service data integration technology, and in particular to an intelligent interaction method and system based on AI big data models and shipping business systems. Background Technology
[0002] With the acceleration of global trade integration, shipping services, as a core link in cross-border logistics, are experiencing a continuous increase in their demand for digitalization. Currently, shipping service websites (i.e., shipping business systems) have digitized core services such as freight rate inquiries, space bookings, cargo tracking, and document processing. These websites utilize modular design to break down different business functions into independent menus or entry points, supporting users in completing online transactions. Simultaneously, the rapid iteration of large language model technology in the field of artificial intelligence has significantly improved its capabilities in natural language understanding, intent recognition, and dialogue generation, greatly promoting the implementation of the "Conversations as a Service (CaaS)" model and providing a new path for the industry's digital service upgrade.
[0003] However, although existing shipping service websites have achieved online business operations, the current user interaction model in the shipping service sector still suffers from the following core pain points:
[0004] Firstly, existing shipping service websites employ a traditional interaction model of "menu navigation and function clicks," requiring users to familiarize themselves with the website's hierarchical structure before locating the target business function, resulting in a high learning cost. This is especially problematic for non-professional users (such as small and medium-sized cargo owners and cross-border e-commerce sellers), who may find the complex and lengthy operation paths and options for specialized business function modules like "container type selection" and "demurrage calculation" inefficient, potentially leading to operational errors.
[0005] Secondly, users' needs in shipping business scenarios are mostly presented in natural language (such as "query the freight rate of a 40-foot container from port A to port B next week"). However, existing shipping service websites cannot directly understand this natural language requirement. Users need to break down the natural language requirement into structured parameters (such as "port, container type, time") and then manually fill them in the input boxes of the corresponding business function modules. This process requires users to actively adapt to the system's interaction logic, rather than the system adapting to the user's habits.
[0006] Third, shipping business involves many professional terms, and existing intelligent interaction solutions are difficult to adapt to the professional needs of the shipping industry. Furthermore, they have not achieved deep integration with the business function interfaces of shipping service websites, and cannot directly call the business function interfaces according to user needs. Users still need to manually jump to the corresponding business function modules to complete the operation.
[0007] Based on this, this specification provides an intelligent interaction method and system based on AI large model and shipping business system. Summary of the Invention
[0008] To address the problems of lengthy user operation paths, high user learning costs, low business processing efficiency, and the inability of existing intelligent interaction solutions to adapt to the professional needs of the shipping industry and deeply integrate with the business function interfaces of shipping business systems in the existing traditional interaction mode, this specification provides an intelligent interaction method and system based on an AI big data model and a shipping business system. Through the AI big data model, guided by commonly used business function prompts, it achieves accurate matching between user input data and business functions in the shipping business system. Based on retrieved shipping knowledge data and user input data, it generates and executes a call execution plan to achieve automated linkage between user input data and the business function interfaces of the shipping business system. Finally, it generates and displays response data to the user, allowing users to use the system without needing to be familiar with its hierarchical structure, thus lowering the barrier to entry for non-professional users.
[0009] The following technical solution is adopted in this specification:
[0010] This specification provides an intelligent interaction method based on an AI large-scale model and a shipping business system. The method includes:
[0011] S1: Data Acquisition and Intent Recognition: Based on frequently used business function keywords in the shipping business system, construct common business function prompt words, acquire multimodal user input and parse it into user input data, input the user input data and the common business function prompt words into the AI big model, and output the user's intent recognition result; the intent recognition result is the business function that the user intends to handle or the recognition failure result;
[0012] S2: Knowledge base retrieval: Based on the intent recognition result, select a matching shipping knowledge retrieval strategy, and retrieve shipping knowledge data from the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy;
[0013] S3: Call plan generation: Based on the shipping knowledge data, the user input data and the intent recognition result, select the corresponding first intelligent agent or a pre-set generation algorithm to generate a call execution plan;
[0014] S4: Response data generation: According to the call execution plan, call the target business function interface in the shipping business system, determine the call result corresponding to the target business function interface; based on the call result, use the second intelligent agent to generate response data and display it to the user.
[0015] Optionally, the shipping business system includes various commonly used business functions and various other business functions. The commonly used business functions and the other business functions are divided according to the frequency of user use. Some of the commonly used business functions are set as special business functions.
[0016] The specific steps in S2, which involve selecting a matching shipping knowledge retrieval strategy based on the intent recognition result, include:
[0017] When the intent recognition result is any commonly used business function in the shipping business system and not the special business function, the first retrieval strategy is selected as the shipping knowledge retrieval strategy matching the intent recognition result.
[0018] When the intent recognition result is any commonly used business function in the shipping business system and is the special business function, the second retrieval strategy is selected as the shipping knowledge retrieval strategy matching the intent recognition result.
[0019] When the intent recognition result is a recognition failure result, the third retrieval strategy is selected as the shipping knowledge retrieval strategy to match the intent recognition result.
[0020] Optionally, the knowledge base for the other business functions is a vector knowledge base;
[0021] In step S2, retrieving shipping knowledge data from the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy specifically includes:
[0022] When the shipping knowledge retrieval strategy is the first retrieval strategy, the commonly used business function corresponding to the intent recognition result is taken as the first business function. The knowledge base corresponding to the first business function is retrieved from the knowledge base of each commonly used business function in the shipping business system, and the content in the retrieved knowledge base is taken as shipping knowledge data.
[0023] When the shipping knowledge retrieval strategy is the second retrieval strategy, the third agent corresponding to the intent recognition result is used to extract the business parameters from the user input data. When the location parameter included in the business parameters is a geographical range, the port location within the geographical range is determined from the knowledge base of each special business function in the shipping business system according to the geographical range, and used as shipping knowledge data.
[0024] When the knowledge retrieval strategy is the third retrieval strategy, the user input data is preprocessed and the target words in the user input data are extracted; the target words are vectorized to obtain target vectors; knowledge vectors matching the target vectors are retrieved from the knowledge bases of other business functions in the shipping business system and used as shipping knowledge data.
[0025] Optionally, S3 specifically includes:
[0026] When the intent recognition result is the common business function and not a special business function, the shipping knowledge data, the user input data and the first prompt word are concatenated to obtain the first concatenated data, and the first concatenated data is input into the first intelligent agent, and the first intelligent agent generates a call execution plan.
[0027] When the intent recognition result is the common business function and the special business function, the business parameters in the user input data are determined, and a call execution plan is generated by using a pre-set generation algorithm based on the business parameters and the shipping knowledge data.
[0028] When the intent recognition result is the recognition failure result, the shipping knowledge data, the user input data, and the second prompt word are concatenated to obtain the second concatenated data, and the second concatenated data is input into the first intelligent agent, which generates a call execution plan.
[0029] Optionally, the call execution plan includes at least the name of the target business function interface and the input parameters of the target business function interface;
[0030] In step S4, according to the call execution plan, the target business function interface of the shipping business system is called, and the call result corresponding to the target business function interface is determined, specifically including:
[0031] Based on the target business function interface name in the call execution plan, retrieve the corresponding verification rule from the business database;
[0032] According to the verification rules, the input parameters of the target business function interface in the call execution plan are verified;
[0033] When the parameter verification passes, the target business function interface in the shipping business system is called according to the call execution plan, and the output parameters returned by the target business function interface are obtained.
[0034] Retrieve associated data corresponding to the target business function interface from the business database. The associated data includes at least the key points of the response and the explanation of the interface output parameters.
[0035] The output parameters and associated data are encapsulated in a fixed format, and the encapsulated result is used as the call result.
[0036] Optionally, step S4, based on the call result, employs a second intelligent agent to generate response data and displays it to the user, specifically including:
[0037] The second intelligent agent determines whether the output parameters in the call result are empty.
[0038] If so, the preset reply script will be used as the reply data and displayed to the user;
[0039] If not, the second intelligent agent loads the reply prompt word and concatenates the call result with the reply prompt word; the concatenated result is used as the input of the AI large model in the second intelligent agent, and the AI large model in the second intelligent agent generates reply data in a streaming output mode, and the generated reply data is displayed to the user in real time.
[0040] Optionally, in step S4, based on the call result, a second intelligent agent is used to generate response data, specifically including:
[0041] When the output parameters in the call result are not empty, the second intelligent agent loads the response prompt and the business constraint prompt.
[0042] The call result, the response prompt, and the business constraint prompt are concatenated;
[0043] The concatenated result is used as input to the AI big model in the second intelligent agent, and the response data is generated through the AI big model in the second intelligent agent.
[0044] Optionally, in step S4, according to the call execution plan, the target business function interface of the shipping business system is called, and the call result corresponding to the target business function interface is determined, specifically including:
[0045] According to the call execution plan, the target business function interface in the shipping business system is called, and the output parameters returned by the target business function interface are obtained.
[0046] When the target business function interface is an interface corresponding to a special business function, the output parameters are sorted according to a preset sorting rule to obtain a structured list;
[0047] When there are filtering conditions in the user input data, the parameters in the structured list are filtered according to the filtering conditions;
[0048] Retrieve associated data corresponding to the target business function interface from the business database. The associated data includes at least the key points of the response and the explanation of the interface output parameters.
[0049] The filtered parameters and the associated data are encapsulated in a fixed format, and the encapsulated result is used as the call result.
[0050] Optionally, obtaining multimodal user input and parsing it into user input data in step S1 specifically includes:
[0051] When the user selects natural language input as the input method, the natural language input by the user is obtained and used as the user input data;
[0052] When the user selects voice input as the input method, the voice input by the user through the voice input device is acquired, and the voice is converted into text through a voice recognition model and used as the user input data;
[0053] When the user selects file upload and natural language input as the input method, the uploaded file and the input natural language are obtained. The file is parsed using a file parsing model to obtain the parsed structured business data. The structured business data and the natural language are then used as the user input data.
[0054] This specification provides an intelligent interactive system based on an AI large-scale model and a shipping business system. The system includes a front-end and a back-end. The back-end includes an intent recognition module, a knowledge retrieval module, a plan generation module, a plan execution module, and a response generation module; wherein:
[0055] The intent recognition module is used to construct frequently used business function prompts based on business function keywords that are frequently used by users in the shipping business system, receive multimodal user input sent by the front end and parse it into user input data, input the user input data and the frequently used business function prompts into the AI big model, and output the user's intent recognition result; the intent recognition result is the business function that the user intends to handle or the recognition failure result;
[0056] The knowledge base retrieval module is used to select a matching shipping knowledge retrieval strategy based on the intent recognition result, and retrieve shipping knowledge data in the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy.
[0057] The plan generation module is used to select the corresponding first intelligent agent or a pre-set generation algorithm to generate a call execution plan based on the shipping knowledge data, the user input data and the intent recognition result;
[0058] The plan execution module is used to call the target business function interface in the shipping business system according to the call execution plan, and determine the call result corresponding to the target business function interface.
[0059] The response generation module is used to generate response data using a second intelligent agent based on the call result, and then display the response data to the user through the front end.
[0060] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0061] This specification provides an intelligent interaction method based on an AI big data model and a shipping business system. It constructs frequently used business function prompts based on keywords frequently used by users in the shipping business system, acquires and parses multimodal user input into user input data, and inputs this data along with the frequently used prompts into the AI big data model, outputting the user's intent recognition result. The intent recognition result represents the business function the user intends to perform or indicates a failure to recognize the function. Through the AI big data model, guided by the frequently used prompts, it achieves accurate matching between user input data and business functions in the shipping business system, avoiding the need for users to manually adapt to the system's interaction logic. Based on the intent recognition result, a matching shipping knowledge retrieval strategy is selected, and shipping knowledge data is retrieved from the knowledge bases corresponding to each business function in the shipping business system. This retrieval of shipping knowledge data from the knowledge bases corresponding to each business function provides the AI big data model with professional shipping expertise, enhancing its adaptability to the shipping field and strengthening its understanding and application of shipping expertise, thereby improving the accuracy of the subsequently generated call execution plan.
[0062] Subsequently, based on shipping knowledge data, user input data, and intent recognition results, a corresponding first intelligent agent or a pre-set generation algorithm is selected to generate a call execution plan. According to the call execution plan, the target business function interface in the shipping business system is invoked, and the corresponding call result is determined. This achieves automated linkage between user input data and the business function interface in the shipping business system. That is, after understanding the user's needs, the corresponding business function interface in the shipping business system is directly invoked to complete the business processing, without requiring the user to manually navigate to the corresponding business function module. Based on the call result, a second intelligent agent generates response data and displays it to the user. This allows users to initiate business requests without needing to be familiar with the hierarchical structure or operational logic of the shipping business system. Users only need to input data, and the AI model automatically completes intent recognition and generates a call execution plan, reducing user learning costs and enabling users (especially non-professional users) to quickly get started. This shortens the operation path, lowers the barrier to entry for non-professional users, and solves the problems of low efficiency and even operational errors caused by lengthy operation paths and complex options.
[0063] The shipping business system in this invention includes various types of business functions, which can be divided into two main categories based on user frequency: frequently used business functions and other business functions. Among the frequently used business functions, there are also special business functions. Therefore, the above intent recognition results can be either frequently used business functions (or special business functions) or recognition failure results. Different intent recognition results correspond to different shipping knowledge retrieval strategies, namely the first retrieval strategy, the second retrieval strategy, and the third retrieval strategy. Each shipping knowledge retrieval strategy has a corresponding processing procedure, which not only meets the user's demand for rapid response to high-frequency needs, but also speeds up the retrieval of knowledge data.
[0064] In this invention, different intent recognition results correspond to different methods for generating call execution plans, adapting to the call requirements of different business functions, accelerating the generation of call execution plans, and improving the accuracy of the generated call execution plans. Specifically, when the intent recognition result is a common business function and not a special business function, shipping knowledge data, user input data, and a first prompt word can be concatenated to obtain first concatenated data, and a call execution plan can be generated by a first intelligent agent based on the first concatenated data. When the intent recognition result is a common business function and a special business function, a call execution plan can be generated using a pre-set generation algorithm based on the business parameters in the user input data and shipping knowledge data. When the intent recognition result is a recognition failure result, shipping knowledge data, user input data, and a second prompt word are concatenated to obtain second concatenated data, and a call execution plan can be generated by a first intelligent agent based on the second concatenated data.
[0065] In this invention, when invoking a target business function interface in a shipping business system according to the invocation execution plan and determining the invocation result corresponding to the target business function interface, the input parameters of the target business function interface can first be validated based on the validation rules included in the invocation execution plan to ensure the accuracy of the interface input parameters. Furthermore, to ensure the accuracy of the subsequently generated response data, relevant data such as the response key points and structural output parameter explanations corresponding to the target business function interface can be obtained, and the relevant data and output parameters can be encapsulated and used as the invocation result.
[0066] In this invention, when generating response data, it can first determine whether the output parameter in the call result is empty. If so, the preset response script is used as the response data, eliminating the need to call the second intelligent agent to generate response data and saving computing resources. If not, the second intelligent agent loads the response prompt, and the call result is concatenated with the response prompt. The concatenated result is used as the input to the AI model in the second intelligent agent. The AI model in the second intelligent agent generates response data using a streaming output method. With the prompt, the AI model generates response data based on the call result, improving the accuracy of the generated response data. Furthermore, the generated response data can be displayed to the user in real time, achieving a streaming effect of generation and display, avoiding the need for the user to wait for a complete answer.
[0067] In addition, when generating response data, business constraint prompts can be loaded, and the AI big model generates response data based on the call results under the prompts of the response prompts and business constraint prompts. This ensures that the response data output by the AI big model revolves only around the shipping business scenario, avoids generating redundant content that is detached from the business, and also ensures that the interactive content complies with the shipping business scenario and safety specifications.
[0068] In this invention, when the target business function interface corresponds to a specific business function, the output parameters can be sorted according to a preset sorting rule to obtain a structured list. When there are filtering conditions in the user input data, the parameters in the structured list are filtered according to the filtering conditions. The associated data corresponding to the target business function interface is obtained from the business database. The filtered parameters and associated data are encapsulated in a fixed format, and the encapsulated result is used as the call result to avoid the AI large model missing key information and ensure the accuracy of the subsequently generated response data.
[0069] This invention provides users with multiple input methods, namely natural language input, voice input, and file upload, breaking through the existing single interaction mode of "text and mouse clicks." Users can not only directly input natural language requests but also initiate business requests via voice, adapting to "non-text input" scenarios and expanding user usage scenarios. Furthermore, users can initiate business requests through file uploads and natural language input, supporting the parsing and business linkage of various types of shipping documents (such as booking authorization forms and bills of lading). That is, after users upload files, the process of file parsing, intent recognition, execution plan generation, and business processing can be automated, solving the pain point of manually entering large amounts of document information, and is especially suitable for users who frequently use documents.
[0070] This specification provides an intelligent interaction system based on an AI big data model and a shipping business system. The system includes a front-end and a back-end. The back-end includes an intent recognition module, a knowledge retrieval module, a plan generation module, a plan execution module, and a response generation module. The intent recognition module constructs frequently used business function prompts based on keywords frequently used by users in the shipping business system. It receives multimodal user input from the front-end, parses it into user input data, inputs the user input data and frequently used business function prompts into the AI big data model, and outputs the user's intent recognition result. The knowledge retrieval module selects a matching shipping knowledge retrieval strategy based on the intent recognition result and retrieves shipping knowledge data from the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy. The plan generation module generates a call execution plan based on the shipping knowledge data, user input data, and intent recognition result, selecting the corresponding first intelligent agent or a pre-set generation algorithm. The plan execution module calls the target business function interface in the shipping business system according to the call execution plan and determines the call result corresponding to the target business function interface. The response generation module is used to generate response data based on the call result using a second intelligent agent, and then display it to the user through the front end. This allows users to initiate business requests without needing to be familiar with the hierarchical structure or operational logic of the shipping business system. Users only need to input data, and the AI big data model automatically completes intent recognition and generates a call execution plan, reducing the user's learning cost and enabling users (especially non-professional users) to get started quickly. This shortens the operation path, lowers the usage threshold for non-professional users, and solves the problem of low efficiency and even operational errors caused by lengthy operation paths and complex options. Attached Figure Description
[0071] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0072] Figure 1 This is a flowchart illustrating an intelligent interaction method based on an AI large model and a shipping business system provided in this specification.
[0073] Figure 2 This document provides a flowchart of a business operation based on intelligent interaction between an AI large model and a shipping business system.
[0074] Figure 3 This document provides a detailed flowchart of an intelligent interaction between an AI-based large model and a shipping business system.
[0075] Figure 4This is a schematic diagram of the structure of an intelligent interactive system based on an AI large model and a shipping business system, as provided in this specification.
[0076] Figure 5 This is a schematic diagram of another intelligent interactive system based on an AI large model and shipping business system provided in this specification. Detailed Implementation
[0077] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0078] This specification provides an intelligent interaction method and system based on AI large model and shipping business system. The technical solutions provided by the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0079] Figure 1 This document presents a flowchart illustrating an intelligent interaction method based on an AI large-scale model and a shipping business system, which includes the following steps:
[0080] S1: Data Acquisition and Intent Recognition: Based on frequently used business function keywords in the shipping business system, construct common business function prompt words, acquire multimodal user input and parse it into user input data, input the user input data and the common business function prompt words into the AI big model, and output the user's intent recognition result; the intent recognition result is the business function that the user intends to handle or the recognition failure result.
[0081] In this specification, the device used for intelligent interaction can first perform data acquisition and intent recognition. Specifically, it constructs frequently used business function prompts based on keywords frequently used by users in the shipping business system, acquires and parses multimodal user input into user input data, inputs the user input data and frequently used business function prompts into an AI model, and outputs the user's intent recognition results. The device used for intelligent interaction can be a server, a system or one or more modules within a system, or an electronic device such as a desktop computer or laptop. For ease of description, the following explanation focuses on a server as the execution entity, illustrating one intelligent interaction method based on an AI model and a shipping business system provided in this specification.
[0082] The user input mentioned above can be multimodal, meaning it can be obtained through multiple input methods. The user input data is data parsed from the user input. These input methods include natural language input, voice input, and file upload. Specifically, when acquiring and parsing multimodal user input, if the user selects natural language input, the server can acquire the natural language input and use it as user input data. If the user selects voice input, the server acquires the voice input from the voice input device, converts the voice into text using a speech recognition model, and uses it as user input data. If the user selects file upload or natural language input, the server acquires the uploaded file and the input natural language, parses the file using a file parsing model to obtain structured business data, and uses this structured business data and natural language as user input data.
[0083] The natural language input mentioned above can be implemented through a text input box. Users can enter natural language information into the text input box, and the server can retrieve the natural language from the text input box and use it as user input data. For example, a user can enter "Query booking products from the three northern ports to Los Angeles" into the text input box. The voice input mentioned above can be implemented through a voice input button and a voice input device. Users can click the voice input button and use a voice input device to input voice information. The server can retrieve the voice input input through the voice input device, which can be a microphone, or other voice input devices; this specification does not specify any particular device. For example, a user can select and click the voice input button. After clicking, the user needs to authorize the use of the microphone. After authorization, the user can use the microphone for voice input. The file upload mentioned above can be implemented through a file upload button. Users can click the file upload button and upload a file. The server can retrieve the uploaded file, which can be a shipping-related text, such as a booking authorization form.
[0084] The aforementioned speech recognition model can be any existing model, or a model fine-tuned from an existing one. During fine-tuning, an existing speech recognition model can be trained using a shipping-related hot word database to ensure the trained model is suitable for the shipping industry and improves the accuracy of speech-to-text conversion. Alternatively, the speech recognition model can be from the open-source Funasr toolkit, which integrates multiple advanced speech recognition models. During fine-tuning, hot words from the shipping-related hot word database can be obtained and used as speech annotations. The corresponding speech data for each hot word is then identified and used as speech samples. These speech samples are then input into the speech recognition model to determine the conversion result. Based on the conversion result and the speech annotations, a pre-set speech conversion loss function is used to calculate the speech conversion loss. The speech recognition model is then fine-tuned based on this loss to obtain the trained model. The aforementioned speech conversion loss function is a pre-set supervised loss function, which can be the cross-entropy loss function, or other loss functions; this specification does not impose specific limitations. In addition, when fine-tuning the speech recognition model, other shipping voice data and corresponding labeled text can also be used to fine-tune the speech recognition model. The specific fine-tuning process is similar to the process of fine-tuning the speech recognition model based on voice samples and voice labels, so it will not be described again here.
[0085] The aforementioned document parsing model is a collection of models or tools integrating multiple functional types to achieve collaborative parsing of user-uploaded files. Specifically, it can integrate models or tools such as pp_structure, Vision-Language Model (VLM), and large-scale visual language models (e.g., Qwen-VL). This description does not specify the exact models or tools included, as long as they support parsing shipping business documents (such as booking confirmations and scanned bills of lading) in formats such as PDF, images, Excel, TXT, and Word. The pp_structure mentioned above is a deep learning-based intelligent document analysis toolkit, primarily used to automatically extract structured information from PDFs, scanned images, or ordinary images. Specifically, the pp_structure in the document parsing model can extract tabular data (such as "shipper's name" and "cargo weight") from user-uploaded files, while VLM or Qwen-VL can identify unstructured text (such as "special transportation requirements") in the user-uploaded files, ultimately integrating them into structured business data to achieve integrated business processing of "file upload + natural language requirements," reducing manual input by the user.
[0086] The aforementioned shipping business system, i.e., the shipping service website, provides various business functions to realize online processing of core businesses such as freight rate inquiry, space booking, cargo tracking, and document processing. This system includes business functions of various business types (attributes), namely all menus of the shipping service website (such as freight rate inquiry, space booking, logistics tracking, document processing, etc.) and their corresponding functions. Furthermore, it can be divided into two levels of business functions based on user frequency (or number of times users use the service): frequently used business functions and other business functions. Therefore, the aforementioned shipping business system includes various frequently used business functions and various other business functions, which are categorized according to user frequency. A business function with a high user frequency is classified as a frequently used business function; conversely, a business function with a low user frequency, or a business function other than a frequently used business function, is classified as an other business function. Specifically, the server can classify business functions whose user frequency reaches a preset threshold as frequently used business functions and those whose user frequency does not reach the preset threshold as other business functions. The commonly used business functions mentioned above may include services such as shipping schedule inquiry, product inquiry, and basic freight rate inquiry, while other business functions may include services such as demurrage calculation, customs declaration modification, and special cargo transportation consultation.
[0087] In addition, some of the commonly used business functions mentioned above can be set as special business functions. That is, there are business functions in the shipping business system that are both common and special business functions. These special business functions could be schedule queries and product queries. It should be noted that the common, special, and other business functions shown above are merely examples.
[0088] The aforementioned frequently used business function prompts can be constructed based on keywords of business functions frequently used by users in the shipping business system. Specifically, they can include an intent recognition task description and keywords of all frequently used business functions included in the shipping business system. These keywords can include the names, identifiers, or pre-set words corresponding to the frequently used business functions (i.e., business functions frequently used by users in the shipping business system). The intent recognition task description describes the intent recognition task, such as "From the various frequently used business functions included in the shipping business system, identify the frequently used business functions that match the user's input data; if no matching frequently used business function is identified, output 'recognition failed'." Of course, to ensure that the subsequent large-scale AI model can accurately identify the frequently used business functions matched by the user input data, the aforementioned frequently used business function prompts may also include intent recognition rules and intent recognition examples. These intent recognition rules can be pre-set rules used to characterize the matching method between input data and frequently used business functions. Specifically, they may include keyword matching methods, i.e., for each frequently used business function, determining whether the input data contains the keyword corresponding to that frequently used business function. If it does, the input data matches that frequently used business function; if it does not, the input data does not match that frequently used business function. Each frequently used business function has pre-set keywords. Of course, the aforementioned intent recognition rules may also include other pre-set rules; this specification does not specifically limit what rules are included. Intent recognition examples may be examples of multiple pre-set matching pairs, where each matching pair is a matched frequently used business function and input data.
[0089] The aforementioned large-scale AI model can be a general-purpose large-scale language model, or a large-scale language model trained by fine-tuning a general-purpose large-scale language model. The model parameters of this large-scale language model range from billions to trillions. This large-scale AI model can be used for intent recognition. Intent recognition involves identifying the user's input data to determine if there is a matching frequently used business function. If so, the matching frequently used business function is output; otherwise, recognition failure is output. Therefore, the intent recognition result is either the business function the user intends to perform (i.e., a frequently used business function) or a recognition failure result. The input to the aforementioned large-scale AI model can include user input data and frequently used business function prompts, and the output can include the intent recognition result.
[0090] S2: Knowledge Base Retrieval: Based on the intent recognition result, select a matching shipping knowledge retrieval strategy, and retrieve shipping knowledge data from the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy.
[0091] In this specification, the server can perform knowledge base retrieval, that is, select a matching shipping knowledge retrieval strategy based on the intent recognition result, and retrieve shipping knowledge data from the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy. The aforementioned shipping knowledge retrieval strategy is determined based on the intent recognition result; different intent recognition results correspond to different shipping knowledge retrieval strategies. The aforementioned shipping knowledge retrieval strategy is one of a first retrieval strategy, a second retrieval strategy, and a third retrieval strategy. Specifically, when selecting a matching shipping knowledge retrieval strategy based on the intent recognition result, if the intent recognition result is any commonly used business function in the shipping business system and not a special business function, the first retrieval strategy can be selected as the shipping knowledge retrieval strategy matching the intent recognition result. If the intent recognition result is any commonly used business function in the shipping business system and is a special business function, the second retrieval strategy can be selected as the shipping knowledge retrieval strategy matching the intent recognition result. When the intent recognition result is a failure, it indicates that the business function corresponding to the user's input data is not a commonly used business function, but may be another business function. Therefore, the third retrieval strategy is selected as the shipping knowledge retrieval strategy for matching the intent recognition result. The first, second, and third retrieval strategies mentioned above can be pre-set shipping knowledge retrieval strategies, and the correspondence (or matching relationship) between each intent recognition result and the shipping knowledge retrieval strategy can be pre-set.
[0092] Each business function in the aforementioned shipping business system can have a corresponding knowledge base. Each business function's knowledge base is pre-built and may include business function descriptions, interface parameters, operating rules, and definitions of professional terms. When a business function is a common business function and not a special business function, the knowledge base corresponding to that common business function can be directly constructed based on the first knowledge base file uploaded by the operator. Specifically, during construction, the server can obtain the first knowledge base file corresponding to each common business function uploaded by the operator, and use a parsing tool to parse the content of the first knowledge base file to extract the first structured knowledge. Based on the extracted first structured knowledge, the knowledge base corresponding to that common business function is constructed. This first knowledge base file is a knowledge file uploaded by the operator related to the common business function, such as a file that may include common business function descriptions, interface parameter descriptions, and common business function constraints. The specific content of the file is not specifically limited in this specification. The parsing tool can be any existing tool for file parsing, such as the deepDoc tool. The first structured knowledge may include interface parameter descriptions and common business function descriptions corresponding to the common business function.
[0093] When a business function is both a common and a special business function, the knowledge base corresponding to that special business function can be a regional mapping knowledge base. This regional mapping knowledge base can be pre-set and includes the locations of ports within each regional area. It should be noted that each special business function corresponds to the same knowledge base. When constructing the knowledge base for all special business functions, the regional mapping information uploaded by operators is obtained, and the regional mapping knowledge base is constructed based on this information, serving as the knowledge base for all special business functions. This regional mapping information includes the pre-set correspondence between regional areas and port locations, that is, the port locations within each regional area.
[0094] When the business function is another business function, the knowledge base for that other business function can also be constructed based on the second knowledge base file uploaded by the operator. However, the knowledge base for that other business function is a vector knowledge base. It should be noted that each other business function included in the above shipping business system can have its own corresponding knowledge base, or all other business functions can have the same knowledge base, meaning all other business functions correspond to one knowledge base. Taking the example of all other business functions corresponding to one knowledge base, during the specific construction, the server can obtain the second knowledge base file corresponding to all other business functions uploaded by the operator, and use a parsing tool to parse the content of the second knowledge base file to extract the second structured knowledge from the second knowledge base file. Then, the extracted second structured knowledge is vectorized through an embedding model to obtain knowledge vectors, which are then stored in a vector database and used as the knowledge base for all other business functions. The aforementioned vector database (i.e., the vector knowledge base) can be the Milvus vector library. The second knowledge base file is a knowledge file related to other business functions uploaded by the operator, such as a file that may include descriptions of other business functions, interface parameter descriptions, constraints of other business functions, etc. This specification does not specifically limit what kind of content the file should include. The parsing tool can be any existing file parsing tool, such as deepDoc. This tool can be deployed within the RAGFlow system. The aforementioned second knowledge base file can be uploaded to the RAGFlow system by users, and the parsing tool within the RAGFlow system will parse the uploaded second knowledge base file and store it in a vector database, which can also be deployed within the RAGFlow system. This second structured knowledge may include interface parameter descriptions corresponding to other business functions, descriptions of other business functions, and other similar knowledge.
[0095] The aforementioned embedding model can be any existing model for structured data vectorization, and can also be a pre-trained structured data vectorization model; this specification does not impose specific limitations. Taking the aforementioned structured data vectorization model as a pre-trained model as an example, when pre-training the structured data vectorization model, data samples can be obtained first. These data samples can be structured data, and the corresponding vector labels for these data samples can be determined, i.e., the vectors corresponding to the data samples. The data samples are input into the structured data vectorization model to obtain the output vector. Based on the output vector and vector labels, a pre-set data vectorization loss function is used to calculate the data vectorization loss. Based on the data vectorization loss, the structured data vectorization model is trained. The aforementioned data vectorization loss function can be a pre-set loss function, specifically the cross-entropy loss function, or any other existing supervised loss function; this specification does not impose specific limitations.
[0096] Based on this, in step S2 above, when retrieving shipping knowledge data from the knowledge bases corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy, if the shipping knowledge retrieval strategy is the first retrieval strategy, the commonly used business function corresponding to the intent recognition result is taken as the first business function. The knowledge base corresponding to the first business function is retrieved from the knowledge bases of each commonly used business function in the shipping business system, and the content in the retrieved knowledge base is used as the shipping knowledge data. Each commonly used business function has a corresponding knowledge base; therefore, the server can directly determine the knowledge base corresponding to the first business function from the knowledge bases of each commonly used business function in the shipping business system, and the shipping knowledge data is directly the content in the knowledge base corresponding to the first business function.
[0097] When the shipping knowledge retrieval strategy is the second retrieval strategy, a third agent corresponding to the intent recognition result is used to extract business parameters from the user input data. When the location parameter included in the business parameters is a geographical range, the port location within the geographical range is determined from the knowledge base of each special business function in the shipping business system based on the geographical range, and used as shipping knowledge data. The intent recognition results mentioned above refer not only to common business functions but also to special business functions. Each special business function has a corresponding third agent: a shipping agent (shipmentAgent) for shipping schedule queries and a product agent (productAgent) for product queries. Both the shipping agent and the product agent are pre-built. The shipping agent is used to extract business parameters from user input data when the special business function is a shipping schedule query, and the product agent is used to extract business parameters from user input data when the special business function is a product query. Both the shipping agent and the product agent have deployed large AI models. The extraction of business parameters by the shipping agent and the product agent is achieved through the deployed large AI models. It should be noted that the large AI models deployed in the shipping agent and the product agent are the same, and this large AI model is the same as the large AI model used for intent recognition in S1 above. Of course, they can also be different large AI models, that is, separate large AI models can be trained for intent recognition and to extract business parameters for different special business functions. The aforementioned business parameters may include location parameters (origin and destination), time parameters (point in time or time range), and container type parameters, where container type refers to the type of container. The location parameters can be specific locations or geographical areas, such as "shipment schedules (or products) from the three northern ports to the East Coast of the United States," where "the three northern ports" in the extracted location parameters represent a geographical area. The knowledge base for each of these special business functions is actually a geographical mapping knowledge base. The server can find the corresponding location (i.e., port location) from the geographical mapping knowledge base based on the geographical area. For example, the port locations within the geographical area of "the three northern ports" actually refer to the ports of Qingdao, Dalian, and Xingang.
[0098] However, when the knowledge retrieval strategy is the third retrieval strategy, the user input data is preprocessed and target words are extracted from the user input data. The target words are vectorized to obtain target vectors. Knowledge vectors matching the target vectors are retrieved from the knowledge bases of other business functions in the shipping business system and used as shipping knowledge data. The above-mentioned preprocessing of user input data may include processing special characters (such as removing newline characters and special symbols), removing irrelevant words (such as words without business meaning such as "please help me" and "trouble"), word segmentation, etc., which can be implemented through pre-set algorithms or models. After obtaining the preprocessed data (i.e., the words obtained after word segmentation), the target words can be extracted from the preprocessed data through a pre-set extraction algorithm or model. The target words can be pre-set and may include "demurrage fee", "customs declaration document number", or other set target words. This specification does not specifically limit the specific target words included. Of course, a pre-set calculation algorithm or model can also be used to calculate the word weight corresponding to each word in the preprocessed data, and words whose word weight reaches a preset weight threshold are used as target words. When vectorizing target words, a text vectorization model or algorithm can be used. This text vectorization model can be a pre-trained model or an existing model; this specification does not impose specific limitations. Taking a pre-trained model as an example, when pre-training the text vectorization model, text samples can be obtained first, and the corresponding sample labels (i.e., the vectors corresponding to the text samples) can be determined. The text samples are input into the text vectorization model to obtain text vectors. Based on the text vectors and sample labels, a pre-set text vectorization loss function is used to calculate the text vectorization loss. The text vectorization model is then trained based on the text vectorization loss. The text vectorization loss function can be a pre-set loss function, specifically a cross-entropy loss function, or any other existing supervised loss function; this specification does not impose specific limitations.
[0099] The knowledge base for each of the aforementioned other business functions is a vector knowledge base. This vector knowledge base includes multiple knowledge vectors, each knowledge vector corresponding to one other business function, and each other business function corresponding to at least one knowledge vector. During retrieval, the server can calculate the distance between each knowledge vector in the knowledge base of each other business function in the shipping business system and the target vector. If the distance is less than a preset distance threshold, the knowledge vector is determined to match the target vector, and the knowledge vector is used as shipping knowledge data. Additionally, the server can sort each knowledge vector according to the distance between each knowledge vector and the target vector, in descending order of distance, to obtain a knowledge sequence. Then, based on the knowledge sequence, each knowledge vector is filtered to obtain the knowledge vector that matches the target vector, which is then used as shipping knowledge data. During the filtering process, a specified number of knowledge vectors can be determined as shipping knowledge data according to the order of the knowledge sequence, or knowledge vectors in the knowledge sequence whose distance reaches a preset distance threshold can be determined as shipping knowledge data. This specification does not specifically limit the particular filtering method used.
[0100] S3: Call plan generation: Based on the shipping knowledge data, the user input data and the intent recognition result, select the corresponding first intelligent agent or a pre-set generation algorithm to generate a call execution plan.
[0101] In this specification, the server can generate a call plan, that is, based on shipping knowledge data, user input data, and intent recognition results, it selects the corresponding first intelligent agent or a pre-set generation algorithm to generate a call execution plan. The data format of the aforementioned call execution plan is JSON, and it includes at least the target business function interface name and the input parameters of the target business function interface. It may also include parameter data types and the interface call order (if multiple target business function interfaces need to be linked). The call execution plan generation method differs depending on the intent recognition result. Specifically, when the intent recognition result is a common business function and not a special business function, the shipping knowledge data, user input data, and the first prompt word are concatenated to obtain the first concatenated data, which is then input into the first intelligent agent to generate the call execution plan. When the intent recognition result is a common business function and not a special business function, the business parameters in the user input data are determined, and based on the business parameters and shipping knowledge data, a pre-set generation algorithm is used to generate the call execution plan. When the intent recognition result is a recognition failure, the shipping knowledge data, user input data, and second prompt words are concatenated to obtain the second concatenated data, which is then input into the first intelligent agent to generate a call execution plan.
[0102] The first and second prompt words mentioned above are both preset, but can be manually set. Both the first and second prompt words include general task requirements, which may be:
[0103] Strict adherence to the knowledge base content (i.e., shipping knowledge data) is required, especially for key information such as business ID (si) and interface ID (mi) that are mapped to the execution code. Fixed values from the knowledge base must be directly reused and cannot be generated in a custom manner to avoid errors.
[0104] It supports understanding user questions in context and can supplement missing parameters (such as order number, ship number, etc.) for the current question by asking previous questions.
[0105] It has the ability to break down problems. If the user input data contains multiple business requirements (such as querying arrival time, arrival notification, and free container days at the same time), it needs to be broken down into multiple sub-problems and then generate multiple execution steps.
[0106] Pay attention to the processing of input parameters. Based on the requirements and knowledge base description, identify the type of parameters entered by the user (such as booking number, bill of lading number, vessel name, etc.). There should be clear field filling rules for cases that do not meet the interface input parameter requirements (such as filling in empty strings, "please enter", or default values).
[0107] All outputs are required to be in JSON format. The core consists of two main modules: "User Questions" and "Step Parsing Set (pl)," ensuring that the output structure is consistent and can be parsed by the server.
[0108] The first prompt above includes not only the general task requirements but also prompt data such as role description, task processing requirements, JSON format constraints, JSON field descriptions, precautions, and input descriptions. The role description could be: "You are a JSON processing expert who needs to process existing content strictly according to the knowledge base. You need the following abilities, and the required task requirements are as follows:". Task processing requirements include processing requirements for various input scenarios. These scenarios can include three situations: the user's question (user input data) is not identified as having the true intent; the user's question lacks important parameters; and the user's question is very clear. Other input scenarios are also possible, but this specification does not specify them. Each input scenario has corresponding processing requirements. For example, taking the input scenario where the user's question is very clear, the processing requirements for this scenario could be:
[0109] Once a user's question is very clear, it needs to be analyzed to see if it covers multiple knowledge functions. If so, it needs to be broken down and the corresponding knowledge base needs to be searched for an answer. If not, then the current question can be directly analyzed and the knowledge base searched for an answer.
[0110] The above JSON format constraints require that the output must be a JSON object, and also restrict the fields included in the JSON, namely "q", "pl", "si", "sl", "mi", "ip", "tp", "v", "step", etc. The JSON field descriptions are used to describe the meaning of the JSON fields and provide examples, which can be as follows:
[0111] -**q**: q represents the question input by the user (user input data). If there is historical context, you need to determine whether there is a relationship between the current question and the user's previous questions. If there is a relationship, you need to supplement (rewrite) the current question based on the historical context.
[0112] -**pl**: This is an array of objects. If there are multiple tracking numbers, container numbers, or vessel numbers, multiple pl objects should be generated and ultimately displayed as an array of objects. However, if the user's question includes five types of questions: control tower, cut-off, import fee invoicing and payment, export fee invoicing and payment, and payment status query, there is no need to split them. Instead, only a single object is displayed in this array, and these multiple tracking numbers, container numbers, and vessel numbers are separated by commas. (**Example**: "Export fees for tracking numbers 1234567890, 0123456789." -> These are all placed in the same pl and the same IP, and then displayed as "1234567890, 0123456789").
[0113] -**si**: The value of "Business ID" in the knowledge base;
[0114] -**sl**: A format array for the possible steps involved in the problem;
[0115] -**mi**: The value of "interface id" in the knowledge base;
[0116] -**ip**: An array containing the input parameter fields retrieved from the knowledge base based on the interface ID;
[0117] -**tp**: Generates tp based on user input and the `input parameters` part of the knowledge base;
[0118] -**v**: Parameter values extracted based on user input. If the user does not provide a value, the default value is used; otherwise, "Please enter" is filled in. If the user asks for "transfer to human agent", and the user's history includes two or more transfer requests to human agent, the relevant fields are filled with an empty string "'".
[0119] **Note: When generating "ip", only generate "tp" and "v" corresponding to the user input parameters. Other "tp" values that are not user input but default values are not allowed to be generated.
[0120] - Output example: {output_json}.
[0121] The above precautions may be as follows:
[0122] - "ip" contains all the input parameters required by the query interface, and the values are generated according to the knowledge base requirements;
[0123] - If no user input (including context) is obtained for a required field, fill "v" with "Please enter";
[0124] - Please ensure the JSON format is correct when outputting!
[0125] The above input description includes fixed content and input slots. These input slots include a knowledge data slot, a file content slot, and a user input slot. The knowledge data slot is used to input shipping knowledge data, and the file content slot is used to input extracted structured knowledge. If the user's input method is not file upload or natural language input, the file content slot is empty, meaning no content is entered. The user input slot is used to input user input data. Additionally, the above input slots may also include a time slot and a historical user input slot. The time slot is used to input the current time, and the historical user input slot is used to input historical user input data. The fixed content is preset. Therefore, the above input description can be:
[0126] The following is the knowledge base:
[0127] {knowledge};
[0128] The above is the knowledge base. Note that the input parameter tp in the knowledge base must correspond to the content in the knowledge base.
[0129] The following is the file content: {file_text}. The input parameters in the IP address can be extracted from this file. If the file content contains multiple booking numbers / bill of lading numbers / container numbers, then only 5 booking numbers / bill of lading numbers / container numbers need to be retrieved.
[0130] Current time: {current_date};
[0131] User input question: {user_input}, user history questions: {user_history}. It is necessary to pay attention to whether there is a relationship between user questions and history questions. If so, q should be rewritten.
[0132] The above "{knowledge}" is the knowledge data slot, "{file_text}" is the file content slot, "{user_input}" is the user input slot, "{current_date}" is the time slot, and "{user_history}" is the historical user input slot.
[0133] The second prompt word mentioned above includes not only the general task requirements but also prompt data such as role description, task processing rules, limited problem decomposition principles, user input parameter type identification rules, specific function processing rules, JSON format constraints, JSON field descriptions, supplementary explanations of key rules, problem extraction and display, precautions, and input descriptions. Although the second prompt word and the first prompt word have the same type of prompt data, the specific data content is different. Taking the role description as an example, the role description in the second prompt word could be: "Due to business requirements, a business expert proficient in shipping-related fields is needed. This person needs to strictly follow the existing content in the RAG knowledge base, and you are born from this need. The task rules you need to perform are as follows:" The above task processing rules include preset processing methods for various business situations, including but not limited to "non-shipping related business," "business not related to the knowledge base but related to shipping," and "abbreviations of information such as bill of lading number, booking number, or container number in user input data." This manual does not specifically limit which business situations correspond to which processing methods. Taking non-shipping related business as an example, the processing method corresponding to this business situation is:
[0134] This only recognizes shipping-related business. For non-shipping-related business, please reply in the following JSON format:
[0135] -**Requires strict JSON format constraints**
[0136] The JSON format contains three modules: the main question, the user-written data, and a fixed set of interfaces for the current question.
[0137] -**Main Question**: The key is "q", and the value is the question asked by the user;
[0138] Example: "Query Shanghai weather forecast", then "q": "Query Shanghai weather forecast";
[0139] -**Current problem fixed set**: The actual logic part, the logical order and acquisition method must be correct;
[0140] The collection object is "pl" (based on the knowledge base business ID; when decomposing questions involving different business IDs, each ID needs to be displayed separately), and contains the following fields:
[0141] -**qs**: Subproblems derived from the splitting process;
[0142] -**si**: Fixed interface ID is: none;
[0143] -The rest remains unchanged.
[0144] The above problem decomposition priority principle is used to characterize the decomposition principles and examples corresponding to the user input problem (user input data), specifically as follows:
[0145] To better understand user questions, refer to the 'Alias' field in the knowledge base. Break them down into one or more sub-questions based on the knowledge base dimension, with each sub-question corresponding to a specific knowledge base, and strictly follow the knowledge base content. If the question does not have a corresponding business ID in the knowledge base, search for the closest knowledge base by keyword; if still not found, process it according to non-knowledge base related business methods.
[0146] **Example:** A user asks, "When will my shipment 234234234 arrive at the port of discharge? Please provide me with an arrival notification and the free container days." This can be broken down into:
[0147] - "When will my shipment 234234234 arrive at the port of discharge?" This prompts a call to the cargo tracking knowledge base.
[0148] - "Provide me with an arrival notification," which calls the arrival notification knowledge base for processing;
[0149] - "Provide me with a free box day", which calls the free box day knowledge base for processing.
[0150] The above user input parameter type identification rules are used to characterize the identification methods and examples of user input parameter types, specifically as follows:
[0151] First, analyze the user input and search it against the "rules" in the "EB Parameter Classification Knowledge Base" to determine the input parameter type and add it to the user question. Then, understand and search for the knowledge required for the question. If the retrieved user input type is different from the input parameter type required for subsequent API calls, fill the "v" field of the "ip" object with quotation marks.
[0152] Example:
[0153] - A user asked about "demurrage for booking number 6789050987". By matching the question with the "EB Parameter Classification Knowledge Base", it was found that it matched the "10-digit number" rule, which corresponds to the booking number or bill of lading number. The question was then revised to "demurrage for booking number or bill of lading number 6789050987" before further understanding and answering.
[0154] The aforementioned specific function processing rules include processing rules corresponding to various specific functions, such as free container days, demurrage, manifest status query, customs manifest query, electronic consignment message query, import fee invoicing and payment query, container net weight query, vessel name query, and cargo tracking. This manual does not specifically limit which specific functions correspond to which processing rules. For example, the processing rules corresponding to the free container days function could be:
[0155] When the user enters a booking number, docRef is the 10-digit number entered by the user. If there are 4 English letters at the beginning, please remove them; docType is BN; docRefType is Booking No; docRef, docRefType, and docType must be generated.
[0156] When the user enters a bill of lading number, docRef is the 10-digit number entered by the user. If there are 4 English letters at the beginning, please remove them; docType is BM; docRefType is BL; docRef, docRefType, and docType must be generated.
[0157] When the user needs to query import requirements, then docType is BM; docRefType is BL; docRef, docRefType, and docType must be generated.
[0158] When the user needs to query an export requirement, then docType is BN; docRefType is Booking No; docRef, docRefType, and docType must be generated;
[0159] The default chargeType is DND. The user can select DND, DEM, or DET to fill the charge based on their input.
[0160] Box start time: When the user enters the box start time, the time format is converted to 'YYYY-MM-DD' and filled with previewDateFrom; Box end time: When the user enters the box end time, the time format is converted to 'YYYY-MM-DD' and filled with previewDateTo.
[0161] The specific content of the JSON format constraints and JSON field descriptions in the second prompt word is inconsistent with the specific content of the JSON format constraints and JSON field descriptions in the first prompt word. In addition to the fields shown above, it may also include "qc" (indicating that the extracted data needs to be filled into the special symbol "[]"), "ot" (indicating the operation type), "qs" (indicating the sub-problems that have been split off), etc.
[0162] The supplementary explanations for the above key rules include multi-problem decomposition logic, examples, and logical processing, which can be specifically as follows:
[0163] -**Multi-problem decomposition logic**: If a user's problem contains parallel actions (such as "query + recommendation"), causal relationships (such as "because A, therefore B"), or time sequence (such as "do X first, then do Y"), it needs to be decomposed into independent sub-problems;
[0164] Example: "When will my shipment 1234567890 arrive at the port of discharge? Please provide me with the arrival notification and the free container days," which is broken down into three sub-questions: "Cargo Tracking," "Arrival Notification," and "Free Container Days."
[0165] -**Logic Processing**: If a sub-problem requires multiple interface ID logic steps, the entire logic should be displayed in JSON format, and the backend should decide whether the user needs to make a selection.
[0166] The above issues can be summarized and presented as follows:
[0167] If the user does not explicitly want the information, but only mentions similar information or data, it is not necessary to display all fields of the output parameters in the knowledge base. Only some necessary fields need to be displayed (based on shipping knowledge and user thinking).
[0168] **Example:** A user asked about "free container days for 6789050987". The API ID: mxt1 has multiple parameter fields. Since the user did not specify their requirements, only the necessary fields need to be displayed, such as container number, container type, regular free container days, and special free container days.
[0169] It should be noted that the first and second prompt words mentioned above are merely examples, and this specification does not limit the specific content of the first and second prompt words. Both the first and second prompt words include multiple input slots, each used to fill in shipping knowledge data and user input data. Therefore, during the splicing process, the shipping knowledge data and user input data are filled into the corresponding input slots of the first or second prompt word to obtain the complete prompt word, i.e., the first spliced data or the second spliced data. The first intelligent agent mentioned above is pre-built and is used to generate a call execution plan based on the input data (i.e., the first spliced data and the second spliced data). The first intelligent body is equipped with a large AI model. The generation of the above-mentioned call execution plan is achieved through the deployed large AI model. It should be noted that the large AI model deployed in the first intelligent body can be the same as the third intelligent body such as the shipping schedule intelligent body and the product intelligent body, or the large AI model used for intent recognition in S1. Of course, it can also be different from the same large AI model, that is, the large AI models used for intent recognition, extraction of business parameters for different special business functions, and generation of call execution plans can be trained separately.
[0170] When determining the business parameters in the user input data, a third-party intelligent agent corresponding to the intent recognition result can be used to extract the business parameters from the user input data. The above generation algorithm is pre-written code. This generation algorithm is used to generate a call execution plan based on business parameters and shipping knowledge data, thereby reducing the output tokens of the large AI model and improving the response speed by nearly 50% compared to "generating JSON from Prompt".
[0171] S4: Response data generation: According to the call execution plan, call the target business function interface in the shipping business system, determine the call result corresponding to the target business function interface; based on the call result, use the second intelligent agent to generate response data and display it to the user.
[0172] In this specification, the server can generate response data, that is, according to the call execution plan, call the target business function interface in the shipping business system and determine the call result corresponding to the target business function interface. Based on the call result, a second intelligent agent generates response data and displays it to the user. The aforementioned target business function interface is the interface used to implement the target business function. This target business function interface can be determined according to the call execution plan, specifically based on the target business function interface name in the call execution plan. When determining the call result, the call execution plan can be parsed to determine the target business function interface name and input parameters. Based on the target business function interface name, the target business function interface in the shipping business system is called, and based on the input parameters, the output parameters of the target business function interface are determined. Based on the output parameters, the call result is determined. The call result can be directly the output parameters of the target business function interface.
[0173] The aforementioned second intelligent agent is pre-built and is used to generate response data based on the call result. This response data is the reply (answer) corresponding to the user's input data. An AI large-scale model is deployed within this second intelligent agent, and the generation of the aforementioned response data is achieved through this deployed AI large-scale model. It should be noted that the AI large-scale model deployed within this second intelligent agent can be the same as the aforementioned first intelligent agent, shipping schedule intelligent agent, product intelligent agent, or the AI large-scale model used for intent recognition in S1. Alternatively, they can be different AI large-scale models, trained separately for intent recognition, extracting business parameters for different special business functions, generating call execution plans, and generating response data. Therefore, when generating response data based on the call result using the second intelligent agent and displaying it to the user, the second intelligent agent can load response prompts and concatenate the call result with the response prompts. The concatenated result is used as the input to the AI large-scale model within the second intelligent agent. The AI large-scale model within the second intelligent agent then generates the response data using a streaming output method and displays the generated response data to the user in real time. The response prompt is pre-set and is used to prompt the AI model to generate response data based on the call result. Each business function has a corresponding response prompt. Therefore, when loading the response prompt, it is necessary to load the response prompt corresponding to the target business function interface. The response prompt for each business function is pre-set and may include information such as task description and output requirements. The task description could be "The AI model needs to generate response data based on the call result and meet the output requirements." The output requirements are pre-set requirements that the AI model's output must meet. The above-mentioned streaming output means that the response data output by the AI model is not generated and returned all at once, but is output gradually and continuously as the generation process progresses. The generated response data is also displayed to the user in real time, that is, it is generated and displayed simultaneously.
[0174] In some embodiments of this specification, to ensure the accuracy of the input parameters of the business function interface, validation rules can be used to validate the input parameters to check whether the input parameters are missing, whether missing parameters can be filled with default values, and whether the input parameter format is correct. Therefore, in the above-described S4, when calling the target business function interface in the shipping business system according to the call execution plan and determining the call result corresponding to the target business function interface, the server can retrieve the validation rules corresponding to the target business function interface from the business database based on the target business function interface name in the call execution plan. The input parameters of the target business function interface in the call execution plan are validated according to the validation rules. When the parameter validation passes, the target business function interface in the shipping business system is called according to the call execution plan, and the output parameters returned by the target business function interface are obtained. The aforementioned business database is pre-built and can be a MySQL database. The aforementioned validation rules may include determining whether the input parameters are missing, whether missing input parameters can be filled with default values, and whether the input parameter format is correct. The aforementioned output parameters are the parameters returned by the target business function interface after the input parameters are input into it.
[0175] Furthermore, to ensure the accuracy of the generated response data, the call result can include not only output parameters but also other data related to the target business function interface. Therefore, the associated data corresponding to the target business function interface can be obtained from the business database. The output parameters and associated data are then encapsulated according to a fixed format, and the encapsulated result is used as the call result. This associated data includes at least the response key points and the interface output parameter definitions. The response key points can be the necessary information required in generating the response corresponding to the target business function. For example, taking a shipping schedule query as the target business function, the response key points for this query could be "must include departure date, estimated arrival date, and port of call." The interface output parameter definitions are the meanings corresponding to the output parameters of the target business function interface, such as "ETA" meaning "estimated arrival time." Of course, the aforementioned associated data can also include business function page information, which may include page routing address, embedding permission parameters, embedding method parameters, page adaptation rules, etc. The aforementioned fixed format can be divided into columns according to data type, meaning each data type corresponds to one column. Data types may include output parameters, business function page information, response key points, and interface output parameter definitions, etc.
[0176] In some embodiments of this specification, to accelerate response generation, in step S4 above, when a second intelligent agent generates response data based on the call result and displays it to the user, the second intelligent agent can determine whether the output parameters in the call result are empty. If so, a preset response message is used as the response data and displayed to the user. If not, the second intelligent agent loads a response prompt and concatenates the call result with the response prompt. The concatenated result is used as input to the AI model in the second intelligent agent. The AI model in the second intelligent agent generates response data using a streaming output method and displays the generated response data to the user in real time. The preset response message is pre-set and can be something like "The output parameters of the target business function interface are empty, please re-enter," or other preset response messages, which are not specifically limited in this specification.
[0177] Furthermore, to ensure that the AI model outputs data relevant to the shipping business scenario and avoids deviations from the core business, thus reducing redundancy, sensitivity, and irrelevant content in the output response data, S4 above employs a second agent based on the call result. When generating response data, if the output parameters in the call result are not empty, the second agent loads response prompts and business constraint prompts, concatenates the call result, response prompts, and business constraint prompts, and uses the concatenated result as input to the AI model within the second agent. The AI model in the second agent then generates the response data. The aforementioned business constraint prompts are pre-set and are used to remind the AI model to focus on the shipping business scenario when generating response data, avoiding deviations from the core business and reducing redundancy, sensitivity, and irrelevant content in the output response data.
[0178] In some embodiments of this specification, when the target business function interface is an interface corresponding to a special business function, the output parameters returned by the target business function interface may include multiple sets of parameters. For example, the output parameters returned by the interface corresponding to the shipping schedule query may be multiple sets of shipping schedule data. For such output parameters, they can be sorted according to different dimensions and organized into a structured list to facilitate the generation of response data and user viewing. Based on this, in the above S4, when calling the target business function interface in the shipping business system according to the call execution plan and determining the call result corresponding to the target business function interface, the server can call the target business function interface in the shipping business system according to the call execution plan and obtain the output parameters returned by the target business function interface. When the target business function interface is an interface corresponding to a special business function, the output parameters are sorted according to a preset sorting rule to obtain a structured list. The preset sorting rule is pre-set and can be sorted according to a preset rule of preset dimensions. The preset dimensions can include any dimension such as departure time, arrival time, price, etc. The preset rules can include any rule such as departure time from early to late, arrival time from early to late, price from low to high, etc. This specification does not limit the specific sorting rule. The structured list above is a sequence of parameters obtained by sorting the output parameters according to a preset sorting rule.
[0179] Furthermore, since user input data may contain filtering conditions, to avoid ignoring these conditions when generating response data (e.g., "fastest arriving ship"), the parameters in the structured list can be filtered according to these conditions when they exist in the user input data. The associated data corresponding to the target business function interface is retrieved from the business database, and the filtered parameters and associated data are encapsulated in a fixed format. The encapsulated result is then used as the call result. Specifically, when determining whether filtering conditions exist in the user input data, a condition recognition model or algorithm can be used to identify the presence of filtering conditions. For example, using a condition recognition model, the server can input user input data into the model to determine the corresponding condition recognition result. This result is either a filtering condition (i.e., a filtering condition identified from the user input data) or a null value. When the condition recognition result is a filtering condition, the user input data is considered to contain filtering conditions; when the result is a null value, the user input data is considered to contain no filtering conditions. The conditional recognition model described above can be a pre-trained model. During training, training samples can be obtained first; these samples can be natural language. The corresponding conditional labels for each training sample are then determined, i.e., the filtering conditions or null values included in the training samples. The training samples are input into the conditional recognition model to obtain the conditional recognition results. Based on the conditional recognition results and conditional labels, a pre-set conditional recognition loss function is used to calculate the conditional recognition loss. The conditional recognition model is then trained based on this loss. The conditional recognition loss function can be a pre-set loss function, specifically the cross-entropy loss function, or any other existing supervised loss function; this specification does not impose specific limitations.
[0180] In some embodiments of this specification, the AI large model used for intent recognition, the AI large model deployed in the shipping schedule agent, the AI large model deployed in the product agent, the AI large model deployed in the first agent, and the AI large model deployed in the second agent in S1 can all be the same large model. This AI large model can be a general large language model, such as the qwen3 large model, or it can be a large language model after fine-tuning and training a general large language model. Specifically, taking the AI large model as a fine-tuned and trained large language model as an example, during fine-tuning training, the large language model can be obtained first, and a fine-tuning training set can be obtained. This fine-tuning training set can include fine-tuning training samples for each task type and fine-tuning training labels corresponding to each fine-tuning training sample. The task type can include intent recognition, business parameter extraction, plan generation, and response data generation. When the task type is intent recognition, the fine-tuning training sample can be the first sample, which can be historical user input data. The fine-tuning training label corresponding to the first sample is the intent recognition label, i.e., one of common business functions and recognition failures. When the task type is business parameter extraction, the fine-tuning training sample can be the second sample, which is the same as the first sample. The fine-tuning training annotation corresponding to the second sample is the parameter annotation, i.e., the business parameters included in the second sample. When the task type is plan generation, the fine-tuning training sample can be the third and fourth samples. The third sample is the first sample labeled as a common business function and not a special business function for intent recognition, and the fourth sample is the first sample labeled as a failed intent recognition. The fine-tuning training annotation corresponding to the third sample is the first plan annotation, and the fine-tuning training annotation corresponding to the fourth sample is the second plan annotation. When the task type is response data generation, the fine-tuning training sample can be the fifth sample. The fifth sample is the output parameters returned by the business function interface in history, and can also be the output parameters and associated data returned by the business function interface in history, which is not specifically limited in this specification. The fine-tuning training annotation corresponding to the fifth sample can be the response annotation. It should be noted that all of the above fine-tuning training annotations can be pre-annotated manually.
[0181] Subsequently, the general-purpose large language model can be trained using fine-tuning training samples and annotations from the fine-tuning training set, and the trained general-purpose large language model can be used as the AI large model. Specifically, when the task type is intent recognition, the first sample and commonly used business function prompts can be input into the general-purpose large language model to obtain the intent recognition result. When the task type is business parameter extraction, the second sample can be input into the general-purpose large language model to obtain the parameter extraction result. When the task type is plan generation, the third sample, the first knowledge data, and the first prompt can be concatenated, and the concatenated result can be input into the general-purpose large language model to obtain the first plan generation result. At the same time, the fourth sample, the second knowledge data, and the second prompt can also be concatenated, and the concatenated result can be input into the general-purpose large language model to obtain the second plan generation result. The first and second knowledge data can be pre-constructed, or they can be retrieved based on the corresponding intent recognition annotations using the corresponding shipping knowledge retrieval strategy. When the task type is response data generation, the fifth sample and the response prompt words (or the response prompt words and the business constraint prompt words) can be concatenated, and the concatenated result can be input into the general large language model to obtain the response result.
[0182] Subsequently, based on the intent recognition results and intent recognition annotations, a preset first loss function is used to calculate the intent recognition loss. Based on the parameter extraction results and parameter annotations, a preset second loss function is used to calculate the parameter extraction loss. Based on the first plan generation results and first plan annotations, a preset third loss function is used to calculate the first generation loss. Based on the second plan generation results and second plan annotations, a preset fourth loss function is used to calculate the second generation loss. Based on the response results and response annotations, a preset fifth loss function is used to calculate the response generation loss. Then, based on the intent recognition loss, parameter extraction loss, first generation loss, second generation loss, and response generation loss, the total loss can be calculated, and the general large language model can be trained based on the total loss. Of course, the general large language model can also be trained separately based on the intent recognition loss, parameter extraction loss, first generation loss, second generation loss, and response generation loss; this specification does not specifically limit this. The first, second, third, fourth, and fifth loss functions mentioned above can be preset and can be the same or different loss functions. Specifically, they can be the cross-entropy loss function or any existing supervised loss function. This specification does not impose any specific limitations.
[0183] In some embodiments of this specification, an intelligent interaction page is also provided when interacting with the user. This intelligent interaction page can acquire multimodal user input and display response data to the user. The intelligent interaction page has a left-right split layout, meaning it is a left-right split page layout with embedded business pages on the left and dialogue interaction on the right. Specifically, the intelligent interaction page includes a business subpage on the left and a dialogue interaction subpage on the right. Through streaming response technology, it achieves simultaneous screen collaboration between "dialogue interaction and business operations." This intelligent interaction page can be a responsive page built on the Vue3 front-end framework, using a fixed-column layout structure, with independent functions and real-time data linkage between the left and right modules (i.e., the business subpage and the dialogue interaction subpage).
[0184] The aforementioned business sub-pages, i.e., the embedded page modules of the shipping service website, can utilize the Vue3 iframe component. By calling the "page routing information" in the business function page information of the result—that is, the page routing address (i.e., the page URL corresponding to the target business function in the shipping business system), embedding permission parameters, and page adaptation rules—seamless embedding with the business function pages in the shipping business system can be achieved. The aforementioned business sub-pages have the following core functions:
[0185] It can display the business operation page of the shipping business system in real time, so that users can view complete business data without having to switch to the original shipping business system;
[0186] It supports synchronized page interaction. If a user performs a simple operation on a business subpage, the operation command is passed to the backend (i.e., the server) through the frontend (the client used to display the intelligent interactive page) event listening mechanism. After the backend calls the corresponding interface to update the data, the business subpage is refreshed in real time to ensure the continuity of interaction.
[0187] The aforementioned dialogue interaction subpage, namely the text input and streaming response interaction module, can include a text input submodule (text input sub-area) and a streaming response submodule (streaming response sub-area). The text input submodule can integrate multimodal input entry points, including text input boxes, voice input buttons, file upload buttons, custom conversation templates, and system preset templates. The streaming response submodule can call the interface provided by the second intelligent agent from the front end, passing the call result returned from the back end as input parameters. After loading the response prompt words corresponding to the target business function interface, the second intelligent agent calls the AI big model to generate response content (i.e., response data) using a streaming output method. The second intelligent agent returns the streaming data to the front end in real time. The front end, based on the Vue3 Suspense component, receives the returned streaming text data, achieving a "generating and displaying simultaneously" streaming effect, avoiding the user waiting for a complete response. Simultaneously, the streaming response submodule can also retain the complete dialogue record of user input and response in chronological order, allowing users to review historical interaction content without repeatedly entering the same business requirements. In other words, the server can save user input data and corresponding response data for each interaction in chronological order, allowing users to view the saved historical data and avoid users repeatedly entering the same business requirements.
[0188] In addition, to further optimize user operation efficiency, based on the left-right split layout, "dialog card interaction" and "template-based interaction" functions have been added. These reduce the cost of repetitive operations by visually presenting business information and reusing query templates. Specifically, two interaction schemes are available: card generation and interaction, and template-based interaction. For the card generation and interaction scheme, after the server calls the business function interface (i.e., the target business function interface) in the shipping business system, if no relevant data is found using the input parameters from the user's input data (i.e., the output parameter is empty), a response indicating that no relevant data was found will be generated in the aforementioned streaming response submodule. This is a preset reply script, meaning that when the output parameter in the call result in S4 is empty, the preset reply script can be displayed to the user in the streaming response sub-area. Synchronously, a dedicated query card matching the current business function (target business function) can pop up below the text input sub-area on the right (e.g., "Product Parameter Card" for product query, "Goods Tracking Query Card" for goods tracking). This query card is pre-set and includes various parameter items and a confirmation button. Parameter items marked with a red "*" are required. The query card allows users to directly add or modify parameters. Users can fill in the parameters in the various parameter items of the pop-up dedicated query card and click the confirmation button, which is marked as "Send". The server can automatically concatenate the parameters filled in by the user in the dedicated query card to generate a natural language requirement, which is then used as the user's input data. Subsequent interactions can be completed according to the S1~S4 process described above, efficiently resolving query failures caused by incorrect or missing parameters.
[0189] To address the pain point of users repeatedly needing to input the same requirements when querying the same business, a template-based interaction function is designed to support two reuse modes: "system-provided preset templates" and "user-defined templates." Specifically, the system-provided preset templates are pre-configured templates based on high-frequency shipping business scenarios and are stored in a template configuration library. Each template in the library contains "fixed requirement text" and "variable parameter slots." For example, in the cargo tracking template for querying a shipment by order number, the fixed requirement text is "the current transportation status of {order number}", the variable parameter slot is "{order number}", and the corresponding variable parameter (slot parameter) is "order number". The aforementioned user-defined template can be a template built based on user input data. Specifically, after the response data is displayed to the user, a button marked "Save as Template" will appear below the above streaming response sub-area. The user can click this button, and the server can start the "automatic slotting function". Specifically, it can use rule matching technology to identify variable parameters in the user input data. That is, based on regular expressions, it can identify structured parameters (such as "box number" or "letter + number" format) in the user input data and automatically mark them as variable parameter slots. Then, based on the marked variable parameter slots, it can perform slotting processing on the user input data, that is, replace the structured parameters in the user input data with variable parameter slots. After the slotting is completed, the slotted data is automatically saved as a user-defined template and stored in the template configuration library.
[0190] Based on this, the user input method mentioned above can also include template input. The user can select a target template from the template configuration library and fill in the slot parameters corresponding to the variable parameter slots in the target template. When the user's input method is template input, the server can obtain the target template selected by the user and the slot parameters filled in, and automatically concatenate the target template and slot parameters. That is, the slot parameters are automatically filled into the variable parameter slots corresponding to the target template to obtain the natural language requirements, which are then used as user input data. The subsequent interaction can be completed according to the process of S1 to S4 mentioned above.
[0191] In some embodiments of this specification, in order to intercept queries that are illegal, sensitive, or irrelevant to shipping business, if a user queries a business function (such as "weather query," "news information," etc.) on an unrelated shipping service website (i.e., a shipping business system), the intent recognition result will be a failure, and no knowledge vector matching the target vector will be retrieved, meaning the shipping knowledge data is empty. Therefore, no call execution plan will be generated, the server will not call an empty call execution plan, and no interface call will be executed; the interface output parameters will be empty. Furthermore, if the interface output parameters are empty (i.e., the user's request is unrelated to shipping business or no corresponding function is matched), the answerAgent (the second intelligent agent) will automatically skip the parsing and processing of the query, will not call the AI large model, and will directly return a fixed response script.
[0192] In some embodiments of this specification, such as Figure 2 As shown, Figure 2 This document provides a flowchart of a business operation based on an AI large-scale model and a shipping business system, involving intelligent interaction. The user (customer) first logs in... Figure 2 The "Customer Login" feature allows users to choose their preferred input method after successful login: voice input, file upload, natural language input, or template input (either system-provided preset templates or user-defined templates). When the user selects voice input, the system acquires the user's voice input via the voice input device, converts the voice into text using a speech recognition model, and uses this text as the user's input data. Figure 2 The "convert to natural language" part refers to the process where, when the user selects file upload or natural language input as the input method, the uploaded file is retrieved, parsed using a file parsing model, and the resulting structured business data is obtained. Figure 2 The function "automatically extracts data from files" and obtains natural language input from the user, i.e. Figure 2 The system uses "user natural language questioning" and treats structured business data and natural language as user input data. When the user selects natural language input, the system acquires the user's natural language input and uses it as user input data. When the user selects template input (i.e., system-provided preset templates or user-defined templates), the user can select a target template from the template configuration library and fill in the slot parameters corresponding to the variable parameter slots in the target template. Figure 2 In the context of "users input parameters in the variable parameter slots of the template", the server can obtain the target template selected by the user and the slot parameters entered, and automatically concatenate the target template and slot parameters. That is, the slot parameters are automatically filled into the variable parameter slots corresponding to the target template to obtain the natural language requirements, which are then used as user input data.
[0193] After receiving user input data, the response data can be generated and displayed to the user following the steps S1~S4 described above. Figure 2 The process involves "answering questions." Afterward, the server can generate recommended questions based on the user's input and responses, and display them to the user. Figure 2 The system recommends the user to proceed with the next step. Users can also provide feedback on the responses by liking or disliking them. When disliking, users can select the features they are dissatisfied with and the reasons for their dissatisfaction, which will be used for future query optimization and system iteration. Figure 2 The "User Reviews" section. Additionally, the server can save user input data and activate the "Automatic Slotting Function." Specifically, it uses rule-based matching technology to identify variable parameters in the user input data and automatically mark them as variable parameter slots. Then, based on these marked variable parameter slots, slotting is performed on the user input data—that is, replacing structured parameters with variable parameter slots. After slotting is complete, the processed data is automatically saved as a user-defined template. Figure 2 The system allows users to save questions, automatically generate new questions, and save them as templates. Simultaneously, the server can also save user input data and corresponding responses for each interaction in chronological order, and may include user operation logs. Figure 2 The "Save User Conversations and Operation Records" feature allows users to view saved historical data, preventing them from repeatedly entering the same business requirements. Subsequently, user operation records can be used to analyze users' frequent operation preferences. Figure 2 The "Analyze users' common operation preferences" section.
[0194] In some embodiments of this specification, such as Figure 3 As shown, Figure 3 This document provides a detailed flowchart of an intelligent interaction based on an AI large-scale model and a shipping business system. Users can choose their desired input method: voice input, file upload, natural language input, or template input (i.e., system-provided preset templates or user-defined templates). When the user selects voice input, the voice input via the voice input device is converted into text by the voice recognition model (i.e., the model in Funasr). Figure 3 The data is "converted to text" and used as user input. When the user selects file upload or natural language input as the input method, the uploaded file is parsed using a file parsing model that integrates multiple functional types or tools. Figure 3 The "multi-model collaborative parsing" in the process yields the parsed structured business data, i.e. Figure 3 The term "structured data" refers to structured business data and natural language input from the user, which are used as user input data. Figure 3The "Query Combined with Natural Language" function works as follows: When the user selects natural language input, the system retrieves the user's natural language input and uses it as the user input data. When the user selects template input (i.e., system-provided preset templates or user-defined templates), the system retrieves the target template selected by the user and the filled slot parameters, and automatically concatenates the target template and slot parameters. Figure 3 The system uses the "fill slots" in the input field as user input data. For example, if a user asks "Inquire about booking products from location A to location B," or "Inquire about booking products from the three northern ports to Los Angeles," the user can select natural language input on the front end, enter "Inquire about booking products from location A to location B" in the text input box, and click the send button. The server can then retrieve the natural language input from the text input box and use it as user input data. This user input data, along with commonly used business function prompts, is used as input to the AI model to output the user's intent recognition result. Figure 3 The "intent recognition to match business functions" function determines whether the user's question (i.e., user input data) belongs to a special business function within the common business functions. Figure 3 The question asks whether the function is a special business function and whether it is a commonly used business function. Figure 3 The question mark indicates whether it is a popular business function.
[0195] For special business functions such as product inquiries or shipping schedule inquiries, the AI model within a third-party intelligent agent, such as the product intelligent agent or the shipping schedule intelligent agent, is invoked. Figure 3 The phrase "calling the shipmentAgent or productAgent" extracts business parameters from the user input data. Figure 3 The process involves "extracting business parameters." When the location parameters (i.e., origin, destination, etc.) included in the business parameters are geographical regions, it's necessary to obtain the ports or cities within that geographical region. This means determining the port locations within the geographical region from the knowledge base of various special business functions within the shipping business system, and using this as shipping knowledge data. For example, "Three Northern Ports" is transformed into "Qingdao," "Dalian," and "Xingang." Then, based on the business parameters and shipping knowledge data (i.e., the obtained port locations within the geographical region), a pre-set generation algorithm is used to generate a call execution plan. Figure 3 The "algorithm generates call execution plan" in the context of this.
[0196] If it's not a special business function like product inquiry or shipping schedule inquiry, but a frequently used business function, then the knowledge base corresponding to that frequently used business function is directly retrieved and used as shipping knowledge data. Figure 3 The process involves "retrieving knowledge base content" and then calling the AI model in the first intelligent agent to generate a call execution plan based on shipping knowledge data, user input data, and the first prompt word. Figure 3 The "large model generates call execution plan" in the middle.
[0197] If it's not a frequently used business function, meaning the intent recognition result is a failure (i.e., it's not a popular function), then the target words in the user input data are extracted and vectorized to obtain the target vector. Figure 3 The "Natural Language Preprocessing" in the RAGFlow system, based on the target vector, retrieves knowledge vectors from the vector knowledge base. Figure 3 The "vector database" is used to determine the knowledge vector that matches the target vector, i.e. Figure 3 "Vector retrieval" in the context of shipping knowledge data, i.e. Figure 3 The process involves "retrieving knowledge base content." Then, the AI model in the first intelligent agent is invoked to generate an execution plan based on shipping knowledge data, user input data, and the second prompt word. Figure 3 The "large model generation call execution plan" in the text refers to the second knowledge base file corresponding to all other business functions uploaded by operators when building the vector knowledge base. Figure 3 The process involves "uploading a knowledge base file" and using a parsing tool to parse the contents of the second knowledge base file. Figure 3 The "file parsing" in the second knowledge base file extracts the second structured knowledge, and then vectorizes the extracted second structured knowledge through an embedding model. Figure 3 The process involves "embedded model vectorization" to obtain knowledge vectors, which are then stored in a vector database.
[0198] After generating the call execution plan, the corresponding validation rules for the target business function interface can be retrieved from the business database based on the target business function interface name in the call execution plan. The input parameters of the target business function interface in the call execution plan are then validated according to the validation rules. Figure 3 The terms "execute according to the call execution plan" and "interface input parameter validation" are used. When the parameter validation passes, i.e. Figure 3 The "verification passed" function calls the target business function interface in the shipping business system, i.e. Figure 3 The "call interface" in the context determines the call result corresponding to the target business function interface, namely the output parameters of the target business function interface, business function page information, and response points, etc. Figure 3 (Referring to "Call Result Generation" in the original text). The second intelligent agent is invoked, and its AI model streams the response data based on the call result and response prompts (or response prompts and business constraint prompts) to generate response data. Figure 3The system generates a response from a second intelligent agent, which is then displayed to the user in real time. However, if parameter validation fails, the second intelligent agent can generate parameter prompts and display them to the user. These prompts are used to guide the user on input parameters or to supplement existing input parameters. These prompts can be pre-set. After generating the response data, a sensitivity check can be performed to determine if sensitive content exists. This can be achieved through a pre-set model or algorithm. Once the sensitivity check passes, the response data is displayed to the user. After displaying the response data, the system can recommend the next question and determine whether to save the template (i.e., whether the user clicked the "Save as Template" button). If so, the "Automatic Slotting Function" is activated to slot the user input data, replacing structured parameters with variable parameter slots. After slotting, the processed data is automatically saved as a user-defined template. Figure 3 The "Automatic trenching and saving" function.
[0199] The business parameters extracted from user input data by the AI model in the aforementioned product intelligent agent or shipping schedule intelligent agent and other third-party intelligent agents are shown below:
[0200] "{"q":"Query products from the three northern ports to Los Angeles","params":[{"originId":"Xingang,Tianjin,China","destinationId":"LosAngeles,California,UnitedStates"},{"originId":"Dalian,Liaoning,China","destinationId":"LosAngeles,California,UnitedStates"},{"originId":"Qingdao,Shandong,China","destinationId":"LosAngeles,California,UnitedStates"}]}.
[0201] The corresponding call execution plan can be:
[0202] “{"flag":"productAgent","pl":[{"si":"bsjqdc","sl":[{"ip":[{"tp":"originId","v":"Xingang,Tianjin,China"},{"tp":"destinationId","v":"LosAngeles,California,UnitedStates"},{"tp":"ctnSizeTypes","v":"20GP,40GP,40HQ"},{"tp":"ibHaulage","v":""},{"tp":"obHaulage","v":""},{"tp":"tradeTerm","v":"CIF / C&F"},{"tp":"bookingOfficeCode","v":""},{"tp":"etdReferenceDateTime","v":"20251027000000.000"},{"tp":"maxNumberOfDaysAfterEtdDate","v":"14"},{"tp":"cargoNatures","v":"GC"},{"tp":"cargoGroup","v":"Dry"}],"mi":"bsjqdc1"},{"ip":[{"tp":"originId","v":"Dalian,Liaoning,China"},{"tp":"destinationId","v":"LosAngeles,California,UnitedStates"},{"tp":"ctnSizeTypes","v":"20GP,40GP,40HQ"},{"tp":"ibHaulage","v":""},{"tp":"obHaulage","v":""},{"tp":"tradeTerm","v":"CIF / C&F"},{"tp":"bookingOfficeCode","v":""},{"tp":"etdReferenceDateTime","v":"20251027000000.000"},{"tp":"maxNumberOfDaysAfterEtdDate","v":"14"},{"tp":"cargoNatures","v": "GC"},{"tp":"cargoGroup","v":"Dry"}],"mi":"bsjqdc1"},{"ip":[{"tp":"originId", "v":"Qingdao,Shandong,China"},{"tp":"destinationId","v":"LosAngeles,California,UnitedStates"},{"tp":"ctnSizeTypes","v":"20GP,40GP,40HQ"},{"tp":"ibHaulage" {"tp":"obHaulage","v":""},{"tp":"tradeTerm","v":"CIF / C&F"},{"tp":"bookingOfficeCode","v":""},{"tp":"etdReferenceDateTime","v":"20251027000000.000"},{"tp":"maxNumberOfDaysAfterEtdDate","v":"14"},{"tp":"cargoNatures","v":"GC"},{"tp":"cargoGroup","v":"Dry"}],"mi":"bsjqdc1"}]}],"q":"Query booking products from the three northern ports to Los Angeles"}。。
[0203] The fields in the above-mentioned call execution plan are explained as follows:
[0204] q represents the question input by the user (user input data);
[0205] `pl` is an array of call execution plans. If multiple business functions are queried, multiple call execution plan sub-objects will be generated.
[0206] si is the function ID of the business function corresponding to the execution plan sub-object, which is recorded in the knowledge base; sl is the list of interfaces to be executed for the business function corresponding to the execution plan sub-object.
[0207] mi is the interface ID of the interface to be executed, which is recorded in the knowledge base;
[0208] `ip` is the list of input parameters required to call the interface, where `tp` represents the input parameter field of the interface call, and `v` is the value corresponding to that input parameter field.
[0209] Based on the above method, this specification also provides an intelligent interactive system based on an AI big data model and a shipping business system, specifically as follows: Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of an intelligent interactive system based on an AI large model and a shipping business system, as provided in this specification. Figure 4 The system shown includes a front-end 100 and a back-end 101. The back-end 101 includes an intent recognition module 1011, a knowledge base retrieval module 1012, a plan generation module 1013, a plan execution module 1014, and a response generation module 1015; wherein:
[0210] The aforementioned intent recognition module 1011 is used to construct frequently used business function prompts based on business function keywords frequently used by users in the shipping business system. It accepts multimodal user input sent from the front end 100 and parses it into user input data. The user input data and frequently used business function prompts are then input into the AI big data model, and the user's intent recognition result is output. This intent recognition result represents either the business function the user intends to perform or a recognition failure result. The intent recognition module 1011 is built on an AI big data model and possesses natural language understanding, function matching, and parameter extraction capabilities. It can match user input data to business functions on the shipping service website. The specific execution process of the intent recognition module 1011 is consistent with the specific implementation process of S1 described above, and will not be repeated here.
[0211] The aforementioned knowledge base retrieval module 1012 is used to select a matching shipping knowledge retrieval strategy based on the intent recognition result, and retrieve shipping knowledge data in the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy. The specific execution process of the knowledge base retrieval module 1012 is consistent with the specific implementation process of S2 above, and will not be described again here.
[0212] The aforementioned plan generation module 1013 is used to select the corresponding first intelligent agent or a pre-set generation algorithm to generate a call execution plan based on shipping knowledge data, user input data and intent recognition results. The specific execution process of the plan generation module 1013 is consistent with the specific implementation process of S3 above, and will not be described again here.
[0213] The aforementioned plan execution module 1014 is used to call the target business function interface in the shipping business system according to the call execution plan, determine the call result corresponding to the target business function interface, and the aforementioned response generation module 1015 is used to generate response data based on the call result using a second intelligent agent, and display it to the user through the front end. The specific execution process of the aforementioned plan execution module 1014 and the aforementioned response generation module 1015 is consistent with the specific implementation process of S4, and will not be described again here.
[0214] In some embodiments of this specification, the system adopts a front-end and back-end separation architecture. The front-end 100 uses the Vue3 framework to develop the user interface (i.e., intelligent interactive page), providing a smooth operating experience and intuitive visual presentation, and supporting core interactive functions such as page embedding and streaming response display. The front-end 100 deploys a UI module 1001, which includes a file upload entry, a natural language input box (i.e., a text input box), a voice input entry, and a preset template entry (i.e., a template configuration library), as detailed below. Figure 5 As shown, Figure 5 This is a schematic diagram of another intelligent interactive system based on an AI large model and shipping business system provided in this specification. Users can select the desired input method from multiple input methods provided in UI module 1001 and input data to obtain multimodal user input. The aforementioned backend 101 can be two, namely a first backend 101 (i.e., a Python backend) and a second backend 101 (i.e., a JAVA backend). The first backend 101 can deploy an intent recognition module 1011, a knowledge base retrieval module 1012, a plan generation module 1013, and a response generation module 1015. The second backend 101 can deploy a plan execution module 1014. The second backend 101 is based on the Spring Boot 3 framework to build a microservice architecture, achieving high system availability and horizontal scalability, and supporting concurrent requests and interface calls from multiple users.
[0215] Additionally, the second backend 101 may also deploy an account module 1016, which can be used to manage user information and verify the correctness of user login information during user login. The first backend 101 may also deploy a file parsing module 1017, a speech recognition module 1018, and an AI security guardrail module 1019. The file parsing module 1017 is used to parse and extract structured knowledge from the user-inputted knowledge base file. The speech recognition module 1018 is used to convert the user's speech input via a voice input device into text when the user selects voice input as the input method. The AI security guardrail module 1019 is used to perform sensitivity checks on the response data, i.e., to determine whether there is sensitive content in the response data. The UI module 1001 also includes a streaming response display area, which is used to display the response data to the user.
[0216] The aforementioned knowledge base retrieval module 1012 can be deployed with a Retrieval Enhancement Generation (RAG) basic component. This RAG basic component uses the open-source RAG (RAGFlow) system as the core of the knowledge base retrieval, supporting knowledge retrieval for subsequent non-frequently used functions (i.e., other business functions). Furthermore, the RAGFlow system also stores a vector database, namely the Milvus vector library, used to store shipping domain knowledge base data after embedding model vectorization, supporting efficient vector retrieval.
[0217] The aforementioned knowledge base retrieval module 1012, plan generation module 1013, and response generation module 1015 all deploy intelligent agents. Specifically, the knowledge base retrieval module 1012 deploys third-party intelligent agents such as `shipmentAgent` (shipment schedule intelligent agent) and `productAgent` (product intelligent agent). Figure 5 The knowledge base retrieval module 1012 only displays two third-party agents, `shipmentAgent` and `productAgent`, used to extract business parameters from user input data. The plan generation module 1013 deploys `planningAgent` (the first agent) to generate the call execution plan. The response generation module 1015 deploys `answerAgent` (the second agent) to generate response data. These agents can achieve collaborative interaction through an A2A (Agent to Agent) mechanism.
[0218] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. An intelligent interaction method based on AI large-scale models and shipping business systems, characterized in that, The method includes: S1: Data Acquisition and Intent Recognition: Based on frequently used business function keywords in the shipping business system, construct common business function prompt words, acquire multimodal user input and parse it into user input data, input the user input data and the common business function prompt words into the AI big model, and output the user's intent recognition result; the intent recognition result is the business function that the user intends to handle or the recognition failure result; S2: Knowledge base retrieval: Based on the intent recognition result, select a matching shipping knowledge retrieval strategy, and retrieve shipping knowledge data from the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy; S3: Call plan generation: Based on the shipping knowledge data, the user input data and the intent recognition result, select the corresponding first intelligent agent or a pre-set generation algorithm to generate a call execution plan; S4: Response data generation: According to the call execution plan, call the target business function interface in the shipping business system, determine the call result corresponding to the target business function interface; based on the call result, use the second intelligent agent to generate response data and display it to the user.
2. The intelligent interaction method based on AI large model and shipping business system as described in claim 1, characterized in that, The shipping business system includes various commonly used business functions and various other business functions. The commonly used business functions and the other business functions are divided according to the frequency of user use. Some of the commonly used business functions are set as special business functions. The specific steps in S2, which involve selecting a matching shipping knowledge retrieval strategy based on the intent recognition result, include: When the intent recognition result is any commonly used business function in the shipping business system and not the special business function, the first retrieval strategy is selected as the shipping knowledge retrieval strategy matching the intent recognition result. When the intent recognition result is any commonly used business function in the shipping business system and is the special business function, the second retrieval strategy is selected as the shipping knowledge retrieval strategy matching the intent recognition result. When the intent recognition result is a recognition failure result, the third retrieval strategy is selected as the shipping knowledge retrieval strategy to match the intent recognition result.
3. The intelligent interaction method based on AI large model and shipping business system as described in claim 2, characterized in that, The knowledge base for the other business functions is a vector knowledge base; In step S2, retrieving shipping knowledge data from the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy specifically includes: When the shipping knowledge retrieval strategy is the first retrieval strategy, the commonly used business function corresponding to the intent recognition result is taken as the first business function. The knowledge base corresponding to the first business function is retrieved from the knowledge base of each commonly used business function in the shipping business system, and the content in the retrieved knowledge base is taken as shipping knowledge data. When the shipping knowledge retrieval strategy is the second retrieval strategy, the third agent corresponding to the intent recognition result is used to extract the business parameters from the user input data. When the location parameter included in the business parameters is a geographical range, the port location within the geographical range is determined from the knowledge base of each special business function in the shipping business system according to the geographical range, and used as shipping knowledge data. When the knowledge retrieval strategy is the third retrieval strategy, the user input data is preprocessed and the target words in the user input data are extracted; the target words are vectorized to obtain target vectors; knowledge vectors matching the target vectors are retrieved from the knowledge bases of other business functions in the shipping business system and used as shipping knowledge data.
4. The intelligent interaction method based on AI large model and shipping business system as described in claim 1, characterized in that, S3 specifically includes: When the intent recognition result is the common business function and not a special business function, the shipping knowledge data, the user input data and the first prompt word are concatenated to obtain the first concatenated data, and the first concatenated data is input into the first intelligent agent, and the first intelligent agent generates a call execution plan. When the intent recognition result is the common business function and the special business function, the business parameters in the user input data are determined, and a call execution plan is generated by using a pre-set generation algorithm based on the business parameters and the shipping knowledge data. When the intent recognition result is the recognition failure result, the shipping knowledge data, the user input data, and the second prompt word are concatenated to obtain the second concatenated data, and the second concatenated data is input into the first intelligent agent, which generates a call execution plan.
5. The intelligent interaction method based on AI large model and shipping business system as described in claim 1, characterized in that, The call execution plan includes at least the name of the target business function interface and the input parameters of the target business function interface; In step S4, according to the call execution plan, the target business function interface of the shipping business system is called, and the call result corresponding to the target business function interface is determined, specifically including: Based on the target business function interface name in the call execution plan, retrieve the corresponding verification rule from the business database; According to the verification rules, the input parameters of the target business function interface in the call execution plan are verified; When the parameter verification passes, the target business function interface in the shipping business system is called according to the call execution plan, and the output parameters returned by the target business function interface are obtained. Retrieve associated data corresponding to the target business function interface from the business database. The associated data includes at least the key points of the response and the explanation of the interface output parameters. The output parameters and associated data are encapsulated in a fixed format, and the encapsulated result is used as the call result.
6. The intelligent interaction method based on AI large model and shipping business system as described in claim 1, characterized in that, In step S4, based on the call result, a second intelligent agent is used to generate response data and display it to the user. This specifically includes: The second intelligent agent determines whether the output parameters in the call result are empty. If so, the preset reply script will be used as the reply data and displayed to the user; If not, the second intelligent agent loads the reply prompt word and concatenates the call result with the reply prompt word; the concatenated result is used as the input of the AI large model in the second intelligent agent, and the AI large model in the second intelligent agent generates reply data in a streaming output mode, and the generated reply data is displayed to the user in real time.
7. The intelligent interaction method based on AI large model and shipping business system as described in claim 1, characterized in that, In step S4, based on the call result, a second intelligent agent is used to generate response data, specifically including: When the output parameters in the call result are not empty, the second intelligent agent loads the response prompt and the business constraint prompt. The call result, the response prompt, and the business constraint prompt are concatenated; The concatenated result is used as input to the AI big model in the second intelligent agent, and the response data is generated through the AI big model in the second intelligent agent.
8. The intelligent interaction method based on AI large model and shipping business system as described in claim 1, characterized in that, In step S4, according to the call execution plan, the target business function interface of the shipping business system is called, and the call result corresponding to the target business function interface is determined, specifically including: According to the call execution plan, the target business function interface in the shipping business system is called, and the output parameters returned by the target business function interface are obtained. When the target business function interface is an interface corresponding to a special business function, the output parameters are sorted according to a preset sorting rule to obtain a structured list; When there are filtering conditions in the user input data, the parameters in the structured list are filtered according to the filtering conditions; Retrieve associated data corresponding to the target business function interface from the business database. The associated data includes at least the key points of the response and the explanation of the interface output parameters. The filtered parameters and the associated data are encapsulated in a fixed format, and the encapsulated result is used as the call result.
9. The intelligent interaction method based on AI large model and shipping business system as described in claim 1, characterized in that, The specific steps in S1, including acquiring multimodal user input and parsing it into user input data, include: When the user selects natural language input as the input method, the natural language input by the user is obtained and used as the user input data; When the user selects voice input as the input method, the voice input by the user through the voice input device is acquired, and the voice is converted into text through a voice recognition model and used as the user input data; When the user selects file upload and natural language input as the input method, the uploaded file and the input natural language are obtained. The file is parsed using a file parsing model to obtain the parsed structured business data. The structured business data and the natural language are then used as the user input data.
10. An intelligent interactive system based on an AI large-scale model and a shipping business system as described in any one of claims 1 to 9, characterized in that, The system includes a front-end and a back-end. The back-end includes an intent recognition module, a knowledge retrieval module, a plan generation module, a plan execution module, and a response generation module; wherein: The intent recognition module is used to construct frequently used business function prompts based on business function keywords that are frequently used by users in the shipping business system, receive multimodal user input sent by the front end and parse it into user input data, input the user input data and the frequently used business function prompts into the AI big model, and output the user's intent recognition result; the intent recognition result is the business function that the user intends to handle or the recognition failure result; The knowledge base retrieval module is used to select a matching shipping knowledge retrieval strategy based on the intent recognition result, and retrieve shipping knowledge data in the knowledge base corresponding to each business function in the shipping business system according to the shipping knowledge retrieval strategy. The plan generation module is used to select the corresponding first intelligent agent or a pre-set generation algorithm to generate a call execution plan based on the shipping knowledge data, the user input data and the intent recognition result; The plan execution module is used to call the target business function interface in the shipping business system according to the call execution plan, and determine the call result corresponding to the target business function interface. The response generation module is used to generate response data using a second intelligent agent based on the call result, and then display the response data to the user through the front end.