CN114756585A - Vehicle data acquisition method and device, electronic equipment and storage medium - Google Patents

Vehicle data acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114756585A
CN114756585A CN202210290362.3A CN202210290362A CN114756585A CN 114756585 A CN114756585 A CN 114756585A CN 202210290362 A CN202210290362 A CN 202210290362A CN 114756585 A CN114756585 A CN 114756585A
Authority
CN
China
Prior art keywords
virtual channel
identifier
data stream
vehicle
target ecu
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.)
Pending
Application number
CN202210290362.3A
Other languages
Chinese (zh)
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 CN202210290362.3A priority Critical patent/CN114756585A/en
Publication of CN114756585A publication Critical patent/CN114756585A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24568Data stream processing; Continuous queries

Abstract

The application is applicable to the technical field of automotive electronics, and provides a vehicle data acquisition method and device, electronic equipment and a storage medium. The method comprises the following steps: sending a virtual channel reading instruction to the vehicle, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier; receiving a response packet returned by the target ECU according to the virtual channel identifier, wherein the target ECU is an ECU corresponding to the target ECU identifier; and analyzing the response packet to obtain the vehicle data corresponding to the at least two data stream items. The technical scheme provided by the application enables the efficiency of obtaining vehicle data to be greatly improved, and is particularly suitable for scenes needing to obtain a large amount of vehicle data.

Description

