Vehicle diagnosis method and device, electronic equipment and computer readable storage medium

By monitoring the IP allocation requests of the target vehicle through the VCI diagnostic box and dynamically adjusting the IP address, the problem that existing diagnostic instruments can only support a single IP address is solved, thus achieving efficient vehicle diagnostics.

CN116781737BActive Publication Date: 2026-03-17LAUNCH TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing technologies, diagnostic tools can only support either static IP or dynamic IP, which leads to frequent code modifications required for different vehicle diagnostic scenarios, reducing vehicle diagnostic efficiency.

Method used

The VCI diagnostic box monitors the IP allocation requests of the target vehicle and dynamically assigns IP addresses to the diagnostic equipment and the target vehicle, enabling automatic switching between dynamic and static IP addresses to ensure that the diagnostic equipment, VCI diagnostic box, and target vehicle are on the same network segment.

Benefits of technology

It enables vehicle diagnostics to be performed without frequent code modifications in different diagnostic scenarios, improving efficiency and flexibility, and supporting simultaneous diagnostics of static and dynamic IP addresses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781737B_ABST
    Figure CN116781737B_ABST
Patent Text Reader

Abstract

The application discloses a vehicle diagnosis method, comprising: monitoring a target vehicle; when an IP allocation request initiated by the target vehicle is monitored, determining a first network segment to which a local IP belongs, allocating a first IP address under the first network segment to a diagnosis device, and allocating a second IP address under the first network segment to the target vehicle; when an IP allocation request initiated by the target vehicle is not monitored, determining a second network segment to which a vehicle IP belongs, allocating a third IP address under the second network segment to the diagnosis device, and setting the local IP as a preset IP address under the second network segment; and performing vehicle diagnosis on the target vehicle by the diagnosis device. The application has the technical effect of realizing more rapid and efficient vehicle diagnosis. The application also discloses a vehicle diagnosis device, an electronic device and a computer readable storage medium, which also have the above technical effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive Ethernet technology, and in particular to a vehicle diagnostic method, as well as a vehicle diagnostic device, electronic device, and computer-readable storage medium. Background Technology

[0002] Automotive diagnostics primarily utilizes diagnostic tools and accompanying diagnostic programs to detect faults in vehicles. With the increasing maturity of automotive Ethernet technology, Ethernet diagnostics has become the mainstream diagnostic communication method. Many automakers are gradually adopting Ethernet technology for vehicle diagnostics, where the diagnostic tool communicates with the vehicle gateway to achieve the goal of diagnosing the entire vehicle.

[0003] Currently, there are two methods for Ethernet diagnostics. One method involves the vehicle gateway supporting dynamic IP allocation, with the diagnostic tool acting as a DHCP (Dynamic Host Configuration Protocol) server to assign IP addresses to both the vehicle gateway and the local diagnostic device. The other method uses a static IP address for the vehicle gateway, with the diagnostic tool software pre-configuring the IP addresses of both the diagnostic tool and the local diagnostic device to ensure communication between them on the same network segment. However, current diagnostic tools often only support one of these methods. In real-world vehicle diagnostic scenarios, both static and dynamic IP methods may be used. Therefore, frequent code modifications are required for different diagnostic scenarios, which is inconvenient and reduces the efficiency of vehicle diagnostics.

[0004] Therefore, how to achieve faster and more efficient vehicle diagnostics is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a vehicle diagnostic method that can achieve faster and more efficient vehicle diagnostics; another purpose of this application is to provide a vehicle diagnostic device, electronic device, and computer-readable storage medium, all of which have the above-mentioned beneficial effects.

[0006] Firstly, this application provides a vehicle diagnostic method applied to a VCI diagnostic box, comprising:

[0007] Monitor the target vehicle;

[0008] When an IP allocation request initiated by the target vehicle is detected, the first network segment to which the local IP belongs is determined, a first IP address under the first network segment is allocated to the diagnostic device, and a second IP address under the first network segment is allocated to the target vehicle.

[0009] When no IP allocation request initiated by the target vehicle is detected, the second network segment to which the vehicle IP belongs is determined, a third IP address under the second network segment is allocated to the diagnostic device, and the local IP is set to a preset IP address under the second network segment;

[0010] Vehicle diagnostics are performed on the target vehicle using the diagnostic equipment.

[0011] Optionally, assigning a first IP address under the first network segment to the diagnostic device and assigning a second IP address under the first network segment to the target vehicle includes:

[0012] Determine the IP address pool corresponding to the first network segment;

[0013] In the IP address pool, the first IP address is selected and assigned to the diagnostic device, and the second IP address is selected and assigned to the target vehicle.

[0014] Optionally, assigning a first IP address under the first network segment to the diagnostic device and assigning a second IP address under the first network segment to the target vehicle includes:

[0015] Filter all target IP addresses under the first network segment from the total IP address pool;

[0016] Of all the target IP addresses, the first IP address is selected and assigned to the diagnostic device, and the second IP address is selected and assigned to the target vehicle.

[0017] Optionally, assigning a third IP address under the second network segment to the diagnostic device includes:

[0018] The vehicle IP and VCI identifier are sent to the diagnostic device, so that the diagnostic device can determine the second network segment based on the vehicle IP, determine the target network card based on the VCI identifier, and assign a third IP address under the second network segment to the target network card.

[0019] Optionally, setting the local IP address to a preset IP address under the second network segment includes:

[0020] The preset IP address under the second network segment is determined by querying the preset configuration file;

[0021] Set the local IP address to the preset IP address.

[0022] Optionally, after monitoring the target vehicle, the method further includes:

[0023] Determine whether the IP allocation request was detected within a preset time period;

[0024] If so, then the IP allocation request has been detected;

[0025] If not, then it is determined that the IP allocation request was not detected.

[0026] Optionally, the target vehicle is monitored, including:

[0027] When the access information of the target vehicle is detected, the vehicle diagnostic command is responded to;

[0028] The target vehicle is monitored according to the vehicle diagnostic instructions.

[0029] Secondly, this application also discloses a vehicle diagnostic device applied to a VCI diagnostic box, comprising:

[0030] The monitoring module is used to monitor the target vehicle;

[0031] The first allocation module is used to determine the first network segment to which the local IP belongs when an IP allocation request initiated by the target vehicle is detected, allocate a first IP address under the first network segment to the diagnostic device, and allocate a second IP address under the first network segment to the target vehicle.

[0032] The second allocation module is used to determine the second network segment to which the vehicle IP belongs when no IP allocation request initiated by the target vehicle is detected, allocate a third IP address under the second network segment to the diagnostic device, and set the local IP to a preset IP address under the second network segment;

[0033] The diagnostic module is used to perform vehicle diagnostics on the target vehicle in conjunction with the diagnostic equipment.

[0034] Thirdly, this application also discloses an electronic device, comprising:

[0035] Memory, used to store computer programs;

[0036] A processor for executing the computer program to implement the steps of any of the vehicle diagnostic methods described above.

[0037] Fourthly, this application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the vehicle diagnostic methods described above.

[0038] This application provides a vehicle diagnostic method applied to a VCI diagnostic box, comprising: monitoring a target vehicle; when an IP allocation request initiated by the target vehicle is detected, determining the first network segment to which the local IP belongs, allocating a first IP address under the first network segment to the diagnostic device, and allocating a second IP address under the first network segment to the target vehicle; when no IP allocation request initiated by the target vehicle is detected, determining the second network segment to which the vehicle IP belongs, allocating a third IP address under the second network segment to the diagnostic device, and setting the local IP to a preset IP address under the second network segment; and performing vehicle diagnostics on the target vehicle in conjunction with the diagnostic device.

[0039] By applying the technical solution provided in this application, during vehicle diagnostics, the VCI diagnostic box monitors the vehicle to be diagnosed (i.e., the target vehicle) to determine whether it receives an IP allocation request from the vehicle. If an IP allocation request is received, it indicates that the vehicle needs IP allocation. In this case, IP addresses within the same network segment as the local IP address can be assigned to both the diagnostic device and the target vehicle, effectively ensuring that the VCI diagnostic box, the diagnostic device, and the vehicle are on the same network segment, thus achieving dynamic IP allocation. Conversely, if no IP allocation request is received, it indicates that the vehicle does not need IP allocation. In this case, an IP address within the same network segment as the vehicle's IP address can be assigned to the diagnostic device, and its own IP address can be set to a preset IP address within the same network segment as the vehicle's IP address, effectively ensuring that the VCI diagnostic box, the diagnostic device, and the vehicle are on the same network segment, thus achieving static IP allocation. Therefore, this technical solution allows the VCI diagnostic box to simultaneously support both static and dynamic IP vehicle diagnostic methods, eliminating the need for frequent code modifications for different diagnostic scenarios and effectively improving vehicle diagnostic efficiency.

[0040] The vehicle diagnostic device, electronic device, and computer-readable storage medium provided in this application also have the above-mentioned technical effects, and will not be described in detail here. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the prior art and the embodiments of this application, the accompanying drawings used in the description of the prior art and the embodiments of this application will be briefly introduced below. Of course, the accompanying drawings described below with respect to the embodiments of this application are only a part of the embodiments in this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort, and such other drawings also fall within the protection scope of this application.

[0042] Figure 1 A schematic flowchart of a vehicle diagnostic method provided in this application;

[0043] Figure 2 A schematic diagram of the structure of a vehicle diagnostic device provided in this application;

[0044] Figure 3 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0045] The core of this application is to provide a vehicle diagnostic method that can achieve faster and more efficient vehicle diagnostics; another core aspect of this application is to provide a vehicle diagnostic device, electronic device, and computer-readable storage medium, all of which have the aforementioned beneficial effects.

[0046] To provide a clearer and more complete description of the technical solutions in the embodiments of this application, the technical solutions in the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0047] This application provides a vehicle diagnostic method.

[0048] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a vehicle diagnostic method provided in this application. The vehicle diagnostic method is applied to a VCI diagnostic box (Bluetooth connection box) and may include the following steps S101 to S104.

[0049] S101: Monitor the target vehicle.

[0050] This step aims to monitor the target vehicle, which is the vehicle that needs to be diagnosed (the aforementioned vehicle to be diagnosed). Monitoring the target vehicle mainly refers to monitoring whether an IP allocation request initiated by the target vehicle is received (to request the VCI diagnostic box to allocate an IP address for itself). If the IP allocation request is received, it means that the target vehicle needs to be allocated an IP address, which corresponds to vehicle diagnosis in the dynamic IP setting scenario. Then, proceed to S102 to achieve dynamic IP allocation. If the IP allocation request is not received, it means that the target vehicle does not need to be allocated an IP address, which corresponds to vehicle diagnosis in the static IP setting scenario. Then, proceed to S103 to achieve static IP allocation.

[0051] The monitoring of the target vehicle can be initiated in response to a vehicle diagnostic command, specifically a command to control the VCI diagnostic box to start the vehicle diagnostic process. In implementation, upon receiving a vehicle diagnostic command, the VCI diagnostic box can respond by communicating directly with the target vehicle to monitor it. Of course, the method of obtaining the vehicle diagnostic command is not unique; it can be input directly by the user through the user interface, or it can automatically respond to preset trigger conditions, such as automatically responding to the target vehicle's access signal. This application does not limit the specific method of obtaining the vehicle diagnostic command.

[0052] S102: When an IP allocation request initiated by the target vehicle is detected, determine the first network segment to which the local IP belongs, allocate the first IP address under the first network segment to the diagnostic device, and allocate the second IP address under the first network segment to the target vehicle.

[0053] This step aims to achieve dynamic IP allocation. For the VCI diagnostic box, when it detects an IP allocation request initiated by the target vehicle, it can determine that vehicle diagnostics in the current scenario requiring dynamic IP settings are needed. At this time, it can first determine the network segment to which the local IP belongs, namely the first network segment mentioned above. Here, the local IP is the IP address of the VCI diagnostic box. Then, it assigns other IP addresses under the first network segment to the diagnostic device and the target vehicle respectively. That is, it assigns the first IP address under the first network segment to the diagnostic device and the second IP address under the first network segment to the target vehicle, ensuring that both the first IP address and the second IP address are within the first network segment. In this way, the IP addresses of the diagnostic device, the VCI diagnostic box, and the target vehicle are set within the same network segment (i.e., within the first network segment) to facilitate subsequent vehicle diagnostic operations.

[0054] S103: When no IP allocation request initiated by the target vehicle is detected, determine the second network segment to which the vehicle IP belongs, allocate a third IP address under the second network segment to the diagnostic device, and set the local IP to the preset IP address under the second network segment.

[0055] This step aims to achieve static IP allocation. For the VCI diagnostic box, when it does not detect an IP allocation request initiated by the target vehicle, it can be determined that the vehicle diagnostics in the current scenario requires static IP setting. Since the target vehicle does not need IP allocation (the target vehicle itself has an IP address), in order to ensure that the IP addresses of the diagnostic device, VCI diagnostic box, and target vehicle are within the same network segment, the IP addresses of the diagnostic device and VCI diagnostic box can be set within the network segment to which the target vehicle's IP address belongs (i.e., the second network segment mentioned above).

[0056] Based on this, we can first determine the network segment to which the vehicle's IP belongs, namely the second network segment mentioned above. The vehicle's IP is the IP address of the target vehicle. Then, we assign a third IP address under this second network segment to the diagnostic device and bind it to a preset IP address under the second network segment. For the VCI diagnostic box, it has pre-stored free IP addresses under various network segments. Therefore, we can directly query a free IP address under the second network segment and bind it, that is, set its own IP (i.e., the aforementioned local IP) to the preset IP address under the second network segment. This achieves the goal of setting the IP addresses of the diagnostic device, the VCI diagnostic box, and the target vehicle within the same network segment (i.e., within the second network segment) to facilitate subsequent vehicle diagnostic operations.

[0057] It should be noted that the VCI diagnostic box itself has DHCP service enabled when providing dynamic IP allocation service. Since the VCI diagnostic box in the vehicle diagnostic method provided in this application can support both dynamic and static IP allocation, the DHCP service of the VCI diagnostic box is enabled by default. Furthermore, when it is determined that static IP allocation is required, the DHCP service can be turned off first, and then the steps described above—determining the second network segment to which the vehicle IP belongs, assigning a third IP address under the second network segment to the diagnostic device, and binding it to a preset IP address under the second network segment—can be performed.

[0058] S104: Perform vehicle diagnostics on the target vehicle using diagnostic equipment.

[0059] This step aims to perform vehicle diagnostics. After configuring the IP addresses of the diagnostic device, VCI diagnostic box, and target vehicle to be on the same network segment based on S102 or S103, the VCI diagnostic box can then work with the diagnostic device to perform vehicle diagnostics on the target vehicle. During the vehicle diagnostic process, the VCI diagnostic box can obtain diagnostic information corresponding to the target vehicle from the diagnostic device, including but not limited to diagnostic scripts and diagnostic data, and then forward it to the target vehicle so that the target vehicle can perform vehicle diagnostics based on this diagnostic information.

[0060] As can be seen, the vehicle diagnostic method provided in this application involves the VCI diagnostic box monitoring the vehicle to be diagnosed (i.e., the target vehicle) during the diagnostic process to determine whether an IP allocation request initiated by the vehicle to be diagnosed has been received. If an IP allocation request is received, it indicates that the vehicle to be diagnosed needs IP allocation. In this case, IP addresses under the local IP network segment can be assigned to both the diagnostic device and the target vehicle to effectively ensure that the VCI diagnostic box, the diagnostic device, and the vehicle to be diagnosed are in the same network segment, thereby achieving dynamic IP allocation. Conversely, if no IP allocation request is received, it indicates that the vehicle to be diagnosed does not need IP allocation. In this case, an IP address under the vehicle IP network segment can be assigned to the diagnostic device, and its own IP address can be set to a preset IP address under the vehicle IP network segment to effectively ensure that the VCI diagnostic box, the diagnostic device, and the vehicle to be diagnosed are in the same network segment, thereby achieving static IP allocation. Therefore, this technical solution allows the VCI diagnostic box to simultaneously support both static and dynamic IP vehicle diagnostic methods, eliminating the need for frequent code modifications for different diagnostic scenarios and effectively improving vehicle diagnostic efficiency.

[0061] Based on the above embodiments:

[0062] In one embodiment of this application, the above-mentioned allocation of a first IP address under a first network segment to the diagnostic device and a second IP address under the first network segment to the target vehicle may include the following steps:

[0063] Determine the IP address pool corresponding to the first network segment;

[0064] In the IP address pool, select the first IP address to assign to the diagnostic device, and select the second IP address to assign to the target vehicle.

[0065] This application provides a method for allocating IP addresses under a first network segment to a diagnostic device and a target vehicle in a dynamic IP allocation scenario. Specifically, for different network segments, corresponding IP address pools can be pre-set. For a given network segment, all IP addresses contained in its corresponding IP address pool are IP addresses under that network segment, and all are free (unassigned) IP addresses. Therefore, after determining the first network segment to which the local IP belongs, the corresponding IP address pool can be searched. Then, two IP addresses can be randomly selected from this pool; one is assigned as the first IP address to the diagnostic device, and the other is assigned as the second IP address to the target vehicle. This achieves dynamic IP allocation.

[0066] In one embodiment of this application, the above-mentioned allocation of a first IP address under a first network segment to the diagnostic device and a second IP address under the first network segment to the target vehicle may include the following steps:

[0067] Filter all target IP addresses under the first network segment from the total IP address pool;

[0068] Of all target IP addresses, select the first IP address to assign to the diagnostic device and select the second IP address to assign to the target vehicle.

[0069] This application provides another method for allocating IP addresses under a first network segment to a diagnostic device and a target vehicle in a dynamic IP allocation scenario. Specifically, a total IP address pool can be pre-created, containing IP addresses from different network segments (essentially a mixed storage), all of which are idle IP addresses. After determining the first network segment to which the local IP belongs, all target IP addresses under that first network segment can be filtered from the total IP address pool. Then, two IP addresses are randomly selected from all target IP addresses; one is assigned as the first IP address to the diagnostic device, and the other as the second IP address to the target vehicle. This achieves dynamic IP allocation.

[0070] In one embodiment of this application, allocating a third IP address under a second network segment to the diagnostic device may include the following steps:

[0071] Send the vehicle IP and VCI identifier to the diagnostic device so that the diagnostic device can determine the second network segment based on the vehicle IP, determine the target network card based on the VCI identifier, and assign a third IP address under the second network segment to the target network card.

[0072] This application provides a method for allocating an IP address under a second network segment to a diagnostic device in a static IP allocation scenario. Specifically, allocating an IP address to a diagnostic device essentially involves setting the IP address of the network interface card (NIC) within the diagnostic device. Therefore, in the implementation process, the vehicle IP address and VCI identifier can be sent to the diagnostic device first. The vehicle IP address is used to determine its network segment (i.e., the second network segment), and the VCI identifier (the unique identifier of the VCI diagnostic box) is used to determine the NIC in the diagnostic device corresponding to the VCI diagnostic box. Thus, after determining the second network segment and the target NIC, the diagnostic device can directly allocate an IP address under the second network segment to the target NIC, which is the aforementioned third IP address.

[0073] In one embodiment of this application, setting the local IP address to a preset IP address under the second network segment may include the following steps:

[0074] Query and determine the preset IP address under the second network segment in the preset configuration file;

[0075] Set the local IP address to the default IP address.

[0076] This application provides a method for setting one's own IP address to an IP address under a second network segment in a static IP allocation scenario. Specifically, a configuration file can be pre-created, namely the aforementioned preset configuration file, which is used to store preset IP addresses under different network segments. Of course, the number of preset IP addresses under each network segment is not unique; it can be one or multiple. Based on this, after determining the second network segment to which the target vehicle belongs, the preset IP address under that second network segment can be queried in the preset configuration file. Then, the binding between the gateway and the preset IP address is achieved by setting the gateway's own IP address to that preset IP address.

[0077] In one embodiment of this application, after monitoring the target vehicle as described above, the following steps may also be included:

[0078] Determine whether an IP allocation request was detected within a preset time period;

[0079] If so, then an IP allocation request has been detected;

[0080] If not, then no IP allocation request was detected.

[0081] This application provides a method for determining whether an IP allocation request initiated by a target vehicle has been received. To avoid waiting time caused by prolonged monitoring and to ensure vehicle diagnostic efficiency, a monitoring duration can be preset, i.e., the aforementioned preset duration. Therefore, during the monitoring process, if an IP allocation request initiated by the target vehicle is received within the preset duration, it can be determined that an IP allocation request has been detected, and S102 can be continued; conversely, if no IP allocation request initiated by the target vehicle is received within the preset duration, it can be determined that no IP allocation request has been detected, and S103 can be continued.

[0082] Of course, the specific value of the preset duration does not affect the implementation of this technical solution. It can be set by technical personnel according to the actual situation. This application embodiment does not limit this.

[0083] In one embodiment of this application, the above-mentioned monitoring of the target vehicle may include the following steps:

[0084] When the access information of the target vehicle is detected, respond to the vehicle diagnostic command;

[0085] The target vehicle is monitored according to vehicle diagnostic instructions.

[0086] This application provides a method for monitoring a target vehicle. Specifically, vehicle diagnostic commands can automatically respond to the target vehicle's access information. That is, for the VCI diagnostic box, it can monitor the relevant interfaces (interfaces connected to the vehicle) in real time. Once the access information of the target vehicle is detected, it can automatically respond to the vehicle diagnostic command and then monitor the target vehicle according to the vehicle diagnostic command.

[0087] Based on the above embodiments:

[0088] This application provides another vehicle diagnostic method, the implementation process of which may include the following steps:

[0089] (1) Connect to the vehicle and open the client.

[0090] (2) The VCI diagnostic box listens to whether it receives a DHCP-IP allocation request sent by the vehicle gateway (target vehicle). If yes, then execute (3); otherwise, execute (4).

[0091] (3) Determine that the current vehicle gateway is dynamically assigned IP. The VCI diagnostic box determines the target network segment (i.e. the first network segment) based on its own IP address, and then queries the IP address under the network segment to assign to the vehicle gateway and diagnostic device, so as to set the IP address of the diagnostic device, itself and the vehicle to the same network segment; proceed to (5).

[0092] (4) Determine that the current vehicle gateway is statically assigned an IP address, disable the DHCP service, obtain the vehicle IP address and determine its network segment (i.e., the second network segment), set its own gateway IP address to the preset IP address under the second network segment specified in the preset configuration file, and bind it; upload the vehicle IP address and its own identifier to the diagnostic device, so that the diagnostic device can determine the second network segment based on the vehicle IP address, query the network card corresponding to the VCI based on the identifier information, and set the IP address of the network card to the IP address under the second network segment, thereby setting the IP addresses of the diagnostic device, itself, and the vehicle to the same network segment; proceed to (5).

[0093] (5) All three communicate for vehicle diagnostics on the same network segment.

[0094] (6) The program ends.

[0095] As can be seen, the vehicle diagnostic method provided in this application involves the VCI diagnostic box monitoring the vehicle to be diagnosed (i.e., the target vehicle) during the diagnostic process to determine whether an IP allocation request initiated by the vehicle to be diagnosed has been received. If an IP allocation request is received, it indicates that the vehicle to be diagnosed needs IP allocation. In this case, IP addresses under the local IP network segment can be assigned to both the diagnostic device and the target vehicle to effectively ensure that the VCI diagnostic box, the diagnostic device, and the vehicle to be diagnosed are in the same network segment, thereby achieving dynamic IP allocation. Conversely, if no IP allocation request is received, it indicates that the vehicle to be diagnosed does not need IP allocation. In this case, an IP address under the vehicle IP network segment can be assigned to the diagnostic device, and its own IP address can be set to a preset IP address under the vehicle IP network segment to effectively ensure that the VCI diagnostic box, the diagnostic device, and the vehicle to be diagnosed are in the same network segment, thereby achieving static IP allocation. Therefore, this technical solution allows the VCI diagnostic box to simultaneously support both static and dynamic IP vehicle diagnostic methods, eliminating the need for frequent code modifications for different diagnostic scenarios and effectively improving vehicle diagnostic efficiency.

[0096] This application provides a vehicle diagnostic device.

[0097] Please refer to Figure 2 , Figure 2 This is a schematic diagram of a vehicle diagnostic device provided in this application. The vehicle diagnostic device is applied to a VCI diagnostic box and may include:

[0098] Monitoring module 1 is used to monitor the target vehicle;

[0099] The first allocation module 2 is used to determine the first network segment to which the local IP belongs when an IP allocation request initiated by the target vehicle is detected, allocate a first IP address under the first network segment to the diagnostic device, and allocate a second IP address under the first network segment to the target vehicle.

[0100] The second allocation module 3 is used to determine the second network segment to which the vehicle IP belongs when no IP allocation request initiated by the target vehicle is detected, allocate a third IP address under the second network segment to the diagnostic device, and set the local IP to a preset IP address under the second network segment;

[0101] Diagnostic module 4 is used to perform vehicle diagnostics on the target vehicle in conjunction with diagnostic equipment.

