OBD device state setting method and device, OBD device and storage medium

文档序号:567667 发布日期:2021-05-18 浏览:12次 中文

阅读说明:本技术 Obd设备状态设置方法、装置、obd设备及存储介质 (OBD device state setting method and device, OBD device and storage medium ) 是由 刘均 曾良 于 2021-02-25 设计创作,主要内容包括:本申请适用于车辆技术领域,提供了OBD设备状态设置方法、装置、OBD设备及存储介质。其中,该OBD设备状态设置方法应用于第一OBD设备,所述第一OBD设备与第二OBD设备共用车辆的OBD接口,且所述第一OBD设备包含用于为所述第二OBD设备供电的供电端;所述OBD设备状态设置方法包括:获取所述供电端的状态;根据所述供电端的状态,设置所述第一OBD设备的接口状态,所述接口状态用于反映所述第一OBD设备与所述车辆的OBD接口进行数据传输的能力。本申请实施例能够避免车辆的OBD设备之间的工作冲突。(The application is applicable to the technical field of vehicles, and provides an OBD device state setting method, an OBD device state setting device, an OBD device and a storage medium. The OBD device state setting method is applied to a first OBD device, the first OBD device and a second OBD device share an OBD interface of a vehicle, and the first OBD device comprises a power supply end used for supplying power to the second OBD device; the OBD device state setting method comprises the following steps: acquiring the state of the power supply end; and setting the interface state of the first OBD equipment according to the state of the power supply end, wherein the interface state is used for reflecting the capability of the first OBD equipment for carrying out data transmission with the OBD interface of the vehicle. The embodiment of the application can avoid the work conflict between the OBD equipment of the vehicle.)

1. An OBD device state setting method is applied to a first OBD device, the first OBD device and a second OBD device share an OBD interface of a vehicle, and the first OBD device comprises a power supply terminal used for supplying power to the second OBD device; the OBD device state setting method comprises the following steps:

acquiring the state of the power supply end;

and setting the interface state of the first OBD equipment according to the state of the power supply end, wherein the interface state is used for reflecting the capability of the first OBD equipment for carrying out data transmission with the OBD interface of the vehicle.

2. The OBD device state setting method according to claim 1, wherein the setting of the interface state of the first OBD device according to the state of the power supply terminal includes:

if the power supply end is in a current load connection state, setting the interface state of the first OBD device as follows: a status of inability to transmit data to an OBD interface of the vehicle.

3. The OBD device state setting method according to claim 1, wherein the setting of the interface state of the first OBD device according to the state of the power supply terminal includes:

if the state of the power supply end is that no load connection exists currently, setting the interface state of the first OBD device: a status of data capable of being communicated to an OBD interface of the vehicle.

4. The OBD device state setting method according to claim 1, wherein the setting of the interface state of the first OBD device according to the state of the power supply terminal includes:

if the state of the power supply end is that load connection exists currently, determining a first OBD pin in an OBD interface of a vehicle used by the first OBD device and a second OBD pin in the OBD interface of the vehicle used by the second OBD device;

if the first OBD pin and the second OBD pin have coincident OBD pins, setting the interface state of the first OBD equipment as follows: a status of inability to transmit data to an OBD interface of the vehicle.

5. The OBD device state setting method according to claim 1, wherein the setting of the interface state of the first OBD device according to the state of the power supply terminal includes:

if the power supply end is in a current load connection state, acquiring the service condition of the second OBD device on an OBD interface of the vehicle;

if the second OBD device is using the OBD interface of the vehicle, setting the interface state of the first OBD device as follows: a status of inability to transmit data to an OBD interface of the vehicle.

6. The OBD device state setting method according to claim 5, wherein if the second OBD device is using the OBD interface of the vehicle, setting the interface state of the first OBD device to: after the state that the data can not be transmitted to the OBD interface of the vehicle, the method further comprises the following steps:

if the power supply end is detected to be changed into a state without load connection, or the second OBD device is detected to finish using the OBD interface of the vehicle, setting the interface state of the first OBD device as follows: a status of data capable of being communicated to an OBD interface of the vehicle.

7. The OBD device state setting method according to claim 1, wherein the setting of the interface state of the first OBD device according to the state of the power supply terminal includes:

if the power supply end is in a current load connection state, setting the interface state of the first OBD device as follows: the data of the first OBD device cannot be transmitted to the OBD interface of the vehicle, and the state of the data of the second OBD device can be transferred to the OBD interface of the vehicle.

8. The OBD device state setting device is applied to a first OBD device, the first OBD device and a second OBD device share an OBD interface of a vehicle, and the first OBD device comprises a power supply terminal for supplying power to the second OBD device; the OBD equipment state setting device includes:

a power supply terminal state acquisition unit for acquiring a state of the power supply terminal;

