Method, device, program product, and storage medium for dialog with distribution capacity

By identifying and classifying the questions from delivery capacity clients, processing logic was designed for instruction-type, query-type, and question-type questions. This solved the problem that large language models could not accurately understand delivery capacity needs in the instant delivery field, and achieved efficient interaction and accurate answers covering all scenarios.

CN121144472BActive Publication Date: 2026-03-31ZHEJIANG NIAOCHAO SUPPLY CHAIN MANAGEMENT CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-18
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In the field of on-demand delivery, existing large language models struggle to accurately understand the diverse needs of delivery capacity, resulting in an inability to effectively assist delivery capacity in operations, information retrieval, or answering questions.

Method used

By identifying the categories of queries from delivery capacity clients and designing corresponding processing logic for different categories, including triggering client operations, querying the database, or generating answers using a knowledge base, the dialogue system achieves full-scenario coverage.

Benefits of technology

It enables accurate handling of inquiries about delivery capacity in operation, query, and question-and-answer scenarios, reducing manual operations and improving interaction efficiency and response accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144472B_ABST
    Figure CN121144472B_ABST
Patent Text Reader

Abstract

The specification provides a method, device, program product and storage medium for dialogue with delivery capacity, the method comprising: obtaining current query content Query of delivery capacity through a delivery capacity client, identifying the category of Query; if the category is an instruction type Query representing the need to operate the delivery capacity client, triggering the delivery capacity client to perform the expected operation corresponding to Query and generate a reply; if the category is a query type Query representing the need to query the delivery service information of the delivery capacity, querying the data satisfying the query requirement corresponding to Query from the delivery service database to generate a reply; if the category is a problem type Query, querying the knowledge set related to Query from the knowledge base storing the knowledge of delivery service, and inputting Query and the knowledge set into a preset delivery service special language model to generate a reply.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of artificial intelligence technology, and in particular to methods, devices, program products and storage media for communicating with delivery capacity. Background Technology

[0002] Currently, Large Language Models (LLMs) are becoming increasingly popular. In fields such as dialogue, users can ask questions to LLMs, inputting textual questions into the LLM and receiving the generated content as a response. However, in some application scenarios, such as instant delivery, the demand for delivery capacity is diverse. Therefore, accurately understanding the questions regarding delivery capacity and assisting in delivery is a pressing technical problem that needs to be solved. Summary of the Invention

[0003] To overcome the problems existing in the related technologies, this manual provides methods, equipment, program products and storage media for communicating with delivery capacity.

[0004] According to a first aspect of the embodiments of this specification, a method for communicating with delivery capacity is provided, the method comprising:

[0005] After obtaining the current query content (Query) of the delivery capacity through the delivery capacity client, the category to which the Query belongs is identified;

[0006] If the category of the Query is identified as a command-type Query that represents an operation that needs to be performed on the delivery capacity client, the delivery capacity client is triggered to execute the expected operation corresponding to the Query and generate a response to the Query;

[0007] If the category of the Query is identified as a Query class that represents the need to query delivery service information of the delivery capacity, the data that meets the query requirements corresponding to the Query is retrieved from the delivery service database, and a response to the Query is generated;

[0008] If the query is identified as belonging to a question related to delivery services, the knowledge set related to the query is retrieved from the knowledge base storing knowledge about delivery services. The query and the knowledge set are then input into a preset delivery service-specific language model to generate a response to the query.

[0009] According to a second aspect of the embodiments of this specification, a method for communicating with delivery capacity is provided, the method being applied to a delivery capacity client, the method comprising:

[0010] The current input for obtaining delivery capacity;

[0011] The current input is sent to the server, which is used to perform the steps of the method described in the first aspect;

[0012] Obtain and output the response sent by the server.

[0013] According to a third aspect of the embodiments of this specification, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method embodiments described in the first or second aspects above.

[0014] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the method embodiments described in the first or second aspect above.

[0015] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method embodiments described in the first or second aspect above.

[0016] The technical solutions provided in the embodiments of this specification may include the following beneficial effects:

[0017] In this embodiment, targeting the delivery service scenario, the queries for delivery capacity are categorized into three types: instruction queries requiring operation of the delivery capacity client, query queries requiring retrieval of delivery service information from the delivery capacity, and queries asking questions related to delivery services. Different processing logics are designed based on the category. For instruction queries, the system helps users trigger the delivery capacity client to perform the user's desired operation, eliminating the need for manual client operation by the delivery capacity. For query queries, accurate data can be retrieved from the database. For question queries related to delivery services, an accurate answer can be generated using a knowledge base. Therefore, this embodiment, through categorization processing, achieves full-scenario coverage of "operation-query-question-answer" in the dialogue scenario of the delivery service field, accurately providing assistance to delivery capacity.

[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the architecture of a dialogue system illustrated in this specification according to an exemplary embodiment.

[0020] Figure 2A This specification illustrates a flowchart of a dialogue with delivery capacity according to an exemplary embodiment.

[0021] Figure 2B This specification illustrates an architecture diagram for communicating with delivery capacity according to an exemplary embodiment.

[0022] Figure 3 This is another flowchart illustrating a dialogue with delivery capacity, as shown in this specification according to an exemplary embodiment.

[0023] Figure 4 This specification is a hardware structure diagram of a computer device containing an apparatus for communicating with delivery capacity, according to an exemplary embodiment.

[0024] Figure 5 This is a block diagram illustrating an apparatus for communicating with delivery capacity according to an exemplary embodiment of this specification. Detailed Implementation

[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0026] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0027] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0028] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data shall comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals shall be provided for users to choose to authorize or refuse.

[0029] Currently, Large Language Models (LLMs) demonstrate excellent performance in semantic understanding, logical reasoning, and summarization. Therefore, many technical fields have utilized LLM technology to develop dialogue systems. However, in the field of on-demand delivery, when faced with questions from delivery personnel, textual responses from LLMs alone may be insufficient to assist them. Therefore, this specification provides a method for engaging in dialogue with delivery personnel, accurately identifying their intentions and providing more targeted assistance. The embodiments of this specification will now be described in detail.

[0030] Figure 1 This is a schematic diagram of the architecture of a dialogue system provided in an exemplary embodiment. Figure 1 As shown, the system may include a server 11, a network 12, and several terminals, including but not limited to a personal computer (PC) 13, a mobile phone 14, etc.

[0031] Server 11 can be a physical server containing an independent host, or it can be a virtual server hosted in a host cluster. During operation, server 11 can run server-side programs for a certain application to implement the relevant functions of that application. For example, when server 11 runs a dialog service program, it can act as a corresponding dialog server.

[0032] PC13 and mobile phone14 are just some of the types of terminals that users can use. In reality, users can obviously also use terminals such as tablets, laptops, PDAs, wearable devices (such as smart glasses, smartwatches, etc.), etc., and one or more embodiments in this specification do not limit this. During operation, the terminal can run a client-side program of an application to implement the relevant functions of that application. For example, the delivery capacity client in this embodiment is an application installed on the terminal, or it can be a mini-program, quick app, or other similar form. Of course, when using web technologies such as HTML5 or similar, the relevant functions can be implemented through a page displayed by a browser. This browser can be a standalone browser application or a browser module embedded in some applications.

[0033] As for the network 12 that enables interaction between terminals such as PC13 and mobile phone 14 and server 11, communication can be achieved using either wired or wireless networks based on the communication methods supported by the respective terminals. This specification does not impose any restrictions on this. For example, PC13 can support both wired and wireless communication, so it can use either wired or wireless networks as needed. Mobile phone 14 typically only supports wireless communication, so it can use a wireless network for communication.

