Target equipment control method, vehicle-mounted terminal and computer storage medium

By using a system setting interface and a method to dynamically create instances based on target variables, the problem of poor compatibility of control methods between different chip types was solved, achieving higher compatibility and lower R&D costs.

CN120848291APending Publication Date: 2025-10-28CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510921784.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Poor compatibility of control methods for smart products with different chip types leads to high R&D costs.

Method used

The system sets up an interface to implement the same control method for each chip, and uses target variables to determine the different control methods for each chip. By combining reflection mechanism and configuration fields, target instances are dynamically created to achieve control of the target device.

Benefits of technology

It improves the compatibility of control methods for target equipment and reduces research and development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848291A_ABST
    Figure CN120848291A_ABST
Patent Text Reader

Abstract

The invention provides a target equipment control method, a vehicle-mounted terminal and a computer storage medium, and is applied to various types of chips, and the method comprises the following steps: obtaining target equipment information; target variables in a system setting class are determined according to the target device information, the system setting class is used for achieving a system setting interface, the system setting interface is used for achieving first control, and the first control is the same control method for all chips; determining second control according to the target variable, wherein the second control is a differentiated voice control method of each chip; and controlling the target equipment based on the first control and the second control. Therefore, the compatibility of the control method of the target equipment is improved, and the development cost of research and development is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of control technology, and in particular to a control method for a target device, an in-vehicle terminal, and a computer storage medium. Background Technology

[0002] With the development of technology, the iteration speed of smart products is getting faster and faster, and different versions of smart products usually use different chip types. In order to adapt to different types of chips, multiple corresponding versions of control methods are usually compiled, but these control methods have poor compatibility, which increases the development cost for R&D personnel. Summary of the Invention

[0003] In view of the above problems, this application discloses a control method for a target device, an in-vehicle terminal, and a computer storage medium to solve the problem of high development costs for researchers.

[0004] In a first aspect, this application proposes a control method for a target device, applicable to various types of chips. The method includes: acquiring target device information; determining a target variable in a system setting class based on the target device information, wherein the system setting class is used to implement a system setting interface, and the system setting interface is used to implement a first control, wherein the first control is a control method common to all chips; determining a second control based on the target variable, wherein the second control is a voice control method differentiated for each chip; and controlling the target device based on the first control and the second control.

[0005] Combining the methods described above, it can be seen that by setting the system interface to implement the same control method for each chip, and determining the different control methods for each chip based on the target variable, the target device can be controlled. This not only increases the compatibility of the control methods for the target device but also reduces the development costs.

[0006] Optionally, in some embodiments of this application, obtaining target device information includes: obtaining target device information according to a build configuration class; the build configuration class determines the target device information through build configuration fields provided by the build tool, and the build configuration fields include the target device information.

[0007] Optionally, in some embodiments of this application, the control method includes a voice control method, and determining the second control based on the target variable includes: creating a target instance in a first instance based on the target variable reflection, the target instance including the relevant method of the second control; the first instance includes control instances of each chip, and the target instance is determined based on the semantics of the voice control.

[0008] Optionally, in some embodiments of this application, voice control of the target device based on the first control and the second control includes: inheriting the capabilities of the first control from the system settings interface based on the target instance, and calling the relevant methods of the second control to open the target API of the target device for voice control; the target API is determined according to the semantics of the voice control.

[0009] Optionally, in some embodiments of this application, the build configuration class is determined by the build configuration fields provided by the build tool. The build configuration fields include target device information, including: configuring the build configuration fields in the build configuration file script, and the build tool constructing the build configuration fields into the build configuration class; the implementation language of the build configuration file script is different from the implementation language of the build configuration class.

[0010] Optionally, in some embodiments of this application, the system settings class is a singleton so that only one system settings class runs on a single process.

[0011] Optionally, in some embodiments of this application, the system setting class is a proxy class of the target object, and the target object corresponds to the control instance of each chip.

[0012] Optionally, in some embodiments of this application, the control method for the target device further includes: creating a system settings class when the target device is controlled for the first time.

[0013] Secondly, this application provides an in-vehicle terminal, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, enable the in-vehicle terminal to implement the control method of the target device as described in the first aspect.

[0014] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the control method for the target device as described in the first aspect.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0016] 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. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0017] Figure 1This is a schematic flowchart illustrating a control method for a target device, as shown in an exemplary embodiment of this application.

[0018] Figure 2 This is a schematic diagram illustrating a modeling method for controlling a target device in an application scenario, as shown in an exemplary embodiment of this application.

[0019] Figure 3 This is a timing diagram illustrating a control method for a target device in an application scenario, as shown in an exemplary embodiment of this application.