and the interface state setting unit is used for setting the interface state of the first OBD equipment according to the state of the power supply terminal, and the interface state is used for reflecting the data transmission capacity of the first OBD equipment and the OBD interface of the vehicle.

9. An OBD device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the computer program, when executed by the processor, causes the OBD device to carry out the steps of the method according to any of claims 1 to 7.

10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.

Technical Field

The application belongs to the technical field of vehicles, and particularly relates to an OBD device state setting method and device, an OBD device and a storage medium.

Background

At present, a vehicle usually has an On Board Diagnostics (OBD) interface, and an external device (i.e., an OBD device) having the OBD interface can be connected to the OBD interface of the vehicle, so as to establish communication with an Electronic Control Unit (ECU) of the vehicle, so as to obtain vehicle data and implement a corresponding function. However, when more than one OBD device is present in a vehicle, there may be operational conflicts between OBD devices.

Disclosure of Invention

In view of this, embodiments of the present application provide an OBD device state setting method, an OBD device state setting apparatus, an OBD device, and a storage medium, so as to solve a problem how to avoid a working conflict between OBD devices of a vehicle in the prior art.

A first aspect of an embodiment of the present application provides an OBD device state setting method, which is applied to a first OBD device, where the first OBD device and a second OBD device share an OBD interface of a vehicle, and the first OBD device includes a power supply terminal for supplying power to the second OBD device; the OBD device state setting method comprises the following steps:

acquiring the state of the power supply end;

and setting the interface state of the first OBD equipment according to the state of the power supply end, wherein the interface state is used for reflecting the capability of the first OBD equipment for carrying out data transmission with the OBD interface of the vehicle.

Optionally, the setting an interface state of the first OBD device according to the state of the power supply terminal includes:

if the power supply end is in a current load connection state, setting the interface state of the first OBD device as follows: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, the setting an interface state of the first OBD device according to the state of the power supply terminal includes:

if the state of the power supply end is that no load connection exists currently, setting the interface state of the first OBD device: a status of data capable of being communicated to an OBD interface of the vehicle.

Optionally, the setting an interface state of the first OBD device according to the state of the power supply terminal includes:

if the state of the power supply end is that load connection exists currently, determining a first OBD pin in an OBD interface of a vehicle used by the first OBD device and a second OBD pin in the OBD interface of the vehicle used by the second OBD device;

if the first OBD pin and the second OBD pin have coincident OBD pins, setting the interface state of the first OBD equipment as follows: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, the setting an interface state of the first OBD device according to the state of the power supply terminal includes:

if the power supply end is in a current load connection state, acquiring the service condition of the second OBD device on an OBD interface of the vehicle;

if the second OBD device is using the OBD interface of the vehicle, setting the interface state of the first OBD device as follows: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, if the second OBD device is using the OBD interface of the vehicle, setting the interface state of the first OBD device to be: after the state that the data can not be transmitted to the OBD interface of the vehicle, the method further comprises the following steps:

if the power supply end is detected to be changed into a state without load connection, or the second OBD device is detected to finish using the OBD interface of the vehicle, setting the interface state of the first OBD device as follows: a status of data capable of being communicated to an OBD interface of the vehicle.

Optionally, the setting an interface state of the first OBD device according to the state of the power supply terminal includes:

if the power supply end is in a current load connection state, setting the interface state of the first OBD device as follows: the data of the first OBD device cannot be transmitted to the OBD interface of the vehicle, and the state of the data of the second OBD device can be transferred to the OBD interface of the vehicle.

A second aspect of the embodiments of the present application provides an OBD device state setting apparatus, where the OBD device state setting apparatus is applied to a first OBD device, the first OBD device and a second OBD device share an OBD interface of a vehicle, and the first OBD device includes a power supply terminal for supplying power to the second OBD device; the OBD equipment state setting device includes:

a power supply terminal state acquisition unit for acquiring a state of the power supply terminal;

and the interface state setting unit is used for setting the interface state of the first OBD equipment according to the state of the power supply terminal, and the interface state is used for reflecting the data transmission capacity of the first OBD equipment and the OBD interface of the vehicle.

Optionally, the interface state setting unit is specifically configured to set the interface state of the first OBD device to be: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, the interface state setting unit is specifically configured to set the interface state of the first OBD device if the power supply end is in a state where no load connection exists: a status of data capable of being communicated to an OBD interface of the vehicle.

Optionally, the interface state setting unit is specifically configured to determine, if the state of the power supply end is that load connection currently exists, a first OBD pin in an OBD interface of a vehicle used by the first OBD device itself and a second OBD pin in an OBD interface of a vehicle used by the second OBD device; if the first OBD pin and the second OBD pin have coincident OBD pins, setting the interface state of the first OBD equipment as follows: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, the interface state setting unit is specifically configured to, if the state of the power supply end is that load connection currently exists, obtain a use condition of the second OBD device for the OBD interface of the vehicle; if the second OBD device is using the OBD interface of the vehicle, setting the interface state of the first OBD device as follows: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, the interface state setting unit is further configured to set the interface state of the first OBD device to be, if it is detected that the state of the power supply terminal is changed to be not connected to a load, or it is detected that the second OBD device has finished using the OBD interface of the vehicle: a status of data capable of being communicated to an OBD interface of the vehicle.

