Vehicle-mounted Ethernet link state identification method, device, equipment, medium, product and vehicle
By obtaining status information based on the physical layer, data link layer and transmission layer when powering on the Ethernet ECU node of the automotive network, identifying and locating network failures is solved, and the problem of difficulty in quickly identifying and locating network failures is achieved, efficient and accurate network failure handling is achieved, and the stability and security of the automotive network is ensured.
Patent Information
- Application Number
- CN202411911711.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-28
AI Technical Summary
With the increase in the complexity of automobile network and communication load, traditional network state detection and management mechanisms are difficult to quickly identify and locate network failures, affecting the stability and security of automobile network.
When the Ethernet ECU node is powered on, the physical layer status information of the Ethernet link is obtained based on the physical layer, and when an exception is detected, the link is identified in the network abnormal state. At the same time, based on the data link layer and the transmission layer, the status of the Ethernet link is detected in turn to ensure rapid identification and location of faults.
It realizes efficient and accurate identification of the status of the on-board Ethernet link, significantly improves network fault location and troubleshooting efficiency, and ensures the stability and security of the automotive network.
Smart Images

Figure CN119728478A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of vehicle-mounted Ethernet, and in particular, relates to a method, device, equipment, medium, product and vehicle for identifying the link status of a vehicle-mounted Ethernet. Background Art
[0002] With the rapid development of automobile intelligence and networking, the number of Ethernet nodes in the automotive industry is increasing significantly. In modern cars, more and more advanced driver assistance systems (ADAS), infotainment systems, autonomous driving modules and sensors rely on high-speed networks, and Ethernet has gradually become their mainstream communication method. Ethernet's high bandwidth, low latency and flexible topology make it an obvious advantage in in-vehicle communications. Especially driven by autonomous driving and vehicle to everything (V2X) technology, various electronic control units (ECU) and sensor data need to be transmitted in real time via Ethernet to support data-intensive application scenarios.
[0003] However, as the number of Ethernet nodes increases, the complexity and communication load of automotive networks have increased significantly, and traditional network status detection and management mechanisms are facing increasingly severe challenges. Specifically, when a network failure occurs, it usually takes a long time for the ECU or application to detect the problem, and it is also very difficult to locate the fault and quickly determine the specific location of the fault. This delay and location difficulty directly affect the stability and security of the automotive network, and bring great challenges to troubleshooting and system recovery. Summary of the invention
[0004] The embodiments of the present application provide a method, device, equipment, medium, product and vehicle for identifying the status of an in-vehicle Ethernet link, which can more efficiently and accurately identify the status of an Ethernet link, thereby fully improving the efficiency of locating and troubleshooting overall network faults, and effectively ensuring the stability and security of the vehicle network.
[0005] In a first aspect, an embodiment of the present application provides a method for identifying a vehicle Ethernet link state, which is applied to an Ethernet electronic control unit ECU node of a vehicle. The method for identifying a vehicle Ethernet link state includes:
[0006] When the Ethernet ECU node is powered on, obtaining physical layer status information of the Ethernet link where the Ethernet ECU node is located based on the physical layer;
[0007] In the case of abnormal detection of physical layer status information, it is identified that the Ethernet link is in an abnormal network state;
[0008] When the physical layer status information is detected normally, data link layer status information of the Ethernet link is obtained based on the data link layer, and / or, transmission control protocol status information between the Ethernet ECU node and the opposite end is obtained based on the transport layer;
[0009] When data link layer status information or transmission control protocol status information detects abnormality, it is identified that the Ethernet link is in a network abnormal state.
[0010] In some possible implementations, the physical layer status information includes a physical link status and / or a physical signal quality of an Ethernet link; obtaining the physical layer status information of the Ethernet link where the Ethernet ECU node is located based on the physical layer includes:
[0011] Acquire the physical link status of the Ethernet link based on the physical layer; and,
[0012] When the physical link status indicates that the Ethernet link is normally connected, the physical signal quality is obtained based on the physical layer.
[0013] In some possible implementations, obtaining the physical link status of the Ethernet link based on the physical layer includes:
[0014] According to a first preset frequency, a physical link status is obtained by reading from a physical link status register of a physical layer;
[0015] After obtaining the physical link status of the Ethernet link, the vehicle-mounted Ethernet link status identification method further includes:
[0016] When the physical link status read N times in succession all indicates that the Ethernet link is abnormal, it is determined that the physical layer status information detection is abnormal, where N is a positive integer.
[0017] In some possible implementations, when the physical link status indicates that the Ethernet link is normally connected, obtaining the physical signal quality based on the physical layer includes:
[0018] When the physical link status indicates that the Ethernet link is normal, the physical signal quality is obtained by reading from a physical signal quality register of a physical layer of the Ethernet ECU node at a second preset frequency;
[0019] After obtaining the physical signal quality based on the physical layer, the vehicle Ethernet link status identification method further includes:
[0020] When the physical signal quality is less than the signal quality threshold, determining that the physical layer state information detection is abnormal;
[0021] When the physical signal quality is greater than or equal to the signal quality threshold, it is determined that the physical layer status information detection is normal.
[0022] In some possible implementations, obtaining the transmission control protocol state information between the Ethernet ECU node and the peer end based on the transport layer includes:
[0023] When there is no data communication in the transmission control protocol socket TCP Socket of the Ethernet ECU node for more than a preset time, sending a keep-alive detection frame to the other end according to a third preset frequency;
[0024] In case of receiving a first response message corresponding to the keep-alive detection frame, determining that the transmission control protocol state information detection is normal;
[0025] In the case that the first response message of the keep-alive detection frame is not received for M consecutive times, it is determined that the transmission control protocol state information detection is abnormal, where M is a positive integer.
[0026] In some possible implementations, obtaining the transmission control protocol state information between the Ethernet ECU node and the peer end based on the transport layer includes:
[0027] When there is data communication in the TCP Socket of the Ethernet ECU node, record the first moment when the TCP Socket sends the target message data; and,
[0028] Record the second time when the TCP Socket receives the second response message of the target message data sent by the peer end;
[0029] When the time difference between the second moment and the first moment is less than or equal to the preset time interval, determining that the transmission control protocol state information detection is normal;
[0030] When the time difference between the second moment and the first moment is greater than the preset time interval, it is determined that the transmission control protocol state information detection is abnormal.
[0031] In some possible implementations, obtaining data link layer status information of an Ethernet link based on a data link layer includes:
[0032] Reading a first count value at the current moment from a cyclic redundancy check CRC register of a data link layer of an Ethernet ECU node, the CRC register being used to receive and store the number of CRC errors of messages transmitted in an Ethernet link within a preset time period;
[0033] Subtract the first count value from the second count value to obtain a count difference result, where the second count value is the count value obtained by reading the CRC register at the last moment;
[0034] When the count difference result is greater than the count difference threshold, it is determined that the data link layer state information detection is abnormal.
[0035] In some possible implementations, after identifying that the Ethernet link is in an abnormal network state, the vehicle-mounted Ethernet link state identification method further includes:
[0036] Execute pre-set fault response measures to initiate backup transmission of important information and / or downgrade the vehicle's functionality.
[0037] Based on the same inventive concept, in a second aspect, an embodiment of the present application provides a vehicle-mounted Ethernet link state identification device, wherein the Ethernet ECU node includes a physical layer, a data link layer, and a transport layer; the vehicle-mounted Ethernet link state identification device includes:
[0038] A first acquisition module is used to acquire physical layer status information of an Ethernet link where the Ethernet ECU node is located based on the physical layer when the Ethernet ECU node is powered on;
[0039] A first identification module is used to identify that the Ethernet link is in a network abnormal state when the physical layer state information is detected to be abnormal;
[0040] A second acquisition module is used to acquire data link layer status information of the Ethernet link based on the data link layer when the physical layer status information detection is normal, and / or to acquire transmission control protocol status information between the Ethernet ECU node and the opposite end based on the transport layer;
[0041] The second identification module is used to identify that the Ethernet link is in an abnormal network state when the data link layer state information or the transmission control protocol state information detects an abnormality.
[0042] In a third aspect, an embodiment of the present application provides a vehicle-mounted Ethernet link state identification device, the vehicle-mounted Ethernet link state identification device comprising:
[0043] a processor and a memory storing computer program instructions;
[0044] When the processor executes the computer program instructions, the method for identifying the state of an in-vehicle Ethernet link as provided in any one of the above-mentioned embodiments of the present application is implemented.
[0045] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer readable storage medium is stored computer program instructions, and when the computer program instructions are executed by a processor, a method for identifying the state of an in-vehicle Ethernet link as provided in any one of the above-mentioned embodiments of the present application is implemented.
[0046] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a method for identifying the state of an in-vehicle Ethernet link as provided in any one of the above-mentioned embodiments of the present application.
[0047] In a sixth aspect, an embodiment of the present application provides a vehicle, the vehicle comprising at least one of the following: an in-vehicle Ethernet link status identification device as provided in the above-mentioned embodiment of the present application; an in-vehicle Ethernet link status identification device as provided in the above-mentioned embodiment of the present application; a computer-readable storage medium as provided in the above-mentioned embodiment of the present application; a computer program product as provided in the above-mentioned embodiment of the present application.
[0048] It can be seen from the above description that a method, device, equipment, medium, product and vehicle for identifying the state of an in-vehicle Ethernet link in an embodiment of the present application, by fully combining the characteristics of the in-vehicle Ethernet link, sets a sequential link detection method from the physical layer detection of the Ethernet node to the data link layer and / or transport layer detection of the Ethernet link, thereby ensuring the rapid identification and accurate positioning of Ethernet link network faults in the detection link. Moreover, in the process of Ethernet link state detection, the embodiment of the present application detects the corresponding state information at different levels in sequence, so as to reasonably and accurately identify whether the Ethernet link state is abnormal, and subsequently directly and quickly locate the Ethernet link fault point. In this way, the overall Ethernet link state recognition efficiency can be effectively improved, thereby fully improving the overall network fault location and troubleshooting efficiency, and then effectively ensuring the stability and security of the automobile network. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 It is a flowchart of a method for identifying a vehicle Ethernet link state provided by an embodiment of the present application;
[0051] Figure 2 This is a schematic diagram of a network architecture for physical layer status information detection provided by an embodiment of the present application;
[0052] Figure 3 This is a schematic diagram of a TCP state detection process provided by an embodiment of the present application;
[0053] Figure 4 This is a schematic diagram of a TCP state detection process provided by another embodiment of the present application;
[0054] Figure 5This is a schematic diagram of a network architecture for CRC register detection provided by an embodiment of the present application;
[0055] Figure 6 This is a schematic diagram of the network architecture of a method for identifying a vehicle Ethernet link state provided by an embodiment of the present application;
[0056] Figure 7 It is a scenario flow diagram of a method for identifying a vehicle Ethernet link state provided by an embodiment of the present application;
[0057] Figure 8 It is a structural diagram of a vehicle-mounted Ethernet link status identification device provided by an embodiment of the present application;
[0058] Fig. 9 It is a structural diagram of an in-vehicle Ethernet link status identification device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0059] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0060] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0061] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0062] As mentioned in the background technology section, with the significant increase in the complexity and communication load of automotive networks, traditional network status detection and management mechanisms are facing increasingly severe challenges. When a network failure occurs, it usually takes a long time for the ECU or application to detect the problem, and it is also very difficult to locate the fault. It is difficult to quickly determine the specific location of the fault, which significantly affects the stability and security of the automotive network.
[0063] In view of the above, in order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment, medium, product and vehicle for identifying the state of an in-vehicle Ethernet link. It should be noted that the embodiments provided in the present application are not intended to limit the scope of the present application.
[0064] The following first introduces the vehicle Ethernet link status identification method provided by the embodiment of the present application. It should be noted that in network communication, the physical layer provides bit stream transmission, the data link layer provides frame transmission on this basis, and the transport layer provides end-to-end data transmission services. These layered protocol stacks ensure that the complexity of network communication is effectively managed and simplified.
[0065] Figure 1 The flowchart of the vehicle Ethernet link status identification method provided by an embodiment of the present application is shown. The vehicle Ethernet link status identification method is applied to the Ethernet ECU node in the vehicle, and the method can be implemented by the software entity of the Ethernet ECU node application layer. Figure 1 As shown, the vehicle-mounted Ethernet link status identification method includes the following steps:
[0066] S110, when the Ethernet ECU node is powered on, obtaining physical layer status information of the Ethernet link where the Ethernet ECU node is located based on the physical layer;
[0067] S120, in the case where the physical layer status information is detected to be abnormal, identifying that the Ethernet link is in a network abnormal state;
[0068] S130, when the physical layer status information is detected normally, obtaining data link layer status information of the Ethernet link based on the data link layer, and / or obtaining transmission control protocol status information between the Ethernet ECU node and the opposite end based on the transport layer;
[0069] S140, when the data link layer status information or the transmission control protocol status information is detected to be abnormal, identifying that the Ethernet link is in a network abnormal state.
[0070] It can be seen from the above description that a method for identifying the state of an in-vehicle Ethernet link in an embodiment of the present application, by fully combining the characteristics of the in-vehicle Ethernet link, sets a sequential link detection method from the physical layer detection of the Ethernet node to the data link layer and / or transport layer detection of the Ethernet link, thereby ensuring the rapid identification and accurate positioning of the Ethernet link network fault in the detection link. In addition, during the Ethernet link state detection process, the embodiment of the present application will promptly and accurately identify whether the Ethernet link state is abnormal based on the current detected state information, and record the diagnostic fault code corresponding to the detection link. The embodiment of the present application detects the corresponding state information at different levels in turn, so that it can reasonably and accurately identify whether the Ethernet link state is abnormal, and the Ethernet link fault point can be directly and quickly located later. In this way, the overall Ethernet link state recognition efficiency can be effectively improved, thereby fully improving the overall network fault location and troubleshooting efficiency, thereby effectively ensuring the stability and security of the automotive network.
[0071] The specific implementation of the above steps 110 to 140 is described in detail below.
[0072] In S110, when the Ethernet ECU node is powered on, for example, 30 seconds after the Ethernet ECU node is powered on, physical layer status information of the Ethernet link where the Ethernet ECU node is located can be obtained based on the physical layer. The frequency of obtaining the physical layer status information is, for example, once every 0.1 seconds.
[0073] The physical layer status information may include the physical link status (link up / link down) of the Ethernet link, and / or the physical signal quality SQI (Signal Quality Index) of the Ethernet link. The physical link status can be used to characterize whether the current Ethernet link is successful or not, and the physical signal quality can be used to quantitatively evaluate the communication quality of the Ethernet link.
[0074] It should be added that when the physical layer status information includes both the physical link status and the physical signal quality, the physical link status and the physical signal quality may be obtained simultaneously or in a certain order, and no strict limitation is imposed here.
[0075] In S120, when the physical layer status information is detected to be abnormal, it is identified that the Ethernet link is in a network abnormal state. Furthermore, the corresponding diagnostic trouble code DTC (Diagnostic Trouble Code) can be recorded based on the physical layer status information. The corresponding fault diagnostic code can be used to identify the code of the vehicle Ethernet link fault type, which can provide a reliable basis for subsequent fault location and fault cause troubleshooting. Subsequent maintenance personnel can use diagnostic tools to read these DTC codes to perform vehicle network maintenance.
[0076] The following is a detailed description of the acquisition and detection process of the physical layer status information of the Ethernet link in the above steps of this application. Figure 2 , Figure 2 It is a schematic diagram of a network architecture for physical layer status information detection provided by an embodiment of the present application.
[0077] Optionally, in some feasible embodiments of the present application, the above-mentioned physical layer status information includes the physical link status and / or physical signal quality of the Ethernet link. The above-mentioned physical layer status information of the Ethernet link where the Ethernet ECU node is located is obtained based on the physical layer, including:
[0078] Acquire the physical link status of the Ethernet link based on the physical layer; and,
[0079] When the physical link status indicates that the Ethernet link is normally connected, the physical signal quality is obtained based on the physical layer.
[0080] More specifically, continue as Figure 2 As shown, the above-mentioned acquisition of the physical link status of the Ethernet link based on the physical layer includes:
[0081] According to a first preset frequency, a physical link status is obtained by reading from a physical link status register of a physical layer;
[0082] After obtaining the physical link status of the Ethernet link, the vehicle-mounted Ethernet link status identification method further includes:
[0083] When the physical link status read N times in succession all indicates that the Ethernet link is abnormal, it is determined that the physical layer status information detection is abnormal, where N is a positive integer.
[0084] In a specific implementation, the physical link status register of the physical layer is accessed at a first preset frequency (for example, reading once every 0.1 seconds), and the current physical link status of the Ethernet link is read therefrom. The physical link status register is a hardware register deployed in the physical layer, which can monitor and store the physical link status of the link in real time. The physical link status is link up / link down, link up indicates that the physical link is normal, and link down indicates that the physical link is abnormal.
[0085] In this embodiment, taking N as 3 as an example, if the physical link status obtained by reading three times in succession is link down, it is considered that the physical link of the current Ethernet link is abnormal, and it is determined that the physical layer status information detection is abnormal.
[0086] Furthermore, after identifying that the Ethernet link is in an abnormal state at the physical layer, the present application can also record a corresponding diagnostic fault code based on the physical link state. Subsequently, the corresponding diagnostic fault code can be recorded according to the physical link state, such as a U1003F0 fault code, to indicate that the fault problem is in the physical link abnormality of the Ethernet link.
[0087] If the physical link state of the Ethernet link is detected to be link up, it means that the current physical link of the Ethernet link is normal, and the physical signal quality of the Ethernet link is continuously obtained to further detect the physical layer state of the Ethernet link.
[0088] Optionally, in some feasible embodiments of the present application, such as Figure 2 As shown, when the physical link status indicates that the Ethernet link is normally connected, obtaining the physical signal quality based on the physical layer includes:
[0089] When the physical link status indicates that the Ethernet link is normal, the physical signal quality is obtained by reading from a physical signal quality register of a physical layer of the Ethernet ECU node at a second preset frequency;
[0090] After obtaining the physical signal quality based on the physical layer, the vehicle Ethernet link status identification method further includes:
[0091] When the physical signal quality is less than the signal quality threshold, determining that the physical layer state information detection is abnormal;
[0092] When the physical signal quality is greater than or equal to the signal quality threshold, it is determined that the physical layer status information detection is normal.
[0093] In specific implementation, after determining that the physical link state is link up, the physical signal quality register of the physical layer is accessed at a second preset frequency (for example, reading once every 0.1 seconds), and the current physical signal quality of the Ethernet link is read therefrom. The physical signal quality register is a hardware register deployed in the physical layer, which can monitor and store the physical signal quality of the link in real time. The value range of the physical signal quality is, for example, 1 to 7. If the physical signal quality is too low, it indicates that the network of the current Ethernet link has failed and cannot support normal data transmission in the link.
[0094] In this embodiment, the signal quality threshold is set in advance according to the performance index of the actual Ethernet link when it works normally, and the signal quality threshold is, for example, 1. When the physical signal quality currently read is less than 1, it is considered that the physical signal quality of the current Ethernet link is poor, the network fails, and it is determined that the physical layer status information detection is abnormal.
[0095] In this case, in some feasible embodiments of the present application, when the physical layer status information detects an abnormality, a corresponding diagnostic fault code may be further recorded based on the physical signal quality.
[0096] For example, when the physical signal quality is less than the signal quality threshold, the Ethernet link is identified as being in a network failure state, and a corresponding diagnostic fault code, such as U100484 fault code, is recorded. The U100484 fault code indicates that there is a problem with the physical signal quality of the Ethernet link.
[0097] In this way, during subsequent maintenance, the fault code can be used to quickly locate the fault site and troubleshoot the cause of the fault, which is conducive to the rapid recovery and stability of vehicle network communications.
[0098] When the physical signal quality is greater than or equal to the signal quality threshold, it means that the physical signal quality of the Ethernet link is within the normal range, and the physical layer status information detection of the Ethernet link is normal. Then, step 130 is continued to perform status detection and identification of the next link of the Ethernet link.
[0099] In S130, when the physical layer status information is detected normally, the data link layer status information of the Ethernet link is obtained based on the data link layer, and / or the transmission control protocol status information between the Ethernet ECU node and the opposite end is obtained based on the transport layer.
[0100] In this embodiment, after detecting that the physical layer status information of the Ethernet link is normal, the data link layer status information of the Ethernet link is continuously obtained based on the data link layer, so as to detect whether there is a link failure in the data link layer. And / or, the transmission control protocol status information between the Ethernet ECU node and the opposite end is detected based on the transport layer, so as to monitor and identify the TCP transmission failure in the link in a timely manner. The transmission control protocol status information is referred to as TCP (Transmission Control Protocol, transmission control protocol status information) status below. The specific data link layer status information and TCP status detection method will be detailed later.
[0101] The following first describes in detail the acquisition and detection process of the TCP status of the Ethernet link in the above steps of this application. The TCP acquisition means in this application are divided into two cases according to whether there is data transmission in the current network. It should be added that TCP data transmission is normally performed between the Ethernet ECU node and its counterpart based on the Ethernet link. The counterpart is, for example, another vehicle-mounted Ethernet ECU node, or the counterpart may also be a vehicle ADCU (Automated Driving Control Unit), TDCU (Transmission Control Unit), etc. This embodiment is not strictly limited here.
[0102] First, we will introduce the situation where there is no data transmission in the current Ethernet link. Figure 3 , Figure 3 1 is a schematic diagram of a TCP state detection process provided by an embodiment of the present application. Optionally, in some feasible embodiments of the present application, the transmission control protocol state information between the Ethernet ECU node and the opposite end is obtained based on the transport layer, including:
[0103] When there is no data communication in the transmission control protocol socket TCP Socket of the Ethernet ECU node for more than a preset time, sending a keep-alive detection frame to the other end according to a third preset frequency;
[0104] In case of receiving a first response message corresponding to the keep-alive detection frame, determining that the transmission control protocol state information detection is normal;
[0105] In the case that the first response message of the keep-alive detection frame is not received for M consecutive times, it is determined that the transmission control protocol state information detection is abnormal, where M is a positive integer.
[0106] The TCP Socket (Transmission Control Protocol Socket) of the Ethernet ECU node is a communication endpoint used in network programming. It provides an interface that allows reliable, ordered, and error-detected data transmission between the Ethernet ECU node and its peer via the TCP protocol.
[0107] In this embodiment, the software entity detects the network status of the entire Ethernet link by detecting the TCP status. When the TCP Socket has no data communication for more than a preset time (e.g., 3 seconds), it is determined that there is no data transmission. In this case, the TCP status detection in the case of no data transmission is implemented by a keep alive detection frame.
[0108] When implementing it specifically, Figure 3 As shown, keep alive detection frames are sent to the other end at a third preset frequency, for example, keep alive detection frames are sent every 3 seconds to maintain the detection function. If the first response message to the keep alive detection frame sent by the other end is received normally, it means that the TCP state of the current Ethernet link is normal and the TCP state detection is normal.
[0109] Assuming M is 3, if no response is received from the other end after three consecutive keep-alive detection frames are sent, it means that the Ethernet link network is abnormal, and the corresponding diagnostic fault code can be recorded later to locate the fault and troubleshoot the problem. The fault diagnostic code, such as the U102887 fault code, is used to identify the network abnormality of the Ethernet link transport layer. In this way, TCP reconnection or other fault handling measures can be performed based on the U102887 fault code, and this embodiment is not strictly limited here.
[0110] It should be added that after the first keep alive detection frame is sent without receiving a response from the peer, the interval for sending keep alive detection frames can be appropriately increased. For example, if no response is received from the peer regarding the keep alive detection frame, keep alive detection frames are continuously sent at a frequency of 1 second for detection. If there is no response to keep alive detection frames for three consecutive times, it indicates that the network is abnormal.
[0111] Optionally, in combination with actual TCP state abnormality scenarios and solutions thereof, in some feasible embodiments of the present application, when the first response message of the keep-alive detection frame is not received for M consecutive times, after determining that the transmission control protocol state information detection is abnormal, the vehicle-mounted Ethernet link state identification method further includes:
[0112] Close the TCP connection of the Ethernet ECU node and re-initiate the TCP connection.
[0113] In this embodiment, when an abnormal TCP status occurs, an attempt can be made to close the TCP connection of the Ethernet ECU node and perform TCP reconnection to restore normal TCP transmission of the Ethernet link between the Ethernet ECU node and the other end, thereby facilitating rapid network recovery and maintaining vehicle network stability.
[0114] Figure 4 This is a schematic diagram of the TCP state detection process provided by another embodiment of the present application, which is aimed at the scenario where data transmission exists in the current Ethernet link. Optionally, in some feasible embodiments of the present application, the transmission control protocol state information between the Ethernet ECU node and the opposite end is obtained based on the transport layer, including:
[0115] When there is data communication in the TCP Socket of the Ethernet ECU node, record the first moment when the TCP Socket sends the target message data; and,
[0116] Record the second time when the TCP Socket receives the second response message of the target message data sent by the peer end;
[0117] When the time difference between the second moment and the first moment is less than or equal to the preset time interval, determining that the transmission control protocol state information detection is normal;
[0118] When the time difference between the second moment and the first moment is greater than the preset time interval, it is determined that the transmission control protocol state information detection is abnormal.
[0119] In this embodiment, when the TCP Socket of the Ethernet ECU node has data communication, the first moment when the TCP Socket sends the target message data is recorded. The target message data is, for example, the message data that needs to be sent to the other end at the current moment. After receiving the target message data, the other end will quickly feedback the second response message corresponding to the target message data under normal circumstances.
[0120] However, if the time difference between the second moment when the TCP Socket finally receives the response from the other end and the first moment is greater than the preset time interval (for example, 3 seconds), it can be considered that the TCP network transmission is erroneous. In this case, the TCP status detection is determined to be abnormal, and the corresponding diagnostic fault code can be recorded subsequently.
[0121] If the time difference between the second moment when the TCP Socket finally receives the response from the other end and the first moment does not exceed the preset time interval (for example, 3 seconds), the current TCP state can be considered normal, the transmission control protocol state information detection is determined to be normal, and the Ethernet link is identified to be in a normal network state.
[0122] Considering that the quality of data transmission in the Ethernet link is also an important part of network communication, please refer to the following Figure 5 , Figure 5 1 is a schematic diagram of a network architecture for CRC register detection provided by an embodiment of the present application. Optionally, in some feasible embodiments of the present application, obtaining data link layer status information of an Ethernet link based on a data link layer includes:
[0123] Reading a first count value at the current moment from a cyclic redundancy check CRC register of a data link layer of an Ethernet ECU node, the CRC register being used to receive and store the number of CRC errors of messages transmitted in an Ethernet link within a preset time period;
[0124] Subtract the first count value from the second count value to obtain a count difference result, where the second count value is the count value obtained by reading the CRC register at the last moment;
[0125] When the count difference result is greater than the count difference threshold, it is determined that the data link layer state information detection is abnormal.
[0126] In the Ethernet link status identification, in order to ensure that errors in the data transmission or storage process in the link can be detected in time, a CRC (Cyclic Redundancy Check) register is set in the data link layer to store the number of CRC errors of the message transmitted in the Ethernet link within a preset time period, and the preset time period is, for example, 1 second.
[0127] In this way, by reading the count value in the CRC register in the data link layer at the current moment, the count value is recorded as the first count value, and the first count value is subtracted from the second count value obtained by reading the CRC register at the previous moment. In this way, according to the difference between the first count value and the second count value, it is possible to quickly detect whether the message data has undergone significant changes in transmission or storage from the previous moment to the current moment.
[0128] If the difference between the first count value and the second count value is greater than the above count difference threshold (e.g., 10), it means that the message data has changed significantly, which means that the data in the current Ethernet link has been tampered with or damaged during transmission, and the Ethernet link is identified to be in an abnormal data transmission state, and the data link layer state information detection is determined to be abnormal. Subsequently, the diagnostic fault code corresponding to the data link layer state information can be further recorded, and the diagnostic fault code can be used to improve the reliability of data transmission in the link in a targeted manner, such as reducing the link communication channel noise.
[0129] Optionally, in some feasible embodiments of the present application, in order to more fully implement CRC continuous verification, after the first count value and the second count value are subtracted to obtain the count difference result, the vehicle Ethernet link status identification method further includes:
[0130] The value of the second count value is updated to the value of the first count value.
[0131] In this embodiment, two variable spaces can be defined in the software entity to record the CRC error count value (second count value) at the last moment and the CRC error count value (first count value) at the current moment, respectively, and the count value at the last moment is subtracted from the current CRC error count value. The last moment is, for example, the last second.
[0132] After the calculation is completed, the value at the current moment is modified to the value at the previous moment so that the CRC count value calculation at the next moment can be effectively performed.
[0133] In S140, during specific implementation, when data link layer status information or transmission control protocol status information is detected to be abnormal, it is identified that the Ethernet link is in a network abnormal state.
[0134] After obtaining the TCP status, if it is determined that the data link layer status information or the transmission control protocol status information is detected abnormally, it can be considered that the current Ethernet link network is abnormal. In this case, the corresponding diagnostic fault code can be recorded. In addition, if the data link layer status information or the transmission control protocol status information is detected normally, it can be identified that the Ethernet link is in a normal network state.
[0135] Optionally, in some feasible embodiments of the present application, in order to fully improve the overall performance stability and reliability of the automobile, after identifying that the Ethernet link is in an abnormal network state, the vehicle-mounted Ethernet link state identification method further includes:
[0136] Execute pre-set fault response measures to initiate backup transmission of important information and / or downgrade the vehicle's functionality.
[0137] In this embodiment, corresponding preset fault response measures can be set in advance. In this way, corresponding processing measures can be executed in time after identifying that the Ethernet link is in an abnormal network state, thereby avoiding serious consequences such as economic losses caused by network failures, which is conducive to providing overall performance stability and reliability of the vehicle.
[0138] The above-mentioned preset fault response measures can be used to start the backup transmission of important information and / or downgrade the function of the vehicle. For example, when starting the backup transmission of important information, it can be to enable the backup transmission path of important signals (such as CAN, Controller Area Network, Controller Local Area Network), which is not strictly limited here.
[0139] More specifically, the present application can also record different diagnostic fault codes according to the faults detected at different link levels. In this way, more targeted fault response measures are set for different diagnostic fault codes to provide a higher level of protection for the overall performance stability and reliability of the vehicle.
[0140] In order to facilitate understanding of the vehicle Ethernet link status identification method provided by the above embodiment, the above method is described below using a specific scenario embodiment. Figure 6 is a schematic diagram of the network architecture of a method for identifying a vehicle Ethernet link state provided by an embodiment of the present application, Figure 7 A schematic diagram of a scenario implementation flow of a method for identifying the state of an in-vehicle Ethernet link provided in one embodiment of the present application.
[0141] like Figure 6 As shown, in this scenario embodiment, the physical layer is deployed with two hardware registers, the physical link status register and the physical signal quality register, which can be used to record the physical link status and physical signal quality of the Ethernet link respectively. The data link layer is deployed with a CRC register, which can be used to record the number of data errors that occur during data transmission. The transport layer / network layer can generate a keep-alive detection frame for detection during TCP status detection.
[0142] like Figure 7 As shown, in the specific vehicle Ethernet link status identification process, a software entity can be implemented in advance for each Ethernet ECU node. This software entity will be started 30 seconds after the Ethernet ECU node is powered on. The specific vehicle Ethernet link status identification steps are as follows S701-S708:
[0143] S701, obtaining a physical link status. Specifically, the physical link status, ie, the link status of the Ethernet link, is obtained by reading a physical link status register of the physical layer every 0.1 seconds.
[0144] S702, determine whether the physical link status is link up. If Link Down is read three times in a row, the physical link is considered abnormal, the U1003F0 fault code is recorded, and the backup transmission path of important signals (such as CAN) is enabled or the function is downgraded until a link up is detected. When the link status is read as Link up, continue to execute S703.
[0145] S703, obtaining physical signal quality. Specifically, the physical signal quality register in the physical layer is read every 0.1 seconds to obtain the physical signal quality SQI.
[0146] S704, determine whether the physical signal quality SQI is greater than or equal to 1. If the physical signal quality SQI is less than 1, the network is considered to be failed, the U100484 fault code is recorded, and the important signal backup transmission path (such as CAN) is enabled or the function is downgraded. If the physical signal quality SQI is greater than or equal to 1, continue to execute S705.
[0147] S705, start TCP state detection and configure the keep-alive detection frame detection mechanism. During TCP state detection, the network state of the entire Ethernet link is equivalently detected by detecting the TCP state.
[0148] S706, determine whether there is data transmission in the current TCP Socket. If there is data communication in the TCP Socket, jump to S707. If there is no communication in the TCP Socket for 3 seconds, it is determined that there is no data transmission, and jump to S708.
[0149] S707, determine whether (Timer(RX-TX)) is greater than 3 seconds. When data is transmitted in the Ethernet link, this scenario embodiment records the time when TCP last sent data (TimerTX) and the last time when it received data (TimerRX), and performs a difference operation on the two times. If the last receiving time minus the last sending time (Timer(RX-TX)) is greater than 3 seconds, it is considered that the TCP network transmission is erroneous, the U102887 fault code is recorded, and the important information backup transmission is started or the function is downgraded.
[0150] S708, determine whether there is no response to the keep-alive detection frame for three times. When there is no data transmission in the Ethernet link, the keep-alive detection frame is used to detect the link validity value. The specific measures are as follows: if the TCP Socket has no communication for 3 seconds, a keep-alive detection frame will be sent. If a response message corresponding to the keep-alive detection frame is received from the other end, it means that the current connection is normal. In this case, the keep-alive detection frame will continue to be sent at intervals of 3 seconds to maintain the detection function.
[0151] If no response is received from the keepalive detection frame sent by the other end, keepalive detection frames are sent every 1 second to continue detection. If there is no response to keepalive detection frames for 3 consecutive times, it means that the network is abnormal. Close the TCP connection and re-initiate the connection, record the U102887 fault code, and start the backup transmission of important information or perform function downgrade.
[0152] It should be noted that in this scenario embodiment, when using Ethernet communication, if the peer node is abnormally disconnected, the network layer can identify that the peer node has been disconnected within a certain period of time (for example, within 10 seconds), record the DTC and start the reconnection mechanism.
[0153] It should also be added that in the above-mentioned Ethernet link status identification process, this scenario embodiment can also detect errors in the data transmission or storage process in the link in a timely manner by continuously reading the CRC register value. If the difference between the CRC count value at the current moment and the CRC count value at the previous moment is greater than the count difference threshold (for example, 10), it means that the message data has changed significantly, which means that the data in the current Ethernet link has been tampered with or damaged during transmission, and the Ethernet link is identified as being in an abnormal data transmission state, and the corresponding diagnostic fault code is recorded. Subsequently, the reliability of data transmission in the link can be targeted based on the diagnostic fault code, such as reducing the link communication channel noise.
[0154] In summary, in practical applications, the Ethernet link status identification solution of this scenario embodiment is widely applicable to dual-axle drive pure electric vehicles, etc., which can improve the vehicle's driving performance / control performance while taking into account economic performance. The above-mentioned Ethernet link status identification solution provided by this scenario embodiment effectively improves the efficiency of Ethernet link status identification as a whole, thereby fully improving the overall network fault location and troubleshooting efficiency, thereby effectively ensuring the stability and security of the automobile network.
[0155] Based on the vehicle Ethernet link state identification method provided in the above embodiment, out of the same inventive concept, the present application also provides a vehicle Ethernet link state identification device corresponding to the vehicle Ethernet link state identification method. Figure 8 The vehicle-mounted Ethernet link status identification device is introduced in detail.
[0156] Figure 8 A schematic structural diagram of a vehicle-mounted Ethernet link status identification device provided in an embodiment of the present application is shown, which is applied to an Ethernet electronic control unit ECU node of a vehicle. Figure 8 The vehicle-mounted Ethernet link status identification device 800 shown includes:
[0157] A first acquisition module 810 is used to acquire physical layer status information of an Ethernet link where the Ethernet ECU node is located based on the physical layer when the Ethernet ECU node is powered on;
[0158] The first identification module 820 is used to identify that the Ethernet link is in a network abnormal state when the physical layer state information is detected abnormally;
[0159] The second acquisition module 830 is used to acquire data link layer status information of the Ethernet link based on the data link layer when the physical layer status information detection is normal, and / or acquire transmission control protocol status information between the Ethernet ECU node and the opposite end based on the transport layer;
[0160] The second identification module 840 is used to identify that the Ethernet link is in a network abnormal state when the data link layer state information or the transmission control protocol state information detects an abnormality.
[0161] The embodiment of the present application provides a vehicle Ethernet link status identification device. By setting corresponding functional modules, it can be seen from the description that the vehicle Ethernet link status identification device of the embodiment of the present application, by fully combining the characteristics of the vehicle Ethernet link, sets a sequential link detection method from the physical layer detection of the Ethernet node to the data link layer and / or transport layer detection of the Ethernet link, thereby ensuring the rapid identification and accurate positioning of the Ethernet link network fault in the detection link. In addition, in the process of Ethernet link status detection, the embodiment of the present application detects the corresponding status information at different levels in sequence, so as to reasonably and accurately identify whether the Ethernet link status is abnormal, and then directly and quickly locate the Ethernet link fault point. In this way, the overall Ethernet link status recognition efficiency can be effectively improved, thereby fully improving the overall network fault location and troubleshooting efficiency, and then effectively ensuring the stability and security of the automobile network.
[0162] In some possible implementations, the physical layer status information includes the physical link status and / or physical signal quality of the Ethernet link; the first acquisition module 810 acquires the physical layer status information of the Ethernet link where the Ethernet ECU node is located based on the physical layer, including:
[0163] A first acquisition submodule may be used to acquire a physical link status of an Ethernet link based on a physical layer; and
[0164] The second acquisition submodule may be configured to acquire physical signal quality based on the physical layer when the physical link status indicates that the Ethernet link is normally connected.
[0165] In some possible implementations, the first acquisition submodule acquires the physical link status of the Ethernet link based on the physical layer, including:
[0166] According to a first preset frequency, a physical link status is obtained by reading from a physical link status register of a physical layer;
[0167] After obtaining the physical link status of the Ethernet link, the vehicle-mounted Ethernet link status identification device further includes:
[0168] The first determination module may be configured to determine that the physical layer status information detection is abnormal when the physical link status read N times in succession indicates that the Ethernet link is abnormal, where N is a positive integer.
[0169] In some possible implementations, the second acquisition submodule acquires the physical signal quality based on the physical layer when the physical link status indicates that the Ethernet link is normally connected, including:
[0170] When the physical link status indicates that the Ethernet link is normal, the physical signal quality is obtained by reading from a physical signal quality register of a physical layer of the Ethernet ECU node at a second preset frequency;
[0171] After obtaining the physical signal quality based on the physical layer, the vehicle Ethernet link status identification device further includes:
[0172] The second determination module may be used to determine that the physical layer state information detection is abnormal when the physical signal quality is less than the signal quality threshold;
[0173] The third determination module may be configured to determine that the physical layer status information detection is normal when the physical signal quality is greater than or equal to a signal quality threshold.
[0174] In some possible implementations, the above-mentioned obtaining the transmission control protocol state information between the Ethernet ECU node and the peer end based on the transport layer includes:
[0175] The first sending submodule can be used to send a keep-alive detection frame to the other end according to a third preset frequency when the transmission control protocol socket TCP Socket of the Ethernet ECU node has no data communication for more than a preset time period;
[0176] The first determination submodule may be used to determine that the transmission control protocol state information detection is normal when a first response message corresponding to the keep-alive detection frame is received;
[0177] The second determining submodule may be configured to determine that the transmission control protocol state information detection is abnormal when the first response message of the keep-alive detection frame is not received for M consecutive times, where M is a positive integer.
[0178] In some possible implementations, obtaining the transmission control protocol state information between the Ethernet ECU node and the peer end based on the transport layer includes:
[0179] The first recording submodule can be used to record the first moment when the TCP Socket sends the target message data when there is data communication in the TCP Socket of the Ethernet ECU node; and
[0180] The second recording submodule may be used to record the second moment when the TCP Socket receives the second response message of the target message data sent by the opposite end;
[0181] The third determination submodule may be used to determine that the transmission control protocol state information detection is normal when the time difference between the second moment and the first moment is less than or equal to a preset time interval;
[0182] The fourth determining submodule may be configured to determine that the transmission control protocol state information detection is abnormal when the time difference between the second moment and the first moment is greater than a preset time interval.
[0183] In some possible implementations, the acquiring of data link layer status information of the Ethernet link based on the data link layer includes:
[0184] A first reading submodule may be used to read a first count value at a current moment from a cyclic redundancy check CRC register of a data link layer of an Ethernet ECU node, the CRC register being used to receive and store the number of CRC errors of a message transmitted in an Ethernet link within a preset time period;
[0185] The first operation submodule can be used to perform a subtraction operation on the first count value and the second count value to obtain a count difference result, where the second count value is the count value obtained by reading the CRC register at the last moment;
[0186] The fifth determination submodule may be used to determine that the data link layer state information detection is abnormal when the count difference result is greater than the count difference threshold.
[0187] In some possible implementations, after identifying that the Ethernet link is in an abnormal network state, the vehicle-mounted Ethernet link state identification device further includes:
[0188] The execution module can be used to execute preset fault response measures to initiate backup transmission of important information and / or downgrade the vehicle's functions.
[0189] Based on the vehicle Ethernet link state identification method provided in the above embodiment, out of the same inventive concept, the present application also provides an Ethernet link state identification device corresponding to the above vehicle Ethernet link state identification method. Fig. 9 A detailed introduction to the vehicle-mounted Ethernet link status identification device.
[0190] See below Fig. 9 , Fig. 9 It is a structural diagram of an in-vehicle Ethernet link status identification device provided in one embodiment of the present application.
[0191] The in-vehicle Ethernet link status identification device may include a processor 901 and a memory 902 storing computer program instructions.
[0192] Specifically, the processor 901 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0193] The memory 902 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 902 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 902 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 902 is a non-volatile solid-state memory.
[0194] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0195] The processor 901 implements any one of the vehicle Ethernet link status identification methods in the above embodiments by reading and executing computer program instructions stored in the memory 902 .
[0196] In one example, the data vehicle Ethernet link state identification device may further include a communication interface 903 and a bus 910. Fig. 9 As shown, the processor 901, the memory 902, and the communication interface 903 are connected via a bus 910 and communicate with each other.
[0197] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0198] Bus 910 includes hardware, software or both, and couples the components of the vehicle Ethernet link state identification device to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-end bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, bus 910 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnect.
[0199] The vehicle-mounted Ethernet link state identification device executes the vehicle-mounted Ethernet link state identification method in the embodiment of the present application, thereby realizing the vehicle-mounted Ethernet link state identification method described in the embodiment of the present application.
[0200] In addition, in combination with the vehicle Ethernet link status identification method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any of the vehicle Ethernet link status identification methods in the above embodiment is implemented.
[0201] Based on the vehicle Ethernet link status identification method in the above embodiment, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the vehicle Ethernet link status identification method provided in any one of the above embodiments of the present application.
[0202] In addition, an embodiment of the present application further provides a vehicle, the vehicle comprising at least one of the following: an in-vehicle Ethernet link status identification device as provided in the above-mentioned embodiment of the present application; an in-vehicle Ethernet link status identification device as provided in the above-mentioned embodiment of the present application; a computer-readable storage medium as provided in the above-mentioned embodiment of the present application; a computer program product as provided in the above-mentioned embodiment of the present application.
[0203] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0204] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0205] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0206] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0207] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for identifying the state of an in-vehicle Ethernet link, characterized in that: An Ethernet electronic control unit ECU node applied to a vehicle, the Ethernet ECU node comprising a physical layer, a data link layer and a transport layer; the method comprising: When the Ethernet ECU node is powered on, obtaining physical layer status information of the Ethernet link where the Ethernet ECU node is located based on the physical layer; In the case where the physical layer status information detects an abnormality, identifying that the Ethernet link is in a network abnormal state; When the physical layer status information is detected normally, acquiring data link layer status information of the Ethernet link based on the data link layer, and / or acquiring transmission control protocol status information between the Ethernet ECU node and the opposite end based on the transport layer; When the data link layer status information or the transmission control protocol status information detects an abnormality, it is identified that the Ethernet link is in a network abnormal state.
2. The method according to claim 1, characterized in that: The physical layer status information includes the physical link status and / or physical signal quality of the Ethernet link; the obtaining the physical layer status information of the Ethernet link where the Ethernet ECU node is located based on the physical layer includes: Acquire the physical link status of the Ethernet link based on the physical layer; and, When the physical link status indicates that the Ethernet link is normally connected, the physical signal quality is obtained based on the physical layer.
3. The method according to claim 2, characterized in that The acquiring the physical link status of the Ethernet link based on the physical layer includes: Reading the physical link status from a physical link status register of the physical layer according to a first preset frequency to obtain the physical link status; After acquiring the physical link status of the Ethernet link, the method further includes: When the physical link status read N times in succession indicates that the Ethernet link is abnormal, it is determined that the physical layer status information detection is abnormal, where N is a positive integer.
4. The method according to claim 2, characterized in that: When the physical link status indicates that the Ethernet link is normally connected, obtaining the physical signal quality based on the physical layer includes: When the physical link status indicates that the Ethernet link is normally connected, reading the physical signal quality from a physical signal quality register of the physical layer at a second preset frequency; After acquiring the physical signal quality based on the physical layer, the method further includes: In a case where the physical signal quality is less than a signal quality threshold, determining that the physical layer state information detection is abnormal; When the physical signal quality is greater than or equal to the signal quality threshold, it is determined that the physical layer status information detection is normal.
5. The method according to claim 1, characterized in that The acquiring, based on the transport layer, the transmission control protocol status information between the Ethernet ECU node and the opposite end includes: When there is no data communication in the transmission control protocol socket TCP Socket of the Ethernet ECU node for more than a preset time, sending a keep-alive detection frame to the opposite end according to a third preset frequency; In case of receiving a first response message corresponding to the keep-alive detection frame, determining that the transmission control protocol state information detection is normal; In a case where the first response message of the keep-alive detection frame is not received for M consecutive times, it is determined that the transmission control protocol state information detection is abnormal, where M is a positive integer.
6. The method according to claim 1, characterized in that The acquiring, based on the transport layer, the transmission control protocol status information between the Ethernet ECU node and the opposite end includes: When data communication exists in the TCP Socket of the Ethernet ECU node, recording the first moment when the TCP Socket sends the target message data; and, Recording a second time when the TCP Socket receives a second response message of the target message data sent by the peer end; When the time difference between the second moment and the first moment is less than or equal to a preset time interval, determining that the transmission control protocol state information detection is normal; When the time difference between the second moment and the first moment is greater than the preset time interval, it is determined that the transmission control protocol state information detection is abnormal.
7. The method according to claim 1, characterized in that The acquiring the data link layer status information of the Ethernet link based on the data link layer includes: Reading a first count value at the current moment from a cyclic redundancy check CRC register of the data link layer, wherein the CRC register is used to receive and store the number of CRC errors of messages transmitted in the Ethernet link within a preset time period; Subtract the first count value from the second count value to obtain a count difference result, where the second count value is a count value obtained by reading the CRC register at the last moment; When the count difference result is greater than the count difference threshold, it is determined that the data link layer state information detection is abnormal.
8. The method according to any one of claims 1 to 7, characterized in that: After identifying that the Ethernet link is in an abnormal network state, the method further includes: Execute pre-set fault response measures to initiate backup transmission of important information and / or downgrade the functionality of the vehicle.
9. A vehicle-mounted Ethernet link status identification device, characterized in that: An Ethernet electronic control unit ECU node applied to a vehicle, the Ethernet ECU node comprising a physical layer, a data link layer and a transport layer; the device comprising: A first acquisition module, configured to acquire, based on the physical layer, physical layer status information of the Ethernet link where the Ethernet ECU node is located when the Ethernet ECU node is powered on; A first identification module, configured to identify that the Ethernet link is in a network abnormal state when the physical layer state information is detected to be abnormal; A second acquisition module is used to acquire data link layer status information of the Ethernet link based on the data link layer when the physical layer status information is detected normally, and / or to acquire transmission control protocol status information between the Ethernet ECU node and the opposite end based on the transport layer; The second identification module is used to identify that the Ethernet link is in an abnormal network state when the data link layer state information or the transmission control protocol state information detects an abnormality.
10. A vehicle-mounted Ethernet link status identification device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for identifying the state of an in-vehicle Ethernet link as described in any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the method for identifying the state of an in-vehicle Ethernet link according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method for identifying the state of an in-vehicle Ethernet link as described in any one of claims 1 to 8.
13. A vehicle, characterized in that: The vehicle comprises at least one of the following: the in-vehicle Ethernet link status identification device according to claim 9; the in-vehicle Ethernet link status identification device according to claim 10; the computer-readable storage medium according to claim 11; and the computer program product according to claim 12.
Citation Information
Cited By
Communication method of electronic control unit, storage medium and electronic equipment
CN121397012A