[0034] like Figure 2A As shown, Figure 2A This is a flowchart illustrating a dialogue method according to an exemplary embodiment, comprising the following steps:

[0035] In step S202, after obtaining the current query content of the delivery capacity from the dialog page of the delivery capacity client, the category to which the query belongs is identified.

[0036] In step S204, if the category of the Query is identified as a Query that represents an instruction class Query that requires operation on the delivery capacity client, the delivery capacity client is triggered to execute the expected operation corresponding to the Query and generate a response to the Query.

[0037] In step S206, if the category of the Query is identified as a Query class that represents the need to query the delivery service information of the delivery capacity, the data that meets the query requirements corresponding to the Query is queried from the delivery service database, and a response to the Query is generated.

[0038] In step S208, if the category of the Query is identified as a question related to delivery services, the knowledge set related to the Query is retrieved from the knowledge base storing knowledge about the delivery services. The Query and the knowledge set are then input into a preset delivery service-specific language model to generate a response to the Query.

[0039] As an example, the dialogue method in the embodiments of this specification can be provided by Figure 1The dialogue can be executed by either a server or a client. For example, during the dialogue process, a delivery capacity client running on the terminal can provide a question input function to the delivery capacity. This client can obtain the input from the delivery capacity. The question input function includes, but is not limited to, voice input, text input, and visual input (such as images or videos). A single input from the delivery capacity can include one or more of the above-mentioned voice, text, images, or videos. Optionally, the client can obtain a corresponding response by executing the method of this embodiment after obtaining the input. Alternatively, the client can send the obtained input to the server, and the server can obtain a corresponding response by executing the method of this embodiment and return it to the client to provide to the delivery capacity. Alternatively, in other scenarios, it is also optional for some processes in the dialogue method of this embodiment to be executed on the delivery capacity client and some processes to be executed on the server. This embodiment does not limit this.

[0040] The current query content (Query) in step 202 can be either input of delivery capacity or extracted from it. This embodiment does not limit the specific format. For example, it can be text, voice, or image format. For instance, if the input includes voice, it can be converted to text; if the input includes text, the text can be directly used as the query; if the input includes images or videos, they can be processed as needed, or the images or videos can be directly used as the query, as long as the designed dialogue system supports the format.

[0041] In this embodiment, the system identifies the categories of queries and designs at least three categories of queries based on the instant delivery scenario, as well as the corresponding processing links for each category.

[0042] As an example, in practical applications, the specific implementation method for identifying the category to which the query belongs can be set according to actual needs, such as using a pre-trained machine learning model for identification. Optionally, each category can correspond to a separate machine learning model, or a single machine learning model can be used to identify which category the query belongs to; this embodiment does not limit this.

[0043] (a) Command-type Query;

[0044] Command queries are instructions that require specific actions to be performed on the delivery service client. They can contain explicit action requirements (such as "open," "set," "switch," etc.) with the goal of triggering specific functions on the client. For example, these could be actions that the delivery service needs to perform on the client during the delivery process, including but not limited to: "start accepting orders," "navigation," "arrival at store," "order picked up," "contact merchant," "contact recipient," and "stop accepting orders."

[0045] As an example, examples of this type of query could be: "Help me stop accepting orders", "Set up automatic order acceptance mode", "Help me confirm receipt", etc.

[0046] As an example, intent recognition technology can be used to identify the expected action indicated by the query; for example, natural language processing can be used to extract the action verbs (such as "open" or "set") and the target object to be operated on (such as "route map" or "order mode").

[0047] As an example, to trigger the delivery capacity client to execute the desired operation, a client function module bound to each desired operation can be pre-configured. When the desired operation corresponding to the current query is identified, the corresponding client function module can be determined and invoked to execute the desired operation. For example, the client API can be called to request the client function module to be started to execute the desired operation.

[0048] Therefore, this embodiment can convert user instructions into executable client operation instructions, realizing the conversion of user queries into client operations without requiring manual user intervention. After triggering the delivery capacity client to execute the expected operation corresponding to the query, a response to the query can be generated. For example, a response to the query can be generated based on the client's execution result, such as an execution result indicating successful completion or failure. Whether or not a language model is needed to generate the response to the query is optional. For example, preset response content representing "successful completion" or "failure" can be pre-configured, thus eliminating the need to call an LLM and improving response efficiency.

[0049] Optionally, the above response can be output to the delivery personnel through the delivery capacity client. The output method can be configured according to actual needs, such as text or voice. For example, the response can be output by the delivery personnel entering a query in the client; if the delivery personnel enter the query by voice, the response can be output by voice.

[0050] (ii) Query class;

[0051] A query is a query that retrieves specific data from a delivery service database; it may involve specific data requirements (such as order information, delivery range, revenue statistics, etc.), and the answer can be obtained from the database.

[0052] As an example, examples of this type of query could include: "Query my total number of orders today", "Total delivery revenue for the last 3 days", "Show the area with the highest number of orders around me", etc.

[0053] As an example, a database storing delivery service information can be pre-set. This database can store delivery service information available for delivery capacity. For instance, this database could be an existing database storing relevant information about delivery capacity provided by the delivery capacity service provider, or it could be built upon an existing database. The database can store structured data related to delivery capacity, including fields such as, but not limited to, the following examples:

[0054] Basic information and behavioral data of delivery capacity to support personalized queries by delivery capacity; for example, delivery capacity identifier, nickname, level, delivery area, total historical completed orders, average delivery time, etc.

[0055] Basic order information to support delivery capacity inquiries about orders; such as order identifier, delivery capacity identifier, order creation time, order completion time, delivery duration, merchant identifier, store identifier, store address, etc.

[0056] Delivery cost information for delivery capacity, to support inquiries about delivery costs; for example, basic delivery fee subsidies, total order revenue, etc.

[0057] Regional order distribution data to support spatial queries of delivery areas, such as business district name, business district location, number of delivery orders in the business district, order density in the business district, and peak order times in the business district.

[0058] Optionally, you can also set query permissions for delivery capacity. When querying data, you can query the data that the delivery capacity can query based on the preset query permissions. For example, query permissions can refer to the fields or data range that the delivery capacity can query. For example, certain data of a business district can be queried by each delivery capacity, and each delivery capacity can only query its own personal information or the order information it has delivered.

[0059] Optionally, the delivery capacity client can also obtain other information, such as the delivery capacity identifier, the current geographical location of the delivery capacity, and the identifier of the orders currently being delivered by the delivery capacity, to assist in data querying.

[0060] As an example, the query can be parsed to identify dimensions to be queried (such as time "today", object "total number of orders", range "geographical area near the user's address", etc.). Based on the parsing results, an SQL statement that can be queried in the database is generated, and the database management system is requested to execute this SQL statement to obtain the query results returned by the database management system. After obtaining the query results, a response to the query can be generated, for example, the response containing the query results. If the query results are structured data (such as numbers or tables), the query results can be converted into a natural language response (such as "You completed 12 deliveries today").

[0061] Similarly, whether or not a language model needs to be introduced in the process of generating the response to the query is optional. For example, a small-scale language model can be preset, and the query data can be input into the language model. The language model will then convert the query data into a natural language response, which can be output to the delivery capacity in the delivery capacity client.

