A sentence recommendation method and device, and an electronic device

By recommending M statements to users and using a large model to extract key information to generate a second target statement, the problem of users' lack of understanding of the agent's functions and interaction methods is solved, the quality of statements and the accuracy of the agent's responses are improved, and the user experience is enhanced.

CN121144440BActive Publication Date: 2026-04-10ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2025-11-19
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Users who are new to intelligent dialogue systems often lack understanding of the functions and interaction methods of the intelligent agent, resulting in low-quality input and consequently affecting the accuracy of the responses generated by the intelligent agent.

Method used

Recommend M statements to the user, use a large model to extract key information of the first target statement selected by the user, generate the second target statement, improve the quality of the statements and improve the accuracy of the agent's response.

Benefits of technology

By recommending and generating high-quality statements, the barrier to user interaction is lowered, the user experience is improved, and the responses generated by the intelligent agent more accurately meet user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144440B_ABST
    Figure CN121144440B_ABST
Patent Text Reader

Abstract

The application discloses a sentence recommendation method and device and electronic equipment. The method comprises the following steps: recommending M sentences to a user based on input information of the user, and receiving a first target sentence selected by the user from the M sentences; extracting key information in the first target sentence by using a large model, generating a second target sentence, and recommending the second target sentence to the user. Through the technical scheme provided in the embodiment of the application, the problem that the user who uses the intelligent dialogue system for the first time lacks understanding of the function and interaction mode of the intelligent agent in the intelligent dialogue system, resulting in low quality of the proposed sentence and low accuracy of the reply generated by the intelligent agent is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a sentence recommendation method and device and electronic equipment. BACKGROUND

[0002] Through natural language interaction, an intelligent dialogue system can implement complex operations such as camera information query, personnel and vehicle trajectory tracking in park security. Therefore, a user can obtain required information by inputting a sentence to the intelligent dialogue system.

[0003] However, a user who uses the intelligent dialogue system for the first time lacks understanding of the functions and interaction modes of an agent in the intelligent dialogue system, resulting in low quality of the sentence input by the user to the agent, and thus it is difficult to query related information of the sentence in the agent, so that the accuracy of the reply generated by the agent is low. SUMMARY

[0004] The present application provides a sentence recommendation method to solve the problem that a user who uses an intelligent dialogue system for the first time lacks understanding of the functions and interaction modes of an agent in the intelligent dialogue system, resulting in low quality of the proposed sentence, and thus the accuracy of the reply generated by the agent is low. The specific implementation scheme is as follows:

[0005] In a first aspect, the present application provides a sentence recommendation method, which comprises:

[0006] Based on the input information of the user, M sentences are recommended to the user, and a first target sentence selected by the user from the M sentences is received; M is a positive integer;

[0007] The key information in the first target sentence is extracted by using a large model, a second target sentence is generated, and the second target sentence is recommended to the user.

[0008] Through the above application embodiment, based on the input information of the user, M sentences are first recommended to the user, so as to avoid that the user who uses the intelligent dialogue system for the first time cannot directly propose a sentence due to lack of understanding of the functions and interaction modes of the agent, thereby reducing the user interaction threshold, improving the user experience, and improving the quality of the sentence (i.e. the first target sentence) submitted by the user. Then, by using a large model, the key information of the first target sentence selected by the user from the recommended M sentences is extracted, a second target sentence is generated, and the quality of the sentence is further improved, so as to recommend a second target sentence with higher quality to the user, so that related information of the second target sentence can be better queried in the agent, and the reply generated by the agent is closer to the actual needs of the user, thereby improving the accuracy of the reply generated by the agent, and further improving the user experience.

[0009] In a possible implementation, before the step of recommending M sentences to the user based on the input information of the user, the method further includes:

[0010] constructing a set of optional parameter values for each of the plurality of parameters; the set of optional parameter values includes parameter values of the corresponding parameter; and

[0011] constructing a set of preferred sentences; the set of preferred sentences includes a plurality of first sentences and attribute information of each of the plurality of first sentences; the attribute information includes a sentence identifier, a plug-in code, a sentence source, a number of times of adoption of the sentence, a time of adding the sentence, and content of the sentence.

[0012] According to the above embodiments, before the step of recommending sentences to the user, the set of optional parameter values including parameter values is constructed, so that when a parameter value is needed to generate a sentence, the required parameter value can be quickly obtained from the set of optional parameter values, thereby reducing the generation time of the recommended sentences to the user, improving the generation efficiency of the recommended sentences to the user, and further improving the user experience. In addition, before the step of recommending sentences to the user, the set of preferred sentences is constructed, so that when the sentences are recommended to the user, the sentences can be directly generated based on the set of preferred sentences constructed in advance, further reducing the generation time of the recommended sentences to the user, further improving the generation efficiency of the recommended sentences to the user, and further improving the user experience.

[0013] In a possible implementation, the step of constructing a set of optional parameter values for each of the plurality of parameters includes:

[0014] In the historical dialogue of the intelligent dialogue system, a historical sentence with an execution result is determined, and a historical parameter value in the historical sentence is added to a set of optional parameter values of a parameter corresponding to the historical parameter value; and / or

[0015] an optional time value is obtained, and the optional time value is added to a set of optional parameter values of a time type parameter; and / or

[0016] an optional enumeration value is obtained, and the optional enumeration value is added to a set of optional parameter values of an enumeration type parameter; and / or

[0017] a word table is obtained, a plurality of data are randomly extracted from the word table, and the plurality of data are added to a set of optional parameter values of a parameter corresponding to the word table.

[0018] According to the embodiments of the application, the optional parameter value set is constructed based on the historical sentence with an execution result, the optional time value, the optional enumeration value, and the glossary, so that the optional parameter value set can include multiple parameter values of the corresponding parameter, and thus multiple sentences can be generated based on the optional parameter value set, and the user can be provided with the selection of multiple sentences, thereby further improving the user experience.

[0019] In a possible implementation, the constructing the preferred sentence set comprises:

[0020] generating a first sentence based on the first large model prompt word; and / or

[0021] In the historical dialogue of the intelligent dialogue system, a historical sentence with an execution result is determined, and the historical sentence is taken as the first sentence; and / or

[0022] obtaining a first sentence template, and generating the first sentence based on the first sentence template;

[0023] adding the generated first sentence to the preferred sentence set.

[0024] According to the embodiments of the application, the first sentence is efficiently and accurately generated based on the first large model prompt word, the historical sentence with an execution result, and the first sentence template, and the generated first sentence is added to the preferred sentence set, so that the preferred sentence set including multiple first sentences is constructed, and thus the generation efficiency of the recommended sentence to the user can be improved, and the user experience is further improved.

[0025] In a possible implementation, the generating the first sentence based on the first large model prompt word comprises:

[0026] configuring a second sentence template for each plug-in in the intelligent agent;

[0027] obtaining the optional parameter value set corresponding to each parameter in each second sentence template; the optional parameter value set further includes an ordering priority of the parameter value; the ordering priority of the parameter value determined based on the historical sentence with an execution result is high; the ordering priority of the parameter value determined based on the optional time value, the optional enumeration value, and the glossary is medium;

[0028] extracting a target parameter value of the corresponding parameter from the optional parameter value set according to the ordering priority of the parameter value;

[0029] generating the first large model prompt word based on the second sentence template and the target parameter value;

[0030] The first large model prompt word is used to generate a first sentence.

[0031] According to the above application examples, in the set of optional parameter values corresponding to each parameter in the second sentence template configured by each plug-in in the intelligent agent, the target parameter value of the corresponding parameter is efficiently extracted according to the sorting priority of the parameter value, and the determined target parameter value is more in line with the user demand. Then, according to the second sentence template configured by each plug-in in the intelligent agent and the target parameter value, a first large model prompt word is generated, and the first sentence is generated by using the large model prompt word, so that the generated first sentence conforms to a certain format, which is beneficial to the intelligent agent to generate more accurate replies according to the sentence. In addition, the use of different parameters and different parameter values by the first model prompt word can generate diversified sentences, thereby improving the generation efficiency of multiple sentences.

[0032] In a possible implementation, the constructing the preferred sentence set comprises:

[0033] When the first sentence in the preferred sentence set meets a deletion condition, the first sentence with a low sentence sorting priority is deleted from the preferred sentence set according to a sorting rule; the deletion condition is that the number of sentences of the plug-in in the preferred sentence set exceeds a set value; the sorting rule is that the sorting priority of the sentence source is determined as the sentence sorting priority, when the sentence sources are the same, the sorting priority of the sentence adding time is determined as the sentence sorting priority, and when the sentence adding times are the same, the sorting priority of the number of times the sentence is adopted is determined as the sentence sorting priority.

[0034] According to the above application examples, the first sentence with a low sentence sorting priority is deleted from the preferred sentence set according to the deletion condition and the sorting rule, which guarantees the timeliness and accuracy of the first sentence in the preferred sentence set. Moreover, according to the sorting rule, even when the sentence sources are the same and the sentence adding times are the same, the deleted sentence in the preferred sentence set can be efficiently and accurately determined.

