Interaction interface generation method and apparatus, electronic device, and computer readable medium
Patent Information
- Application Number
- CN202611040273.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-13
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]然而,当用户采用上述方式与智能体进行交互时,经常会存在如下技术问题:请求结果以纯文本的形式显示,请求结果中的重点信息难以突出显示,用户需要浏览完整的文本,耗费时间较长,造成交互效率较低,从而导致用户体验感较差
[0023]本公开的上述各个实施例具有如下有益效果:通过本公开的一些实施例的交互界面生成方法,可以提高与智能体交互的交互效率和用户体验感。具体来说,造成交互效率较低,导致用户体验感较差的原因在于:请求结果以纯文本的形式显示,请求结果中的重点信息难以突出显示,用户需要浏览完整的文本,耗费时间较长,造成交互效率较低,从而导致用户体验感较差。基于此,本公开的一些实施例的交互界面生成方法,首先,响应于检测到用户输入的对应智能体的初始交互请求信息,将上述初始交互请求信息确定为智能体交互请求信息,以及执行以下第一界面生成步骤:将智能体交互请求信息输入预设请求结果生成模型,得到请求结果,其中,上述预设请求结果生成模型对应上述智能体。由此,当用户向智能体提出请求之后,可以得到智能体自动生成的请求结果,从而可以用于向用户展示。其次,根据上述请求结果和预设界面结构约束信息,生成界面结构化提示词文本。由此,可以得到用于生成对应请求结果的界面的提示词,从而可以用于供智能体自动生成结构合法的界面配置文件。然后,将上述界面结构化提示词文本确定为初始提示词文本,以及执行以下第二界面生成步骤:将初始提示词文本输入预设界面结构化配置信息生成模型,得到界面结构化配置信息,其中,上述预设界面结构化配置信息生成模型对应上述智能体。由此,可以自动生成对应请求结果的界面配置文件,从而可以用于生成界面。之后,根据上述预设界面结构约束信息,对上述界面结构化配置信息进行校验处理,得到校验结果。由此,可以确认界面配置文件是否合格。最后,响应于确定上述校验结果满足预设校验条件,根据上述界面结构化配置信息,生成智能体交互请求结果界面。由此,当界面配置文件合格之后再生成界面,从而可以用于减少界面生成失败的次数,节省渲染资源。也因为在用户与智能体交互时,通过预先设置界面结构的约束条件,引导智能体生成对应请求结果的界面结构化配置信息,并对生成的界面结构化配置信息进行校验,当界面结构化配置信息符合要求时,生成对应请求结果的界面,从而可以通过界面直观向用户展示请求结果中的重点信息,且用户可以通过界面提供的交互工具实现与智能体的持续交互,进而可以提高用户与智能体交互的交互效率,由此,可以提高与智能体交互的交互效率和用户体验感。
Smart Images

