Address detection method, address detection device, address detection system and electronic equipment

By detecting the consistency between the target address of the declaration message and the IP address to be tested in the edge node, the problem of address detection error when the edge node has multiple addresses is solved, and the accuracy of address detection and communication security are improved.

CN118714112APending Publication Date: 2024-09-27GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410800914.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the existing technology, when an edge node has multiple IP addresses, there are errors in the address detection results, which affects the accuracy and security of communication.

Method used

By sending an identification request to the edge node, it receives and detects the consistency of the target address in the declaration message and the IP address to be tested, performs double judgment to determine the validity of the IP address to be tested, and avoids sending the IP address of the declaration message and the IP address to be tested. Measure errors caused by different IP addresses.

Benefits of technology

It improves the accuracy of edge node address detection results and the security of communication, and ensures the accuracy of IP address validity detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714112A
    Figure CN118714112A
Patent Text Reader

Abstract

The invention provides an address detection method, an address detection device, an address detection system and electronic equipment. The method comprises the steps of determining a to-be-detected IP address of an edge node in a target vehicle; an identification request of the target vehicle is sent to the edge node through the to-be-detected IP address; if the declaration message sent by the edge node is received, determining a target address for sending the declaration message; and if the target address is consistent with the to-be-tested IP address, determining that the to-be-tested IP address is an effective address. The method can improve the accuracy of the address detection result of the edge node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicles, and more specifically, to an address detection method, an address detection device, an address detection system and an electronic device. Background Art

[0002] In recent years, with the development of network technology, edge nodes in vehicles have multiple addresses, which brings huge advantages to network transmission.

[0003] However, edge nodes have multiple addresses, and not all addresses are valid. Therefore, how to improve the accuracy of the address detection results of edge nodes has become an urgent problem to be solved. Summary of the invention

[0004] The present application provides an address detection method, an address detection device, an address detection system and an electronic device, wherein the method can improve the accuracy of the address detection result of the edge node.

[0005] In a first aspect, an address detection method is provided, the method comprising: determining an IP address to be tested of an edge node in a target vehicle; sending an identification request for the target vehicle to the edge node via the IP address to be tested; if a declaration message sent by the edge node is received, determining a target address for sending the declaration message; if the target address is consistent with the IP address to be tested, determining that the IP address to be tested is a valid address.

[0006] The above technical scheme sends an identification request for the target vehicle to the edge node through the IP address to be tested. If a declaration message sent by the edge node is received, the target address of the declaration message is determined. If the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address. Since the prior art directly determines that the address is a valid address when a declaration message sent by the edge node is received, when there are multiple IP addresses at the edge node, the IP address sending the declaration message may be different from the IP address to be tested, resulting in errors in the detection results of the IP address to be tested. However, the present application, when receiving a declaration message sent by the edge node, detects the consistency between the target address of the declaration message and the IP address to be tested, and then makes a double judgment based on the response of the edge node to the identification request and the address consistency, to determine the validity of the IP address to be tested, which can avoid the influence of the difference between the IP address sending the declaration message and the IP address to be tested on the detection result, thereby improving the accuracy of the address detection result of the edge node.

[0007] In combination with the first aspect, in some possible implementations, the method also includes: obtaining the driving cycle of the target vehicle; if at least two declaration messages are received during the driving cycle, and the target addresses corresponding to the at least two declaration messages are consistent with the IP address to be tested, determining that the IP address to be tested is a valid address.

[0008] The above technical solution determines the validity of the IP address to be tested by obtaining the driving cycle of the target vehicle and detecting whether at least two declaration messages are received during the driving cycle, and whether the target addresses of at least two declaration messages are consistent with the IP address to be tested, thereby improving the detection results of the validity of the IP address.

[0009] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: the IP address to be tested is the address assigned by the server to the edge node; detecting whether there is a target message within the driving cycle; wherein the target message includes at least one of a release message and a discovery message; if the target message does not exist within the driving cycle, and at least two declaration messages are received within the driving cycle, and the target addresses corresponding to the at least two declaration messages are consistent with the IP address to be tested, it is determined that the IP address to be tested is a valid address.

[0010] The above technical scheme determines that the IP address to be tested is a valid address by detecting whether there is a target message within the driving cycle, and if there is no target message within the driving cycle, and if at least two declaration messages are received within the driving cycle, and the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested; since the IP address to be tested is a valid address when there is no target message within the driving cycle, and the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested, the accuracy of IP address detection can be improved, thereby improving the security of communication.

[0011] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: if a declaration message sent by the edge node is received; based on the declaration message, determining the vehicle identification code in the declaration message; if the vehicle identification code is consistent with the target identification code, and the target address is consistent with the IP address to be tested, determining that the IP address to be tested is a valid address; wherein, the target identification code represents the identification code of the target vehicle.

[0012] The above technical scheme sends an identification request of the target vehicle to the edge node through the IP address to be tested. If a declaration message sent by the edge node is received, the target address for sending the declaration message is determined, and based on the declaration message, the vehicle identification code in the declaration message is determined. When the vehicle identification code is consistent with the target identification code, and the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address. Since the IP address to be tested is a valid address when the target address is consistent with the IP address to be tested, and the target identification code is consistent with the vehicle identification code, the accuracy of the validity of the IP address to be tested can be improved. In addition, when the target vehicle includes multiple vehicles, the association between the target vehicle and the IP address can be determined by comparing the vehicle identification code with the target identification code, thereby improving the convenience of communication.

[0013] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: if the edge node has an address assigned by the server and an address automatically configured by the edge node, determining whether the address assigned by the server and the address automatically configured by the edge node are valid addresses; if the address automatically configured by the edge node and the address assigned by the server are both valid addresses, using the address automatically configured by the edge node as the IP address to be tested.

[0014] In the above technical scheme, when the address automatically configured by the edge node and the address assigned by the server are both valid addresses, the address automatically configured by the edge node is used as the IP address to be tested, and the validity of the address automatically configured by the edge node is detected, so as to determine whether the priority of the address assigned by the server is higher than the address automatically configured by the edge node. By detecting the priority of the edge node address, the security of edge node communication can be improved.

[0015] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: if the declaration message sent by the edge node is not received, determining that the address allocated by the server covers the address automatically configured by the edge node, and determining that the IP address to be tested is an invalid address.

[0016] In the above technical solution, if the declaration message sent by the edge node is not received, it is determined that the address assigned by the server covers the address automatically configured by the edge node, and the IP address to be tested is determined to be an invalid address; since the address assigned by the server has a higher priority than the address automatically configured by the edge node, the security of edge node communication can be improved by detecting the priority of the edge node address.

[0017] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: determining at a first moment whether the address automatically configured by the edge node is a valid address; if it is determined at the first moment that the address automatically configured by the edge node is a valid address, determining at a second moment whether the address assigned by the server is a valid address; wherein the first moment is earlier than the second moment.

[0018] The above technical solution can avoid the server-assigned address covering the edge node assigned address during the detection process, thereby improving the accuracy of edge node address detection, because the detection time of the address automatically configured by the edge node is earlier than the detection time of the address assigned by the server.

[0019] In the second aspect, an address detection device is provided, which includes: a first determination module, used to determine the IP address to be tested of the edge node in the target vehicle; a request sending module, used to send an identification request of the target vehicle to the edge node through the IP address to be tested; a second determination module, used to determine the target address for sending the declaration message if a declaration message sent by the edge node is received; and a third determination module, used to determine that the IP address to be tested is a valid address if the target address is consistent with the IP address to be tested.

[0020] In a third aspect, an address detection system is provided, comprising a diagnostic device, a server, a switch, and an edge node in a target vehicle; wherein the server is used to assign an address to the edge node, and the switch is used to communicatively connect the diagnostic device, the server, and the edge node; and the diagnostic device is used to execute the address detection method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0021] In a fourth aspect, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store executable program code; the processor is used to call and run the executable program code from the memory, so that the electronic device executes the address detection method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0022] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the address detection method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0023] In a sixth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the address detection method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a scenario diagram of an address detection method provided in an embodiment of the present application;

[0025] Figure 2 It is a schematic diagram of a framework of an address detection system provided in an embodiment of the present application;

[0026] Figure 3 is a schematic flow chart of an address detection method provided in an embodiment of the present application;

[0027] Figure 4 This is a schematic diagram of a scenario of address allocation of an edge node provided in an embodiment of the present application;

[0028] Figure 5 is a schematic flow chart of another address detection method provided in an embodiment of the present application;

[0029] Figure 6 is a schematic flow chart of another address detection method provided in an embodiment of the present application;

[0030] Figure 7 is a schematic flow chart of an address priority detection method provided in an embodiment of the present application;

[0031] Figure 8 is a structural schematic diagram of an address detection device provided in an embodiment of the present application;

[0032] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0034] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0035] Figure 1It is a scenario diagram of an address detection method provided in an embodiment of the present application.

[0036] For example, Figure 1 As shown, the switch 110 connects the target vehicle 100, the host computer 120 and the Dynamic Host Configuration Protocol Server (DHCP server) 130 for communication, so that the detection data of the edge node in the target vehicle 100 is transmitted to the DHCP server 130 or the host computer 120 through the switch 110; or, the detection data of the host computer 120 or the DHCP server 130 is transmitted to the edge node in the target vehicle 100 through the switch 110.

[0037] It is understandable that the host computer is a diagnostic device. Of course, the diagnostic device can also be a diagnostic device, a monitor, etc.

[0038] Exemplarily, the edge node in the target vehicle is assigned an address through Automatic Internet Protocol (AutoIP), which allows the target vehicle to automatically assign an Internet Protocol Address (IP address) without a DHCP server.

[0039] Exemplarily, the edge node in the target vehicle is allocated an address through a DHCP server, and the security of the address of the edge node can be improved through the DHCP server.

[0040] Optionally, the IP address to be tested may be an address assigned by a DHCP server to the edge node; or, the IP address to be tested may be an address assigned by AutoIP, that is, an address automatically configured by the edge node. The IP address to be tested may be determined according to actual conditions and is not specifically limited here.

[0041] In one example, the IP address to be tested of the edge node in the target vehicle is determined, and the IP address to be tested is the address assigned by the DHCP server, or the address automatically configured by the edge node; the host computer sends an identification request of the target vehicle to the edge node through the IP address to be tested, and the edge node receives the identification request, obtains the vehicle information of the target vehicle, and sends a declaration message to the host computer. If the host computer receives the declaration message sent by the edge node, it determines the target address of the declaration message. The host computer detects whether the target address is consistent with the IP address to be tested. If the target address is inconsistent with the IP address to be tested, it determines that the IP address to be tested is an invalid address; if the target address is consistent with the IP address to be tested, it determines that the IP address to be tested is a valid address.

[0042] In another example, an identification request of the target vehicle is sent to the edge node through the IP address to be tested. If a declaration message sent by the edge node is received, the target address of the declaration message is determined, and the target address is detected to be consistent with the IP address to be tested. If the target address is inconsistent with the IP address to be tested, the IP address to be tested is determined to be an invalid address; if the target address is consistent with the IP address to be tested, the target identification code of the target vehicle is detected to be consistent with the vehicle identification code. If the target identification code is consistent with the vehicle identification code, the IP address to be tested is determined to be an invalid address. If the target identification code is consistent with the vehicle identification code, the IP address to be tested is determined to be a valid address. That is, if the vehicle identification code is consistent with the target identification code, and the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address.

[0043] Exemplarily, the driving cycle of the target vehicle is obtained, and at least two identification requests for the target vehicle are sent to the edge node through the IP address to be tested during the driving cycle. If the host computer receives at least two declaration messages during the driving cycle; since one declaration message corresponds to one target address, and at least two declaration messages correspond to at least two target addresses, it is detected whether the IP address to be tested is consistent with the target addresses corresponding to the at least two declaration messages. When one of the target addresses corresponding to the at least two declaration messages is inconsistent with the IP address to be tested, the IP address to be tested is determined to be an invalid address; when the target address corresponding to at least two declaration messages is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address.

[0044] Furthermore, in the case that the IP address to be tested is the address assigned by the DHCP server to the edge node, it is detected whether there is a target message within the driving cycle, and the target message includes at least one of a release message and a discovery message; when there is no target message within the driving cycle, and when at least two declaration messages are received within the driving cycle, and the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested, it is determined that the IP address to be tested is a valid address.

[0045] Exemplarily, at the first moment, it is determined whether the AutoIP assigned address (the address automatically configured by the edge node) is a valid address. When the AutoIP assigned address is determined to be a valid address at the first moment, it is determined whether the address assigned by the DHCP server is a valid address at the second moment. When the address assigned by the DHCP server is determined to be a valid address at the second moment, the AutoIP assigned address is used as the IP address to be tested. It is understandable that the first moment is earlier than the second moment.

[0046] Furthermore, an identification request for the target vehicle is sent to the edge node through the AutoIP allocated address. If a declaration message sent by the edge node is received, the target address of the declaration message is determined; if the target address is consistent with the AutoIP allocated address, it is determined that the address allocated by the DHCP server is an invalid address; if the declaration message sent by the edge node is not received, it is determined that the address allocated by the server covers the address automatically configured by the edge node, and the IP address to be tested is determined to be an invalid address.

[0047] Exemplarily, during the address detection process, the edge node can process the identification request of the target vehicle and send a corresponding declaration message. For example, the identification request of the target vehicle may include the request type, request ID, vehicle license plate number, vehicle identification code, timestamp, etc.; the corresponding declaration message includes message type, response ID, current state of the vehicle, such as location, speed, driving direction, etc., license plate number, vehicle identification code, declaration message sending time, edge node information, etc.

[0048] It can be understood that the method shown above is only one possible way to identify requests and declaration messages in actual applications, and does not limit the specific content of identification requests and declaration messages in actual applications. Identification requests and declaration messages can be determined based on actual conditions and are not limited here.

[0049] It should be noted that edge nodes have multiple addresses, and not all addresses are valid. If the address of an edge node is invalid, using the address for communication may result in low reliability of communication. In view of this, the present application provides an address detection method, an address detection device, an address detection system, and an electronic device, which can improve the accuracy of the address detection result of the edge node.

[0050] Figure 2 It is a schematic diagram of the framework of an address detection system provided in an embodiment of the present application.