[0035] In a possible implementation, the sorting priority of the sentence source is that the sorting priority of the first sentence generated based on the historical sentence is high, the sorting priority of the first sentence generated based on the first large model prompt word is medium, and the sorting priority of the first sentence generated based on the first sentence template is low.

[0036] The sorting priority of the sentence adding time is that the sorting priority of the first sentence with a late sentence adding time is higher than the sorting priority of the first sentence with an early sentence adding time.

[0037] The sorting priority of the number of times the sentence is adopted is that the sorting priority of a first sentence with a high number of times the sentence is adopted is higher than the sorting priority of a first sentence with a low number of times the sentence is adopted.

[0038] Through the above application examples, the sorting priority of the sentence source, the sorting priority of the sentence addition time, and the sorting priority of the number of times the sentence is adopted are determined, so that when processing the sentence, corresponding processing can be quickly performed according to the corresponding sorting priority.

[0039] In a possible implementation, the recommending M sentences to the user based on the input information of the user includes:

[0040] When the user inputs the sentence, the input character of the user is obtained, and a preferred sentence set is obtained.

[0041] From the preferred sentence set, M first sentences corresponding to the input character are extracted.

[0042] The M first sentences are recommended to the user.

[0043] Through the above application examples, when the user is inputting the sentence, M first sentences corresponding to the input character of the user are extracted from the preferred sentence set, so that the user is recommended the sentence according to the current input character when the user is still inputting the sentence, thereby avoiding that the user cannot directly propose the sentence due to lack of understanding of the function and interaction mode of the intelligent agent when the user uses the intelligent dialogue system for the first time, so as to further reduce the user interaction threshold, improve the user experience, and help to improve the quality of the sentence submitted by the user. Furthermore, the sentence recommended to the user is determined through the preferred sentence set containing the plurality of first sentences, so that the generation time of the sentence is saved, thereby improving the recommendation efficiency of the M first sentences recommended to the user.

[0044] In a possible implementation, the recommending M sentences to the user based on the input information of the user includes:

[0045] The input sentence input by the user is obtained.

[0046] Based on the input sentence and information of all plug-ins in the intelligent agent, a second large model prompt word is generated, and the second large model prompt word is used to determine the plug-in name corresponding to the input sentence.

[0047] Based on the information corresponding to the plug-in name and the input sentence, a third large model prompt word is generated, and the third large model prompt word is used to generate M second sentences.

[0048] The M second sentences are recommended to the user.

[0049] Through the above application examples, the plug-in name corresponding to the input statement is determined based on the information of the input statement and all plug-ins in the intelligent agent, and then the statement is generated based on the information corresponding to the plug-in name, which reduces the length of the large model prompt word when generating the statement based on the information of the input statement and all plug-ins in the intelligent agent, thereby avoiding that the large model prompt word exceeds the context length of the large model, and facilitating to improve the use range of the statement.

[0050] In a possible implementation, the extracting key information in the first target statement by using the large model and generating a second target statement includes:

[0051] If the first target statement does not contain intent information, a fourth large model prompt word is generated based on the information of all plug-ins in the intelligent agent and the first target statement; the intent information indicates a target plug-in for executing the first target statement.

[0052] The second target statement is generated by using the fourth large model prompt word.

[0053] Through the above application examples, when the first target statement does not contain intent information, the fourth large model prompt word generated based on the information of all plug-ins in the intelligent agent and the first target statement is used to generate the second target statement, so that even when the intelligent agent is invalid due to the fact that the first target statement does not contain intent information, the second target statement generated by using the large model can be used to give a normal reply.

[0054] In a possible implementation, the extracting key information in the first target statement by using the large model and generating a second target statement includes:

[0055] If the first target statement contains intent information, a target plug-in for executing the first target statement is determined according to the intent information, and a set of optional parameter values is determined according to the extracted parameters extracted from the first target statement.

[0056] If the number of the extracted parameters is less than or equal to a parameter threshold value, the parameter value corresponding to the extracted parameter is adjusted according to the set of optional parameter values, a fifth large model prompt word is generated based on the adjusted parameter value and the target plug-in, and the second target statement is generated by using the fifth large model prompt word.

[0057] If the number of the extracted parameters is greater than the parameter threshold value, part of the extracted parameters is selected from the plurality of extracted parameters, a sixth large model prompt word is generated according to the parameter value corresponding to the part of the extracted parameters and the target plug-in, and the second target statement is generated by using the sixth large model prompt word.

[0058] Through the above application examples, based on the parameters extracted from the first target sentence and the adjustment of the corresponding parameter values, the query range of the generated second target sentence is changed, which is beneficial to the agent to give more accurate replies, so as to meet the user's demand and further improve the correctness of the agent's reply.

[0059] In a possible implementation, the extracting the key information in the first target sentence by using the large model, and generating the second target sentence, comprises:

[0060] If the information of the first target sentence is queried in the agent, the reply of the first target is generated based on the information, and the reply is sent to the user;

[0061] According to the association relationship between the plug-ins in the agent, the associated plug-in corresponding to the first target sentence is determined;

[0062] According to the information of the reply and the associated plug-in, a seventh large model prompt word is generated;

[0063] The associated sentence is generated by using the seventh large model prompt word, and the associated sentence is used as the second target sentence.

[0064] Through the above application examples, based on the information of the associated plug-in determined according to the association relationship between the plug-ins in the agent and the reply of the first target sentence, the seventh large model prompt word is generated, the intention of the user in the next step is determined, the associated sentence of the first target sentence is generated, and the sentence associated with the current intention of the user is recommended according to the current intention of the user, so that the user can obtain more information by clicking lightly without re-inputting or searching, saving the time and effort of the user, and further improving the user experience. And through the recommendation of the associated sentence, the user can more comprehensively understand the information he needs, thereby further improving the user experience.

[0065] In a possible implementation, the first large model prompt word to the seventh large model prompt word are all generated by using the corresponding large model prompt word templates.

[0066] Through the above application examples, the large model prompt word is generated by using the large model prompt word template, which can avoid omission of information, so that the generated large model prompt word is more accurate and has higher generation efficiency.

[0067] In a second aspect, the application further provides a sentence recommendation device, which comprises:

[0068] A first processing module is configured to recommend M sentences to a user based on input information of the user, and receive a first target sentence selected by the user from the M sentences; M is a positive integer.

[0069] The second processing module is configured to extract key information in the first target sentence by using a large model, generate a second target sentence, and recommend the second target sentence to the user.

[0070] In a possible implementation, the apparatus further includes a construction module configured to, before recommending M sentences to the user based on the input information of the user, construct a set of selectable parameter values of each parameter, the set of selectable parameter values including a parameter value of a corresponding parameter, and construct a set of preferred sentences, the set of preferred sentences including a plurality of first sentences and attribute information of each of the plurality of first sentences, the attribute information including a sentence identifier, a plug-in code, a sentence source, a number of times of adoption of a sentence, a sentence addition time, and sentence content.

[0071] In a possible implementation, the construction module is specifically configured to, in a historical dialogue of an intelligent dialogue system, determine a historical sentence with an execution result, add a historical parameter value in the historical sentence to a set of selectable parameter values of a parameter corresponding to the historical parameter value, and / or obtain a selectable time value and add the selectable time value to a set of selectable parameter values of a time type parameter, and / or obtain a selectable enumeration value and add the selectable enumeration value to a set of selectable parameter values of an enumeration type parameter, and / or obtain a word table and randomly extract a plurality of data from the word table, and add the plurality of data to a set of selectable parameter values of a parameter corresponding to the word table.

[0072] In a possible implementation, the construction module is specifically configured to generate a first sentence based on a first large model prompt, and / or determine a historical sentence with an execution result in a historical dialogue of an intelligent dialogue system, and use the historical sentence as a first sentence, and / or obtain a first sentence template and generate a first sentence based on the first sentence template, and add the generated first sentence to the set of preferred sentences.

[0073] In a possible implementation, the construction module is specifically configured to configure a second sentence template for each plug-in in an intelligent agent, obtain a set of selectable parameter values corresponding to each parameter in each second sentence template, the set of selectable parameter values further including an ordering priority of a parameter value, the ordering priority of a parameter value determined based on a historical sentence with an execution result is high, the ordering priority of a parameter value determined based on a selectable time value, a selectable enumeration value, and a word table is medium, extract a target parameter value of a corresponding parameter from the set of selectable parameter values according to the ordering priority of the parameter value, generate the first large model prompt based on the second sentence template and the target parameter value, and generate a first sentence by using the first large model prompt.

[0074] In a possible implementation, the construction module is specifically configured to delete, according to a sorting rule, a first sentence with a low sentence sorting priority from the preferred sentence set when the first sentence in the preferred sentence set meets a deletion condition; the deletion condition is that the number of sentences of the plug-in in the preferred sentence set exceeds a set value; and the sorting rule is that the sorting priority of the sentence source is determined as the sentence sorting priority, when the sentence source is the same, the sorting priority of the sentence adding time is determined as the sentence sorting priority, and when the sentence adding time is the same, the sorting priority of the number of times the sentence is adopted is determined as the sentence sorting priority.