Optionally, the interface state setting unit is specifically configured to set the interface state of the first OBD device to be: the data of the first OBD device cannot be transmitted to the OBD interface of the vehicle, and the state of the data of the second OBD device can be transferred to the OBD interface of the vehicle.

A third aspect of embodiments of the present application provides an OBD device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, which when executed by the processor, causes the OBD device to implement the steps of the OBD device state setting method as described above.

A fourth aspect of embodiments of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes an OBD device to carry out the steps of the OBD device state setting method as described.

A fifth aspect of embodiments of the present application provides a computer program product, which, when run on an OBD device, causes the OBD device to perform the steps of the OBD device state setting method according to any one of the above-mentioned first aspects.

Compared with the prior art, the embodiment of the application has the advantages that: in this embodiment of the present application, there are a first OBD device and a second OBD device that share an OBD interface of a vehicle, and the first OBD device includes a power supply terminal for supplying power to the second OBD device, and the OBD state setting method applied to the first OBD device includes: acquiring the state of the power supply end; and setting the interface state of the first OBD equipment according to the state of the power supply end, wherein the interface state is used for reflecting the capability of the first OBD equipment for carrying out data transmission with the OBD interface of the vehicle. Because the feeder terminal of first OBD equipment is used for supplying power to second OBD equipment, consequently first OBD equipment can be through the state that acquires the feeder terminal, confirm whether second OBD equipment inserts the power and carries out work, thereby correspond the interface state who sets up first OBD equipment, control first OBD equipment and the OBD interface of vehicle promptly and carry out data transmission's ability, in order to avoid causing data transmission confusion because first OBD equipment and second OBD equipment use the OBD interface of this vehicle simultaneously, thereby avoid the work conflict between the OBD equipment.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below.

Fig. 1 is a schematic flow chart of an implementation of an OBD device state setting method provided in an embodiment of the present application;

fig. 2 is a schematic system structure diagram of a first OBD device state setting system according to an embodiment of the present disclosure;

fig. 3 is a schematic system structure diagram of a second OBD device state setting system according to an embodiment of the present disclosure;

fig. 4 is a schematic system structure diagram of a third OBD device state setting system according to an embodiment of the present disclosure;

fig. 5 is a schematic system structure diagram of a fourth OBD device state setting system according to an embodiment of the present disclosure;

fig. 6 is a schematic diagram of an OBD device state setting apparatus according to an embodiment of the present disclosure;

fig. 7 is a schematic diagram of an OBD apparatus according to an embodiment of the present disclosure.

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.

In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.

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 is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

It should be further 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 a determination" or "in response to a detection". 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 ]".

In addition, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.

In an existing vehicle, only one vehicle OBD interface is usually present, and the vehicle OBD interface is mainly used as an environmental protection detection and diagnosis interface, so that a diagnosis device can acquire vehicle data of the vehicle through the vehicle OBD interface to obtain a corresponding environmental protection detection result or a diagnosis result. Besides being used as an environment-friendly detection and diagnosis interface, the OBD equipment can also be accessed by vehicle-mounted products (such as a vehicle-mounted image system and a vehicle-mounted network radio station) so as to realize rich vehicle-mounted functions. At present, the OBD interface of vehicle is generally occupied by this type of on-board product, when diagnostic equipment need carry out environmental protection through the OBD interface of vehicle and detect or vehicle diagnosis, generally need pull out on-board equipment, makes diagnostic equipment can insert the OBD interface of vehicle through the OBD interface line that is divided into two. However, the plugging and unplugging operation of the vehicle-mounted device is complicated, and frequent plugging and unplugging of the vehicle-mounted device may cause certain loss to an OBD interface of the vehicle or the vehicle-mounted device; although the on-board device and the diagnostic device can be physically connected to the OBD interface of the vehicle through the OBD interface line divided into two, if the on-board device and the diagnostic device use the OBD interface of the vehicle at the same time, a work conflict between the two devices may be caused, that is, the on-board device may not realize a normal function, and the environmental protection detection and diagnostic functions of the diagnostic device may be interfered and cannot be performed.

The diagnostic devices and the on-board products described above are devices that can access the OBD interface of the vehicle to obtain vehicle data, and these devices may be collectively referred to as OBD devices. As can be seen from the above analysis, at present, when there is more than one OBD device in a vehicle, there is often a working conflict between the OBD devices. In order to solve the technical problem, an embodiment of the present application provides an OBD device state setting method, an OBD device state setting apparatus, an OBD device, and a storage medium, where the OBD device state setting method is applied to a first OBD device, the first OBD device and a second OBD device share an OBD interface of a vehicle, the first OBD device includes a power supply terminal for supplying power to the second OBD device, and the OBD state setting method applied to the first OBD device includes: acquiring the state of the power supply end; and setting the interface state of the first OBD equipment according to the state of the power supply end, wherein the interface state is used for reflecting the capability of the first OBD equipment for carrying out data transmission with the OBD interface of the vehicle. Because the feeder terminal of first OBD equipment is used for supplying power to second OBD equipment, consequently first OBD equipment can be through the state that acquires the feeder terminal, confirm whether second OBD equipment inserts the power and carries out work, thereby correspond the interface state who sets up first OBD equipment, control first OBD equipment and the OBD interface of vehicle promptly and carry out data transmission's ability, in order to avoid causing data transmission confusion because first OBD equipment and second OBD equipment use the OBD interface of this vehicle simultaneously, thereby avoid the work conflict between the OBD equipment.

The first embodiment is as follows:

fig. 1 shows a schematic flowchart of an OBD device state setting method provided in an embodiment of the present application, where an execution subject of the OBD device state setting method is a first OBD device. Specifically, the first OBD device and the second OBD device share an OBD interface of the vehicle, and the first OBD device comprises a power supply terminal for supplying power to the second OBD device. The first OBD device may be an OBD interface of a frequently used vehicle, an OBD device that is physically connected to the OBD interface of the vehicle for a long time, such as an on-board product that is installed on the vehicle. The second OBD device may be an OBD device with a low time usage of the OBD interface of the vehicle, such as a diagnostic device, or other on-board device that is not commonly used, and the number of the second OBD devices may be one or more. In an embodiment of the present application, the OBD interface of the vehicle includes a power pin capable of providing power to the OBD device, and includes other pins related to signal transmission or undefined except for the power pin. The first OBD device and the second OBD device share the OBD interface of the vehicle, which means that the first OBD device and the second OBD device can be physically connected with pins related to signal transmission in the OBD interface of the vehicle, so as to acquire vehicle data through the pins when needed. Specifically, in this embodiment of the present application, the first OBD device establishes physical connection with all pins of the OBD interface of the vehicle, the power supply source of the first OBD device is a power pin of the OBD interface of the vehicle, and the first OBD device can establish physical connection with a pin related to signal transmission in the OBD interface of the vehicle. And the second OBD equipment is in physical connection with other pins except the power supply pin in the OBD interface of the vehicle, and the power supply source of the second OBD equipment is the power supply end of the second OBD equipment.

Fig. 2 exemplarily shows a schematic diagram of a first OBD device state setting system corresponding to the OBD device state setting method according to the embodiment of the present application. The first OBD device is connected with a power supply pin of an OBD interface of the vehicle through a power supply line to obtain a power supply, and is also connected with other pins in the OBD interface of the vehicle through a wire harness except the power supply line, so that data communication can be achieved with an ECU of the vehicle through the other pins. And the second OBD device establishes direct physical connection with other pins except the power supply pin in the OBD interface of the vehicle only through the wire harness except the power supply wire, so that data communication can be realized with the ECU of the vehicle, and the power supply source of the second OBD device is the first OBD device and is connected with the power supply end of the first OBD device through the power supply wire to obtain the power supply. Illustratively, similar to the OBD device status setting system shown in fig. 2, the OBD device status setting system in the embodiment of the present application may also be as shown in fig. 3. In fig. 3, the OBD interface of the vehicle is physically connected to the first OBD device and the second OBD device by a specially designed OBD interface line 3. Wherein, the first OBD interface 31 of the OBD interface line 3 establishes connection with the OBD interface of the vehicle; the second OBD interface 32 of the OBD interface cable 3 is connected with all pins of the first OBD interface 31 through all harnesses of the OBD interface, so that after the OBD interface of the first OBD device is connected with the second OBD interface 32, the power pins in the OBD interface of the vehicle can be used to obtain power, and data communication can be realized with the ECU of the vehicle through other pins. The third OBD interface 33 of the OBD interface cord 3 is connected to the first OBD interface 31 through the wiring harness except the power cord, so that after the other pins except the power cord of the OBD interface of the second OBD device are connected to the third OBD interface 33, data communication with the ECU of the vehicle can be achieved by using all the other pins except the power cord in the OBD interface of the vehicle, and the power cord in the OBD interface of the second OBD device is specifically connected to the power supply terminal of the first OBD device through the power cord to obtain the power supply.