[0102] As can be seen, the vehicle diagnostic device provided in this application, during the vehicle diagnostic process, monitors the vehicle to be diagnosed (i.e., the target vehicle) to determine whether an IP allocation request initiated by the vehicle to be diagnosed has been received. If an IP allocation request is received, it indicates that the vehicle to be diagnosed needs IP allocation. In this case, IP addresses under the local IP network segment can be assigned to both the diagnostic device and the target vehicle to effectively ensure that the VCI diagnostic box, the diagnostic device, and the vehicle to be diagnosed are in the same network segment, thereby achieving dynamic IP allocation. Conversely, if no IP allocation request is received, it indicates that the vehicle to be diagnosed does not need IP allocation. In this case, an IP address under the vehicle IP network segment can be assigned to the diagnostic device, and its own IP can be set to a preset IP address under the vehicle IP network segment to effectively ensure that the VCI diagnostic box, the diagnostic device, and the vehicle to be diagnosed are in the same network segment, thereby achieving static IP allocation. Therefore, this technical solution allows the VCI diagnostic box to simultaneously support both static and dynamic IP vehicle diagnostic methods, eliminating the need for frequent code modifications for different diagnostic scenarios and effectively improving vehicle diagnostic efficiency.

[0103] In one embodiment of this application, the first allocation module 2 can be specifically used to determine the IP address pool corresponding to the first network segment; in the IP address pool, a first IP address is selected to be allocated to the diagnostic device, and a second IP address is selected to be allocated to the target vehicle.

[0104] In one embodiment of this application, the first allocation module 2 can be specifically used to filter all target IP addresses under the first network segment in the total IP address pool; among all target IP addresses, select the first IP address to allocate to the diagnostic device, and select the second IP address to allocate to the target vehicle.

[0105] In one embodiment of this application, the second allocation module 3 described above can be specifically used to send the vehicle IP and VCI identifier to the diagnostic device, so that the diagnostic device can determine the second network segment based on the vehicle IP, determine the target network card based on the VCI identifier, and allocate a third IP address under the second network segment to the target network card.

[0106] In one embodiment of this application, the second allocation module 3 described above can be specifically used to query and determine the preset IP address under the second network segment in the preset configuration file; and set the local IP address as the preset IP address.

[0107] In one embodiment of this application, the vehicle diagnostic device may further include a judgment module, used to determine whether an IP allocation request is detected within a preset time period after the target vehicle is monitored as described above; if yes, then it is determined that an IP allocation request has been detected; if no, then it is determined that no IP allocation request has been detected.

[0108] In one embodiment of this application, the monitoring module 1 can be specifically used to respond to a vehicle diagnostic command when the access information of the target vehicle is detected; and to monitor the target vehicle according to the vehicle diagnostic command.

[0109] For a description of the apparatus provided in the embodiments of this application, please refer to the above method embodiments; further details will not be repeated here.

[0110] This application provides an electronic device.

[0111] Please refer to Figure 3 , Figure 3 This application provides a schematic diagram of the structure of an electronic device, which may include:

[0112] Memory, used to store computer programs;

[0113] A processor, used to execute computer programs, can implement the steps of any of the vehicle diagnostic methods described above.

[0114] like Figure 3 The diagram shows the structural composition of an electronic device, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, memory 11, and communication interface 12 all communicate with each other through the communication bus 13.

[0115] In this embodiment, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic devices.

[0116] The processor 10 can call programs stored in the memory 11. Specifically, the processor 10 can execute operations in the embodiments of the vehicle diagnostic method.

[0117] The memory 11 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 11 stores at least a program for implementing the following functions:

[0118] Monitor the target vehicle;

[0119] When an IP allocation request initiated by the target vehicle is detected, the first network segment to which the local IP belongs is determined, the first IP address under the first network segment is allocated to the diagnostic device, and the second IP address under the first network segment is allocated to the target vehicle.

[0120] When no IP allocation request initiated by the target vehicle is detected, determine the second network segment to which the vehicle IP belongs, allocate a third IP address under the second network segment to the diagnostic device, and set the local IP to the preset IP address under the second network segment;

[0121] Vehicle diagnostics are performed on the target vehicle using diagnostic equipment.

[0122] In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0123] In addition, memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0124] Communication interface 12 can be an interface for the communication module, used to connect with other devices or systems.

