CN113076119A - Vehicle machine program updating method, device, medium and electronic equipment - Google Patents

Vehicle machine program updating method, device, medium and electronic equipment Download PDF

Info

Publication number
CN113076119A
CN113076119A CN202110320864.1A CN202110320864A CN113076119A CN 113076119 A CN113076119 A CN 113076119A CN 202110320864 A CN202110320864 A CN 202110320864A CN 113076119 A CN113076119 A CN 113076119A
Authority
CN
China
Prior art keywords
signal
bytecode
class
callback
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110320864.1A
Other languages
Chinese (zh)
Other versions
CN113076119B (en
Inventor
刘海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing CHJ Automotive Information Technology Co Ltd
Original Assignee
Beijing CHJ Automotive Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing CHJ Automotive Information Technology Co Ltd filed Critical Beijing CHJ Automotive Information Technology Co Ltd
Priority to CN202110320864.1A priority Critical patent/CN113076119B/en
Publication of CN113076119A publication Critical patent/CN113076119A/en
Application granted granted Critical
Publication of CN113076119B publication Critical patent/CN113076119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a vehicle-mounted machine program updating method, device, medium and electronic equipment. The method and the device generate the byte codes of the signal callback class and the task class for responding the target signal by configuring the update information, thereby completing the dynamic update of the car machine program, improving the flexibility of the execution system, simplifying the processing process of complex logic and improving the system maintenance efficiency.

Description

Vehicle machine program updating method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a method, an apparatus, a medium, and an electronic device for updating a car-in-vehicle program.
Background
An Android machine system (Android auto, english) is an operating system for an intelligent automobile platform.
Currently, in a car machine system, a processing method for a Controller Area Network (CAN) signal is as follows: and setting a CAN signal to be monitored, and executing an action of responding to the CAN signal after monitoring the CAN signal. The method is stored in a byte code file, the byte code file is compiled to generate an executable file, and the executable file is loaded into a vehicle machine. At this time, the CAN signal and the execution action form a fixed relationship. For example, the fixed relationship is: when the CAN signal is a vehicle door opening signal, the vehicle-mounted device reminds passengers in the vehicle through sound. If the fixed relationship needs to be changed, for example, the new fixed relationship is: when the CAN signal is a door opening signal, the car machine reminds passengers in the car through lamplight, the byte code file needs to be rewritten, a new executable file is generated after the byte code file is compiled, and the new executable file is loaded into the car machine. The method solidifies the relation between the CAN signal and the execution action, and reduces the flexibility of the execution system.
Disclosure of Invention
An object of the present disclosure is to provide a method, an apparatus, a medium, and an electronic device for updating a car-in-vehicle program, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific implementation manner of the present disclosure, in a first aspect, the present disclosure provides an in-vehicle program updating method, including:
acquiring first configuration update information and second configuration update information related to a target signal;
generating a bytecode for a signal-callback class in response to the target signal based on the first configuration update information, the bytecode of the signal-callback class including a bytecode of an output parameter;
generating a bytecode for a task method in a task class based on the second configuration update information and the output parameter, the task class being associated with the signal callback class.
In the byte code of the task method, a byte code for establishing a control class is generated based on a target signal name of the target signal and a class name of the signal callback class, and information represented by the byte code of the control class comprises a trigger for calling the signal callback class based on the target signal.
Optionally, the first configuration update information includes a target signal name and a logical field corresponding to the target signal;
generating, based on the first configuration update information, a bytecode for responding to a signal callback class of the target signal, including:
acquiring signal parameters related to the target signal name;
generating a classification logic bytecode based on the logic field and the signal parameter, the classification logic bytecode representing logic including classifying values of the signal parameter and generating values of a classification result parameter;
generating the bytecode of the signal callback class based on the classified logic bytecode, wherein an input parameter of a callback method in the signal callback class is the signal parameter, and an output parameter of the callback method is the classification result parameter.
Optionally, the second configuration update information includes response logic template information and action information related to the target signal;
generating the bytecode of the task method in the task class based on the second configuration update information and the output parameter includes:
determining the value of the output parameter as the value of the input parameter of the task method;
generating a response logical bytecode based on the response logical template information and the input parameter, the logic represented by the response logical bytecode including response logic that determines whether the value of the input parameter satisfies the representation of the response logical template information;
acquiring an action byte code corresponding to the action information;
in the bytecode of the task method, an execution logical bytecode is generated based on the response logical bytecode and the action bytecode, and the information represented by the execution logical bytecode includes an action represented by the action bytecode to be executed when the value of the input parameter satisfies the response logic.
Optionally, the value of the classification result parameter is stored in a cache, so that the task method calls the value in the cache as the value of the input parameter.
Optionally, in the byte code of the task method, generating a byte code for establishing a control class based on a target signal name of the target signal and a class name of the signal callback class includes:
acquiring interface information of vehicle signal service under an assembly frame;
generating a bytecode registered to the vehicle signal service using the interface information, the target signal name, and the class name in a bytecode of the task method to establish the control class.
Optionally, the method further includes:
and compiling the byte codes of the signal callback class and the byte codes of the task class to generate an executable program.
Optionally, the target signal includes a controller area network signal.
According to a specific embodiment of the present disclosure, in a second aspect, the present disclosure provides an updating apparatus for a car-in-machine program, including:
an acquisition unit configured to acquire first configuration update information and second configuration update information related to a target signal;
a first generating unit configured to generate a bytecode of a signal-callback class for responding to the target signal based on the first configuration update information, the bytecode of the signal-callback class including a bytecode of an output parameter;
a second generating unit, configured to generate a bytecode of a task method in a task class based on the second configuration update information and the output parameter, where the task class is associated with the signal callback class, a bytecode of the task method includes a bytecode for creating a control class based on a target signal name of the target signal and a class name of the signal callback class, and information represented by the bytecode of the control class includes a trigger call to the signal callback class based on the target signal;
and the establishing unit is used for generating a bytecode for establishing a control class based on a target signal name of the target signal and a class name of the signal callback class in the bytecode of the task method, wherein information represented by the bytecode of the control class comprises calling the signal callback class based on the triggering of the target signal.
Optionally, the first generating unit includes:
the first acquisition subunit is used for acquiring signal parameters related to the target signal name;
a first generating subunit, configured to generate a classification logical bytecode based on the logical field and the signal parameter, where the logic represented by the classification logical bytecode includes classifying values of the signal parameter and generating a value of a classification result parameter;
and the second generating subunit is configured to generate the bytecode of the signal callback class based on the classification logic bytecode, where an input parameter of the callback method in the signal callback class is the signal parameter, and an output parameter of the callback method is the classification result parameter.
Optionally, the second configuration update information includes response logic template information and action information related to the target signal;
the second generation unit includes:
an input determining subunit, configured to determine that the value of the output parameter is a value of an input parameter of the task method;
a third generating subunit, configured to generate a response logical bytecode based on the response logical template information and the input parameter, where the logic represented by the response logical bytecode includes response logic that determines whether the value of the input parameter satisfies the representation of the response logical template information;
the second acquiring subunit is used for acquiring the action byte code corresponding to the action information;
a fourth generating subunit, configured to generate, in the bytecode of the task method, an execution logical bytecode based on the response logical bytecode and the action bytecode, where information represented by the execution logical bytecode includes an action represented by the action bytecode, which is executed when the value of the input parameter satisfies the response logic.
Optionally, the value of the classification result parameter is stored in a cache, so that the task method calls the value in the cache as the value of the input parameter.
Optionally, the establishing unit includes:
the third acquisition subunit is used for acquiring interface information of vehicle signal service under the assembly frame;
and the establishing subunit is used for generating the bytecode registered in the vehicle signal service by using the interface information, the target signal name and the class name in the bytecode of the task method so as to establish the control class.
Optionally, the apparatus further comprises:
and the compiling unit is used for compiling the byte codes of the signal callback class and the byte codes of the task class to generate an executable program.
Optionally, the target signal includes a controller area network signal.
According to a third aspect, the present disclosure provides a computer-readable storage medium, in which an update method including the car machine program according to the first aspect is stored.
According to a fourth aspect thereof, the present disclosure provides an electronic device, comprising: one or more controllers; a storage device, configured to store an update method including the car machine program according to the first aspect, where instructions in the method are executed by the at least one controller.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects:
the method and the device generate the byte codes of the signal callback class and the task class for responding the target signal by configuring the update information, thereby completing the dynamic update of the car machine program, improving the flexibility of the execution system, simplifying the processing process of complex logic and improving the system maintenance efficiency.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the drawings:
fig. 1 shows a flowchart of an update method of a car machine program according to an embodiment of the present disclosure;
fig. 2 shows a block diagram of elements of an update apparatus of a car-in-machine program according to an embodiment of the present disclosure;
fig. 3 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The first embodiment provided by the present disclosure, that is, the embodiment of the method for updating the car machine program.
The embodiments of the present disclosure are described in detail below with reference to fig. 1.
Step S101, acquiring first configuration update information and second configuration update information related to the target signal.
In the in-vehicle system, the configuration update information is generally generated at the cloud and sent to the in-vehicle system. Therefore, configuration work is completely separated from the constraint of the vehicle machine system, the flexibility of generating configuration updating information is improved, and meanwhile, the configuration work efficiency can be improved by the aid of various configuration tools rich in cloud.
After obtaining the signal in the car machine program, the car machine program is often used for triggering corresponding operation through a logic judgment result of a signal value, for example, after obtaining a car door opening signal, a passenger in the car is reminded through a long tone; after the door closing signal is obtained, the passengers in the vehicle are reminded through the three-tone short sound. The target signal triggering the corresponding operation may be one signal or a plurality of signals. Such signals are in a monitored state in the process generated by the car machine program. And the target signal is a signal that requires a change in the logic determination condition and/or a corresponding operation. For example, in a car-in-vehicle system, the target signal includes a CAN signal.
Step S102, generating byte codes of signal callback classes for responding to the target signals based on the first configuration updating information.
An assembly (asm for short) framework is a universal Java byte code operation and analysis framework. Under the asm framework, the signal callback class and the task class have an endogenous incidence relation. A callback is a function that passes as a parameter to another function and executes after its parent is completed. The signal callback class includes a callback function. In the JAVA language, a reference to an object created by a class implementing an interface is given to an interface variable declared by the interface, and the interface variable can call a method of the interface implemented by the class. The realization principle of the callback is as follows: firstly, a callback class is created, then a control class is created, and the method of the callback class needing to be called is informed to the control class. The control class is responsible for checking whether a certain scene appears or whether a certain condition is met; when the scene appears or the condition is satisfied, a callback-like method is automatically called. In the embodiment of the present disclosure, the scene is a target signal reporting signal parameter. The signal-echo classes are associated with the target signals, i.e. there is a corresponding signal-echo class for each target signal. The task class has an inherent association with the signal-callback class, i.e. the values of the input parameters of the task class comprise at least the values of the output parameters of the signal-callback class. Typically, the bytecode is stored in a bytecode file, e.g.,. class bytecode file. Therefore, the byte code of the signal callback class in the embodiment of the present disclosure includes the byte code of the output parameter.
In an embodiment of the present disclosure, the first configuration update information includes a target signal name and a logical field corresponding to the target signal.
Specifically, the generating of the bytecode for responding to the signal callback class of the target signal based on the configuration update information includes the following steps:
and step S102-1, acquiring signal parameters related to the target signal name.
And reporting the signal parameters of each target signal according to a preset data structure. For example, the CAN signal reports the signal parameters in a carpproperty data structure.
Step S102-2, generating a classification logic byte code based on the logic field and the signal parameter.
The logic represented by the classification logic bytecode includes classifying values of the signal parameters and generating values of classification result parameters.
According to the embodiment of the disclosure, the logic fields comprise signal expectation threshold fields and logic operators, and under the asm framework, the signal callback class generates classification logic byte codes through signal parameters, the signal expectation threshold fields and the logic operators. For example, if the target signal is a temperature signal, the logical operator is "e", the signal expectation threshold field of the temperature signal is: the classification result values corresponding to logic operators and signal expected thresholds are as follows, wherein the classification result values are '0-10 ℃', '11-20 ℃' and '21-30 ℃': 0 (representing low temperature), 1 (representing moderate temperature) and 2 (representing high temperature), when the reported temperature signal value is 16 ℃, and the temperature signal value belongs to the expected threshold value 11-20 ℃ represented by the signal expected threshold value field, the corresponding classification result parameter value is 1; if the target signal is a door signal, the logical operator is: "═ and" > ", the desired threshold for the door signal is: 0, the classification result values corresponding to the logical operator and the signal expectation threshold are: 0 (door closing) and 1 (door opening), when the reported door signal value is 20 amperes, the door signal value is greater than the signal expected threshold value 0, and the classification result parameter value is 1. And the value of the classification result parameter is stored in a cache, so that the task method calls the value in the cache as the value of the input parameter. The parameter of the result of the classification is defined in the bytecode of the callback class by using a cache instruction code, for example, the cache instruction code is "static" in JAVA.
Step S102-3, generating the byte code of the signal callback class based on the classification logic byte code.
Wherein, the input parameter of the callback method in the signal callback class is the signal parameter, and the output parameter of the callback method is the classification result parameter.
In an embodiment of the present disclosure, the second configuration update information includes response logic template information and action information related to the target signal.
Step S103, generating a bytecode of a task method in a task class based on the second configuration update information and the output parameter, where the task class is associated with the signal callback class.
Specifically, the generating the bytecode for responding to the task class of the target signal based on the configuration updating information includes the following steps:
and step S103-1, determining the value of the output parameter as the value of the input parameter of the task method.
And step S103-2, generating a response logic byte code based on the response logic template information and the input parameters.
Responding to the logical template information, including: information related to the target signal, logical operators, and expected response thresholds.
The logic represented by the response logic bytecode includes response logic that determines whether the value of the input parameter satisfies the representation by the response logic template information. It is understood that the value of the input parameter is also the value of the output parameter of the callback method in the signal callback class corresponding to the target signal.
For example, continuing the above example, the temporary parameter name "a 1" represents the value of the input parameter of the door signal, the temporary parameter name "A3" represents the value of the input parameter of the temperature signal, and the response logic template information is: "if (a1 ═ 1) and (A3> 1)"; the logical operator "=" means equal to, the logical operator "and" means logical and, the logical operator ">" means greater than; the first input parameter of the task method in the task class represents the input parameter of the vehicle door signal, the parameter name of the input parameter is named as 'men', the third input parameter represents the input parameter of the temperature signal, and the parameter name of the input parameter is named as 'wendu'; the temporary parameter name of the corresponding position in the response logic template information is replaced by the parameter name, and the generated response logic bytecode is "if (men ═ 1) and (wendu > 1)" which indicates that the vehicle door is open and the temperature is moderate or high.
Optionally, the values of the input parameters of the task methods in the task class include values of output parameters of signal callback classes of all signals. Because the number of signals in the car machine is fixed, the number of input parameters of the task method is fixed, and the arrangement positions of the input parameters can also be fixed, the parameter names of the input parameters at corresponding positions are found from the input parameters by responding to the parameter position information in the temporary parameter names in the logic template information, and the temporary parameter names in the response logic template information are replaced by the parameter names to generate response logic byte codes. For example, continuing the above example, a "1" in the temporary parameter name "A1" indicates that the input parameter is arranged in the first position.
And step S103-3, acquiring the action byte code corresponding to the action information.
Step S103-4, in the byte codes of the task method, generating an execution logic byte code based on the response logic byte code and the action byte code.
The information represented by the execution logic bytecode includes an action represented by the action bytecode, which is executed when the value of the input parameter satisfies the response logic. For example, continuing the above example, the action bytecode is "beep (10)", indicating beeping for 10 seconds; the generated execution logic bytecode is: "if (men ═ 1) and (wendu >1) beep (10)".
And step S104, generating a byte code for establishing a control class based on the target signal name of the target signal and the class name of the signal callback class in the byte code of the task method.
The information represented by the bytecode of the control class includes invoking the signal callback class based on the triggering of the target signal.
That is, the control class in the callback mechanism.
Specifically, in the bytecode for the task method of the task class, generating a bytecode for establishing a control class based on a target signal name of the target signal and a class name of the signal callback class includes:
and step S104-1, acquiring interface information of the vehicle signal service under the assembly frame.
And step S104-2, generating the byte code registered in the vehicle signal service by using the interface information, the target signal name and the class name in the byte code of the task method so as to establish the control class.
The method comprises the steps that a vehicle signal service (namely CarService) is included under an asm frame, in the task method, a CarService interface is obtained, a signal name and a class name of a corresponding signal callback class are registered in the CarService, and the CarService can establish a control class for controlling the signal callback class.
The method further comprises the steps of:
and step S111, compiling the byte codes of the signal callback class and the byte codes of the task class to generate an executable program.
When the byte code of the semaphore callback class and the byte code of the task class are saved in the class byte code file, a dex file (i.e., an executable program) can be generated based on the class byte code file by compiling.
And the dex file generates an auxiliary process, the main process calls a signal callback Class and a task Class by using a Class static Class in a reflection mode, obtains an example of the signal callback Class by using a Class static method newInstance, and adds the example into a monitoring execution list. Therefore, the target signal is monitored.
According to the embodiment of the disclosure, the byte code of the signal callback class and the byte code of the task class for responding to the target signal are generated by configuring the update information, so that the dynamic update of the car machine program is completed, the flexibility of the execution system is improved, the processing process of complex logic is simplified, and the system maintenance efficiency is improved.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, that is, an updating apparatus for a car machine program. Since the second embodiment is basically similar to the first embodiment, the description is simple, and the relevant portions should be referred to the corresponding description of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 2 shows an embodiment of an updating apparatus for a car-in-vehicle program provided by the present disclosure.
As shown in fig. 2, the present disclosure provides an in-vehicle program updating apparatus 200, including:
an obtaining unit 201, configured to obtain first configuration update information and second configuration update information related to a target signal;
a first generating unit 202, configured to generate a bytecode of a signal callback class for responding to the target signal based on the first configuration update information, where the bytecode of the signal callback class includes a bytecode of an output parameter;
a second generating unit 203, configured to generate, based on the second configuration update information and the output parameter, a bytecode of a task method in a task class, where the task class is associated with the signal callback class, a bytecode of creating a control class is generated based on a target signal name of the target signal and a class name of the signal callback class in the bytecode of the task method, and information represented by the bytecode of the control class includes invoking the signal callback class based on a trigger of the target signal;
a creating unit 204, configured to generate, in the bytecode of the task method, a bytecode for creating a control class based on a target signal name of the target signal and a class name of the signal callback class, where information represented by the bytecode of the control class includes invoking the signal callback class based on a trigger of the target signal.
Optionally, the first generating unit 202 includes:
the first acquisition subunit is used for acquiring signal parameters related to the target signal name;
a first generating subunit, configured to generate a classification logical bytecode based on the logical field and the signal parameter, where the logic represented by the classification logical bytecode includes classifying values of the signal parameter and generating a value of a classification result parameter;
and the second generating subunit is configured to generate the bytecode of the signal callback class based on the classification logic bytecode, where an input parameter of the callback method in the signal callback class is the signal parameter, and an output parameter of the callback method is the classification result parameter.
Optionally, the second configuration update information includes response logic template information and action information related to the target signal;
the second generating unit 203 includes:
an input determining subunit, configured to determine that the value of the output parameter is a value of an input parameter of the task method;
a third generating subunit, configured to generate a response logical bytecode based on the response logical template information and the input parameter, where the logic represented by the response logical bytecode includes response logic that determines whether the value of the input parameter satisfies the representation of the response logical template information;
the second acquiring subunit is used for acquiring the action byte code corresponding to the action information;
a fourth generating subunit, configured to generate, in the bytecode of the task method, an execution logical bytecode based on the response logical bytecode and the action bytecode, where information represented by the execution logical bytecode includes an action represented by the action bytecode, which is executed when the value of the input parameter satisfies the response logic.
Optionally, the value of the classification result parameter is stored in a cache, so that the task method calls the value in the cache as the value of the input parameter.
Optionally, the establishing unit 204 includes:
the third acquisition subunit is used for acquiring interface information of vehicle signal service under the assembly frame;
and the establishing subunit is used for generating the bytecode registered in the vehicle signal service by using the interface information, the target signal name and the class name in the bytecode of the task method so as to establish the control class.
Optionally, the apparatus further comprises:
and the compiling unit is used for compiling the byte codes of the signal callback class and the byte codes of the task class to generate an executable program.
Optionally, the target signal includes a controller area network signal.
According to the embodiment of the disclosure, the byte code of the signal callback class and the byte code of the task class for responding to the target signal are generated by configuring the update information, so that the dynamic update of the car machine program is completed, the flexibility of the execution system is improved, the processing process of complex logic is simplified, and the system maintenance efficiency is improved.
The present disclosure provides a third embodiment, that is, an electronic device, including: at least one controller; and a memory communicatively coupled to the at least one controller; wherein the content of the first and second substances,
the storage device is configured to store an update method including the car machine program according to the first embodiment, and instructions in the method are executed by the at least one controller.
The embodiment of the present disclosure provides a fourth embodiment, that is, a computer storage medium, where the computer storage medium stores an update method including the car machine program according to the first embodiment.
Referring now to FIG. 3, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device may include a processing device (e.g., a central controller, a graphics controller, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (16)

1. An updating method of a vehicle program is characterized by comprising the following steps:
acquiring first configuration update information and second configuration update information related to a target signal;
generating a bytecode for a signal-callback class in response to the target signal based on the first configuration update information, the bytecode of the signal-callback class including a bytecode of an output parameter;
generating a bytecode for a task method in a task class based on the second configuration update information and the output parameter, the task class being associated with the signal callback class.
In the byte code of the task method, a byte code for establishing a control class is generated based on a target signal name of the target signal and a class name of the signal callback class, and information represented by the byte code of the control class comprises a trigger for calling the signal callback class based on the target signal.
2. The method of claim 1,
the first configuration update information comprises a target signal name and a logical field corresponding to the target signal;
generating, based on the first configuration update information, a bytecode for responding to a signal callback class of the target signal, including:
acquiring signal parameters related to the target signal name;
generating a classification logic bytecode based on the logic field and the signal parameter, the classification logic bytecode representing logic including classifying values of the signal parameter and generating values of a classification result parameter;
generating the bytecode of the signal callback class based on the classified logic bytecode, wherein an input parameter of a callback method in the signal callback class is the signal parameter, and an output parameter of the callback method is the classification result parameter.
3. The method of claim 1,
the second configuration update information comprises response logic template information and action information associated with the target signal;
generating the bytecode of the task method in the task class based on the second configuration update information and the output parameter includes:
determining the value of the output parameter as the value of the input parameter of the task method;
generating a response logical bytecode based on the response logical template information and the input parameter, the logic represented by the response logical bytecode including response logic that determines whether the value of the input parameter satisfies the representation of the response logical template information;
acquiring an action byte code corresponding to the action information;
in the bytecode of the task method, an execution logical bytecode is generated based on the response logical bytecode and the action bytecode, and the information represented by the execution logical bytecode includes an action represented by the action bytecode to be executed when the value of the input parameter satisfies the response logic.
4. The method of claim 2, wherein the value of the classification result parameter is stored in a cache, such that the task method calls the value in the cache as the value of the input parameter.
5. The method as claimed in claim 1, wherein the generating, in the byte code of the task method, a byte code for establishing a control class based on a target signal name of the target signal and a class name of the signal callback class comprises:
acquiring interface information of vehicle signal service under an assembly frame;
generating a bytecode registered to the vehicle signal service using the interface information, the target signal name, and the class name in a bytecode of the task method to establish the control class.
6. The method of claim 1, further comprising:
and compiling the byte codes of the signal callback class and the byte codes of the task class to generate an executable program.
7. The method of claim 1, wherein the target signal comprises a controller area network signal.
8. The utility model provides an updating device of car machine program which characterized in that includes:
an acquisition unit configured to acquire first configuration update information and second configuration update information related to a target signal;
a first generating unit configured to generate a bytecode of a signal-callback class for responding to the target signal based on the first configuration update information, the bytecode of the signal-callback class including a bytecode of an output parameter;
a second generating unit, configured to generate a bytecode of a task method in a task class based on the second configuration update information and the output parameter, where the task class is associated with the signal callback class, a bytecode of the task method includes a bytecode for creating a control class based on a target signal name of the target signal and a class name of the signal callback class, and information represented by the bytecode of the control class includes a trigger call to the signal callback class based on the target signal;
and the establishing unit is used for generating a bytecode for establishing a control class based on a target signal name of the target signal and a class name of the signal callback class in the bytecode of the task method, wherein information represented by the bytecode of the control class comprises calling the signal callback class based on the triggering of the target signal.
9. The apparatus of claim 8,
the first configuration update information comprises a target signal name and a logical field corresponding to the target signal;
the first generation unit includes:
the first acquisition subunit is used for acquiring signal parameters related to the target signal name;
a first generating subunit, configured to generate a classification logical bytecode based on the logical field and the signal parameter, where the logic represented by the classification logical bytecode includes classifying values of the signal parameter and generating a value of a classification result parameter;
and the second generating subunit is configured to generate the bytecode of the signal callback class based on the classification logic bytecode, where an input parameter of the callback method in the signal callback class is the signal parameter, and an output parameter of the callback method is the classification result parameter.
10. The apparatus of claim 8,
the second configuration update information comprises response logic template information and action information associated with the target signal;
the second generation unit includes:
an input determining subunit, configured to determine that the value of the output parameter is a value of an input parameter of the task method;
a third generating subunit, configured to generate a response logical bytecode based on the response logical template information and the input parameter, where the logic represented by the response logical bytecode includes response logic that determines whether the value of the input parameter satisfies the representation of the response logical template information;
the second acquiring subunit is used for acquiring the action byte code corresponding to the action information;
a fourth generating subunit, configured to generate, in the bytecode of the task method, an execution logical bytecode based on the response logical bytecode and the action bytecode, where information represented by the execution logical bytecode includes an action represented by the action bytecode, which is executed when the value of the input parameter satisfies the response logic.
11. The apparatus of claim 9, wherein the value of the classification result parameter is stored in a cache, such that the task method calls the value in the cache as the value of the input parameter.
12. The apparatus of claim 8, wherein the establishing unit comprises:
the third acquisition subunit is used for acquiring interface information of vehicle signal service under the assembly frame;
and the establishing subunit is used for generating the bytecode registered in the vehicle signal service by using the interface information, the target signal name and the class name in the bytecode of the task method so as to establish the control class.
13. The apparatus of claim 8, further comprising:
and the compiling unit is used for compiling the byte codes of the signal callback class and the byte codes of the task class to generate an executable program.
14. The apparatus of claim 8, wherein the target signal comprises a controller area network signal.
15. A computer-readable storage medium, wherein the storage medium stores therein an update method including the in-vehicle program according to any one of claims 1 to 7.
16. An electronic device, comprising:
one or more controllers;
storage means for storing an update method comprising the car machine program according to any one of claims 1 to 7, wherein instructions of the method are executed by the at least one controller.
CN202110320864.1A 2021-03-25 2021-03-25 Updating method and device of vehicle-mounted program, medium and electronic equipment Active CN113076119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110320864.1A CN113076119B (en) 2021-03-25 2021-03-25 Updating method and device of vehicle-mounted program, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110320864.1A CN113076119B (en) 2021-03-25 2021-03-25 Updating method and device of vehicle-mounted program, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113076119A true CN113076119A (en) 2021-07-06
CN113076119B CN113076119B (en) 2023-12-12

Family

ID=76610317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110320864.1A Active CN113076119B (en) 2021-03-25 2021-03-25 Updating method and device of vehicle-mounted program, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113076119B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150268997A1 (en) * 2014-03-21 2015-09-24 Vjekoslav Svilan Managing dynamic capacitance using code scheduling
WO2017215088A1 (en) * 2016-06-15 2017-12-21 宇龙计算机通信科技(深圳)有限公司 Ota start-up acceleration method and system
CN108536589A (en) * 2018-03-26 2018-09-14 广州小鹏汽车科技有限公司 A kind of application program buries point methods and system
US20190265982A1 (en) * 2018-02-28 2019-08-29 Forcepoint Llc System and method for managing system configuration data models
CN111158690A (en) * 2020-01-02 2020-05-15 北京东土科技股份有限公司 Desktop application framework, construction method, desktop application running method and storage medium
WO2020173128A1 (en) * 2019-02-27 2020-09-03 平安科技(深圳)有限公司 Method and device for generating software development kit, and terminal device
CN111625225A (en) * 2020-05-28 2020-09-04 北京达佳互联信息技术有限公司 Program specified data output method and device
CN112135286A (en) * 2020-10-12 2020-12-25 四川长虹电器股份有限公司 Method and device for improving transmission efficiency based on Bluetooth firmware upgrading
CN112363755A (en) * 2020-11-20 2021-02-12 成都秦川物联网科技股份有限公司 Low-coupling expansion business system based on plug-in engine injection

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150268997A1 (en) * 2014-03-21 2015-09-24 Vjekoslav Svilan Managing dynamic capacitance using code scheduling
WO2017215088A1 (en) * 2016-06-15 2017-12-21 宇龙计算机通信科技(深圳)有限公司 Ota start-up acceleration method and system
US20190265982A1 (en) * 2018-02-28 2019-08-29 Forcepoint Llc System and method for managing system configuration data models
CN108536589A (en) * 2018-03-26 2018-09-14 广州小鹏汽车科技有限公司 A kind of application program buries point methods and system
WO2020173128A1 (en) * 2019-02-27 2020-09-03 平安科技(深圳)有限公司 Method and device for generating software development kit, and terminal device
CN111158690A (en) * 2020-01-02 2020-05-15 北京东土科技股份有限公司 Desktop application framework, construction method, desktop application running method and storage medium
CN111625225A (en) * 2020-05-28 2020-09-04 北京达佳互联信息技术有限公司 Program specified data output method and device
CN112135286A (en) * 2020-10-12 2020-12-25 四川长虹电器股份有限公司 Method and device for improving transmission efficiency based on Bluetooth firmware upgrading
CN112363755A (en) * 2020-11-20 2021-02-12 成都秦川物联网科技股份有限公司 Low-coupling expansion business system based on plug-in engine injection

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JOSEPH CHAN JOO KENG 等: "Graph-Aided Directed Testing of Android Applications for Checking Runtime Privacy Behaviours", 《2016 IEEE/ACM 11TH INTERNATIONAL WORKSHOP IN AUTOMATION OF SOFTWARE TEST》, pages 57 - 63 *
卢帅兵 等: "基于动态二进制翻译和插桩的函数调用跟踪", 《计算机研究与发展》, vol. 56, no. 2, pages 421 - 430 *
李俊晨: "基于Android平台的动态加载技术的研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, pages 138 - 704 *

Also Published As

Publication number Publication date
CN113076119B (en) 2023-12-12

Similar Documents

Publication Publication Date Title
US10229040B2 (en) Optimizing execution order of system interval dependent test cases
CN113485918B (en) Test method, test device, electronic equipment and storage medium
CN111177112A (en) Database blocking method and device based on operation and maintenance management system and electronic equipment
CN110753089A (en) Method, device, medium and electronic equipment for managing client
CN112328419A (en) Test case generation method and device for remote procedure call interface, storage medium and electronic equipment
CN110837334B (en) Method, device, terminal and storage medium for interactive control
CN113392018A (en) Traffic distribution method, traffic distribution device, storage medium, and electronic device
CN111312274B (en) Voice signal processing method, device, system, electronic device and storage medium
CN113076119B (en) Updating method and device of vehicle-mounted program, medium and electronic equipment
CN115470754A (en) Data analysis method and device, computer readable medium and electronic equipment
CN115600964A (en) Voice approval method and device and related equipment
CN111767062A (en) Application configuration data updating method, device, equipment and storage medium
CN113778850A (en) Data processing method and device, electronic equipment and computer readable medium
CN110843791B (en) Vehicle control method, device, storage medium and electronic equipment
CN111382057B (en) Test case generation method, test method and device, server and storage medium
CN113821245A (en) Differential upgrading method and device and vehicle lock
CN111382056B (en) Service testing method and device, server and storage medium
CN111309323A (en) Parameter initialization method and device and electronic equipment
CN112328341B (en) Model display method, device, electronic equipment and storage medium
CN116643835A (en) Scene script generation method and device, electronic equipment and storage medium
CN112070163B (en) Image segmentation model training and image segmentation method, device and equipment
CN116776396A (en) Data processing method, device, equipment, vehicle and storage medium
CN115440209A (en) Voice control method, device, equipment and computer readable storage medium
CN115471162A (en) Goods distribution method and device, electronic equipment and computer readable medium
CN113268392A (en) Video memory monitoring method and device, readable medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant