[go: up one dir, main page]

CN113609053A - Data interaction method and device, electronic equipment and storage medium - Google Patents

Data interaction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113609053A
CN113609053A CN202110890730.3A CN202110890730A CN113609053A CN 113609053 A CN113609053 A CN 113609053A CN 202110890730 A CN202110890730 A CN 202110890730A CN 113609053 A CN113609053 A CN 113609053A
Authority
CN
China
Prior art keywords
data
target vehicle
bus
vehicle
data interaction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110890730.3A
Other languages
Chinese (zh)
Other versions
CN113609053B (en
Inventor
刘新
曾良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Golo Iov Data Technology Co ltd
Original Assignee
Golo Iov Data 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 Golo Iov Data Technology Co ltd filed Critical Golo Iov Data Technology Co ltd
Priority to CN202110890730.3A priority Critical patent/CN113609053B/en
Publication of CN113609053A publication Critical patent/CN113609053A/en
Application granted granted Critical
Publication of CN113609053B publication Critical patent/CN113609053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application is applicable to the technical field of vehicles, and provides a data interaction method, a data interaction device, electronic equipment and a storage medium, wherein the data interaction method applied to vehicle-mounted OBD equipment comprises the following steps: after the vehicle-mounted OBD equipment is powered on, acquiring a first data identification set contained in bus data of a target vehicle; acquiring a second data identification set contained in the bus data of the target vehicle; comparing the second data identifier set with the first data identifier set, and judging whether a newly added data identifier exists; and if so, stopping data interaction with the automobile bus of the target vehicle. The on-vehicle OBD equipment of this application embodiment can accurately avoid with the data conflict of other OBD equipment.

Description

Data interaction method and device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of vehicles, and particularly relates to a data interaction method and device, electronic equipment 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 bus data and implement a corresponding function.
In practical applications, there are cases where the OBD interface of the vehicle is physically connected to one or more OBD devices through the OBD line that is divided into two. However, there may be data collision between the OBD devices that are physically connected to the OBD interface of the vehicle at the same time, so that the OBD devices cannot normally implement their respective functions.
Disclosure of Invention
In view of this, embodiments of the present application provide a data interaction method and apparatus, an electronic device, and a storage medium, so as to solve a problem in the prior art how to avoid data collision between a vehicle-mounted OBD device and other OBD devices.
A first aspect of an embodiment of the present application provides a data interaction method, where the data interaction method is applied to a vehicle-mounted OBD device, and includes:
after the vehicle-mounted OBD equipment is powered on, acquiring a first data identification set contained in bus data of a target vehicle;
acquiring a second data identification set contained in the bus data of the target vehicle;
comparing the second data identifier set with the first data identifier set, and judging whether a newly added data identifier exists;
and if so, stopping data interaction with the automobile bus of the target vehicle.
Optionally, after the stopping the data interaction with the car bus of the target vehicle, further comprising:
acquiring a third data identification set contained in the bus data of the target vehicle;
comparing the third data identifier set with the first data identifier set, and judging whether a newly added data identifier exists;
if not, starting data interaction with the automobile bus of the target vehicle.
Optionally, after the on-board OBD device is powered on, acquiring a first data identifier set included in bus data of the target vehicle includes:
after the vehicle-mounted OBD equipment is powered on and the target vehicle is started, continuously collecting and storing data identification contained in bus data until the speed of the target vehicle reaches a first preset speed, and obtaining a first data identification set.
Optionally, the obtaining a second data identification set included in the bus data of the target vehicle includes:
and when the speed of the target vehicle is less than or equal to a second preset speed, acquiring data identifiers contained in the bus data of the target vehicle to obtain a second data identifier set.
Optionally, after the on-board OBD device is powered on, the method further includes:
and if the speed of the target vehicle is detected to be greater than a third preset speed, stopping data interaction with the automobile bus of the target vehicle.
Optionally, the determining whether there is a newly added data identifier includes:
and judging whether at least two newly added data identifications exist.
Optionally, the obtaining a second data identification set included in the bus data of the target vehicle includes:
and acquiring a second data identification set contained in the bus data of the target vehicle according to a preset frequency.
A second aspect of the embodiments of the present application provides a data interaction device, where the data interaction device is applied to an on-vehicle OBD device, and the data interaction device includes:
the first acquisition unit is used for acquiring a first data identification set contained in bus data of a target vehicle after the vehicle-mounted OBD equipment is powered on;
the second acquisition unit is used for acquiring a second data identification set contained in the bus data of the target vehicle;
the first comparison unit is used for comparing the second data identifier set with the first data identifier set and judging whether a newly added data identifier exists or not;
and the first control unit is used for stopping data interaction with the automobile bus of the target vehicle if the first control unit is used for stopping data interaction with the automobile bus of the target vehicle. Optionally, the data interaction apparatus further includes:
a third obtaining unit, configured to obtain a third data identifier set included in the bus data of the target vehicle;
the second comparison unit is used for comparing the third data identifier set with the first data identifier set and judging whether a newly added data identifier exists or not;
and the second control unit is used for starting data interaction with the automobile bus of the target vehicle if the target vehicle is not the vehicle.
Optionally, the first obtaining unit is specifically configured to continuously collect and store the data identifier included in the bus data after the vehicle-mounted OBD device is powered on and the target vehicle is started until the speed of the target vehicle reaches a first preset speed, so as to obtain a first data identifier set.
Optionally, the second obtaining unit is specifically configured to, when the speed of the target vehicle is less than or equal to a second preset speed, acquire a data identifier included in the bus data of the target vehicle, so as to obtain a second data identifier set.
Optionally, the data interaction apparatus further includes:
and the third control unit is used for stopping data interaction with the automobile bus of the target vehicle if the speed of the target vehicle is detected to be greater than a third preset speed.
Optionally, in the first comparing unit or the second comparing unit, the determining whether there is a newly added data identifier specifically includes: and judging whether at least two newly added data identifications exist.
Optionally, the second obtaining unit is specifically configured to obtain, according to a preset frequency, a second data identifier set included in the bus data of the target vehicle.
A third aspect of embodiments of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the electronic device is enabled to implement the steps of the data interaction method.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program, which, when executed by a processor, causes an electronic device to implement the steps of the data interaction method as described.
A fifth aspect of embodiments of the present application provides a computer program product, which, when run on an electronic device, causes the electronic device to execute the data interaction method of any one of the above first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, after the vehicle-mounted OBD equipment is powered on, a first data identification set contained in bus data of a target vehicle is obtained; then, a second data identification set contained in the bus data of the target vehicle is obtained, the second data identification set is compared with the first data identification set, and whether a newly added data identification exists is judged; and if so, stopping the data interaction between the vehicle-mounted OBD equipment and the automobile bus of the target vehicle. The second data identification set can be compared with the first data identification set when the on-board OBD device is just powered on, and when the fact that the newly added data identification exists is judged (namely the fact that the bus data of the current target vehicle contains the data of other OBD devices), the data interaction with the automobile bus of the target vehicle is stopped, so that the data receiving and sending conflict between the on-board OBD device and the other OBD devices can be accurately avoided, and the situation that the OBD devices work abnormally is avoided.
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 a first data interaction method provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of an implementation of a second data interaction method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a data interaction apparatus according to an embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device provided in 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.
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.
Currently, in practical applications, there are cases where an OBD interface of a vehicle is physically connected to one or more OBD devices through an OBD line that is divided into two parts. However, there may be data collision between the OBD devices that are physically connected to the OBD interface of the vehicle at the same time, so that the OBD devices cannot normally implement their respective functions.
In order to solve the technical problem, the embodiment of the application provides a data interaction method, a data interaction device, an electronic device and a storage medium, wherein after being powered on, a vehicle-mounted OBD device acquires a first data identification set contained in bus data of a target vehicle; then, a second data identification set contained in the bus data of the target vehicle is obtained, the second data identification set is compared with the first data identification set, and whether a newly added data identification exists is judged; and if so, stopping the data interaction between the vehicle-mounted OBD equipment and the automobile bus of the target vehicle. The second data identification set can be compared with the first data identification set when the on-board OBD device is just powered on, and when the fact that the newly added data identification exists is judged (namely the fact that the bus data of the current target vehicle contains the data of other OBD devices), the data interaction with the automobile bus of the target vehicle is stopped, so that the data receiving and sending conflict between the on-board OBD device and the other OBD devices can be accurately avoided, and the situation that the OBD devices work abnormally is avoided.
The first embodiment is as follows:
fig. 1 shows a schematic flow chart of a first data interaction method provided in an embodiment of the present application, where the data interaction method is applied to an on-board OBD device, and by way of example and not limitation, the on-board OBD device in the embodiment of the present application may be a device that is connected to an OBD interface of a target vehicle for a long time, and an OBD line that is divided into two parts is provided on the on-board OBD device, so that other OBD devices can access the OBD line when needed, and a physical connection with the OBD interface of the target vehicle is indirectly achieved. The data interaction method shown in fig. 1 is detailed as follows:
in S101, after the vehicle OBD device is powered on, a first data identifier set included in the bus data of the target vehicle is obtained.
In this application embodiment, the power-on of the vehicle OBD device refers to an action that the vehicle OBD device accesses an OBD interface of a target vehicle and establishes a communication connection with the target vehicle.
Generally, in the process of data communication between the OBD device and the target vehicle, the bus data transmitted by the OBD interface carries a data identifier corresponding to the OBD device, such as a system filter identifier, so that the OBD device and the target vehicle can accurately distinguish and identify the bus data corresponding to the OBD device. The bus data in the embodiment of the present application includes, but is not limited to, Controller Area Network (CAN) bus data or K-wire bus data. Wherein, K line is a communication line of OBD interface connection of vehicle. The K-line bus data is data transmitted through the K-line. Since the key protocol (KWP2000 protocol) is usually followed when data is transferred over K lines, K line bus data may be referred to as key protocol data.
In one embodiment, the bus data of the target vehicle may be collected within a short time period (e.g., 5 minutes, half an hour) after the OBD device of the vehicle is powered on, and the data identifier included in the bus data within the time period is continuously obtained until the data amount of the collected bus data reaches a first preset data amount, that is, the first data identifier set is obtained. The first data identification set covers all data identifications carried by all bus data required to be transmitted when the vehicle-mounted OBD device is communicated with a target vehicle.
In S102, a second data identification set included in the bus data of the target vehicle is acquired.
In the embodiment of the application, after the first data identifier set is obtained, the vehicle-mounted OBD device continues to acquire bus data from the target vehicle, and continuously acquires the data identifiers contained in the bus data to obtain the second data identifier set. In one embodiment, the on-board OBD device may obtain the bus data in real time to obtain the second data identifier set.
In S103, the second data identifier set is compared with the first data identifier set, and whether a new data identifier exists is determined.
After the second data identifier set is obtained, the second data identifier set is compared with the first data identifier set in step S101, and if it is determined by the comparison that a data identifier not present in the first data identifier set appears in the second data identifier set, the data identifier is determined to be a newly added data identifier. On the contrary, if the data identifiers in the second data identifier set are determined to exist in the first data identifier set through comparison, it is determined that no newly added data identifier exists currently.
In S104, if yes, data interaction with the vehicle bus of the target vehicle is stopped.
Because the first data identification set already covers each data identification carried by various bus data in the communication process of the vehicle-mounted OBD equipment and the target vehicle, the newly added data identification is the data identification carried in the bus data transmitted when the newly added other OBD equipment and the target vehicle carry out data communication.
When the newly-added data identification is determined to exist, other OBD devices which are currently detected to have data transceiving conflict with the vehicle-mounted OBD device can be determined. The data receiving and sending conflict is that the vehicle-mounted OBD equipment and other OBD equipment need occupy a bus of an OBD interface to receive and send data, so that the data receiving and sending of the vehicle-mounted OBD equipment and the OBD interface are inaccurate or the data receiving and sending of the vehicle-mounted OBD equipment and the OBD interface fail, and the two OBD equipment cannot work normally. At this point, the on-board OBD device ceases data interaction with the vehicle bus of the target vehicle.
The vehicle-mounted OBD device stops data interaction with the automobile bus of the target vehicle, namely the vehicle-mounted OBD device stops data interaction with the target vehicle for realizing self functions. In one embodiment, the on-board OBD device stops data interaction with the vehicle bus of the target vehicle by stopping sending data requests to the vehicle bus of the target vehicle, thereby avoiding occupation of the vehicle bus data. The vehicle-mounted OBD equipment can avoid data receiving and transmitting conflict between the vehicle-mounted OBD equipment and other OBD equipment by stopping data interaction with an automobile bus of a target vehicle, so that the other OBD equipment can realize normal data receiving and transmitting without interference, and the function of the OBD equipment is normally realized.
In one embodiment, the other OBD device may be a diagnostic device. The diagnostic equipment typically only needs to be accessed when the vehicle needs diagnostic service. In order to ensure that the target vehicle can normally realize vehicle diagnosis, the priority of the diagnosis equipment is higher than that of the vehicle-mounted OBD equipment, therefore, after the vehicle-mounted OBD equipment detects the diagnosis equipment with data transceiving conflict, the vehicle-mounted OBD equipment at the moment is set to be in a state of prohibiting sending data to the target vehicle, so that data interaction with a vehicle bus of the target vehicle is stopped, the bus occupation of the vehicle-mounted OBD equipment on an OBD interface is stopped, the data transceiving conflict between the vehicle-mounted OBD equipment and the diagnosis OBD equipment is avoided, the diagnosis equipment can realize normal data transceiving without interference, and the diagnosis function is realized.
In the embodiment of the application, the second data identifier set can be compared with the first data identifier set when the vehicle-mounted OBD device is just powered on, and when the situation that a newly added data identifier (namely, the situation that the bus data of the current target vehicle contains the data of other OBD devices) exists is judged, the data interaction with the automobile bus of the target vehicle is stopped, so that the data receiving and sending conflict between the vehicle-mounted OBD device and other OBD devices can be accurately avoided, the situation that the OBD device works abnormally is avoided, in addition, the method does not need extra hardware expenditure, only the software function of the vehicle-mounted OBD device needs to be upgraded, the cost is low, and the implementation is convenient.
Example two:
fig. 2 shows a schematic flow chart of a second data interaction method provided in the embodiment of the present application, where the method is applied to a vehicle-mounted OBD device, and is further improved on the basis of the method described in the first embodiment, and details of the same parts as those in the first embodiment are omitted. The data interaction method shown in fig. 2 is detailed as follows:
in S201, after the on-board OBD device is powered on, a first data identifier set included in bus data of a target vehicle is obtained.
In S202, a second data identification set included in the bus data of the target vehicle is acquired.
In S203, the second data identifier set is compared with the first data identifier set, and whether a newly added data identifier exists is determined.
In S204, if yes, data interaction with the vehicle bus of the target vehicle is stopped.
In S205, a third data identification set included in the bus data of the target vehicle is acquired.
In the embodiment of the application, the stopping of the data interaction with the automobile bus of the target vehicle by the vehicle-mounted OBD device means stopping the data interaction for realizing the self function of the vehicle-mounted OBD device. After stopping the data interaction, the vehicle-mounted OBD device can continue to monitor and collect bus data transmitted on the target vehicle, and record data identification contained in the bus data at the moment to obtain a third data identification set.
In S206, the third data identifier set is compared with the first data identifier set, and whether a new data identifier exists is determined.
After the third data identifier set is obtained, the third data identifier set is compared with the first data identifier set in step S201, and it is determined whether there is a data identifier in the third data identifier set that does not exist in the first data identifier set. At this time, the data identifier exists in the third data identifier set, and the data identifier that does not exist in the first data identifier set is the newly added data identifier.
In step S207, if not, data interaction with the vehicle bus of the target vehicle is started.
If the newly added data identifier does not exist at this time, it indicates that the other OBD device has completed the task (for example, the diagnostic device connected to the OBD interface of the target vehicle has completed the diagnostic function), and stops occupying the vehicle bus. At this moment, the on-board OBD device may start data interaction with the car bus of the target vehicle, thereby restoring the normal function of the on-board OBD device.
In the embodiment of the application, after the data interaction with the automobile bus of the target vehicle is stopped, the third data identifier set can be continuously acquired, and when the data identifier which is newly added is judged not to exist, the data interaction with the automobile bus of the target vehicle is started, so that the normal function of the vehicle-mounted OBD equipment can be timely recovered when no data conflict exists.
Optionally, the step S101 or the step S201 includes:
after the vehicle-mounted OBD equipment is powered on and the target vehicle is started, continuously collecting and storing data identification contained in bus data until the speed of the target vehicle reaches a first preset speed, and obtaining a first data identification set.
In the embodiment of the application, the vehicle-mounted OBD device generally starts to be powered on when the target vehicle is started and performs data interaction with the vehicle bus of the target vehicle, so as to implement corresponding vehicle-mounted functions (for example, functions of music playing, video playing, and the like). Therefore, the vehicle-mounted OBD equipment is specifically powered on, and the bus data of the target vehicle starts to be collected after the target vehicle is started.
Generally, in a time period from the starting of a target vehicle to the time when the speed of the target vehicle reaches a first preset speed, bus data transmitted between an on-board OBD device and the target vehicle can completely acquire all data identifiers involved in the communication of the on-board OBD device, and therefore, in the embodiment of the application, after the on-board OBD device is powered on and the target vehicle is started, the bus data is continuously acquired and data identifiers included in the bus data are stored until the speed of the target vehicle reaches the first preset speed, and the data identifiers continuously stored in the time period are collected to obtain a first data identifier set.
In one embodiment, in an initial state of each power-on of the vehicle-mounted OBD device, the power-on acquisition mark is initially set to a 1 state, and after the power-on acquisition mark is detected, the bus data is automatically acquired, and a data mark included in the bus data is acquired. Then, when the speed of the target vehicle is detected to reach a first preset speed (for example, 5 kilometers per hour), it is determined that the currently stored data identification already contains all data identifications involved in the communication of the on-board OBD device, at this time, the power-on acquisition flag is automatically cleared (that is, the power-on acquisition flag is set to 0), the continuous storage of the data identifications is suspended, and the stored data identifications are summarized into a first data identification set.
The method comprises the steps of starting a target vehicle, and when the speed of the target vehicle reaches a first preset speed, obtaining all data identifications related to the communication of the vehicle-mounted OBD device completely, so that the first data identification set can be obtained efficiently and accurately through the steps of the embodiment of the application.
The step S102 or the step S202 includes:
and when the speed of the target vehicle is less than or equal to a second preset speed, acquiring data identifiers contained in the bus data of the target vehicle to obtain a second data identifier set.
Generally, other OBD devices may be accessed when the speed of the target vehicle is not too high (for example, the diagnostic device may be accessed after the target vehicle decelerates and stops), and therefore, in this embodiment of the application, only the data identifier of the bus data needs to be continuously collected when the speed of the target vehicle is less than or equal to a second preset speed (for example, 10 kilometers per hour) to obtain a second data identifier set, and whether another OBD device which is newly accessed and performs data communication with the target vehicle currently exists may be accurately determined according to a comparison result between the second data identifier set and the first data identifier set.
In the embodiment of the application, the data identifier contained in the bus data is only required to be acquired when the speed of the target vehicle is less than or equal to the second preset speed, so that the excessive and useless data identifier can be prevented from being acquired at a high speed, and the calculation resource is saved.
Optionally, the data interaction method further includes:
and if the speed of the target vehicle is detected to be greater than a third preset speed, stopping data interaction with the automobile bus of the target vehicle.
In the embodiment of the application, when the speed of the target vehicle is too high, in order to ensure the safety of the target vehicle in the running process, excessive data communication with the target vehicle should be avoided as much as possible, so that the target vehicle can complete the vehicle running task safely without interference. Therefore, a third preset speed (which may be equal to the second preset speed) may be set in advance, and when the speed of the target vehicle is greater than the third preset speed, the on-board OBD device stops data interaction with the vehicle bus of the target vehicle, so as to improve the safety of vehicle driving. In one embodiment, the third preset speed may be equal to the second preset speed.
Optionally, the determining whether there is a newly added data identifier includes:
and judging whether at least two newly added data identifications exist.
In this embodiment of the application, when comparing the second data identifier set with the first data identifier set, or comparing the third data identifier set with the first data identifier set, it is specifically determined whether at least two new data identifiers exist in the second data identifier set or the third data identifier set. Generally, when one newly-added OBD device performs data communication with a target vehicle, a pair of data identifications corresponding to total data to be transmitted and received respectively is added for each type of bus data, namely two data identifications are added, so that whether other newly-added OBD devices exist at present can be determined more accurately through the judging mode, and data interaction of the vehicle-mounted OBD devices can be controlled more accurately.
Optionally, the step S102 or the step S202 includes:
and acquiring a second data identification set contained in the bus data of the target vehicle according to a preset frequency.
In the embodiment of the application, when the vehicle-mounted OBD device acquires the second data identifier set, the bus data of the target vehicle is specifically acquired according to the preset frequency, so that the second data identifier set is obtained. In one embodiment the predetermined frequency is 5 seconds/time, or 1 minute/time, etc.
In the embodiment of the application, the second data identifier set is collected according to a preset frequency, and compared with a real-time collection mode, the calculation resource consumed by data collection can be saved.
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. 3 shows a schematic structural diagram of a data interaction device provided in an embodiment of the present application, and for convenience of description, only parts related to the embodiment of the present application are shown:
the data interaction device comprises: a first acquisition unit 31, a second acquisition unit 32, a first comparison unit 33 and a first control unit 34. Wherein:
the first obtaining unit 31 is configured to obtain a first data identifier set included in bus data of the target vehicle after the on-board OBD device is powered on.
A second obtaining unit 32, configured to obtain a second data identification set included in the bus data of the target vehicle.
The first comparing unit 33 is configured to compare the second data identifier set with the first data identifier set, and determine whether a newly added data identifier exists.
And the first control unit 34 is used for stopping data interaction with the automobile bus of the target vehicle if the data interaction is yes.
Optionally, the data interaction apparatus further includes:
a third obtaining unit, configured to obtain a third data identifier set included in the bus data of the target vehicle;
the second comparison unit is used for comparing the third data identifier set with the first data identifier set and judging whether a newly added data identifier exists or not;
and the second control unit is used for starting data interaction with the automobile bus of the target vehicle if the target vehicle is not the vehicle.
Optionally, the first obtaining unit 31 is specifically configured to continuously collect and store the data identifier included in the bus data after the vehicle-mounted OBD device is powered on and the target vehicle is started until the speed of the target vehicle reaches a first preset speed, so as to obtain a first data identifier set.
Optionally, the second obtaining unit 32 is specifically configured to, when the speed of the target vehicle is less than or equal to a second preset speed, acquire a data identifier included in the bus data of the target vehicle, so as to obtain a second data identifier set.
Optionally, the data interaction apparatus further includes:
and the third control unit is used for stopping data interaction with the automobile bus of the target vehicle if the speed of the target vehicle is detected to be greater than a third preset speed.
Optionally, in the first comparing unit or the second comparing unit, the determining whether there is a newly added data identifier specifically includes: and judging whether at least two newly added data identifications exist.
Optionally, the second obtaining unit 32 is specifically configured to obtain, according to a preset frequency, a second data identifier set included in the bus data of the target 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.
Example three:
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42, such as a data interaction program, stored in said memory 41 and operable on said processor 40. The processor 40 executes the computer program 42 to implement the steps in the above-mentioned data interaction method embodiments, such as the steps S101 to S104 shown in fig. 1. Alternatively, the processor 40 executes the computer program 42 to implement the functions of the modules/units in the device embodiments, such as the functions of the first obtaining unit 31 to the first determining unit 34 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 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 42 in the electronic device 4.
The electronic device 4 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 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of an electronic device 4 and does not constitute a limitation of the electronic device 4 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 40 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 41 may be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, 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 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used for storing the computer program and other programs and data required by the electronic device. The memory 41 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/electronic device and method may be implemented in other ways. For example, the above-described apparatus/electronic 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 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.

Claims (10)

1. A data interaction method is applied to vehicle-mounted OBD equipment and comprises the following steps:
after the vehicle-mounted OBD equipment is powered on, acquiring a first data identification set contained in bus data of a target vehicle;
acquiring a second data identification set contained in the bus data of the target vehicle;
comparing the second data identifier set with the first data identifier set, and judging whether a newly added data identifier exists;
and if so, stopping data interaction with the automobile bus of the target vehicle.
2. The data interaction method of claim 1, further comprising, after said ceasing data interaction with the vehicle bus of the target vehicle:
acquiring a third data identification set contained in the bus data of the target vehicle;
comparing the third data identifier set with the first data identifier set, and judging whether a newly added data identifier exists;
if not, starting data interaction with the automobile bus of the target vehicle.
3. The data interaction method of claim 1, wherein the obtaining a first set of data identifiers included in bus data of a target vehicle after the on-board OBD device is powered on comprises:
after the vehicle-mounted OBD equipment is powered on and the target vehicle is started, continuously collecting and storing data identification contained in bus data until the speed of the target vehicle reaches a first preset speed, and obtaining a first data identification set.
4. The data interaction method of claim 1, wherein said obtaining a second set of data identifications contained in the bus data of the target vehicle comprises:
and when the speed of the target vehicle is less than or equal to a second preset speed, acquiring data identifiers contained in the bus data of the target vehicle to obtain a second data identifier set.
5. The data interaction method according to any one of claims 1 to 4, wherein after the on-board OBD device is powered on, the method further comprises:
and if the speed of the target vehicle is detected to be greater than a third preset speed, stopping data interaction with the automobile bus of the target vehicle.
6. The data interaction method of claim 1, wherein the determining whether the new data identifier exists comprises:
and judging whether at least two newly added data identifications exist.
7. The data interaction method of claim 1, wherein said obtaining a second set of data identifications contained in the bus data of the target vehicle comprises:
and acquiring a second data identification set contained in the bus data of the target vehicle according to a preset frequency.
8. The data interaction device is applied to vehicle-mounted OBD equipment and comprises the following components:
the first acquisition unit is used for acquiring a first data identification set contained in bus data of a target vehicle after the vehicle-mounted OBD equipment is powered on;
the second acquisition unit is used for acquiring a second data identification set contained in the bus data of the target vehicle;
the first comparison unit is used for comparing the second data identifier set with the first data identifier set and judging whether a newly added data identifier exists or not;
and the first control unit is used for stopping data interaction with the automobile bus of the target vehicle if the first control unit is used for stopping data interaction with the automobile bus of the target vehicle.
9. An electronic 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 electronic device to carry out the steps of the method according to any one 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, causes an electronic device to carry out the steps of the method according to any one of claims 1 to 7.
CN202110890730.3A 2021-08-04 2021-08-04 Data interaction method and device, electronic equipment and storage medium Active CN113609053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110890730.3A CN113609053B (en) 2021-08-04 2021-08-04 Data interaction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110890730.3A CN113609053B (en) 2021-08-04 2021-08-04 Data interaction method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113609053A true CN113609053A (en) 2021-11-05
CN113609053B CN113609053B (en) 2024-10-01

Family

ID=78306758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110890730.3A Active CN113609053B (en) 2021-08-04 2021-08-04 Data interaction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113609053B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115793614A (en) * 2022-12-06 2023-03-14 深圳市有方科技股份有限公司 Control method of on-board diagnostic apparatus, and communication cable

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201017280D0 (en) * 2005-08-19 2010-11-24 B & B Electronics Mfg Company On-board diagnostic system including automatic communications bus disconnect
CN103863220A (en) * 2014-03-27 2014-06-18 北京车云通科技有限公司 Method and system for monitoring motor vehicle data
CN204595600U (en) * 2015-04-30 2015-08-26 大连楼兰科技股份有限公司 A device for solving mutual exclusion problem of OBD equipment
CN106603360A (en) * 2016-12-02 2017-04-26 北京奇虎科技有限公司 Method and apparatus for testing security of automobile bus based on bus batch data
CN112184948A (en) * 2020-09-29 2021-01-05 深圳市元征科技股份有限公司 Vehicle data reading method and related equipment
CN112381966A (en) * 2020-11-10 2021-02-19 易显智能科技有限责任公司 Method for acquiring driving data signal and related device thereof
CN112817888A (en) * 2021-02-25 2021-05-18 深圳市轱辘车联数据技术有限公司 OBD device state setting method and device, OBD device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201017280D0 (en) * 2005-08-19 2010-11-24 B & B Electronics Mfg Company On-board diagnostic system including automatic communications bus disconnect
CN103863220A (en) * 2014-03-27 2014-06-18 北京车云通科技有限公司 Method and system for monitoring motor vehicle data
CN204595600U (en) * 2015-04-30 2015-08-26 大连楼兰科技股份有限公司 A device for solving mutual exclusion problem of OBD equipment
CN106603360A (en) * 2016-12-02 2017-04-26 北京奇虎科技有限公司 Method and apparatus for testing security of automobile bus based on bus batch data
CN112184948A (en) * 2020-09-29 2021-01-05 深圳市元征科技股份有限公司 Vehicle data reading method and related equipment
CN112381966A (en) * 2020-11-10 2021-02-19 易显智能科技有限责任公司 Method for acquiring driving data signal and related device thereof
CN112817888A (en) * 2021-02-25 2021-05-18 深圳市轱辘车联数据技术有限公司 OBD device state setting method and device, OBD device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115793614A (en) * 2022-12-06 2023-03-14 深圳市有方科技股份有限公司 Control method of on-board diagnostic apparatus, and communication cable

Also Published As

Publication number Publication date
CN113609053B (en) 2024-10-01

Similar Documents

Publication Publication Date Title
US11665018B2 (en) OBD interface bus type detection method and apparatus
CN110071904B (en) Detection method and system of vehicle-mounted terminal, server and storage medium
CN113703868B (en) Vehicle diagnosis software configuration method, electronic device and readable storage medium
CN109857085B (en) Method and system for generating driving data in simulation mode, simulation terminal and test system
US10839619B2 (en) Electronic control unit and method for connection authentication
CN109720352B (en) Vehicle driving assistance control method and apparatus
CN113489653B (en) Message sending method and device and computer equipment
CN113799601B (en) Input control method and device for vehicle-mounted LCD display screen, medium and automobile
CN113609053A (en) Data interaction method and device, electronic equipment and storage medium
CN116775375A (en) Method and system for data storage
CN112817888B (en) OBD device state setting method and device, OBD device and storage medium
CN112498326B (en) Brake signal detection method and device
CN114035549A (en) Device and method for detecting automobile fault
CN110648002B (en) Vehicle diagnosis method, device, equipment and readable storage medium
CN114900390B (en) Data transmission method, device, electronic equipment and storage medium
CN117434862A (en) Cabin driving fusion system, fault monitoring method and related equipment
CN116901700A (en) Information display method and device, vehicle-mounted controller and storage medium
CN116501016A (en) Vehicle fault code setting method, vehicle-mounted terminal and medium
CN112099471B (en) Vehicle power type judgment method and device, terminal device and storage medium
CN114141041A (en) Remote parking control method, system, storage medium and device for automobile
CN112104708A (en) Communication method and device of diagnostic equipment, electronic equipment and storage medium
CN112381966A (en) Method for acquiring driving data signal and related device thereof
EP4007241B1 (en) Communication apparatus, vehicle, system, and determination method
CN112737881A (en) Communication test method and device for electric vehicle charging equipment and terminal equipment
CN116980253A (en) Signal processing method and device, vehicle and storage medium

Legal Events

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