Vehicle data acquisition method and device, electronic equipment and storage medium
Technical Field
The present application belongs to the field of automotive electronics technologies, and in particular, to a method and an apparatus for acquiring vehicle data, an electronic device, and a storage medium.
Background
Vehicle data is an important basis for diagnosing a malfunctioning vehicle. In diagnosing a faulty vehicle, a diagnostic device is generally connected to the vehicle, and a vehicle diagnostic technician sends data reading instructions one by one, and reads various pieces of vehicle data one by one through a channel (wired or wireless) between the vehicle and the diagnostic device. However, as vehicles become higher and higher, the performance becomes more and more varied, the failure becomes more and more complex, and the number of vehicle data stream items also becomes more and more. The above-described conventional vehicle data acquisition method requires a vehicle diagnostic technician to manually select data to be read each time when a data reading instruction is transmitted, and is inefficient when there are many vehicle data stream items.
Disclosure of Invention
The embodiment of the application provides a vehicle data acquisition method and device, electronic equipment and a storage medium, so that the vehicle data acquisition efficiency is improved.
In a first aspect, an embodiment of the present application provides a vehicle data acquisition method, which is applied to a target device, and the method includes:
sending a virtual channel reading instruction to a vehicle, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier;
receiving a response packet returned by the target ECU according to the virtual channel identifier; the target ECU identifies a corresponding ECU for the target ECU;
and analyzing the response packet to obtain vehicle data corresponding to at least two data stream items.
According to the technical scheme, after the target device sends the virtual channel reading instruction to the vehicle, the response packet returned by the target ECU according to the virtual channel identifier is received, and the vehicle data corresponding to the at least two data stream items are obtained by analyzing the response packet. In the scheme, the virtual channel identifier corresponds to at least two data stream items, the vehicle acquires the virtual channel instruction and then sends the instruction to the target ECU, and the target ECU acquires the vehicle data corresponding to the at least two data stream items corresponding to the virtual channel identifier by analyzing the virtual channel identifier, generates a response packet and returns the response packet to the target device. As the vehicle data corresponding to at least two data stream items can be acquired without manually selecting a plurality of items of data to be read by a vehicle diagnosis technician as in the prior art, and only by sending a corresponding virtual channel reading instruction to the target ECU, the efficiency of acquiring the vehicle data is greatly improved, and the method is particularly suitable for scenes in which a large amount of vehicle data is required to be acquired.
Optionally, before the sending the virtual channel reading instruction to the vehicle, the method further includes:
generating a virtual channel configuration instruction, wherein the virtual channel configuration instruction comprises the virtual channel identifier, the target ECU identifier and a data stream item identifier;
and sending the virtual channel configuration instruction to a vehicle so that the target ECU corresponding to the target ECU identifier analyzes the virtual channel configuration instruction and acquires configuration information corresponding to the instruction.
Optionally, the parsing the response packet to obtain vehicle data corresponding to at least two data stream items includes:
sequentially analyzing the current value of each of the at least two data stream items according to a preset sequence;
calculating a signal value corresponding to the current value of each data stream item according to a preset algorithm corresponding to each data stream item;
and combining the signal value corresponding to the current value of each data stream item with other attributes to obtain the vehicle data corresponding to the at least two data stream items.
In a second aspect, another embodiment of the present application provides a vehicle data acquisition method applied to an ECU, the method including:
receiving a virtual channel reading instruction sent by target equipment, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier;
acquiring data of at least two data stream items corresponding to the virtual channel identifier according to the virtual channel identifier, and generating a corresponding response packet;
and returning the response packet to the target device.
Optionally, before the receiving the virtual channel reading instruction sent by the target device, the method further includes:
receiving a virtual channel configuration instruction sent by the target device, wherein the virtual channel configuration instruction comprises a virtual channel identifier, a target ECU identifier and a data stream item identifier;
and analyzing the virtual channel configuration instruction and acquiring configuration information corresponding to the instruction.
In a third aspect, an embodiment of the present application provides a vehicle data acquisition apparatus, which is applied to a target device, and the apparatus includes:
the system comprises a first sending module, a second sending module and a control module, wherein the first sending module is used for sending a virtual channel reading instruction to a vehicle, and the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier;
the first receiving module is used for receiving a response packet returned by the target ECU according to the virtual channel identifier; the target ECU identifies a corresponding ECU for the target ECU;
and the analysis module is used for analyzing the response packet and acquiring the vehicle data corresponding to the at least two data stream items.
In a fourth aspect, another embodiment of the present application provides a vehicle data acquisition apparatus, applied to an ECU, the apparatus including:
the second receiving module is used for receiving a virtual channel reading instruction sent by target equipment, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier;
the generating module is used for acquiring data of at least two data stream items corresponding to the virtual channel identifier according to the virtual channel identifier and generating a corresponding response packet;
and the second sending module is used for returning the response packet to the target equipment.
In a fifth aspect, an embodiment of the present application provides an electronic device, including:
a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program, when executed by the processor, implementing the method steps of the first or second aspect.
In a sixth 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, performs the method steps of the first or second aspect described above.
In a seventh aspect, this application provides a computer program product, which when run on an electronic device, causes the electronic device to perform the method steps of the first aspect or the second aspect.
It can be understood that, for the beneficial effects of the second aspect to the seventh aspect, reference may be made to the relevant description in the first aspect, and details are not described herein again.
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 based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart diagram illustrating a vehicle data acquisition method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of a vehicle data acquisition method provided by another embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of a vehicle data acquisition method provided by another embodiment of the present application;
FIG. 4 is a schematic structural diagram of a vehicle data acquisition device provided in an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a vehicle data acquisition device 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.
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.
At present, when diagnosing a faulty vehicle, a diagnostic device is generally connected to the vehicle, and a vehicle diagnostic technician sends data reading instructions one by one, and reads various vehicle data one by one through a channel (wired or wireless) between the vehicle and the diagnostic device. However, as vehicles become higher and higher, the performance becomes more and more varied, the failure becomes more and more complex, and the number of vehicle data stream items also becomes more and more. The above-described conventional vehicle data acquisition method requires a vehicle diagnostic technician to manually select data to be read each time when a data reading instruction is transmitted, and is inefficient when there are many vehicle data stream items.
In view of this, the present application provides a vehicle data acquisition method, a vehicle data acquisition device, an electronic device, and a storage medium, so as to improve the vehicle data acquisition efficiency.
Fig. 1 shows a vehicle data acquisition method provided in an embodiment of the present application, which is applied to a target device and mainly includes steps S101 to S103, and the following is described in detail:
step S101: and sending a virtual channel reading instruction to the vehicle, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier.
An Electronic Control Unit (ECU), also called a "traveling computer" or a "vehicle-mounted computer", is a microcomputer controller or a single-chip microcomputer dedicated to an automobile. The ECU is the same as a common singlechip and consists of a microprocessor, a memory, an input/output interface, an analog-to-digital converter, a shaping circuit, a driving circuit and other large-scale integrated circuits. The data flow stored in the ECU truly reflects the working voltage and state of each sensor and actuator, and provides a basis for vehicle fault diagnosis. In general, a vehicle diagnostic technician acquires the data stream stored in the ECU through a target device connected to the vehicle. The target device is typically a diagnostic device. The virtual channel reading instruction sent by the target device to the vehicle mainly comprises a virtual channel identifier, a target ECU identifier and the like, wherein the virtual channel identifier is used for uniquely determining one virtual channel, and the target ECU identifier is used for uniquely identifying which ECU the virtual channel reading instruction is used for acquiring data in. Step S102: and receiving a response packet returned by the target ECU according to the virtual channel identifier, wherein the target ECU identifies a corresponding ECU for the target ECU.
When the target ECU receives a virtual channel reading instruction sent by the target equipment, the virtual channel reading instruction is analyzed to obtain a virtual channel identifier, then the configuration data of a channel corresponding to the virtual channel identifier is inquired according to the virtual channel identifier, a data stream item identifier corresponding to the virtual channel identifier is obtained according to the configuration data, vehicle data corresponding to the data stream item identifier is obtained, and a corresponding response packet is generated. Step S103: and analyzing the response packet to obtain the vehicle data corresponding to the at least two data stream items.
And after receiving a response packet returned by the target ECU according to the virtual channel identifier, the target device analyzes the response packet to acquire vehicle data corresponding to at least two data stream items.
As can be known from the vehicle data acquiring method illustrated in fig. 1, after the target device sends the virtual channel reading instruction to the vehicle, the target ECU receives a response packet returned according to the virtual channel identifier, and acquires the vehicle data corresponding to at least two data stream items by analyzing the response packet. Because the data to be read is not required to be manually selected by a vehicle diagnosis technician in the prior art, and the vehicle data corresponding to at least two data stream items can be acquired only by sending a virtual channel reading instruction to the target ECU, the efficiency of acquiring the vehicle data is greatly improved, and the method is particularly suitable for scenes in which a large amount of vehicle data needs to be acquired.
Fig. 2 illustrates a vehicle data acquisition method provided in another embodiment of the present application, which can be applied to a target device and mainly includes steps S201 to S205, and the following is described in detail:
step S201, generating a virtual channel configuration instruction, where the virtual channel configuration instruction includes a virtual channel identifier, a target ECU identifier, and a data stream item identifier.
Before reading the virtual channel, the virtual channel needs to be configured, so that the target ECU can obtain the data of the corresponding data stream item according to the virtual channel reading instruction. Specifically, the target apparatus needs to configure data flow items contained in a virtual lane that specifies an ECU, for example, an engine ECU that is a target ECU, whose certain virtual lane (for example, virtual lane 1) needs to contain data flow items such as an engine speed, a coolant temperature, an ignition angle, and a throttle angle; then, the information of each data stream item is found out from a data stream item general table, wherein the data stream item general table contains information sets of the data stream items of all ECUs, and the information sets mainly include names, units, identifiers and occupied byte numbers of each data stream item, and preset algorithms corresponding to each data stream item, and the like, for example, a data stream item named Engine speed, the unit of which is 1/min, an identifier of the data stream item is 0x0401, two bytes are occupied, and the preset algorithm is Y x1+256 x2, and the like; after the data or information is acquired, the target device may start generating a virtual channel configuration instruction. Specifically, a target ECU identifier, a function identifier, a virtual channel identifier, identifiers of respective data stream items, and the like may be filled in the instruction, thereby generating a virtual channel configuration instruction. It should be noted here that the respective data stream identifications may be arranged after the virtual channel identification according to a preset order. The function identifier is used to describe the function of the currently issued instruction or what to do with the currently issued instruction, for example, if the function identifier is 0x31f0, the instruction is described as a configuration instruction. The purpose is to inform the target ECU of the virtual channel configuration instructions for it to configure the virtual channel.
Step S202, sending the virtual channel configuration instruction to the vehicle, so that the target ECU corresponding to the target ECU identifier analyzes the virtual channel configuration instruction and acquires the configuration information corresponding to the instruction.
After the virtual channel configuration instruction is generated, the target device sends the virtual channel configuration instruction to the vehicle, so that the target ECU corresponding to the target ECU identifier analyzes the virtual channel configuration instruction and acquires configuration information corresponding to the instruction. Specifically, the step of analyzing the virtual channel configuration instruction by the target ECU corresponding to the target ECU identifier and acquiring the configuration information corresponding to the instruction may be: after receiving the virtual channel configuration instruction, the target ECU analyzes information such as a target ECU identifier in the virtual channel configuration instruction so as to confirm whether the virtual channel configuration instruction is sent to the target ECU. After confirming that the virtual channel configuration instruction is sent to the target ECU, the target ECU confirms that the instruction is the configuration instruction according to the function identifier, then confirms that the virtual channel is used for acquiring data of certain specific data stream items according to the virtual channel identifier and the data stream item identifier, and then stores the configuration information. It should be noted that, if the virtual lane identifier does not exist in the target ECU, that is, the virtual lane identifier does not exist before, the target ECU creates a corresponding virtual lane identifier and stores the configuration information corresponding to the instruction, including the data stream item identifier corresponding to the virtual lane identifier. If the virtual channel identifier already exists in the target ECU, deleting the configuration information of the virtual channel corresponding to the virtual channel identifier stored before, and storing the current configuration data in the virtual channel configuration instruction to replace the configuration information of the virtual channel corresponding to the virtual channel identifier stored before.
Step S203, sending a virtual channel reading instruction to the vehicle, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier.
In this embodiment, the virtual channel read instruction further includes a corresponding function identifier. For example, if the target ECU is an engine ECU, then the target ECU is identified as 0x07e0, the function is identified as 0x22f0 (representing that the instruction is a read instruction), and the virtual channel is identified as 0x 01. When the engine ECU receives the virtual channel reading command, the virtual channel identifier in the command, such as the channel 0x01, is parsed, and then the corresponding data stream item identifier configured in the ECU by the channel 0x01 is queried according to the configuration information that has been stored before.
And step S204, receiving a response packet returned by the target ECU according to the virtual channel identifier, wherein the target ECU identifies the corresponding ECU for the target ECU.
Step S205: and analyzing the response packet to obtain vehicle data corresponding to at least two data stream items.
After receiving a response packet returned by the target ECU according to the virtual channel identifier, the target device, as an embodiment of the present application, analyzes the response packet to obtain vehicle data corresponding to at least two data stream items, including:
sequentially analyzing the current value of each of at least two data stream items according to a preset sequence;
calculating a signal value corresponding to the current value of each data stream item according to a preset algorithm corresponding to each data stream item;
and combining the signal value corresponding to the current value of each data stream item with other attributes to obtain vehicle data corresponding to at least two data stream items.
The preset sequence is the sequence of the identifiers of the data stream items in the virtual channel configuration instruction. For example, the response packet includes data stream entries respectively identified as 0X0401 and 0X0405, and in the virtual channel configuration instruction, the data stream entry identified as 0X0405 is arranged after the data stream entry identified as 0X0401, and therefore, the current value of the data stream entry identified as 0X0401 is first parsed, and the current value of the data stream entry identified as 0X0405 is parsed again, assuming that the current value is two bytes, respectively X1 and X2. After parsing out the current values of the data stream items, a signal value corresponding to the current value of each data stream item is calculated according to a preset algorithm corresponding to each data stream item, for example, assuming that the preset algorithm corresponding to the data stream item identified as 0x0401 is Y ═ x1+256*x2Then the current values X1 and X2 of the data stream items identified as 0X0401 are substituted into the preset algorithm Y ═ X1+256*x2The signal values of the data stream items identified as 0X0401 are obtained Y X1+ 256X 2, and then these signal values are combined with other attributes, such as the name and unit of the data stream item, to obtain vehicle diagnostic data corresponding to the data stream item, for example, the data stream item identified as 0X0401 is a data stream relating to the engine speed, and the vehicle diagnostic data of the data stream item finally obtained is Enginespeed 7001/min.
As can be seen from the vehicle data acquiring method illustrated in fig. 2, after the target device sends the virtual channel reading instruction to the vehicle, the target device receives the response packet returned by the target ECU according to the virtual channel identifier, and acquires the vehicle data corresponding to at least two data stream items by analyzing the response packet. Because the data to be read does not need to be manually selected by a vehicle diagnosis technician as in the prior art, and the vehicle data corresponding to at least two data stream items can be obtained only by sending a virtual channel reading instruction to the target ECU, the efficiency of obtaining the vehicle data is greatly improved, and the method is particularly suitable for scenes needing to obtain a large amount of vehicle data.
Fig. 3 shows a vehicle data acquisition method provided in another embodiment of the present application, which is applied to an ECU and mainly includes steps S301 to S303, and the following is described in detail:
step S301: and receiving a virtual channel reading instruction sent by the target equipment, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier.
In the embodiment of the present application, the virtual channel reading instruction sent by the target device mainly includes a virtual channel identifier, a target ECU identifier, the function identifier, and the like, where the virtual channel identifier is used to uniquely determine a virtual channel, the virtual channel is used to transmit at least two data stream items stored by the target ECU, the target ECU identifier is used to uniquely identify which ECU the virtual channel reading instruction is sent to, and the function identifier indicates the function of the instruction or what the instruction is sent to, for example, the function identifier of the virtual channel reading instruction is 0x22f0, which indicates that the instruction is to read vehicle data. In one embodiment of the present application, before receiving a virtual channel reading instruction sent by a target device, the method further includes receiving a virtual channel configuration instruction sent by the target device, where the virtual channel configuration instruction includes a virtual channel identifier, a target ECU identifier, and a data stream item identifier; and analyzing the virtual channel configuration instruction and acquiring configuration information corresponding to the instruction. Here, the configuration data of the virtual channel corresponding to the virtual channel identifier includes an identifier of a data stream item transmitted by the virtual channel corresponding to the virtual channel identifier, and the like.
Step S302: and acquiring the data of at least two data stream items corresponding to the virtual channel identifier according to the virtual channel identifier, and generating a corresponding response packet.
Specifically, as an embodiment of the present application, the step of obtaining, according to the virtual channel identifier, data of at least two data stream items corresponding to the virtual channel identifier, and generating a corresponding response packet includes:
analyzing the virtual channel reading instruction to obtain a virtual channel identifier;
inquiring configuration data of the virtual channel corresponding to the virtual channel identifier according to the virtual channel identifier;
acquiring a data stream item identifier corresponding to the virtual channel identifier according to the configuration data;
and acquiring the current value of the data stream item corresponding to the data stream item identification, and generating a corresponding response packet.
For example, the response packet returned by the target device according to the virtual channel identifier contains the data stream items identified as 0X0401 and 0X0405, respectively, and in the virtual channel configuration instruction, the data stream item identified as 0X0405 is arranged after the data stream item identified as 0X0401, and therefore, the current value of the data stream item identified as 0X0401 is first parsed, and assuming that the current value is two bytes, X1 and X2, the data stream item identified as 0X0405 is then parsed, and so on. After parsing out the current values of the data stream items, a signal value corresponding to the current value of each data stream item is calculated according to a preset algorithm corresponding to each data stream item, for example, assuming that the preset algorithm corresponding to the data stream item identified as 0x0401 is Y ═ x1+256*x2Then the current values X1 and X2 of the data stream entry identified as 0X0401 are substituted into the preset algorithm Y-X1+256*x2The method includes obtaining a signal value of a data stream item with a value of 0X0401, where Y is X1+ 256X 2, combining the signal value with other attributes, such as the name and unit of the data stream item, to obtain vehicle diagnostic data corresponding to the data stream item, where the data stream item with a value of 0X0401 is a data stream related to the engine speed, and the vehicle diagnostic data of the data stream item is acquired as Enginespeed 7001/min.
Step S303: and returning the response packet to the target device.
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 illustrates a vehicle data acquisition apparatus, which may be applied to a target device, according to an embodiment of the present application, corresponding to the vehicle data acquisition method illustrated in fig. 1. The apparatus illustrated in fig. 4 may include a first sending module 401, a first receiving module 402, and a parsing module 403, which are described in detail as follows:
a first sending module 401, configured to send a virtual channel reading instruction to a vehicle, where the virtual channel reading instruction includes a virtual channel identifier and a target ECU identifier;
a first receiving module 402, configured to receive a response packet returned by a target ECU according to a virtual channel identifier, where the target ECU is an ECU corresponding to the target ECU identifier;
and an analyzing module 403, configured to analyze the response packet and obtain vehicle data corresponding to at least two data stream items.
Optionally, the apparatus illustrated in fig. 4 may further include an instruction generating module and a second sending module, where:
the instruction generating module is configured to generate a virtual channel configuration instruction before the first sending module 401 sends a virtual channel reading instruction to the vehicle, where the virtual channel configuration instruction includes a virtual channel identifier, a target ECU identifier, and a data stream item identifier;
and the second sending module is used for sending the virtual channel configuration instruction to the vehicle so that the target ECU corresponding to the target ECU identifier analyzes the virtual channel configuration instruction and acquires the configuration information corresponding to the instruction.
Optionally, the parsing module 403 illustrated in fig. 4 may include a current value parsing unit, a calculating unit, and a combining unit, wherein:
the current value analyzing unit is used for sequentially analyzing the current value of each data stream item in the at least two data stream items according to a preset sequence;
the calculating unit is used for calculating a signal value corresponding to the current value of each data stream item according to a preset algorithm corresponding to each data stream item;
and the combination unit is used for combining the signal value corresponding to the current value of each data stream item with other attributes to obtain the vehicle data corresponding to at least two data stream items.
It is to be understood that various implementations and combinations of implementations in the above embodiments and their advantages are also applicable to this embodiment, and are not described herein again.
Fig. 5 shows a vehicle data acquisition device provided in an embodiment of the present application, which can be applied to an ECU, corresponding to the vehicle data acquisition method shown in fig. 3. The apparatus illustrated in fig. 5 may include a second receiving module 501, a generating module 502, and a second sending module 503, which are described in detail as follows:
a second receiving module 501, configured to receive a virtual channel reading instruction sent by a target device, where the virtual channel reading instruction includes a virtual channel identifier and a target ECU identifier;
a generating module 502, configured to obtain, according to the virtual channel identifier, data of at least two data stream items corresponding to the virtual channel identifier, and generate a corresponding response packet;
a second sending module 503, configured to return the response packet to the target device.
Optionally, the apparatus illustrated in fig. 5 may further include a second receiving module and an instruction parsing module, where:
a second receiving module, configured to receive a virtual channel configuration instruction sent by a target device before the second receiving module 501 receives the virtual channel reading instruction sent by the target device, where the virtual channel configuration instruction includes a virtual channel identifier, a target ECU identifier, and a data stream item identifier;
and the instruction analysis module is used for analyzing the virtual channel configuration instruction and acquiring the configuration information corresponding to the instruction.
Optionally, the generating module 502 illustrated in fig. 5 may include an instruction parsing unit, a querying unit, an identifier obtaining unit, and a response packet generating unit, where:
the instruction analysis unit is used for analyzing the virtual channel reading instruction to obtain a virtual channel identifier;
the query unit is used for querying the configuration data of the virtual channel corresponding to the virtual channel identifier according to the virtual channel identifier;
the identification acquisition unit is used for acquiring the data stream item identification corresponding to the virtual channel identification according to the configuration data;
and the response packet generating unit is used for acquiring the current value of the data stream item corresponding to the data stream item identification and generating a corresponding response packet.
It is understood that various embodiments and combinations of the embodiments in the above embodiments and their advantages are also applicable to this embodiment, and are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device is used to implement the vehicle data acquisition apparatus illustrated in fig. 4 or fig. 5. As shown in fig. 6, the electronic device D10 of this embodiment includes: at least one processor D100 (only one is shown in fig. 6), a memory D101, and a computer program D102 stored in the memory D101 and operable on the at least one processor D100, wherein the processor D100 implements the steps of any of the method embodiments described above when executing the computer program D102. Alternatively, the processor D100, when executing the computer program D102, implements the functions of the modules/units in the device embodiments, such as the functions of the first sending module 401, the first receiving module 402, and the parsing module 403 shown in fig. 4 or the functions of the second receiving module 501, the generating module 502, and the second sending module 503 shown in fig. 5.
The electronic device D10 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The electronic device may include, but is not limited to, a processor D100, a memory D101. Those skilled in the art will appreciate that fig. 6 is merely an example of the electronic device D10 and does not constitute a limitation of the electronic device D10, and may include more or fewer components than those shown, or some components in combination, or different components, such as input output devices, network access devices, etc.
Processor D100 may be a Central Processing Unit (CPU), and Processor D100 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-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 storage D101 may be an internal storage unit of the electronic device D10 in some embodiments, such as a hard disk or a memory of the electronic device D10. In other embodiments, the memory D101 may also be an external storage device of the electronic device D10, 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 D10. Further, the memory D101 may also include both an internal storage unit and an external storage device of the electronic device D10. The memory D101 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer programs. The memory D101 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 steps in the above-mentioned method embodiments may be implemented.
The embodiments of the present application provide a computer program product, which when executed on an electronic device, enables the electronic device to implement the steps in the above method embodiments.
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/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, and 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 vehicle data acquisition method applied to a target device is characterized by comprising the following steps:
sending a virtual channel reading instruction to a vehicle, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier;
receiving a response packet returned by the target ECU according to the virtual channel identifier; the target ECU identifies a corresponding ECU for the target ECU;
and analyzing the response packet to obtain vehicle data corresponding to at least two data stream items.
2. The method of claim 1, wherein prior to said sending a virtual channel read instruction to a vehicle, the method further comprises:
generating a virtual channel configuration instruction, wherein the virtual channel configuration instruction comprises the virtual channel identifier, the target ECU identifier and a data stream item identifier;
and sending the virtual channel configuration instruction to a vehicle so that a target ECU corresponding to the target ECU identification analyzes the virtual channel configuration instruction and acquires configuration information corresponding to the instruction.
3. The method of claim 2, wherein parsing the response packet to obtain vehicle data corresponding to at least two data stream items comprises:
sequentially analyzing the current value of each of the at least two data stream items according to a preset sequence;
calculating a signal value corresponding to the current value of each data stream item according to a preset algorithm corresponding to each data stream item;
and combining the signal value corresponding to the current value of each data stream item with other attributes to obtain the vehicle data corresponding to the at least two data stream items.
4. A vehicle data acquisition method applied to an ECU (electronic control Unit), characterized by comprising the following steps:
receiving a virtual channel reading instruction sent by target equipment, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier;
acquiring data of at least two data stream items corresponding to the virtual channel identifier according to the virtual channel identifier, and generating a corresponding response packet;
and returning the response packet to the target device.
5. The method of claim 4, wherein prior to the receiving the virtual channel read instruction sent by the target device, the method further comprises:
receiving a virtual channel configuration instruction sent by the target device, wherein the virtual channel configuration instruction comprises a virtual channel identifier, a target ECU identifier and a data stream item identifier;
and analyzing the virtual channel configuration instruction and acquiring configuration information corresponding to the instruction.
6. The method of claim 5, wherein the obtaining data of at least two data stream items corresponding to the virtual channel identifier according to the virtual channel identifier and generating a corresponding response packet comprises:
analyzing the virtual channel reading instruction to obtain the virtual channel identifier;
inquiring configuration data of a virtual channel corresponding to the virtual channel identifier according to the virtual channel identifier;
acquiring a data stream item identifier corresponding to the virtual channel identifier according to the configuration data;
and acquiring the current value of the data stream item corresponding to the data stream item identification, and generating a corresponding response packet.
7. A vehicle data acquisition device applied to a target device, the device comprising:
the system comprises a first sending module, a second sending module and a control module, wherein the first sending module is used for sending a virtual channel reading instruction to a vehicle, and the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier;
the first receiving module is used for receiving a response packet returned by the target ECU according to the virtual channel identifier; the target ECU identifies a corresponding ECU for the target ECU;
and the analysis module is used for analyzing the response packet and acquiring vehicle data corresponding to at least two data stream items.
8. A vehicle data acquisition device applied to an ECU, characterized by comprising:
the second receiving module is used for receiving a virtual channel reading instruction sent by target equipment, wherein the virtual channel reading instruction comprises a virtual channel identifier and a target ECU identifier;
the generating module is used for acquiring data of at least two data stream items corresponding to the virtual channel identifier according to the virtual channel identifier and generating a corresponding response packet;
and the second sending module is used for returning the response packet to the target equipment.
9. 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 3 or 4 to 6 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 3 or 4 to 6.
CN202210290362.3A 2022-03-23 2022-03-23 Vehicle data acquisition method and device, electronic equipment and storage medium Pending CN114756585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210290362.3A CN114756585A (en) 2022-03-23 2022-03-23 Vehicle data acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210290362.3A CN114756585A (en) 2022-03-23 2022-03-23 Vehicle data acquisition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114756585A true CN114756585A (en) 2022-07-15

