Function control method and device, vehicle and storage medium

By determining the initial control and establishing a mutual exclusion relationship for display states during the control display process, and obtaining data model generation function control instructions, the problems of layout conflicts and code maintenance difficulties during control display are solved, and flexible switching and diversified function control between controls are realized.

CN122152418APending Publication Date: 2026-06-05CHONGQING LANDIAN AUTOMOBILE TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING LANDIAN AUTOMOBILE TECHNOLOGY CO LTD
Filing Date
2026-02-28
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, the inconsistent widths of parent and child control groups during control display lead to frequent adjustments to container width constraints, causing layout conflicts and abnormal interface display, increasing the difficulty of code maintenance, and failing to meet diverse remote operation needs of users.

Method used

By responding to the operation of the object, the initial control is determined, and when its type is a preset control type, the corresponding sub-control group is obtained, a mutual exclusion relationship of display state is established, the sub-control group is displayed and the data model is obtained, and function control instructions are generated based on the data model to perform function control.

Benefits of technology

It enables flexible switching between multiple controls, simplifies interaction logic, ensures the diversity of functional control, solves the problems of layout conflicts and code maintenance difficulty, and meets the diverse remote operation needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152418A_ABST
    Figure CN122152418A_ABST
Patent Text Reader

Abstract

The application provides a function control method and device, a vehicle and a storage medium, and belongs to the technical field of vehicles. The method comprises the following steps: in response to a first operation of an operation object, determining an initial control; in the case where a control type corresponding to the initial control is a preset control type, acquiring a sub-control group corresponding to the initial control, wherein the display state of the initial control and the sub-control group is mutually exclusive; displaying the sub-control group to the operation object, so that the operation object performs a second operation on any sub-control in the sub-control group; in response to the second operation of the operation object on any sub-control in the sub-control group, acquiring a data model corresponding to the sub-control; generating a function control instruction based on the data model, and performing function control based on the function control instruction. Flexible switching between multiple controls can be realized, the diversity of function control is ensured, and the interaction logic between multiple controls is effectively simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and more particularly to a functional control method, device, vehicle, and storage medium. Background Technology

[0002] With the rapid development of intelligent connected vehicles, remote control of vehicle functions via mobile apps has become standard.

[0003] In related technologies, existing function control methods mainly involve placing the parent control and the corresponding child control group in the same container view, controlling the display or hiding of the child control group by modifying its isHidden property, and implementing function control in response to touch operations on the parent control or child control group.

[0004] However, the above-mentioned control method suffers from several drawbacks during control display. Since the widths of parent and child control groups are often inconsistent, frequently adjusting the container's width constraints is necessary when controlling the display and hiding of parent and child control groups by modifying the `isHidden` property of the child control group. This not only complicates the calculation process but also easily leads to layout conflicts, causing abnormal interface display and increasing the difficulty of code maintenance. Furthermore, when a specific type of control within a child control group (such as the control corresponding to the first-level disinfection module in the disinfection module) is detected as being touched, the corresponding control function cannot be adapted, resulting in rigid control logic and difficulty in meeting diverse remote operation needs of users. Summary of the Invention

[0005] The purpose of this application is to provide a function control method, device, vehicle, and storage medium that enables flexible switching between multiple controls, ensures the diversity of function control, and effectively simplifies the interaction logic between multiple controls. The specific technical solution is as follows: In a first aspect of this application, a function control method is provided, the method comprising: In response to the first operation performed on the object, determine the initial control; If the control type corresponding to the initial control is a preset control type, obtain the sub-control group corresponding to the initial control, wherein the display states of the initial control and the sub-control group are mutually exclusive; The sub-control group is displayed to the operation object so that the operation object can perform a second operation on any sub-control in the sub-control group; In response to the second operation of the operation object on any sub-control in the sub-control group, the data model corresponding to the sub-control is obtained; Function control instructions are generated based on the data model, and function control is performed based on the function control instructions.

[0006] In an optional implementation, prior to determining the initial control in response to a first operation on the object, the method further includes: Get the list of control data; Construct a data model based on any data element in the control data list; Render the data model to generate controls corresponding to the data model; Based on the correspondence between the data elements in the control data list, the controls corresponding to each data model are displayed.

[0007] In an optional implementation, the generation of function control instructions based on the data model includes: Based on the control type identifier in the data model, obtain the corresponding command parameters from the preset command mapping table; The operation instruction status is determined based on the status field in the data model; The command parameters are combined with the operation instruction status to generate the function control instruction.

[0008] In an optional implementation, the function control based on the function control instructions includes: The function control instructions are encapsulated into a command execution bus object, and the command execution bus object is added to the global bus pool; The command execution bus object is used to perform functional control through the global bus pool.

[0009] In an optional implementation, before adding the command execution bus object to the global bus pool, the method further includes: Obtain the control strategy from the preset instruction execution rules; If the control strategy is serial mode and there are no incomplete command execution bus objects in the global bus pool, then the step of adding the command execution bus object to the global bus pool is executed. If the control strategy is in parallel mode, and the number of command execution bus objects currently being executed in the global bus pool is less than the preset parallel number, then the step of adding the command execution bus object to the global bus pool is executed.