[0051] For example, Figure 2 (a) shows a schematic diagram of a framework of an address detection system; Figure 2 (b) in the figure shows a schematic diagram of the framework of another address detection system.

[0052] Exemplarily, the switch 230 and Figure 1 The switch 110 in the figure represents the same switch; the target vehicle 240 and Figure 1 The target vehicle 100 represents the same vehicle; the host computer 211 and Figure 1 The host computer 120 in the table represents the same host computer; the DHCP server 221 and Figure 1 The DHCP server 130 in illustrative example represents the same DHCP server.

[0053] For example, Figure 2 As shown in (a) of FIG. 1 , the address detection system 200 includes a diagnostic device 210, a server 220, a switch 230, and an edge node 250 in a target vehicle 240. The server 220 is used to assign an address to the edge node 250, and the switch 230 is used to connect the diagnostic device 210, the server 220, and the edge node 250 in the target vehicle 240 for communication; and the diagnostic device 210 is used to execute the address detection method.

[0054] For example, Figure 2 As shown in (b) in FIG. 1 , the switch 230 connects the host computer 211 , the DHCP server 221 and the Diagnostic Communication over Internet Protocol (DOIP) edge node 251 in the target vehicle 240 via an RG45 network cable 280 .

[0055] Exemplarily, the target vehicle 240 includes a DOIP edge node 251, a CAN signal generator 260 and a battery 270, the CAN signal generator is connected to the DOIP edge node 251 via a CAN bus; the battery 270 is connected to the DOIP edge node 251 via an activation line (power supply line) 290, so that the address detection method can be executed by the host computer 211.

[0056] It is understandable that the diagnostic device may be a host computer, the server may be a DHCP server, and the edge node may be a DOIP edge node.

[0057] Exemplarily, the IP address to be tested is the IP address of the DOIP edge node, the battery supplies power to the DOIP edge node through the activation line, and the power supply model of the simulated target vehicle is in power-on mode; after the DOIP edge node is activated by the activation line, the DOIP edge node is assigned an address through the DHCP server, or through AutoIP. It can be understood that the IP address to be tested is an address assigned by the DHCP server; or, the IP address to be tested is an address assigned by AutoIP, that is, an address automatically configured by the DOIP edge node.

[0058] Specifically, the CAN signal generator simulates the power model signal of the target vehicle and sends it to the DOIP edge node through the CAN bus. The battery powers the DOIP edge node through the activation line and provides an activation signal. On this basis, an IP address is allocated to the DOIP edge node. The switch connects the host computer, the DHCP server and the DOIP edge node in the target vehicle through the RG45 network cable. The validity of the IP address to be tested is detected through communication between the host computer and the DOIP edge node. When the IP address to be tested is a valid address, it indicates that the IP address to be tested is an available address.

[0059] Figure 3 It is a schematic flow chart of an address detection method provided in an embodiment of the present application.

[0060] For example, Figure 3 The method shown can be executed by a host computer or a diagnostic device; wherein the host computer can be as follows Figure 1 The host computer 120 shown; the diagnostic device can be as follows Figure 2 Diagnostic device 210 is shown.

[0061] For example, Figure 3 As shown, the method 300 includes the following processes:

[0062] S310, determining the IP address of the edge node to be tested in the target vehicle.

[0063] Optionally, the IP address to be tested may be an address assigned by a DHCP server to the edge node; or, the IP address to be tested may be an address assigned by AutoIP, that is, an address automatically configured by the edge node. The IP address to be tested may be determined according to actual conditions and is not specifically limited here.

[0064] Exemplarily, the DHCP server is determined as the IP address to be tested; or, when the DHCP server does not allocate an address, the AutoIP allocated address is determined as the IP address to be tested.

[0065] Figure 4 This is a schematic diagram of a scenario of address allocation of an edge node provided in an embodiment of the present application.

[0066] Exemplarily, the edge node may include multiple DOIP edge nodes. For example, the target vehicle includes vehicle 1 and vehicle 2, vehicle 1 corresponds to vehicle 1 DOIP edge node, and vehicle 2 corresponds to vehicle 2 DOIP edge node. It is understandable that addresses are assigned to vehicle 1 DOIP edge node and vehicle 2 DOIP edge node through AutoIP, and addresses are assigned to vehicle 1 DOIP edge node and vehicle 2 DOIP edge node through DHCP server.

[0067] For example, Figure 4 As shown, the method 400 includes the following processes:

[0068] S401, sending an ARP request message.

[0069] It should be noted that AutoIP relies on the Address Resolution Protocol (ARP) probe to implement IP address configuration. When assigning addresses, AutoIP selects a random address within the address range and sends an ARP request message for the selected address.

[0070] Exemplarily, during the process of requesting address allocation by the DOIP edge node of the target vehicle, an ARP request message is sent, and the ARP request message includes a randomly selected IP address. The DOIP edge node determines whether the IP address is available by sending the ARP request message.

[0071] S402: Send an ARP confirmation message.

[0072] Exemplarily, when receiving an ARP request message, the host computer determines whether the address in the ARP request message is occupied, that is, monitors whether there is response information from other network nodes, and if there is response information from other network nodes, determines that the address is occupied, and then sends an ARP confirmation message including that the address is occupied by other network nodes. Thus, the DOIP edge node re-randomly selects an address within the AutoIP address range as a new address and repeats the detection process.

[0073] Furthermore, in the absence of response information from other network nodes, it is determined that the address is not occupied, and an ARP confirmation message is sent including that the address is available, and the address is identified as an allocated IP address.

[0074] S403: Send a DHCP discover message.

[0075] It should be noted that there is no order in which S401-S402 and S403-S406 are executed. S401-S402 may be executed first, or S403-S406 may be executed first; or, S401-S402 and S403-S406 may be executed simultaneously.

[0076] Exemplarily, when the DOIP edge node needs the DHCP server to allocate an address, the DOIP edge node sends a DHCP discovery message to the DHCP server as a broadcast message.

[0077] S404, sending a DHCP offer message.

[0078] Exemplarily, after receiving the DHCP discovery message, the DHCP server selects an IP address from the available IP address pool and sends a DHCP offer message to the DOIP edge node. The DHCP offer message includes network configuration information such as the IP address, subnet mask, default gateway, lease period, etc. assigned to the edge node.

[0079] S405: Send a DHCP request message.

[0080] Exemplarily, after receiving one or more DHCP offer messages, the DOIP edge node selects one of the configurations and sends a DHCP request message to all DHCP servers, indicating that the address has been accepted.

[0081] S406: Send a DHCP confirmation message.

[0082] Exemplarily, after receiving the DHCP request message, if the provided IP address is still available, the DHCP server sends a DHCP confirmation message to the DOIP edge node to confirm the assigned IP address and other network configuration information, and the address is then identified as the assigned IP address.

[0083] Exemplarily, the DOIP edge node sends a DHCP discovery message, which is broadcast to all devices in the local area network; after receiving the DHCP discovery message, the DHCP server selects an address from the available IP address pool and sends a DHCP offer message to the DOIP edge node. The DHCP offer message includes the network configuration information such as the IP address, subnet mask, default gateway, lease period, etc. assigned to the edge node. After receiving one or more DHCP offer messages, the edge node selects one of the configurations and sends a DHCP confirmation message to all DHCP servers, indicating the accepted address.