Family

ID=82327795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210290362.3A Pending CN114756585A (en) 2022-03-23 2022-03-23 Vehicle data acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114756585A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088488A (en) * 2023-04-12 2023-05-09 深圳市星卡科技股份有限公司 Multi-channel-based communication method and system and electronic equipment

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546585A (en) * 2013-11-19 2014-01-29 上海华东汽车信息技术有限公司 Wireless remote refreshing diagnostic system and method
US20170039856A1 (en) * 2015-08-05 2017-02-09 Lg Electronics Inc. Driver Assistance Apparatus And Vehicle Including The Same
CN106444724A (en) * 2016-11-25 2017-02-22 梧州市金正原电子科技有限公司 Intelligent vehicle diagnosis method
US20170093866A1 (en) * 2015-09-25 2017-03-30 Argus Cyber Security Ltd. System and method for controlling access to an in-vehicle communication network
CN106970609A (en) * 2017-04-22 2017-07-21 深圳市元征科技股份有限公司 The diagnostic method and vehicle diagnostics box of vehicle diagnostics box
CN107765676A (en) * 2017-11-01 2018-03-06 河北工业大学 A kind of onboard diagnostic system and its method based on Ethernet
CN107864207A (en) * 2017-11-14 2018-03-30 上海赫千电子科技有限公司 A kind of ECU software upgrade method based on vehicle-mounted Ethernet
EP3316524A1 (en) * 2016-10-28 2018-05-02 Magneti Marelli S.p.A. Protection device from cyber attacks to a vehicle through a diagnostic connector and related method
CN108303964A (en) * 2017-12-28 2018-07-20 深圳市元征科技股份有限公司 A kind of network connector and Vehicular diagnostic method
CN109660436A (en) * 2018-12-18 2019-04-19 广州亚美信息科技有限公司 A kind of double CAN channel data processing methods, gateway and system
CN111104535A (en) * 2019-11-20 2020-05-05 中国第一汽车股份有限公司 Data management system and data management method
WO2020238291A1 (en) * 2019-05-31 2020-12-03 上海赫千电子科技有限公司 Automobile ethernet-based unified diagnostic service functional addressing method
CN112034819A (en) * 2020-08-14 2020-12-04 深圳市元征科技股份有限公司 Vehicle diagnosis method, vehicle diagnosis device and diagnosis equipment
CN112055066A (en) * 2020-08-28 2020-12-08 深圳市元征科技股份有限公司 Communication method, apparatus, diagnostic device, and computer-readable storage medium
CN112184948A (en) * 2020-09-29 2021-01-05 深圳市元征科技股份有限公司 Vehicle data reading method and related equipment
CN112558584A (en) * 2020-11-18 2021-03-26 深圳市元征科技股份有限公司 Diagnostic data acquisition method and device and diagnostic equipment
CN113038421A (en) * 2021-03-25 2021-06-25 深圳市元征科技股份有限公司 Automobile diagnosis method, automobile diagnosis device and automobile gateway
US20210241549A1 (en) * 2018-12-29 2021-08-05 Autel Intelligent Technology Corf., Ltd Scanning method for electronic control unit in vehicle and vehicle diagnostic device
CN113608518A (en) * 2021-07-23 2021-11-05 深圳市元征未来汽车技术有限公司 Data generation method, device, terminal equipment and medium

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546585A (en) * 2013-11-19 2014-01-29 上海华东汽车信息技术有限公司 Wireless remote refreshing diagnostic system and method
US20170039856A1 (en) * 2015-08-05 2017-02-09 Lg Electronics Inc. Driver Assistance Apparatus And Vehicle Including The Same
US20170093866A1 (en) * 2015-09-25 2017-03-30 Argus Cyber Security Ltd. System and method for controlling access to an in-vehicle communication network
EP3316524A1 (en) * 2016-10-28 2018-05-02 Magneti Marelli S.p.A. Protection device from cyber attacks to a vehicle through a diagnostic connector and related method
CN106444724A (en) * 2016-11-25 2017-02-22 梧州市金正原电子科技有限公司 Intelligent vehicle diagnosis method
CN106970609A (en) * 2017-04-22 2017-07-21 深圳市元征科技股份有限公司 The diagnostic method and vehicle diagnostics box of vehicle diagnostics box
CN107765676A (en) * 2017-11-01 2018-03-06 河北工业大学 A kind of onboard diagnostic system and its method based on Ethernet
CN107864207A (en) * 2017-11-14 2018-03-30 上海赫千电子科技有限公司 A kind of ECU software upgrade method based on vehicle-mounted Ethernet
CN108303964A (en) * 2017-12-28 2018-07-20 深圳市元征科技股份有限公司 A kind of network connector and Vehicular diagnostic method
CN109660436A (en) * 2018-12-18 2019-04-19 广州亚美信息科技有限公司 A kind of double CAN channel data processing methods, gateway and system
US20210241549A1 (en) * 2018-12-29 2021-08-05 Autel Intelligent Technology Corf., Ltd Scanning method for electronic control unit in vehicle and vehicle diagnostic device
WO2020238291A1 (en) * 2019-05-31 2020-12-03 上海赫千电子科技有限公司 Automobile ethernet-based unified diagnostic service functional addressing method
CN111104535A (en) * 2019-11-20 2020-05-05 中国第一汽车股份有限公司 Data management system and data management method
CN112034819A (en) * 2020-08-14 2020-12-04 深圳市元征科技股份有限公司 Vehicle diagnosis method, vehicle diagnosis device and diagnosis equipment
CN112055066A (en) * 2020-08-28 2020-12-08 深圳市元征科技股份有限公司 Communication method, apparatus, diagnostic device, and computer-readable storage medium
CN112184948A (en) * 2020-09-29 2021-01-05 深圳市元征科技股份有限公司 Vehicle data reading method and related equipment
CN112558584A (en) * 2020-11-18 2021-03-26 深圳市元征科技股份有限公司 Diagnostic data acquisition method and device and diagnostic equipment
CN113038421A (en) * 2021-03-25 2021-06-25 深圳市元征科技股份有限公司 Automobile diagnosis method, automobile diagnosis device and automobile gateway
CN113608518A (en) * 2021-07-23 2021-11-05 深圳市元征未来汽车技术有限公司 Data generation method, device, terminal equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张健: ""基于SAE J 2534的车载以太网诊断通信程序接口开发"", 《上海汽车》, 4 January 2022 (2022-01-04), pages 1 - 6 *
张健;杜颖蓓;黄新华;倪明: "基于SAE J 2534的车载以太网诊断通信程序接口开发", 上海汽车, 4 January 2022 (2022-01-04), pages 1 - 6 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088488A (en) * 2023-04-12 2023-05-09 深圳市星卡科技股份有限公司 Multi-channel-based communication method and system and electronic equipment