[0010] In an optional implementation, after performing functional control via the command execution bus object executed through the global bus pool, the method further includes: Remove the command execution bus object from the global bus pool; Update the data model corresponding to the function control instructions in the command execution bus object.

[0011] In an optional implementation, the method further includes: If there is a command execution bus object in the global bus pool that meets the preset linkage triggering conditions, then control other controls associated with the command execution bus object to synchronously update their display status.

[0012] In an optional implementation, the display states of the initial control and the sub-control group are mutually exclusive, achieved in the following way: Establish an observation binding relationship between the display state properties of the initial control and the display state properties of the sub-control group; In response to changes in the display state attributes of the initial control according to preset update rules, the display state attributes of the sub-control group are updated.

[0013] In a second aspect of this application, a function control device is also provided, the device comprising: The initial control determination module is used to determine the initial control in response to the first operation on the object being operated on; The sub-control group acquisition module is used to acquire the sub-control group corresponding to the initial control when the control type corresponding to the initial control is a preset control type, wherein the display states of the initial control and the sub-control group are mutually exclusive; The sub-control group display module is used to display the sub-control group to the operation object, so that the operation object can perform a second operation on any sub-control in the sub-control group; The data model acquisition module is used to acquire the data model corresponding to the sub-control in response to the second operation of the operation object on any sub-control in the sub-control group; The function control module is used to generate function control instructions based on the data model and to perform function control based on the function control instructions.

[0014] In a third aspect of the embodiments of this application, a vehicle is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the functional control method described in any one of the first aspects above.

[0015] In a fourth aspect of the embodiments of this application, a storage medium is also provided, wherein the storage medium stores instructions that, when executed on a computer, cause the computer to perform any of the function control methods described in the first aspect above.

[0016] In a fifth aspect of the embodiments of this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the function control methods described in the first aspect above.

[0017] The technical solution provided in this application, in response to a first operation of the operation object, determines an initial control; if the control type corresponding to the initial control is a preset control type, it obtains a sub-control group corresponding to the initial control, wherein the display states of the initial control and the sub-control group are mutually exclusive; it displays the sub-control group to the operation object, so that the operation object can perform a second operation on any sub-control in the sub-control group; in response to the second operation of the operation object on any sub-control in the sub-control group, it obtains a data model corresponding to the sub-control; it generates a function control instruction based on the data model, and performs function control based on the function control instruction. By displaying a sub-control group whose display state is mutually exclusive with that of the initial control, and generating function control instructions based on the data model for function control, flexible switching between multiple controls can be achieved, ensuring the diversity of function control and effectively simplifying the interaction logic between multiple controls. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0021] Figure 1 A schematic diagram illustrating the implementation process of a function control method provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of an air conditioning control interface provided in an embodiment of this application; Figure 3 This is a schematic diagram of another air conditioning control interface provided in an embodiment of this application; Figure 4 A schematic diagram illustrating the implementation process of another functional control method provided in this application embodiment; Figure 5A schematic diagram illustrating the implementation process of another functional control method provided in this application embodiment; Figure 6 This is a schematic diagram of the structure of a functional control device provided in an embodiment of this application; Figure 7 This is a structural schematic diagram of a vehicle provided in an embodiment of this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0024] To address the issue that in existing technologies, when displaying controls, the widths of parent and child control groups are often inconsistent, and the display and hiding of parent and child control groups is controlled by modifying the isHidden property of the child control group, the width constraints of the container need to be frequently adjusted. This not only makes the calculation process cumbersome but also easily causes layout conflicts, leading to abnormal interface display and increasing the difficulty of code maintenance. Meanwhile, there is a technical problem where, upon recognizing that a specific type of control in a sub-control group (such as the control corresponding to the primary disinfection module in a disinfection module) has been touched, the corresponding control function cannot be adapted, leading to rigid control logic and difficulty in meeting the diverse remote operation needs of users. This application provides a function control method, device, vehicle, and storage medium. In response to a first operation by the operating object, an initial control is determined; if the control type corresponding to the initial control is a preset control type, a sub-control group corresponding to the initial control is obtained, wherein the display states of the initial control and the sub-control group are mutually exclusive; the sub-control group is displayed to the operating object, allowing the operating object to perform a second operation on any sub-control in the sub-control group; in response to the second operation by the operating object on any sub-control in the sub-control group, a data model corresponding to the sub-control is obtained; a function control instruction is generated based on the data model, and function control is performed based on the function control instruction. By displaying a sub-control group whose display state is mutually exclusive with that of the initial control, and generating function control instructions based on the data model for function control, flexible switching between multiple controls can be achieved, ensuring the diversity of function control and effectively simplifying the interaction logic between multiple controls.

[0025] like Figure 1 The diagram shown is a schematic representation of the implementation flow of a function control method provided in this application embodiment, which may specifically include the following steps: S101, in response to the first operation of the object being operated on, determines the initial control.

[0026] The aforementioned target of operation refers to the user who interacts with the application (such as a vehicle control program).

[0027] The first operation refers to the touch actions performed by the user on interface elements in the application interface, such as single click, double click, etc.

[0028] Initial controls refer to the interface elements corresponding to the first operation performed by the object in the application interface, such as the "sterilization and disinfection" button.