Exemplarily, fig. 4 shows a schematic diagram of another OBD device state setting system corresponding to the OBD device state setting method according to the embodiment of the present application. Wherein, the first OBD device directly establishes physical connection with all pins of the OBD interface of the vehicle through a wire harness. The second OBD device is connected with the power supply end of the first OBD device through the power supply line to obtain a power supply; and the second OBD device is also physically connected with the first OBD device through a wire harness except the power line so as to be indirectly connected with a signal pin of an OBD interface of the vehicle through the first OBD device, and therefore data communication can be indirectly achieved with an ECU of the vehicle. Illustratively, similar to the OBD device state setting system shown in fig. 4, the OBD device state setting system in the embodiment of the present application may also be as shown in fig. 5. Wherein the first OBD device comprises two OBD interfaces and the second OBD device comprises one OBD interface; one OBD interface of the first OBD device is connected with all pins of the OBD interface of the vehicle, so that power can be obtained through the OBD interface of the vehicle, and data communication can be achieved with an ECU (electronic control unit) of the vehicle. The other OBD interface of the first OBD device is connected with all pins of the OBD interface of the second OBD device, wherein a power supply pin in the other OBD interface is a power supply terminal of the first OBD device and can supply power to the second OBD device, and other pins except the power supply pin in the other OBD interface can transfer data from the OBD interface of the vehicle, so that indirect data transmission between the second OBD device and the OBD interface of the vehicle is realized, and the second OBD device can indirectly realize data communication with an ECU of the vehicle.

The OBD device status setting method shown in fig. 1 is detailed as follows:

in S101, the state of the power supply terminal is acquired.

In this embodiment of the application, the first OBD device may acquire the state of the power supply terminal of the first OBD device in real time or at preset time intervals. Wherein, the state of the power supply terminal may include: two different states, load connection, and no load connection, exist. The presence of a load connection means that there is currently a second OBD device connected to the power supply terminal through which power is obtained. The absence of load connection means that the second OBD device is not connected to the power supply terminal, or the second OBD device is not connected to the power supply terminal and then obtains power through the power supply terminal. Specifically, the first OBD device may have a load detection module, and detect whether there is a current output from the power supply terminal through the load detection module, so as to determine the state of the power supply terminal.

In S102, an interface state of the first OBD device is set according to the state of the power supply terminal, where the interface state is used to reflect a capability of the first OBD device to perform data transmission with an OBD interface of the vehicle.

After the state of the power supply terminal is obtained, the interface state of the first OBD device may be set correspondingly according to the state of the power supply terminal. The interface status is used to reflect the ability of the first OBD device to perform data transmission with the OBD interface of the vehicle. Specifically, the interface state may include: a first state and a second state. The first state is: the first OBD device cannot use a signal pin of an OBD interface of the vehicle, and data transmission between the first OBD device and the vehicle ECU cannot be achieved through the signal pin. The second state is: the first OBD equipment normally uses a signal pin of an OBD interface of the vehicle, and data transmission between the first OBD equipment and the vehicle ECU is achieved through the signal pin. In one embodiment, when the state of the power supply terminal is that there is a load connection, the interface state of the first OBD device is set to be a first state, so that the first OBD device does not occupy a signal pin of an OBD interface of the vehicle, and the second OBD device can normally use the signal pin of the OBD interface of the vehicle, that is, the second OBD device can accurately acquire vehicle data. In another embodiment, when the state of the power supply terminal is that no load connection exists, the state of the first OBD device interface is set to be the second state, so that the first OBD device can normally use a signal pin of an OBD interface of a vehicle, and data transmission between the first OBD device and the vehicle ECU is realized through the signal pin.

Optionally, the step S102 includes:

if the power supply end is in a current load connection state, setting the interface state of the first OBD device as follows: a status of inability to transmit data to an OBD interface of the vehicle.

In this embodiment of the present application, the first OBD device and the second OBD device may constitute an OBD device state setting system as shown in fig. 2 or fig. 3. When the state of the power supply end of the first OBD device is that load connection exists currently, it is described that the current second OBD device is connected to the power supply end of the first OBD device, and the current second OBD device needs to use an OBD interface of a vehicle to perform data transmission so as to acquire vehicle data. At this time, the interface state of the first OBD device is set as: a state in which data cannot be transmitted to the OBD interface of the vehicle, the state being one of the first states described above. Specifically, the OBD uses a signal port of an OBD interface of the vehicle, typically, to send a data request to the OBD interface of the vehicle, so as to obtain data returned by the ECU of the vehicle according to the data request. Therefore, when the first OBD device is in a state that data cannot be transmitted to the OBD interface of the vehicle, that is, the first OBD device does not send a data request to the OBD interface of the vehicle, the ECU of the vehicle does not return the data state to the first OBD device, so that the first OBD device does not occupy a signal pin in the OBD interface of the vehicle, and work conflict with the second OBD device is avoided. Specifically, the state in which the first OBD device cannot transmit data to the OBD interface of the vehicle may be controlled by software or hardware. In one embodiment, the interface state of the first OBD device may be set to a high impedance state, that is, a signal pin of the first OBD device connected to the OBD interface of the vehicle is set to a high impedance state, and the signal pin in the high impedance state cannot implement data transmission with the OBD interface of the vehicle, so that the first OBD device cannot transmit data to the OBD interface of the vehicle.