[0075] In a possible implementation, the sorting priority of the sentence source is that the sorting priority of a first sentence generated based on a historical sentence is high, the sorting priority of a first sentence generated based on a first large model prompt word is medium, and the sorting priority of a first sentence generated based on a first sentence template is low; the sorting priority of the sentence adding time is that the sorting priority of a first sentence with a late sentence adding time is higher than the sorting priority of a first sentence with an early sentence adding time; and the sorting priority of the number of times the sentence is adopted is that the sorting priority of a first sentence with a high number of times the sentence is adopted is higher than the sorting priority of a first sentence with a low number of times the sentence is adopted.

[0076] In a possible implementation, the first processing module is specifically configured to acquire an input character of the user when the user inputs a sentence, and acquire a preferred sentence set; extract M first sentences corresponding to the input character from the preferred sentence set; and recommend the M first sentences to the user.

[0077] In a possible implementation, the first processing module is further configured to acquire an input sentence input by the user; generate a second large model prompt word based on information of all plug-ins in an agent and the input sentence, and determine a plug-in name corresponding to the input sentence by using the second large model prompt word; generate a third large model prompt word based on information corresponding to the plug-in name and the input sentence, and generate M second sentences by using the third large model prompt word; and recommend the M second sentences to the user.

[0078] In a possible implementation, the second processing module is specifically configured to generate a fourth large model prompt word based on information of all plug-ins in an agent and the first target sentence if the first target sentence does not contain intent information; the intent information indicates a target plug-in that executes the first target sentence; and generate the second target sentence by using the fourth large model prompt word.

[0079] In a possible implementation, the second processing module is further configured to: if the first target sentence contains intention information, determine a target plug-in for executing the first target sentence according to the intention information, and determine a set of optional parameter values according to the extracted parameter extracted from the first target sentence; if the number of the extracted parameters is less than or equal to a parameter threshold, adjust the parameter values corresponding to the extracted parameters according to the set of optional parameter values, and generate a fifth large model prompt word based on the adjusted parameter values and the target plug-in, and generate the second target sentence by using the fifth large model prompt word; if the number of the extracted parameters is greater than the parameter threshold, select part of the extracted parameters from the plurality of extracted parameters, and generate a sixth large model prompt word according to the parameter values corresponding to the part of the extracted parameters and the target plug-in, and generate the second target sentence by using the sixth large model prompt word.

[0080] In a possible implementation, the second processing module is further configured to: if the information of the first target sentence is queried in an intelligent agent, generate a reply to the first target according to the information, and send the reply to the user; determine an associated plug-in corresponding to the first target sentence according to the association relationship between the plug-ins in the intelligent agent; generate a seventh large model prompt word according to the reply and the information of the associated plug-in; generate an associated sentence by using the seventh large model prompt word, and use the associated sentence as the second target sentence.

[0081] In a possible implementation, the first large model prompt word to the seventh large model prompt word are all generated by using corresponding large model prompt word templates.

[0082] In a third aspect, the present application provides an electronic device, comprising:

[0083] a memory configured to store a computer program;

[0084] a processor configured to execute the computer program stored in the memory, so as to implement the above-mentioned sentence recommendation method.

[0085] In a fourth aspect, the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the above-mentioned sentence recommendation method.

[0086] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computer, cause the computer to perform the above-mentioned sentence recommendation method.

[0087] The technical effects that can be achieved by each of the above-mentioned second to fifth aspects and each aspect will be described above in relation to the first aspect or the technical effects that can be achieved by each of the possible solutions of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0088] Figure 1 A flowchart of a sentence recommendation method provided by an embodiment of the present application is shown in the figure.

[0089] Figure 2 A schematic diagram of the relationship between plug-ins provided by an embodiment of the present application is shown in the figure.

[0090] Figure 3 A schematic diagram of a sentence recommendation device provided by an embodiment of the present application is shown in the figure.

[0091] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0092] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be described in further detail below with reference to the accompanying drawings. The specific operation methods in the method embodiment can also be applied to the device embodiment or the system embodiment. It should be noted that in the description of the present application, "multiple" is understood as "at least two". The association relationship between the associated objects is described, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. A and B are connected, which means that A and B are directly connected and A and B are connected through C. In addition, in the description of the present application, "first", "second", etc. are used only for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.

[0093] At present, a user can input a sentence to an intelligent conversation system to obtain the required information. However, a user who uses an intelligent conversation system for the first time lacks understanding of the functions and interaction modes of agents in the intelligent conversation system, and the user is difficult to propose a sentence to the agent. Even if the user proposes a sentence to the agent, the quality of the sentence is low, so that the related information of the sentence cannot be queried in the agent, and the accuracy of the reply generated by the agent is low.

[0094] In view of this, the application provides a sentence recommendation method, which first recommends M sentences to the user based on the input information of the user, so as to avoid the user from being unable to directly propose a sentence when the user uses the intelligent dialogue system for the first time due to lack of understanding of the functions and interaction modes of the intelligent agent, and then extracts key information of a first target sentence selected by the user from the M recommended sentences by using a large model, generates a second target sentence, and further improves the quality of the sentence, so that the related information of the second target sentence can be better queried in the intelligent agent, and the reply generated by the intelligent agent is closer to the actual demand of the user, that is, the accuracy of the reply generated by the intelligent agent is improved, and the user experience is further improved.

[0095] In the embodiment of the application, the sentence can also be referred to as a question. The sentence can be a query sentence or an action execution sentence, but is not limited thereto.

[0096] The embodiments of the application will be described in detail below with reference to the drawings.

[0097] With reference to Figure 1 The sentence recommendation method provided in the embodiment of the application comprises:

[0098] S101, recommending M sentences to the user based on the input information of the user, and receiving a first target sentence selected by the user from the M sentences.

[0099] In order to avoid the user from being unable to propose a sentence when the user uses the intelligent dialogue system for the first time due to lack of understanding of the functions and interaction modes of the intelligent agent, M sentences (M is a positive integer) can be recommended to the user when the user inputs a sentence to the intelligent agent, so that the user can directly select a first target sentence required by the user from the M recommended first sentences, thereby reducing the interaction threshold of the intelligent dialogue system and improving the user experience.

[0100] In the embodiment of the application, before the M sentences are recommended to the user, an optimal sentence set can be constructed.

[0101] The optimal sentence set can include a plurality of first sentences, and can also include attribute information of the plurality of first sentences. The attribute information can include sentence identification, tool coding, sentence source, sentence content, sentence adoption times, sentence addition time, and the like.

[0102] The sentence identification in the attribute information of the first sentence can be a unique identification of the first sentence, so that the first sentence can be accurately determined through the sentence identification.

[0103] The plug-in corresponding to the plug-in code in the attribute information of the first statement can be a plug-in for executing the first statement. For example, the plug-in is a query device plug-in, which is used to query related information of the first statement and generate a reply to the first statement. For another example, the plug-in is a video playing plug-in, which is used to play a video indicated by the first statement according to the first statement. However, the type of the plug-in is not limited to this. In addition, the plug-ins included in different intelligent agents can be the same, different, or partially the same, which can be adjusted according to specific application scenarios. In addition, the plug-in can also be a tool. Thus, the first statement can be executed through the plug-in.

[0104] The statement source in the attribute information in the first statement can be any one of a first statement template, a first large model prompt word, and a historical statement with an execution result. The statement source also has a ranking priority. For example, the ranking priority of the statement source from high to low is: historical statement with an execution result > first large model prompt word > first statement template. Therefore, the ranking priority of the first statement generated based on the historical statement is high, the ranking priority of the first statement generated based on the first large model prompt word is medium, and the ranking priority of the first statement generated based on the first statement template is low.

[0105] The number of times the statement is adopted in the attribute information in the first statement can be the number of times the user selects the first statement. The number of times the statement is adopted also has a ranking priority. For example, the ranking priority of the first statement with a high number of times the statement is adopted is higher than the ranking priority of the first statement with a low number of times the statement is adopted.

[0106] The statement addition time in the attribute information in the first statement is the time when the first statement is added to the preferred statement set. The statement addition time also has a ranking priority. For example, for the statement source being a historical statement with an execution result, because there is an expiration time for data in the system, the first statement with an early statement addition time may not have an execution result after a period of time even if it has an execution result. Therefore, the ranking priority of the first statement with a late statement addition time is higher than the ranking priority of the first statement with an early statement addition time.

[0107] Thus, through the statement identification, plug-in code, statement source, number of times the statement is adopted, statement addition time, and statement content in the first statement, the related information of the first statement can be obtained to better recommend statements to the user.

[0108] In order to construct the preferred statement set containing the first statement with the above attribute information, the generated first statement can be added to the preferred statement set, and the above attribute information can be added to the first statement, so as to obtain the preferred statement set.