[0029] In this embodiment, an initial control is determined in response to the first operation of the operating object. For example, the operating object opens the vehicle control program corresponding to the vehicle on a mobile terminal (such as a mobile phone) and enters the air conditioning control interface. The air conditioning control interface contains multiple function buttons such as "air circulation", "defrost", and "disinfection and sterilization". The operating object clicks the "disinfection and sterilization" button to realize the corresponding function. Clicking the "disinfection and sterilization" button in this process is the first operation. The application captures the first operation through the event response chain, thereby locating the interface element triggered by the operation and determining the initial control as the "disinfection and sterilization" button.

[0030] For the first operation in response to the object being manipulated, determining the initial control can be achieved through the application's native event listening and dispatching mechanisms. For example, in iOS, the UIKit touch event handling system captures the user's touch coordinates, combines them with the layout frame information of the interface controls for hit detection, matches the interface control corresponding to the touch coordinates, and determines it as the initial control. In Android, the OnClickListener click event listener and MotionEvent touch event parser can be used to combine the position and size information of the control to complete the control hit judgment, thereby determining the initial control. Alternatively, it can be achieved based on the event handling capabilities of cross-platform frameworks, such as Flutter's GestureDetector gesture detection component and ReactNative's Touchable series of touchable components. The framework's encapsulated event callbacks obtain the control instance corresponding to the operation to complete the determination of the initial control. This application embodiment does not limit this approach.

[0031] S102, if the control type corresponding to the initial control is a preset control type, obtain the sub-control group corresponding to the initial control, wherein the display states of the initial control and the sub-control group are mutually exclusive.

[0032] The classification attributes of the control types mentioned above (such as buttons) are used to distinguish the functional roles and interactive behaviors of controls. For example, control types can be divided into direct function type (clicking directly triggers the corresponding function control instruction) and container type (clicking expands the corresponding sub-control group).

[0033] The aforementioned preset control types refer to predefined control types, which can be parent container controls. These controls serve as function entry points, and specific function selections can only be completed by expanding the corresponding child controls. For example, the "Disinfection and Sterilization" button in an air conditioner control interface.

[0034] The aforementioned sub-control group refers to a set of sub-controls associated with the initial control corresponding to the preset control type. These sub-controls represent more granular functional options. For example, the sub-control group corresponding to the "Disinfect and Sterilize" button includes three sub-buttons: "Powerful Sterilization," "Regular Sterilization," and "Close."

[0035] The aforementioned mutual exclusion of display states means that the initial control and its child control groups cannot be visible on the interface simultaneously: when the initial control is visible, the child control groups must be hidden; when the child control groups are visible, the initial control must be hidden. This mutual exclusion ensures the clarity of the interface layout and the logic of operations.

[0036] In this embodiment, when the control type corresponding to the initial control is a preset control type, the sub-control group corresponding to the initial control is obtained. The display states of the initial control and the sub-control group are mutually exclusive. It should be noted that the mutual exclusion of the display states of the initial control and the sub-control group can be achieved using the observer pattern, eliminating the need for manual calculation of layout constraints and avoiding the stretching, compression, or crashing issues caused by inconsistent control widths in the traditional UIStackView solution.

[0037] Taking the air conditioning interface of the car control app as an example, such as Figure 2 The diagram shows a structural schematic of an air conditioning control interface provided in this application embodiment. The diagram includes controls such as "Air Circulation," "Defrosting," "Rapid Heating," "Rapid Cooling," "Air Purification," and "Disinfection and Sterilization." When the user clicks the "Disinfection and Sterilization" control, it is identified as the initial control. Since the "Disinfection and Sterilization" control is predefined as a parent container control (preset control type), the application immediately obtains the corresponding child control group and establishes a mutual exclusion binding of their isHidden properties. The child control group contains three child controls: "Powerful Sterilization," "Regular Sterilization," and "Off." At this time, the mutual exclusion relationship between the initial control and the child control group is established: when the initial control is visible, the child control group is hidden. This mutual exclusion between the initial control and the child control group can be manifested as follows: Figure 3 As shown, Figure 3 This is a schematic diagram of another air conditioning control interface provided in this application embodiment. In this case, the controls such as "Powerful Sterilization," "Regular Sterilization," and "Off" in the sub-control group are expanded, while the "Disinfection and Sterilization" control is hidden. When the user clicks on a blank area of ​​the page, the application resets the isHidden property of the "Disinfection and Sterilization" control to false, the "Disinfection and Sterilization" control reappears, the sub-control group automatically hides, and the interface returns to normal. Figure 2 As shown. The entire process requires no manual constraint calculations or layout updates.

[0038] It should be noted that if the control type of the initial control is not a preset type (such as a direct-function "air circulation" button), the application will not obtain the sub-control group, nor will it establish a mutual exclusion relationship. Instead, it will directly enter the instruction generation and sending process (corresponding to step S105).

[0039] S103, the sub-control group is displayed to the operation object so that the operation object can perform a second operation on any sub-control in the sub-control group.

[0040] The above-mentioned display refers to bringing previously hidden sub-controls to the screen, that is, switching their visibility state from hidden (e.g., isHidden=true or visibility=GONE) to visible (e.g., isHidden=false or visibility=VISIBLE). This process can be accompanied by animation effects (e.g., fade-in, slide-to-expand) to enhance the user experience.