[0020] Figure 4 This is a schematic diagram of the structure of an in-vehicle terminal provided in an exemplary embodiment of this application. Detailed Implementation

[0021] The embodiments of this application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.

[0022] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the illustrations only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the shape, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0023] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.

[0024] With the development of new energy vehicle technology and people's increasing demand for diversified and personalized cars, the pace of car updates and iterations is accelerating. There are more and more vehicle models under the same brand, and also more and more cars with different configurations of the same model. Different models and configurations typically use different software and hardware versions, usually requiring the development of a separate software solution for each model. These software solutions not only have poor compatibility but also increase development costs for researchers.

[0025] The inventor observed that different car models typically use different software / hardware versions, such as different types of chips. However, some control methods are the same across different software versions, such as voice control to open windows or voice control to turn on Bluetooth; or, some control methods are also the same for the same control function across different software versions, such as some control methods for voice control to turn on seat heating.

[0026] To address the above issues, this application proposes a control method for target devices applicable to various chip types. It implements a common control method across all chips through a system setting interface, as well as a chip-specific control method to determine the target variable. The target device is then controlled based on both the common and chip-specific control methods. This not only increases the compatibility of the control method for the target device but also reduces development costs.

[0027] To facilitate understanding of the technical solution of this application, some names will be explained first.

[0028] Java: Java is an object-oriented programming language.

[0029] Polymorphism refers to the ability of the same behavior to have multiple different manifestations or forms. In Java, this means that the same method call can produce different behaviors depending on the actual type of the object.

[0030] Annotation: Annotation, also called metadata, is a code-level description.

[0031] Interface: An interface is an abstract type that contains only method declarations, not implementations. An interface defines a set of specifications, and any class that implements the interface must provide implementations for those methods.

[0032] Implementation (implements): In Java programs, a class declares that it uses one or more interfaces using the `implements` keyword. Interface methods are generally empty and must be overridden to be used.

[0033] Class Instance: refers to a specific object created from a certain class.

[0034] Figure 1 This is a schematic flowchart illustrating a control method for a target device, as shown in an exemplary embodiment of this application.

[0035] like Figure 1 As shown, in an exemplary embodiment, a control method for a target device applied to various types of chips includes:

[0036] S1, Obtain target device information.

[0037] The target device information can be either vehicle model information or mobile phone model information, which can indicate the type of the target device.

[0038] S2, determine the target variable in the system setting class based on the target device information. The system setting class is used to implement the system setting interface, which is used to implement the first control. The first control is the same control method for all chips.

[0039] The first control can be a system-related control method common to all chips. Examples include turning on Bluetooth or opening car windows. The system settings interface can implement the first control using either a default or non-default method. The non-default method can be an abstract method.

[0040] S3, determine the second control based on the target variable, the second control is a control method that is differentiated for each chip.

[0041] Understandably, each chip model corresponds one-to-one with the target variable. Based on the value of the target variable, the chip type of the current target device can be determined, thereby determining the differentiated control methods between each chip.

[0042] S4 controls the target device based on the first and second controls.

[0043] By implementing the same and different control methods between various chips using default and / or non-default methods, the target device can be controlled.

[0044] It should be noted that target device information can be obtained directly or indirectly from some classes.

[0045] For example, in some embodiments of this application, obtaining target device information includes: obtaining target device information according to a build configuration class; the build configuration class determines the target device information through build configuration fields provided by the build tool, and the build configuration fields include the target device information.