[0062] Therefore, this embodiment can convert natural language queries into database query language through semantic parsing, and can query the data required for delivery capacity to obtain an accurate answer that meets the delivery capacity requirements.

[0063] (iii) Question-based queries;

[0064] Question-based queries refer to non-data-related questions concerning rules or procedures related to delivery services. These can involve knowledge-based content (such as "how to appeal an abnormal order" or "how to apply for subsidies"), and the answers are derived from a pre-set knowledge base or business logic.

[0065] As an example, examples of this type of query could be: "What should I do if a customer refuses to accept the food?", "What are today's subsidy rules?", "What should I do if the merchant does not serve the food on time?", etc.

[0066] As an example, a delivery service knowledge base that stores knowledge related to delivery services can be pre-built, and a delivery service-specific language model can be trained (such as fine-tuning the delivery service domain based on an existing large language model). Therefore, for a delivery capacity query, a knowledge set (containing one or more knowledge fragments) related to the query can be retrieved from the pre-built delivery service knowledge base, and a response to the query can be generated using the delivery service-specific language model and the knowledge set.

[0067] Therefore, in this embodiment, by combining knowledge base retrieval with language model generation based on retrieval enhancement technology, the accuracy of the response can be guaranteed by relying on the knowledge base.

[0068] As can be seen from the above embodiments, this embodiment classifies the queries for delivery capacity in the delivery service scenario and designs three categories: instruction queries that require operation of the delivery capacity client, query queries that require querying the delivery service information of the delivery capacity, and queries that ask questions related to delivery services. Different processing logics are designed based on the category. For instruction queries, it helps users trigger the delivery capacity client to perform the user's expected operation, eliminating the need for manual client operation by the delivery capacity. For query queries, accurate data can be retrieved from the database. For question queries related to delivery services, an accurate answer can be generated using a knowledge base. Therefore, this embodiment, through classification processing, achieves full-scenario coverage of "operation-query-question-answer" in the dialogue scenario of the delivery service field, and can accurately provide assistance for the delivery capacity's questions.

[0069] To accurately identify the category to which a query belongs, in some examples, identifying the category to which the query belongs includes:

[0070] Using a pre-trained first intent recognition model, the category of the Query is identified as an instruction Query, a query Query, or a question-and-answer Query;

[0071] If the Query is identified as a question-and-answer type Query, the pre-trained second intent recognition model is used to identify the category of the Query as a chat type Query, a preset question type Query, or a question type Query related to the delivery service.

[0072] The method further includes:

[0073] If the query is classified as a chat query, a response to the query is generated using a preset general language model.

[0074] If the category of the Query is a preset question type Query, the answer corresponding to the Query is retrieved from the preset frequently asked questions dataset; wherein, the frequently asked questions dataset contains historical frequently asked questions and their corresponding answers.

[0075] In this embodiment, in addition to instruction category and query category, the Query index is considered. The category identification of the Query adopts a hierarchical processing of a two-level intent recognition model.

[0076] like Figure 2BThe diagram shown is an architecture diagram of a dialogue with delivery capacity according to an exemplary embodiment of this specification. As shown in the figure, optionally, this embodiment may also introduce an access control (risk control) system to perform risk control on the current query content. For non-compliant queries, a unified response can be adopted. If the access is approved, the first level of intent recognition can be entered, which can be implemented using the first intent recognition model of this embodiment.

[0077] The first intent recognition model can be used for preliminary classification, roughly dividing queries into three categories: instruction-based, query-based, and question-and-answer-based, providing the first level of routing for subsequent processing. The input to this model can be a query, and its output can be information indicating whether the query belongs to one of the three categories: instruction-based, query-based, or question-and-answer-based.

[0078] like Figure 2B As shown, for question-and-answer type queries, a second level of intent recognition is performed, implemented by a second intent recognition model. This second intent recognition model is used to perform secondary classification of question-and-answer type queries. That is, when the first model identifies a query as a "question-and-answer type query," it further subdivides it into chat-type, preset question-type, and delivery service-related question-type (i.e., the business question in the diagram). The input to this model can be a query, and its output can be information indicating whether the query belongs to one of the three categories: chat-type, preset question-type, or delivery service-related question-type.

[0079] Chat queries refer to questions unrelated to delivery services, such as casual conversation or emotional exchanges, like "Hello" or "What's your name?" These questions do not involve delivery services and do not contain keywords related to delivery services; the content is mostly everyday conversation. As an example, chat queries do not require access to a knowledge base; for example, they can generate answers using a pre-defined general language model. Therefore, they do not require knowledge bases and delivery service-specific language models, unlike the aforementioned question queries related to delivery services.

[0080] Among them, the preset question type query corresponds to predefined standard questions, that is, frequently asked questions (FAQs) from the past. The question expression of this type of query is fixed and has a fixed answer, that is, the answer is structured and standardized content. As an example, the preset question type query includes, but is not limited to, "How to bind a bank card" and "How to change my login password".

[0081] For example, as an example, this embodiment can pre-set a frequently asked question dataset. Frequently asked questions refer to historically high-frequency questions about delivery capacity, and the dataset contains the corresponding answers to these questions. Logically, the process could involve querying the answer corresponding to the query from the pre-set frequently asked question dataset. For instance, the dataset can be used to locate the question item that best matches the query through keyword matching or semantic similarity calculation, and the corresponding standard answer can be directly extracted from the dataset and returned. Therefore, this embodiment eliminates the need for a language model to generate answers, thus improving the efficiency of answer generation.

[0082] For queries related to delivery services, such as Figure 2B As shown, an LLM can utilize a knowledge base to generate accurate answers through retrieval enhancement technology. Similarly, chat queries and preset question queries will have corresponding answers. These answers can also be selected to pass the exit (risk control) system. The generated answers will be subject to risk control. If the system determines that the answer is eligible for exit, it can be output to the user (delivery capacity).

[0083] In practical applications, the first intent recognition model and the second intent recognition model can be obtained by using language models and fine-tuning them. The specific language model can be selected or constructed according to actual needs, and this embodiment does not limit this.

[0084] As an example, for a first intent recognition model, training data can be prepared in advance, such as three types of samples: instruction-type queries, query types, and question-and-answer queries, to train the first intent recognition model. Optionally, a prompt template can also be pre-configured. This prompt template is used to generate input data to the first intent recognition model. The information contained in the prompt template can be set according to actual needs. For example, it can include: definitions, descriptions, classification rules, reference examples, and restrictions on the output format of the model's output data for the three types of queries: instruction-type queries, query types, and question-and-answer queries.

[0085] As an example, for the second intent recognition model, training data can be prepared in advance, such as three types of samples: chat queries, preset question queries, or questions related to delivery services, to train the second intent recognition model. Optionally, a prompt template can also be pre-configured. This prompt template is used to generate input data to the second intent recognition model. The information contained in the prompt template can be set according to actual needs. For example, it can include: definitions, descriptions, classification rules, reference examples, and restrictions on the format of the model's output data for the three types of queries: chat queries, preset question queries, or questions related to delivery services.

[0086] Optionally, the aforementioned intent recognition model can be a large language model or a small-scale machine learning model, such as the BERT model, etc., and this embodiment does not limit it. Optionally, the online dialogue stage has high requirements for dialogue speed. In order to improve efficiency, the first intent recognition model / second intent recognition model used to identify the category of the query during the online dialogue process in this embodiment can be a machine learning model, such as a Transformer-based model or the BERT model, etc.; the first intent recognition model / second intent recognition model can be pre-trained using a large language model through distillation.