[0109] The embodiment of the application can generate the first sentence in the following manner one and / or manner two and / or manner three.

[0110] Manner one:

[0111] generating the first sentence based on the first large model prompt word.

[0112] Specifically, first, configure a corresponding second sentence template for each plug-in in the intelligent agent. For example, the second sentence template is:

[0113] Query cameras within 1 km of [xxx], where [xxx] represents a placeholder for a Point of Interest (POI) name parameter; Query cameras with camera name [xxx], where [xxx] represents a placeholder for a camera name parameter.

[0114] Second, according to the sorting priority of the parameter value, select the target parameter value of each parameter in the second sentence template from the pre-constructed set of optional parameter values.

[0115] In the embodiment of the application, each parameter of each plug-in in the intelligent agent corresponds to a set of optional parameter values. Therefore, when selecting the target parameter value of each parameter in the second sentence template from the pre-constructed set of optional parameter values according to the sorting priority of the parameter value, the set of optional parameter values corresponding to each parameter in the second template can be obtained first, and then the target parameter value of the parameter can be selected from the set of optional parameter values corresponding to the parameter in the second sentence template according to the sorting priority of the parameter value.

[0116] In a possible implementation, before generating the first sentence, or before constructing the preferred sentence set, or before recommending the M sentences to the user, a set of optional parameter values for each parameter can be constructed first to efficiently and accurately obtain the parameter value of the parameter. For example, after constructing a set of optional parameter values for each parameter, when selecting the target parameter value of each parameter in the second sentence template from the pre-constructed set of optional parameter values according to the sorting priority of the parameter value, the set of optional parameter values corresponding to each parameter in the second template can be directly obtained to obtain the target parameter value of the parameter.

[0117] In the embodiment of the application, the set of optional parameter values can be constructed according to the parameter value of the historical sentence with an execution result.

[0118] Specifically, in the historical dialogue in the intelligent dialogue system, a historical sentence with an execution result is determined; and the historical parameter value in the historical sentence is added to the set of optional parameter values corresponding to the parameter.

[0119] For example, in the historical dialogue, there is a historical sentence: "Query the camera with the camera name Q Ximen". The historical sentence has an execution result. Then, the agent extracts "camera name = Q Ximen" from the historical sentence, where the camera name is the name of the parameter, and Q Ximen is the parameter value corresponding to the parameter (i.e., the camera name). Therefore, Q Ximen is added to the set of optional parameter values corresponding to the camera name. That is, the set of optional parameter values corresponding to the camera name includes Q Ximen.

[0120] Thus, the set of optional parameter values of the parameter corresponding to the historical parameter value in the historical sentence with the execution result is constructed according to the historical parameter value.

[0121] The set of optional parameter values can also be constructed according to the default configured parameter value.

[0122] Specifically, for a time type parameter, the optional time value can be obtained first, and then the optional time value is added to the set of optional parameter values corresponding to the time type parameter by default. For example, the optional time values "today", "the next three days", etc. are added to the set of optional parameter values corresponding to the time type parameter.

[0123] Thus, the set of optional parameter values is constructed according to the default configured parameter value.

[0124] The set of optional parameter values can also be constructed according to the parameter value of the vocabulary.

[0125] Specifically, for a parameter (such as a label name) with a vocabulary (such as a custom entity vocabulary), the vocabulary of the parameter can be obtained first, and then multiple data are randomly extracted from the vocabulary, and the randomly extracted multiple data are added to the set of optional parameter values corresponding to the parameter.

[0126] Thus, the set of optional parameter values is constructed according to the parameter value of the custom entity vocabulary.

[0127] The set of optional parameter values can also be constructed according to the optional enumeration value.

[0128] Specifically, for an enumeration type parameter, the optional enumeration value can be obtained first, and then the optional enumeration value is added to the set of optional parameter values of the enumeration type parameter.

[0129] Thus, the set of optional parameter values is constructed according to the optional enumeration value.

[0130] In the embodiments of the present application, one or more of the parameter values of the historical sentence with the execution result, the default configured parameter value (such as the optional time value), the parameter value of the vocabulary, and the optional enumeration value can be used to construct the set of optional parameter values, but it is not limited thereto.

[0131] In addition, a field indicating a source type can be added to each parameter value in the set of optional parameter values, so as to take the source type as a basis for sorting when generating the sentence to be recommended based on the set of optional parameter values.

[0132] For example, the source type of the parameter value can include a historical sentence with an execution result, a default configuration (such as an optional time value), an optional enumeration value, and a word table. The parameter value with the source type of the historical sentence with the execution result has the highest sorting priority, and the parameter value with the source type of the default configuration (such as the optional time value), the optional enumeration value, or the word table has a medium sorting priority.

[0133] Therefore, by constructing the set of optional parameter values, the target parameter value corresponding to each parameter in the second sentence template can be determined.

[0134] For example, the parameters in the second sentence template configured for the plug-in in the intelligent agent include a POI name and a camera name. Three parameter values with high sorting priorities are selected from the set of optional parameter values corresponding to the POI name as the target parameter values corresponding to the POI name in the second sentence template, and three parameter values with high sorting priorities are selected from the set of optional parameter values corresponding to the camera name as the target parameter values corresponding to the camera name in the second sentence template.

[0135] Further, after the second sentence template is configured and the target parameter value corresponding to each parameter in the second sentence template is determined, the first large model prompt word is generated based on the second sentence template and the target parameter values corresponding to the parameters in the second sentence template.

[0136] In the embodiments of the present application, the large model prompt word can be generated based on the large model prompt word template. For example, the large model prompt word template is:

[0137] #Target

[0138] Please generate a sentence according to the plug-in name, the parameter name, the optional parameter value, and the sentence template.

[0139] #Background knowledge

[0140] To help you better generate a sentence, I have provided you with:

[0141] (1) Plug-in name:

[0142] (2) Sentence template:

[0143] (3) Parameter name:

[0144] (4) Optional parameter value:

[0145] #Requirements

[0146] 1. Generate a sentence according to the parameter name, sentence template, and optional parameter value, without generating a new parameter name or a new parameter value.

[0147] # Output

[0148] - Output in JSON format.

[0149] - Reference example:

[0150] ```

[0151] [{"question":"Generated sentence"}]

[0152] ```

[0153] In the above large model prompt template, % represents a placeholder and can be adjusted according to specific application scenarios. Moreover, the sentence template, parameter name, and optional parameter value in the background knowledge in the above large model prompt template can be adjusted according to the plugin name. The sentence template in the large model prompt template can be the second sentence template mentioned above.

[0154] For example, the plugin name is query camera, then the sentence template, parameter name, and optional parameter value can be adjusted according to this plugin (i.e., query camera). Based on this content and the above large model prompt template, the first large model prompt generated can be as follows:

[0155] # Target

[0156] Please generate 3 sentences according to the plugin name, parameter name, optional parameter value, and sentence template.

[0157] # Background knowledge

[0158] To help you better generate sentences, I have provided you with:

[0159] (1) Plugin name: query camera

[0160] (2) Sentence template: query camera within 1 km of [xxx], query camera with camera name [xxx], query camera with organization tree name [xxx]

[0161] (3) Parameter name: camera name, organization tree name, POI name

[0162] (4) Optional parameter value: camera name optional parameter value includes: A road 1181 sidewalk, B bridge sidewalk; organization tree name optional parameter value includes: C district, D district; POI name optional parameter value includes: A road E intersection, F road subway exit

[0163] # Requirements

[0164] 1. Generate a sentence according to the parameter name, the sentence template, and the optional parameter value, without generating a new parameter name or a new parameter value.

[0165] # Output

[0166] - Output in JSON format.

[0167] - Reference example:

[0168] ```

[0169] [{"question":"Generated sentence"}]

[0170] ```

[0171] Therefore, after generating the first large model prompt, the first sentence is generated using the first large model prompt, so that the quality of the generated first sentence is high. For example, based on the above first large model prompt, 3 first sentences are generated, which are: query the camera within 1 km of A road intersection; query the camera with A road 1181 sidewalk as the camera name; query the camera with C district as the organization tree name.

[0172] Method two:

[0173] In the historical dialogue of the intelligent dialogue system, the historical sentence with the execution result is determined as the first sentence.

[0174] Method three:

[0175] Obtain a first sentence template, and then generate a first sentence based on the first sentence template.

[0176] For example, the first sentence template is query [xxx] camera within 1 km. Then the first sentence generated based on the first sentence template is: query [xxx] camera within 1 km. Thus, it is beneficial for the user to better input the sentence according to the first sentence, so that the quality of the user input sentence is first improved. For example, the first sentence recommended to the user is query [xxx] camera within 1 km. The user can input: query G address camera within 1 km according to the first sentence.

[0177] In the embodiments of the present application, the first sentence template and the second sentence template can be the same, or can not be the same, and can also be partially the same. The sentence template can be adjusted according to the application scenario.

[0178] Therefore, the plurality of first sentences can be generated by one or more of the above-described manner one, manner two and manner three. It should be noted that the generation manner of the first sentences is not limited to the above-described manner one, manner two and manner three, and the generation manner of the first sentences can be selected according to a specific application scenario.