[0041] The second operation mentioned above refers to a touch action (such as clicking or long-pressing) performed on a specific sub-control after the object is displayed in the sub-control group, in order to trigger a specific function. Compared with the first operation, the second operation operates on more granular function options, and its direct purpose is to select and execute a specific vehicle function.

[0042] In this embodiment, a group of sub-controls is displayed to the operation object, allowing the operation object to perform a second operation on any sub-control within the group. Specifically, after establishing a mutually exclusive relationship between the initial control and the sub-control group's display states, the application can indirectly drive the sub-control group to display automatically by modifying the visibility attribute of the initial control. For example, when the user clicks the "Disinfect and Sterilize" parent button, the application sets the parent button's isHidden attribute to true (hiding the parent button). Since the inverse relationship between the parent button and the sub-control group's visibility has been established in step S102 through the observer pattern or binding mechanism, the sub-control group's isHidden attribute will automatically become false, thus displaying the three sub-buttons "Powerful Sterilization," "Regular Sterilization," and "Close" in the original position of the parent button. At this time, the user can see the expanded specific options and can perform further operations by clicking any sub-button.

[0043] S104, in response to the second operation of the operation object on any sub-control in the sub-control group, obtain the data model corresponding to the sub-control.

[0044] The aforementioned data model refers to the core data object that describes the state of controls and business logic. It encapsulates the control's type identifier, current state (such as on / off), and parameter information required to generate functional control commands. For example, the data model corresponding to the "powerful sterilization" control may include fields such as control type identifier, control's current state, corresponding vehicle identifier, and command parameters.

[0045] In this embodiment of the application, in response to the second operation of the operation object on any sub-control in the sub-control group, the data model corresponding to the sub-control is obtained.

[0046] S105 generates function control instructions based on the data model and performs function control based on the function control instructions.

[0047] In this embodiment, function control instructions are generated based on a data model, and function control is performed based on these instructions. The function control instructions are operable commands generated from the data model and sent to the vehicle for execution. These commands may include command type and parameters, and must conform to the communication protocols defined by the vehicle (such as JSON, Protobuf, MQTT messages, etc.) and can be transmitted via Bluetooth, mobile networks, or other channels. Function control refers to the process of sending function control instructions to the vehicle via a communication link, allowing the vehicle to perform corresponding operations, such as activating the powerful sterilization mode of the air conditioning system or disabling the defrost function. The final result of function control is that the vehicle hardware (such as the air conditioning controller or T-BOX) responds to the instructions and changes its operating state, while simultaneously feeding back the execution results to the application to update the interface state.

[0048] Based on the above description of the technical solution provided in the embodiments of this application, in response to the first operation of the operation object, an initial control is determined; if the control type corresponding to the initial control is a preset control type, a sub-control group corresponding to the initial control is obtained, wherein the display states of the initial control and the sub-control group are mutually exclusive; the sub-control group is displayed to the operation object so that the operation object can perform a second operation on any sub-control in the sub-control group; in response to the second operation of the operation object on any sub-control in the sub-control group, a data model corresponding to the sub-control is obtained; a function control instruction is generated based on the data model, and function control is performed based on the function control instruction.

[0049] By displaying child control groups whose display states are mutually exclusive with the initial control, and generating function control instructions based on the data model for function control, flexible switching between multiple controls can be achieved, ensuring the diversity of function control and effectively simplifying the interaction logic between multiple controls. This addresses the problem in existing technologies where, during control display, the widths of parent and child control groups are often inconsistent. When controlling the display and hiding of parent and child control groups by modifying the isHidden property of the child control group, the width constraints of the container need to be frequently adjusted. This not only makes the calculation process cumbersome but also easily leads to layout conflicts, causing abnormal interface display and increasing the difficulty of code maintenance. Furthermore, it solves the technical problem that when a specific type of control in the child control group (such as the control corresponding to the first-level disinfection module in the disinfection module) is detected to be touched, the corresponding control function cannot be adapted, resulting in rigid control logic and difficulty in meeting the diverse remote operation needs of users.

[0050] like Figure 4 The diagram shown is a schematic representation of the implementation flow of another functional control method provided in this application embodiment. This application embodiment... Figure 1Based on this, a detailed description is provided on how to generate function control instructions based on a data model, which may include the following: S401, in response to the first operation of the object being operated on, determines the initial control.

[0051] In this embodiment of the application, this step is similar to step S101 above, and will not be described in detail here.

[0052] Before determining the initial control in response to the first operation on the manipulated object, it may also include: Step 11: Obtain the control data list.

[0053] In this embodiment, a control data list is obtained. The control data list refers to a collection of data obtained from the server that describes the controls and their states to be displayed on the interface. The control data list contains multiple data elements, each corresponding to complete information about a control. For example, in the air conditioning interface of a car control app, the control data list includes the control's type identifier, current state, and auxiliary information required for interface rendering (such as icons and titles). For container-type controls (such as "disinfection and sterilization"), their data elements also include configuration information for sub-control groups.

[0054] Step 12: Construct a data model based on any data element in the control data list.