[0084] It should be noted that if the DOIP edge node has been configured with an IP address and the lease period has not expired, the edge node can directly send a request to the DHCP server that allocated the IP.

[0085] Furthermore, when the DHCP server receives the DHCP request message, if the provided IP address is still available, the DHCP server sends a DHCP confirmation message to the edge node to confirm the assigned IP address and other network configuration information. If the IP address is already occupied, the DHCP server will send a DHCP rejection message.

[0086] S320, sending an identification request of the target vehicle to the edge node via the IP address to be tested.

[0087] Exemplarily, when the IP address to be tested is determined, an identification request of the target vehicle is sent to the edge node through the IP address to be tested. For example, the identification request may include a request type, a request ID, a vehicle license plate number, a vehicle identification code, a timestamp, etc., which are not specifically limited here.

[0088] In one example, when the IP address to be tested is the AutoIP assigned address, the DOIP edge node is powered on again, the power mode of the simulated target vehicle is in the power-on mode, and after the DOIP edge node is activated by the activation line, it waits for the APR probe of the AutoIP to be issued, and uses the AutoIP assigned address as the destination address. The host computer sends an identification request for the target vehicle to the DOIP edge node through the AutoIP assigned address, and observes the response.

[0089] In another example, when the IP address to be tested is an address assigned by a DHCP server, the DOIP edge node is powered on again, the power mode of the simulated target vehicle is in power-on mode, and after the DOIP edge node is activated by the activation line, the DOIP edge node is waited for to send a DHCP discovery process, and the DHCP server is controlled to complete the IP address allocation, and the address assigned by the DHCP server is used as the destination address. The host computer sends an identification request for the target vehicle to the DOIP edge node through the address assigned by the DHCP server, and observes the response.

[0090] S330: If a declaration message sent by the edge node is received, determine a target address for sending the declaration message.

[0091] Exemplarily, when receiving the declaration message sent by the edge node, the host computer determines the target address of sending the declaration message. Specifically, the target address of sending the declaration message is obtained; the target address may be consistent with the IP address to be tested; or the target address may be inconsistent with the IP address to be tested.

[0092] It is understandable that due to the power-on of the edge node, the IP address of the edge node may be reallocated. When receiving the declaration message sent by the edge node, it is determined that the IP address to be tested is a valid address. The target address of the current declaration message may be a historical address, that is, the address assigned to the edge node when it was powered on historically. Therefore, the purpose of detecting the IP address after the edge node is powered on cannot be achieved.

[0093] Exemplarily, the content of the target vehicle identification request sent by the upper computer to the edge node through the IP address to be tested includes: source address: 169.254.0.1, target address: 169.254.86.58, protocol: UDP, source port: 59132, target port: 13400, DOLP (ISO 13400) protocol version: ISO13400-2:2012 (0x02), type: vehicle identification request (0x0001) and length is 0.

[0094] The declaration message sent by the edge node received by the host computer includes: source address: 169.254.86.58, destination address: 169.254.0.1, protocol: UDP, source port: 13400, destination port: 59132, DOLP (ISO 13400) protocol version: ISO 13400-2:2012 (0x02), reverse version: 0xfd, type: vehicle declaration message / vehicle identification response message (0x0004) and length 32.

[0095] For example, an identification request could be as follows:

[0096] Internet Protocol Version 4, Src:169.254.0.1, Dst:169.254.86.58 / / Internet Protocol Version 4, source address: 169.254.0.1, destination address: 169.254.86.58

[0097] 0100...=Version:4 / / Version:4

[0098] ...0101=Header Length:20bytes(5) / / Header length: 20 bytes(5)

[0099] Differentiated Services Field: OxOO (DSCP: CS0, ECN: Not-ECT) / / Differentiated Services Field: 0x00 (Differentiated Services Code Point: CS0, Explicit Congestion Notification: Not ECT)

[0100] Total Length:36 / / Total length: 36

[0101] Identification:0x995e(39262) / / Identification:0x995e(39262)

[0102] Flags:0x00 / / Flags: 0x00

[0103] Fragment Offset:0 / / Fragment offset: 0

[0104] Time to Live:64 / / Survival time: 64

[0105] Protocol:UDP(17) / / Protocol:UDP(17)

[0106] Header Checksum: 0x3733 [correct] / / Header checksum: 0x3733 [correct]

[0107] [Header checksum status: Good] / / [Header checksum status: Good]

[0108] [Calculated Checksum:0x3733] / / [Calculated checksum:0x3733]

[0109] Source Address:169.254.0.1 / / Source address:169.254.0.1

[0110] Destination Address:169.254.86.58 / / AutoIP configuration address:169.254.86.58

[0111] User Datagram Protocol, Src Port: 59132, Dst Port: 13400 / / User Datagram Protocol, source port: 59132, destination port: 13400

[0112] DolP (ISO13400) Protocol / / DolP (ISO13400) Protocol

[0113] Header / / Header

[0114] Version: DoIP ISO 13400-2:2012(0x02) / / Version: DolP ISO 13400-2:2012(0x02)

[0115] Inverse version:Oxfd / / Reverse version: 0xfd

[0116] Type: Vehicle identification request (0x0001) / / Type: Vehicle identification request (0x0001)

[0117] Length:0 / / Length: 0

[0118] For example, the declaration message can be as follows

[0119] Internet Protocol Version 4, Src:169.254.86.58, Dst:169.254.0.1 / / Internet Protocol Version 4, source address: 169.254.86.58, destination address: 169.254.0.1

[0120] 0100...=Version:4 / / Version:4

[0121] ...0101=Header Length:20bytes(5) / / Header length: 20 bytes(5)

[0122] Differentiated Services Field: OxO0 (DSCP: CS0, ECN: Not-ECT) / / Differentiated Services Field: 0x00 (Differentiated Services Code Point: CS0, Explicit Congestion Notification: Not ECT)

[0123] Total Length:68 / / Total length: 68

[0124] Identification:0x0348(840) / / Identification:0x0348(840)

[0125] Flags: 0x40, Don't fragment / / Flag: 0x40, do not fragment

[0126] Fragment Offset:0 / / Fragment offset: 0

[0127] Time to Live: 1 / / Survival time: 1

[0128] Protocol:UDP(17) / / Protocol:UDP(17)

[0129] Header Checksum:Oxcc29[correct] / / Header checksum:0xcc29[correct]

[0130] [Header checksum status: Good] / / [Header checksum status: Good]

[0131] [Calculated Checksum:Oxcc29] / / [Calculated checksum:0xcc29]

[0132] Source Address:169.254.86.58 / / AutoIP configuration address:169.254.86.58

[0133] Destination Address:169.254.0.1 / / Destination address:169.254.0.1

[0134] User Datagram Protocol, Src Port: 13400, Dst Port: 59132 / / User Datagram Protocol, source port: 13400, destination port: 59132

[0135] DolP (ISO13400) Protocol / / DolP (ISO13400) Protocol

[0136] Header / / Header

[0137] Version: DoIP ISO 13400-2:2012(0x02) / / Version: DolP ISO 13400-2:2012(0x02)

[0138] Inverse version:Oxfd / / Reverse version: 0xfd

[0139] Type: Vehicle announcement message / vehicle identification response message (0x0004) / / Type: Vehicle announcement message / vehicle identification response message (0x0004)

[0140] Length:32 / / Length:32

[0141] VIN:****************** / / Vehicle Identification Number

[0142] Logical Address:*** / / Logical address

[0143] EID:************************ / / Extended identifier

[0144] GID:************************ / / Group identifier

[0145] Further action required: No further action required (Ox00) / / Further action required: No further action required (0x00)

[0146] S340: If the target address is consistent with the IP address to be tested, determine that the IP address to be tested is a valid address.

[0147] Exemplarily, the host computer receives the declaration message sent by the edge node, and determines the target address of the declaration message. It detects whether the target address is consistent with the IP address to be tested. If the target address is inconsistent with the IP address to be tested, the IP address to be tested is determined to be an invalid address; if the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address.

[0148] For example, if the IP address to be tested is 169.254.86.58, and the target address of the declaration message is determined to be 169.254.86.58, the target address is consistent with the IP address to be tested, and the IP address to be tested is determined to be a valid address. Alternatively, if the IP address to be tested is 169.254.86.58, and the target address of the declaration message is determined to be 169.254.0.1, the target address is inconsistent with the IP address to be tested, and the IP address to be tested is determined to be an invalid address.

[0149] The above technical scheme sends an identification request for the target vehicle to the edge node through the IP address to be tested. If a declaration message sent by the edge node is received, the target address of the declaration message is determined. If the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address. Since the prior art directly determines that the address is a valid address when a declaration message sent by the edge node is received, when there are multiple IP addresses at the edge node, the IP address sending the declaration message may be different from the IP address to be tested, resulting in errors in the detection results of the IP address to be tested. However, the present application, when receiving a declaration message sent by the edge node, detects the consistency between the target address of the declaration message and the IP address to be tested, and then makes a double judgment based on the response of the edge node to the identification request and the address consistency, to determine the validity of the IP address to be tested, which can avoid the influence of the difference between the IP address sending the declaration message and the IP address to be tested on the detection result, thereby improving the accuracy of the address detection result of the edge node.

[0150] In addition, compared to the prior art in which an address is determined to be a valid address when a declaration message is received from an edge node, the present application, when receiving a declaration message sent by an edge node, can avoid the situation in which the declaration message is sent through other addresses of the edge node by detecting the consistency between the target address of the declaration message and the IP address to be tested, thereby ensuring the accuracy of the validity detection of the IP address to be tested.

[0151] Exemplarily, the IP address to be tested of the edge node in the target vehicle is determined, an identification request for the target vehicle is sent to the edge node via the IP address to be tested, and upon receiving a declaration message sent by the edge node, a target address for sending the declaration message is determined, and whether the target address is consistent with the IP address to be tested is detected. When the target address is consistent with the IP address to be tested, the vehicle identification code in the declaration message is determined based on the declaration message.

[0152] Further, it is detected whether the target identification code of the target vehicle is consistent with the vehicle identification code, and when the target identification code is consistent with the vehicle identification code, the IP address to be tested is determined to be a valid address. That is, when the vehicle identification code is consistent with the target identification code, and the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address.

[0153] It can be understood that by detecting the consistency between the target identification code and the vehicle identification code of the target vehicle, the accuracy of determining the validity of the IP address to be tested can be improved; in addition, when the target vehicle includes multiple vehicles, the address can be associated with the vehicle through the vehicle identification code, thereby improving the management of edge nodes in the communication process.

[0154] Figure 5 It is a schematic flow chart of another address detection method provided in an embodiment of the present application.

[0155] For example, Figure 5 The method shown can be executed by a host computer or a diagnostic device; wherein the host computer can be as follows Figure 1 The host computer 120 shown; the diagnostic device can be as follows Figure 2 Diagnostic device 210 is shown.

[0156] For example, Figure 5 As shown, the method 500 includes the following processes:

[0157] S501, determine the IP address of the edge node to be tested in the target vehicle.

[0158] Optionally, the IP address to be tested may be an address assigned by a DHCP server to the edge node; or, the IP address to be tested may be an address assigned by AutoIP, that is, an address automatically configured by the edge node. The IP address to be tested may be determined according to actual conditions and is not specifically limited here.

[0159] Exemplarily, the DHCP server is determined as the IP address to be tested; or, when the DHCP server does not allocate an address, the AutoIP allocated address is determined as the IP address to be tested.

[0160] S502: Send an identification request of the target vehicle to the edge node via the IP address to be tested.

[0161] Exemplarily, when the IP address to be tested is determined, an identification request of the target vehicle is sent to the edge node through the IP address to be tested. For example, the identification request may include a request type, a request ID, a vehicle license plate number, a vehicle identification code, a timestamp, etc., which are not specifically limited here.

[0162] S503: If a declaration message sent by the edge node is received.

[0163] Exemplarily, an identification request of the target vehicle is sent to the edge node through the IP address to be tested, and it is detected whether a declaration message sent by the edge node is received. If the declaration message sent by the edge node is not received, it is determined that the IP address to be tested is an invalid address; if the declaration message sent by the edge node is received, the target address of the declaration message and the vehicle identification code in the declaration message are further determined.

[0164] S504, determine the target address to which the declaration message is sent.

[0165] Exemplarily, when receiving a declaration message sent by an edge node, a target address for sending the declaration message is determined. Specifically, the target address for sending the declaration message is obtained; the target address may be consistent with the IP address to be tested; or the target address may be inconsistent with the IP address to be tested.

[0166] S505, check whether the target address is consistent with the IP address to be tested; if not, execute S506; if so, execute S510.

[0167] Exemplarily, it is detected whether the target address is consistent with the IP address to be tested. It is understandable that since the edge node is powered on again, the IP address of the edge node may be reallocated. When receiving the declaration message sent by the edge node, it is determined that the IP address to be tested is a valid address. It is possible that the target address of the current declaration message is a historical address, that is, the target address of the declaration message is inconsistent with the IP address to be tested.

[0168] S506: Determine whether the IP address to be tested is an invalid address.

[0169] Exemplarily, it is detected whether the target address is consistent with the IP address to be tested. If it is detected that the target address is inconsistent with the IP address to be tested, it is determined that the IP address to be tested is an invalid address.

[0170] S507, determining the vehicle identification code in the declaration message.

[0171] It is understandable that the execution order of S504-S506 and S507-S509 is not specifically limited here, and S504-S506 may be executed first, or S507-S509 may be executed first; or, S504-S506 and S507-S509 may be executed simultaneously.

[0172] Exemplarily, the vehicle identification code is determined from the declaration message. It is understandable that the declaration message includes the vehicle identification code, port, protocol version, etc.

[0173] S508, check whether the vehicle identification code is consistent with the target identification code; if not, execute S509; if not, execute S510.

[0174] Exemplarily, since the target identification code of the target vehicle can be acquired in advance, the validity of the IP address to be tested is determined by detecting the consistency between the vehicle identification code and the target identification code.

[0175] S509: Determine whether the IP address to be tested is an invalid address.