Figure CN122963419A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure relate to the field of computer technology, and more specifically to interactive interface generation methods, apparatus, electronic devices, and computer-readable media. Background Technology
[0002] With the rapid development of artificial intelligence, the use of intelligent agents as auxiliary tools has become increasingly common. Currently, when users interact with intelligent agents, the typical approach is as follows: after the user inputs a request into the intelligent agent, the agent displays the request result in plain text on a pre-set interface.
[0003] However, when users interact with the agent in the above manner, the following technical problems often occur: the request result is displayed in plain text, the key information in the request result is difficult to highlight, users need to browse the complete text, which takes a long time, resulting in low interaction efficiency and a poor user experience.
[0004] The information disclosed in this background section is only intended to enhance the understanding of the background of the present disclosure concept, and therefore may contain information that does not form prior art known to those skilled in the art. Summary of the Invention
[0005] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0006] Some embodiments of this disclosure provide interactive interface generation methods, apparatuses, electronic devices, and computer-readable media to address the technical problems mentioned in the background section above.
[0007] In a first aspect, some embodiments of this disclosure provide an interactive interface generation method, the method comprising: responding to detecting initial interaction request information of a corresponding intelligent agent input by a user, determining the initial interaction request information as intelligent agent interaction request information, and performing the following first interface generation steps: inputting the intelligent agent interaction request information into a preset request result generation model to obtain a request result, wherein the preset request result generation model corresponds to the intelligent agent; generating structured prompt text for the interface based on the request result and preset interface structure constraint information; determining the structured prompt text for the interface as initial prompt text, and performing the following second interface generation steps: inputting the initial prompt text into a preset interface structure configuration information generation model to obtain interface structure configuration information, wherein the preset interface structure configuration information generation model corresponds to the intelligent agent; performing verification processing on the interface structure configuration information based on the preset interface structure constraint information to obtain a verification result; responding to determining that the verification result satisfies preset verification conditions, generating an intelligent agent interaction request result interface based on the interface structure configuration information.
[0008] Optionally, the second interface generation step further includes: in response to determining that the above verification result does not meet the above preset verification conditions, updating the above structured prompt text of the interface according to the above verification result to obtain updated structured prompt text of the interface; using the above updated structured prompt text of the interface as the initial prompt text, and continuing to execute the above second interface generation step.
[0009] Optionally, the above request result includes the request scenario type, and the above generation of interface structured prompt text based on the above request result and preset interface structure constraint information includes: determining the scenario prompt text based on the request scenario type included in the above request result; and generating the interface structured prompt text based on the scenario prompt text and preset interface structure constraint information.
[0010] Optionally, the above method further includes: controlling an associated display device to display the interface showing the results of the intelligent agent's interaction request.
[0011] Optionally, the above method further includes: in response to detecting an interaction operation acting on the intelligent agent interaction request result interface, generating interaction operation request information based on the interaction operation; and using the interaction operation request information as intelligent agent interaction request information to continue executing the first interface generation step.
[0012] Optionally, the above request result includes the request task type; and the above generation of the intelligent agent interaction request result interface based on the above interface structured configuration information includes: determining the rendering type and initial intelligent agent interaction interface corresponding to the above interface structured configuration information based on the above request task type; updating the initial intelligent agent interaction interface based on the above interface structured configuration information and the above rendering type to obtain the intelligent agent interaction request result interface.
[0013] Optionally, the above-mentioned updating of the initial agent interaction interface based on the above-mentioned interface structured configuration information and the above-mentioned rendering type to obtain the agent interaction request result interface includes: in response to determining that the above-mentioned rendering type meets the preset incremental rendering conditions, performing incremental update processing on the initial agent interaction interface based on the above-mentioned interface structured configuration information to obtain the agent interaction request result interface.
[0014] Secondly, some embodiments of this disclosure provide an interactive interface generation apparatus, the apparatus comprising: an execution unit configured to, in response to detecting initial interaction request information of a corresponding intelligent agent input by a user, determine the initial interaction request information as intelligent agent interaction request information, and perform the following first interface generation steps: inputting the intelligent agent interaction request information into a preset request result generation model to obtain a request result, wherein the preset request result generation model corresponds to the intelligent agent; generating structured prompt text for the interface based on the request result and preset interface structure constraint information; determining the structured prompt text for the interface as initial prompt text, and performing the following second interface generation steps: inputting the initial prompt text into a preset interface structure configuration information generation model to obtain interface structure configuration information, wherein the preset interface structure configuration information generation model corresponds to the intelligent agent; performing verification processing on the interface structure configuration information based on the preset interface structure constraint information to obtain a verification result; and, in response to determining that the verification result satisfies preset verification conditions, generating an intelligent agent interaction request result interface based on the interface structure configuration information.
[0015] Optionally, the execution unit is further configured to perform the following second interface generation step: in response to determining that the above verification result does not meet the above preset verification conditions, update the above interface structured prompt text according to the above verification result to obtain updated interface structured prompt text; use the above updated interface structured prompt text as the initial prompt text, and continue to perform the above second interface generation step.
[0016] Optionally, the above request result includes a request scenario type, and the execution unit is further configured to perform the following steps: determine the scenario prompt text based on the request scenario type included in the above request result; and generate the interface structure prompt text based on the above scenario prompt text and the preset interface structure constraint information.
[0017] Optionally, the interactive interface generation apparatus further includes a display unit. The display unit is configured to control an associated display device to display the interface showing the result of the agent's interaction request.
[0018] Optionally, the interactive interface generation device further includes a generation unit and a continuation execution unit. The generation unit is configured to: in response to detecting an interactive operation acting on the intelligent agent's interactive request result interface, generate interactive operation request information based on the interactive operation; the continuation execution unit is configured to: use the interactive operation request information as intelligent agent interactive request information and continue executing the first interface generation step.
[0019] Optionally, the above request result includes the request task type; the execution unit is further configured to: determine the rendering type and the initial agent interaction interface corresponding to the above interface structured configuration information according to the above request task type; update the initial agent interaction interface according to the above interface structured configuration information and the above rendering type to obtain the agent interaction request result interface.
[0020] Optionally, the execution unit is further configured to: in response to determining that the above rendering type meets the preset incremental rendering conditions, perform incremental update processing on the initial agent interaction interface according to the above interface structured configuration information to obtain the agent interaction request result interface.
[0021] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0022] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method described in any implementation of the first aspect.
[0023] The above-described embodiments of this disclosure have the following beneficial effects: the interactive interface generation method of some embodiments of this disclosure can improve the interaction efficiency and user experience of interacting with the intelligent agent. Specifically, the reason for the low interaction efficiency and poor user experience is that the request result is displayed in plain text form, making it difficult to highlight the key information in the request result. Users need to browse the complete text, which takes a long time, resulting in low interaction efficiency and a poor user experience. Based on this, the interactive interface generation method of some embodiments of this disclosure firstly, in response to detecting the initial interaction request information of the corresponding intelligent agent input by the user, determines the initial interaction request information as intelligent agent interaction request information, and performs the following first interface generation step: inputting the intelligent agent interaction request information into a preset request result generation model to obtain the request result, wherein the preset request result generation model corresponds to the intelligent agent. Thus, when the user makes a request to the intelligent agent, the request result automatically generated by the intelligent agent can be obtained, which can then be used to display to the user. Secondly, based on the above request result and preset interface structure constraint information, structured prompt text for the interface is generated. Therefore, prompt words for generating the corresponding request result interface can be obtained, which can then be used by the agent to automatically generate a structurally valid interface configuration file. Then, the aforementioned structured prompt word text is determined as the initial prompt word text, and the following second interface generation step is executed: the initial prompt word text is input into a preset interface structured configuration information generation model to obtain interface structured configuration information, wherein the preset interface structured configuration information generation model corresponds to the aforementioned agent. This automatically generates the interface configuration file for the corresponding request result, which can then be used to generate the interface. Afterwards, based on the aforementioned preset interface structure constraint information, the aforementioned interface structured configuration information is validated to obtain a validation result. This confirms whether the interface configuration file is valid. Finally, in response to the validation result satisfying the preset validation conditions, the agent's interactive request result interface is generated based on the aforementioned interface structured configuration information. Therefore, the interface is generated only after the interface configuration file is valid, which can reduce the number of interface generation failures and save rendering resources. Because when users interact with the intelligent agent, by pre-setting constraints on the interface structure, the intelligent agent is guided to generate the interface structure configuration information corresponding to the request result, and the generated interface structure configuration information is verified. When the interface structure configuration information meets the requirements, the interface corresponding to the request result is generated. Thus, the key information in the request result can be intuitively displayed to the user through the interface. Furthermore, the user can continuously interact with the intelligent agent through the interactive tools provided by the interface, thereby improving the interaction efficiency between the user and the intelligent agent. As a result, the interaction efficiency and user experience of interacting with the intelligent agent can be improved. Attached Figure Description
[0024] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0025] Figure 1 This is a schematic diagram of an application scenario of an interactive interface generation method according to some embodiments of the present disclosure; Figure 2 This is a flowchart of some embodiments of the interactive interface generation method according to the present disclosure; Figure 3 These are flowcharts of other embodiments of the interactive interface generation method according to this disclosure; Figure 4 This is a flowchart of yet another embodiment of the interactive interface generation method according to the present disclosure; Figure 5 These are schematic diagrams illustrating the structure of some embodiments of the interactive interface generation apparatus according to this disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0026] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0027] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0028] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0029] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0030] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0031] The collection, storage, and use of user personal information (such as user profiles and user historical behavior) involved in this disclosure shall be carried out in accordance with relevant laws and regulations, provided that the relevant organizations or individuals have fulfilled their obligations, including conducting personal information security impact assessments, informing personal information subjects, obtaining prior authorization and consent from personal information subjects, and other obligations before performing the corresponding operations.
[0032] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0033] Figure 1 This is a schematic diagram of an application scenario of the interactive interface generation method of some embodiments of this disclosure.
[0034] exist Figure 1 In the application scenario, firstly, the user can input initial interaction request information 102 to the intelligent agent deployed on computing device 101. Secondly, the intelligent agent deployed on computing device 101 can generate a request result 103. Then, computing device 101 can generate structured interface prompt text 105 based on the request result 103 and preset interface structure constraint information 104. Afterwards, computing device 101 can input the structured interface prompt text 105 as the initial prompt text into the intelligent agent deployed on computing device 101 to obtain structured interface configuration information 106. Next, computing device 101 can perform verification processing on the structured interface configuration information 106 based on the preset interface structure constraint information 104 to obtain a verification result 107. Finally, in response to determining that the verification result 107 meets the preset verification conditions, an intelligent agent interaction request result interface 108 is generated based on the structured interface configuration information 106.
[0035] It should be noted that the aforementioned computing device 101 can be either hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed within the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0036] It should be understood that Figure 1 The number of computing devices shown is merely illustrative. Any number of computing devices can be used depending on implementation needs.
[0037] Continue to refer to Figure 2shows a flow 200 of some embodiments of the interactive interface generation method according to the present disclosure. The interactive interface generation method includes the following steps: Step 201, in response to detecting initial interaction request information for an agent input by a user, determining the initial interaction request information as agent interaction request information, and performing the following first interface generation step: Step 2011, inputting the agent interaction request information into a preset request result generation model to obtain a request result.
[0038] In some embodiments, the execution subject of the interactive interface generation method (e.g. Figure 1 the computing device shown) may input the agent interaction request information into the preset request result generation model to obtain the request result. The above initial interaction request information may represent a request for the user to interact with the agent for the first time. The above initial interaction request information may be input by the user via voice, or input via a text box included in the initial interface corresponding to the agent. The above initial interface may be the interface when the corresponding agent is opened for the first time. The above agent may be an agent deployed on the above execution subject. The above initial interaction request information may be a request for the user to have the agent solve a problem. For example, the above initial interaction request information may be "Help me organize today's schedule into cards", or "Recommend delicious restaurants nearby". The above preset request result generation model may correspond to the above agent. That is, the above preset request result generation model may be a large language model. For example, the above preset request result generation model may be deployed on the above agent. The above preset request result generation model may be GPT4.0 or Deepseek. The above request result may be a result corresponding to the user's request. The above request result may include, but is not limited to, a request result text. The above request result text may be the request result in text form. As an example, when the above initial interaction request information is "Recommend delicious restaurants nearby", the above request result text may be: "The following are the restaurants found for you: Yunshang Xiaoguan, with a rating of 4.8, serving local fusion cuisine, with an average per-person cost of about 120 yuan, suitable for friend gatherings, address: No. 88 Nanjing East Road, Huangpu District, Shanghai; Lakeside Pasta House, with a rating of 4.8, an Italian restaurant featuring signature handmade pasta and tiramisu, address: No. 66 Hengshan Road, Xuhui District, Shanghai; Chuanwei Shiguang, with a rating of 4.7, a Sichuan restaurant with highly-rated Mapo Tofu and Boiled Fish, address: No. 218 Yuyuan Road, Jing'an District, Shanghai".
[0039] Step 2012, generating an interface structured prompt text according to the request result and preset interface structure constraint information.
[0040] In some embodiments, the execution entity can generate structured prompt text for the interface based on the request result and preset interface structure constraint information. The preset interface structure constraint information can be information used to constrain and define the interface structure. As an example, the preset interface structure constraint information can be: ## AgentGlassUi Output Rules The generated response must comply with the following rules: - The response may contain one or more AgentGlassUi JSON blocks.
[0041] - Each AgentGlassUi JSON block must be wrapped in ` <agentglassui-json> ` and`< / agentglassui-json> ` tag.
[0042] - Normal conversation text can be placed before and after the JSON block, but the UI part must be valid JSON.
[0043] - The JSON part must be a single raw JSON value, typically a list of AgentGlassUi messages.
[0044] - The JSON must be validated by the AgentGlassUi JSON Schema / Catalog provided later.
[0045] - The top-down component order must be followed in the `components` list: - The `root` component must be the first element.
[0046] - The parent component must appear before the child component.
[0047] This allows the streaming parser to incrementally render the UI.
[0048] ## Summary of AgentGlassUi Schema The final output must conform to the AgentGlassUi v1.0 Server-to-Client Schema.
[0049] The types of messages that can be output include: - `createSurface`: Creates a UI surface.
[0050] - `updateComponents`: Updates the component tree on the surface.
[0051] - `updateDataModel`: Updates the data model bound to the component.
[0052] - `deleteSurface`: Deletes the surface.
[0053] Each message must contain: - `version: "v1.0"` - The corresponding AgentGlassUi message field, such as `createSurface`, `updateComponents`, or `updateDataModel`.
[0054] ## AgentGlassUi Basic Catalog The catalog currently in use is: Catalog Name: `https: / / agentglassui.rokid.com / specification / v1_0 / basic_catalog.json` `AgentGlassUi Basic Catalog` It defines the basic UI components and functions that the model can use.
[0055] Available components include: - `Text`: Displays text. Commonly used for titles, names, ratings, details, links, etc.
[0056] - `Image`: Displays an image.
[0057] - `Icon`: Displays an icon.
[0058] - `Video`: Displays video.
[0059] - `AudioPlayer`: Plays audio.
[0060] - `Row`: A horizontal layout container.
[0061] - `Column`: A vertical layout container.
[0062] - `List`: A list container that allows you to repeatedly render template components based on an array of data.
[0063] - `Card`: Card container.
[0064] - `Tabs`: Tabs.
[0065] - `Modal`: pop-up window.
[0066] - `Divider`: Divider line.
[0067] - `Button`: Button.
[0068] - `TextField`: Text input field.
[0069] - `CheckBox`: Checkbox.
[0070] - `ChoicePicker`: Option selector.
[0071] - `Slider`: Slider.
[0072] - `DateTimeInput`: Date and time input box.
[0073] The functions available in the Catalog include: - `required` - `regex` - `length` - `numeric` - `email` - `formatString` - `formatNumber` - `formatCurrency` - `formatDate` - `pluralize` - `openUrl` - `and` - `or` - `not` Common Types rules include: - Each component must have an `id`.
[0074] - Components declare their type through the `component` field.
[0075] - Child components cannot be directly inlined; they must be referenced via the component's `id`.
[0076] - `children` can be a fixed array of component IDs or a template based on a data path.
[0077] - Dynamic text, numbers, and boolean values can be data-bound to paths, for example, `{ "path": " / title"}`.
[0078] - A button's action can trigger client-side events and carry context data.
[0079] In practice, the aforementioned executing entity can fill the requested result into a preset interface prompt text template to obtain the interface prompt text. This preset interface prompt text template can be a pre-defined template for displaying text used to generate the interface. For example, the preset interface prompt text template could be something like, "Please present the following content in the form of an interface." XXX The underlined portion can be used to fill in the request result. Then, the generated prompt text is combined with the preset interface structure constraints to obtain the structured prompt text. This combination can be done by character concatenation.
[0080] Optionally, the request result may also include a request scenario type. The request scenario type can characterize the type of scenario requested by the user. The request scenario type may include, but is not limited to: restaurant recommendation, hotel recommendation, document organization, and meeting minutes. For example, when the initial interaction request information is "Help me organize today's itinerary into cards," the request scenario type could be document organization. As another example, when the initial interaction request information is "Recommend good restaurants nearby," the request scenario type could be restaurant recommendation.
[0081] In some optional implementations of certain embodiments, the aforementioned execution entity can generate structured prompt text for the interface based on the request result and preset interface structure constraint information through the following steps: The first step is to determine the scenario prompt text based on the request scenario type included in the above request results. In practice, the executing entity can determine the scenario prompt text as the preset prompt text corresponding to the above request scenario type. The preset prompt text can be a pre-defined prompt text. Each preset prompt text corresponds to one request scenario type. As an example, when the above request scenario type is "Recommended Restaurant," the preset prompt text could be: # System / Instruction You are a helpful restaurant search assistant. Your final output must be an AgentGlassUi UI JSON response.
[0082] ## Restaurant Business Rules If the user requests a list of restaurants: - The `get_restaurants` tool must be invoked.
[0083] - Extracted from user requests: - `cuisine`: cuisine - `location`: Location - `count`: The number of restaurants to return. - You must use the restaurant data returned by the `get_restaurants` tool to populate the `updateDataModel`.
[0084] - When using `updateDataModel` to update the restaurant list, you must specify `path`.
[0085] - When updating restaurant items, you must use `path: " / items"`.
[0086] - `updateDataModel.value` must be an array of restaurants.
[0087] The restaurant list status is mainly used for: - `Column` - `Row` - `List` - `Card` - `Image` - `Text` - `Button` ## Restaurant List UI Example Logic UI Structure: - Create `surfaceId: "default"`.
[0088] - Use AgentGlassUi Basic Catalog.
[0089] - Create a root component `root` of type `Column`.
[0090] - `root` contains: - `title-heading` - `item-list` - `title-heading` is `Text`, bound to ` / title`.
[0091] - `item-list` is a `List`, oriented `vertical`, and bound to ` / items`.
[0092] - Each item is rendered using `item-card-template`.
[0093] - `item-card-template` is `Card`.
[0094] - The Card uses a `Row` layout internally: - The left side displays a restaurant image `Image`, bound to `imageUrl`.
[0095] - Restaurant information is displayed on the right using `Column`.
[0096] - Restaurant information includes: - Restaurant name, bound to `name` - Rating, tied to `rating` - Details, bind `detail` - Link, bind `infoLink` - Reservation button The second step is to generate structured interface prompt text based on the aforementioned scenario prompt text and preset interface structure constraints. In practice, the executing entity can combine the aforementioned scenario prompt text with the aforementioned preset interface structure constraints to obtain the structured interface prompt text.
[0097] As another example, the aforementioned executing entity can combine the acquired user interface preference information, the aforementioned scenario prompt text, and the aforementioned preset interface structure constraint information to obtain structured interface prompt text. The aforementioned user interface preference information can represent the user's preference for the style of the interface to be displayed. The aforementioned user interface preference information may include, but is not limited to, interface style, text font style, interface text density, and layout. The aforementioned interface style can be the style of the interface itself. The aforementioned text font style can be the style of the text font in the interface. The aforementioned interface text density can represent the area occupied by the text in the interface relative to the total area of the interface. The aforementioned layout can be, but is not limited to, one of the following: vertical list arrangement, horizontal list arrangement.
[0098] Therefore, different targeted prompts can be pre-set for different scenarios, thereby improving the guidance of the generated structured prompt text on the interface.
[0099] In addressing the technical problems mentioned above by employing technical solutions, and considering the application scenario where users with limited professional knowledge (e.g., users with attention deficit disorder and weak fitness knowledge) pose professional questions to the intelligent agent regarding various objects in the real-world environment (e.g., a user asking about the calories in various dishes while dining at a restaurant), the following technical problem often arises: When generating prompts to guide the intelligent agent to automatically generate the interface, different users have different needs in the same scenario, and using fixed prompt text leads to a poor user experience. This application scenario requires the following characteristics: users with attention deficit disorder can only maintain attention for short periods, and have a very high need to shorten the time required to view request results. Combining the existing advantages of the inventor's organization in image recognition technology research and development, the following solution was chosen: In some optional implementations of certain embodiments, the aforementioned execution entity may determine the scenario prompt text based on the request scenario type included in the request result through the following steps: Step one: Obtain user's historical interface preference information. This information may include, but is not limited to, preferred style information and preferred color information. The preferred style information represents the user's preferred interface style. This preferred style information can include various interface style types. These interface style types represent the style of the interface. For example, these interface style types may include, but are not limited to, business style, cartoon style, traditional style, and modern style. The preferred color information represents the colors present in the user's preferred interfaces. In practice, the executing entity can obtain user's historical interface preference information from a database via wired or wireless connections.
[0100] Step two involves performing text entity recognition processing on the aforementioned request results to obtain individual text entities. In practice, the executing entity can use a preset text entity recognition algorithm to perform text entity recognition processing on the request result text included in the request results to obtain individual text entities. The preset text entity recognition algorithm can be an algorithm used to identify individual entities in the text. For example, the preset text entity recognition algorithm can be a deep learning-based text entity recognition algorithm.
[0101] Step four, for each of the above text entities, perform the following sub-steps: The first sub-step involves determining the preset style information corresponding to the aforementioned text entity as the text entity component style information. This preset style information can be a pre-defined style for the corresponding text entity. The preset style information can include, but is not limited to, preset component styles. The preset component styles can be pre-defined styles for the interface component when the text entity is used as text in an interface component. For example, when the text entity is "Temperature: 37 degrees", the preset component styles included in the preset style information could be a thermometer shape or a progress bar shape. As another example, when the text entity is "Catching a plane: 11 o'clock", the preset component styles included in the preset style information could be an airplane shape.
[0102] The second sub-step involves determining the component style information corresponding to the aforementioned text entity based on the text entity component style information and the aforementioned preference style information. In practice, the executing entity can combine the text entity component style information with the interface style type of the aforementioned preference style information to obtain the component style information corresponding to the aforementioned text entity.
[0103] The third sub-step involves performing sentiment recognition processing on the aforementioned text entities to obtain sentiment types. In practice, firstly, the executing entity can identify the text entities that meet preset association conditions as a set of associated text entities. These preset association conditions can be: the text entity is extracted from the same sentence as the text entity. Then, a preset sentiment recognition model is used to perform sentiment recognition processing on the associated text entity set and the text entities to obtain sentiment types. This preset sentiment recognition model can be a text sentiment recognition model based on Natural Language Processing (NLP). The sentiment types can represent the emotions expressed by the text entities. These sentiment types can include, but are limited to, neutral, level 1 alarm, level 2 alarm, happy, and sad.
[0104] The fourth sub-step involves determining the component color information corresponding to the aforementioned text entity based on the aforementioned sentiment type and preferred color information. In practice, firstly, the executing entity can determine the colors corresponding to the aforementioned sentiment type as sentiment color information. Then, colors that are identical in the aforementioned sentiment color information and the aforementioned preferred color information are determined as the component color information corresponding to the aforementioned text entity. As an example, when the aforementioned sentiment type is a level one alarm, the corresponding colors may include, but are not limited to, red and yellow. As another example, when the aforementioned sentiment type is happiness, the corresponding colors may include, but are not limited to, pink and yellow.
[0105] Step 5: Based on the request scenario type, the determined color information of each component, and the style information of each component included in the above request results, determine the scenario prompt text. In practice, firstly, the executing entity can determine the preset scenario prompt template corresponding to the above request scenario type as the scenario prompt template. This scenario prompt template can be used to generate scenario prompts. Then, the determined color information and style information of each component are filled into the scenario prompt template to obtain the scenario prompt text.
[0106] The above-described technical solution and its related content, as an inventive point of this disclosure, solve the second technical problem of "poor user experience". Factors leading to a poor user experience often include: when generating prompts for the guided intelligent agent to automatically generate the interface, different users have different needs for the same scenario, and using fixed prompt text results in a poor user experience. Solving these factors can improve the user experience. To achieve this effect, the interactive interface generation method of this disclosure first obtains the user's historical interface preference information. This information includes preference style information and preference color information. This allows for the creation of a user interest profile, which can then be used to generate an interface more closely aligned with the user's preferences. Secondly, the request result is processed by text entity recognition to obtain various text entities. This allows for the determination of key information in the request result, which can then be used to determine the component style of the key information. Then, for each text entity, the following steps are performed: the preset style information corresponding to the text entity is determined as the text entity component style information; based on the text entity component style information and the preference style information, the component style information corresponding to the text entity is determined. This allows us to obtain component style information that considers both the semantics of text entities and user preferences, ensuring that component styles align with both scenario requirements and user needs. Next, sentiment recognition processing is performed on the aforementioned text entities to obtain sentiment types. Based on these sentiment types and the aforementioned preferred color information, the corresponding component color information is determined. This yields component color information that considers both the meaning expressed by the request result and user needs, allowing the meaning of the request result to be intuitively expressed through component colors. Finally, based on the request scenario type included in the request result, the determined component color information, and the component style information, scenario prompt text is determined. Therefore, based on different request scenarios and user preferences, prompt text that guides the large language model to generate intuitively expressive meanings of request results can be dynamically generated. This makes the generated interface more user-friendly, and the meaning of the request result more intuitive. Consequently, user comfort is improved, the time required for users to browse and understand request results is shortened, and the user experience is enhanced.
[0107] Step 2013: Determine the structured prompt text as the initial prompt text, and perform the following second interface generation steps: Step 20131: Input the initial prompt text into the preset interface structured configuration information generation model to obtain the interface structured configuration information.
[0108] In some embodiments, the aforementioned execution entity can input the initial prompt text into a preset interface structured configuration information generation model to obtain interface structured configuration information. The preset interface structured configuration information generation model corresponds to the aforementioned intelligent agent. The preset interface structured configuration information generation model can be a large language model corresponding to the aforementioned intelligent agent. The aforementioned interface structured configuration information can be information from a configuration file used to generate the interface. The aforementioned interface structured configuration information can include, but is not limited to, an interface structured configuration file. The aforementioned interface structured configuration file can be a file used to directly render the interface through a rendering component. For example, the format of the aforementioned interface structured configuration file can be a JSON file or an XML file. As an example, when the initial interaction request information is "Recommend nearby good restaurants", the aforementioned interface structured configuration file can be: [ { "type": "createSurface", "version": "1.0", "createSurface": { "surfaceId": "default", "catalogId": "https: / / agentglassui.rokid.com / specification / v1_0 / basic_catalog.json", "theme": { "primaryColor": "#FF0000", "font": "Roboto" } } }, { "type": "updateComponents", "version": "1.0", "updateComponents": { "surfaceId": "default", "components": [ { "id": "root", "component": "Column", "children": ["title-heading", "item-list"] }, { "id": "title-heading", "component": "Text", "variant": "h1", "text": { "path": " / title" } }, { "id": "item-list", "component": "List", "direction": "vertical", "children": { "componentId": "item-card-template", "path": " / items" } }, { "id": "item-card-template", "component": "Card", "child": "card-layout" }, { "id": "card-layout", "component": "Row", "children": ["card-image", "card-details"] }, { "id": "card-image", "component": "Image", "variant": "mediumFeature", "weight": 1, "url": { "path": "imageUrl" } }, { "id": "card-details", "component": "Column", "weight": 2, "children": [ "template-name", "template-rating", "template-detail", "template-link", "template-book-button" ] }, { "id": "template-name", "component": "Text", "variant": "h3", "text": { "path": "name" } }, { "id": "template-rating", "component": "Text", "text": { "path": "rating" } }, { "id": "template-detail", "component": "Text", "text": { "path": "detail" } }, { "id": "template-link", "component": "Text", "text": { "path": "infoLink" } }, { "id": "template-book-button", "component": "Button", "child": "book-now-text", "variant": "primary", "action": { "event": { "name": "book_restaurant", "context": { "restaurantName": { "path": "name" }, "imageUrl": { "path": "imageUrl" }, "address": { "path": "address" } } } } }, { "id": "book-now-text", "component": "Text", "text": "Reserve" } } }, { "type": "updateDataModel", "version": "1.0", "updateDataModel": { "surfaceId": "default", "path": " / title", "value": "The restaurant I found for you" } }, { "type": "updateDataModel", "version": "1.0", "updateDataModel": { "surfaceId": "default", "path": " / items", "value": [ { "name": "Cloud Restaurant", "rating": 4.8, "detail": "Local fusion cuisine, approximately ¥120 per person, suitable for gatherings with friends." "infoLink": "https: / / example.com / restaurants / yunshang", "imageUrl": "https: / / picsum.photos / seed / yunshang / 400 / 260", Address: No. 88 Nanjing East Road, Huangpu District, Shanghai }, { "name": "Lakeside Pasta House", "rating": 4.6, "detail": "Italian restaurant, signature handmade pasta and tiramisu." "infoLink": "https: / / example.com / restaurants / lake-pasta", "imageUrl": "https: / / picsum.photos / seed / lake-pasta / 400 / 260", Address: No. 66 Hengshan Road, Xuhui District, Shanghai }, { "name": "Sichuan Flavors in Time", "rating": 4.7, "detail": "This Sichuan restaurant is highly regarded for its Mapo Tofu and Boiled Fish." "infoLink": "https: / / example.com / restaurants / chuanwei", "imageUrl": "https: / / picsum.photos / seed / chuanwei / 400 / 260", Address: No. 218, Yuyuan Road, Jing'an District, Shanghai } ] } } ] Step 20132: Based on the preset interface structure constraint information, perform verification processing on the interface structure configuration information to obtain the verification result.
[0109] In some embodiments, the execution entity can perform verification processing on the interface structured configuration information based on the preset interface structure constraint information to obtain a verification result. In practice, firstly, the execution entity can perform type verification on the interface structured configuration file based on the preset interface structure constraint information to obtain a type verification result. For example, if any "Type" in the interface structured configuration file does not correspond to any of the types "createSurface", "updateComponents", "updateDataModel", or "deleteSurface", then the preset type verification failure information is determined as the type verification result. Here, the preset type verification failure information can be a pre-defined indication that the type of the interface structured configuration file is unqualified. When each "Type" in the interface structured configuration file corresponds to any of the types "createSurface", "updateComponents", "updateDataModel", or "deleteSurface", then the preset type verification success information is determined as the type verification result. Here, the preset type verification success information can be a pre-defined indication that the type of the interface structured configuration file is qualified.
[0110] Secondly, the aforementioned execution entity can perform structural verification on the aforementioned interface structure configuration information based on the preset interface structure constraints, and obtain the structural verification result. For example, the preset interface structure constraints restrict the interface version to 1.0. If the value of "version" in the interface structure configuration file is not 1.0, the preset structural verification failure information is determined as the structural verification result. This preset structural verification failure information can indicate that the structure of the interface structure configuration file is unqualified. When the value of "version" in the interface structure configuration file is 1.0, the preset structural verification success information is determined as the structural verification result. This preset structural verification success information can indicate that the structure of the interface structure configuration file is qualified. As another example, if the field corresponding to "path" in the interface structure configuration file is declared, the preset structural verification success information is determined as the structural verification result. If the keyword corresponding to "path" in the interface structure configuration file is undeclared, the preset structural verification failure information is determined as the structural verification result.
[0111] Then, the aforementioned execution entity can perform component attribute validation on the aforementioned interface structure configuration information based on the aforementioned preset interface structure constraint information, and obtain the component attribute validation result. As an example, the aforementioned preset interface structure constraint information includes: Available components include: - `Text`: Displays the text.
[0112] - `Image`: Displays an image.
[0113] - `Icon`: Displays an icon.
[0114] - `Video`: Displays video.
[0115] - `AudioPlayer`: Plays audio.
[0116] - `Row`: A horizontal layout container.
[0117] - `Column`: A vertical layout container.
[0118] - `List`: A list container that allows you to repeatedly render template components based on an array of data.
[0119] - `Card`: Card container.
[0120] - `Tabs`: Tabs.
[0121] - `Modal`: pop-up window.
[0122] - `Divider`: Divider line.
[0123] - `Button`: Button.
[0124] - `TextField`: Text input field.
[0125] - `CheckBox`: Checkbox.
[0126] - `ChoicePicker`: Option selector.
[0127] - `Slider`: Slider.
[0128] - `DateTimeInput`: Date and time input box If any component corresponding to any "component" in the aforementioned interface structure configuration file does not exist in any of the constrained components, then the preset component attribute failure information is determined as the component attribute verification result. This preset component attribute failure information indicates that the component attributes in the interface structure configuration file are unqualified. Conversely, if all components corresponding to any "component" in the aforementioned interface structure configuration file exist in all the constrained components, then the preset component attribute qualification information is determined as the component attribute verification result. This preset component attribute qualification information indicates that the component attributes in the interface structure configuration file are qualified.
[0129] Finally, in response to the determination that the above-mentioned type verification results, structure verification results, and component attribute verification results are all qualified, the preset verification pass information is determined as the verification result. The preset verification pass information indicates that the interface structured configuration information is qualified. In response to the determination that the above-mentioned type verification results are unqualified, the above-mentioned type verification results and the preset verification fail information are determined as the verification result. The preset verification fail information indicates that the interface structured configuration information is unqualified. In response to the determination that the above-mentioned structure verification results are unqualified, the above-mentioned structure verification results and the preset verification fail information are determined as the verification result. In response to the determination that the above-mentioned component attribute verification results are unqualified, the above-mentioned component attribute verification results and the preset verification fail information are determined as the verification result.
[0130] Step 20133: In response to determining that the verification result meets the preset verification conditions, generate the intelligent agent interaction request result interface based on the interface structured configuration information.
[0131] In some embodiments, the execution entity may, in response to determining that the verification result meets a preset verification condition, generate an agent interaction request result interface based on the interface structure configuration information. The preset verification condition may be that the verification result indicates the interface structure configuration information is qualified. In practice, the execution entity may, in response to determining that the verification result meets the preset verification condition, render the interface using a preset browser rendering library based on the interface structure configuration file to obtain the agent interaction request result interface. The preset browser rendering library may be a pre-defined rendering library that renders the interface by running a browser. For example, the preset browser rendering library may be a React rendering library or a Vue rendering library.
[0132] Optionally, the aforementioned execution entity can also render the interface according to the aforementioned interface structure configuration information using a preset browser renderer to obtain the intelligent agent interaction request result interface. The preset browser renderer can be a Canvas renderer or a WebGL renderer.
[0133] Optionally, the aforementioned executing entity may also perform the following second interface generation step: The first step, in response to the determination that the above verification result does not meet the above preset verification conditions, is to update the above structured prompt text of the interface based on the above verification result, thereby obtaining updated structured prompt text of the interface. In practice, the above executing entity may, in response to the determination that the above verification result does not meet the above preset verification conditions, add the above verification result to the above structured prompt text of the interface, thereby obtaining updated structured prompt text of the interface.
[0134] The second step is to use the structured prompt text of the updated interface as the initial prompt text and continue with the second interface generation step.
[0135] Therefore, when the interface structure configuration information is not up to standard, the agent can be guided to regenerate again through the verification results until it is up to standard. This can reduce the number of rendering failures and save rendering resources while training the accuracy of the agent.
[0136] Further reference Figure 3 This illustrates a flow 300 of another embodiment of the interactive interface generation method. Flow 300 of this interactive interface generation method includes the following steps: Step 301: In response to detecting the initial interaction request information of the corresponding intelligent agent input by the user, the initial interaction request information is determined as the intelligent agent interaction request information, and the following first interface generation steps are performed: Step 3011: Input the intelligent agent interaction request information into the preset request result generation model to obtain the request result.
[0137] Step 3012: Generate structured prompt text for the interface based on the request result and preset interface structure constraints.
[0138] Step 3013: Determine the structured prompt text as the initial prompt text, and perform the following second interface generation steps: Step 30131: Input the initial prompt text into the preset interface structured configuration information generation model to obtain the interface structured configuration information.
[0139] Step 30132: Based on the preset interface structure constraint information, perform verification processing on the interface structure configuration information to obtain the verification result.
[0140] Step 30133: In response to determining that the verification result meets the preset verification conditions, generate the intelligent agent interaction request result interface based on the interface structured configuration information.
[0141] In some embodiments, the specific implementation of steps 301-30133 and the resulting technical effects can be found in [reference needed]. Figure 2 Steps 201-20133 in the corresponding embodiments will not be repeated here.
[0142] Step 302: Control the associated display device to display the interface of the intelligent agent's interaction request results.
[0143] In some embodiments, the aforementioned execution entity (e.g. Figure 1 The computing device shown can control an associated display device to display the interface showing the results of the intelligent agent's interaction request. The display device can be the terminal's screen.
[0144] In addressing the technical problems mentioned above by employing technical solutions, and considering the application scenario—where users with attention deficits ask questions about objects in the real-world environment (e.g., asking about the calories in various dishes at a restaurant, or asking about descriptions of artifacts at a museum)—the following technical problem often arises: When the intelligent agent displays the request results through the interface, the various components are directly displayed in preset positions. Users then need to match the displayed results with the objects in the real-world environment, which is time-consuming and results in a poor user experience. Given the specific needs of this application scenario—users with attention deficits can only maintain attention for short periods, creating a significant need to shorten the time spent browsing request results—and considering the existing advantages of the inventor's organization in image recognition technology research and development, the following solution was chosen: Optionally, the aforementioned display device can be a head-mounted display device. This head-mounted display device can be, but is not limited to, AR glasses, MR glasses, or XR glasses.
[0145] In some optional implementations of certain embodiments, the aforementioned execution entity may control an associated display device to display the interface showing the results of the intelligent agent's interaction request through the following steps: The first step is to control the aforementioned head-mounted display device to acquire images of the user's real-world environment. These images can be images of the user's environment in the real world.
[0146] The second step involves performing object recognition processing on the aforementioned user's real-world environment image to obtain object information sets for each target object. The object information in these sets may include, but is not limited to, object spatial location information. This spatial location information represents the position of the corresponding target object in the virtual space of the head-mounted display device. This spatial location information may include, but is not limited to, object spatial coordinates. These spatial coordinates can be the spatial coordinates of the corresponding target object in the virtual space of the head-mounted display device. The object information in these sets may also include object identifiers. These object identifiers uniquely identify the corresponding target object. Each target object in the set corresponds one-to-one with the object information in the aforementioned object information set. Each target object can be a recognized object. In practice, the executing entity can use a preset target recognition algorithm to perform object recognition processing on the aforementioned user's real-world environment image to obtain object information sets for each target object. This preset target recognition algorithm can be an algorithm for recognizing objects of various categories in the image. For example, the preset target recognition algorithm can be a target recognition algorithm based on a convolutional neural network.
[0147] The third step involves performing the following sub-steps for each component included in the aforementioned intelligent agent interaction request result interface: The first sub-step is to determine the preset component text corresponding to the above components as the target component text.
[0148] The second sub-step involves performing a correlation matching process on each object information included in the aforementioned object information set and the target component text to obtain correlation information. This correlation information may include, but is not limited to, the correlation degree. The correlation degree characterizes the degree of correlation between the object information and the target component text. In practice, for each object information included in the aforementioned object information set, the following sub-steps are performed: In the first sub-step, the semantic features of the object identifiers included in the above object information are extracted using a preset semantic feature vector extraction algorithm to obtain object identifier semantic feature vectors. The preset semantic feature vector extraction algorithm can be a pre-defined algorithm for extracting semantic features. For example, the preset semantic feature vector extraction algorithm can be the Word2vec algorithm.
[0149] Sub-step two involves using the aforementioned preset semantic feature vector extraction algorithm to perform semantic feature extraction processing on the target component text, thereby obtaining the component text semantic feature vector.
[0150] Sub-step three: The similarity between the above object identifier semantic feature vector and the above component text semantic feature vector is determined as the correlation degree.
[0151] Sub-step four: Determine the above correlation degree as the correlation information.
[0152] The third sub-step involves determining the component display position information corresponding to the aforementioned component based on the determined correlation degrees included in each of the correlation information sets and the spatial location information of each object included in the aforementioned object information set. In practice, firstly, in response to determining that each of the obtained correlation degrees satisfies a preset correlation condition, the maximum value among the obtained correlation degrees is determined as the target correlation degree. The preset correlation condition can be that the maximum value among the correlation degrees is greater than a preset correlation degree threshold. The preset correlation degree threshold can be a pre-set minimum value representing the correlation degree between the aforementioned object information and the text of the aforementioned target component. Secondly, the object information in the aforementioned object information set corresponding to the aforementioned target correlation degree is determined as the target object information. Then, based on the object spatial location information included in the aforementioned target object information, the component display position information corresponding to the aforementioned component is determined. As an example, the object spatial location information included in the aforementioned target object information can be determined as the component display position information corresponding to the aforementioned component.
[0153] The fourth sub-step involves displaying the aforementioned components in the virtual space of the head-mounted display device based on their display location information. In practice, the executing entity can overlay the components onto the user's real-world environment image and display them at the locations corresponding to the component display location information within the virtual space of the head-mounted display device.
[0154] The above-described technical solution and its related content, as an inventive point of this disclosure, solve the third technical problem of "poor user experience". Factors leading to a poor user experience often include: when the intelligent agent displays the request result through the interface, the various components of the interface are directly displayed in preset positions. The user needs to match the displayed request result with objects in the real environment one by one, which takes a long time and results in a poor user experience. Solving these factors can improve the user experience. To achieve this, the interactive interface generation method of this disclosure first controls the head-mounted display device to acquire images of the user's real environment. This provides an image of the user's real environment, facilitating the identification of objects within it. Second, object recognition processing is performed on the user's real environment image to obtain object information sets corresponding to each target object. The object information in these sets includes spatial location information. Thus, the location of each object in the user's real environment can be determined. Then, for each component included in the aforementioned intelligent agent interaction request result interface, the following steps are performed: The preset component text corresponding to the aforementioned component is determined as the target component text; for each object information included in the aforementioned object information set, the object information and the target component text are subjected to correlation matching processing to obtain correlation information. The correlation information includes correlation degree. This determines the degree of correlation between the component and objects in the real environment, which can then be used to determine the component's display position. Finally, in response to determining that each obtained correlation degree satisfies a preset correlation condition, the maximum value among the obtained correlation degrees is determined as the target correlation degree; the object information in the aforementioned object information set corresponding to the target correlation degree is determined as the target object information; based on the object spatial location information included in the target object information, the component display position information corresponding to the aforementioned component is determined. Based on the component display position information, the aforementioned component is displayed in the virtual space of the aforementioned head-mounted display device. This allows the component to be displayed at the location of its associated object, eliminating the need for the user to additionally compare the request result with objects in the real environment. This provides a more intuitive display of the request result, shortens the time the user spends browsing the request result, and improves the user experience.
[0155] Step 303: In response to detecting an interaction operation on the intelligent agent's interaction request result interface, generate interaction operation request information based on the interaction operation.
[0156] In some embodiments, the execution entity may, in response to detecting an interactive operation acting on the intelligent agent interaction request result interface, generate interaction operation request information based on the interactive operation. The interactive operation may be an operation interacting with any control included in the intelligent agent interaction request result interface. The interactive operation may include, but is not limited to, clicking, swiping, voice interaction, gesture interaction, and head gesture interaction. In practice, the execution entity may, in response to detecting an interactive operation acting on the intelligent agent interaction request result interface, first determine the interface structure configuration information corresponding to the intelligent agent interaction request result interface and the node information of the control corresponding to the interactive operation as the interaction operation request information. As an example, when the interactive operation is clicking the control for the detailed introduction of "Cloud Restaurant", the corresponding preset interaction operation request information may include the node information of "Detailed Introduction of Cloud Restaurant".
[0157] Step 304: Use the interaction operation request information as the agent interaction request information and continue to execute the first interface generation step.
[0158] In some embodiments, the execution entity may use the interactive operation request information as the intelligent agent interactive request information to continue executing the first interface generation step.
[0159] from Figure 3 It can be seen from this that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 3 The process 300 of the interactive interface generation method in some corresponding embodiments reflects that users can directly interact with the interface of the generated corresponding request result, and update the intelligent agent interaction request result interface according to the interaction operation. This completely transforms the text dialogue interaction between the user and the intelligent agent into an interface interaction method, thereby improving the convenience and experience of the user's interaction with the intelligent agent.
[0160] Further reference Figure 4 This illustrates a flow 400 of another embodiment of the interactive interface generation method. Flow 400 of this interactive interface generation method includes the following steps: Step 401: In response to detecting the initial interaction request information of the corresponding intelligent agent input by the user, the initial interaction request information is determined as the intelligent agent interaction request information, and the following first interface generation steps are performed: Step 4011: Input the intelligent agent interaction request information into the preset request result generation model to obtain the request result.
[0161] In some embodiments, the aforementioned execution entity (e.g. Figure 1The computing device shown can input agent interaction request information into a preset request result generation model to obtain the request result. The request result may also include the request task type. The request task type can characterize whether the request represented by the agent interaction request information is related to historical requests and the degree of such relationship. The request task type can be, but is not limited to, completely switched request tasks, strongly related request tasks, and weakly related request tasks. Completely switched request tasks indicate that the request represented by the agent interaction request information is completely unrelated to the request represented by the initial interaction request information. For example, the initial interaction request information is "Recommend good restaurants nearby," while the currently input agent interaction request information is "Organize today's itinerary." Strongly related request tasks indicate that the request represented by the agent interaction request information is strongly related to the request represented by the initial interaction request information. For example, the initial interaction request information is "Recommend good restaurants nearby," while the currently input agent interaction request information is opening a detailed description of a specific restaurant in the request result corresponding to the initial interaction request information. Weakly related request tasks indicate that the request represented by the agent interaction request information is weakly related to the request represented by the initial interaction request information. As an example, the initial interaction request was "Recommend good restaurants nearby," while the current input agent interaction request represents a request to compile a list of these good restaurants. For details on the implementation and the resulting technical effects, please refer to [link to relevant documentation]. Figure 3 Step 3011 in the corresponding embodiment will not be repeated here.
[0162] Step 4012: Generate structured prompt text for the interface based on the request result and preset interface structure constraints.
[0163] Step 4013: Determine the structured prompt text as the initial prompt text, and perform the following second interface generation steps: Step 40131: Input the initial prompt text into the preset interface structured configuration information generation model to obtain the interface structured configuration information.
[0164] Step 40132: Based on the preset interface structure constraint information, perform verification processing on the interface structure configuration information to obtain the verification result.
[0165] In some embodiments, the specific implementation of steps 401-40132 and the resulting technical effects can be found in [reference needed]. Figure 3 Steps 301-30132 in the corresponding embodiments will not be repeated here.
[0166] Step 40133: In response to determining that the verification result meets the preset verification conditions, determine the rendering type of the corresponding interface structured configuration information and the initial intelligent agent interaction interface according to the request task type.
[0167] In some embodiments, the execution entity may, in response to determining that the verification result meets the preset verification conditions, determine the rendering type corresponding to the interface structured configuration information and the initial agent interaction interface according to the request task type. In practice, firstly, in response to determining that the verification result meets the preset verification conditions, and that the request task type represents a weak or no correlation between the request represented by the agent interaction request information and the request represented by the initial interaction request information, the execution entity may determine the preset full rendering as the rendering type corresponding to the interface structured configuration information, and determine the initial agent interface corresponding to the agent as the initial agent interaction interface. The preset full rendering may represent a complete replacement of the initial agent interaction interface. The initial agent interface may be the interface when the agent is first opened. Then, in response to determining that the verification result meets the preset verification conditions, and that the request task type represents a strong correlation between the request represented by the agent interaction request information and the request represented by the initial interaction request information, the execution entity may determine the preset partial rendering as the rendering type corresponding to the interface structured configuration information, and determine the agent interaction request result interface corresponding to the interaction operation request information as the initial agent interaction interface. The aforementioned preset partial rendering can represent partial modifications made based on the initial agent interaction interface. It should be noted that when the agent interaction request information is the initial interaction request information, the preset full rendering is determined as the rendering type corresponding to the aforementioned interface structured configuration information, and the initial agent interface corresponding to the aforementioned agent is determined as the initial agent interaction interface.
[0168] Step 40134: Update the initial agent interaction interface according to the interface structure configuration information and rendering type to obtain the agent interaction request result interface.
[0169] In some embodiments, the execution entity can obtain the agent interaction request result interface based on the interface structure configuration information and the rendering type. In practice, the execution entity can, in response to determining the rendering type representation, completely replace the initial agent interaction interface, delete the initial agent interaction interface, and render the interface according to the interface structure configuration file using a preset browser rendering library to obtain the agent interaction request result interface.
[0170] In some optional implementations of certain embodiments, the execution entity may, in response to determining that the rendering type meets preset incremental rendering conditions, incrementally update the initial agent interaction interface according to the interface structured configuration information to obtain the agent interaction request result interface. The preset incremental rendering conditions may represent partial modifications made to the initial agent interaction interface based on the rendering type. In practice, the execution entity may, in response to determining that the rendering type meets preset incremental rendering conditions, incrementally update the initial agent interaction interface using the standard JSON Patch method according to the interface structured configuration information to obtain the agent interaction request result interface. The operation type corresponding to Patch may include, but is not limited to, insertion, deletion, replacement, style update, event binding update, and list item appending. Therefore, when only some interface nodes need to be modified, using partial rendering can reduce the scope of re-rendering and decrease interface flicker.
[0171] Step 402: Control the associated display device to display the interface of the intelligent agent's interaction request results.
[0172] Step 403: In response to detecting an interaction operation on the intelligent agent's interaction request result interface, generate interaction operation request information based on the interaction operation.
[0173] Step 404: Use the interaction operation request information as the agent interaction request information and continue to execute the first interface generation step.
[0174] In some embodiments, the specific implementation of steps 402-404 and the resulting technical effects can be found in [reference needed]. Figure 3 Steps 302-304 in the corresponding embodiments will not be repeated here.
[0175] from Figure 4 It can be seen from this that, with Figure 3 Compared to the description of some corresponding embodiments, Figure 4 The process 400 of the interactive interface generation method in some corresponding embodiments reflects the way of pre-determining the request task type and selecting local rendering or full rendering according to the request task type. This can reduce the scope of re-rendering and reduce interface flicker while ensuring the stability of the interface when switching between complex scenes.
[0176] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an interactive interface generation apparatus, which are similar to... Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0177] like Figure 5As shown, an interactive interface generation apparatus 500 in some embodiments includes an execution unit 501. The execution unit 501 is configured to, in response to detecting initial interaction request information of a corresponding intelligent agent input by a user, determine the initial interaction request information as intelligent agent interaction request information, and perform the following first interface generation steps: inputting the intelligent agent interaction request information into a preset request result generation model to obtain a request result, wherein the preset request result generation model corresponds to the intelligent agent; generating structured prompt text based on the request result and preset interface structure constraint information; determining the structured prompt text as initial prompt text, and performing the following second interface generation steps: inputting the initial prompt text into a preset interface structure configuration information generation model to obtain interface structure configuration information, wherein the preset interface structure configuration information generation model corresponds to the intelligent agent; performing verification processing on the interface structure configuration information based on the preset interface structure constraint information to obtain a verification result; and, in response to determining that the verification result satisfies preset verification conditions, generating an intelligent agent interaction request result interface based on the interface structure configuration information.
[0178] Optionally, the execution unit 501 is further configured to perform the following second interface generation step: in response to determining that the above verification result does not meet the above preset verification conditions, update the above interface structured prompt text according to the above verification result to obtain updated interface structured prompt text; use the above updated interface structured prompt text as the initial prompt text, and continue to perform the above second interface generation step.
[0179] Optionally, the above request result includes a request scenario type, and the execution unit 501 is further configured to perform the following steps: determine the scenario prompt text according to the request scenario type included in the above request result; generate the interface structure prompt text according to the above scenario prompt text and the preset interface structure constraint information.
[0180] Optionally, the interactive interface generation apparatus 500 further includes a display unit (not shown in the figure). The display unit is configured to control an associated display device to display the interface showing the result of the agent's interaction request.
[0181] Optionally, the interactive interface generation device 500 further includes a generation unit and a continuation execution unit (not shown in the figure). The generation unit is configured to: in response to detecting an interactive operation acting on the intelligent agent's interactive request result interface, generate interactive operation request information based on the interactive operation; the continuation execution unit is configured to: use the interactive operation request information as intelligent agent interactive request information and continue executing the first interface generation step.
[0182] Optionally, the above request result includes the request task type; the execution unit 501 is further configured to: determine the rendering type and the initial agent interaction interface corresponding to the above interface structured configuration information according to the above request task type; update the initial agent interaction interface according to the above interface structured configuration information and the above rendering type to obtain the agent interaction request result interface.
[0183] Optionally, the execution unit 501 is further configured to: in response to determining that the above rendering type meets the preset incremental rendering conditions, perform incremental update processing on the initial intelligent agent interaction interface according to the above interface structured configuration information to obtain the intelligent agent interaction request result interface.
[0184] It is understandable that the units described in the interactive interface generation device 500 and the reference Figure 2 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 500 and the units contained therein, and will not be repeated here.
[0185] The following is for reference. Figure 6 It illustrates an electronic device 600 suitable for implementing some embodiments of the present disclosure (e.g., Figure 1 A schematic diagram of the structure of a terminal device. The electronic devices in some embodiments of this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0186] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0187] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.
[0188] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined above in the methods of some embodiments of this disclosure.
[0189] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0190] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0191] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following steps to occur: In response to detecting initial interaction request information of a corresponding intelligent agent input by a user, the electronic device determines the initial interaction request information as intelligent agent interaction request information and performs the following first interface generation steps: inputting the intelligent agent interaction request information into a preset request result generation model to obtain a request result, wherein the preset request result generation model corresponds to the intelligent agent; generating structured prompt text for the interface based on the request result and preset interface structure constraint information; determining the structured prompt text for the interface as initial prompt text and performing the following second interface generation steps: inputting the initial prompt text into a preset interface structure configuration information generation model to obtain interface structure configuration information, wherein the preset interface structure configuration information generation model corresponds to the intelligent agent; performing verification processing on the interface structure configuration information based on the preset interface structure constraint information to obtain a verification result; and in response to determining that the verification result satisfies preset verification conditions, generating an intelligent agent interaction request result interface based on the interface structure configuration information.
[0192] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0193] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0194] The units described in some embodiments of this disclosure can be implemented in software or in hardware. The described units can also be housed in a processor; for example, a processor may be described as including an execution unit. The names of these units do not necessarily limit the unit itself; for example, an execution unit may also be described as "a unit that, in response to detecting initial interaction request information of a corresponding intelligent agent input by a user, determines the initial interaction request information as intelligent agent interaction request information and performs the following first interface generation step."
[0195] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0196] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for generating an interactive interface, comprising: In response to detecting initial interaction request information for the corresponding intelligent agent input by the user, the initial interaction request information is determined as intelligent agent interaction request information, and the following first interface generation step is performed: The intelligent agent's interaction request information is input into a preset request result generation model to obtain the request result, wherein the preset request result generation model corresponds to the intelligent agent; Based on the request result and the preset interface structure constraint information, generate structured prompt text for the interface; The structured prompt text of the interface is determined as the initial prompt text, and the following second interface generation steps are performed: The initial prompt text is input into a preset interface structured configuration information generation model to obtain interface structured configuration information, wherein the preset interface structured configuration information generation model corresponds to the intelligent agent; Based on the preset interface structure constraint information, the interface structure configuration information is validated to obtain the validation result; In response to determining that the verification result meets the preset verification conditions, an intelligent agent interaction request result interface is generated based on the interface structured configuration information.
2. The method according to claim 1, wherein, The second interface generation step further includes: In response to determining that the verification result does not meet the preset verification condition, the structured prompt text of the interface is updated according to the verification result to obtain the updated structured prompt text of the interface. Use the updated interface structured prompt text as the initial prompt text, and continue with the second interface generation step.
3. The method of claim 1, wherein, The request result includes the request scenario type, and the generation of structured prompt text based on the request result and preset interface structure constraint information includes: Based on the request scenario type included in the request result, determine the scenario prompt text; Based on the scene prompt text and the preset interface structure constraints, generate structured prompt text for the interface.
4. The method according to claim 1, wherein, The method further includes: Control the associated display device to display the interface of the intelligent agent's interaction request result.
5. The method according to claim 4, wherein, The method further includes: In response to detecting an interactive operation on the interface of the intelligent agent's interactive request result, an interactive operation request message is generated based on the interactive operation. The interaction request information is used as the agent interaction request information, and the first interface generation step is continued.
6. The method according to claim 5, wherein, The request result includes the request task type; And generating the intelligent agent interaction request result interface based on the interface structured configuration information includes: Based on the requested task type, determine the rendering type and initial intelligent agent interaction interface corresponding to the interface structured configuration information; Based on the interface structure configuration information and the rendering type, the initial agent interaction interface is updated to obtain the agent interaction request result interface.
7. The method according to claim 6, wherein, The step of updating the initial agent interaction interface according to the interface structure configuration information and the rendering type to obtain the agent interaction request result interface includes: In response to determining that the rendering type meets the preset incremental rendering conditions, the initial agent interaction interface is incrementally updated according to the interface structured configuration information to obtain the agent interaction request result interface.
8. An interactive interface generation device, comprising: The execution unit is configured to, in response to detecting initial interaction request information of the corresponding agent from user input, determine the initial interaction request information as agent interaction request information, and perform the following first interface generation step: The intelligent agent's interaction request information is input into a preset request result generation model to obtain the request result, wherein the preset request result generation model corresponds to the intelligent agent; Based on the request result and the preset interface structure constraint information, generate structured prompt text for the interface; The structured prompt text of the interface is determined as the initial prompt text, and the following second interface generation steps are performed: The initial prompt text is input into a preset interface structured configuration information generation model to obtain interface structured configuration information, wherein the preset interface structured configuration information generation model corresponds to the intelligent agent; Based on the preset interface structure constraint information, the interface structure configuration information is validated to obtain the validation result; In response to determining that the verification result meets the preset verification conditions, an intelligent agent interaction request result interface is generated based on the interface structured configuration information.
9. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.