[0055] In this embodiment, a data model is constructed based on any data element in the control data list. The data model refers to the core data object describing the control's state and business logic, encapsulating the control's type identifier, current state, and parameter information required to generate functional control instructions. Each data element corresponds to an independent data model instance. For example, for the "air circulation" data element, the constructed data model includes the control type identifier, current state, corresponding vehicle identifier, and interface attributes such as air circulation. For container-type controls (such as "disinfection and sterilization"), their data model, in addition to containing its own attributes, also includes a list of sub-data models to represent its sub-controls.

[0056] Data model construction can be based on instantiation using initializers. For example, in Swift, an `init(from dict: [String: Any])` initializer can be defined for `ButtonModel`, passing data elements as parameters to this initializer to build the data model. Alternatively, data mapping tools can be used for parsing and mapping, such as using Gson in Kotlin to deserialize any data element in the control's data list into its corresponding data model. A factory pattern can also be used, where a corresponding factory class creates the data model based on the type or content of the data elements. Furthermore, if certain fields in the data elements (such as command words) need to be mapped, they can be populated using a pre-defined mapping table during construction. This application does not limit this approach.

[0057] Step 13: Render the data model and generate the corresponding controls.

[0058] In this embodiment, the data model is rendered to generate corresponding controls. The rendering process may include creating corresponding control instances based on attributes such as type, icon, and title in the data model, and setting their appearance and initial state.

[0059] Step 14: Based on the correspondence between the data elements in the control data list, display the controls corresponding to each data model.

[0060] In this embodiment, the controls corresponding to each data model are displayed according to the correspondence between data elements in the control data list. Specifically, the controls corresponding to each data model can be displayed according to the correspondence between data elements in the control data list. The application obtains the interface container view, adds the rendered parent controls sequentially according to the order of the data list, and sets appropriate layout constraints. For container-type controls, their child control group views can be added to the container and set to hidden by isHidden=true.

[0061] S402, if the control type corresponding to the initial control is a preset control type, obtain the sub-control group corresponding to the initial control, wherein the display states of the initial control and the sub-control group are mutually exclusive.

[0062] In this embodiment of the application, when the control type corresponding to the initial control is a preset control type, the sub-control group corresponding to the initial control is obtained, wherein the display states of the initial control and the sub-control group are mutually exclusive.

[0063] To ensure mutual exclusion of the display states of the initial control and its child control groups, the following approach is used: An observer binding relationship is established between the display state properties of the initial control and the child control groups; the display state properties of the child control groups are updated according to a preset update rule in response to changes in the display state properties of the initial control. The observer binding relationship can utilize the observer pattern provided by the platform (such as KVO, LiveData, RxSwift, etc.) to bind the display state properties of the initial control (e.g., isHidden) to the display state properties of the child control groups and set them to an inverse relationship. The preset update rule refers to a pre-defined display relationship, such as displaying the child control group if the initial control is hidden, and hiding the child control group if the initial control is displayed. Specifically, when the display state of the initial control changes for any reason (such as user clicks or code modifications), the observer binding relationship automatically triggers an update of the display state of the child control groups, without manual intervention.

[0064] S403, the sub-control group is displayed to the operation object so that the operation object can perform a second operation on any sub-control in the sub-control group.

[0065] In this embodiment of the application, this step is similar to step S103 above, and will not be described in detail here.

[0066] S404, in response to the second operation of the operation object on any sub-control in the sub-control group, obtains the data model corresponding to the sub-control.

[0067] In this embodiment of the application, this step is similar to step S104 above, and will not be described in detail here.

[0068] S405: Based on the control type identifier in the data model, retrieve the corresponding command parameters from the preset command mapping table.

[0069] The control type identifier mentioned above refers to a field in the data model used to uniquely identify the control type, such as type="sterilizeStrong". This identifier is used to look up the corresponding command parameters in the command mapping table.

[0070] The aforementioned preset command mapping table is a predefined mapping table used to map control type identifiers to vehicle-recognizable command words or parameter templates. The mapping table can be stored in a local configuration file, a database, or a hard-coded dictionary.

[0071] The command parameters mentioned above refer to the basic parameters obtained from the mapping table used to construct the final instruction, which may include command words (such as DISINFECTION) and default parameters.

[0072] In this embodiment, the corresponding command parameters are obtained from a preset command mapping table based on the control type identifier in the data model. For example, for the data model corresponding to the "powerful sterilization" control, its type is sterilizeStrong. Querying the mapping table reveals that the corresponding command parameters obtained from the preset command mapping table are the command word DISINFECTION and the default parameter level=2.

[0073] It should be noted that if the corresponding entry does not exist in the preset command mapping table, an exception can be thrown or the default processing can be used.

[0074] S406, determine the status of the operation instruction based on the status field in the data model.

[0075] The aforementioned state fields refer to fields in the data model that represent the desired current state of a control, such as state="ON" or state="OFF". For certain special controls (such as the "Close" button), the state can be set to OFF.

[0076] The above operation command status is used to instruct the vehicle to perform an opening or closing operation.

[0077] In this embodiment of the application, the status of the operation instruction can be determined based on the status field in the data model.

[0078] S407 combines command parameters with operation instruction status to generate function control instructions.