[0176] Exemplarily, it is detected whether the target identification code is consistent with the vehicle identification code. If the target identification code is inconsistent with the vehicle identification code, it is determined that the IP address to be tested is an invalid address.

[0177] S510: Determine whether the IP address to be tested is a valid address.

[0178] Exemplarily, when the target identification code is consistent with the vehicle identification code, and the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address.

[0179] The above technical scheme sends an identification request of the target vehicle to the edge node through the IP address to be tested. If a declaration message sent by the edge node is received, the target address for sending the declaration message is determined, and based on the declaration message, the vehicle identification code in the declaration message is determined. When the vehicle identification code is consistent with the target identification code, and the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address. Since the IP address to be tested is a valid address when the target address is consistent with the IP address to be tested, and the target identification code is consistent with the vehicle identification code, the accuracy of the validity of the IP address to be tested can be improved. In addition, when the target vehicle includes multiple vehicles, the association between the target vehicle and the IP address can be determined by comparing the vehicle identification code with the target identification code, thereby improving the convenience of communication.

[0180] In one example, the driving cycle of the target vehicle is obtained, and at least two identification requests of the target vehicles are sent to the edge node through the IP address to be tested during the driving cycle; if at least two declaration messages sent by the edge node are received, the target address of the sent declaration message is determined. Since one declaration message corresponds to one target address, and at least two declaration messages correspond to at least two target addresses, when at least two declaration messages are received during the driving cycle and the target addresses corresponding to the at least two declaration messages are consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address.

[0181] Optionally, the driving cycle may be 8 hours, 7 hours, etc., which is not specifically limited here.

[0182] For example, the driving cycle is 8 hours, the DOIP edge node is powered on again, the simulation power mode is in the power-on mode, and the DOIP edge node is activated by the activation line. After waiting for the ARP probe of AutoIP to be sent, use the AutoIP allocated address (IP address to be tested) as the destination address to send an identification request. If a declaration message sent by the edge node is received, the target address of the declaration message is determined. When the target address is consistent with the IP address to be tested, maintain 8 hours and keep the DOIP edge node powered on again, the simulation power mode is in the power-on mode, and the DOIP edge node is activated by the activation line. Use the AutoIP allocated address as the destination address to send an identification request. If a declaration message sent by the edge node is received, the target address of the declaration message is determined. When the target address is consistent with the IP address to be tested, determine that the AutoIP allocated address is a valid address.

[0183] The above technical solution determines the validity of the IP address to be tested by obtaining the driving cycle of the target vehicle and detecting whether at least two declaration messages are received during the driving cycle, and whether the target addresses of at least two declaration messages are consistent with the IP address to be tested, thereby improving the detection results of the validity of the IP address.

[0184] In another example, the IP address to be tested is the address assigned by the server to the edge node, the driving cycle of the target vehicle is obtained, and identification requests for at least two target vehicles are sent to the edge node through the IP address to be tested during the driving cycle; if at least two declaration messages sent by the edge node are received, the target address for sending the declaration message is determined.

[0185] Furthermore, it is also necessary to detect whether there is a target message in the driving cycle, and the target message includes at least one of a release message and a discovery message. If there is a target message in the driving cycle, or the target address corresponding to at least two declaration messages is inconsistent with the IP address to be tested, the IP address to be tested is determined to be an invalid address; if there is no target message in the driving cycle, and at least two declaration messages are received in the driving cycle, and the target address corresponding to at least two declaration messages is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address.

[0186] For example, when the driving cycle is 8 hours, the DOIP edge node is powered on again, the simulation power mode is in the power-on mode, and the DOIP edge node is activated by the activation line, wait for the DOIP edge node to send a DHCP discovery process, and control the DHCP server to complete the IP address assignment, use the DHCP server assigned address (IP address to be tested) as the target address to send an identification request, if a declaration message sent by the edge node is received, determine the target address of the declaration message, and when the target address is consistent with the IP address to be tested, maintain 8 hours and keep the DOIP edge node powered on again, the simulation power mode is in the power-on mode, and the DOIP edge node is activated by the activation line, use the DHCP server assigned address as the destination address to send an identification request, if a declaration message sent by the edge node is received, determine the target address of the declaration message, and when the target address is consistent with the IP address to be tested, detect whether there is a target message within the driving cycle, and when there is no target message within the driving cycle, determine that the address assigned by the DHCP server is a valid address.

[0187] The above technical scheme determines that the IP address to be tested is a valid address by detecting whether there is a target message within the driving cycle, and if there is no target message within the driving cycle, and if at least two declaration messages are received within the driving cycle, and the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested; since the IP address to be tested is a valid address when there is no target message within the driving cycle, and the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested, the accuracy of IP address detection can be improved, thereby improving the security of communication.

[0188] Figure 6 It is a schematic flow chart of another address detection method provided in an embodiment of the present application.

[0189] For example, Figure 6 The method shown can be executed by a host computer or a diagnostic device; wherein the host computer can be as follows Figure 1 The host computer 120 shown; the diagnostic device can be as follows Figure 2 Diagnostic device 210 is shown.

[0190] For example, Figure 6As shown, the method 600 includes the following processes:

[0191] S610, determining the IP address of the edge node to be tested in the target vehicle.

[0192] Optionally, the IP address to be tested may be an address assigned by a DHCP server to the edge node; or, the IP address to be tested may be an address assigned by AutoIP, that is, an address automatically configured by the edge node. The IP address to be tested may be determined according to actual conditions and is not specifically limited here.

[0193] Exemplarily, the DHCP server is determined as the IP address to be tested; or, when the DHCP server does not allocate an address, the AutoIP allocated address is determined as the IP address to be tested.

[0194] S620, obtaining the driving cycle of the target vehicle.

[0195] Optionally, the driving cycle may be 8 hours, 7 hours, etc., which is not specifically limited here.

[0196] S630: Send at least two target vehicle identification requests to the edge node via the IP address to be tested during the driving cycle.

[0197] For example, the target vehicle identification request may be sent once every hour during the driving cycle; or, after the edge node is powered on again, the target vehicle identification request may be sent once, and the target vehicle identification request may be sent again during the driving cycle. The number of times the identification request is sent may be determined based on actual conditions and is not specifically limited here.

[0198] S640: If at least two declaration messages sent by the edge node are received within the driving cycle, determine the target addresses corresponding to the at least two declaration messages.

[0199] Exemplarily, when at least two declaration messages are received from the edge node during the driving cycle, the target addresses corresponding to the at least two declaration messages are determined. It is understandable that since one declaration message corresponds to one target address, at least two declaration messages correspond to at least two target addresses.

[0200] S650, detect whether the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested; if not, execute S660; if so, execute S670.

[0201] Exemplarily, when at least two declaration messages sent by the edge node are received within the driving cycle, a target address corresponding to the at least two declaration messages is determined.

[0202] S660: Determine that the IP address to be tested is an invalid address.

[0203] Exemplarily, it is detected whether the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested. If the target addresses corresponding to at least two declaration messages are inconsistent with the IP address to be tested, it is determined that the IP address to be tested is an invalid address.

[0204] S670: Determine whether the IP address to be tested is a valid address.

[0205] Exemplarily, it is detected whether the target address corresponding to at least two declaration messages is consistent with the IP address to be tested. If the target address corresponding to at least two declaration messages is consistent with the IP address to be tested, it is determined that the IP address to be tested is an invalid address.