Optionally, the step S102 includes:

if the power supply end is in a state that no load connection exists currently, setting the interface state of the first OBD device as follows: a status of data capable of being communicated to an OBD interface of the vehicle.

In this embodiment of the application, the OBD device status setting system formed by the first OBD device and the second OBD device may also be an OBD status setting system as shown in fig. 2 or fig. 3. When the power supply end of the first OBD device is in a state that no load connection exists currently, it indicates that the second OBD device does not need to use the OBD interface of the vehicle for data transmission currently. At this time, the interface state of the first OBD device may be set as: a status of the data can be communicated to an OBD interface of the vehicle. This state is one of the above second states, for example, all pins of the first OBD device connected to the OBD interface of the vehicle may be set to a non-high impedance state and/or may be controlled by software so that the first OBD device can normally perform data transmission with the OBD interface of the vehicle. Specifically, in this state, the first OBD device can normally send a data request to the OBD interface of the vehicle according to its own functional requirements, and normally acquire data returned by the ECU of the vehicle through the OBD interface of the vehicle. By the method, the first OBD device can normally use the OBD interface of the vehicle to realize the function of the first OBD device on the premise that the first OBD device does not work with the second OBD device.

Optionally, the step S102 includes:

if the state of the power supply end is that load connection exists currently, determining a first OBD pin in an OBD interface of a vehicle used by the first OBD device and a second OBD pin in the OBD interface of the vehicle used by the second OBD device;

if the first OBD pin and the second OBD pin have coincident OBD pins, setting the interface state of the first OBD equipment as follows: a status of inability to transmit data to an OBD interface of the vehicle.

In this application embodiment, the OBD interface of the vehicle has a plurality of OBD pins, and when the state of the power supply terminal is that there is a load connection currently, it indicates that the current second OBD device is accessed to obtain a power supply to work, and the OBD interface of the vehicle needs to be used for data transmission. At this time, the first OBD device may determine, through information stored in itself (for example, a stored own communication protocol), a first OBD pin in an OBD interface of the vehicle that is required to be used by itself; and determining a second OBD pin in the vehicle OBD interface used by the second OBD device through information stored by the second OBD device (for example, storing a communication protocol of the second OBD device), or information acquired from the second OBD device through wireless communication or wired communication (for example, receiving a pin number of an OBD pin, which is sent by the second OBD device and is required to be used by the second OBD device).

After confirming first OBD pin and second OBD pin, if judge that first OBD pin and second OBD pin have the OBD pin of coincidence, then explain that present first OBD equipment and second OBD equipment can have the work conflict, at this moment, set up the interface state of first OBD equipment and be: the state of the OBD interface transmission data of unable to the vehicle for first OBD equipment does not occupy the OBD interface of vehicle and carries out data transmission, thereby avoids the work conflict of first OBD equipment and second OBD equipment, makes second OBD equipment normally work. On the contrary, if there is no coincident OBD pin between the first OBD pin and the second OBD pin, it indicates that there is no work conflict between the first OBD device and the second OBD device, and there is no data interference between them, so that at this time, the interface state of the first OBD device may be set as: the state of data can be transmitted to the OBD interface of the vehicle, so that the first OBD device and the second OBD device can simultaneously use the OBD interface of the vehicle on the premise of no work conflict. Exemplarily, let the pin definition of the OBD interface of the vehicle be as shown in table 1:

TABLE 1

Pin number Definition of functions
1、3、8、9、11、12、13 Is not defined
2 SAE J1850 bus
4 Chassis ground wire
5 Signal ground wire
6 CAN-H
7 ISO 14230-4K line
10 SAE J1850 bus
14 CAN-L
15 ISO14230-4L line
16 Power supply

If first OBD equipment, second OBD equipment all adopt Control Area Network (CAN) protocol to carry out data communication, first OBD pin and second OBD pin are the pin that pin sequence number is 6 and 14, then first OBD pin and second OBD pin have the pin of coincidence, and the interface state that sets up first OBD equipment this moment is: the status of the data cannot be communicated to the vehicle's OBD interface to avoid operational conflicts. If the first OBD device adopts a CAN protocol to carry out data communication, the first OBD pin comprises pins with pin numbers of 6 and 14, the second OBD device adopts K-L line communication defined in an automobile diagnosis protocol ISO14230-4, the second OBD pin comprises pins with pin numbers of 7 and 15, no coincident pin exists between the first OBD device and the second OBD device, and the interface state of the first OBD device is set as follows: a status of the data can be communicated to the OBD interface of the vehicle, thereby enabling the first OBD device and the second OBD device to function normally at the same time.

Optionally, the step S102 includes:

if the power supply end is in a current load connection state, acquiring the service condition of the second OBD device on an OBD interface of the vehicle;

