CN113608483A - Method for acquiring vehicle signal value, electronic equipment and electronic control unit - Google Patents

Method for acquiring vehicle signal value, electronic equipment and electronic control unit Download PDF

Info

Publication number
CN113608483A
CN113608483A CN202110931726.7A CN202110931726A CN113608483A CN 113608483 A CN113608483 A CN 113608483A CN 202110931726 A CN202110931726 A CN 202110931726A CN 113608483 A CN113608483 A CN 113608483A
Authority
CN
China
Prior art keywords
signal
request message
message
monitored
response message
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
CN202110931726.7A
Other languages
Chinese (zh)
Other versions
CN113608483B (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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202110931726.7A priority Critical patent/CN113608483B/en
Publication of CN113608483A publication Critical patent/CN113608483A/en
Application granted granted Critical
Publication of CN113608483B publication Critical patent/CN113608483B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Abstract

The application is suitable for the technical field of communication, and provides a method and a device for acquiring a vehicle signal value, electronic equipment and an electronic control unit, which can improve the efficiency of acquiring the vehicle signal value. The method comprises the following steps: sending a request message to a target ECU, wherein the request message comprises a request message identifier and a preset specified code, and the preset specified code is used for specifying a signal to be monitored; receiving a response message, wherein the response message is generated according to a message format corresponding to the request message identifier and a signal value after the target ECU obtains the signal value of the signal to be monitored, which is specified by a preset specified code; and analyzing the response message to obtain a signal value of the signal to be monitored.

Description

Method for acquiring vehicle signal value, electronic equipment and electronic control unit
Technical Field
The present application belongs to the field of electrical communication technologies, and in particular, to a method for obtaining a vehicle signal value, an electronic device, and an electronic control unit.
Background
Currently, the signal value refers to data generated by an Electronic Control Unit (ECU) communicating with a sensor and an actuator, and changes with time and working conditions. When the ECU receives the message, the ECU counts the number of signal values contained in the message, then sequentially acquires the latest data of the signal values, and then sends a response message through the bus, so that other equipment can acquire the latest data through the message.
At present, a single message of many ECUs contains values of a plurality of signals, the latest values of the plurality of signals are acquired before the message is sent, and then a response message is generated and sent, which can cause slow reply and untimely refresh. If only one or a plurality of values of the designated signal are acquired, the conventional ECU has low efficiency in a recovery mode.
Disclosure of Invention
The embodiment of the application provides a method and a device for acquiring a vehicle signal value, electronic equipment, an electronic control unit and a readable storage medium, which can solve the problem of low efficiency of acquiring the vehicle signal value in the prior art.
In a first aspect, an embodiment of the present application provides a method for acquiring a vehicle signal value, which is applied to an electronic device, and includes:
sending a request message to a target ECU, wherein the request message comprises a request message identifier and a preset appointed code, and the preset appointed code is used for appointing a signal to be monitored;
receiving a response message, wherein the response message is generated according to a message format corresponding to the request message identifier and the signal value after the target ECU obtains the signal value of the signal to be monitored, which is specified by the preset specified code;
and analyzing the response message to obtain the signal value of the signal to be monitored.
Further, each bit word in the preset designated code corresponds to a type of signal, and the word is used for designating whether the corresponding signal is a signal to be monitored based on the message format corresponding to the request message identifier.
Further, the sending the request message to the target ECU includes:
and sending the request message to an automobile bus, wherein the request message also comprises request identification information of the target ECU.
Further, the response message further includes reply identification information and a response message identification, and the response message identification corresponds to the request message identification;
analyzing the response message to obtain the signal value of the signal to be monitored, including:
judging whether the ECU corresponding to the reply identification information is the target ECU or not;
if yes, judging whether the response message identification corresponds to the request message identification;
and if so, acquiring the signal value from the response message.
In a second aspect, an embodiment of the present application provides a method for acquiring a vehicle signal value, which is applied to an ECU, and includes:
receiving a request message, wherein the request message comprises a request message identifier and a preset specified code, and the preset specified code is used for specifying a signal to be monitored;
determining a corresponding message format according to the request message identifier;
determining the signal to be monitored based on the message format and the preset specified code;
acquiring a signal value corresponding to the signal to be monitored;
generating a corresponding response message based on the message format and the signal value;
and sending the response message to the electronic equipment, wherein the electronic equipment is the equipment for sending the request message.
Further, the request message also includes request identification information of the target ECU;
before determining the corresponding message format according to the request message identifier, the method further includes:
judging whether the request identification information is the same as preset system identification information or not;
if yes, entering the step of determining the corresponding message format according to the request message identification.
Further, determining the signal to be monitored based on the message format and the preset specified code includes:
determining a type of signal corresponding to each digit character code in the preset appointed code based on the message format;
if the value of the character code is a first preset value, the corresponding signal is a signal to be monitored;
and if the value of the word code is the second preset value, the corresponding signal is a signal which is not to be monitored.
In a third aspect, an embodiment of the present application provides an apparatus for acquiring a vehicle signal value, which is applied to an electronic device, and includes:
the communication unit is used for sending a request message to a target ECU, wherein the request message comprises a request message identifier and a preset appointed code, and the preset appointed code is used for appointing a signal to be monitored;
the system comprises a target ECU, a request message identification and a monitoring module, wherein the target ECU is used for receiving a response message, and the response message is generated according to a message format corresponding to the request message identification and a signal value of the signal to be monitored, which is specified by the preset specified code, after the target ECU obtains the signal value;
and the analysis unit is used for analyzing the response message to obtain the signal value of the signal to be monitored.
In a fourth aspect, an embodiment of the present application provides an apparatus for acquiring a vehicle signal value, which is applied to an ECU, and includes:
the communication unit is used for receiving a request message, wherein the request message comprises a request message identifier and a preset appointed code, and the preset appointed code is used for appointing a signal to be monitored;
the electronic equipment is used for sending a response message to the electronic equipment, and the electronic equipment is used for sending the request message;
the processing unit is used for determining a corresponding message format according to the request message identifier;
the monitoring device is used for determining the signal to be monitored based on the message format and the preset specified code;
the signal value corresponding to the signal to be monitored is obtained;
and the message processing module is used for generating a corresponding response message based on the message format and the signal value.
In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor, when executing the computer program, implements the method according to any one of the above first aspects.
In a sixth aspect, an embodiment of the present application provides an electronic control unit, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method according to any one of the second aspects.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer readable storage medium stores a computer program which, when executed by a processor, implements the method as described in any one of the first or second aspects above.
In an eighth aspect, embodiments of the present application provide a computer program product, which, when run on an electronic device, causes the electronic device to perform the method of any one of the first aspect or the second aspect.
It is understood that the beneficial effects of the second aspect to the eighth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that:
the method comprises the steps that a request message is sent to a target ECU, wherein the request message comprises a request message identifier and a preset appointed code, and the preset appointed code is used for appointing a signal to be monitored; and receiving a response message, wherein the response message is generated according to the message format and the signal value corresponding to the request message identifier after the target ECU obtains the signal value of the signal to be monitored, which is specified by the preset specified code. According to the method and the device, the ECU can monitor the designated signal, only the signal value of the signal to be monitored is acquired, and when the ECU generates the response message, only the designated signal value of the signal to be monitored is filled, other signals are directly filled with preset values, the replying speed and the refreshing speed are improved, and the efficiency of acquiring the vehicle signal value is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating a method for obtaining vehicle signal values according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating a method for obtaining vehicle signal values according to another embodiment of the present application;
FIG. 4 is a schematic structural diagram of an apparatus for obtaining vehicle signal values according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of an apparatus for obtaining vehicle signal values according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic control unit according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application. Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application. The method provided by the embodiment of the application can be applied to an automobile electric control system and electronic equipment communicating with the automobile electric control system, as shown in fig. 1, the automobile electric control system comprises an on-board unit ECU10, a sensor 20, an actuator 30, a diagnosis interface 40, a bus 50 and the like, and an ECU10 is respectively connected with the sensor 20 and the actuator 30; the ECUs 10 and the ECU10 are connected to the diagnostic interface 40 via the bus 50, and the electronic device 60 is connected to the diagnostic interface 40 when a vehicle diagnosis is required.
The currently used bus 50 comprises a local interconnection protocol LIN and a controller area network CAN, and the developing automobile bus technology also comprises a high-speed fault-tolerant network protocol FlexRay, a MOST for automobile multimedia and navigation, and wireless network technologies such as Bluetooth and wireless local area network which are compatible with a computer network.
The ECU10 is a special microcomputer controller for automobile, and is composed of a processor, a memory, an input/output interface, a digital-to-analog converter, and a large-scale integrated circuit for shaping and driving. The ECU10 is used to comprehensively analyze and process the electric signals input by the sensors 20, the feedback electric signals of some actuators 30 and the signal values in the received messages, provide reference voltages for the sensors 20, and then output control signals to the actuators 30, so that the actuators 30 operate according to the requirements of the control purpose, and receive other ECUs. The sensor 20 is used for converting various physical parameters of the working condition and state of the automobile and the running condition and state of the automobile into electric signals, and transmitting the electric signals to the ECU 10. The actuator 30 is used to control the object to operate in a set optimum state in accordance with a control signal from the ECU 10.
Specifically, the ECU10 communicates with the sensor 20 and the actuator 30 by signal values. Communications between the ECUs 10 and between the ECU10 and the diagnostic interface 40 are performed by sending or receiving messages containing signal values over the bus, and communications between the electronic device 60 and the bus are performed by sending or receiving messages containing signal values over the bus via the diagnostic interface 40. However, in the communication process, a single message of many ECUs will contain signal values of multiple signals, and each ECU needs to acquire the signal values of all the signals before sending the message. If monitoring is performed on a certain signal value or certain signal values, the ECU still sequentially acquires the latest data of all signals before sending the message, which may result in slow reply and untimely refresh.
The embodiment of the application provides a method and a device for acquiring a vehicle signal value, electronic equipment, an electronic control unit and a readable storage medium, which are used for solving the problem that the existing method for acquiring the vehicle signal value is low in efficiency.
Fig. 2 is a schematic flowchart of a method for acquiring a vehicle signal value according to an embodiment of the present application. By way of example and not limitation, the method has particular application to electronic devices including diagnostic devices or ECUs to enable a target ECU to monitor a specified signal according to its requirements.
As shown in fig. 2, the method includes:
s201: and sending a request message to the target ECU, wherein the request message comprises a request message identifier and a preset specified code, and the preset specified code is used for specifying the signal to be monitored.
As an implementation manner, the request packet identifier is in an ID (Identity document identification number) form, and the preset specified code is in a mask form.
Specifically, each bit word in the preset designated code corresponds to a signal of the same type, and the word is used for designating whether the corresponding signal is a signal to be monitored or not based on the message format corresponding to the request message identifier. When the value of the word is the first preset value, the corresponding signal is the signal to be monitored. And when the value of the word code is a second preset value, the corresponding signal is a signal which is not to be monitored.
For example, the electronic device needs to monitor the engine temperature, and the ID of the message containing the engine temperature is 220101, that is, the request message is identified as 220101. The format representation of the message comprises 4 types of signals, namely a voltage signal, a temperature signal, a rotating speed signal and an oxygen sensing signal in sequence, wherein the bit number of each type of signal is 8 bits. Based on the message format, the voltage signal is a signal which is not to be monitored, and the value of the corresponding word code is set to be 0; setting the value of a corresponding word code as 1 when the temperature signal is a signal to be monitored; the rotating speed signal is a signal which is not to be monitored, and the value of the corresponding word is set to be 0; the oxygen sensing signal is a signal not to be monitored, and the value of the corresponding word is set to 0. The preset designating code is represented as 0100000, the first is 0 corresponding to the voltage signal, the second is 1 corresponding to the temperature signal, the third is 0 corresponding to the rotation speed signal, the fourth is 0 corresponding to the oxygen sensing signal, the following 4 bits are directly filled with 0 to complement 8 bits, and the preset designating code is converted into 40 bytes.
S202: receiving a response message; and the response message is generated according to the message format and the signal value corresponding to the request message identifier after the target ECU obtains the signal value of the signal to be monitored, which is specified by the preset specified code.
And the target ECU acquires the stored format of the corresponding request message according to the request message identifier, presets a specified code to determine a signal to be monitored, and then only acquires the signal value of the signal to be monitored. When the response message is generated, according to the corresponding message format, only the signal value of the signal to be monitored is filled into the corresponding byte, the bytes corresponding to other signals are directly filled with the preset value, and then the response message is transmitted through the bus, so that the electronic equipment receives the response message.
For example, the engine ECU determines that the temperature signal is a signal to be monitored, only obtains a signal value of the temperature signal, and fills only an actual temperature value of the temperature signal according to a corresponding message format when generating the response message, and sets values of other signals to preset values.
S203: and analyzing the response message to obtain a signal value of the signal to be monitored.
And analyzing all signals in the response message according to the format of the response message, taking out data of all signals, and obtaining an actual signal value of the signal to be monitored, wherein the signal values of other signals are preset values.
Correspondingly, the electronic equipment analyzes that the response message contains the 4 types of signals, and takes out the data of the 4 types of signals to obtain the engine temperature value.
The embodiment sends a request message to a target ECU, wherein the request message comprises a request message identifier and a preset specified code, and the preset specified code is used for specifying a signal to be monitored; and receiving a response message, wherein the response message is generated according to a message format and a signal value corresponding to the request message identifier after the target ECU obtains the signal value of the signal to be monitored specified by the preset specified code, so that the ECU monitors the specified signal and only obtains the signal value of the signal to be monitored, and when the ECU generates the response message, only the specified signal value of the signal to be monitored needs to be filled, and other signals directly fill the preset value, so that the replying speed and the refreshing speed are improved, and the efficiency of obtaining the signal value of the vehicle is improved.
In another embodiment, sending a request message to a target ECU includes:
and sending a request message to the automobile bus, wherein the request message also comprises request identification information of the target ECU. And the target ECU identifies and processes the request message by requesting the identification information.
As one implementation, the request identification information is in the form of an ID. The request identification information is used for specifying the target ECU to process the request message. For example, if the signal to be monitored is the engine temperature, the engine ECU is required to process the request message, and the request identification information is 0xfc00, where the request message is correspondingly represented as 0xfc000422010140, 0xfc00 is the ID of the engine ECU, 04 indicates that there are 4 following valid bytes, 220101 is the request message ID, and 40 is the preset specified code. When the electronic equipment sends a request message to the automobile bus, all the ECUs on the bus receive and recognize the request message. When the engine ECU identifies that 0xfc00 corresponds to the ID of the engine ECU, the request message is processed, and when other ECUs identify that 0xfc00 does not correspond to the ID of the engine ECU, the request message is not processed.
Correspondingly, the response message further includes reply identification information and a response message identification, and the response message identification corresponds to the request message identification. As one implementation. Are all in the form of IDs. For example, if the engine ECU is the target ECU, the reply ID in the response message is 0xfd00, that is, the reply identification information is 0xfd 00. The request packet ID is 220101, and the corresponding response packet ID is 620101, i.e., 620101.
And the electronic equipment receives the response message and analyzes the response message to obtain the signal value of the signal to be monitored.
Specifically, whether the ECU corresponding to the reply identification information is the target ECU is judged;
if yes, judging whether the response message identification corresponds to the request message identification;
if yes, obtaining the signal value from the response message.
Illustratively, from the reply ID: 0xfd00 determines it is the engine ID that is returned. Then according to the ID of the response message: 620101 determining the request message ID: 220101 corresponds to the first byte 62 of the response message ID differing by 40 from the first byte 22 of the request message ID, the other bytes being identical. Then all signals in the response message are taken out to obtain the signal value of the temperature signal.
In the embodiment, the request message comprises the request identification information of the ECU, so that the target ECU can be ensured to recognize the request message and process the request message according to the requirement of the request message, and other ECUs do not need to process the request message, thereby improving the efficiency of obtaining the vehicle signal value; and the response message identifier corresponds to the request message identifier, so that the response message processed by the electronic equipment can be ensured to be the message of the signal value of the signal to be monitored.
FIG. 3 is a schematic flow chart diagram illustrating a method for obtaining vehicle signal values according to another embodiment of the present application. By way of example and not limitation, the method is applied to an ECU to cause the target ECU to monitor the designated signals as required.
As shown in fig. 3, the method includes:
s301: receiving a request message; the request message comprises a request message identifier and a preset appointed code, and the preset appointed code is used for appointing a signal to be monitored.
The request message identifier is used for describing a target message where a signal to be monitored is located.
For example, the signal to be monitored is the engine temperature, and the received request message is 0x0422010140, which includes a request message ID 0x220101 and a preset assigned code 0100000.
S302: and determining the corresponding message format according to the request message identifier.
After receiving the request message, the target ECU extracts the request message identifier and the preset designated code from the message, searches the corresponding message format in the target ECU according to the request message identifier of the request message, and determines the number of types of signals contained in the message, the positions of the types of signals in the message and the corresponding occupied bits.
For example, after receiving the request message, the engine ECU determines that the message is the message in which the engine temperature is located through the target message ID 0x220101, so as to find the format of the message in which the corresponding engine temperature is located, and obtain that the target message includes 4 types of signals, which are a voltage signal, a temperature signal, a rotation speed signal and an oxygen sensing signal in sequence, and the bit number occupied by each type of signal is 8 bits.
S303: and determining a signal to be monitored based on the message format and the preset specified code.
Specifically, based on the message format, a type of signal corresponding to each bit character code in a preset specified code is determined;
if the value of the character code is a first preset value, the corresponding signal is a signal to be monitored;
and if the value of the word code is the second preset value, the corresponding signal is a signal which is not to be monitored.
Illustratively, the first preset value is 1, and the second preset value is 0. The message format based on the target message comprises 4 types of signals, namely a voltage signal, a temperature signal, a rotating speed signal and an oxygen sensing signal, wherein the bit number of each type of signal is 8. Then converting byte 40 in the message into 0100000, and determining that the voltage signal is a non-to-be-monitored signal according to the first voltage signal which is 0 and corresponds to the first byte; and determining the temperature signal as a signal to be monitored according to the second signal which is 1 and corresponds to the temperature signal, determining the rotating speed signal as a signal which is not to be monitored according to the third signal which is 0 and corresponds to the rotating speed signal, determining the oxygen sensing signal as a signal which is not to be monitored according to the fourth signal which is 0 and corresponds to the oxygen sensing signal, and determining the rear 4 as a foot supplement position.
S304: and acquiring a signal value corresponding to a signal to be monitored.
And the target ECU acquires the signal value of the signal to be monitored through a sensor.
S305: and generating a corresponding response message based on the message format and the signal value.
Illustratively, the preset value is 00. After the engine acquires the actual signal value of the temperature signal through the sensor, according to the position of the signal in the message, the first one is a voltage signal, and the corresponding byte is directly filled with 00; the second is a temperature signal, and the obtained actual signal value is converted into bytes to be filled in the corresponding bytes; the third is a rotating speed signal, and the corresponding bytes are directly filled with 00; the fourth is the oxygen sensor signal, and the corresponding byte directly fills 00, eventually represented as 00640000.
S306: and sending a response message to the electronic equipment, wherein the electronic equipment is the equipment for sending the request message.
For example, if the electronic device is a diagnostic device, the response message is sent to the diagnostic device.
And if the electronic equipment is other ECU, sending the response message to other ECU.
The embodiment determines a signal to be monitored based on a message format and a preset specified code; acquiring a signal value corresponding to a signal to be monitored; and generating a corresponding response message based on the message format and the signal value, so that the ECU can monitor the specified signal, only the signal value of the signal to be monitored is obtained, and when the response message is generated, only the specified signal value of the signal to be monitored is needed to be filled, and the preset value is directly filled in other signals, thereby improving the response speed and the refresh speed.
In another embodiment, the request message further includes request identification information of the target ECU.
After receiving the request message, the method further comprises:
judging whether the request identification information is the same as the preset system identification information or not;
if yes, the step of determining the corresponding message format according to the request message identification is carried out.
As one implementation, the system identification information is in the form of an ID.
Illustratively, the request packet is correspondingly represented as 0xfc000422010140, and further includes request identification information 0xfc 00. 04 denotes that the following valid bytes have 4, 220101 is the request message identifier, and 40 is the preset specified code. After receiving the request message, the engine ECU determines that 0xfc00 is equal to the system ID of the engine itself: 0xfc00 is the same, and the request message is determined to be a message to be processed, and the request message is analyzed.
Correspondingly, the response message further includes reply identification information and a response message identification, the response message identification corresponds to the request message identification, and the response message identification is used for describing that the response message corresponds to the request message.
As one implementation. The reply identification information and the response message identification are both in ID form. Illustratively, the engine ECU is a target ECU, and the response message is correspondingly represented as 0xfd00086201014000640000, and further includes a reply ID: 0xfd00, i.e. reply ID 0xfd00, corresponding to the response packet ID with request packet ID 220101: 620101, response message identification 620101. Where 08 indicates that there are 8 following valid bytes, the first is 00 for the signal value of the voltage signal, the second is 64 for the actual signal value of the temperature signal, the third is 00 for the signal value of the rotation speed signal, and the fourth is 00 for the signal value of the oxygen sensor signal. The response message identification 620101 is formed by adding 40 to the first byte of the request message identification 220101 to correspond to the request message identification for the electronic device to recognize and process the response message.
The request message of the embodiment also comprises request identification information of the target ECU, so that the target ECU can recognize the request message and process the request message according to the requirement; and the response message also comprises reply identification information and a response message identification, and the response message identification corresponds to the request message identification, so that the response message processed by the electronic equipment can be ensured to be the message of the signal value of the signal to be monitored.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 4 is a schematic structural diagram of an apparatus for acquiring a vehicle signal value according to an embodiment of the present application, corresponding to the method of the above-described embodiment. For convenience of explanation, only portions related to the embodiments of the present application are shown.
As shown in fig. 4, the apparatus includes:
the communication unit 40 is configured to send a request message to the target ECU, where the request message includes a request message identifier and a preset designation code, and the preset designation code is used for designating a signal to be monitored;
the device comprises a request message identification module, a monitoring module and a monitoring module, wherein the request message identification module is used for receiving a response message, and the response message is generated according to a message format and a signal value corresponding to the request message identification after a target ECU obtains the signal value of a signal to be monitored, which is specified by a preset specified code;
and the analyzing unit 41 is configured to analyze the response message to obtain a signal value of the signal to be monitored.
Each bit word code in the preset appointed code corresponds to a signal, and the word code is used for appointing whether the corresponding signal is a signal to be monitored or not based on the message format corresponding to the request message identification.
In another embodiment, the communication unit 40 is specifically configured to send a request message to the vehicle bus, where the request message further includes request identification information of the target ECU.
In another embodiment, the response message further includes reply identification information and a response message identification, and the response message identification corresponds to the request message identification;
the analysis unit 41 is specifically configured to determine whether the ECU corresponding to the reply identification information is the target ECU;
if yes, judging whether the response message identification corresponds to the request message identification;
if yes, obtaining the signal value from the response message.
Fig. 5 is a schematic structural diagram of an apparatus for acquiring a vehicle signal value according to another embodiment of the present application, corresponding to the method of the above-described embodiment. For convenience of explanation, only portions related to the embodiments of the present application are shown.
As shown in fig. 5, the apparatus includes:
a communication unit 51, configured to receive a request packet, where the request packet includes a request packet identifier and a preset specific code, and the preset specific code is used to specify a signal to be monitored;
the electronic equipment is used for sending a response message to the electronic equipment, and the electronic equipment is used for sending a request message;
a processing unit 52, configured to determine a corresponding message format according to the request message identifier;
the device comprises a monitoring unit, a processing unit and a processing unit, wherein the monitoring unit is used for determining a signal to be monitored based on a message format and a preset specified code;
the device is used for acquiring a signal value corresponding to a signal to be monitored;
and the device is used for generating a corresponding response message based on the message format and the signal value.
In another embodiment, the request message further includes request identification information of the target ECU;
the processing unit 52 is further configured to determine whether the request identification information is the same as the preset system identification information;
if yes, the step of determining the corresponding message format according to the request message identification is carried out.
In another embodiment, the processing unit 52 is specifically configured to determine a type of signal corresponding to each bit word in the preset designated code based on the message format;
if the value of the character code is a first preset value, the corresponding signal is a signal to be monitored;
and if the value of the word code is the second preset value, the corresponding signal is a signal which is not to be monitored.
In another embodiment, the response packet further includes reply identification information and a response packet identifier, where the response packet identifier corresponds to the request packet identifier, and the response packet identifier is used to describe that the response packet corresponds to the request packet.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic apparatus of this embodiment includes: at least one processor 60 (only one shown in fig. 6), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, the processor 60 implementing the steps in the various method embodiments applied to the electronic device when executing the computer program 62.
The electronic device may be a computing device such as a vehicle diagnostic device. The electronic device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of an electronic device, and does not constitute a limitation of the electronic device, and may include more or less components than those shown, or combine certain components, or different components, such as input output devices, network access devices, etc.
The Processor 60 may be a Central Processing Unit (CPU), and the Processor 60 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may in some embodiments be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. The memory 61 may also be an external storage device of the electronic device 6 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 61 may also include both an internal storage unit and an external storage device of the electronic device. The memory 61 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 61 may also be used to temporarily store data that has been output or is to be output.
Fig. 7 is a schematic structural diagram of an electronic control unit according to an embodiment of the present application. As shown in fig. 7, the electronic apparatus of this embodiment includes: at least one processor 70 (only one shown in fig. 7), a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, the processor 70 implementing the steps in the various method embodiments applied to the ECU as described above when executing the computer program 72.
The electronic device may be a computing device such as an on-board unit ECU. The electronic device may include, but is not limited to, a processor 70, a memory 71. Those skilled in the art will appreciate that fig. 7 is merely an example of an electronic device, and does not constitute a limitation of the electronic device, and may include more or less components than those shown, or combine certain components, or different components, such as input output devices, network access devices, etc.
The Processor 70 may be a Central Processing Unit (CPU), and the Processor 70 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may in some embodiments be an internal storage unit of the electronic device 7, such as a hard disk or a memory of the electronic device. The memory 71 may also be an external storage device of the electronic device 7 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 71 may also include both an internal storage unit and an external storage device of the electronic device. The memory 71 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 71 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/electronic device, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for obtaining vehicle signal values is applied to electronic equipment and is characterized by comprising the following steps:
sending a request message to a target ECU, wherein the request message comprises a request message identifier and a preset appointed code, and the preset appointed code is used for appointing a signal to be monitored;
receiving a response message, wherein the response message is generated according to a message format corresponding to the request message identifier and the signal value after the target ECU obtains the signal value of the signal to be monitored, which is specified by the preset specified code;
and analyzing the response message to obtain the signal value of the signal to be monitored.
2. The method of claim 1, wherein each bit of the predetermined assignment code corresponds to a type of signal, and the word is used to assign whether the corresponding signal is a signal to be monitored based on the message format corresponding to the request message identifier.
3. The method of claim 1, wherein said sending a request message to a target ECU comprises:
and sending the request message to an automobile bus, wherein the request message also comprises request identification information of the target ECU.
4. The method of claim 1, wherein the response message further comprises reply identification information and a response message identification, the response message identification corresponding to the request message identification;
analyzing the response message to obtain the signal value of the signal to be monitored, including:
judging whether the ECU corresponding to the reply identification information is the target ECU or not;
if yes, judging whether the response message identification corresponds to the request message identification;
and if so, acquiring the signal value from the response message.
5. A method for acquiring a vehicle signal value, applied to an ECU, is characterized by comprising the following steps:
receiving a request message, wherein the request message comprises a request message identifier and a preset specified code, and the preset specified code is used for specifying a signal to be monitored;
determining a corresponding message format according to the request message identifier;
determining the signal to be monitored based on the message format and the preset specified code;
acquiring a signal value corresponding to the signal to be monitored;
generating a corresponding response message based on the message format and the signal value;
and sending the response message to the electronic equipment, wherein the electronic equipment is the equipment for sending the request message.
6. The method of claim 5, wherein the request message further includes request identification information of the target ECU;
before determining the corresponding message format according to the request message identifier, the method further includes:
judging whether the request identification information is the same as preset system identification information or not;
if yes, entering the step of determining the corresponding message format according to the request message identification.
7. The method of claim 5, wherein determining the signal to be monitored based on the message format and the predetermined specified code comprises:
determining a type of signal corresponding to each digit character code in the preset appointed code based on the message format;
if the value of the character code is a first preset value, the corresponding signal is a signal to be monitored;
and if the value of the word code is the second preset value, the corresponding signal is a signal which is not to be monitored.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 4 when executing the computer program.
9. An electronic control unit comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 5 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 4 or 5 to 7.
CN202110931726.7A 2021-08-13 2021-08-13 Method for acquiring vehicle signal value, electronic equipment and electronic control unit Active CN113608483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110931726.7A CN113608483B (en) 2021-08-13 2021-08-13 Method for acquiring vehicle signal value, electronic equipment and electronic control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110931726.7A CN113608483B (en) 2021-08-13 2021-08-13 Method for acquiring vehicle signal value, electronic equipment and electronic control unit

Publications (2)

Publication Number Publication Date
CN113608483A true CN113608483A (en) 2021-11-05
CN113608483B CN113608483B (en) 2023-05-09

Family

ID=78308541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110931726.7A Active CN113608483B (en) 2021-08-13 2021-08-13 Method for acquiring vehicle signal value, electronic equipment and electronic control unit

Country Status (1)

Country Link
CN (1) CN113608483B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285633A (en) * 2021-12-23 2022-04-05 深圳供电局有限公司 Computer network security monitoring method and system
CN114513475A (en) * 2022-02-15 2022-05-17 一汽解放汽车有限公司 Message interaction method, device, controller, storage medium and program product
CN114942623A (en) * 2022-05-31 2022-08-26 中国第一汽车股份有限公司 Controller testing method and device, vehicle and computer readable storage medium
CN115134186A (en) * 2022-06-29 2022-09-30 深圳市元征科技股份有限公司 Data processing method and related equipment

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001154727A (en) * 1999-10-25 2001-06-08 Yurin Giken:Kk Vehicle diagnostic system and method
JP2007058344A (en) * 2005-08-22 2007-03-08 Fujitsu Ten Ltd Vehicle diagnosis system, vehicle information transmission apparatus and vehicle information transmission method
CN101853020A (en) * 2010-05-25 2010-10-06 金龙联合汽车工业(苏州)有限公司 Vehicle running information acquisition device based on CAN (Controller Area Network) bus
CN102809962A (en) * 2012-09-03 2012-12-05 同济汽车设计研究院有限公司 Vehicle data acquisition terminal and vehicle information acquisition system
CN103391316A (en) * 2013-07-09 2013-11-13 潍柴动力股份有限公司 Vehicle remote terminal and client-side monitoring method and device and vehicle remote monitoring system
CN103458039A (en) * 2013-09-06 2013-12-18 北京经纬恒润科技有限公司 Message generation method, mobile terminal, communication server and message generation system
CN103809579A (en) * 2012-11-08 2014-05-21 厦门雅迅网络股份有限公司 Method for extracting vehicle state information from center
CN104104568A (en) * 2013-04-02 2014-10-15 上海通用汽车有限公司 Method, device and system for acquiring data from communication bus
CN110162008A (en) * 2019-05-10 2019-08-23 中国汽车技术研究中心有限公司 A kind of new energy vehicle CAN bus analytic method
CN110850849A (en) * 2019-11-30 2020-02-28 航天科技控股集团股份有限公司 Fault code reporting method for realizing compatibility with multiple vehicle types by using mask code
CN111880510A (en) * 2020-06-28 2020-11-03 东风汽车集团有限公司 New energy automobile data acquisition and transmission method and equipment
CN112187790A (en) * 2020-09-27 2021-01-05 北京罗克维尔斯科技有限公司 Signal identifier generation method, message transmission method and device
CN113141306A (en) * 2021-04-15 2021-07-20 常州易控汽车电子股份有限公司 Diagnostic message routing method and bus routing equipment thereof
CN113542333A (en) * 2020-04-22 2021-10-22 广州汽车集团股份有限公司 Method for monitoring vehicle signals

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001154727A (en) * 1999-10-25 2001-06-08 Yurin Giken:Kk Vehicle diagnostic system and method
JP2007058344A (en) * 2005-08-22 2007-03-08 Fujitsu Ten Ltd Vehicle diagnosis system, vehicle information transmission apparatus and vehicle information transmission method
CN101853020A (en) * 2010-05-25 2010-10-06 金龙联合汽车工业(苏州)有限公司 Vehicle running information acquisition device based on CAN (Controller Area Network) bus
CN102809962A (en) * 2012-09-03 2012-12-05 同济汽车设计研究院有限公司 Vehicle data acquisition terminal and vehicle information acquisition system
CN103809579A (en) * 2012-11-08 2014-05-21 厦门雅迅网络股份有限公司 Method for extracting vehicle state information from center
CN104104568A (en) * 2013-04-02 2014-10-15 上海通用汽车有限公司 Method, device and system for acquiring data from communication bus
CN103391316A (en) * 2013-07-09 2013-11-13 潍柴动力股份有限公司 Vehicle remote terminal and client-side monitoring method and device and vehicle remote monitoring system
CN103458039A (en) * 2013-09-06 2013-12-18 北京经纬恒润科技有限公司 Message generation method, mobile terminal, communication server and message generation system
CN110162008A (en) * 2019-05-10 2019-08-23 中国汽车技术研究中心有限公司 A kind of new energy vehicle CAN bus analytic method
CN110850849A (en) * 2019-11-30 2020-02-28 航天科技控股集团股份有限公司 Fault code reporting method for realizing compatibility with multiple vehicle types by using mask code
CN113542333A (en) * 2020-04-22 2021-10-22 广州汽车集团股份有限公司 Method for monitoring vehicle signals
CN111880510A (en) * 2020-06-28 2020-11-03 东风汽车集团有限公司 New energy automobile data acquisition and transmission method and equipment
CN112187790A (en) * 2020-09-27 2021-01-05 北京罗克维尔斯科技有限公司 Signal identifier generation method, message transmission method and device
CN113141306A (en) * 2021-04-15 2021-07-20 常州易控汽车电子股份有限公司 Diagnostic message routing method and bus routing equipment thereof

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114285633A (en) * 2021-12-23 2022-04-05 深圳供电局有限公司 Computer network security monitoring method and system
CN114285633B (en) * 2021-12-23 2024-03-29 深圳供电局有限公司 Computer network security monitoring method and system
CN114513475A (en) * 2022-02-15 2022-05-17 一汽解放汽车有限公司 Message interaction method, device, controller, storage medium and program product
CN114513475B (en) * 2022-02-15 2024-03-19 一汽解放汽车有限公司 Message interaction method, device, controller, storage medium and program product
CN114942623A (en) * 2022-05-31 2022-08-26 中国第一汽车股份有限公司 Controller testing method and device, vehicle and computer readable storage medium
CN115134186A (en) * 2022-06-29 2022-09-30 深圳市元征科技股份有限公司 Data processing method and related equipment

Also Published As

Publication number Publication date
CN113608483B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN113608483B (en) Method for acquiring vehicle signal value, electronic equipment and electronic control unit
US8983714B2 (en) Failsafe communication system and method
CN111552267B (en) Vehicle diagnosis method and device and vehicle diagnosis equipment
WO2021098212A1 (en) Software upgrade method, apparatus and system
CN111538312B (en) Vehicle remote diagnosis method, system, equipment connector and vehicle connector
CN113094062A (en) Upgrading method and device
US20200382597A1 (en) Vehicle diagnostic communication apparatus, system including the same and method thereof
CN112558584B (en) Diagnostic data acquisition method and device and diagnostic equipment
CN112445630A (en) Information interaction method and device and terminal equipment
CN113645097A (en) Vehicle signal monitoring method, terminal equipment and electronic control unit
CN114089713A (en) Communication method based on UDS, ECU and upper computer
CN113489653A (en) Message sending method and device and computer equipment
CN115980554B (en) Chip testing method and electronic equipment thereof
CN112306041A (en) Vehicle configuration information writing method and device and electronic equipment
CN116319499A (en) Diagnostic method and device for vehicle, electronic equipment and storage medium
CN114756585A (en) Vehicle data acquisition method and device, electronic equipment and storage medium
KR101704300B1 (en) Method for transmitting/receiving can message and system performing the same
CN110545163B (en) Message processing method, message processing device and vehicle-mounted control system
CN113918187A (en) Automobile instrument multi-chip upgrading system and method based on CAN bus
CN114326673A (en) Vehicle remote diagnosis method and device, connector and storage medium
CN112991578B (en) Vehicle data stream processing method and device, electronic equipment and electronic control unit
CN114584590B (en) Data transmission method, system, device and storage medium
CN112731837B (en) Method, device, equipment, medium, product and vehicle for determining vehicle state
CN109597813B (en) Vehicle data processing method and device
EP4231595A1 (en) Relay device, communication network system, and communication control method

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