Intelligent agent method and apparatus based on intelligent language model, device, and medium
By using an intelligent agent method based on an intelligent language model, the efficiency and accuracy issues of traditional human customer service in high-concurrency scenarios on e-commerce platforms are solved, achieving multi-platform adaptation and cross-regional response, thereby improving the user experience of e-commerce platforms.
Patent Information
- Application Number
- CN202511286590.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-09-10
AI Technical Summary
Traditional human customer service struggles to provide efficient responses in high-concurrency scenarios on e-commerce platforms, and the accuracy and consistency of information delivery are also low.
An intelligent agent method based on an intelligent language model is adopted to identify the communication protocol of the target customer service system, establish a data interaction channel, execute a multi-round dialogue management process, generate user consultation content, extract structured field information, and adjust strategies based on user feedback to optimize consultation content and script generation.
It improves the system's compatibility and deployment flexibility in multi-platform environments, enhances the accuracy and completeness of dialogue responses, solves the problems of information lag and rigid expression in holiday scenarios, and improves user experience.
Smart Images

Figure CN120763305B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of e-commerce service agents, and in particular to an intelligent agent method and device based on an intelligent language model, equipment and a medium. BACKGROUND
[0002] At present, in e-commerce platforms and customer service systems, users often need to frequently consult product specifications, inventory status, delivery time and other detailed information. The traditional manual customer service processing method needs to respond to user requests one by one, and it is difficult to achieve efficient response in a high concurrency scenario, resulting in low overall service efficiency. In addition, manual recording is prone to missing key information or inconsistent expression, thereby affecting the accuracy and consistency of information transmission. SUMMARY
[0003] In order to solve the problems of low processing efficiency and accuracy of traditional manual customer service, the present application provides an intelligent agent method and device based on an intelligent language model, equipment and a medium.
[0004] The above-mentioned application object of the present application is achieved by the following technical scheme:
[0005] An intelligent agent method based on an intelligent language model, the intelligent agent method based on an intelligent language model comprising:
[0006] Identify the communication protocol type of the target customer service system, set the corresponding interaction parameters according to the communication protocol type, and establish a data interaction channel with the target customer service system;
[0007] Based on the intelligent language model, perform a multi-round dialogue management process on the user input text, generate corresponding user consultation content, and send the user consultation content to the target customer service system through the data interaction channel, the user consultation content including holiday consultation scripts generated for target regions in the user input text;
[0008] Receive the response information returned by the target customer service system based on the user consultation content, and extract the structured field information used to optimize the multi-round dialogue management process according to the response information;
[0009] Generate and push corresponding follow-up questions according to the response information and the structured field information;
[0010] Obtain user feedback information, determine corresponding strategy adjustment parameters according to the user feedback information, and the strategy adjustment parameters are used to optimize the generation process of the user consultation content and the follow-up questions.
[0011] By adopting the technical scheme, the communication protocol type used by the target customer service system is automatically identified, and corresponding interaction parameters are set according to the identified protocol, thereby realizing flexible adaptation of the data interaction channel between different customer service systems. This mechanism effectively improves the deployability and interfacing efficiency of the system in a multi-platform and multi-protocol environment, reduces the dependence on manual configuration, and is conducive to realizing the high expansibility and stability of the intelligent agent system.
[0012] In a preferred example, the application can be further configured to: in the step of identifying the communication protocol type of the target customer service system and setting corresponding interaction parameters according to the communication protocol type to establish a data interaction channel with the target customer service system, comprising:
[0013] Receiving multi-modal input data provided by a user, the multi-modal input data including text data, image data and table data;
[0014] Performing a parsing operation on the multi-modal input data to generate corresponding user initial requirements, the parsing operation including an image recognition operation of extracting text content in the image data by an optical character recognition algorithm, and a table recognition operation of extracting field information in the table data by a structured parsing method;
[0015] Classifying the user initial requirements according to the target consultation intent type;
[0016] According to the preset technical architecture of the target customer service system and the target consultation intent type, determining the communication protocol type of the target customer service system, the preset technical architecture including a RESTful API architecture and a WebSocket architecture;
[0017] Setting corresponding interaction parameters according to the communication protocol type to establish a data interaction channel with the target customer service system.
[0018] By adopting the technical scheme, a unified parsing mechanism for multi-modal input data is introduced, which can receive text, image, table and other types of user input, extract user initial requirements by combining optical character recognition and structured data parsing technology, and then classify the intent by a pre-trained language model, thereby accurately identifying the user's real consultation intent and matching the appropriate communication protocol. This scheme effectively improves the system's processing capability for unstructured and mixed data scenarios, enhances the accuracy of user intent recognition and the degree of automation of interface adaptation.
[0019] In a preferred example, the application can be further configured to: in the step of performing a multi-turn dialogue management process on the user input text based on the intelligent language model to generate corresponding user consultation content, the multi-turn dialogue management process at least includes a semantic understanding process and a context tracking process, and the step further comprises:
[0020] performing semantic understanding process on the user input text based on an intelligent language model to generate corresponding user semantic expression;
[0021] performing context tracking process on the user semantic expression, and generating current round of user consultation content based on the historical extracted structured field information.
[0022] By adopting the technical solution, a multi-round dialogue management mechanism based on semantic understanding and context tracking is constructed, the system can continuously maintain semantic state in the user interaction process, dynamically generate the current round of consultation content combined with the historical extracted information, and ensure the coherence and integrity of the dialogue process. The mechanism establishes stronger dialogue logic support at the semantic control level, so that the system can continuously and multi-step confirm information for complex requirements, significantly enhancing the naturalness and intelligence of the interaction.
[0023] In a preferred example, the application can be further configured to, after the step of performing semantic understanding process on the user input text based on an intelligent language model to generate corresponding user semantic expression, further comprising:
[0024] detecting whether a holiday awareness trigger field appears in the user semantic expression, if no holiday awareness trigger field appears, then preparing to perform the step of performing context tracking process on the user semantic expression;
[0025] if a holiday awareness trigger field appears, then determining the corresponding target area according to the holiday awareness trigger field, matching the statutory holiday information of the target area based on public holiday API or local holiday database;
[0026] pushing corresponding holiday consultation scripts according to the statutory holiday information;
[0027] if it is detected that the holiday consultation script has been responded, then obtaining historical delivery data, calculating and automatically pushing the corresponding logistics delay time range according to the historical delivery data and the statutory holiday information.
[0028] By adopting the technical solution, a holiday awareness trigger mechanism is introduced in the semantic analysis process, which can determine whether the holiday context is involved based on the key field in the user input text, and obtain the statutory holiday information of the corresponding country or region combined with the public holiday API or local holiday database, and then generate related scripts and provide logistics delay prediction. This mechanism significantly improves the information timeliness and expression adaptability of the system in cross-regional, holiday and other special scenarios, enhancing the interaction experience of users in sensitive time windows.
[0029] The application can be further configured in a preferred example as follows: in the step of extracting structured field information for optimizing the multi-round dialogue management process according to the response information, the step includes:
[0030] extracting key fields in the response information;
[0031] performing logical verification on the key fields based on a local verification database;
[0032] mapping the key fields that pass the logical verification to a predefined local mapping library to match corresponding structured fields;
[0033] storing each structured field and generating corresponding structured field information.
[0034] By adopting the above technical solution, when processing the response information returned by the customer service system, the system can extract the key fields therein, perform logical verification and semantic mapping operations through the local database, and finally generate structured field information conforming to the predefined structure. This structuring process provides a reliable data foundation for subsequent semantic tracking and strategy optimization of the system, and improves the consistency, accuracy of information processing and the ability of continuous accumulation of system knowledge.
[0035] The application can be further configured in a preferred example as follows: in the step of generating and pushing corresponding follow-up dialogues according to the response information and the structured field information, the step includes:
[0036] determining whether the response information is complete, and if so, waiting for receiving new user input text;
[0037] if not, comparing the response information and the structured field information to identify corresponding target fields;
[0038] calling a preset dialogue template and completing the dialogue template based on the target fields;
[0039] performing natural language reconstruction on the completed dialogue template to generate a follow-up dialogue consistent with the context style in the response information.
[0040] By adopting the above technical solution, in the face of situations where information is missing in the customer service response, the system can automatically identify inconsistent content between the response and the structured field information, call a dialogue template to complete the missing fields, and perform natural language reconstruction through a language generation model, so that the generated dialogue is consistent with the current dialogue style in terms of semantics. This follow-up dialogue generation mechanism significantly improves the system's ability to handle incomplete responses, avoids repeated user operations, and effectively ensures the integrity and intelligence level of the consultation process.
[0041] The second application purpose is achieved by the following technical scheme.
[0042] An intelligent agent device based on an intelligent language model, comprising:
[0043] An identification module is configured to identify a communication protocol type of a target customer service system, set corresponding interaction parameters according to the communication protocol type, and establish a data interaction channel with the target customer service system.
[0044] A first generation module is configured to execute a multi-round dialogue management process on user input text based on an intelligent language model, generate corresponding user consultation content, and send the user consultation content to the target customer service system through the data interaction channel, wherein the user consultation content includes holiday consultation scripts generated for a target region in the user input text.
[0045] A receiving module is configured to receive response information returned by the target customer service system based on the user consultation content, and extract structured field information for optimizing the multi-round dialogue management process according to the response information.
[0046] A second generation module is configured to generate and push corresponding follow-up questions according to the response information and the structured field information.
[0047] A determination module is configured to obtain user feedback information, determine corresponding strategy adjustment parameters according to the user feedback information, and use the strategy adjustment parameters to optimize the generation process of the user consultation content and the follow-up questions.
[0048] The third application purpose is achieved by the following technical scheme.
[0049] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the above-mentioned intelligent agent method based on an intelligent language model.
[0050] The fourth application purpose is achieved by the following technical scheme.
[0051] A computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned intelligent agent method based on an intelligent language model.
[0052] In summary, the present application has at least one of the following beneficial technical effects:
[0053] The application realizes automatic docking of different types of customer service platforms by identifying the communication protocol type of the target customer service system and dynamically configuring interaction parameters, improving the compatibility and deployment flexibility of the system in a multi-platform environment. Subsequently, through the execution of a multi-round dialogue management process on the user input text, combined with the context tracking and semantic analysis mechanism, the user demand evolution can be continuously identified, and the user consultation content with coherence and context relevance can be generated, significantly improving the response accuracy and integrity in the dialogue process. At the same time, holiday adaptive language is supported based on the target region in the user text, and external holiday data sources or local databases are used to realize dynamic perception and language adjustment of holiday factors, solving the problems of information lag and expression rigidity of traditional systems in holiday situations. After the system obtains the customer service system response information, it can further extract key fields and perform structured processing, providing semantic support for subsequent follow-up language generation and multi-round process optimization; combined with user feedback, the system can dynamically adjust the consultation content generation strategy and continuously optimize the interaction performance. By integrating the deep semantic understanding ability of the intelligent language model and the interaction control mechanism, the processing efficiency, adaptability to complex language, and response accuracy and user experience of the intelligent customer service system in the cross-regional holiday condition are improved. BRIEF DESCRIPTION OF DRAWINGS
[0054] Figure 1 is a flowchart of an intelligent agent method based on an intelligent language model in an embodiment of the application.
[0055] Figure 2 is an implementation flowchart of step S10 in an intelligent agent method based on an intelligent language model in an embodiment of the application.
[0056] Figure 3 is an implementation flowchart of step S20 in an intelligent agent method based on an intelligent language model in an embodiment of the application.
[0057] Figure 4 is another implementation flowchart of step S20 in an intelligent agent method based on an intelligent language model in an embodiment of the application.
[0058] Figure 5 is an implementation flowchart of step S30 in an intelligent agent method based on an intelligent language model in an embodiment of the application.
[0059] Figure 6 is an implementation flowchart of step S40 in an intelligent agent method based on an intelligent language model in an embodiment of the application.
[0060] Figure 7 is a principle block diagram of an intelligent agent device based on an intelligent language model in an embodiment of the application.
[0061] Figure 8 Figure 1 is a schematic diagram of an apparatus in an embodiment of the present application. DETAILED DESCRIPTION
[0062] The present application will be further described in detail below with reference to the accompanying drawings.
[0063] In an embodiment, as shown in Figure 1, the present application discloses an intelligent agent method based on an intelligent language model, which comprises the following steps: Figure 1
[0064] S10, identifying the communication protocol type of the target customer service system, setting the corresponding interaction parameters according to the communication protocol type, and establishing a data interaction channel with the target customer service system; the communication protocol type of the target customer service system refers to the data interaction mechanism adopted by the target customer service platform in technical implementation, such as RESTful API architecture based on HTTP protocol or WebSocket architecture based on persistent connection, different communication protocols will affect the access logic of the system in terms of request mode, connection persistence and data format processing, etc. The interaction parameters are a set of connection and communication configuration items set for the identified communication protocol, including but not limited to request header parameters, authentication information, data format specifications and connection maintenance strategies, etc., which are used to ensure that the intelligent agent system and the target customer service system can stably and normatively establish a data interaction channel.
[0065] S20, based on the intelligent language model, performing a multi-round dialogue management process on the user input text, generating corresponding user consultation content, and sending the user consultation content to the target customer service system through the data interaction channel, the user consultation content including holiday consultation scripts generated for the target region in the user input text; the intelligent language model is a deep neural network model trained based on large-scale corpus, which has natural language understanding and generation capabilities, and is used in this method to analyze the semantic features, context relationships and intent content in the user input text, providing a semantic basis for subsequent dialogue management and script generation. The user consultation content refers to the natural language expression generated by the system based on the user input text, historical semantic state and current dialogue stage, which reflects the user's current specific consultation needs, and the content may include product parameter inquiry, logistics status query, holiday delivery arrangement, etc. information, which is the main information carrier for the system to actively interact with the customer service platform. The holiday consultation script is the dialogue content generated by the system based on the holiday recognition result when the user text involves specific regional or time-sensitive expressions, which is used to actively remind or supplement the special arrangements such as delivery, customer service response, etc. during the holiday.
[0066] S30, receiving the response information returned by the target customer service system based on the user consultation content, and extracting the structured field information for optimizing the multi-round dialogue management process according to the response information; the structured field information refers to the semantic content extracted from the response information returned by the customer service platform, which conforms to the pre-defined data format or business field model. These fields are usually standardized and classified for supporting the context judgment, missing information identification and dialogue generation optimization of multi-round dialogue.
[0067] S40, generating and pushing the corresponding follow-up dialogue according to the response information and the structured field information; the follow-up dialogue is a supplementary natural language expression generated by the system based on the current context and the missing field type after identifying the key information missing in the customer service reply, which aims to guide the customer service to further clarify the key information not answered, so as to maintain the coherence and semantic integrity of the dialogue process.
[0068] S50, obtaining user feedback information, determining corresponding strategy adjustment parameters according to the user feedback information, and the strategy adjustment parameters are used to optimize the generation process of user consultation content and follow-up dialogue; the user feedback information refers to the response signal implicitly or explicitly provided by the user after completing a round of interaction, which may include re-consultation behavior, scoring operation, cancellation request, etc., and is used to evaluate the accuracy and satisfaction of the current system generated content.
[0069] Specifically, in the scenario where the user inputs "Can it be delivered during the Spring Festival?", the system first identifies that the target customer service system uses the WebSocket protocol and configures the communication parameters, then analyzes the user text through the intelligent language model and generates the user consultation content containing the Spring Festival time limit explanation, and sends it to the customer service platform. The customer service platform returns "We will deliver it depending on the inventory", the system extracts the inventory status as a structured field, but finds that the specific delivery time field is not involved, so it automatically generates the follow-up dialogue "What is the expected delivery time during the Spring Festival?" and pushes it, while recording the user's subsequent behavior for updating the strategy parameters to optimize the dialogue generation performance in similar scenarios in the future.
[0070] In an embodiment, as shown in Figure 2 In step S10, i.e. in the step of identifying the communication protocol type of the target customer service system, setting the corresponding interaction parameters according to the communication protocol type to establish the data interaction channel with the target customer service system, it includes:
[0071] S101, receive the multi-modal input data provided by the user, the multi-modal input data including text data, image data and table data; the multi-modal input data refers to the original content set submitted by the user to the system through different information forms, usually including multiple types of data input such as text, image or structured table. The text data can be derived from the natural language instruction or consultation sentence directly input by the user, the image data can be product screenshot, interface photo and other information images that need to be further recognized, and the table data is usually a field set with structural relationship, such as product list, inventory table, delivery schedule table and the like.
[0072] S102, performing a parsing operation on the multi-modal input data to generate corresponding user initial demand, the parsing operation including an image recognition operation of extracting text content in the image data through an optical character recognition algorithm, and a table recognition operation of extracting field information in the table data through a structured parsing method; the image recognition operation is a process of parsing and processing the image data, and the system recognizes the readable characters contained in the image through the deployed optical character recognition algorithm to extract the potential text information for further constructing the user demand content. The table recognition operation refers to a process of field-level analysis and extraction of the structured data table, and the system parses the semantic relationship of each column field according to the predefined table structure template or machine learning model to convert each information unit in the table into a field expression that can be understood by the system.
[0073] S103, classifying the user initial demand to generate a corresponding target consultation intent type; the user initial demand refers to an abstract representation of expressing the real intent of the user generated by the system based on the parsing result of the multi-modal input, which embodies the target direction of the current consultation or operation of the user and is the basic data source for subsequent intent classification and dialogue management. The target consultation intent type is the specific interaction intent identified by the system after classifying the user initial demand, and common types include product parameter query, inventory availability confirmation, logistics time efficiency inquiry, holiday delivery arrangement judgment and the like, and the determination of the intent type affects the selection of the subsequent dialogue path and the configuration of the interaction mode.
[0074] S104, determining the communication protocol type of the target customer service system according to the preset technical architecture and the target consultation intent type of the target customer service system, the preset technical architecture including RESTful API architecture and WebSocket architecture; the preset technical architecture refers to a capability tag set used by the system inside for modeling and classifying the communication characteristics of different customer service platforms, which represents the technical communication mode supported by each type of customer service system defined by the system in advance, such as RESTful API architecture based on request response mechanism or WebSocket architecture based on continuous connection mechanism, and the system determines the communication protocol form to be adopted through the architecture information and intent type.
[0075] S105. Set the corresponding interaction parameters according to the communication protocol type to establish a data interaction channel with the target customer service system.
[0076] Specifically, the first step is to construct an intelligent agent system based on an intelligent language model. This intelligent agent system has the ability to perceive and parse multimodal input data provided by the user, including text data, image data, and tabular data. The system performs optical character extraction (OCI) on image data through image recognition to extract identifiable text information; and performs structured parsing on tabular data through table recognition to obtain the semantic content corresponding to the fields, thereby generating the user's initial requirements.
[0077] After obtaining the user's initial needs, the system executes a semantic understanding process based on the trained intelligent language model. This process categorizes the user's initial needs by intent, identifying the target inquiry intent type, which includes several predefined categories such as product specification inquiries, delivery cycle confirmation, and inventory status retrieval. Based on the identification results, the system generates preliminary user inquiry content, which will subsequently be incorporated into a multi-turn dialogue management process for context tracking and optimization.
[0078] Simultaneously, to achieve automatic integration between the intelligent agent system and the target customer service system, the system further acquires the preset technical architecture information of the target customer service system, which includes a RESTful API architecture and a WebSocket architecture. Based on the combination relationship between the target inquiry intent type and the preset technical architecture, the system determines the communication protocol type of the target customer service system and sets the corresponding interaction parameters accordingly. These parameters include configuration items such as request method, authentication method, and data packet structure. Finally, through the configured data interaction channel, the system completes the integration preparation between the intelligent agent system and the target customer service system, providing a communication foundation for subsequent sending and receiving of user inquiry content and responses.
[0079] In one embodiment, such as Figure 3 As shown, in step S20, which is the step of performing a multi-turn dialogue management process on the user input text based on the intelligent language model to generate the corresponding user consultation content, the multi-turn dialogue management process includes at least a semantic understanding process and a context tracking process. The steps also include:
[0080] S2011. Based on an intelligent language model, a semantic understanding process is performed on the user input text to generate corresponding user semantic expressions. User semantic expressions refer to the intermediate semantic structure results obtained by the system after semantic parsing the user input text following the semantic understanding process. These results are not directly equivalent to the original user input, but rather a structured semantic representation formed after processing by the intelligent language model, containing information such as grammatical classification, semantic role labeling, and intent mapping. User semantic expressions typically include semantic components such as query targets, constraints, time expressions, and product entities, which are used by the subsequent dialogue control module for logical deduction and context fusion, serving as the semantic driving core for multi-turn dialogue evolution.
[0081] S2012. Execute a context tracking process for user semantic expressions and generate the current round of user consultation content based on historically extracted structured field information. The context tracking process refers to the system's continuous perception and dynamic management of historical dialogue content and current semantic state during multi-round dialogues. Its core objective is to maintain semantic continuity and dialogue state consistency. This process does not rely solely on the current input text but combines the current round of user semantic expressions and historically extracted structured field information to identify dialogue stages, detect missing information, and backtrack confirmed content, thereby generating the most appropriate user consultation content for the current round. The historically extracted structured field information serves as the basis for contextual reference in this process, helping the system determine which fields have been confirmed and which fields need to be completed, thus avoiding duplicate questions or omissions of key fields when generating user consultation content.
[0082] Specifically, the state management logic integrated into the context tracking process adopts a state machine modeling approach to record the structured field information content of the system's questions, user feedback, and target customer service system's responses in each round of interaction, forming dialogue path identifiers and staged state records to support cross-round content judgment and orderly connection of dialogue context.
[0083] In one embodiment, such as Figure 4 As shown, after step S2011, that is, after performing the semantic understanding process on the user input text and generating the corresponding user semantic expression, the method further includes:
[0084] S2021, detecting whether a holiday awareness trigger field appears in the user semantic expression, if the holiday awareness trigger field does not appear, preparing to execute the step of performing context tracking process on the user semantic expression; the holiday awareness trigger field refers to a semantic keyword or time expression unit associated with a holiday or a specific date in the user semantic expression, which usually includes holiday name, time interval, holiday arrangement and other expression contents, such as "during the Spring Festival", "National Day holiday", "May Day holiday" and the like. When the system identifies these fields in the semantic understanding process, it can be determined that the current consultation content involves a holiday context, thereby triggering the information processing process associated with the holiday.
[0085] S2022, if the holiday awareness trigger field appears, determining the corresponding target area according to the holiday awareness trigger field, and matching the statutory holiday information of the target area based on a public holiday API or a local holiday database; the target area refers to the spatial position identification of the country, region or city level inferred by the system according to the geographical information embodied in the holiday awareness trigger field or the geographical target implied by the user's intention. The target area will be used as the key input condition for querying the statutory holiday information. The holiday length and arrangement of different areas may be different on the same holiday, so it is necessary to clearly point to the geography to ensure the accuracy of the holiday matching; the public holiday API refers to an online data interface service provided for developers to obtain the statutory holiday information of the global or specific country or region. The API can return structured data such as holiday time, holiday name and holiday type through standard network request. The local holiday database refers to an offline data set containing holiday arrangements of multiple areas integrated in the local system, which can provide holiday data query support in a network environment. The two data sources can be selected for use according to the system deployment environment to ensure the coverage and timeliness of the holiday information.
[0086] S2023, according to the statutory holiday information, pushing the corresponding holiday consultation script; the holiday consultation script refers to the natural language dialogue content automatically generated by the system according to the statutory holiday information of the target area after identifying that the user has a holiday-related intention, which is mainly used to prompt the user about the possible service differences such as delivery adjustment and customer service response change during the holiday, help the user form a reasonable expectation, and improve the context adaptation ability of the system response. The language style and content structure of the script are consistent with the current dialogue context, avoiding the insertion of information that affects user experience.
[0087] S2024, if it is detected that the holiday consultation dialogue has been responded to, historical delivery data is obtained, and according to the historical delivery data and statutory holiday information, a corresponding logistics delay time range is calculated and automatically pushed; the historical delivery data refers to the pre-stored logistics processing records of the system about the goods in different time periods, holiday periods or specific regions, and the data content includes delivery processing time, transportation time consumption, distribution fluctuation range, etc. The data is used to evaluate the logistics performance during similar holidays, so as to provide more reference value for the user to estimate the delivery time. The logistics delay time range is the delivery time change interval calculated by the system according to the holiday information of the target region and the historical delivery data, usually in the form of “delay X to Y working days”, which is used to give active prompts in the user consultation process to help users evaluate the potential impact between ordering and receiving.
[0088] Specifically, the system introduces a holiday perception module to determine whether the current consultation involves a holiday scenario based on whether a holiday perception trigger field appears in the user semantic expression.
[0089] When the system detects that the holiday perception trigger field exists in the user semantic expression, it first determines the target region according to the regional information in the field, and calls the preset data interface, including the connected public holiday API or local holiday database, to query the statutory holiday information corresponding to the target region in real time. The holiday perception module can recognize structured holiday data including holiday name, start and end time, holiday type, and incorporate it into the current semantic context.
[0090] After obtaining the holiday information, the system automatically adjusts the original user consultation content based on the context state in the current multi-round dialogue management process, generates holiday consultation dialogue, and customizes the dialogue according to the language habits of the target region and the current consultation intent of the user. For example, when the original consultation content is “when will the goods be delivered”, the system can dynamically generate “does your company arrange delivery during the Spring Festival?” as the holiday consultation dialogue according to the rules of suspending delivery during the holiday in the target region, and send it to the target customer service system through the data interaction channel.
[0091] When the system detects that the holiday consultation dialogue has been responded to by the customer service system, it further calls the historical delivery data module to extract historical logistics processing records matching the current commodity category, target region and holiday time, including the delivery start time and actual delivery time consumption in similar past holiday scenarios. The system establishes a delay prediction model based on this data, combines the statutory holiday information and the actual delivery time, calculates the logistics delay time range in the current scenario, and automatically generates prompt content in natural language to push to the user.
[0092] At the same time, in order to enhance the adaptability of cross-border multi-language interaction, the system calls the integrated multi-language generation model when generating holiday consultation scripts and logistics delay prompts, and translates the generated results into more natural and culturally appropriate expressions in the user's language environment. For example, when the target region is identified as the United Kingdom and the user uses English context, the system will reconfigure the "holiday" expression to "festive season", making the holiday script more in line with the language use preferences of local users, and improving the expression accuracy and interaction experience of intelligent agent systems in multi-language and multi-cultural scenarios.
[0093] In an embodiment, as shown in Figure 5 In step S30, i.e. according to the response information, the structured field information for optimizing the multi-round dialogue management process is extracted, including:
[0094] S301, extract the key fields in the response information; the key field refers to the core data segment directly related to the user's current consultation intent identified from the response information returned by the target customer service system. These fields usually appear in natural language, but carry clear product parameters, status information or time-sensitive data, such as "3-5 working days for delivery", "out of stock", "model X300", etc. The extraction of key fields relies on intelligent language models to perform semantic decomposition and intent labeling on response statements, ensuring that semantically valid content is identified from unstructured text and enters the subsequent processing flow.
[0095] S302, based on the local verification database, the key fields are logically verified; the key field refers to the core data segment directly related to the user's current consultation intent identified from the response information returned by the target customer service system. These fields usually appear in natural language, but carry clear product parameters, status information or time-sensitive data, such as "3-5 working days for delivery", "out of stock", "model X300", etc. The extraction of key fields relies on intelligent language models to perform semantic decomposition and intent labeling on response statements, ensuring that semantically valid content is identified from unstructured text and enters the subsequent processing flow.
[0096] S303, mapping the key field passing through the logical verification to a predefined local mapping library to match the corresponding structure field; the local mapping library is a set of structure field mapping relationship collection preset in the system, used to convert the key field passing through the logical verification into a standardized structure field form for multi-round dialogue management process calling. Mapping rules from natural language description to structured field label are established in the mapping library, for example, mapping "3-5 working days" to the field name "estimatedDeliveryTime" and mapping "X300" to the field name "productModel", so that the system can continuously use unified field expression in different conversations.
[0097] S304, classifying and storing each structure field to generate corresponding structured field information; the classified storage means that the system groups and stores the multiple mapped structure fields according to attribute types, field purposes or belonging business modules, for example, storing the delivery information field, the product specification field and the customer service reply state field into different structured information partitions respectively, so as to improve the field calling efficiency and context management ability.
[0098] In an embodiment, as shown in FIG. 4, in the step S40 of generating and pushing the corresponding follow-up dialogue according to the reply information and the structured field information, the step includes: Figure 6
[0099] S401, judging whether the reply information is complete, if yes, waiting for receiving new user input text;
[0100] S402, if not, comparing the reply information and the structured field information to identify the corresponding target field; the target field refers to the key field that is not fully answered or the semantic expression of which is not complete in the reply information, which is identified by comparing and analyzing the reply content returned by the current customer service system and the stored structured field information. These fields usually correspond to the core consultation points of the current round of the user, such as product model, delivery time, price or inventory information, etc. When the system finds that the reply content does not explicitly involve these fields or only provides ambiguous responses such as "please wait", "need to confirm" and the like, it can be determined that the reply is not complete, and the specific target field is located.
[0101] S403, call a preset dialogue template, and complete the dialogue template based on the target field; the dialogue template is a set of semi-structured language templates preset in the system, which is used to generate standard questions or supplementary dialogue content that conforms to the context logic. The template usually contains field placeholders that can be dynamically replaced, such as "Please ask
field name
field name
[0102] S404, performing natural language reconstruction operation on the completed dialogue template to generate follow-up dialogue that is consistent with the context style in the response information; the natural language reconstruction operation refers to the system further adjusting the language style and semantic completeness of the preliminary dialogue template through an intelligent language model, so that it is more consistent with the current dialogue context and has stronger human expression characteristics. This operation not only performs vocabulary replacement and syntax optimization, but also considers user language habits, customer service response language style and other elements, so as to generate follow-up dialogue that conforms to the context tone, is clear in expression and has natural transition. The generated dialogue can avoid mechanical template expression, and enhance user acceptance and interaction experience.
[0103] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0104] In an embodiment, an intelligent agent device based on an intelligent language model is provided, which corresponds one-to-one to the intelligent agent method based on an intelligent language model described above. As shown in the figure, the intelligent agent device based on an intelligent language model includes an identification module, a first generation module, a receiving module, a second generation module and a determination module. The functions of each module are described in detail as follows: Figure 7
[0105] An intelligent agent device based on an intelligent language model, which includes:
[0106] The identification module is configured to identify the communication protocol type of the target customer service system, set the corresponding interaction parameters according to the communication protocol type, and establish a data interaction channel with the target customer service system;
[0107] The first generation module is configured to perform a multi-turn dialogue management process on the user input text based on an intelligent language model, generate corresponding user consultation content, and send the user consultation content to the target customer service system through the data interaction channel, wherein the user consultation content comprises holiday consultation scripts generated for a target region in the user input text.
[0108] The receiving module is configured to receive response information returned by the target customer service system based on the user consultation content, and extract structured field information for optimizing the multi-turn dialogue management process according to the response information.
[0109] The second generation module is configured to generate and push corresponding follow-up scripts according to the response information and the structured field information.
[0110] The determining module is configured to obtain user feedback information, determine corresponding strategy adjustment parameters according to the user feedback information, and use the strategy adjustment parameters to optimize the generation process of the user consultation content and the follow-up scripts.
[0111] Optionally, the identification module comprises:
[0112] The receiving unit is configured to receive multi-modal input data provided by a user, wherein the multi-modal input data comprises text data, image data, and table data.
[0113] The first execution unit is configured to perform a parsing operation on the multi-modal input data to generate corresponding user initial demands, wherein the parsing operation comprises an image recognition operation of extracting text content in the image data through an optical character recognition algorithm, and a table recognition operation of extracting field information in the table data through a structured parsing method.
[0114] The first generation unit is configured to perform intent classification on the user initial demands based on an intelligent language model to generate corresponding target consultation intent types.
[0115] The determining unit is configured to determine a communication protocol type of the target customer service system according to a preset technical architecture of the target customer service system and the target consultation intent types, wherein the preset technical architecture comprises a RESTful API architecture and a WebSocket architecture.
[0116] The establishing unit is configured to set corresponding interaction parameters according to the communication protocol type to establish a data interaction channel with the target customer service system.
[0117] Optionally, in the first generation module, the multi-turn dialogue management process comprises at least a semantic understanding process and a context tracking process, and the first generation module further comprises:
[0118] The second generating unit is configured to perform semantic understanding on the user input text based on the intelligent language model, and generate a corresponding user semantic expression.
[0119] The second executing unit is configured to perform context tracking on the user semantic expression, and generate user consultation content of a current round based on the historical structured field information.
[0120] Optionally, the first generating module further comprises:
[0121] The detecting unit is configured to detect whether a holiday awareness trigger field appears in the user semantic expression, and if not, prepare to perform the step of performing context tracking on the user semantic expression.
[0122] The first matching unit is configured to, if the holiday awareness trigger field appears, determine a corresponding target area according to the holiday awareness trigger field, and match statutory holiday information of the target area based on a public holiday API or a local holiday database.
[0123] The pushing unit is configured to push corresponding holiday consultation scripts according to the statutory holiday information.
[0124] The calculating unit is configured to, if it is detected that the holiday consultation script has been responded, acquire historical delivery data, and calculate and automatically push a corresponding logistics delay time range according to the historical delivery data and the statutory holiday information.
[0125] Optionally, the receiving module comprises:
[0126] The extracting unit is configured to extract key fields in the response information.
[0127] The checking unit is configured to perform logical checking on the key fields based on a local checking database.
[0128] The second matching unit is configured to map the key fields that pass the logical checking to a predefined local mapping library, so as to match corresponding structured fields.
[0129] The third generating unit is configured to store each structured field in a classified manner, and generate corresponding structured field information.
[0130] Optionally, the second generating module comprises:
[0131] The judging unit is configured to judge whether the response information is complete, and if so, wait for receiving new user input text.
[0132] The unit is configured to, if not, compare the response information and the structured field information, and identify corresponding target fields.
[0133] The calling unit is configured to call a preset dialogue template, and complete the dialogue template based on the target field;
[0134] The fourth generating unit is configured to perform a natural language reconstruction operation on the completed dialogue template to generate a follow-up dialogue consistent with the contextual style in the response information.
[0135] The specific definition of the intelligent agent device based on the intelligent language model can refer to the definition of the intelligent agent method based on the intelligent language model in the foregoing, and will not be described here. Each module in the intelligent agent device based on the intelligent language model can be realized by software, hardware, and a combination thereof, in whole or in part. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform the operations corresponding to each module.
[0136] In one embodiment, a computer device can be provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 8 The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement an intelligent agent method based on an intelligent language model.
[0137] In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0138] S10, identifying a communication protocol type of a target customer service system, setting corresponding interaction parameters according to the communication protocol type, and establishing a data interaction channel with the target customer service system;
[0139] S20, based on an intelligent language model, performing a multi-round dialogue management process on user input text to generate corresponding user consultation content, and sending the user consultation content to the target customer service system through the data interaction channel, the user consultation content including holiday consultation dialogue generated for a target region in the user input text;
[0140] S30, receive the response information returned by the target customer service system based on the user consultation content, and extract structured field information for optimizing the multi-turn dialogue management process according to the response information;
[0141] S40, generate and push corresponding follow-up questions according to the response information and the structured field information;
[0142] S50, obtain user feedback information, and determine corresponding strategy adjustment parameters according to the user feedback information, the strategy adjustment parameters being used for optimizing the generation process of the user consultation content and the follow-up questions;
[0143] In one embodiment, a computer readable storage medium is provided, and the computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement the following steps:
[0144] S10, identify the communication protocol type of the target customer service system, set corresponding interaction parameters according to the communication protocol type, and establish a data interaction channel with the target customer service system;
[0145] S20, based on an intelligent language model, perform a multi-turn dialogue management process on user input text, generate corresponding user consultation content, and send the user consultation content to the target customer service system through the data interaction channel, the user consultation content including holiday consultation questions generated for a target region in the user input text;
[0146] S30, receive the response information returned by the target customer service system based on the user consultation content, and extract structured field information for optimizing the multi-turn dialogue management process according to the response information;
[0147] S40, generate and push corresponding follow-up questions according to the response information and the structured field information;
[0148] S50, obtain user feedback information, and determine corresponding strategy adjustment parameters according to the user feedback information, the strategy adjustment parameters being used for optimizing the generation process of the user consultation content and the follow-up questions;
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0150] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions.
[0151] The above-described embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of an intelligent agent based on an intelligent language model, characterized by, The intelligent agent method based on the intelligent language model comprises: Identify the communication protocol type of the target customer service system, set the corresponding interaction parameters according to the communication protocol type, and establish a data interaction channel with the target customer service system; Based on the intelligent language model, a multi-round dialogue management process is performed on the user input text to generate corresponding user consultation content, and the user consultation content is sent to the target customer service system through the data interaction channel, the user consultation content including holiday consultation scripts generated for the target region in the user input text; Receive the response information returned by the target customer service system based on the user consultation content, and extract the structured field information used to optimize the multi-round dialogue management process according to the response information; According to the response information and the structured field information, generate and push corresponding follow-up questions; Obtain user feedback information, and determine corresponding strategy adjustment parameters according to the user feedback information, the strategy adjustment parameters being used to optimize the generation process of the user consultation content and the follow-up questions; In the step of identifying the communication protocol type of the target customer service system, setting the corresponding interaction parameters according to the communication protocol type, and establishing a data interaction channel with the target customer service system, it comprises: Receive the multi-modal input data provided by the user, the multi-modal input data including text data, image data and table data; Perform parsing operation on the multi-modal input data to generate corresponding user initial demand, the parsing operation including image recognition operation of extracting text content in image data by optical character recognition algorithm, and table recognition operation of extracting field information in table data by structured parsing method; Classify the user initial demand to generate corresponding target consultation intent type; According to the preset technical architecture of the target customer service system and the target consultation intent type, determine the communication protocol type of the target customer service system, and the preset technical architecture includes RESTful API architecture and WebSocket architecture; Set the corresponding interaction parameters according to the communication protocol type to establish a data interaction channel with the target customer service system.
2. The method of claim 1, wherein, In the step of performing multi-round dialogue management process on the user input text based on the intelligent language model to generate corresponding user consultation content, the multi-round dialogue management process at least includes semantic understanding process and context tracking process, and the step further comprises: Based on the intelligent language model, perform semantic understanding process on the user input text to generate corresponding user semantic expression; Perform context tracking process on the user semantic expression, and generate current round of user consultation content based on the historical extracted structured field information.
3. The method of claim 2, wherein, After the step of performing semantic understanding process on the user input text to generate corresponding user semantic expression, it further comprises: Detect whether holiday awareness trigger field appears in the user semantic expression, if no holiday awareness trigger field appears, prepare to perform the step of performing context tracking process on the user semantic expression; If a holiday awareness trigger field is present, a corresponding target region is determined according to the holiday awareness trigger field, and legal holiday information of the target region is matched based on a public holiday API or a local holiday database; According to the legal holiday information, corresponding holiday consultation scripts are pushed; If it is detected that the holiday consultation scripts have been responded, historical delivery data is obtained, and a corresponding logistics delay time range is calculated and automatically pushed according to the historical delivery data and the legal holiday information.
4. The method of claim 1, wherein, The step of extracting structured field information for optimizing the multi-round dialogue management process according to the response information includes: Extracting key fields in the response information; Performing logical verification on the key fields based on a local verification database; Mapping the key fields that pass the logical verification to a predefined local mapping library to match corresponding structure fields; Classifying and storing each structure field to generate corresponding structured field information.
5. The method of claim 1, wherein, The step of generating and pushing corresponding follow-up scripts according to the response information and the structured field information includes: Determining whether the response information is complete, if it is complete, waiting for new user input text; If it is not complete, comparing the response information and the structured field information to identify corresponding target fields; Calling a preset script template, and completing the script template based on the target fields; Performing natural language reconstruction operations on the completed script template to generate follow-up scripts consistent with the context style in the response information.
6. An intelligent agent apparatus based on an intelligent language model, characterized by The intelligent agent device based on an intelligent language model includes: An identification module for identifying the communication protocol type of a target customer service system, setting corresponding interaction parameters according to the communication protocol type, and establishing a data interaction channel with the target customer service system; A first generation module for generating corresponding user consultation content by performing a multi-round dialogue management process on user input text based on an intelligent language model, and sending the user consultation content to the target customer service system through the data interaction channel, the user consultation content including holiday consultation scripts generated for a target region in the user input text; A receiving module for receiving response information returned by the target customer service system based on the user consultation content, and extracting structured field information for optimizing the multi-round dialogue management process according to the response information; A second generation module for generating and pushing corresponding follow-up scripts according to the response information and the structured field information; A determination module for obtaining user feedback information, determining corresponding strategy adjustment parameters according to the user feedback information, and using the strategy adjustment parameters to optimize the generation process of the user consultation content and the follow-up scripts; The identification module includes: A receiving unit for receiving multi-modal input data provided by a user, the multi-modal input data including text data, image data, and table data; The first execution unit is configured to perform a parsing operation on the multi-modal input data to generate a corresponding user initial demand, the parsing operation including an image recognition operation of extracting text content of image data by an optical character recognition algorithm and a table recognition operation of extracting field information in table data by a structured parsing manner; The first generation unit is configured to perform intent classification on the user initial demand based on an intelligent language model to generate a corresponding target consultation intent type; The determination unit is configured to determine a communication protocol type of the target customer service system according to a preset technical architecture of the target customer service system and the target consultation intent type, the preset technical architecture including a RESTful API architecture and a WebSocket architecture; The establishment unit is configured to set a corresponding interaction parameter according to the communication protocol type to establish a data interaction channel with the target customer service system.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the steps of the intelligent agent method based on the intelligent language model according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by the processor to implement the steps of the intelligent agent method based on the intelligent language model according to any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent customer service system and customer service method based on large language model
CN117593013A
Intelligent customer service method, device and system
CN120353906A