if the second OBD device is using the OBD interface of the vehicle, setting the interface state of the first OBD device as follows: a status of inability to transmit data to an OBD interface of the vehicle.

In this embodiment of the application, when the power supply end of the first OBD device is in a state where there is a load connection currently, it is described that the second OBD device is connected, and at this time, the use condition of the second OBD device for the OBD interface of the vehicle is further obtained in a wireless or wired communication manner. For example, the first OBD device may send an OBD interface usage information obtaining request to the second OBD device, and receive OBD interface usage information returned by the second OBD device, thereby obtaining a usage of the OBD interface of the vehicle by the second OBD device.

When the service condition of the second OBD device for the OBD interface of the vehicle is obtained, the second OBD device is using the OBD interface of the vehicle, and at this time, the interface state of the first OBD device is set as: a status of data not being communicated to the OBD interface of the vehicle. Conversely, if the second OBD device is used for the OBD interface of the vehicle: at present, the second OBD device does not use the OBD interface of the vehicle, which indicates that the second OBD device is only accessed to obtain the power supply, and does not yet work, and does not need to use the OBD interface of the vehicle, and at this time, the interface state of the first OBD device can be maintained as follows: a status of the data can be communicated to the OBD interface of the vehicle, thereby enabling the first OBD device to operate normally using the OBD interface of the vehicle.

In this embodiment of the application, since the service condition of the OBD interface of the vehicle by the second OBD device can be further obtained when the state of the power supply terminal is that the load connection currently exists, when it is further confirmed that the OBD interface of the vehicle needs to be used by the second OBD device, the interface state of the first OBD device is controlled again to be: the status of the data of the first OBD device cannot be communicated to the OBD interface of the vehicle, thereby accurately avoiding operational conflicts.

Optionally, if the second OBD device is using the OBD interface of the vehicle, setting the interface state of the first OBD device to be: after the state that the data can not be transmitted to the OBD interface of the vehicle, the method further comprises the following steps:

if the power supply end is detected to be changed into a state without load connection, or the second OBD device is detected to finish using the OBD interface of the vehicle, setting the interface state of the first OBD device as follows: a status of data capable of being communicated to an OBD interface of the vehicle.

In this embodiment of the application, after the first OBD device is set to be unable to transmit data through the OBD interface of the vehicle to avoid causing operation interference to the second OBD device, if it is detected that the state of the power supply terminal is changed to be non-load-connected, that is, the second OBD device is disconnected, or it is detected that the second OBD device has finished using the OBD interface of the vehicle (for example, feedback information sent by the second OBD device that has finished operating is received), it indicates that the current second OBD device has no need of using the OBD interface of the vehicle, and at this time, the interface state recovery of the first OBD device is set to: the state of data can be transmitted to the OBD interface of the vehicle, so that the first OBD device can recover normal use of the OBD interface of the vehicle, and normal functions of the first OBD device are achieved.

Optionally, the step S102 includes:

if the power supply end is in a current load connection state, setting the interface state of the first OBD device as follows: the data of the first OBD device cannot be transmitted to the OBD interface of the vehicle, and the state of the data of the second OBD device can be transferred to the OBD interface of the vehicle.

In this embodiment of the application, the first OBD device and the second OBD device may form an OBD device state setting system as shown in fig. 4 or fig. 5, and the first OBD device may be capable of forwarding data of the second OBD device to the OBD interface of the vehicle, so as to realize indirect use of the OBD interface of the vehicle by the second OBD device. When the state of the power supply end is that there is load connection at present, it indicates that the second OBD device needs to use the OBD interface of the vehicle at present, and at this time, the interface state of the first OBD device may be controlled in a software control or hardware switching manner: the data of the first OBD device cannot be transmitted to the OBD interface of the vehicle, and the state of the data of the second OBD device can be transferred to the OBD interface of the vehicle, so that the first OBD device can only transfer the data of the second OBD device to the OBD interface of the vehicle, and cannot transmit the data of the first OBD device to the OBD device, the first OBD device is limited not to transmit a data request to an ECU of the vehicle temporarily, and the first OBD device only serves as a forwarding device for communication between the second OBD device and the ECU of the vehicle, so that work conflicts among the OBD devices are avoided, and the second OBD device can indirectly and accurately use the OBD interface of the vehicle and accurately communicate with the ECU of the vehicle. And when the power supply end is in a state that no load exists currently, the interface state of the first OBD device can be recovered as follows: the state of the data of the first OBD device can be transmitted to the OBD interface of the vehicle, so that the first OBD device can accurately use the OBD interface of the vehicle and normally work under the condition that no work conflict with the second OBD device exists, and the function of the first OBD device is realized.

In this embodiment of the present application, there are a first OBD device and a second OBD device that share an OBD interface of a vehicle, and the first OBD device includes a power supply terminal for supplying power to the second OBD device, and the OBD state setting method applied to the first OBD device includes: acquiring the state of the power supply end; and setting the interface state of the first OBD equipment according to the state of the power supply end, wherein the interface state is used for reflecting the capability of the first OBD equipment for carrying out data transmission with the OBD interface of the vehicle. Because the feeder terminal of first OBD equipment is used for supplying power to second OBD equipment, consequently first OBD equipment can be through the state that acquires the feeder terminal, confirm whether second OBD equipment inserts the power and carries out work, thereby correspond the interface state who sets up first OBD equipment, control first OBD equipment and the OBD interface of vehicle promptly and carry out data transmission's ability, in order to avoid causing data transmission confusion because first OBD equipment and second OBD equipment use the OBD interface of this vehicle simultaneously, thereby avoid the work conflict between the OBD equipment.

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.

Example two:

fig. 6 shows a schematic structural diagram of an OBD device state setting apparatus provided in an embodiment of the present application, where the OBD device state setting apparatus is applied to a first OBD device, the first OBD device and a second OBD device share an OBD interface of a vehicle, and the first OBD device includes a power supply terminal for supplying power to the second OBD device. For convenience of explanation, only the portions related to the embodiments of the present application are shown:

this OBD equipment state setting means includes: a power supply terminal state acquisition unit 61 and an interface state setting unit 62. Wherein:

a power supply terminal state acquisition unit 61 for acquiring the state of the power supply terminal.

And an interface state setting unit 62, configured to set an interface state of the first OBD device according to the state of the power supply terminal, where the interface state is used to reflect a capability of the first OBD device to perform data transmission with an OBD interface of the vehicle.

Optionally, the interface state setting unit 62 is specifically configured to set the interface state of the first OBD device to be: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, the interface state setting unit 62 is specifically configured to set the interface state of the first OBD device if the power supply end state is that no load connection exists currently: a status of data capable of being communicated to an OBD interface of the vehicle.

Optionally, the interface state setting unit 62 is specifically configured to determine, if the state of the power supply end is that there is a load connection currently, a first OBD pin in an OBD interface of a vehicle used by the first OBD device itself and a second OBD pin in an OBD interface of a vehicle used by the second OBD device; if the first OBD pin and the second OBD pin have coincident OBD pins, setting the interface state of the first OBD equipment as follows: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, the interface state setting unit 62 is specifically configured to, if the state of the power supply end is that load connection currently exists, obtain a use condition of the second OBD device for the OBD interface of the vehicle; if the second OBD device is using the OBD interface of the vehicle, setting the interface state of the first OBD device as follows: a status of inability to transmit data to an OBD interface of the vehicle.

Optionally, the interface state setting unit 62 is further configured to set the interface state of the first OBD device to be, if it is detected that the state of the power supply terminal is changed to be not connected to the load, or it is detected that the second OBD device has finished using the OBD interface of the vehicle: a status of data capable of being communicated to an OBD interface of the vehicle.

Optionally, the interface state setting unit 62 is specifically configured to set the interface state of the first OBD device to be: the data of the first OBD device cannot be transmitted to the OBD interface of the vehicle, and the state of the data of the second OBD device can be transferred to the OBD interface of the vehicle.

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.

Example three:

fig. 7 is a schematic diagram of an OBD device provided in an embodiment of the present application. As shown in fig. 7, the OBD device 7 of this embodiment includes: a processor 70, a memory 71 and a computer program 72, such as an OBD device operating program, stored in said memory 71 and operable on said processor 70. The OBD device is provided with a power terminal (not shown temporarily) so that the OBD device can provide power to other OBD devices through the power terminal. The processor 70, when executing the computer program 72, implements the steps in the various OBD device status setting method embodiments described above, such as steps S101 to S102 shown in fig. 1. Alternatively, the processor 70 executes the computer program 72 to implement the functions of the modules/units in the device embodiments, such as the functions of the power supply terminal state acquiring unit 61 to the interface state setting unit 62 shown in fig. 6.

Illustratively, the computer program 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 72 in the OBD device 7.

The OBD device 7 may be any computing device capable of establishing a connection with an OBD interface of a vehicle, such as an on-board device or a diagnostic device. The OBD device may include, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is merely an example of an OBD device 7 and does not constitute a limitation of the OBD device 7 and may include more or less components than those shown, or some components may be combined, or different components, for example the OBD device may also include input output devices, network access devices, buses, etc.

The Processor 70 may be a Central Processing Unit (CPU), 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 memory 71 may be an internal storage unit of the OBD device 7, such as a hard disk or a memory of the OBD device 7. The memory 71 may also be an external storage device of the OBD device 7, 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 OBD device 7. Further, the memory 71 may also include both an internal memory unit and an external memory device of the OBD device 7. The memory 71 is used for storing the computer program and other programs and data required by the OBD device. The memory 71 may also be used to temporarily store data that has been output or is to be output.

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.

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/OBD device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/OBD device 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 implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. 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.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize 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: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.

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.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种数据的采集方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!