[0125] Of course, it should be noted that, Figure 3 The structure shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than Figure 3 More or fewer components as shown, or combinations of certain components.

[0126] This application provides a computer-readable storage medium.

[0127] The computer-readable storage medium provided in this application embodiment stores a computer program, which, when executed by a processor, can implement the steps of any of the vehicle diagnostic methods described above.

[0128] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0129] For a description of the computer-readable storage medium provided in the embodiments of this application, please refer to the above method embodiments; further details will not be repeated here.

[0130] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0131] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0132] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0133] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.

Claims

1. A vehicle diagnosis method characterized by, The application is applied to a VCI diagnosis box, comprising: monitoring a target vehicle; when monitoring an IP allocation request initiated by the target vehicle, determining a first network segment to which a local IP belongs, allocating a first IP address under the first network segment to a diagnosis device, and allocating a second IP address under the first network segment to the target vehicle; when not monitoring the IP allocation request initiated by the target vehicle, determining a second network segment to which a vehicle IP belongs, allocating a third IP address under the second network segment to the diagnosis device, and setting the local IP as a preset IP address under the second network segment; combining the diagnosis device to perform vehicle diagnosis on the target vehicle.

2. The vehicle diagnosis method according to claim 1, characterized by, The allocation of the first IP address under the first network segment to the diagnosis device and the allocation of the second IP address under the first network segment to the target vehicle comprise: determining an IP address pool corresponding to the first network segment; in the IP address pool, selecting the first IP address to be allocated to the diagnosis device and selecting the second IP address to be allocated to the target vehicle.

3. The vehicle diagnostic method of claim 1, wherein The allocation of the first IP address under the first network segment to the diagnosis device and the allocation of the second IP address under the first network segment to the target vehicle comprise: screening all target IP addresses under the first network segment in a total IP address pool; in all the target IP addresses, selecting the first IP address to be allocated to the diagnosis device and selecting the second IP address to be allocated to the target vehicle.

4. The vehicle diagnostic method of claim 1, wherein The allocation of the third IP address under the second network segment to the diagnosis device comprises: sending the vehicle IP and a VCI identifier to the diagnosis device, so that the diagnosis device determines the second network segment according to the vehicle IP, determines a target network card according to the VCI identifier, and allocates the third IP address under the second network segment to the target network card.

5. The vehicle diagnostic method of claim 1, wherein The setting of the local IP as the preset IP address under the second network segment comprises: inquiring and determining the preset IP address under the second network segment in a preset configuration file; setting the local IP as the preset IP address.

6. The vehicle diagnostic method of claim 1, wherein After the monitoring of the target vehicle, the method further comprises: determining whether the IP allocation request is monitored within a preset time length; if yes, it is determined that the IP allocation request is monitored; if no, it is determined that the IP allocation request is not monitored.

7. The vehicle diagnostic method of claim 1, wherein The monitoring of the target vehicle comprises: when monitoring access information of the target vehicle, responding to a vehicle diagnosis instruction; monitoring the target vehicle according to the vehicle diagnosis instruction.

8. A vehicle diagnostic apparatus characterized by comprising: The application is applied to a VCI diagnosis box, comprising: a monitoring module for monitoring a target vehicle; a first allocation module for, when monitoring an IP allocation request initiated by the target vehicle, determining a first network segment to which a local IP belongs, allocating a first IP address under the first network segment to a diagnosis device, and allocating a second IP address under the first network segment to the target vehicle; The second distribution module is configured to determine a second network segment to which the vehicle IP belongs when no IP distribution request initiated by the target vehicle is monitored, assign a third IP address under the second network segment to the diagnostic device, and set the local IP as a preset IP address under the second network segment. The diagnostic module is configured to perform vehicle diagnosis on the target vehicle in combination with the diagnostic device.

9. An electronic device, comprising: The computer program is stored in the computer readable storage medium and is executed by the processor to implement the steps of the vehicle diagnosis method according to any one of claims 1 to 7. The computer program is stored in the computer readable storage medium and is executed by the processor to implement the steps of the vehicle diagnosis method according to any one of claims 1 to 7. The computer program is stored in the computer readable storage medium and is executed by the processor to implement the steps of the vehicle diagnosis method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Video monitoring system and method for rapidly accessing web camera

    CN104601959A

  • Vehicle diagnosis system and method, electronic equipment and storage medium

    CN113359674A