[0179] Further, after the first sentence is generated, the first sentence can be added to the preferred sentence set, so as to construct the preferred sentence set containing the plurality of first sentences.

[0180] In the embodiment of the present application, in addition to adding the first sentence to the preferred sentence set, the first sentence with a low sentence ranking priority can be deleted from the preferred sentence set according to a deletion condition.

[0181] The deletion condition can be that the number of sentences corresponding to the plug-in in the preferred sentence set exceeds a set value.

[0182] Therefore, when the number of sentences corresponding to the plug-in in the preferred sentence set exceeds the set value, the first sentence with a low sentence ranking priority in the preferred sentence set can be deleted according to the ranking rule, so as to ensure the timeliness and accuracy of the first sentences in the preferred sentence set.

[0183] The ranking rule can be that the ranking priority of the sentence source of the first sentence is determined as the sentence ranking priority, when the sentence sources are the same, the ranking priority of the adding time of the first sentence is determined as the sentence ranking priority, and when the adding times are the same, the ranking priority of the number of times of adoption of the first sentence is determined as the sentence ranking priority. That is, the first sentences are sorted according to the ranking priority of the sentence source of the first sentences first, when the sentence sources are the same, the first sentences are sorted according to the ranking priority of the adding time of the first sentences, and when the adding times are the same, the first sentences are sorted according to the ranking priority of the number of times of adoption of the first sentences.

[0184] Therefore, according to the above-described ranking rule, the first sentence with a low sentence ranking priority can be deleted from the preferred sentence set, so as to construct the preferred sentence set.

[0185] Further, after the preferred sentence set is constructed, when the user is inputting a sentence, the input character of the user (i.e., the input information of the user includes the input character) and the preferred sentence set can be acquired, and then the M first sentences matched with the input character can be extracted from the preferred sentence set by using the accurate search or full-text search manner. The M first sentences are the M sentences recommended to the user based on the input information of the user. Then, the first sentence selected by the user from the M first sentences is received, and the first sentence is the first target sentence recommended to the user.

[0186] In another possible implementation, if a first statement matching the input characters of the user fails to be matched in the preferred statement set, the input statement of the user can be obtained after the user inputs a complete statement (i.e., the input information of the user includes the input statement), and then a large model prompt word is generated based on the input statement and information of all plugins in the agent, and M second statements are generated by using the large model prompt word. The second statement can be the same as or different from the first query.

[0187] To solve the problem that one call of the large model prompt word exceeds the context length of the large model, when generating the large model prompt word based on the input statement and information of all plugins in the agent, and generating M second statements by using the large model prompt word, a second large model prompt word can be generated based on the input statement and information of all plugins in the agent, and the plugin name corresponding to the input statement is determined by using the second large model prompt word.

[0188] For example, the input statement of the user is "H City No. 2 Middle School". The agent includes plugin 1 and plugin 2.

[0189] Therefore, based on the input statement and information of the plugin 1 and the plugin 2, a second large model prompt word can be generated, which can be as follows:

[0190] #Target

[0191] Please match the plugin with high relevance to the input statement of the user based on the input statement of the user and information of all plugins in the agent.

[0192] #Background knowledge

[0193] To help you match the plugin with high relevance to the input statement of the user, I have provided the following:

[0194] (1) Input statement of the user: H City No. 2 Middle School

[0195] (2) Information of all plugins in the agent is as follows:

[0196] - Plugin 1

[0197] - Plugin name: Query camera; names of parameters include: camera name, organization tree, and POI name. Among them, the optional parameter values of the camera name include: I Hotel North-QH2. The optional parameter values of the organization tree include: C District and D District. The optional parameter values of the POI name include: A Road E Intersection and F Road Subway Exit. The statement template includes: Query the camera with the camera name [].

[0198] - Plug-in 2

[0199] - Plug-in name: Event retrieval; names of parameters include: location, processing status, alarm type, time. Among them, the optional parameter values of the location include: A road, B bridge sidewalk, J area, A road E intersection. The optional parameter values of the processing status include: handled, unhandled. The optional parameter values of the alarm type include: personnel off-duty, smoke alarm. The parameter values corresponding to the time include: the last 3 days, today. The sentence template includes: query alarms of alarm type []. The sentence examples include: a. Query alarms of personnel off-duty alarm type; b. Query alarms of handled processing status.

[0200] #Requirements

[0201] 1. The user's input sentence can be any combination of plug-in names, parameter names, or parameter values. If the main content of the user's input sentence is a parameter value, you should analyze which parameter the parameter value is and associate all plug-in intents that contain the parameter.

[0202] 2. At most, only the names of three plug-ins can be output, and only plug-in names can be selected from existing plug-ins. Never create plug-in names out of thin air.

[0203] #Output

[0204] - Please select the plug-in name with high relevance to the user's input sentence from the plug-in name list: [query camera, event retrieval].

[0205] Therefore, using the second large model prompt word above, it is determined that the plug-in name corresponding to "H City No. 2 Middle School" is: query camera.

[0206] After determining the plug-in name corresponding to the input sentence using the second large model prompt word, generate a third large model prompt word based on the information corresponding to the plug-in name and the input sentence. Then, using the third large model prompt word, generate M second sentences, thereby reducing the length of the large model prompt word and improving the scope of sentence generation.

[0207] For example, the user's input sentence is: "H City No. 2 Middle School". The plug-in name corresponding to the input sentence is: query camera. Based on the information of the plug-in name and the input sentence, the second large model prompt word generated can be as follows:

[0208] #Target

[0209] Please extract the intent and parameters in the user's input sentence based on the user's input sentence and the information of some plug-ins in the agent, and generate a sentence.

[0210] #Background knowledge

[0211] To help you generate sentences, I have provided you with:

[0212] (1) The user's input sentence: H City No. 2 Middle School

[0213] (2) The information of the intelligent agent partial plug-in is as follows:

[0214] - Plug-in 1

[0215] - Plug-in name: Query Camera; Parameter names include: Camera Name, Organization Tree, POI Name. Among them, the optional parameter values of Camera Name include: I Hotel North - QH2. The optional parameter values of Organization Tree include: C District, D District. The optional parameter values of POI Name include: A Road E Intersection, F Road Subway Exit. The sentence template includes: Query the camera with camera name [].

[0216] # Requirements

[0217] 1. Generate sentences according to the parameters and optional parameter values of each plug-in, without generating new parameters or new parameter values.

[0218] 2. When there is no explicit intent or parameter in the user's input sentence, select parameters and parameter values from the provided partial plug-in information to generate query sentences, without generating new parameter values.

[0219] # Core tasks

[0220] ## 1. Extract parameters from the user's input sentence

[0221] - Extract the values of plug-in parameters from the user's input sentence in combination with the information of the plug-in in the background information.

[0222] ## 2. Generate sentences

[0223] - Generate sentences according to the parameter information extracted in the previous step, combined with the information of the plug-in

[0224] - If parameters are extracted, generate sentences according to the sentence templates of the plug-in corresponding to the parameters and the extracted parameter values

[0225] - If no parameters are extracted, generate sentences according to the sentence templates of the plug-in and the optional parameter values

[0226] # Output

[0227] - Generate a maximum of three sentences.

[0228] - Output in JSON format. See the example below:

[0229] ```

[0230] [{"intent":"Name of the associated plugin","parameters":{"parameter name":"parameter value"},"question":"generated statement"}]

[0231] ```

[0232] Then, by using the third model prompt words mentioned above, key information in the user's input statement is extracted, and the generated second statement is: Query the cameras near No. 2 Middle School in H City.

[0233] Therefore, by using the second and third model prompt words in the above manner, M second statements can be generated.

[0234] The M second statements are the M statements recommended to the user based on the user's input. Then, the system receives the second statement selected by the user from these M second statements; this second statement is the first target statement recommended to the user.

[0235] Therefore, through step S101, the information input by the user (such as input characters or input statements) can be optimized, thereby improving the quality of the M statements recommended to the user (such as M first statements and M second statements).

[0236] S102, use the large model to extract key information from the first target statement, generate the second target statement, and recommend the second target statement to the user.

[0237] After receiving the first target statement selected by the user, the agent queries the information of the first target statement and generates a second target statement to recommend to the user based on the query results of the first target statement.

[0238] In the embodiments of this application, different methods can be used to generate the second target statement based on different types of query results.

[0239] For example, when the agent processes the first target statement, if it is determined that the first target statement does not contain intent information, then the type of the query result of the first target statement is determined to be the no-intent result type, and then the generation method of the statement under the no-intent result type is used to generate the second target statement.

[0240] If it is determined that the first target statement contains intent information but has no execution result, then the query result type of the first target statement is determined to be the type with intent but no result, and then the generation method of the statement under the type with intent but no result is used to generate the second target statement.

[0241] If it is determined that the first target sentence contains intent information and there is an execution result, it is determined that the type of the query result of the first target sentence is the intended result type with results, and then the generation mode of the sentence under the intended result type with results is used to generate the second target sentence.