[0079] In this embodiment of the application, command parameters and operation instruction status can be combined by dictionary merging or string concatenation to generate function control instructions. This embodiment of the application does not limit this.

[0080] S408 performs function control based on function control instructions.

[0081] In this embodiment of the application, this step is similar to step S105 above, and will not be described in detail here.

[0082] like Figure 5 The diagram shown is a schematic representation of the implementation flow of another functional control method provided in this application embodiment. This application embodiment... Figure 4 Based on this, it describes in detail how to perform function control based on function control instructions, which may include the following: S501, in response to the first operation of the object being operated on, determines the initial control.

[0083] In this embodiment of the application, this step is similar to step S101 above, and will not be described in detail here.

[0084] S502, if the control type corresponding to the initial control is a preset control type, obtain the sub-control group corresponding to the initial control, wherein the display states of the initial control and the sub-control group are mutually exclusive.

[0085] In this embodiment of the application, this step is similar to step S102 above, and will not be described in detail here.

[0086] S503, the sub-control group is displayed to the operation object so that the operation object can perform a second operation on any sub-control in the sub-control group.

[0087] In this embodiment of the application, this step is similar to step S103 above, and will not be described in detail here.

[0088] S504, in response to the second operation of the operation object on any sub-control in the sub-control group, obtains the data model corresponding to the sub-control.

[0089] In this embodiment of the application, this step is similar to step S104 above, and will not be described in detail here.

[0090] S505 generates function control instructions based on a data model.

[0091] In this embodiment of the application, this step is similar to step S105 above, and will not be described in detail here.

[0092] S506 encapsulates function control instructions into command execution bus objects and adds the command execution bus objects to the global bus pool.

[0093] The aforementioned command execution bus object refers to a runtime entity that encapsulates function control instructions and their execution status, used to manage the complete lifecycle of a single instruction. Each bus object contains at least the instruction content (such as the generated command dictionary), vehicle identifier, creation timestamp, current status (such as waiting, sending, completed, failed), and a callback or notification mechanism (for result feedback). The aforementioned global bus pool refers to a container that organizes and manages all command execution bus objects in a unified manner according to the vehicle dimension. It is used to store bus objects that are currently executing or waiting to be executed, and to schedule the sending of instructions according to a preset strategy.

[0094] In this embodiment, the function control instructions are encapsulated as command execution bus objects, and these objects are added to the global bus pool. After generating the function control instructions, the application immediately creates a command execution bus object, fills in the instruction content, the current vehicle identifier, and other attributes, and sets its initial state to "waiting." Subsequently, the global bus pool manager is invoked to add the bus object to the bus pool of the corresponding vehicle. During the addition process, it can determine whether immediate execution is allowed based on the current vehicle's instruction execution strategy (e.g., serial or parallel). If allowed, the transmission process is triggered; otherwise, the bus object queues in the pool.

[0095] Determining whether immediate execution is permitted based on the current vehicle's instruction execution strategy (such as serial or parallel) may include the following steps: Step 61: Obtain the control strategy from the preset instruction execution rules.

[0096] In this embodiment, a control strategy can be obtained from preset instruction execution rules. These preset instruction execution rules refer to predefined and stored configuration information used to determine how the application schedules and executes vehicle control instructions. These preset instruction execution rules can be configured differently for different vehicle models, different vehicles, or different business scenarios. For example, the preset instruction execution rules include the instruction execution mode (i.e., control strategy) adopted by the current vehicle and related parameters (such as the maximum number of parallel operations). For older models that do not support concurrent instructions, the rule can be configured as a serial mode; for newer high-performance models, the rule can be configured as a parallel mode and a maximum number of parallel operations can be set. The control strategy refers to the type of strategy obtained from the preset instruction execution rules that specifically guides the current vehicle instruction scheduling method. It can include two basic modes: serial mode and parallel mode.

[0097] Step 62: If the control strategy is serial mode and there are no incomplete command execution bus objects in the global bus pool, then perform the step of adding the command execution bus object to the global bus pool.

[0098] In this embodiment, if the control strategy is serial mode and there are no incomplete command execution bus objects in the global bus pool, then the step of adding the command execution bus object to the global bus pool, i.e., step S506, is executed. Serial mode requires that at most one instruction can be in execution at any given time; subsequent instructions must wait for the previous instruction to finish completely before execution can begin. Incomplete command execution bus objects refer to command execution bus objects whose status is not "completed" or "failed," i.e., command execution bus objects in the "waiting" or "sending" state. These command execution bus objects have not yet finished execution and are still occupying the vehicle's instruction processing channel. By checking whether there are incomplete objects, it can be determined whether the vehicle is currently idle.

[0099] Correspondingly, if the control strategy is in serial mode and there are incomplete command execution bus objects in the global bus pool, then the command execution bus object will not be added to the global bus pool.

[0100] Step 63: If the control strategy is in parallel mode and the number of command execution bus objects currently being executed in the global bus pool is less than the preset parallel number, then the step of adding the command execution bus object to the global bus pool is executed.