[0087] As seen in the above embodiments, this embodiment achieves accurate classification from "coarse-grained" to "fine-grained" through the collaboration of two-level models, providing differentiated processing strategies for different types of queries, ultimately improving the interaction efficiency and response accuracy of the delivery capacity client. Specifically, the multi-category recognition task is decomposed into two steps: coarse classification by the first intent recognition model followed by fine classification by the second intent recognition model, improving the classification accuracy of queries. Furthermore, a secondary subdivision of "question-answering" categories avoids confusion between casual conversation, standard questions, and complex delivery service questions, ensuring accurate matching in subsequent processing. Moreover, preset question categories can directly retrieve answers from the frequently asked question dataset; only questions related to delivery services, which are more complex, utilize a large language model, reducing computational costs.

[0088] In practical applications, a Query can also involve multiple categories. For example, it can identify whether the current query regarding delivery capacity is divided into multiple sub-Queryes, and can identify the category to which each sub-Query belongs. Based on this, the category to which a Query belongs can include the categories to which each sub-Query belongs. Therefore, according to the category to which each sub-Query belongs, the corresponding process can be executed for each sub-Query. For example, the corresponding processing of this embodiment can be executed for instruction-type sub-Query, query-type sub-Query, chat-type Query, preset question-type Query, and question-type Query related to delivery services. The response to a Query can obtain the processing results of each sub-Query of the Query and generate a response.

[0089] In some examples, triggering the delivery capacity client to execute the desired operation corresponding to the Query includes:

[0090] After obtaining the keywords contained in the Query, the interface information of the expected operation that matches the keywords contained in the Query is retrieved from the predefined operation mapping table; the operation mapping table contains the keywords of each operation and the corresponding interface information.

[0091] Based on the interface information of the desired operation, the operation interface of the delivery capacity client is invoked so that the delivery capacity client executes the desired operation.

[0092] In this embodiment, a high-frequency operation mapping table can be pre-set. This table contains operation keywords for each operation and their corresponding interface information. For example, the operation mapping table is a pre-set structured configuration file that stores the correspondence between high-frequency operation keywords and client interface information. Operation keywords refer to the core words that trigger client operations (such as "start work" or "arrive at store"), and can be set according to the operations that delivery capacity frequently needs to perform in the delivery scenario.

[0093] As an example, manipulating a mapping table can specifically include the following two operations:

[0094] "Start Work": {"api": "order / start_work", "params": {"user_id": "Current Rider ID"}, "address": "http:***"}

[0095] "Arrive at store": {"api": "order / arrive_shop", "params": {"order_id": "Current order ID","location": "Current geographical location"}, "address": "http:***"}

[0096] The example above illustrates two operations: triggering a work start operation and triggering a store arrival operation. The delivery driver's client provides a "work start" function. In traditional solutions, the delivery driver needs to trigger this "work start" function on the client to put the delivery driver in an order-accepting state, allowing the client to push delivery orders to the delivery driver. Similarly, the store arrival operation provides a "store arrival" function. In traditional solutions, when a delivery driver arrives at the store location of an order, they can trigger this "store arrival" function on the client's page, allowing the client to obtain the delivery driver's store arrival information and send it to the server.

[0097] The operation mapping table also includes interface information for each operation, such as the names of the APIs shown above (e.g., "order / start_work" and "order / arrive_shop"), the parameters required for the API call (e.g., "params": {"user_id": "current rider ID"}), and the interface address used to send the call request (e.g., "address": "http:***").

[0098] In practical applications, the operation mapping table may also contain other operations, and the operation keywords and interface information may also be implemented in other ways. This embodiment does not limit this.

[0099] As an example, the delivery capacity query here can be input to the client via voice. This embodiment, through a processing mechanism involving operation mapping tables, keyword matching, and interface information acquisition, achieves a seamless transition from natural language to automated operation for instruction-type queries, significantly reducing the manual operation cost of delivery capacity and improving the intelligence and efficiency of the delivery process.

[0100] In some examples, the interface information includes the interface address and interface parameters;

[0101] The step of calling the operation interface of the delivery capacity client according to the interface information of the desired operation includes:

[0102] Based on the interface parameters of the desired operation, obtain the parameter values ​​of the delivery capacity corresponding to the interface parameters;

[0103] Based on the parameter values ​​of the interface parameters of the desired operation, a call request is constructed to invoke the operation interface corresponding to the desired operation, and the call request is sent to the interface address of the desired operation.

[0104] In this embodiment, the interface address refers to the network address of the interface, such as a URL, used to send call requests. Interface parameters refer to the dynamic parameters required for the interface call (such as rider ID, order ID, geographical location, etc.). The specific parameter values ​​of some parameters may need to be obtained online. For example, they may be parameter values ​​stored locally on the client, such as basic information such as the delivery capacity identifier and login status; or the "current geographical location" may be obtained through the client's location function, or parameter values ​​may be queried through the database, such as querying the delivery orders currently in the delivery status of the delivery capacity and some order information of each delivery order.

[0105] In terms of interface invocation and operation execution, an invocation request can be constructed; for example, parameter values ​​for each interface parameter can be filled in to generate a complete HTTP / HTTPS request. This invocation request can be sent to the interface address corresponding to the desired operation, thereby invoking the desired operation and enabling the delivery capacity client to execute the desired operation. Optionally, the return result of the operation interface after receiving the invocation request can also be obtained to determine the execution result of the desired operation.

[0106] In some examples, the method may also include:

[0107] Obtain auxiliary analysis information corresponding to the delivery capacity, input the query and the auxiliary analysis information into a preset sentiment analysis model, and obtain the sentiment analysis content identified by the sentiment analysis model for the query and the auxiliary analysis information; wherein, the auxiliary analysis information includes one or more of the following: current environmental information of the geographical location of the delivery capacity, current delivery load information of the delivery capacity, and historical delivery order information of the delivery capacity;

[0108] The generation of a response to the query includes:

[0109] A response to the query is generated based on the sentiment analysis content.

[0110] In this embodiment, in order to generate a more friendly response for the delivery capacity, a sentiment analysis model is also introduced to identify the sentiment of the current question asked by the delivery capacity. After obtaining the sentiment analysis content, a response to the query can be generated based on the sentiment analysis content.

[0111] As an example, emotion categories can be preset. Specific categories can be set as needed, including but not limited to: anxiety, fatigue, doubt, neutrality, happiness, etc. Alternatively, emotion intensity scores can be set for all or some emotion categories as needed. For example, intensity levels can be set for certain preset emotions to represent the intensity of a certain category of preset emotions. The specific range of the number of levels can be set as needed, such as a range of 0 to 10 points.

[0112] Optionally, the sentiment analysis model can be built on a large language model. For example, it can be obtained by fine-tuning the large language model in advance using samples with labels (such as different sentiment categories and / or intensity levels).

[0113] In this embodiment, auxiliary analysis information is also introduced, which may include one or more of the following: the current environmental information of the geographical location of the delivery capacity, the current delivery load information of the delivery capacity, and the historical delivery order information of the delivery capacity.

[0114] As an example, current environmental information can include information affecting delivery capacity, such as information that affects the difficulty of delivery, including but not limited to: weather information, traffic information, and road condition information. For example, regarding weather information, heavy rain or high temperatures may increase the difficulty of delivery, leading to fatigue and other emotional states among delivery personnel. Similarly, regarding traffic information, poor traffic conditions, such as congestion or temporary road closures, may increase the difficulty of delivery, leading to fatigue and other emotional states among delivery personnel. Furthermore, road condition information can include the difficulty of traversing delivery routes, such as the presence of overpasses on the delivery route, which may increase the difficulty of delivery and lead to fatigue and other emotional states among delivery personnel.