Similar Documents

Publication Publication Date Title
CN112714134B (en) CAN message analysis method, adaptation method, device, equipment and medium
US10819792B2 (en) Device and method for extracting data from a communication bus of a motor vehicle
CN113608483B (en) Method for acquiring vehicle signal value, electronic equipment and electronic control unit
CN112558584B (en) Diagnostic data acquisition method and device and diagnostic equipment
CN110083628B (en) Addressing method and device for Electronic Control Unit (ECU) of vehicle
CN112099967A (en) Data transmission method, terminal, device, equipment and medium
CN113703868A (en) Vehicle diagnostic software configuration method, electronic device and readable storage medium
CN114756585A (en) Vehicle data acquisition method and device, electronic equipment and storage medium
CN114089713A (en) Communication method based on UDS, ECU and upper computer
CN105573294A (en) New energy automobile electronic control unit ECU based on Internet
CN113608518A (en) Data generation method, device, terminal equipment and medium
CN113645097A (en) Vehicle signal monitoring method, terminal equipment and electronic control unit
CN111693294A (en) Vehicle detection method and device, terminal equipment and storage medium
CN111552268A (en) Vehicle remote diagnosis method, equipment connector and vehicle connector
CN113489653A (en) Message sending method and device and computer equipment
CN112732982A (en) Fault code storage method and device, terminal equipment and readable storage medium
CN112927392A (en) Communication method, vehicle communication interface device and readable storage medium
CN113632510B (en) Conversion device, conversion method, and recording medium
CN114326673A (en) Vehicle remote diagnosis method and device, connector and storage medium
CN115690939A (en) Method and device for extracting EDR data of automobile and storage medium
CN115134186A (en) Data processing method and related equipment
CN113342430A (en) Fault code processing method and device, terminal equipment and readable storage medium
CN112149696B (en) Training method and device for graph embedding model
CN112099471B (en) Vehicle power type judgment method and device, terminal device and storage medium
CN109597813B (en) Vehicle data processing method and device

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