[0046] The target device information is set in the build configuration fields before using the target device's control methods. When using the target device's control methods, the build configuration class determines the target device information through the build configuration fields provided by the build tool. For example, the build tool can be any of the following: Maven (an automated build tool based on the project object model, primarily used for building, dependency management, and project information management of Java projects), Gradle (a powerful automated build tool widely used for Java, Android projects, and other JVM-based development; it's not just a build tool, but also a Groovy-based domain-specific language (DSL) build system that allows developers to manage the project's build process, dependency management, and task execution through scripting), and Ant (a Java-based build tool primarily used to automate the Java project build process; it defines the project's build steps, goals, and tasks through XML-formatted build files).

[0047] Furthermore, in some embodiments of this application, the build configuration class is determined by the build configuration fields provided by the build tool. The build configuration fields include target device information, including: configuring the build configuration fields in the build configuration file script, and the build tool constructing the build configuration fields into the build configuration class; the implementation language of the build configuration file script is different from the implementation language of the build configuration class.

[0048] For example, you can pre-configure the build configuration fields in the configuration file script based on the target device's model. When using the target device's control methods, the build tool automatically adds the target device information from the build configuration fields to the build configuration class. This way, when using the target device's control methods, you can retrieve the target device information by calling the build configuration class. The configuration file script can be written in Python, and the build configuration class can be written in Java.

[0049] It is understood that the control methods for the target device include physical button control and voice control, etc. No specific control method is specified here.

[0050] In some embodiments of this application, the voice control method of the target device is used as an example for illustration. Determining the second control based on the target variable includes: creating a target instance in the first instance based on the reflection of the target variable. The target instance includes the relevant methods of the second control. The first instance includes the control instances of each chip. The target instance is determined based on the semantics of the voice control.

[0051] Reflection refers to the dynamic loading and acquisition of detailed information about a class at runtime, thereby enabling manipulation of the class's or object's properties and methods.

[0052] The target instance in the first embodiment can be dynamically created based on the target variable and by utilizing reflection during the execution of the voice control method for the target device.

[0053] Optionally, in some embodiments of this application, voice control of the target device based on the first control and the second control includes: inheriting the capabilities of the first control from the system settings interface based on the target instance, and calling the relevant methods of the second control to open the target API of the target device for voice control; the target API is determined according to the semantics of the voice control.

[0054] It is understandable that if the system settings interface can implement the first control in the default way, then the capabilities of the first control can be inherited from the system settings interface based on the target implementation, for example, by using the keyword extends; and by calling the relevant methods of the second control, the target API (Application Programming Interface) of the target device can be opened to realize voice control of the target device.

[0055] It should be noted that system settings classes can be in multi-instance mode or other modes.

[0056] Furthermore, in some embodiments of this application, the system settings class is a singleton, ensuring that only one instance of the system settings class runs on a single process. It should be noted that the system settings class is responsible for creating its own unique instance, and this instance is globally accessible. In this way, by running only one system settings class on a single process, the computational cost of the system can be reduced.

[0057] Optionally, in some embodiments of this application, the system settings class serves as a proxy class for the target object, and the target object corresponds to the control instance of each chip. Since the system settings class acts as a proxy for the target object, functions such as access, functional enhancement, and protection can be implemented through the system settings class.

[0058] It's important to note that proxy is a software structural design pattern. By setting a system configuration class as a proxy class for a target object, the system configuration class can control access to, invocation of, and control of the target object, as well as enhance its functionality, thereby protecting the target object. For example, the system configuration class can identify and invoke the control instance within the target object, and implement corresponding controls based on that control instance.

[0059] Optionally, in some embodiments of this application, a system settings class is created when the target device is controlled for the first time.

[0060] The first time the target device is controlled can refer to the first time it is controlled after the target device is started, such as the first start of a new energy electric vehicle or the first start of a mobile phone. In other words, the system settings class will be dynamically created as the target device is started multiple times.

[0061] To facilitate understanding, this application also proposes a specific application scenario: controlling a vehicle's Bluetooth via voice. Figure 2 A schematic diagram of the modeling of a control method for a target device in one application scenario of this application is shown. Figure 3 A timing diagram of a control method for a target device in one application scenario of this application is shown.

[0062] refer to Figure 2 and Figure 3 As shown, in a certain vehicle system, to enable Bluetooth, the user needs to perform the following steps:

[0063] S10, when controlling the target device for the first time, create an instance of the system settings class.

[0064] For example, when a user first clicks the Bluetooth switch, an instance of the SystemSettings class is created.

[0065] S20, Obtain target device information.

[0066] The target device can be a vehicle, and the target device information can be vehicle model information.

[0067] S30, determine the target variable in the system setting class based on the target device information. The system setting class is used to implement the system setting interface, which is used to implement the first control. The first control is the same control method for all chips.

[0068] The target variable can be the value of `mRealSystemSettings`. The target device information (model A) can be determined by building the configuration class (`BuildConfig`), and based on this information, the value of `mRealSystemSettings` in the system settings class can be set to `ASystemSettingsImpl`. The system settings class declares its use of the system settings interface (`ISystemSettings` interface) using the `implements` keyword. The system settings interface defines the system settings functionality and provides default implementations for common control methods across various chips. For example, the system settings interface provides a default implementation for the common code section for enabling Bluetooth. It should be noted that the system settings class can be a proxy class for system settings functionality.

[0069] S40, create a target instance in the first instance based on the reflection of the target variable. The target instance includes the second control. The first instance includes control instances of each chip. The target instance is determined based on the semantics of the voice control.

[0070] The semantics of voice control could be turning on Bluetooth. The first instance includes two instances, ASystemSettingsImpl and BSystemSettingsImpl, and the target instance can be the ASystemSettingsImpl instance. The BSystemSettingsImpl instance corresponds to vehicle model B. Therefore, an ASystemSettingsImpl instance is created via reflection based on the target variable ASystemSettingsImpl.

[0071] S50 inherits the first control capability from the system settings interface based on the target instance, and calls the relevant methods of the second control to open the target API of the target device for voice control; the target API is determined according to the semantics of the voice control.

[0072] The second control method can be a method related to the differentiated code for enabling Bluetooth, such as the `turnOnBluetooth()` method. The `ASystemSettingsImpl` instance inherits the ability to enable Bluetooth from the `ISystemSettings` interface by implementing the same code segment, and calls the `turnOnBluetooth()` method within the `ASystemSettingsImpl` instance to invoke the system platform to enable Bluetooth.

[0073] It should be noted that the above mRealSystemSettings can be member variables. Member variables are defined inside the class and are used to store the state of an object. They are also often called fields or properties.

[0074] In summary, in this embodiment, by utilizing the polymorphism feature of the Java language and defining interfaces and implementation classes, a single codebase is made compatible with different hardware platforms and system versions. By using reflection and configuration of construction fields, instances of interface implementation classes for specific platforms are dynamically created at runtime, thereby enabling platform-specific handling of software functions. Furthermore, by utilizing singleton and proxy design patterns, the function of dynamically executing platform-specific differentiated code at runtime is achieved.

[0075] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an in-vehicle terminal provided in one embodiment of this application. Figure 4A schematic diagram of a computer system suitable for implementing the vehicle-mounted terminal of this application is shown. It should be noted that... Figure 4 The computer system 500 of the vehicle terminal shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0076] like Figure 4 As shown, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 502 or programs loaded from storage portion 508 into Random Access Memory (RAM) 503. The RAM 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An Input / Output (I / O) interface 505 is also connected to the bus 504.