[0115] The current delivery load information of delivery capacity is used to characterize the pressure on delivery capacity from the current orders waiting to be delivered, including but not limited to: the number of orders currently being delivered, such as the positive correlation between the pressure on delivery capacity and the number of orders currently being delivered; information on the timeout risk of the current number of orders waiting to be delivered, such as the time remaining until the delivery time of the orders being delivered, whether they are about to be overdue, or the time elapsed since delivery; the pressure on delivery capacity is positively correlated with the risk of timeout; high load easily leads to high pressure on delivery capacity.

[0116] Historical delivery order information, including but not limited to: information on the difference between recent revenue and historical average revenue, information on the difference between the number of recent delivery orders and historical delivery orders, and information on the number of timeouts or complaint records within a recent period (such as the current time or a custom time window of the last 2 hours).

[0117] Thus, auxiliary analysis information and queries can be input into the sentiment analysis model, prompting the sentiment analysis model to identify the sentiment of delivery capacity by combining the auxiliary analysis information, and obtain sentiment analysis content. Based on this, this embodiment can generate a response to the query based on the sentiment analysis content. In the foregoing embodiments, different types of queries have corresponding steps for generating responses to queries. The sentiment analysis content here can be applied in one or more of the above steps, and this embodiment does not limit this.

[0118] Thus, this embodiment introduces a sentiment analysis model and obtains auxiliary analysis information for the instant delivery scenario: the current weather information of the geographical location of the delivery capacity, the current delivery load information of the delivery capacity, and the historical delivery order information of the delivery capacity, so that sentiment analysis content can be obtained and a sentiment response adapted to the delivery capacity can be generated.

[0119] Optionally, the method by which sentiment analysis content assists in generating responses to queries can be configured as needed. For example, for certain preset sentiment categories, a strategy of "first providing care based on the preset sentiment category, then providing a response" can be adopted. Alternatively, a strategy of "first providing care based on the preset sentiment category, then providing coping strategies based on the reasons for that sentiment category in the sentiment analysis content, and finally providing a response" can be included. Or, for positive or neutral sentiment categories, the question can be answered directly, making the response concise and efficient. Pre-defined response strategies corresponding to different sentiment categories can also be input into the language model used to generate responses, instructing the language model to generate the corresponding responses.

[0120] As an example, the step of inputting the Query and the auxiliary analysis information into a preset sentiment analysis model to obtain the sentiment analysis content identified by the sentiment analysis model in response to the Query and the auxiliary analysis information includes:

[0121] Generate prompt data containing the Query, the auxiliary analysis information, and prompt information; the prompt information includes: a description of each sentiment category, a discrimination rule for each sentiment category, and factors used to prompt the sentiment analysis model to analyze the associated factors that trigger the target sentiment category corresponding to the Query using the auxiliary analysis information;

[0122] The prompt data is input into a preset sentiment analysis model to obtain the sentiment analysis content that the sentiment analysis model identifies under the prompt data, including the target sentiment category corresponding to the Query, and the target related factors that trigger the target sentiment category determined from the auxiliary analysis information.

[0123] In this embodiment, in order to prompt the sentiment analysis model to generate the required data more accurately, this embodiment designs prompt data for prompting the sentiment analysis model. The prompt information includes multiple sentiment categories, a description of each sentiment category, a discrimination rule for each sentiment category, and a correlation factor for prompting the sentiment analysis model to use the auxiliary analysis information to analyze the triggering of the target sentiment category corresponding to the query.

[0124] The prompt information can clearly define the emotion category, the discrimination criteria, and the requirements for analyzing related factors. Optionally, specific emotion categories can be set according to actual needs, and discrimination rules for each emotion category can also be set, such as how to determine the corresponding emotion category based on each auxiliary analysis information, and the prompt model can analyze the related factors that trigger a certain emotion category based on the auxiliary analysis information.

[0125] As an example, the prompt template could be:

[0126] [Task]: Analyze the sentiment categories and triggering factors of rider queries.

[0127] [Emotional Categories and Judgment Rules]:

[0128] 1. Anxiety: Tension caused by task pressure (such as high workload and risk of exceeding time limits), with keywords including "not enough time", "cannot finish delivering", and "what if it exceeds the time limit".

[0129] 2. Questions: Confusion about the rules / operations, expressed in question form (e.g., "How do I appeal?" "How are the fees calculated?").

[0130] 3. Neutral: No obvious emotional bias, stating facts (e.g., "Check today's income").

[0131] ...

[0132] [Requirements for Correlation Factor Analysis]:

[0133] - Extract specific factors that trigger emotions from auxiliary information (such as weather, load, and historical timeout records).

[0134] - Output format: {"Target sentiment category": "", "Target related factor information": {"Factor 1": "Specific value", "Factor 2": "Specific value"}}.

[0135] Thus, guided by the prompting data, the model can generate sentiment analysis content. As an example:

[0136] First, the model can identify the target sentiment category corresponding to the query; for example, it can use text matching to compare the query with the "sentiment category discrimination rules" in the prompt information and extract keywords (such as "another order" or "cannot finish delivering" corresponding to the "nervous" category).

[0137] Next, the relevant factors can be located from the auxiliary analysis information; for example, relevant factors can be filtered from the auxiliary information based on the "relationship factor analysis requirements" in the prompt information, such as...

[0138] Weather: Heavy rain;

[0139] Load: 3 single items to be delivered (high load is the direct pressure source);

[0140] Historical orders: There was 1 order that timed out in the last day.

[0141] Related Factor Association: The extracted factors are bound to the sentiment category to form a “sentiment-related factor” mapping (e.g., the related factors for “tension” are “high load (3 orders to be delivered) + extreme weather”).

[0142] Finally, the model can output sentiment analysis content that includes the identified target sentiment category and related factors; for example:

[0143] "Sentiment Analysis Content":

[0144] Target Emotion Category: "Tense"

[0145] "Target-related factors information":

[0146] "Weather Factors": "Heavy Rain"

[0147] "Load Factor": "3 orders pending delivery"

[0148] "Historical event factors": "One order timed out in the last day".

[0149] Thus, sentiment recognition based solely on the text itself is prone to misjudgment. The sentiment analysis in this embodiment is not only based on the text itself, but also combines auxiliary analysis information, which can more accurately identify the sentiment of delivery capacity. Furthermore, it can achieve dual output of sentiment category and specific related factors, providing accurate basis for generating targeted responses in the future.

[0150] As an example, the multiple emotion categories include preset emotion categories; the prompt data also includes a discrimination rule for determining the intensity level of the preset emotion category based on the auxiliary analysis information, so that when the target emotion category is the preset emotion category, the emotion analysis content also includes the intensity level of the target emotion category;

[0151] The process of generating a response to the query based on the sentiment analysis content includes:

[0152] The system queries a preset strategy library for a target response strategy template that matches the target emotion category and the target related factors. The strategy library stores multiple response strategy templates corresponding to different emotion categories and different related factors.

[0153] If the intensity level of the target emotion category is greater than the preset level, query the preset care operation library for target care operations that match the target emotion category and the target related factors;

[0154] Based on the sentiment analysis content, the target response strategy template, and the target care operation, a response to the query is generated.