[0242] The generation mode of the second target sentence is described in detail below for the type of the query result of the first target sentence being the intended result type without results / the intended result type without results / the intended result type with results.

[0243] Intended result type without results:

[0244] When the intelligent agent processes the first target sentence, it is determined that the first target sentence does not contain intent information. The intent information indicates the target plug-in that executes the first target sentence. That is, when the intelligent agent processes the first target sentence, the target plug-in that executes the first target sentence is not matched in the intelligent agent.

[0245] In this scenario, the key information in the first target sentence can be extracted using the large model prompt word to generate the second target sentence.

[0246] Specifically, based on the information of all plug-ins in the intelligent agent and the first target sentence, a fourth large model prompt word is generated, and the second target sentence is generated using the fourth large model prompt word. The specific generation mode of this process is consistent with the generation mode of generating M second sentences based on the information of all plug-ins in the intelligent agent and the input sentence in step S101 using the large model prompt word, and will not be described here.

[0247] For example, the first target sentence does not have intent information and only includes parameter information. Then, based on the information of all plug-ins in the intelligent agent and the parameter information in the first sentence, a second large model prompt word is generated, and the plug-in name that can implement the parameter information in the first target sentence is determined using the second large model prompt word. Then, based on the plug-in name and the first target sentence, a third large model prompt word is generated, and the second target sentence is generated using the third large model prompt word. Thus, even if the intelligent agent fails due to the lack of intent information in the first target sentence, a normal reply can still be given using the second target sentence generated by the large model. Therefore, the fourth model prompt word can include the second large model prompt word and the third large model prompt word.

[0248] Intended result type without results:

[0249] When the intelligent agent processes the first target sentence, the target plug-in for the first target sentence is matched in the intelligent agent (i.e., the first target sentence includes intent information), but there is no corresponding data in the business system, and there is no result after the target plug-in is executed. That is, the first target sentence has intent but no execution result.

[0250] In this scenario, the number of parameters and parameter values corresponding to the first target sentence can be adjusted according to the intent information in the first target sentence, and the second target sentence is generated based on the large model prompt word generated based on the adjusted parameters and parameter values.

[0251] Specifically, first, the intent information in the first target sentence is determined. Then, according to the intent information, the target plug-in corresponding to the first target sentence (such as the name of the target plug-in) is determined, so as to execute the sentence based on the target plug-in. Next, the parameters in the first target sentence are extracted, and the extracted parameters are the extracted parameters. Then, according to the name of the extracted parameter, the set of optional parameter values corresponding to the extracted parameter is determined. For example, the name of the parameter extracted from the first target sentence is POI name, and the set of optional parameter values corresponding to the POI name can be determined from the pre-constructed sets of optional parameter values.

[0252] In a possible implementation, when the number of extracted parameters is less than or equal to the parameter threshold, the parameter value of the extracted parameter is adjusted. In the embodiments of the present application, the parameter value of the extracted parameter can be selected from the set of optional parameter values corresponding to the extracted parameter according to the sorting priority of the parameter value, but it is not limited thereto.

[0253] The fifth large model prompt word is generated based on the parameter value and the target plug-in. Then, the second target sentence is generated using the fifth large model prompt word, so as to adjust the query range of the second target sentence, so that the agent can generate more accurate replies.

[0254] For example, the name of the target plug-in is query camera, the parameter threshold is 1, the number of parameters extracted from the first target sentence is 1, and the name of the extracted parameter is POI name. Then, 2 parameter values with high priority are selected from the set of optional parameter values corresponding to the POI name. The fifth large model prompt word is generated based on the parameter values (such as A road intersection and F road subway exit) and the name of the target plug-in (such as query camera). The fifth large model prompt word can be as follows:

[0255] #target

[0256] Please generate 2 sentences according to the name of the plug-in, the name of the parameter, the set of optional parameter values, and the sentence template.

[0257] #background knowledge

[0258] To help you better generate sentences, I have provided you with:

[0259] (1) The name of the plug-in: query camera

[0260] (2) Sentence template: query camera within 1 km near [], query camera named []'s camera

[0261] (3) Name of parameter: POI name.

[0262] (4) Optional parameter value: POI name optional parameter value includes: A road E road intersection, F road subway exit.

[0263] #Requirements

[0264] 1. Generate a sentence according to the name of the parameter, the sentence template and the optional parameter value, without generating a new parameter name or a new parameter value.

[0265] #Output

[0266] - Output in JSON format.

[0267] - Reference example:

[0268] ```

[0269] [{"question":"Generated sentence"}]

[0270] ```

[0271] Therefore, by using the fifth large model prompt word described above, the second target sentence can be generated, such as: query the camera within 1 km of A road E road intersection, query the camera within 1 km of F road subway exit.

[0272] In another possible implementation, when the number of extracted parameters is greater than the parameter threshold, the number of extracted parameters can be reduced, and then the sixth large model prompt word is generated based on the remaining extracted parameters and their corresponding parameter values and the target plug-in. The parameter value corresponding to the extracted parameter can be directly the parameter value in the first target sentence. In addition, the parameter value can also be selected from the set of optional parameter values corresponding to the extracted parameter according to the sorting priority of the parameter value, so as to adjust the parameter value corresponding to the extracted parameter, and then generate the sixth large model prompt word based on the adjusted parameter value, the extracted parameter and the target plug-in.

[0273] Then, the second target sentence is generated by using the sixth large model prompt word, so as to adjust the query range of the second target sentence, so that the agent can generate more accurate replies.

[0274] For example, the name of the target plug-in is query camera, and the extracted parameters from the first target sentence are two: "camera name = Q west door" and "POI name = K address". Then, the sixth large model prompt word can be generated by using any one of the two parameters and its corresponding parameter value and the target plug-in. The sixth large model prompt word can be as follows:

[0275] #Target

[0276] Please generate 2 sentences according to the plug-in name, parameter name, optional parameter value, and sentence template.

[0277] # Background knowledge

[0278] To help you better generate sentences, I have provided you with:

[0279] (1) Plug-in name: Query Camera

[0280] (2) Sentence template: Query cameras within 1 km of [], Query cameras with camera name []

[0281] (3) Parameter name: Camera name, POI name

[0282] (4) Optional parameter values: Camera name optional parameter values include: Q Ximen. POI name optional parameter values include: K address

[0283] # Requirements

[0284] 1. Generate sentences according to parameter names, sentence templates, and optional parameter values. Do not generate new parameter names or new parameter values.

[0285] # Output

[0286] - Output in JSON format.

[0287] - Reference example:

[0288] ```

[0289] [{"question":"Generated sentence"}]

[0290] ```

[0291] Therefore, through the above sixth model prompt word, the second target sentence can be generated, such as: Query camera with camera name Q Ximen, Query cameras within 1 km of K address.

[0292] Further, after generating the second target sentence, the second target sentence is recommended to the user, so that after the user determines to inquire about the second target sentence, the normal reply to the second target sentence can be given, thereby enabling the user to obtain the required information and improving the user experience.

[0293] Intention and result type:

[0294] When querying the information of the first target sentence in the agent, the relevant information of the first target sentence is queried in the agent, and a normal reply can be generated for the first target sentence. That is, the first target sentence has an intention and an execution result.

[0295] In this scenario, since there can be a sequence or other association between multiple plugins in the agent, the next intention of the user can be guessed according to the relationship, and then the associated sentence is recommended to the user according to the next intention. Therefore, after sending the reply of the first target sentence to the user, the associated sentence of the first target sentence can be generated, and the associated sentence is taken as the second target sentence, and the second target sentence is recommended to the user, so as to further improve the user experience.

[0296] Specifically, according to the association relationship between the plugins maintained in the agent, the associated plugin of the plugin corresponding to the first target sentence is determined. For example, the plugin corresponding to the first target sentence is a query camera, and then according to the association relationship between the plugins maintained in the agent, the associated plugin of the query camera is determined as the associated plugin 1 and the associated plugin 2. Figure 2 According to the relationship between the plugins maintained in the agent as shown in the figure, the next intention of the user is determined to be playing a video or patrolling a video. Therefore, it can be determined that the associated plugin of the query camera is the associated plugin 1 and the associated plugin 2.

[0297] Then, the seventh large model prompt word is generated based on the information of the associated plugin and the reply generated for the first target sentence (that is, the execution result of the first target sentence). For example, the reply generated for the first target sentence contains A camera, B camera, and C camera, and the next intention of the user is to play a video. The generated seventh large model prompt word can be as follows:

[0298] #Target

[0299] Please generate 3 sentences according to the name of the plugin, the name of the parameter, the optional parameter value, and the sentence template.

[0300] #Background knowledge

[0301] In order to help you better generate sentences, I have provided you with:

[0302] (1) The name of the plugin: play video

[0303] (2) Sentence template: play the video of camera name []

[0304] (3) The name of the parameter: camera name.

[0305] (4) Optional parameter values: The optional parameter values of the camera name include: A camera, B camera, and C camera.

