Vehicle interaction method and vehicle
By automatically generating declarative configuration data, component creation, event listener registration, and parameter dynamic replacement are achieved, solving the problem of high code coupling in the handling of interactive events in vehicle terminals and improving the intelligence and flexibility of cockpit interaction.
Patent Information
- Application Number
- CN202511873381.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, the handling of interactive events in vehicle terminals relies on developers manually writing event listening code, resulting in high code coupling and repetitiveness. This makes it impossible to respond to dynamically generated user interfaces by artificial intelligence, thus limiting the intelligence and flexibility of cockpit interaction.
By automatically generating declarative configuration data based on natural language instructions, component creation, event listener registration, and parameter dynamic replacement are achieved, building an automated execution process from user intent to vehicle function, stripping interaction logic to a configurable data layer, and establishing a full-link automated processing mechanism.
It significantly reduces development and maintenance costs, enhances the system's adaptability to dynamic and complex interactive scenarios, realizes an intelligent cockpit experience where intent is interaction, and strengthens the system's scalability and flexibility.
Smart Images

Figure CN121680844A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of vehicle interaction, and more particularly to a vehicle interaction method and a vehicle. Background Technology
[0002] With the increasing prevalence of smart cockpits, systems need to efficiently handle complex user interactions, such as clicks, swipes, and selections, and map them to specific function calls or interface operations. In traditional solutions, developers must manually write event listener code at the component level, registering listeners independently for each component and implementing specific business logic in callbacks. This approach hard-codes event types and processing logic into the program, lacking external configuration capabilities.
[0003] In existing methods, the processing logic for different event types is scattered across various components, lacking a unified framework. Event parameter passing relies on static coding, which cannot support dynamic data binding. In scenarios where AI automatically generates user interfaces, the system needs to automatically parse the configuration-formatted interaction declarations and complete event registration and response, a process that traditional solutions cannot achieve.
[0004] The aforementioned existing technologies suffer from problems such as code redundancy, poor maintainability, and difficulty in expansion. They are particularly difficult to adapt to dynamic and declarative interactive configuration requirements, becoming the main technical bottleneck for improving the interactive experience of smart cockpits. Summary of the Invention
[0005] This application addresses, to at least some extent, one of the technical problems in the related art.
[0006] Therefore, this application aims to provide a vehicle interaction method and a vehicle, which automatically generates declarative configuration data based on natural language commands, and completes the technical process of component creation, event listener registration, dynamic parameter replacement and automated function execution accordingly. It realizes end-to-end intelligent interaction from user intent to automatic execution of vehicle functions, and solves the technical bottlenecks of traditional solutions that cannot automatically process AI-generated declarative interaction events, require manual writing of listening code, cannot dynamically configure event types and parameters, and have scattered and coupled processing logic.
[0007] To achieve the above objectives, in a first aspect, this application provides a vehicle interaction method applied to an in-vehicle terminal, comprising: Obtain the language instructions of the target object, and generate declarative configuration data for interactive events based on the language instructions; Create a component instance based on the declarative configuration data; Bind static properties of the declarative configuration data to the component instance, and detect the event types in the declarative configuration data; Based on the event type, the operation instructions and parameter information in the declarative configuration data are extracted to register an event listener, which is used to obtain the interactive operation of the target object; Based on the data generated by the interactive operation, the template variables of the parameter information are replaced; An action request is constructed based on the replaced parameter information and the operation instructions, and the action is executed.
[0008] In existing technologies, the interactive event handling of smart cockpits in vehicle terminals relies on developers manually writing and registering event listener code for each component. Event types, business logic, and parameter passing are hard-coded into the program, resulting in high code coupling, high repetition, and an inability to respond to user interfaces and interactive needs dynamically generated by artificial intelligence, which greatly limits the intelligence and flexibility of cockpit interaction.
[0009] This application, through the above-mentioned scheme, realizes the automatic generation of declarative configuration data from user natural language commands, and automatically completes the creation of component instances, registration of event listeners, and dynamic binding and replacement of interaction parameters based on the data, thereby constructing and executing the corresponding vehicle function calls.
[0010] Furthermore, this application separates the interaction logic from the code layer to a configurable data layer and establishes a full-link automated processing mechanism. Compared with the dispersed and fixed hard-coding method in existing technologies, it can significantly reduce development and maintenance costs, improve the system's adaptability to dynamic and complex interaction scenarios, and truly realize the intelligent cockpit experience of intent as interaction.
[0011] In some embodiments of this application, the method for creating component instances based on the declarative configuration data includes: The declarative configuration data is parsed into an internal data object, and the internal data object is encapsulated in a component data object; Obtain the component type from the declarative configuration data from the component data object, and create the corresponding component instance based on the component type.
[0012] In the technical solution, declarative configuration data is parsed and encapsulated into a unified component data object, thereby achieving structured management and standardized access to the raw data. By dynamically creating component instances based on type information in component data objects, the generation of component instances is decoupled from specific data, enhancing the scalability and flexibility of the system. This provides a stable and unified data interface for subsequent operations such as event detection and parameter extraction, laying the foundation for an automated event processing framework.
[0013] In some embodiments of this application, the method for detecting event types in the declarative configuration data, which involves binding static properties of the declarative configuration data to the component instance, includes: Call the data binding method of the component instance to bind the static properties encapsulated in the component data object to the component instance; By querying the component data object, the event types associated with the component instance in the component data object can be detected.
[0014] In the technical solution, during the data binding process of component instances, the event types associated with the component are detected by querying the component data object, thereby achieving automated discovery of event declarations; Binding static properties from the component data object to the component instance ensures consistency between the component instance and the declared data, allowing the component to automatically complete property configuration and event awareness during initialization without external intervention, providing the necessary prerequisite for subsequent automatic event registration and response.
[0015] In some embodiments of this application, the method for extracting operation instructions and parameter information from the declarative configuration data according to the event type to register an event listener includes: In the internal data object encapsulated by the component data object, find the key-value element corresponding to the event type; An action data object is created based on the key-value element, and the internal data object corresponding to the key-value element is passed into the action data object for encapsulation.
[0016] In the technical solution, the core information of the interactive event is encapsulated and abstracted by finding the structured data element corresponding to the event type from the component data object and creating a special action data object based on the element. Action data objects organize operation instructions and parameter information in the form of objects, providing an independent and clear data model for subsequent unified extraction and processing. This allows event processing logic to be decoupled from the original data, improving code maintainability and reusability.
[0017] In some embodiments of this application, the method for extracting operation instructions and parameter information from the declarative configuration data according to the event type to register an event listener includes: Extract the string value of the operation instruction from the action data object; Extract the internal data object corresponding to the parameter information from the action data object, traverse the internal data object, and convert each key-value pair in the internal data object into a string key-value pair to obtain a key-value pair mapping table.
[0018] In the technical solution, by extracting the operation instruction string from the action data object and converting the internal data object of the parameter into a unified key-value pair mapping table, the structured and standardized processing of event parameters is achieved. The above conversion process ensures that parameter information from different sources and in different formats can be accessed and manipulated in a consistent manner by subsequent processes, providing a clear and reliable data foundation for dynamic parameter replacement and the construction of execution instructions. It is a key step in realizing dynamic parameter binding.
[0019] In some embodiments of this application, the method for extracting operation instructions and parameter information from the declarative configuration data according to the event type to register an event listener includes: In the data binding method of the component instance, if it is detected that the component object data contains an event object declaration corresponding to the event type, then the operation instruction and the parameter information are extracted from the component data object; Bind the operation instructions and parameter information to the component instance; Call the event listener registration interface corresponding to the component instance to register the event listener.
[0020] In the technical solution, the automatic registration of event listeners is achieved by automatically detecting event declarations and actively extracting the corresponding operation instructions and parameter information; By binding the extracted information to component instances, it is ensured that the corresponding processing logic can be accurately associated when an event is triggered. The standard interface is called to complete the listener registration, so that different types of events can be accessed through the same mechanism. This achieves standardization and decoupling of event registration and significantly reduces code duplication.
[0021] In some embodiments of this application, the method for replacing the template variables of the parameter information based on the data generated by the interactive operation includes: Based on the interactive operation of the target object, the corresponding event listener is triggered, and the data generated by the interactive operation is obtained through the callback function of the event listener; Extract the corresponding action data object from the component data object associated with the component instance; Based on the data generated by the interactive operation, the template variables in the parameter information contained in the action data object are replaced.
[0022] In the technical solution, when the interactive operation of the target object triggers the event listener, the interactive data is obtained in real time through its callback function, and the corresponding action data object is extracted from the associated component data object; By using data generated from interactive operations to replace parameter template variables in the action data object, dynamic parameter binding at runtime is achieved. This process enables real-time data generated by interactions to be seamlessly injected into predefined business processes, achieving an organic combination of static declaration and dynamic interaction, and enhancing the system's responsiveness and flexibility.
[0023] In some embodiments of this application, the method for replacing the template variables of the parameter information based on the data generated by the interactive operation further includes: Iterate through each parameter value in the key-value pair mapping table; If the parameter value contains a template variable with a preset format, then in the data generated by the interactive operation, the actual data value corresponding to the template variable is searched and replaced.
[0024] In the technical solution, by traversing the parameter mapping table and identifying the template variables therein, the dynamic data points that need to be replaced can be accurately located. When a template variable is detected, the system automatically finds the matching actual value from the real-time data generated by the interaction and replaces it, realizing the dynamic injection of parameter values. This allows event parameters to break free from the constraints of hard coding and be dynamically generated according to the actual interaction scenario, greatly enhancing the adaptability and configurability of the interaction behavior.
[0025] In some embodiments of this application, an action request is constructed based on the replaced parameter information and the operation instruction, and the action request is sent to the action execution mechanism. The method for executing the action includes: The replaced parameter information is concatenated into a query string, and the query string is combined with the string value of the operation instruction to form the action request; Based on the action request, execute a preset built-in action or call the application interface.
[0026] In the technical solution, by concatenating the replaced parameter information into a query string and combining it with the operation instructions to form a complete action request, a uniformly formatted and information-complete action request is constructed. By constructing action requests and executing corresponding actions, standardized routing and execution of operations are achieved. This decouples the execution of business logic from front-end interaction, enabling the system to handle different types of operation requests in a consistent manner and improving the scalability and maintainability of the execution layer. Secondly, this application provides a vehicle, including: The vehicle-mounted terminal is configured to perform the aforementioned vehicle interaction methods.
[0027] In the technical solution, by configuring the vehicle's interaction methods on the in-vehicle terminal, the in-vehicle terminal can receive declarative configuration data and automatically complete the entire process from component generation and event binding to function invocation. This allows users to indirectly control vehicle functions or interface navigation through natural language commands, improving the intelligence level of the vehicle cockpit and the efficiency of human-computer interaction, and providing users with a more intuitive and coherent interactive experience.
[0028] As can be seen from the above technical solutions, additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0029] Figure 1 A flowchart illustrating a vehicle interaction method provided in an embodiment of this application; Figure 2 A flowchart illustrating another vehicle interaction method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the internal hierarchical structure of a vehicle-mounted terminal provided in an embodiment of this application. Detailed Implementation
[0030] In this application, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0031] The present application will now be described in detail through exemplary embodiments. However, it should be understood that, without further description, elements, structures, and features in one embodiment may be advantageously incorporated into other embodiments. It should be noted that in the automotive industry, intelligent cockpit systems are developing towards natural language interaction and AI-generated user interfaces.
[0032] In this scenario, the AI agent model can automatically generate JSON data containing a complete description of the interaction events based on the user's natural language input; JSON data not only defines the basic properties of UI components, but also declaratively specifies the interactive behavior of the components and the specific operations to be performed after the interaction. In order to achieve a truly intelligent and dynamic cockpit experience, the system needs to have the ability to automatically parse the JSON data generated by the artificial intelligence agent model, automatically register event listeners for the corresponding UI components, and automatically trigger and execute preset operations when the user actually interacts. This constitutes the technical foundation for achieving seamless connection from user intent to system function.
[0033] JSON (JavaScript Object Notation) data is a general-purpose, lightweight data exchange format used to declaratively describe the basic properties, interactive behaviors, and operations performed by UI components. A UI (User Interface) component is a user interface component that refers to all visual elements and layouts on the display panel of an in-vehicle terminal that users can see and interact with, such as buttons, progress bars, and cards. In the existing technology, the interactive event processing of vehicle terminals mainly relies on the traditional manual coding mode, which has a series of inherent defects and cannot meet the needs of the above-mentioned artificial intelligence agent model to generate UI scenarios; The existing method requires manually writing event listener code and registering listeners independently for each UI component, resulting in highly repetitive code and low development and maintenance efficiency. Secondly, the event types and their corresponding processing logic are hard-coded inside the component's program code, which cannot be flexibly defined and modified through external JSON data, greatly limiting the system's configurability and contradicting the need for AI to dynamically generate interfaces. Furthermore, the processing logic for different types of interactive events is scattered across various components or modules, lacking a unified and centralized event processing framework, resulting in a loose system architecture and poor scalability. Finally, the parameter passing method required when the event is triggered is rigid and cannot achieve dynamic binding. Parameter values usually need to be hard-coded or concatenated through complex manual logic. It cannot support automatic recognition and runtime replacement of template variables, which limits the flexibility and context adaptability of the interaction. Crucially, existing technologies lack a complete automated processing mechanism for JSON data containing standardized event object descriptions output by AI agent models. They are unable to automatically parse this type of data, automatically extract event object declarations, automatically register event listeners, and automatically execute the final operations.
[0034] Based on this, this application proposes a vehicle interaction method and a vehicle. By automatically generating declarative configuration data based on natural language commands, and completing the technical process of component creation, event listener registration, dynamic parameter replacement and automated function execution, it realizes end-to-end intelligent interaction from user intent to automatic execution of vehicle functions. It solves the technical bottlenecks of traditional solutions, such as the inability to automatically process AI-generated declarative interaction events, the need to manually write listening code, the inability to dynamically configure event types and parameters, and the dispersed coupling of processing logic.
[0035] In the following, embodiments of this application will be described in detail with reference to the accompanying drawings.
[0036] As attached Figures 1 to 2 As shown in an illustrative embodiment of the vehicle interaction method of this application, the interaction method includes: S1: Obtain the language instructions of the target object and generate declarative configuration data for interactive events based on the language instructions; Furthermore, the target object will input natural language, generate language instructions based on the natural language, and generate declarative configuration data for interactive events through an artificial intelligence agent model; The target audience refers to the in-vehicle users who are in the vehicle's cabin environment. Users interact with the vehicle's infotainment system running on the in-vehicle terminal through voice, gestures, or touch to control vehicle functions or obtain vehicle information. Interactive events can include click events, value change events, selection events, preceding action events, preceding selection events, stop tracking events, and open large card events. Click events are represented by onClick and are used for click interactions of components such as buttons and cards. When triggered, the action specified by the action is executed. Value change events are represented by onChange, which are used to listen for value changes in progress bar components and selection components. They are triggered when the value of the component changes. The selection event is represented by onSelected, which is used for the selection interaction of the network selection layout component and is triggered when the user selects an option; The onPreAction event is used for preprocessing before an action is executed, and can prevent or modify the execution of the action. The pre-selection event is represented by onPreSelect and is used for preprocessing before selection. It can limit the selection range or provide a confirmation prompt. The stop tracking event is represented by onStopTrack and is used for interactive control in specific scenarios, such as handling the end of the progress bar component's slide. The "open large card" event is represented by "open_large_card" and is used in scenarios where a small card opens a large card. It is a special action built into the system.
[0037] Furthermore, the declarative configuration data also includes component type, unique identifier, size attribute, numerical state and range, and event object declaration; The component type describes the type of the component. A unique identifier is used to uniquely identify this component within the system; The size attribute is used to define the width and height of a component; The numerical status and range are used to define the current value, minimum value, and maximum value of the progress bar; The event object declaration includes the event type, operation instructions, and parameter information of the interactive event. Different event types correspond to different operation instructions and parameter information. Among them, the event type is an event key that declares the events supported by this component and serves as the trigger for the interactive behavior. An operation command is a function call identifier that precisely indicates the function to be executed; The parameter information includes the names of the parameters that need to be passed when calling the operation command, as well as template variables.
[0038] For example, in a driving or parked scenario, the user inside the car feels stuffy and wants to open the windows for ventilation; At this point, the user might directly speak natural language to the vehicle's infotainment system: "Open the driver's side window halfway" or "I want to let the windows air out." The natural language here is the user's casual, conversational expression, which contains a clear intention to control the windows and a vague operational requirement. The vehicle infotainment system uses automatic voice recognition technology to convert the user's voice input into text, parses the text, determines that the user's fundamental purpose is to control the car windows, and obtains the user's intent. By extracting key parameters, such as the target being the driver's car window; the target state or degree being half open; and for vague descriptions like "half," it can be quantified into specific percentages or opening levels. The identified user intent and key parameters are integrated into a structured, machine-executable language command; for example, the above natural language is translated into: "Command: Control the window; Target: Driver's side; Goal: Open to 50%". After receiving a structured language instruction, the AI agent model determines that completing the control task in the instruction requires an interactive interface that allows users to make continuous and precise adjustments. Therefore, the AI agent model decides to generate a progress bar component; The static properties of the progress bar component are generated by calling a predefined UI component library and layout rules. For example, set the component type viewName to SeekBar, and set reasonable initial values, ranges, and sizes for this progress bar component; Since the value change events in the progress bar component should be directly mapped to the window control function, the AI proxy model creates an event object declaration for the onChange event in the declarative configuration data. The event object declaration includes the event type, operation instructions, and parameter information; The system matches the function library of the vehicle infotainment system to find the precise service interface for controlling the driver's side window and generates the operation command (action). The AI agent model needs to pass the real-time value of the progress bar to the aforementioned precise service interface, and the parameter information will be designed as a dynamic template: "params": {"setIndex": "{{progress}}"}; Here, {{progress}} is a template variable, which is a placeholder that will be replaced with the actual value generated by the user sliding the progress bar at runtime; The AI agent model assembles component type and event object declarations into a complete and compliant declarative configuration data in JSON format and sends it to the vehicle terminal. The generation of declarative configuration data enables an automated transformation from users' vague natural language desires to precise, data-driven declarative configurations. The target's intent is translated into a visual operation blueprint that the vehicle system can directly understand and execute through an artificial intelligence agent model, thereby achieving a good smart cockpit interaction experience.
[0039] S2: Create component instances based on declarative configuration data; In some embodiments, the method of creating a component instance based on declarative configuration data includes: The declarative configuration data is parsed into internal data objects, and the internal data objects are encapsulated in component data objects; Retrieve the component type from the declarative configuration data in the component data object, and create the corresponding component instance based on the component type.
[0040] Among them, the internal data object is a data structure generated in the program's memory after the received declarative configuration data, which exists in the form of a string, is parsed for the first time and can be directly manipulated by the programming language; Internal data objects can transform standardized text formats used for data transmission across platforms into object forms that are efficiently processed within a specific runtime environment; Internal data objects allow programs to access nested data by key, such as getting the component type via jsonObject.get(“viewName”).
[0041] Component data objects are programming objects with clear semantics and stable interfaces obtained by encapsulating common internal data objects in a business-oriented manner. The component data object encapsulates the raw, potentially loosely structured internal data object, hides the specific data format from the outside, and provides type-safe access methods oriented towards component business logic; The component data object encapsulates the business logic related to component creation and event resolution. For example, its getActionData method encapsulates the complete process of retrieving a specific event field from internal data, validating the type, and constructing an ActionData object. The component data object serves as a bridge connecting declarative configuration data and component instances, providing a unified interface for subsequent component creation, property binding, and event extraction, thereby decoupling processing logic and unifying the framework.
[0042] By parsing and encapsulating declarative configuration data into a unified component data object, a stable and standardized data access layer is obtained. The type-safe method getActionData provided by the component data object allows subsequent event detection and parameter extraction operations to operate without needing to care about the specific format of the underlying data, thus providing a stable and unified data interface for these operations. Based on the component type in the component data object, it is mapped to a predefined, specific component class. By instantiating the component class, an independent component instance is created at runtime. This makes the creation of component instances no longer dependent on hard-coded judgment of configuration data content, but on the polymorphic characteristics of object-oriented programming. This decouples the generation logic from the specific data content and drives the processing of all subsequent interactive events through a unified abstract interface.
[0043] S3: Bind static properties of declarative configuration data to a component instance and detect event types in the declarative configuration data; in some embodiments, the method for binding static properties of declarative configuration data to a component instance and detecting event types in the declarative configuration data includes: Call the data binding method of the component instance to bind the static properties encapsulated in the component data object to the component instance; Among them, static properties include component type, unique identifier, size properties, numerical status and range, which are summarized in declarative configuration data; By querying the component data object, we can detect the event types associated with the component instance within the component data object; Among them, the event types associated with the component instance in the component data object are based on the preset component design specifications, which refers to the definition of interactive behavior that has a clear correspondence with the component instance in both semantic logic and data declaration; For example, button components are logically and naturally associated with click events, while progress bar components are associated with value change events; However, the establishment of the association depends on whether a valid object containing operation instructions and parameter information is explicitly defined in the configuration structure of the component's data object encapsulation, with the event type as the key name; When a component instance is initialized during the data binding phase, it determines one or more identifiers of specific event types to be queried based on the inherent characteristics of its own type. It then calls the dedicated query method provided by the component data object and passes in the specific event type. The dedicated query method searches for entries with the corresponding key names within the component data object and rigorously verifies whether the value of the entry is a valid data object with a complete structure. If the dedicated query method successfully returns a structured action data object, it means that the event type is not only logically supported by the component, but also specifically declared in this configuration, thus establishing a definite association with the current component instance; Conversely, if an empty value is returned, it means that although there is a logical possibility, there is a lack of data declaration, and the association is not valid. This ensures that the system only processes the interaction logic that has been explicitly declared, achieving precise configuration and efficient use of resources.
[0044] During the data binding process of component instances, the event types associated with the component are detected by querying the component data object, thus achieving automated discovery of event declarations; In the component data object, different event types can be used as unique keys to index and extract completely independent and exclusive operation instructions and parameter information. Optionally, a component can declare multiple events at the same time, such as both onClick and onChange events. Based on the specific event type that needs to be processed, the component can extract the operation instructions and parameter information that precisely match the event type, thereby enabling refined and differentiated configuration of interactive behavior and business logic. Binding static properties from the component data object to the component instance ensures that the component instance is precisely synchronized with the declarative configuration data from the moment it is created, thus enabling the autonomous initialization of the component instance. Through the above binding, component instances can inherently possess the ability to perceive and respond to preset interactive events without the intervention of any external control logic. Therefore, component instances not only appear as interface elements that are completely consistent with the data description, but also essentially transform into an intelligent interactive entity with an embedded behavioral blueprint. By transforming static configuration descriptions into dynamic interactive capabilities through data binding, the end-to-end process from UI rendering to business function execution can form a highly automated closed loop throughout the component instance's lifecycle, driven by declarative configuration data.
[0045] S4: Extract operation instructions and parameter information from the declarative configuration data according to the event type to register event listeners. Event listeners are used to obtain the interactive operations of the target object. In some embodiments, the method for registering an event listener by extracting operation instructions and parameter information from declarative configuration data based on the event type includes: Within the internal data object encapsulated by the component's data object, search for the key-value element corresponding to the event type; An action data object is created based on a key-value element, and the internal data object corresponding to the key-value element is passed into the action data object for encapsulation.
[0046] Furthermore, a key-value element refers to the value corresponding to a string of event type as the key in an internal data object; For example, in the inner data object {"onChange": {"action": "...", "params": {...}}}, when looking up the event type "onChange", the key-value element refers to the entire value {"action": "...", "params": {...}} corresponding to the key "onChange", which itself is a nested inner data object; By using the event type as the query condition, an operation similar to internalDataObject.get(“onClick”) can be performed directly on the internal data object, which returns the key-value element associated with the key “onClick”.
[0047] Action data objects are core business model objects defined to uniformly encapsulate and manage all execution elements of a single interactive event. They transform and elevate raw key-value elements that only contain data into runtime entities with clear responsibilities and rich behaviors. The action data object receives an internal data object in its constructor, encapsulates and manages this internal data object, and provides two core business access interfaces to the outside world: an operation instruction accessor and a parameter information accessor. The action instruction accessor provides the getAction() method, which internally extracts the string value of the action field from the encapsulated internal data object; The parameter information accessor provides methods such as getParams(). Its internal implementation extracts the params field from the encapsulated internal data object and converts it into a key-value pair mapping table format that is easier for the program to use, while also handling the template variables that may be contained therein. Action data objects isolate raw, unstable data formats, providing type-safe, semantically clear input for event handling processes.
[0048] When creating an action data object based on key-value elements, the found internal data object {"action":“...", “params”: {...}} is passed as a parameter to the constructor of the action data object; The constructor of the action data object stores a reference to this internal data object {"action": "...", "params": {...}} or copies its data into its own member variables, thus completing the encapsulation.
[0049] By finding the structured data element corresponding to the event type from the component data object and creating a special action data object based on the element, the encapsulation and abstraction of the core information of the interactive event are realized. Action data objects organize operation instructions and parameter information in the form of objects, providing an independent and clear data model for subsequent unified extraction and processing. This allows event processing logic to be decoupled from the original data, improving code maintainability and reusability.
[0050] In some embodiments, the method for registering an event listener by extracting operation instructions and parameter information from declarative configuration data based on the event type includes: Extract the string value of the operation instruction from the action data object; Extract the internal data object corresponding to the parameter information from the action data object, traverse the internal data object, convert each key-value pair in the internal data object into a string key-value pair, and obtain the key-value pair mapping table.
[0051] Furthermore, the string of the operation instruction is obtained through the operation instruction accessor in the action data object; Extract the original internal data object corresponding to the parameter information encapsulated within the action data object through the parameter information accessor in the action data object; In order to process the parameter information uniformly, all entries in this internal data object are traversed, and the key of each entry is kept as a string. At the same time, its value is uniformly converted into string format through safe conversion rules, so that all parameter information is organized into a pure key-value pair mapping table. This key-value mapping table normalizes the parameter format, generating a standardized set of parameters that can be directly used by the URL builder, thus ensuring a smooth and accurate conversion from declarative parameters to executable instruction parameters.
[0052] By extracting operation instruction strings from action data objects and converting parameter internal data objects into a unified key-value pair mapping table, the structured and standardized processing of event parameters is achieved. The above conversion process ensures that parameter information from different sources and in different formats can be accessed and manipulated in a consistent manner by subsequent processes, providing a clear and reliable data foundation for dynamic parameter replacement and the construction of execution instructions. It is a key step in realizing dynamic parameter binding.
[0053] In some embodiments, the method for registering an event listener by extracting operation instructions and parameter information from declarative configuration data based on the event type includes: In the data binding method of a component instance, if it is detected that the component object data contains an event object declaration corresponding to the event type, the operation instructions and parameter information are extracted from the component data object; Bind operation instructions and parameter information to component instances; Call the event listener registration interface corresponding to the component instance to register the event listener.
[0054] Furthermore, the data binding method is a specific lifecycle method defined in each component instance, used to receive external component data objects and apply the component data objects to the current component instance and its associated view objects; By detecting specific event object declarations in the data binding method of a component instance, it can be determined whether the current component instance needs and what kind of interactive capabilities it needs. If an event object declaration is detected, it proves that the component instance has been configured with the corresponding interaction logic. The corresponding operation instructions and parameter information are extracted from the component data object. In order to prepare these core business logic data in advance and associate them with the listener while registering the event listener, it is ensured that when the user interaction triggers the listener, all the necessary execution basis is in place and can be used directly, thereby achieving an immediate and accurate response.
[0055] Binding operation instructions and parameter information to component instances refers to establishing a persistent reference relationship between operation instructions, parameter information and component instances in memory, so that the event listeners of the component instances can directly access this pre-extracted and associated data when they are triggered later. By binding static properties to component instances, static properties in the component data object can be set to properties of the component instance's view object, which can initialize the component's visual state and physical properties, and determine the UI elements that the component displays in the display panel that conform to the configuration. By binding operation instructions and parameter information to component instances, the extracted operation instructions and parameter information can be associated with the event listener logic of the component instance, which can assemble the interactive behavior and business logic of the component, enabling UI elements to respond to interactions and execute business functions. By binding static properties, component instances become interactive entities. By binding operation instructions and parameter information, interactive entities are given interaction logic and action guidelines. Together, they complete the entire creation process from static description to dynamic intelligent agent. The entire data binding method executes these two bindings sequentially, ultimately producing a fully configured, interactive component instance.
[0056] The event listener is automatically registered by automatically detecting event declarations and actively extracting the corresponding operation instructions and parameter information. By binding the extracted information to component instances, it is ensured that the corresponding processing logic can be accurately associated when an event is triggered. The standard interface is called to complete the listener registration, so that different types of events can be accessed through the same mechanism. This achieves standardization and decoupling of event registration and significantly reduces code duplication.
[0057] Furthermore, during the data binding process of the component instance, the static properties defined in the declarative configuration data are bound to the component instance; Specifically, parameter information describing the initial state of the component is extracted from the component data object that encapsulates declarative configuration data; static properties are obtained by calling the parameter parsing tool, and the value is assigned to the view object corresponding to the component instance, thereby completing the initial configuration of the component's visual state and realizing the association between static properties in the declarative configuration data and the component instance; After static property binding is completed, event listener registration is automatically executed. The component instance calls the corresponding view object's event listener registration interface according to its own component type. The event listener registration is automatically triggered in the data binding method of the component instance, without the need for external instructions; When registering an event listener, define the event handling route in the event listener's callback function. The callback function receives real-time data generated by the interaction and includes filtering logic to confirm the validity of the interaction. When a valid interaction is detected, the callback function will call the predefined processing method, passing in the component data object and the real-time data generated by the interaction as parameters, in order to complete the forwarding from the original event detection to the internal processing logic; By using event handling routing, in response to interactive operations detected by event listeners, template variables in the parameter information are replaced based on the data generated by the interactive operations; When the target object interacts with the component instance, the interaction is detected by the registered event listeners and the pre-defined processing method is triggered. The component data object is parsed in response to interactive actions; Based on the predefined event type, a dedicated method of the component data object is called, which is responsible for finding the configuration unit corresponding to the event type from the internal data structure encapsulated by the component data object; After locating the configuration unit, perform type validation to confirm whether it is a valid structured data object; If the verification passes, an action data object is created or instantiated based on this structured data object. The action data object, as a standardized data carrier, encapsulates the operation instruction string used to specify the function call and the parameter information set containing at least one parameter and its corresponding value. The parameter value supports the inclusion of template variables.
[0058] After the above steps, a structured action data object that perfectly matches the current interaction event is extracted from the component data object. The encapsulated operation instructions specify the operation to be performed, while the parameter information contains parameter templates to be dynamically assigned, thus preparing the data layer for subsequent template variable replacement and function calls.
[0059] For example, when a user sets the target temperature of the air conditioner to 26 degrees by sliding the progress bar, the vehicle system will extract the action data object that perfectly matches the value change event from the component data object that encapsulates the configuration of the air conditioner adjustment interface. The action data object serves as the standardized carrier of this interaction event. The operation instructions encapsulated within it clearly point to the vehicle's infotainment system interface for setting the air conditioning temperature, while its parameter information includes a pre-defined temperature value reserved in the form of a template variable. At this moment, the motion data object accurately represents the intermediate state where the air conditioning temperature needs to be set, but the specific degree is yet to be determined. This provides a basis for the subsequent core operation, which is to replace the template variable in the parameter information with the captured real-time progress value 26. By decoupling and bridging the dynamic interactive input of users with the static function call logic of the system through action data objects, it is ensured that no matter how the temperature setpoint changes, the system can drive a completely consistent and accurate function execution chain based on the same robust data processing framework.
[0060] Furthermore, when it is necessary to register an event listener for a component instance, the corresponding operation definition must first be obtained, the dedicated data extraction method of the component data object must be called, and the event type must be passed in as the query key. The dedicated data extraction method searches within the internal data object encapsulated within the component's data object to locate the data element corresponding to the event type. After locating the data element, type validation is performed to determine whether the element is a valid internal data object type. This validation ensures that subsequent processing is based on a structured data container, rather than simple values or invalid data. If the verification passes, an action data object is instantiated using this internal data object as input. This action data object encapsulates the original structured data and provides it with a standardized attribute access interface; If the search fails or the verification fails, an empty value is returned, indicating that the corresponding event has not been configured. Access the operation instruction property of the action data object through the property accessor to obtain a string value; The property accessor internally looks up the field named "action" from the encapsulated internal data object and extracts its value as a string. This string is the operation instruction, and its content is a Uniform Resource Identifier used to identify the function or action to be performed. If the field does not exist or its format is incorrect, an empty string is returned. Access the parameter properties of the action data object through the property accessor to extract parameter information; The property accessor internally searches for the field named params in the encapsulated internal data object and verifies whether the found data element is of the type of the internal data object to ensure the structure of the parameter set. After successful verification, iterate through all key-value entries of the internal data object and convert each entry into a combination of a string key and a string value; Ultimately, all these key-value pairs are organized into a key-value pair map and returned, which constitutes the available form of the parameter information, where the value portion may contain template variables to be replaced.
[0061] S5: Replace the template variables of the parameter information based on the data generated by the interactive operation; In some embodiments, the method for replacing template variables of parameter information based on data generated by interactive operations includes: The corresponding event listener is triggered based on the interactive operation of the target object, and the data generated by the interactive operation is obtained through the callback function of the event listener. Extract the corresponding action data object from the component data object associated with the component instance; Based on the data generated by the interactive operation, the template variables in the parameter information contained in the action data object are replaced.
[0062] For example, when a user slides the music playback progress bar to the 3rd minute, the event listener registered by the progress bar component is triggered, and the callback function of the event listener then captures the core data generated by this interaction, which is the progress value of 180. The vehicle system extracts the action data object specifically prepared for value change events from the component data object associated with the progress bar component instance; The parameter information encapsulated within this action data object includes declarations such as {"seekPosition": "{{progress}}"}, where {{progress}} is a template variable to be populated. The vehicle system immediately uses the captured real-time data 180 as the replacement source, accurately locates and replaces the template variable in the parameter information, thereby instantiating the abstract {"seekPosition": "{{progress}}"} into the specific {"seekPosition": "180"}. This enables the seamless and accurate injection of the user's real-time interactive input into the pre-declared business parameter template, providing crucial data preparation for subsequently issuing a precise command to the player to jump to the 180th second.
[0063] When the interaction of the target object triggers the event listener, the interaction data is obtained in real time through its callback function, and the corresponding action data object is extracted from the associated component data object; By using data generated from interactive operations to replace parameter template variables in the action data object, dynamic parameter binding at runtime is achieved. This process enables real-time data generated by interactions to be seamlessly injected into predefined business processes, achieving an organic combination of static declaration and dynamic interaction, and enhancing the system's responsiveness and flexibility.
[0064] In some embodiments, the method for replacing template variables of parameter information based on data generated by interactive operations further includes: Iterate through each parameter value in the key-value pair mapping table; If the parameter value contains a template variable with a preset format, then the actual data value corresponding to the template variable is found in the data generated by the interactive operation and replaced.
[0065] By traversing the parameter mapping table and identifying the template variables within it, the dynamic data points that need to be replaced can be accurately located. When a template variable is detected, the system automatically finds the matching actual value from the real-time data generated by the interaction and replaces it, realizing the dynamic injection of parameter values. This allows event parameters to break free from the constraints of hard coding and be dynamically generated according to the actual interaction scenario, greatly enhancing the adaptability and configurability of the interaction behavior.
[0066] Furthermore, for components such as buttons, text views, and image views that support click events for interaction, their event listening capabilities are automatically built during the data binding phase. When these components execute their data binding methods, they uniformly call a utility method specifically for adding click actions, thereby initiating the entire automated assembly process. By attempting to extract the corresponding action data object from the input component data object based on the type identifier of the click event, the key task of parsing specific operation instructions and parameter information from the declarative configuration was completed. After obtaining the action data object, register a standard click event listener for the current component instance, and bind the action data object to the callback logic of the click event listener. This allows the click event listener to not only know when to respond, but also to have all the information in advance about what to do after the response and what data to use. Therefore, when the target object finally clicks on a component on the screen, the triggered click event listener can intelligently decide how to construct the final execution instruction directly in its callback function, based on the pre-associated action data and the context data that may accompany this interaction. If there is dynamic data that needs to be processed in real time, the parameter template variables will be replaced first; otherwise, instructions will be generated directly based on static parameters.
[0067] Subsequently, the constructed execution instructions are parsed and routed; If the instruction is identified as pointing to a system-built-in interface action, the corresponding interface controller is directly invoked to perform the jump. Conversely, it is dispatched to a unified atomic operation manager, which is responsible for parsing the instruction into a specific vehicle infotainment function call request and coordinating the underlying system to complete the execution of the function, thus forming a seamless closed loop from the user's fingertip touch to the vehicle infotainment function response.
[0068] For components like progress bars and switches, whose core interactions are reflected in numerical or state changes, a listener registration and processing strategy that is deeply compatible with their characteristics is adopted. Taking the progress bar component as an example, since value change is its inherent and main interaction method, when binding data to it, a progress change listener will be registered unconditionally to ensure that the component has the basic ability to respond to interactions as soon as it is created. The progress change listener is designed to transfer control, along with the current progress value, to a dedicated processing method only when it detects that the change actually originated from a manual swipe by the user. Inside the processing method, the action data object declared specifically for this value change event is extracted from the component data. The predefined progress template variable in the action parameters is replaced with the real-time progress value that was just captured, thereby transforming the declarative intent into concrete executable data. The function call instruction is constructed using the concrete executable data and delivered for execution.
[0069] As for the switch component, its registration logic exhibits certain conditionalities; During the binding phase, the component data is first checked to see if it contains a declaration for a value change event. Only when the corresponding action data object is confirmed to exist will a state change listener be registered for it and the data object be closely associated with the state listener. When the user flips the switch, the state change listener callback is triggered. The latest switch state value is immediately used to replace the state template variable in the associated action parameters, completing the instruction construction and execution. This ensures both functional integrity and execution accuracy. For the event handling mechanism of the grid selection layout component, when the component is bound to data, a utility method will be used to check whether the selection listener function is explicitly required to be enabled in the declarative configuration. Once enabled, register a selection change listener for the grid view and point the callback to an internal handling method, allowing dynamic determination of whether the component has interactive selection capabilities; When the user subsequently selects an item in the grid, the selection change listener captures the selection location information and calls the processing method; The processing method extracts the action data object prepared for the selection event from the component data, and then initiates a multi-step parameter specification process. It replaces the explicit position index variable in the parameters with the selected position, and further processes other derived template variables through utility methods. In this way, an execution instruction containing the user's exact selection intent is constructed and finally submitted to the execution layer, which may trigger a series of complex subsequent operations such as page navigation or mode switching.
[0070] Furthermore, when an interaction with the target object is detected by the event listener, the real-time data generated by the interaction is first obtained from the event listener callback. Retrieves parameter information that is bound to the component instance during the event listener registration phase, including template variables. This parameter information usually exists in the form of a key-value pair mapping table, in which some values contain template variable placeholders in a preset format. The key-value pair mapping table corresponding to the parameter information is traversed, and each parameter value string is checked in turn. Based on the predefined syntax format, it is identified whether template variables are included, which is used to locate all parameter items that require dynamic data binding. For the identified parameter values containing template variables, the real-time data generated by the interactive operation is used as the replacement source to replace the template variable placeholders with the corresponding actual data values. The replacement process generates a new key-value pair mapping table with the values already specified. After replacing all identified template variables, an updated key-value pair mapping table is obtained. The parameter values in this mapping table have been converted from declarative variable placeholders to actual data values based on the specific interaction scenario. This final parameter set will be used to construct specific operation requests in the future.
[0071] S6: Construct an action request based on the replaced parameter information and operation instructions, and execute the action.
[0072] In some embodiments, an action request is constructed based on the replaced parameter information and operation instructions, and the action request is sent to the action execution mechanism. The method for executing the action includes: The replaced parameter information is concatenated into a query string, and the query string is combined with the string value of the operation instruction to form an action request; The action request is distributed to the corresponding action execution mechanism to execute the preset built-in action or call the application interface of the vehicle terminal.
[0073] For example, when a user slides the music playback progress bar to the 3rd minute, the vehicle system completes the template replacement and constructs an action request based on the specific parameter information {"seekPosition": "180"} and the operation command "com.media.player / seek_to"; The parameter information is concatenated into the query string "seekPosition=180", and combined with the operation instruction to form a complete, uniformly formatted, executable action request "com.media.player / seek_to?seekPosition=180", and this action request is distributed to the corresponding action execution mechanism; It should be noted that the action execution mechanism is a core software service module inside the vehicle terminal, such as a unified atomic operation manager; The motion execution mechanism is not a standalone hardware device, but rather part of the vehicle infotainment system software framework. It is responsible for receiving and parsing these standardized instructions and routing them to the correct software execution endpoints. The motion actuator can perform preset built-in actions or call the vehicle's infotainment system application interface; If the instruction in the action request is marked as "open_large_card", the action execution mechanism will directly call the corresponding method of the vehicle system UI framework to complete the interface navigation; If the instruction in the action request is identified as "com.media.player / seek_to", the action execution mechanism will parse it, locate the media player service, and call its seekTo(180) method, ultimately controlling the audio output to jump to the specified position.
[0074] By concatenating the replaced parameter information into a query string and combining it with the operation instructions to form a complete action request, a uniformly formatted and fully informative action request was constructed. By distributing action requests to the corresponding action execution mechanisms, standardized routing and execution of operations are achieved. This decouples the execution of business logic from front-end interaction, enabling the system to handle different types of operation requests in a consistent manner and improving the scalability and maintainability of the execution layer.
[0075] Furthermore, after replacing the template variables of the parameter information, the operation instructions are combined with the replaced specific parameters to generate a uniformly formatted action request, which is an execution instruction. Using the string value of the operation instruction as the instruction body, the key-value pair mapping table corresponding to the parameter information is concatenated into a standard query string format; If the parameter exists, a "?" symbol and the concatenated query string are appended to the instruction body to form a complete executable instruction.
[0076] After generating the execution instruction, its content is parsed to determine the operation type. Based on the specific identifier or format of the operation instruction, it is determined whether the instruction calls a built-in system action or executes a vehicle infotainment function call. For example, if the instruction is a specific system action identifier, it is routed to the system interface controller; otherwise, it is identified as a vehicle-mounted system function call request and routed to the unified function execution manager.
[0077] Based on the routing results, the corresponding executor is invoked to complete the operation; For system-built-in actions, the executor directly calls the preset interface logic methods; for example, performing interface operations such as opening a large card or page navigation; For vehicle infotainment system function calls, the unified function execution manager will parse the execution instructions, extract the function identifier and specific parameters, and call the corresponding vehicle infotainment system function application interface. At the same time, the parameters will be passed to the interface to execute specific vehicle control or service calls.
[0078] Furthermore, when the user sets the target temperature of the air conditioner to 26 degrees by sliding the progress bar, a standard execution command "com.example.car / ac_set_temperature?targetTemp=26" will be generated and sent to the action execution mechanism; After the action execution mechanism parses the execution instruction, it determines that it is a vehicle system function call request. Then, the action execution mechanism extracts the function identifier "com.example.car / ac_set_temperature" and precisely maps it to the specific application interface in the vehicle system that is responsible for air conditioning temperature control. At the same time, the motion execution mechanism parses the parameter {targetTemp: “26”} from the execution instruction and converts the string value 26 into an integer; Ultimately, the actuator calls the application interface to use the converted integer parameter value 26 as the core control data, and transmits it to the air conditioning control service via the inter-service communication mechanism of the vehicle system, thereby driving the hardware to perform the temperature setting operation.
[0079] Based on the above vehicle interaction method, declarative configuration data is automatically generated from user natural language commands, and component instance creation, event listener registration, and dynamic binding and replacement of interaction parameters are automatically completed based on the data, thereby constructing and executing the corresponding vehicle function calls.
[0080] By separating the interaction logic from the code layer to a configurable data layer and establishing a full-link automated processing mechanism, development and maintenance costs can be significantly reduced, the system's adaptability to dynamic and complex interaction scenarios can be improved, and a truly intelligent cockpit experience of "intent is interaction" can be realized.
[0081] Preferably, when the user is in the smart cockpit and inputs the voice command "open window control", the vehicle terminal can convert the user's vague natural language intention into a series of structured data and standardized operations that can be accurately parsed and executed by the machine. First, the AI agent system receives and parses the user's voice commands, identifies the key intent as adjusting the car window through natural language understanding technology, determines that the object of operation is the car window, and further judges that an interactive interface that can continuously adjust values is needed. The AI agent system automatically generates a structured declarative configuration data, which is a JSON data that integrates user interface description, interaction logic, and function calls. The JSON data is presented in a lightweight structured data format, which defines the need to create a progress bar component instance and specifies its appearance and initial state in detail. It also embeds complete event object declarations in specific fields in a declarative manner. The event object declaration describes that when the value of the progress bar changes, a specific vehicle system function should be called. The operation instruction is a string that identifies the target function call address, and specific parameter information needs to be passed when calling. The value of this parameter is not fixed and should be dynamically bound to the real-time progress value when the progress bar changes. It is reserved in the configuration as a template variable. The generation of declarative configuration data can complete the transformation from user intent to machine-understandable instructions, providing a unique and authoritative data source for all subsequent automated processing; Declarative configuration data is sent to the vehicle terminal via the vehicle-to-everything (V2X) link. After receiving the declarative configuration data, the vehicle terminal encapsulates and objectifies the data. The original structured JSON data is parsed and encapsulated into a unified component data object, which encapsulates all the details of the original data and provides a standard and secure access interface to the outside world. For example, the component data object provides methods to get the component type, methods to get the initial progress value, and a core method for extracting interaction logic data by event type; Creating component data objects enables separation of concerns and unified access, separating volatile, loosely structured raw data from stable business logic code that requires strong type checking. This allows subsequent component instance creation, property binding, and event handling to be based on a stable and reliable data interface.
[0082] By querying the encapsulated component data object, the information for creating the progress bar component is obtained, and the corresponding progress bar component instance is dynamically created through a standardized creation mechanism of a component view factory. The standardized creation mechanism of the component view factory ensures the flexibility and uniformity of component instance creation. Whether artificial intelligence generates buttons, switches or progress bars, the corresponding component instances are created through the same entry point and follow the same rules. The process of creating a component instance not only generates a view object to be displayed on the screen, namely a progress bar user interface control with sliding functionality, but also completes the initialization of the component lifecycle, preparing for data binding and behavior assembly. At this point, nothing on the screen has been finalized yet. The component is like a blank, model-defined piece of hardware, waiting to load specific software instructions from the component data object. After the component instance is created, call the component instance data binding method, passing the component data object and any additional context data as parameters; Inside the data binding method, the parameter parsing utility method is called to extract the values of static properties such as initial progress, minimum value, and maximum value from the component data object; The values extracted by the parameter parsing tool are directly assigned to the view object of the progress bar component instance, and a progress bar with the initial slider in a specified position and a limited sliding range is displayed on the screen. Since the core interaction of the progress bar component is the continuous change of value, the code for registering the progress change listener is executed automatically and unconditionally in the data binding method without any conditional judgment. By calling the native application interface, a standard progress change event listener is registered for this specific progress bar view object; When registering the event listener, an anonymous listener callback implementation is defined. The overridden method of this callback implementation will receive a boolean parameter to distinguish whether the current progress change comes from the user's finger swipe or from the automatic setting of the program code. Only when a change is directly triggered by user interaction will the program execution flow be directed to an internal processing method, passing in the current component data object and the latest progress value. This ensures that the system's automated response is only for real, intentional user interaction, avoiding false triggers caused by internal program state adjustments. The entire process is completed automatically based on the component type and declarative configuration data, without a single line of handwritten event registration code for this specific progress bar; When a user sees the progress bar on the screen and starts sliding the slider with their hand in order to adjust the car window, the user's interaction is captured and passed to the progress change event listener, triggering its callback. Since the swipe originates from the user, the condition is met, and the internal processing method is immediately invoked, passing the component data object and the precise position value of the slider as parameters to the internal processing method; After entering the internal processing method, the dedicated extraction method of the component data object is called, and the event type identifier of the corresponding value change is passed in; Within the internal data structure encapsulated by the component data object, locate the field corresponding to the event type and verify whether the found data is a valid internal data object type. After verification, a dedicated action data object is created using this internal data object. The action data object is an object-oriented encapsulation of the operation instruction part. It provides operation instructions and parameter information to the outside world through property accessors. It can extract executable operation instruction sheets bound to the current specific interaction event from the general component data. After creating the action data object, replace the template variables in the parameter information of the action data object with the actual values of this interaction operation; The value replacement method is called to traverse the parameter information mapping table, find all items containing specific template variables, and replace them with the actual value string passed in. In this way, the abstract parameter mapping table containing variables is concretized into a key-value pair mapping table where all values are determined, realizing the dynamic binding of parameters and runtime data in declarative configuration. The instruction construction method is invoked, using the string value of the operation instruction as the base part, and then the instantiated parameter mapping table is checked; Since the mapping table is not empty, a specific delimiter is added after the basic part. Then the mapping table is traversed, and each key-value pair is concatenated into a standard format. When there are multiple parameters, they are connected with specific symbols to generate a complete and standard executable instruction string. The execution instruction string is used as an action request and becomes standardized data for transmitting execution intent across modules. It contains all the information of which function to call and what parameters to pass. The generated executable instruction string is passed to a system core component called the Atomic Operation Manager, which then invokes its execution method. The atomic operation manager is a unified gateway and security sandbox for the vehicle terminal to execute cross-process and cross-module function calls. After receiving the instruction string, it breaks down the string and identifies the function identifier and specific parameter key-value pairs. Search the internal service registry for the actual vehicle infotainment function implementation application interface that corresponds to the function identifier; Once located, the atomic operation manager converts the parameters into the appropriate type and securely calls the application interface via inter-process communication. The underlying vehicle control system executes the instructions, drives the window motor, and precisely adjusts the window position to the target opening degree. Thus, the user's voice command to "open the window control" is translated by artificial intelligence, generated by declarative configuration data, assembled by automated component instances, triggered by interactive operations, bound by dynamic data, and constructed and distributed by standardized commands, and is finally executed accurately as a specific vehicle control action.
[0083] Through the above process, a full-stack automated pipeline can be built, from the highest level of user natural language intent to the lowest level of vehicle hardware control. Through a unified declarative data model and an automated processing framework based on this model, the user interface construction, event listening, business logic and function call code that need to be manually written and tightly coupled in traditional development are all transformed into automatic parsing and execution of structured configuration data, which improves development efficiency and flexibility in the scenario of dynamically generated user interface by artificial intelligence and realizes configuration as function. By establishing a scalable and standardized vehicle-machine interaction paradigm, a solid technical foundation has been laid for more complex and intelligent cockpit interaction experiences in the future.
[0084] like Figure 3 As shown, this application also provides a vehicle. The vehicle includes: The vehicle-mounted terminal includes: The data generation layer is used to obtain the language instructions of the target object and generate declarative configuration data for interactive events based on the language instructions. The declaration description layer, which communicates with the data generation layer, is used to declaratively describe the declarative configuration data; the declarative configuration data includes the event type, operation instructions, and parameter information of the interactive events. The event parsing layer, which communicates with the declaration description layer, is used to create component instances based on declarative configuration data, bind static properties of the declarative configuration data to the component instances, detect event types in the declarative configuration data, extract operation instructions and parameter information based on the event types, and register event listeners. The execution layer, which communicates with the event parsing layer, is used to construct action requests, send the action requests to the action execution mechanism, and execute the actions. In some instances, the event resolution layer is also configured as follows: The declarative configuration data is parsed into internal data objects, and the internal data objects are encapsulated in component data objects; Retrieve the component type from the declarative configuration data in the component data object, and create the corresponding component instance based on the component type.
[0085] In some instances, the event resolution layer is also configured as follows: Call the data binding method of the component instance to bind the static properties encapsulated in the component data object to the component instance; By querying the component data object, you can detect the event types associated with the component instance within the component data object.
[0086] In some instances, the event resolution layer is also configured as follows: Within the internal data object encapsulated by the component's data object, search for the key-value element corresponding to the event type; An action data object is created based on a key-value element, and the internal data object corresponding to the key-value element is passed into the action data object for encapsulation.
[0087] In some instances, the event resolution layer is also configured as follows: Extract the string value of the operation instruction from the action data object; Extract the internal data object corresponding to the parameter information from the action data object, traverse the internal data object, convert each key-value pair in the internal data object into a string key-value pair, and obtain the key-value pair mapping table.
[0088] In some instances, the event resolution layer is also configured as follows: In the data binding method of a component instance, if it is detected that the component object data contains an event object declaration corresponding to the event type, the operation instructions and parameter information are extracted from the component data object; Bind operation instructions and parameter information to component instances; Call the event listener registration interface corresponding to the component instance to register the event listener.
[0089] In some instances, the event resolution layer is also configured as follows: The corresponding event listener is triggered based on the interactive operation of the target object, and the data generated by the interactive operation is obtained through the callback function of the event listener. Extract the corresponding action data object from the component data object associated with the component instance; Based on the data generated by the interactive operation, the template variables in the parameter information contained in the action data object are replaced.
[0090] In some instances, the event resolution layer is also configured as follows: Iterate through each parameter value in the key-value pair mapping table; If the parameter value contains a template variable with a preset format, then the actual data value corresponding to the template variable is found in the data generated by the interactive operation and replaced.
[0091] In some instances, the execution layer is also configured as follows: The replaced parameter information is concatenated into a query string, and the query string is combined with the string value of the operation instruction to form an action request; The action request is distributed to the corresponding action execution mechanism to execute the preset built-in action or call the application interface of the vehicle terminal.
[0092] By configuring the vehicle's interaction methods on the in-vehicle terminal, the terminal can receive declarative configuration data and automatically complete the entire process from component generation and event binding to function invocation. This allows users to indirectly control vehicle functions or interface navigation through natural language commands, improving the intelligence level of the vehicle cockpit and the efficiency of human-computer interaction, and providing users with a more intuitive and coherent interactive experience.
[0093] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. An interaction method of a vehicle, characterized by, The application is applied to a vehicle terminal, and comprises: acquiring a language instruction of a target object, generating declarative configuration data of an interactive event according to the language instruction; creating a component instance according to the declarative configuration data; binding static attributes of the declarative configuration data in the component instance, and detecting an event type in the declarative configuration data; extracting operation instructions and parameter information in the declarative configuration data according to the event type, to register an event listener, the event listener being used to acquire an interactive operation of the target object; replacing template variables of the parameter information according to data generated by the interactive operation; constructing an action request based on the replaced parameter information and the operation instructions, and executing an action.
2. The method of interacting with a vehicle of claim 1, wherein, The method for creating a component instance according to the declarative configuration data comprises: parsing the declarative configuration data into an internal data object, and encapsulating the internal data object in a component data object; acquiring a component type in the declarative configuration data from the component data object, and creating a corresponding component instance according to the component type.
3. The method of interacting with a vehicle of claim 2, wherein, The method for binding static attributes of the declarative configuration data in the component instance and detecting an event type in the declarative configuration data comprises: calling a data binding method of the component instance, and binding static attributes encapsulated in the component data object to the component instance; detecting an event type associated with the component instance in the component data object by querying the component data object.
4. The method of interacting with a vehicle of claim 3, wherein, The method for extracting operation instructions and parameter information in the declarative configuration data according to the event type, to register an event listener, comprises: finding a key-value element corresponding to the event type in the internal data object encapsulated in the component data object; creating an action data object based on the key-value element, and encapsulating an internal data object corresponding to the key-value element into the action data object.
5. The method of interacting with a vehicle of claim 4, wherein, The method for extracting operation instructions and parameter information in the declarative configuration data according to the event type, to register an event listener, comprises: extracting a string value of the operation instructions from the action data object; extracting the internal data object corresponding to the parameter information from the action data object, traversing the internal data object, converting each key-value pair in the internal data object into a string key-value pair, and obtaining a key-value pair mapping table.
6. The method of interacting with a vehicle of claim 5, wherein, The method for extracting operation instructions and parameter information in the declarative configuration data according to the event type, to register an event listener, comprises: in the data binding method of the component instance, if it is detected that the component object data contains an event object declaration corresponding to the event type, extracting the operation instructions and the parameter information from the component data object; binding the operation instructions and the parameter information to the component instance; calling an event listener registration interface corresponding to the component instance, to register the event listener.
7. The method of interacting with a vehicle of claim 6, wherein, The method for replacing template variables of the parameter information according to data generated by the interactive operation comprises: An event listener corresponding to the target object is triggered based on the interactive operation, and data generated by the interactive operation is obtained through a callback function of the event listener; An action data object corresponding to the component instance is extracted from a component data object associated with the component instance; A template variable in parameter information contained in the action data object is replaced according to the data generated by the interactive operation.
8. The method of Claim 5, wherein, The method of replacing the template variable in the parameter information according to the data generated by the interactive operation further includes: Each parameter value in the key-value mapping table is traversed; If the parameter value contains a template variable in a preset format, an actual data value corresponding to the template variable is searched for in the data generated by the interactive operation, and is replaced.
9. The method of interacting with a vehicle of claim 8, wherein, An action request is constructed based on the replaced parameter information and the operation instruction, and an action is executed, including: The replaced parameter information is spliced into a query string, and the query string and a string value of the operation instruction are combined into the action request; A preset built-in action or an application program interface is called according to the action request.
10. A vehicle, comprising: A vehicle terminal configured to execute the interactive method of the vehicle according to any one of claims 1 to 9.
Citation Information
Cited By
Event processing method, device and system, vehicle and computer readable storage medium
CN122019018A