[0155] In this embodiment, to provide targeted responses and support to delivery capacity in delivery service scenarios, the prompt data also includes a discrimination rule for the intensity level of a preset emotion category. This allows the model to further quantify the degree of the preset emotion category. As an example, the preset emotion category in this embodiment can be set as needed, including but not limited to: tension, anxiety, or fatigue. The intensity level can also be divided into multiple levels as needed, and the number of levels can be set as required.

[0156] In practical applications, the rules for determining the intensity level of the preset emotion category can be set according to actual needs. For example, it can be determined based on keywords in the query and auxiliary analysis information. For example, if the query contains certain specific words, it can be determined as a higher level. If the auxiliary analysis information contains extreme weather information, current delivery load information indicating that the delivery capacity is under great pressure, or historical delivery order information indicating that the delivery capacity has certain specific events, it can be determined as a higher level, and vice versa.

[0157] By analyzing the intensity levels of preset emotion categories, more targeted responses can be generated to assist delivery capacity. This embodiment designs a strategy library storing a mapping relationship of "emotion category + related factors → response strategy template," and the response strategy template can include standardized scripts, etc. In addition, this embodiment also designs additional care measures, namely a care operation library, to obtain corresponding care operations to directly solve the core pain points of delivery capacity. The care operations stored in the care operation library can be set as needed, including but not limited to: subsidy operations, introducing human customer service operations, and automatically triggering client operations when inquiring about delivery capacity, etc., which are not limited in this embodiment. Furthermore, the target care operation found can be triggered directly without the delivery capacity triggering it itself. In practical applications, the interface for each care operation can be pre-configured, and the care operation can be triggered by calling the interface. Alternatively, the response content can be used to ask the delivery capacity whether to trigger the care operation, and the care operation can be triggered after receiving the delivery capacity's reply (e.g., receiving a reply that the delivery capacity needs to trigger the care operation).

[0158] Based on this, responses to queries can be generated according to sentiment analysis content, target response strategy templates, and target care operations. For example, the target response strategy templates and relevant descriptions of target care operations (such as the automatic triggering results of target care operations or the query content of whether delivery capacity triggers care operations) can be concatenated and supplemented with the current context information of delivery capacity to generate natural language responses.

[0159] As an example:

[0160] For example, the query is: "The weather is bad, it's so difficult, is there any subsidy?"; the auxiliary analysis information is: heavy rain + 3 orders pending delivery;

[0161] Sentiment analysis content could include: fatigue sentiment, intensity level: high;

[0162] The target response strategy template found is a strategy of "first showing care based on a preset emotion category, then providing coping strategies based on the reasons for that emotion category in the emotion analysis content, and finally responding".

[0163] The target care operation found is: rainstorm subsidy operation;

[0164] The generated response could be: "Thank you for your hard work! Your current area is experiencing heavy rain. We have successfully and automatically applied for rainstorm subsidies for your orders today. Additionally, we can temporarily suspend order taking. If you wish to suspend order taking, please tell me 'Stop taking orders.' Please be careful as the roads are slippery in the rain."

[0165] As can be seen from the above embodiments, this embodiment, by classifying the intensity of emotions and combining it with a response strategy library and a care operation library, can fundamentally solve the emotional factors related to delivery capacity, achieve the goals of emotional care and problem-solving, and improve the delivery experience.

[0166] In some examples, inputting the Query and the knowledge set into a preset delivery service-specific language model includes:

[0167] From the previous rounds of historical dialogues preceding the Query, obtain the relevant context related to the Query; the relevant context includes: the most recent n rounds of historical dialogues preceding the Query, and one or more rounds of historical dialogues preceding the most recent n rounds whose relevance score to the Query is greater than or equal to a preset relevance threshold; where n is a preset integer;

[0168] The Query, the knowledge set, and the relevant context are input into a preset delivery service-specific language model.

[0169] In this embodiment, the relevant context includes the following two types of historical dialogue data to ensure that the model can capture both the coherence of recent dialogues and recall highly relevant dialogues from distant times:

[0170] One type is the most recent n rounds of historical dialogue, that is, the n consecutive rounds of dialogue before the current query (n is a preset value, which can be set as needed, such as 3 rounds or 5 rounds, etc.), which can ensure the short-term continuity of the dialogue;

[0171] Another type is highly relevant historical dialogues, which are historical dialogues from the most recent n rounds ago that have a relevance score to the query that is greater than or equal to a preset relevance threshold; this can supplement distant but crucial context.

[0172] Optionally, n in this embodiment can be fixed or dynamically changing; for example, it can be adjusted based on the complexity of the query, such as the text length or semantic complexity of the query. The value of n is positively correlated with the text length and semantic complexity of the query. A query complexity classifier can be pre-trained as needed, or it can be obtained by the model during the process of the aforementioned intent recognition model recognizing the query. This embodiment does not limit this.

[0173] Optionally, n can also be dynamically adjusted based on the recognition results of emotion intensity; for example, the emotion level is negatively correlated with the value of n and positively correlated with the relevance threshold; that is, when the emotion level is high, more attention is paid to recent conversations and more concise responses are needed, so the value of n can be reduced to focus only on the most recent rounds of conversations, while the relevance threshold is increased to select only highly relevant historical conversations and avoid interference from irrelevant information.

[0174] Optionally, the relevance between historical dialogues and the current query can be calculated using a semantic similarity model. The specific method for calculating relevance can be set as needed, and this embodiment does not limit this. A preset relevance threshold characterizes whether the query is relevant to historical dialogues, and its specific value can be set as needed. Optionally, the preset relevance threshold can be fixed or dynamically changing; for example, it can be adjusted based on the text length or semantic complexity of the query. For instance, the preset relevance threshold can be negatively correlated with both the text length and semantic complexity of the query, allowing complex queries to have a lower threshold and thus obtain more rounds of historical dialogue.

[0175] Optionally, the input to the delivery service-specific language model includes the query, knowledge set, and relevant context. These three parts can be concatenated according to a set format as needed to serve as the model's input sequence. Through the above embodiments, the model can understand the context of the query, retain only highly relevant historical dialogues, avoid irrelevant information interfering with the model's judgment, and reduce redundant input to improve response efficiency.

[0176] In practical implementation, as an example, in a sentiment analysis model, not only can the sentiment category and associated factors be output, but also the sentiment intensity level (e.g., a score of 0-10).

[0177] The mapping relationship between sentiment intensity levels and contextual recall parameters (the value of n and the relevance threshold) can be preset, as an example:

[0178] Low intensity (0-3): n=5, correlation threshold=0.6

[0179] Medium intensity (4-7): n=3, correlation threshold=0.7

[0180] High intensity (8-10): n=1, correlation threshold=0.8

[0181] When retrieving relevant context, the corresponding 'n' and relevance threshold are selected based on the sentiment intensity level of the current query. Relevant context is then retrieved from historical dialogues according to the selected 'n' and relevance threshold. The query, knowledge set, and dynamically retrieved relevant context are input into the delivery service-specific language model to generate a response. When the sentiment intensity level is low, the value of 'n' can be increased and the relevance threshold decreased to retrieve more historical dialogues and provide a more comprehensive context.

[0182] In some examples, to improve the efficiency of obtaining relevant context and reduce the amount of cached data, in this embodiment, the summary corresponding to each round of historical dialogue is stored in the cache space; obtaining the relevant context of the Query includes:

[0183] Based on the summaries corresponding to each round of the historical dialogue stored in the preset cache space, the relevance score of the Query to the summaries of each round of the historical dialogue is determined, so as to obtain one or more rounds of historical dialogues before the most recent n rounds in which the relevance score of the Query is greater than or equal to a preset relevance threshold.

[0184] In this embodiment, a summary generation model can be used to generate and store summaries for each round of historical dialogue. This significantly reduces the amount of stored data, as there is no need to store the original historical dialogue text. Therefore, when determining the relevance score, the relevance score between the query and the summary can be calculated, further reducing computational complexity.

[0185] In some examples, when processing question-based queries, knowledge sets can be retrieved from a knowledge base. The knowledge retrieval strategy can also be adjusted based on the intensity of the emotion. For instance, the scope and order of knowledge retrieval can be adjusted according to the level of emotion intensity. For example, when the emotion intensity level is high, knowledge related to emotional support and care procedures can be prioritized, such as how to apply for subsidies or how to suspend order taking. Simultaneously, the scope of knowledge retrieval can be narrowed, recalling only the knowledge most relevant to the current query to avoid information overload. When the emotion intensity level is low, the scope of knowledge retrieval can be expanded and sorted by relevance to provide more comprehensive knowledge. As an example, knowledge in the knowledge base can be tagged, such as "emotional support," "operational guidelines," and "rule explanations." When the emotion intensity is high, knowledge in the "emotional support" and "operational guidelines" categories can be prioritized, and only the top 5 items can be retrieved; when the emotion intensity is low, knowledge from all categories can be retrieved, and the top 10 items can be retrieved. The types of knowledge retrieved can also be adjusted based on the emotion category (such as anxiety, fatigue, etc.). For example, for anxiety, knowledge about time management and task allocation can be recalled; for fatigue, knowledge about rest and subsidy applications can be recalled.

[0186] In some examples, the knowledge base may include: a knowledge content knowledge base storing multiple pieces of knowledge content related to the delivery service; a knowledge entity knowledge base storing knowledge entities in the knowledge content; a knowledge attribute knowledge base storing knowledge attributes of the knowledge entities in the knowledge content; and a multi-level tag knowledge base storing level tags of the knowledge entities and the knowledge attributes.

[0187] The step of retrieving a set of knowledge related to the Query from a knowledge base storing knowledge about the delivery service includes:

[0188] The query is segmented into words to obtain the segmentation results;

[0189] Recall the target knowledge content, target knowledge entity, and target knowledge attribute that match the word segmentation result from the knowledge content base, the knowledge entity base, and the knowledge attribute base, respectively.

[0190] The target level tag corresponding to the target knowledge entity is queried from the multi-level tag knowledge base to obtain a knowledge set containing the target knowledge content, the target knowledge entity, the target knowledge attribute, and the target level tag; wherein, the target level tag is used to indicate the level of the target knowledge content in which the corresponding target knowledge entity is located.

[0191] The knowledge base in this embodiment is used to store complete rules, processes, and explanatory texts related to delivery services. The types of content include, but are not limited to, delivery rules, operation guidelines, and delivery policy explanations; this embodiment does not impose any limitations on these. In terms of storage format, it can be based on "knowledge entries," each containing a unique ID, title, body text, creation time, etc.

[0192] The knowledge entity repository stores core knowledge entities, which can be nouns and / or verbs; optionally, knowledge entities can be extracted from knowledge content; entity types include, but are not limited to:

[0193] Object entities (usually nouns); such as rider, order, customer, merchant, delivery area;

[0194] Event entities (usually verbs); such as timeout, complaint, appeal, reassignment, arrival at the store;

[0195] Attribute entities (usually nouns); such as delivery fees or pickup codes.

[0196] Among them, the knowledge attribute knowledge base is used to store the attributes of knowledge entities; this knowledge base can define the attributes (descriptive features) of entities and refine the connotation of entities.

[0197] The multi-level tag knowledge base is used to store the level tags of knowledge entities. This knowledge base can add level tags to knowledge entities and attributes. The level tags represent the level of the target knowledge content to which the corresponding knowledge entity belongs, and can be used for sorting and filtering during knowledge retrieval.

[0198] When querying the knowledge set, this embodiment first performs word segmentation on the Query to obtain segmentation results, which contain one or more words. Then, target knowledge content, target knowledge entities, and target knowledge attributes matching the segmentation results can be retrieved from the knowledge content library, the knowledge entity library, and the knowledge attribute library, respectively. The retrieval direction includes, but is not limited to, text similarity calculation or vector similarity calculation, etc., which are not limited in this embodiment. Finally, based on the retrieval results, the target knowledge entity level tag can be queried from the multi-level tag knowledge base. Ultimately, the obtained knowledge set contains target knowledge content, target knowledge entities, target knowledge attributes, and target level tags.

[0199] Therefore, this embodiment avoids the ambiguity of simple text matching through the design of the above-mentioned knowledge bases. The knowledge set includes "text content + entity + attribute + tag", which also facilitates downstream modules (such as dedicated language models) to quickly extract key information and generate responses. The multi-level tags can be used for decision-making when knowledge conflicts occur, as well as for the sorting of each knowledge content.

[0200] like Figure 3 The diagram illustrates a method for interacting with delivery capacity according to an exemplary embodiment of this specification. The method is applied to a delivery capacity client and may include:

[0201] In step 302, obtain the current input for delivery capacity;

[0202] In step 304, the current input is sent to the server, which is used to execute the steps of the aforementioned method embodiment;

[0203] In step 306, the response sent by the server is obtained and output.

[0204] This embodiment can be applied to a delivery capacity client, which can run on... Figure 1 On the terminal shown, the delivery capacity client can obtain the current input of the delivery capacity and send it to the server. The server can execute the aforementioned method embodiment, for example, after obtaining the Query from the current input, it can generate a response to the Query. The specific method of obtaining the response can be referred to the description of the aforementioned embodiment, and will not be repeated here.

[0205] Corresponding to the embodiments of the aforementioned dialogue method, this specification also provides embodiments of the dialogue device and the computer equipment on which it is applied.

[0206] The embodiments of the dialogue device described in this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by its processor reading the corresponding computer program instructions from non-volatile memory into memory and executing them. From a hardware perspective, such as... Figure 4 The diagram shown is a hardware structure diagram of the computer device containing the dialogue device described in this manual. (Except for...) Figure 4 In addition to the processor, network interface, memory, and non-volatile memory shown, the computer device in which the dialogue device is located in the embodiment may also include other hardware depending on the actual function of the computer device, which will not be described in detail here.

[0207] like Figure 5 As shown, Figure 5 This is a block diagram illustrating a dialogue device according to an exemplary embodiment of this specification, the device comprising:

[0208] The identification module 51 is used to: identify the category to which the current query content Query of the delivery capacity is obtained through the delivery capacity client;

[0209] The instruction processing module 52 is used to: if it is identified that the category of the Query is an instruction-type Query that represents an operation that needs to be performed on the delivery capacity client, trigger the delivery capacity client to execute the expected operation corresponding to the Query, and generate a response to the Query;

[0210] The query processing module 53 is used to: if the category of the Query is identified as a query class Query that represents the need to query the delivery service information of the delivery capacity, query the delivery service database to retrieve data that meets the query requirements corresponding to the Query, and generate a response to the Query;