[0206] In addition, when the IP address to be tested is the address assigned by the server to the edge node, the driving cycle of the target vehicle is obtained, and it is detected whether there is a target message within the driving cycle. If there is no target message within the driving cycle, and at least two declaration messages are received within the driving cycle, and the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested, it is determined that the IP address to be tested is a valid address.

[0207] Exemplarily, when the edge node has an address assigned by the server and an address automatically configured by the edge node, determine whether the address assigned by the server and the address automatically configured by the edge node are valid addresses; when the address automatically configured by the edge node and the address assigned by the server are both valid addresses, the address automatically configured by the edge node is used as the IP address to be tested, and the address automatically configured by the edge node is detected.

[0208] In the above technical scheme, when the address automatically configured by the edge node and the address assigned by the server are both valid addresses, the address automatically configured by the edge node is used as the IP address to be tested, and the validity of the address automatically configured by the edge node is detected, so as to determine whether the priority of the address assigned by the server is higher than the address automatically configured by the edge node. By detecting the priority of the edge node address, the security of edge node communication can be improved.

[0209] Specifically, at a first moment, it is determined whether the address automatically configured by the edge node is a valid address; if it is determined at the first moment that the address automatically configured by the edge node is a valid address, at a second moment, it is determined whether the address assigned by the server is a valid address; further, when it is determined at the second moment that the address assigned by the server is a valid address, it is determined that both the address automatically configured by the edge node and the address assigned by the server are valid addresses.

[0210] It should be noted that the first moment is earlier than the second moment. Since the detection time of the address automatically configured by the edge node is earlier than the detection time of the address assigned by the server, the server-assigned address can be prevented from covering the edge node-assigned address during the detection process, thereby improving the accuracy of edge node address detection.

[0211] Exemplarily, when the address automatically configured by the edge node and the address assigned by the server are both valid addresses, the address automatically configured by the edge node is used as the IP address to be tested. When the declaration message sent by the edge node is not received, it is determined that the address assigned by the server covers the address automatically configured by the edge node, and the IP address to be tested is determined to be an invalid address.

[0212] In the above technical solution, if the declaration message sent by the edge node is not received, it is determined that the address assigned by the server covers the address automatically configured by the edge node, and the IP address to be tested is determined to be an invalid address; since the address assigned by the server has a higher priority than the address automatically configured by the edge node, the security of edge node communication can be improved by detecting the priority of the edge node address.

[0213] Figure 7 It is a schematic flowchart of an address priority detection method provided in an embodiment of the present application.

[0214] For example, Figure 7 The method shown can be executed by a host computer or a diagnostic device; wherein the host computer can be as follows Figure 1 The host computer 120 shown; the diagnostic device can be as follows Figure 2 Diagnostic device 210 is shown.

[0215] For example, Figure 7 As shown, the method 700 includes the following processes:

[0216] S710: If the edge node has an address assigned by the server and an address automatically configured by the edge node.

[0217] Exemplarily, when the edge node detects a data link connection, it simultaneously executes the address assigned by the server and the address automatically configured by the edge node, so that the edge node has the address assigned by the server and the address automatically configured by the edge node.

[0218] Exemplarily, after the DOIP edge node is powered on again and the simulated power mode is the power-on mode, and the DOIP edge node is activated by the activation line, an address is allocated through AutoIP and an address is allocated through a DHCP server.

[0219] S720, determining at the first moment whether the address automatically configured by the edge node is a valid address; if so, executing S730.

[0220] Exemplarily, whether the address automatically configured by the edge node is a valid address is determined at the first moment. The method of determining whether the address automatically configured by the edge node is a valid address can refer to the method in the aforementioned disclosed embodiment, which will not be repeated here.

[0221] S730, determine at the second moment whether the address allocated by the server is a valid address; if so, execute S740.

[0222] Exemplarily, when the address automatically configured by the edge node is determined to be a valid address at the first moment, it is determined at the second moment whether the address assigned by the server is a valid address. The method of determining whether the address assigned by the server is a valid address can refer to the method in the aforementioned disclosed embodiment, which will not be repeated here.

[0223] S740: Use the address automatically configured by the edge node as the IP address to be tested.

[0224] Exemplarily, when it is determined at the first moment that the address automatically configured by the edge node is a valid address, and when it is determined at the second moment that the address allocated by the server is a valid address, the address automatically configured by the edge node is used as the IP address to be tested.

[0225] S750, sending an identification request of the target vehicle to the edge node via the IP address to be tested.

[0226] Exemplarily, an identification request for the target vehicle is sent to the edge node via the IP address to be tested.

[0227] S760: If the declaration message sent by the edge node is not received, it is determined that the address allocated by the server covers the address automatically configured by the edge node, and it is determined that the IP address to be tested is an invalid address.

[0228] Exemplarily, if the declaration message sent by the edge node is not received, it is determined that the address assigned by the server covers the address automatically configured by the edge node, and the IP address to be tested is determined to be an invalid address. Since the address assigned by the server has a higher priority than the address automatically configured by the edge node, the security of edge node communication can be improved by detecting the priority of the edge node address.

[0229] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, rather than to limit the embodiments of the present application to the specific numerical values ​​or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0230] Combination of the above Figures 1 to 7 The address detection method provided in the embodiment of the present application is described in detail; Figure 8 and Fig. 9 The device embodiments of the present application are described in detail. It should be understood that the device in the embodiments of the present application can execute the various methods of the aforementioned embodiments of the present application, that is, the specific working processes of the following various products can refer to the corresponding processes in the aforementioned method embodiments.

[0231] Figure 8 It is a structural diagram of an address detection device provided in an embodiment of the present application.

[0232] For example, Figure 8 As shown, the address detection device 800 includes:

[0233] A first determination module 810 is used to determine the IP address to be tested of the edge node in the target vehicle;

[0234] A request sending module 820 is used to send an identification request of a target vehicle to an edge node via an IP address to be tested;

[0235] A second determination module 830 is configured to determine a target address for sending the declaration message if a declaration message sent by an edge node is received;

[0236] The third determination module 840 is used to determine that the IP address to be tested is a valid address if the target address is consistent with the IP address to be tested.

[0237] Optionally, as an embodiment, the address detection device 800 further includes an acquisition module, and the acquisition module is specifically used for:

[0238] Obtain the driving cycle of the target vehicle;

[0239] The third determination module 840 is specifically used for:

[0240] If at least two declaration messages are received within the driving cycle, and the target addresses corresponding to the at least two declaration messages are consistent with the IP address to be tested, it is determined that the IP address to be tested is a valid address.

[0241] Optionally, as an embodiment, the IP address to be tested is an address assigned by the server to the edge node; the address detection device 800 further includes a detection module, which is specifically used to:

[0242] Detecting whether a target message exists in the driving cycle; wherein the target message includes at least one of a release message and a discovery message;

[0243] The third determination module 840 is specifically used for:

[0244] If there is no target message in the driving cycle, and at least two declaration messages are received in the driving cycle, and the target addresses corresponding to at least two declaration messages are consistent with the IP address to be tested, it is determined that the IP address to be tested is a valid address.