[0101] In this embodiment, the control strategy is a parallel mode, and the number of currently executing command execution bus objects in the global bus pool is less than a preset parallel number. Therefore, the step of adding the command execution bus objects to the global bus pool, i.e., step S506, is executed. Parallel mode allows multiple instructions to be executed concurrently at the same time. The currently executing command execution bus object refers to a command execution bus object in the "sending" state, i.e., a bus that has entered the sending process but has not yet received the final result. The preset parallel number refers to the maximum number of instructions allowed to be executed simultaneously, obtained from preset instruction execution rules. This value can be set according to vehicle hardware capabilities or business needs; for example, setting it to 3 means that a maximum of 3 instructions are allowed to be executed concurrently. When the parallel number is set to 0 or 1, the actual effect is equivalent to serial mode, but logically it still falls within the configuration scope of parallel mode.

[0102] Correspondingly, if the control strategy is in parallel mode, and the number of command execution bus objects currently being executed in the global bus pool is equal to or greater than the preset parallel number, then the command execution bus object is refused to be added to the global bus pool.

[0103] For example, if the preset parallelism of vehicle model B is 3, and the number of command execution bus objects currently being executed in the global bus pool is 2, and the user clicks "Powerful Sterilization" to generate a new bus, and checks and finds that 2 < 3, then the command execution bus object can be added to the global bus pool; if the number of command execution bus objects currently being executed in the global bus pool is 3, then the user is refused to add the command execution bus object to the global bus pool, and is prompted that "the instruction concurrency limit has been reached, please try again later".

[0104] S507 executes commands through the global bus pool to control bus objects for functionality.

[0105] The aforementioned execution refers to the process of sending the function control commands from the bus object to the vehicle via the communication link and processing the execution results. The execution process includes command sending, status polling, timeout retries, and result parsing. After execution is complete, the bus object's status is updated and it is removed from the bus pool.

[0106] The aforementioned function control refers to the process whereby, after the vehicle receives an instruction, the corresponding controller performs specific operations, such as activating the air conditioning sterilization mode or adjusting the air circulation, and then returns the execution results to the application program.

[0107] In this embodiment, function control can be performed by executing commands from a global bus pool to control bus objects. The global bus pool manager continuously monitors bus objects in the pool that are "waiting" or "sending," and schedules their execution based on the current vehicle's communication status and strategy.

[0108] For example, for vehicles supporting parallel commands, the global bus pool manager can retrieve multiple command execution bus objects from the pool and send them concurrently; for vehicles supporting serial commands, only one command execution bus object is processed at a time, and the next command execution bus object is processed only after its completion (success or failure). During transmission, the global bus pool manager can select an appropriate channel based on the vehicle's currently available communication method (Bluetooth first, then remote control) and handle any necessary security verifications (such as entering a security code). After transmission, the vehicle's execution result is obtained through polling or asynchronous callbacks, the bus object status is updated, and the page is refreshed via broadcast notification.

[0109] Furthermore, after executing command execution bus objects through the global bus pool for function control, the process may also include: removing command execution bus objects from the global bus pool; and updating the data model corresponding to the function control instructions in the command execution bus objects. Specifically, when a command execution bus object completes sending and receives the execution result from the vehicle (whether successful or not), the global bus pool manager first removes the bus object from the bus pool of the corresponding vehicle to avoid it interfering with the judgment of subsequent instructions (such as checking whether the global bus pool is empty in serial mode). Subsequently, the global bus pool manager parses the result data returned by the vehicle, extracts the final state corresponding to the instruction, and finds the corresponding data model through the control identifier or data model reference saved in the command execution bus object, updating its status field to the latest value. For example, after the strong sterilization instruction is successfully executed, the disinfection status field disinfectionStatus returned by the server becomes 2 (strong). The application updates the status of the "strong sterilization" data model to ON based on this value. The updated data model will drive the interface refresh, making the button display the correct on state.

[0110] Simultaneously, if a command execution bus object in the global bus pool meets the preset linkage triggering conditions, the display status of other controls associated with the command execution bus object will be updated synchronously. The preset linkage triggering conditions refer to a predefined set of rules used to determine whether the execution of a command execution bus object should trigger a state change in other controls. Linkage conditions can be configured based on control type, operation command status, and business requirements. For example, it can be configured as: "When the powerful sterilization bus object is executing or has completed and the result is 'on,' automatically set the air conditioner switch control to the 'on' state." Linkage conditions can be stored in a local configuration file or a server-issued configuration, supporting dynamic adjustment based on vehicle model and user preferences. Associated other controls refer to interface controls that have a business relationship with the triggering bus object. For example, the air conditioner switch often has a linkage relationship with functions such as defrosting, air circulation, and disinfection: if the air conditioner is not on when defrosting is activated, it should automatically turn on; if all functions are turned off, the air conditioner should also turn off. These associated controls and the triggering bus object are pre-mapped through configuration. Synchronous update of display status refers to immediately modifying the interface behavior of related controls (such as displaying loading animations or switching selected states) when the linkage conditions are met, without waiting for user interaction or server data refresh. This improves the immediacy and consistency of interaction, allowing users to perceive the logical connections between functions.

[0111] Corresponding to the above method embodiments, this application also provides a function control device, such as... Figure 6As shown, the device may include an initial control determination module 601, a sub-control group acquisition module 602, a sub-control group display module 603, a data model acquisition module 604, and a function control module 605.