[0211] The question processing module 54 is used to: if the category of the Query is identified as a question related to delivery services, retrieve the knowledge set related to the Query from the knowledge base storing knowledge about the delivery services, and input the Query and the knowledge set into a preset delivery service-specific language model to generate a response to the Query.

[0212] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0213] Accordingly, embodiments of this specification also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the aforementioned method embodiment for communicating with delivery capacity.

[0214] Accordingly, embodiments of this specification also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of a method embodiment for communicating with delivery capacity.

[0215] Accordingly, embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a method embodiment for communicating with delivery capacity.

[0216] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0217] The above embodiments can be applied to one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. The hardware of the computer device includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0218] The computer device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.

[0219] The computer equipment may also include network equipment and / or user equipment. The network equipment includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.

[0220] The network in which the computer device is located includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, and virtual private network (VPN).

[0221] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0222] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.

[0223] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.

[0224] The terms "specific example" or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with the embodiments or examples, which are included in at least one embodiment or example of this specification. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0225] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.

[0226] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.

[0227] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

Claims

1. A method of dialoging with distribution capacity, the method applied to a service side, the distribution capacity comprising: The method comprises: The method comprises: After the delivery capacity client obtains the current query content Query of the delivery capacity, the category of the Query is identified; If the category of the Query is identified as an instruction type Query representing a need to operate the delivery capacity client, the delivery capacity client is triggered to perform the expected operation corresponding to the Query, and a reply to the Query is generated; If the category of the Query is identified as a query type Query representing a need to query the delivery service information of the delivery capacity, data satisfying the query demand corresponding to the Query is queried from a delivery service database, and a reply to the Query is generated; If the category of the Query is identified as a question type Query related to the delivery service, a knowledge set related to the Query is queried from a knowledge base storing the knowledge of the delivery service, the Query and the knowledge set are input into a preset delivery service special language model to generate a reply to the Query; The reply to the Query is also generated based on sentiment analysis content; The sentiment analysis content is obtained by generating prompt data containing the Query, auxiliary analysis information and prompt information and inputting the prompt data into a sentiment analysis model to prompt the sentiment analysis model to identify the target sentiment category corresponding to the Query and the target associated factors triggering the target sentiment category from the auxiliary analysis information; The auxiliary analysis information includes the current delivery load information of the delivery capacity, historical delivery order information and / or the current environmental information of the local geographic location; the prompt information includes the description and discrimination rule of each sentiment category, and the information for prompting the sentiment analysis model to analyze the associated factors triggering the target sentiment category corresponding to the Query using the auxiliary analysis information.

2. The method of claim 1, wherein the identification of the category of the Query comprises: Using a pre-trained first intention recognition model to identify the category of the Query as an instruction type Query, a query type Query or a question and answer type Query; If the Query is identified as a question and answer type Query, a pre-trained second intention recognition model is used to identify the category of the Query as a chat type Query, a preset question type Query or the question type Query related to the delivery service; The method further comprises: If the category of the Query is a chat type Query, a preset general language model is used to generate a reply to the Query; If the category of the Query is a preset question type Query, a reply corresponding to the Query is queried from a preset frequently asked question data set; wherein the frequently asked question data set contains historical frequently asked questions and corresponding replies.

3. The method of claim 1, wherein triggering the delivery capacity client to perform the expected operation corresponding to the Query comprises: after obtaining the keyword included in the Query, querying interface information of the expected operation matching the keyword included in the Query from a predefined operation mapping table, wherein the operation mapping table includes keywords of various operations and corresponding interface information; invoking an operation interface of the delivery capacity client according to the interface information of the expected operation, so that the delivery capacity client performs the expected operation.

4. The method of claim 3, wherein the interface information includes an interface address and an interface parameter; and wherein invoking the operation interface of the delivery capacity client according to the interface information of the expected operation comprises: obtaining a parameter value of the delivery capacity corresponding to the interface parameter according to the interface parameter of the expected operation; constructing a call request for invoking the operation interface corresponding to the expected operation according to the parameter value of the interface parameter of the expected operation, and sending the call request to the interface address of the expected operation.

5. The method of claim 1, wherein the sentiment category includes a preset sentiment category; and wherein the prompt data further includes a discrimination rule for determining an intensity level of the preset sentiment category based on the auxiliary analysis information, so that in a case where the target sentiment category is the preset sentiment category, the sentiment analysis content further includes the intensity level of the target sentiment category; and wherein generating a reply to the Query based on the sentiment analysis content comprises: querying a target reply strategy template matching the target sentiment category and the target associated factor from a preset strategy library, wherein the strategy library stores a plurality of reply strategy templates corresponding to different sentiment categories and different associated factors; if the intensity level of the target sentiment category is greater than a preset level, querying a target care operation matching the target sentiment category and the target associated factor from a preset care operation library; and generating a reply to the Query according to the sentiment analysis content, the target reply strategy template, and the target care operation.

6. The method of claim 1, wherein inputting the Query and the knowledge set into a preset delivery service specific language model comprises: obtaining a relevant context of the Query from each round of historical dialogue before the Query; the relevant context includes the last n rounds of historical dialogue before the Query and one or more rounds of historical dialogue before the last n rounds and having a relevance score greater than or equal to a preset relevance threshold with the Query; the n is a preset integer; and inputting the Query, the knowledge set, and the relevant context into a preset delivery service specific language model.

7. The method of claim 6, wherein an abstract corresponding to each round of the historical dialogue is stored in a cache space; and wherein obtaining the relevant context of the Query comprises: ​ ​ According to the summary corresponding to each round of the historical dialogue stored in the preset cache space, the relevance score of the Query and the summary of each round of the historical dialogue is determined to obtain one or more rounds of historical dialogue before the last n rounds and having a relevance score greater than or equal to a preset relevance threshold.

8. The method of claim 1, the knowledge base comprising: A knowledge content database storing a plurality of knowledge contents related to the delivery service, a knowledge entity database storing knowledge entities in the knowledge contents, a knowledge attribute database storing knowledge attributes of the knowledge entities in the knowledge contents, and a multi-level label database storing level labels of the knowledge entities; The knowledge set related to the Query is queried from the knowledge database storing the knowledge of the delivery service, including: The Query is segmented to obtain a segmentation result; The target knowledge content, the target knowledge entity, and the target knowledge attribute matching the segmentation result are recalled from the knowledge content database, the knowledge entity database, and the knowledge attribute database, respectively. The target level label corresponding to the target knowledge entity is queried from the multi-level label knowledge database to obtain a knowledge set containing the target knowledge content, the target knowledge entity, the target knowledge attribute, and the target level label; wherein the target level label is used to indicate the level of the target knowledge content where the corresponding target knowledge entity is located. 9.A method for conversing with delivery capacity, applied to a delivery capacity client, comprising: obtaining a current input of the delivery capacity and sending the current input to a server, wherein the server is configured to execute the steps of the method according to any one of claims 1 to 8; obtaining a reply sent by the server and outputting the reply.

10. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, The processor executes the computer program to realize the steps of the method according to any one of claims 1 to 8. 11.A computer program product, comprising a computer program, wherein the computer program is executed by a processor to realize the steps of the method according to any one of claims 1 to 8. 12.A computer readable storage medium, having a computer program stored thereon, wherein the computer program is executed by a processor to realize the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Message processing method and device

    CN115002060A

  • Information generation method and device, electronic equipment and storage medium

    CN119670863A

  • Page jumping method, page jumping device, electronic equipment and storage medium

    CN120743414A

  • Question and answer method and computing device

    CN120780794A