[0245] Optionally, as an embodiment, the address detection device 800 further includes a fourth determination module, and the fourth determination module is specifically configured to:

[0246] Based on the declaration message, determining a vehicle identification code in the declaration message;

[0247] The third determination module 840 is specifically used for:

[0248] If the vehicle identification code is consistent with the target identification code, and the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address; wherein the target identification code represents the identification code of the target vehicle.

[0249] Optionally, as an embodiment, the address detection device 800 further includes a fifth determination module, and the fifth determination module is specifically configured to:

[0250] If the edge node has an address assigned by the server and an address automatically configured by the edge node, determine whether the address assigned by the server and the address automatically configured by the edge node are valid addresses;

[0251] The first determining module 810 is specifically used for:

[0252] If the address automatically configured by the edge node and the address assigned by the server are both valid addresses, the address automatically configured by the edge node is used as the IP address to be tested.

[0253] Optionally, as an embodiment, the address detection device 800 further includes a sixth determination module, and the sixth determination module is specifically configured to:

[0254] If the declaration message sent by the edge node is not received, it is determined that the address allocated by the server covers the address automatically configured by the edge node, and it is determined that the IP address to be tested is an invalid address.

[0255] Optionally, as an embodiment, the fifth determining module is specifically configured to:

[0256] At a first moment, determine whether the address automatically configured by the edge node is a valid address; if the address automatically configured by the edge node is determined to be a valid address at the first moment, determine at a second moment whether the address allocated by the server is a valid address; wherein the first moment is earlier than the second moment.

[0257] It should be noted that the above-mentioned address detection device 800 is embodied in the form of a functional unit. The term "module" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0258] For example, a "module" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit, and / or other suitable components that support the described functions.

[0259] Therefore, the units of each example described in the embodiments of the present application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0260] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.

[0261] For example, Fig. 9 As shown, the electronic device 900 includes: a memory 910 and a processor 920, wherein the memory 910 stores an executable program code 930, and the processor 920 is used to call and execute the executable program code 930 to perform an address detection method of an electronic device.

[0262] Exemplarily, the memory 910 can be used to store relevant programs of the address detection method of the electronic device provided in the embodiments of the present application; the processor 920 can call the relevant programs of the address detection method of the electronic device stored in the memory 910 to execute the address detection method of the electronic device in the embodiments of the present application; for example, determine the IP address to be tested of the edge node in the target vehicle; send an identification request for the target vehicle to the edge node through the IP address to be tested; if a declaration message sent by the edge node is received, determine the target address of the sending declaration message; if the target address is consistent with the IP address to be tested, determine that the IP address to be tested is a valid address.

[0263] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0264] In the case of dividing each functional module according to each function, the device may also include a first determination module, a request sending module, a second determination module, and a third determination module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0265] It should be understood that the device provided in this embodiment is used to execute the above-mentioned address detection method, and thus can achieve the same effect as the above-mentioned implementation method.

[0266] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to an electronic device, the processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device in executing related program codes, etc.

[0267] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0268] In addition, the device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute an address detection method provided in the above embodiments.

[0269] The present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement an address detection method provided in the above-mentioned embodiment. Among them, computer-readable storage media may include, but are not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVDs), Compact Disc Read-Only Memory (CD-ROMs), microdrives and magneto-optical disks, Read-Only Memory (ROMs), Random Access Memory (RAMs), Erasable Programmable Read-Only Memory (EPROMs), Electrically Erasable Programmable Read Only Memory (EEPROMs), Dynamic Random Access Memory (DRAMs), Video Random Access Memory (VRAMs), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and / or data.

[0270] The present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement an address detection method provided in the above-mentioned embodiment.

[0271] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0272] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0273] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0274] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An address detection method, characterized in that: The method comprises: Determine the IP address of the edge node to be tested in the target vehicle; Sending an identification request of the target vehicle to the edge node via the IP address to be tested; If a declaration message sent by the edge node is received, determine a target address for sending the declaration message; If the target address is consistent with the IP address to be tested, it is determined that the IP address to be tested is a valid address.

2. The method according to claim 1, characterized in that The method further comprises: Acquire the driving cycle of the target vehicle; If the target address is consistent with the IP address to be tested, determining that the IP address to be tested is a valid address includes: If at least two declaration messages are received during the driving cycle, and the target addresses corresponding to the at least two declaration messages are consistent with the IP address to be tested, it is determined that the IP address to be tested is a valid address.

3. The method according to claim 2, characterized in that The IP address to be tested is an address assigned by the server to the edge node; the method further includes: Detecting whether a target message exists in the driving cycle; wherein the target message includes at least one of a release message and a discovery message; If at least two declaration messages are received during the driving cycle, and the target addresses corresponding to the at least two declaration messages are consistent with the IP address to be tested, determining that the IP address to be tested is a valid address includes: If the target message does not exist in the driving cycle, and at least two declaration messages are received in the driving cycle, and the target addresses corresponding to the at least two declaration messages are consistent with the IP address to be tested, it is determined that the IP address to be tested is a valid address.

4. The method according to claim 1, characterized in that: If a declaration message sent by the edge node is received; the method further includes: Based on the declaration message, determining a vehicle identification code in the declaration message; If the target address is consistent with the IP address to be tested, determining that the IP address to be tested is a valid address includes: If the vehicle identification code is consistent with the target identification code, and the target address is consistent with the IP address to be tested, the IP address to be tested is determined to be a valid address; wherein the target identification code represents the identification code of the target vehicle.

5. The method according to claim 1, characterized in that The method further comprises: If the edge node has an address assigned by the server and an address automatically configured by the edge node, determine whether the address assigned by the server and the address automatically configured by the edge node are valid addresses; Determining the IP address to be tested of the edge node in the target vehicle includes: If the address automatically configured by the edge node and the address allocated by the server are both valid addresses, the address automatically configured by the edge node is used as the IP address to be tested.

6. The method according to claim 5, characterized in that The method further comprises: If the declaration message sent by the edge node is not received, it is determined that the address allocated by the server covers the address automatically configured by the edge node, and it is determined that the IP address to be tested is an invalid address.

7. The method according to claim 5, characterized in that The determining whether the address assigned by the server and the address automatically configured by the edge node are valid addresses includes: Determine at a first moment whether the address automatically configured by the edge node is a valid address; If it is determined at the first moment that the address automatically configured by the edge node is a valid address, determining at the second moment whether the address allocated by the server is a valid address; The first moment is earlier than the second moment.

8. An address detection device, characterized in that: The device comprises: A first determination module is used to determine the IP address to be tested of the edge node in the target vehicle; A request sending module, used for sending an identification request of the target vehicle to the edge node through the IP address to be tested; A second determination module is used to determine a target address for sending the declaration message if a declaration message sent by the edge node is received; The third determination module is used to determine that the IP address to be tested is a valid address if the target address is consistent with the IP address to be tested.

9. An address detection system, characterized in that: Includes diagnostic equipment, servers, switches, and edge nodes in target vehicles; The server is used to assign addresses to the edge nodes, and the switch is used to connect the diagnostic device, the server and the edge nodes for communication; The diagnostic device is used to perform the address detection method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the address detection method as described in any one of claims 1 to 7.