[0306] #Requirements

[0307] 1. Generate sentences according to the name of the parameter, the sentence template, and the optional parameter value, without generating new parameter names or new parameter values.

[0308] #Output

[0309] - Output in JSON format.

[0310] - Reference example:

[0311] ```

[0312] [{"question":"Generated sentence"}]

[0313] ```

[0314] Therefore, after generating the seventh large model prompt word, the associated sentence can be generated using the seventh large model prompt word, such as: playing the video of camera A, playing the video of camera B, and playing the video of camera C.

[0315] After generating the associated sentence, the associated sentence is taken as a second target sentence, and the second target sentence is recommended to the user to further improve the user experience.

[0316] In the embodiments of the present application, in the aforementioned unintentional result type and intended no result type scenarios, after recommending the second target sentence to the user, the associated sentence of the second target sentence can also be generated according to the generation method of the associated sentence in the intended result type, and the associated sentence of the second target sentence is recommended to the user to further improve the user experience.

[0317] In addition, in the embodiments of the present application, the aforementioned second large model prompt word, third large model prompt word, fourth large model prompt word, fifth large model prompt word, sixth large model prompt word, and seventh large model prompt word can be generated as the first large model prompt word, that is, the large model prompt word is generated based on the large model prompt word template. The large model prompt word templates based on the first large model prompt word, the second large model prompt word, the third large model prompt word, the fourth large model prompt word, the fifth large model prompt word, the sixth large model prompt word, and the seventh large model prompt word can be the same, can not be the same, can be partially the same, and can be selected according to the specific application scenario. The specific large model prompt word template.

[0318] In addition, in the intelligent dialogue system, multiple agents can be included, and the generation method of the sentence in each agent can adopt the aforementioned generation method of the sentence to generate, so as to recommend a higher quality sentence to the user, so as to better generate a reply to the sentence.

[0319] Based on the same inventive concept, the embodiments of the present application also provide a sentence recommendation device, as shown in Figure 3 The structure of a sentence recommendation device provided by the present application is shown in the structure diagram of the sentence recommendation device, which comprises:

[0320] The first processing module 301 is configured to recommend M sentences to a user based on input information of the user, and receive a first target sentence selected by the user from the M sentences; M is a positive integer.

[0321] The second processing module 302 is configured to extract key information in the first target sentence by using a large model, generate a second target sentence, and recommend the second target sentence to the user.

[0322] In a possible implementation, the apparatus further includes a construction module, which is configured to, before recommending M sentences to a user based on input information of the user, construct a set of selectable parameter values of each parameter, and construct a set of preferred sentences.

[0323] In a possible implementation, the construction module is specifically configured to, in a historical dialogue of an intelligent dialogue system, determine a historical sentence with an execution result, add a historical parameter value in the historical sentence to a set of selectable parameter values of a parameter corresponding to the historical parameter value; and / or, obtain a selectable time value and add the selectable time value to a set of selectable parameter values of a time type parameter; and / or, obtain a selectable enumeration value and add the selectable enumeration value to a set of selectable parameter values of an enumeration type parameter; and / or, obtain a word table and randomly extract a plurality of data from the word table, and add the plurality of data to a set of selectable parameter values of a parameter corresponding to the word table.

[0324] In a possible implementation, the construction module is specifically configured to generate a first sentence based on a first large model prompt word; and / or, in a historical dialogue of an intelligent dialogue system, determine a historical sentence with an execution result, and take the historical sentence as a first sentence; and / or, obtain a first sentence template and generate a first sentence based on the first sentence template; and add the generated first sentence to the set of preferred sentences.

[0325] In a possible implementation, the constructing module is specifically configured to configure a second sentence template for each plug-in in the intelligent agent; obtain a set of optional parameter values corresponding to each parameter in each second sentence template; the set of optional parameter values further includes an ordering priority of a parameter value; the ordering priority of a parameter value determined based on a historical sentence with an execution result is high; the ordering priority of a parameter value determined based on an optional time value, an optional enumeration value, and a word table is medium; according to the ordering priority of the parameter value, extract a target parameter value of the corresponding parameter from the set of optional parameter values; generate the first large model prompt word based on the second sentence template and the target parameter value; and generate a first sentence by using the first large model prompt word.

[0326] In a possible implementation, the constructing module is specifically configured to delete a first sentence with a low sentence ordering priority from the set of preferred sentences according to an ordering rule when the first sentence in the set of preferred sentences meets a deletion condition; the deletion condition is that the number of sentences of the plug-in in the set of preferred sentences exceeds a set value; and the ordering rule is that the ordering priority of the sentence source is the sentence ordering priority, the ordering priority of the sentence addition time is the sentence ordering priority when the sentence source is the same, and the ordering priority of the number of times the sentence is adopted is the sentence ordering priority when the sentence addition time is the same.

[0327] In a possible implementation, the ordering priority of the sentence source is that the ordering priority of a first sentence generated based on a historical sentence is high, the ordering priority of a first sentence generated based on a first large model prompt word is medium, and the ordering priority of a first sentence generated based on a first sentence template is low; the ordering priority of the sentence addition time is that the ordering priority of a first sentence with a late sentence addition time is higher than the ordering priority of a first sentence with an early sentence addition time; and the ordering priority of the number of times the sentence is adopted is that the ordering priority of a first sentence with a high number of times the sentence is adopted is higher than the ordering priority of a first sentence with a low number of times the sentence is adopted.

[0328] In a possible implementation, the first processing module 301 is specifically configured to obtain input characters of the user and obtain a set of preferred sentences when the user inputs a sentence; extract M first sentences corresponding to the input characters from the set of preferred sentences; and recommend the M first sentences to the user.

[0329] In a possible implementation, the first processing module 301 is further configured to: acquire an input sentence input by the user; generate a second large model prompt word based on information of all plugins in the intelligent agent and the input sentence, and determine a plugin name corresponding to the input sentence by using the second large model prompt word; generate a third large model prompt word based on information corresponding to the plugin name and the input sentence, and generate M second sentences by using the third large model prompt word; and recommend the M second sentences to the user.

[0330] In a possible implementation, the second processing module 302 is specifically configured to: if the first target sentence does not contain intent information, generate a fourth large model prompt word based on information of all plugins in the intelligent agent and the first target sentence; the intent information indicates a target plugin for executing the first target sentence; and generate the second target sentence by using the fourth large model prompt word.

[0331] In a possible implementation, the second processing module 302 is further configured to: if the first target sentence contains intent information, determine a target plugin for executing the first target sentence according to the intent information, and determine a set of optional parameter values according to an extracted parameter extracted from the first target sentence; if a number of the extracted parameters is less than or equal to a parameter threshold, adjust a parameter value corresponding to the extracted parameter according to the set of optional parameter values, generate a fifth large model prompt word based on the adjusted parameter value and the target plugin, and generate the second target sentence by using the fifth large model prompt word; if the number of the extracted parameters is greater than the parameter threshold, select part of the extracted parameters from a plurality of extracted parameters, generate a sixth large model prompt word according to a parameter value corresponding to the part of the extracted parameters and the target plugin, and generate the second target sentence by using the sixth large model prompt word.

[0332] In a possible implementation, the second processing module 302 is further configured to: if information of the first target sentence is queried in the intelligent agent, generate a reply to the first target based on the information, and send the reply to the user; determine an associated plugin corresponding to the first target sentence according to an association relationship between the plugins in the intelligent agent; generate a seventh large model prompt word according to the reply and information of the associated plugin; generate an associated sentence by using the seventh large model prompt word, and use the associated sentence as the second target sentence.

[0333] In a possible implementation, the first large model prompt word to the seventh large model prompt word are all generated by using corresponding large model prompt word templates.

[0334] Based on the same inventive concept, the embodiment of the present application further provides an electronic device, which can realize the function of the recommendation device of the foregoing sentence, and the reference Figure 4 The electronic device comprises:

[0335] At least one processor 401 and a memory 402 connected with the at least one processor 401, and the specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application, Figure 4 In the embodiment, the connection between the processor 401 and the memory 402 is taken as an example of connection through a bus 400. The bus 400 is used to connect the above-mentioned components in the Figure 4 In the embodiment, the connection between the processor 401 and the memory 402 is taken as an example of connection through a bus 400. The bus 400 is used to connect the above-mentioned components in the Figure 4 In the embodiment, the connection between the processor 401 and the memory 402 is taken as an example of connection through a bus 400. The bus 400 is used to connect the above-mentioned components in the

[0336] In the embodiment of the present application, the memory 402 stores instructions executable by the at least one processor 401, and the at least one processor 401 can execute the recommendation method of the foregoing sentence by executing the instructions stored in the memory 402. The processor 401 can realize the functions of various modules in the device shown in the Figure 3

[0337] Among them, the processor 401 is the control center of the device, can connect each part of the whole control device through various interfaces and lines, through running or executing the instructions stored in the memory 402 and calling the data stored in the memory 402, the various functions and processing data of the device, so as to monitor the whole device.