[0112] The initial control determination module 601 is used to determine the initial control in response to the first operation of the operation object; The sub-control group acquisition module 602 is used to acquire the sub-control group corresponding to the initial control when the control type corresponding to the initial control is a preset control type, wherein the display states of the initial control and the sub-control group are mutually exclusive; The sub-control group display module 603 is used to display the sub-control group to the operation object, so that the operation object can perform a second operation on any sub-control in the sub-control group; The data model acquisition module 604 is used to acquire the data model corresponding to the sub-control in response to the second operation of the operation object on any sub-control in the sub-control group; The function control module 605 is used to generate function control instructions based on the data model and to perform function control based on the function control instructions.

[0113] This application also provides a vehicle, such as... Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704. Memory 703 is used to store computer programs; In one embodiment of this application, when the processor 701 executes a program stored in the memory 703, it performs the following steps: In response to the first operation of the operation object, an initial control is determined; if the control type corresponding to the initial control is a preset control type, the sub-control group corresponding to the initial control is obtained, wherein the display states of the initial control and the sub-control group are mutually exclusive; the sub-control group is displayed to the operation object so that the operation object can perform a second operation on any sub-control in the sub-control group; in response to the second operation of the operation object on any sub-control in the sub-control group, the data model corresponding to the sub-control is obtained; a function control instruction is generated based on the data model, and function control is performed based on the function control instruction.

[0114] The communication bus mentioned in the above vehicles can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0115] The communication interface is used for communication between the aforementioned vehicle and other devices.

[0116] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0117] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0118] In another embodiment provided in this application, a storage medium is also provided, which stores instructions that, when run on a computer, cause the computer to execute any of the function control methods described in the above embodiments.

[0119] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the function control methods described in the above embodiments.

[0120] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0121] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0122] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0123] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the protection scope of this application.

Claims

1. A function control method, characterized in that, The method includes: In response to the first operation performed on the object, determine the initial control; If the control type corresponding to the initial control is a preset control type, obtain the sub-control group corresponding to the initial control, wherein the display states of the initial control and the sub-control group are mutually exclusive; The sub-control group is displayed to the operation object so that the operation object can perform a second operation on any sub-control in the sub-control group; In response to the second operation of the operation object on any sub-control in the sub-control group, the data model corresponding to the sub-control is obtained; Function control instructions are generated based on the data model, and function control is performed based on the function control instructions.

2. The method according to claim 1, characterized in that, Before determining the initial control in response to the first operation of the manipulated object, the method further includes: Get the list of control data; Construct a data model based on any data element in the control data list; Render the data model to generate controls corresponding to the data model; Based on the correspondence between the data elements in the control data list, the controls corresponding to each data model are displayed.

3. The method according to claim 1, characterized in that, The generation of function control instructions based on the data model includes: Based on the control type identifier in the data model, obtain the corresponding command parameters from the preset command mapping table; The operation instruction status is determined based on the status field in the data model; The command parameters are combined with the operation instruction status to generate the function control instruction.

4. The method according to claim 1, characterized in that, The function control based on the function control command includes: The function control instructions are encapsulated into a command execution bus object, and the command execution bus object is added to the global bus pool; The command execution bus object is used to perform functional control through the global bus pool.

5. The method according to claim 4, characterized in that, Before adding the command execution bus object to the global bus pool, the method further includes: Obtain the control strategy from the preset instruction execution rules; If the control strategy is serial mode and there are no incomplete command execution bus objects in the global bus pool, then the step of adding the command execution bus object to the global bus pool is executed. If the control strategy is in parallel mode, and the number of command execution bus objects currently being executed in the global bus pool is less than the preset parallel number, then the step of adding the command execution bus object to the global bus pool is executed.

6. The method according to claim 4, characterized in that, After performing function control via the command execution bus object executed through the global bus pool, the method further includes: Remove the command execution bus object from the global bus pool; Update the data model corresponding to the function control instructions in the command execution bus object.

7. The method according to claim 4, characterized in that, The method further includes: If there is a command execution bus object in the global bus pool that meets the preset linkage triggering conditions, then control other controls associated with the command execution bus object to synchronously update their display status.

8. The method according to claim 1, characterized in that, The display states of the initial control and the sub-control group are mutually exclusive, which is achieved in the following way: Establish an observation binding relationship between the display state properties of the initial control and the display state properties of the sub-control group; In response to changes in the display state attributes of the initial control according to preset update rules, the display state attributes of the sub-control group are updated.

9. A functional control device, characterized in that, The device includes: The initial control determination module is used to determine the initial control in response to the first operation on the object being operated on; The sub-control group acquisition module is used to acquire the sub-control group corresponding to the initial control when the control type corresponding to the initial control is a preset control type, wherein the display states of the initial control and the sub-control group are mutually exclusive; The sub-control group display module is used to display the sub-control group to the operation object, so that the operation object can perform a second operation on any sub-control in the sub-control group; The data model acquisition module is used to acquire the data model corresponding to the sub-control in response to the second operation of the operation object on any sub-control in the sub-control group; The function control module is used to generate function control instructions based on the data model and to perform function control based on the function control instructions.

10. A vehicle, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.