[0077] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. Removable media 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 510 as needed so that computer programs read from them can be installed into storage section 508 as needed.

[0078] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs various functions defined in the system of this application.

[0079] It should be noted that the processor of the vehicle terminal may include CPU 501, and the storage device may include at least one of ROM 502, RAM 503, and storage section 508. The bus 504, I / O interface 505, input section 506, output section 507, communication section 509, driver 510, and removable medium 511 are optional or can be replaced.

[0080] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer's processor, causes the computer to perform the control method for the target device as described above. This computer-readable storage medium may be included in the vehicle-mounted terminal described in the above embodiments, or it may exist independently and not be installed in the vehicle-mounted terminal.

[0081] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0082] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0083] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0084] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A control method for a target device, characterized in that, The method, applicable to various types of chips, includes: Obtain target device information; The target variable in the system setting class is determined based on the target device information. The system setting class is used to implement the system setting interface. The system setting interface is used to implement the first control. The first control is the same control method for each chip. A second control is determined based on the target variable, and the second control is a differentiated control method for each chip. The target device is controlled based on the first control and the second control.

2. The control method according to claim 1, characterized in that, The acquisition of target device information includes: The target device information is obtained based on the configuration class. The build configuration class determines the target device information through the build configuration fields provided by the build tool, and the build configuration fields include the target device information.

3. The control method according to claim 1, characterized in that, The control method includes a voice control method, and determining the second control based on the target variable includes: The target instance in the first instance is created by reflection based on the target variable, and the target instance includes the second control. The first instance includes control instances of each chip, and the target instance is determined based on the semantics of voice control.

4. The control method according to claim 3, characterized in that, The voice control of the target device based on the first control and the second control includes: Based on the target instance inheriting the capabilities of the first control from the system settings interface, and calling the relevant methods of the second control, the target API of the target device is opened to perform voice control on the target device; The target API is determined based on the semantics of voice control.

5. The control method according to claim 2, characterized in that, The build configuration class is determined by the build configuration fields provided by the build tool, and the build configuration fields include the target device information, including: The build configuration field is configured in the build configuration file script, and the build tool builds the build configuration field into the build configuration class. The implementation language of the build configuration file script is different from the implementation language of the build configuration class.

6. The control method according to any one of claims 1 to 5, characterized in that, The system settings class is a singleton, so that only one instance of the system settings class runs in a single process.

7. The control method according to any one of claims 1 to 5, characterized in that, The system settings class is a proxy class for the target object, and the target object corresponds to the control instance of each chip.

8. The control method according to any one of claims 1 to 5, characterized in that, Also includes: When the target device is controlled for the first time, the system settings class is created.

9. A vehicle-mounted terminal, characterized in that, include: one or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the vehicle terminal to implement the control method of the target device as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by a computer's processor, cause the computer to perform the control method for the target device according to any one of claims 1 to 8.