[0338] In a possible design, the processor 401 can include one or more processing units, and the processor 401 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface and the application program, etc., and the modem processor mainly processes the wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 can be realized on the same chip, and in some embodiments, they can also be realized on independent chips respectively.

[0339] ​The processor 401 can be a general processor, such as a central processing unit (CPU), a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic component, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor. The steps of the sentence recommendation method disclosed in the embodiments of the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0340] The memory 402 is a non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read only memory (PROM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 402 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The memory 402 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used to store program instructions and / or data.

[0341] By designing and programming the processor 401, the code corresponding to the sentence recommendation method introduced in the foregoing embodiments can be fixed in the chip, so that the chip can execute the steps of the sentence recommendation method of the embodiments shown in the running time. Figure 1 How to design and program the processor 401 is a technology known to those skilled in the art, which will not be described here.

[0342] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, when the computer instructions run on a computer, the computer executes the sentence recommendation method discussed above.

[0343] In some possible implementation, each of the aspects of the sentence recommendation method provided by the present application can also be implemented in the form of a program product, which includes program codes for causing the control device to perform the steps in the sentence recommendation method according to various exemplary embodiments of the present application described above in the specification when the program product is run on the device.

[0344] Those skilled in the art should understand that the embodiments of the present application can be provided in the form of a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program codes.

[0345] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as a combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.

[0346] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.

[0347] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that implements the functions specified in the flowcharts and / or block diagrams.

[0348] Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A method of recommending a sentence, characterized by, The method comprises the following steps: constructing a preferred sentence set; wherein the constructing the preferred sentence set comprises: when a first sentence in the preferred sentence set meets a deletion condition, deleting the first sentence with a low sentence ranking priority from the preferred sentence set according to a ranking rule; the deletion condition is that the number of sentences of a plug-in in the preferred sentence set exceeds a set value; the ranking rule is that the ranking priority of a sentence source is the sentence ranking priority, when the sentence source is the same, the ranking priority of a sentence adding time is the sentence ranking priority, when the sentence adding time is the same, the ranking priority of a sentence adoption frequency is the sentence ranking priority; based on input information of a user, recommending M sentences to the user, and receiving a first target sentence selected by the user from the M sentences; M is a positive integer; extracting key information in the first target sentence by using a large model, generating a second target sentence, and recommending the second target sentence to the user.

2. The method of claim 1, wherein, Before the step of recommending M sentences to the user based on the input information of the user, the method further comprises: constructing a set of optional parameter values for each parameter; the set of optional parameter values comprises a parameter value corresponding to a parameter; and the preferred sentence set comprises a plurality of first sentences and attribute information of each of the plurality of first sentences; the attribute information comprises a sentence identifier, a plug-in code, a sentence source, a sentence adoption frequency, a sentence adding time, and sentence content.

3. The method of claim 2, wherein, The step of constructing a set of optional parameter values for each parameter comprises: in a historical dialogue of an intelligent dialogue system, determining a historical sentence with an execution result, and adding a historical parameter value in the historical sentence to a set of optional parameter values corresponding to the historical parameter value; and / or obtaining an optional time value and adding the optional time value to a set of optional parameter values of a time type parameter; and / or obtaining an optional enumeration value and adding the optional enumeration value to a set of optional parameter values of an enumeration type parameter; and / or obtaining a word table and randomly selecting a plurality of data from the word table, and adding the plurality of data to a set of optional parameter values corresponding to the word table.

4. The method of claim 1, wherein, The step of constructing a preferred sentence set comprises: generating a first sentence based on a first large model prompt word; and / or in a historical dialogue of an intelligent dialogue system, determining a historical sentence with an execution result, and adding the historical sentence as a first sentence; and / or obtaining a first sentence template and generating a first sentence based on the first sentence template; adding the generated first sentence to the preferred sentence set.

5. The method of claim 4, wherein, The step of generating a first sentence based on a first large model prompt word comprises: configuring a second sentence template for each plug-in in an intelligent agent; obtaining a set of optional parameter values corresponding to each parameter in each second sentence template; the set of optional parameter values further comprises a ranking priority of a parameter value; the ranking priority of a parameter value determined based on a historical sentence with an execution result is high; the ranking priority of a parameter value determined based on an optional time value, an optional enumeration value, and a word table is medium; extract a target parameter value corresponding to the parameter from the set of optional parameter values according to a sorting priority of parameter values; generate the first large model prompt word based on the second sentence template and the target parameter value; generate a first sentence by using the first large model prompt word.

6. The method of claim 1 or 2, wherein, The sorting priority of the sentence sources is: the sorting priority of the first sentence generated based on the historical sentences is high, the sorting priority of the first sentence generated based on the first large model prompt word is medium, and the sorting priority of the first sentence generated based on the first sentence template is low. The sorting priority of the sentence adding time is: the sorting priority of the first sentence with a late sentence adding time is higher than the sorting priority of the first sentence with an early sentence adding time. The sorting priority of the number of times the sentence is adopted is: the sorting priority of the first sentence with a high number of times the sentence is adopted is higher than the sorting priority of the first sentence with a low number of times the sentence is adopted.

7. The method of claim 1, wherein, The recommending M sentences to the user based on the input information of the user comprises: obtaining the input character of the user when the user inputs a sentence, and obtaining the preferred sentence set; extracting M first sentences corresponding to the input character from the preferred sentence set; recommending the M first sentences to the user.

8. The method of claim 1, wherein, The recommending M sentences to the user based on the input information of the user comprises: obtaining an input sentence input by the user; generating a second large model prompt word based on the information of all plugins in the intelligent agent and the input sentence, and determining the plugin name corresponding to the input sentence by using the second large model prompt word; generating a third large model prompt word based on the information corresponding to the plugin name and the input sentence, and generating M second sentences by using the third large model prompt word; recommending the M second sentences to the user.

9. The method of claim 1, wherein, The extracting key information in the first target sentence by using a large model to generate a second target sentence comprises: if the first target sentence does not contain intent information, generating a fourth large model prompt word based on the information of all plugins in the intelligent agent and the first target sentence; the intent information indicates a target plugin for executing the first target sentence; generating the second target sentence by using the fourth large model prompt word.

10. The method of claim 1, wherein, The extracting key information in the first target sentence by using a large model to generate a second target sentence comprises: if the first target sentence contains intent information, determining a target plugin for executing the first target sentence according to the intent information, and determining a set of optional parameter values according to the extracted parameters in the first target sentence; if the number of extracted parameters is less than or equal to a parameter threshold, adjusting the parameter value corresponding to the extracted parameter according to the set of optional parameter values, and generating a fifth large model prompt word based on the adjusted parameter value and the target plugin, and generating the second target sentence by using the fifth large model prompt word; If the number of the extracted parameters is greater than the parameter threshold, part of the extracted parameters are selected from the plurality of extracted parameters, and a sixth large model prompt word is generated according to the parameter value corresponding to the part of the extracted parameters and the target plug-in.

11. The method of claim 1, wherein, The method for extracting key information in the first target sentence by using a large model and generating a second target sentence comprises the following steps: If the information of the first target sentence is queried in the intelligent agent, the reply of the first target is generated based on the information, and the reply is sent to the user; According to the association relationship between the plug-ins in the intelligent agent, the associated plug-in corresponding to the first target sentence is determined; According to the information of the reply and the associated plug-in, a seventh large model prompt word is generated; The associated sentence is generated by using the seventh large model prompt word, and the associated sentence is used as the second target sentence.

12. The method of any one of claims 4-5, 8-11, wherein, The method further comprises the following steps: The corresponding large model prompt word is generated by using the corresponding large model prompt word template.

13. A sentence recommendation device characterized by comprising: It comprises: The construction module is used for constructing an optimal sentence set; wherein, the construction of the optimal sentence set comprises: when a first sentence in the optimal sentence set meets a deletion condition, a first sentence with a low sentence ranking priority is deleted from the optimal sentence set according to a ranking rule; the deletion condition is that the number of sentences of a plug-in in the optimal sentence set exceeds a set value; the ranking rule is that the ranking priority of a sentence source is the sentence ranking priority, when the sentence sources are the same, the ranking priority of a sentence adding time is the sentence ranking priority, when the sentence adding times are the same, the ranking priority of a sentence adoption times is the sentence ranking priority; The first processing module is used for recommending M sentences to the user based on the input information of the user, and receiving a first target sentence selected by the user from the M sentences; M is a positive integer; The second processing module is used for extracting key information in the first target sentence by using a large model, generating a second target sentence, and recommending the second target sentence to the user.

14. An electronic device, comprising: It comprises: The memory is used for storing computer programs; The processor is used for executing the computer programs stored in the memory, and realizing the method in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and the computer program is executed by the processor to realize the method in any one of claims 1-12. The computer program is stored in the computer readable storage medium, and the computer program is executed by the processor to realize the method in any one of claims 1-12.

Citation Information

Patent Citations

  • Prompt word optimization method and system based on large language model

    CN119047482A