Vehicle-mounted Ethernet abnormity reason positioning method, device, equipment and vehicle
By detecting anomalies and generating abnormal information according to the operation sequence of communication nodes in vehicle Ethernet communication, the problem of being unable to quickly locate the cause of anomalies in the existing technology is solved, and the anomaly processing speed and communication efficiency are improved.
Patent Information
- Application Number
- CN202310341106.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology lacks abnormal event processing in vehicle-mounted Ethernet communication, resulting in a delay in normally opening or closing Ethernet communication, inability to quickly locate the cause of the abnormality, and reducing the abnormality processing speed and communication efficiency.
By receiving the target communication request from the communication management module, it detects whether there are abnormalities in sequence according to the operation sequence of multiple communication nodes, generates abnormal information and sends it to the diagnostic event management module, ensuring that the cause of the abnormality can be quickly located in abnormal situations.
The exception processing speed and Ethernet communication efficiency are improved to ensure that the cause of the exception can be quickly located when Ethernet communication cannot be turned on or off normally.
Smart Images

Figure CN118740601A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and in particular, relates to a method, device, equipment and vehicle for locating the cause of abnormality in an in-vehicle Ethernet. Background Art
[0002] Usually, in the vehicle Ethernet, the normal process of opening Ethernet communication can be as follows: the communication management module sends a request to open the communication to the Ethernet state manager; after receiving the request to open the communication, the Ethernet state manager sends a first request to the network card abstraction layer to request the network card abstraction layer to open the Ethernet controller and transceiver, and after the Ethernet controller and transceiver are successfully opened, wait for the connection of the communication link; after the communication link is connected, the Ethernet state manager sends a second request to the protocol stack to request to open the protocol stack; after the protocol stack is opened, the Ethernet state manager sends a message of successful communication opening to the communication management module. In the above process, there is a lack of processing of abnormal events. If an abnormality occurs, it may be difficult to open the Ethernet communication normally. For example, the Ethernet controller is delayed in opening (such as hardware damage, etc.). The existing technology does not perform error reporting processing, which results in a delay in reaching the full communication state when everything seems normal. Similarly, in the process of closing the Ethernet communication, if an abnormality occurs, it may be difficult to close the Ethernet communication normally.
[0003] Due to the lack of processing of abnormal events in the prior art, when Ethernet communication cannot be normally turned on / off for a long time, the cause of the abnormality cannot be quickly located, thereby reducing the speed of abnormal processing and the efficiency of Ethernet communication. Summary of the invention
[0004] The embodiments of the present application provide a method, device, equipment and vehicle for locating the cause of an abnormality in an in-vehicle Ethernet, which can quickly locate the cause of the abnormality, thereby increasing the speed of abnormality processing and improving the efficiency of Ethernet communication.
[0005] In a first aspect, an embodiment of the present application provides a method for locating an abnormality cause of an in-vehicle Ethernet, the method comprising:
[0006] Upon receiving a target communication request sent by the communication management module, sequentially detecting whether the multiple communication nodes are abnormal according to the operation order of the multiple communication nodes corresponding to the target communication request, wherein the target communication request includes any one of a communication opening request and a communication closing request;
[0007] For each of the communication nodes, if there is no abnormality in the communication node, return to execute the operation sequence of the multiple communication nodes corresponding to the target communication request, and sequentially detect whether the multiple communication nodes are abnormal, until the first target communication node is abnormal or the target communication request is completed, and the first target communication node is any one of the multiple communication nodes;
[0008] In the case where the first target communication node is abnormal, generating abnormal information corresponding to the first target communication node;
[0009] The abnormal information is sent to a diagnostic event management module.
[0010] In a possible implementation, the detecting, in sequence according to the operation order of the multiple communication nodes corresponding to the target communication request, whether the multiple communication nodes are abnormal includes:
[0011] Sending a first target request corresponding to the first communication node to the network card abstraction layer, wherein the first target request includes any one of a request to open the first communication node and a request to close the first communication node;
[0012] When no feedback information corresponding to the first target request is received within a first preset time period, it is determined that the first communication node is abnormal.
[0013] In a possible implementation manner, sending the first target request corresponding to the first communication node to the network card abstraction layer includes:
[0014] Sending the first target request corresponding to the first communication node to the network card abstraction layer according to a first preset period;
[0015] In the case where no feedback information corresponding to the first target request is received within a first preset time period, determining that the first communication node is abnormal includes:
[0016] In a case where no feedback information corresponding to the first target request is received, obtaining a first sending number of the first target request;
[0017] When the first sending number reaches a first preset sending number and no feedback information corresponding to the first target request is received, it is determined that the first communication node is abnormal.
[0018] In a possible implementation, the first communication node is a transceiver, and the detecting, in sequence according to the operation sequence of the multiple communication nodes corresponding to the target communication request, whether the multiple communication nodes are abnormal further includes:
[0019] In the case where feedback information corresponding to the first target request is received within the first preset time period, determining that there is no abnormality in the transceiver;
[0020] When the link status information corresponding to the communication link sent by the network card abstraction layer is not received within the second preset time period, it is determined that the communication link is abnormal.
[0021] In a possible implementation, the detecting, in sequence, whether the multiple communication nodes are abnormal according to the operation order of the multiple communication nodes corresponding to the target communication request further includes:
[0022] If there is no abnormality in the transceiver and the link status information is received within the second preset time period, sending a second target request to the protocol stack, wherein the second target request includes any one of a request to start the protocol stack and a request to close the protocol stack;
[0023] If no feedback information corresponding to the second target request is received within a third preset time period, it is determined that the protocol stack is abnormal.
[0024] In a possible implementation manner, sending the second target request to the protocol stack includes:
[0025] Sending the second target request to the protocol stack according to a second preset period;
[0026] When no feedback information corresponding to the second target request is received within a third preset time period, determining that the protocol stack is abnormal includes:
[0027] In a case where no feedback information corresponding to the second target request is received, obtaining a second number of times the second target request is sent;
[0028] When the second sending number reaches a second preset sending number and feedback information corresponding to the second target request is not received, it is determined that the protocol stack is abnormal.
[0029] In a possible implementation, after generating the abnormal information corresponding to the first target communication node and before sending the abnormal information to the diagnostic event management module, the method further includes:
[0030] Acquire a state of a second target communication node, where the second target communication node is any one of the communication nodes that have been successfully started before the abnormal information is generated;
[0031] In a case where the state of the second target communication node indicates that the second target communication node is abnormal, abnormality information corresponding to the second target communication node is generated.
[0032] In a possible implementation manner, after generating the abnormal information corresponding to the first target communication node, the method further includes:
[0033] A communication interruption request is sent to the communication management module.
[0034] In a second aspect, an embodiment of the present application provides a device for locating the cause of abnormality of an in-vehicle Ethernet, the device comprising:
[0035] a detection module, configured to detect whether the plurality of communication nodes are abnormal in sequence according to the operation sequence of the plurality of communication nodes corresponding to the target communication request when receiving the target communication request sent by the communication management module, wherein the target communication request includes any one of a communication opening request and a communication closing request;
[0036] an execution module, for each of the communication nodes, when the communication node is normal, returning to execute the operation sequence of the multiple communication nodes corresponding to the target communication request, and sequentially detecting whether the multiple communication nodes are abnormal, until the first target communication node is abnormal or the target communication request is completed, the first target communication node being any one of the multiple communication nodes;
[0037] A first generating module, configured to generate abnormal information corresponding to the first target communication node when the first target communication node is abnormal;
[0038] The first sending module is used to send the abnormal information to the diagnosis event management module.
[0039] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
[0040] When the processor executes the computer program instructions, the processor implements any possible implementation method of the first aspect described above.
[0041] In a fourth aspect, an embodiment of the present application provides a vehicle, the vehicle comprising at least one of the following:
[0042] The device for locating the cause of abnormality of an in-vehicle Ethernet according to any one of the embodiments of the second aspect;
[0043] An electronic device as in any embodiment of the third aspect.
[0044] The method, device, equipment and vehicle for locating the cause of abnormality of the vehicle Ethernet of the embodiment of the present application, in the process of executing the target communication request, that is, opening the communication request or closing the communication request, detects whether the multiple communication nodes are abnormal in turn according to the operation order of the multiple communication nodes corresponding to the target communication request, and can quickly determine the communication node that causes the failure to open the communication or close the communication when a certain communication node is abnormal. By continuing to execute the target communication request and detecting whether the multiple communication nodes are abnormal when there is no abnormality in the communication node, it is possible to ensure that the target communication request is completed or the abnormal communication node is determined when the target communication request cannot be completed. By generating and sending the abnormal information corresponding to the first target communication node to the diagnostic event management module when the first target communication node is abnormal, it is possible to quickly locate the cause of the abnormality when the Ethernet communication cannot be opened / closed normally, thereby improving the abnormality processing speed and the Ethernet communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] 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.
[0046] Figure 1 This is a schematic diagram of a process for normally starting Ethernet communication provided by an embodiment of the present application;
[0047] Figure 2 It is a flow chart of a method for locating the cause of an abnormality in an in-vehicle Ethernet provided in an embodiment of the present application;
[0048] Figure 3 It is a schematic diagram of a process of requesting to open a first communication node in a communication opening request process provided by an embodiment of the present application;
[0049] Figure 4 It is a flowchart of another method for locating the cause of an abnormality of an in-vehicle Ethernet provided in an embodiment of the present application;
[0050] Figure 5 It is a structural schematic diagram of a device for locating the cause of abnormality of an in-vehicle Ethernet provided in an embodiment of the present application;
[0051] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0053] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0054] It should be noted that, in this article, relational terms such as "first" and "second" 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 term "comprises" or any other variant thereof is 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 sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0055] Currently, the Ethernet state manager maintains five sub-states: OFFLINE, WAIT_TRCVLINK, WAIT_ONLINE, ONLINE, and WAIT_OFFLINE. The five sub-states and their corresponding conditions can be shown in Table 1 below.
[0056] Table 1
[0057]
[0058] In Table 1, ACTIVE can represent a normal working state, and DOWN can represent an abnormal working state. In the communication link state, ACTIVE can specifically be a connected state, and DOWN can specifically be a disconnected state. In the controller state and transceiver state, ACTIVE can specifically be an open state, and DOWN can specifically be a closed state. In addition, in the protocol stack state, ONLINE can be an open state, and OFFLINE can be a closed state.
[0059] Based on this, the normal process diagram for starting Ethernet communication can be as follows: Figure 1 As shown, the following steps may be specifically included:
[0060] S11, the communication management module initiates an Ethernet communication start request to the Ethernet status manager;
[0061] S12, the Ethernet state manager initiates a request to the network card abstraction layer to turn on the controller (i.e., the network card) and the transceiver;
[0062] S13, the Ethernet state manager receives the controller state and the transceiver state. When both the controller and the transceiver are successfully started, the Ethernet state manager switches the sub-state to WAIT_TRCVLINK. In this state, the Ethernet state manager starts to wait for the monitored link state information;
[0063] S14, the Ethernet state manager receives the link state. After the Ethernet state manager receives the link state ACTIVE sent by the network card abstraction layer, the Ethernet state manager requests the protocol stack to be ONLINE. At this time, the Ethernet state manager switches the sub-state to WAIT_ONLINE. In this state, the Ethernet state manager must wait for the monitored protocol stack status information in the network protocol stack.
[0064] S15, the Ethernet state manager receives the protocol stack state. After the Ethernet state manager receives the protocol stack state ACTIVE (i.e., IP communication is available), the Ethernet state manager switches the sub-state to ONLINE.
[0065] S16. The Ethernet status manager notifies the communication management module that the communication is open.
[0066] In the above S12, S13, S14 and S15, the Ethernet state manager needs to interact with the network card abstraction layer and the protocol stack respectively, but lacks the processing of abnormal events, which is not conducive to the problem location in abnormal situations during Ethernet communication. For example, if the controller in the first step is delayed to open (such as hardware damage, etc.), the existing technology will not perform error reporting processing, which results in a delay in reaching the full communication state when everything seems normal, and the cause of the problem cannot be quickly diagnosed.
[0067] Thus, in order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment, storage medium and vehicle for locating the cause of an abnormality in an in-vehicle Ethernet.
[0068] The following first introduces the method for locating the cause of an abnormality in an in-vehicle Ethernet provided in an embodiment of the present application.
[0069] Figure 2 FIG. 1 is a flow chart showing a method for locating the cause of an abnormality in an in-vehicle Ethernet network provided by an embodiment of the present application. Figure 2 As shown, the method for locating the cause of an abnormality in an in-vehicle Ethernet provided in an embodiment of the present application includes steps S210-S240.
[0070] S210. Upon receiving a target communication request sent by the communication management module, sequentially detect whether multiple communication nodes are abnormal according to the operation sequence of multiple communication nodes corresponding to the target communication request, wherein the target communication request includes any one of an on-communication request and a off-communication request.
[0071] The target communication request may be a communication opening request or a communication closing request. If the target communication request is a communication opening request, the operation sequence of the multiple communication nodes corresponding to the target communication request may be the sequence of opening the multiple communication nodes. If the target communication request is a communication closing request, the operation sequence of the multiple communication nodes corresponding to the target communication request may be the sequence of closing the multiple communication nodes. Among them, the multiple communication nodes may include a first communication node, a communication link, and a protocol stack. The first communication node may include a controller (i.e., a network card) and a transceiver.
[0072] As an example, in the process of turning on or off multiple communication nodes, each communication node may be detected in turn to see if it is abnormal.
[0073] S220. For each communication node, when there is no abnormality in the communication node, return to execute the operation sequence of multiple communication nodes corresponding to the target communication request, and detect whether the multiple communication nodes are abnormal in turn, until the first target communication node is abnormal or the target communication request is completed, and the first target communication node is any one of the multiple communication nodes.
[0074] The first target communication node may be an abnormal communication node. As an example, in the process of detecting multiple communication nodes according to the operation sequence of multiple communication nodes corresponding to the target communication request. If no communication node is abnormal, the target communication process may continue to be executed and multiple communication nodes may be detected to see if they are abnormal. If a communication node is abnormal, the communication node may be determined as the first target communication node.
[0075] S230. When the first target communication node is abnormal, generate abnormal information corresponding to the first target communication node.
[0076] The abnormal information may include a fault description corresponding to the faulty communication node. The abnormal information may be generated in the form of a fault code.
[0077] As an example, the correspondence between the fault code and the fault description may be as shown in Table 2.
[0078] Table 2
[0079]
[0080]
[0081] S240: Send abnormal information to the diagnostic event management module.
[0082] After generating the exception information, the Ethernet state manager may report the exception information to the diagnostic event management module, so as to locate the cause of the exception through the exception information in the diagnostic event management module and perform exception processing.
[0083] Based on this, in order to avoid wasting resources, in some embodiments, after generating the abnormal information corresponding to the first target communication node, the following may also be included:
[0084] Send a communication interrupt request to the communication management module.
[0085] Here, after sending the interrupt communication request to the communication management module, the communication management module can respond to the interrupt communication request and send a communication closing request to the Ethernet state manager. In this way, the Ethernet state manager can execute the communication closing step. That is, by interrupting the communication in the case of a communication node failure, it is possible to avoid wasting resources.
[0086] It should be noted that the order of sending the communication interruption request and sending the abnormal information may not be limited.
[0087] The method for locating the cause of abnormality of the vehicle Ethernet of the embodiment of the present application, in the process of executing the target communication request, that is, opening the communication request or closing the communication request, detects whether the multiple communication nodes are abnormal in turn according to the operation order of the multiple communication nodes corresponding to the target communication request, and can quickly determine the communication node that causes the failure to open the communication or close the communication when a certain communication node is abnormal. By continuing to execute the target communication request and detecting whether the multiple communication nodes are abnormal when there is no abnormality in the communication node, it is possible to ensure that the target communication request is completed or the abnormal communication node is determined when the target communication request cannot be completed. By generating and sending the abnormal information corresponding to the first target communication node to the diagnostic event management module when the first target communication node is abnormal, it is possible to quickly locate the cause of the abnormality when the Ethernet communication cannot be opened / closed normally, thereby improving the abnormality processing speed and the Ethernet communication efficiency.
[0088] Based on this, in order to accurately determine whether the first communication node is abnormal, in some embodiments, the above S210 may specifically include:
[0089] Sending a first target request corresponding to the first communication node to the network card abstraction layer, where the first target request includes any one of a request to open the first communication node and a request to close the first communication node;
[0090] When no feedback information corresponding to the first target request is received within the first preset time period, it is determined that the first communication node is abnormal.
[0091] Here, if the target communication request is an open communication request, the first target request corresponding to the first communication node may include an open controller request and an open transceiver request. If the target communication request is a close communication request, the first target request corresponding to the first communication node may include a close controller request and a close transceiver request.
[0092] As an example, in the case where the first target request is a request to turn on the controller, the feedback information corresponding to the first target request may be controller ACTIVE. In the case where the first target request is a request to turn off the controller, the feedback information corresponding to the first target request may be controller DOWN. In the case where the first target request is a request to turn on the transceiver, the feedback information corresponding to the first target request may be transceiver ACTIVE. In the case where the first target request is a request to turn off the transceiver, the feedback information corresponding to the first target request may be transceiver DOWN. In addition, the first preset duration may be, for example, 5s, 10s, 15s, etc., which are not limited here. If the feedback information corresponding to the first target request is not received within the first preset duration, it can be considered that the first communication node fails to open or close, that is, it can be determined that the first communication node is abnormal. Specifically, the abnormal information corresponding to the first communication node may include fault codes 0x01, 0x02, 0x05 and 0x06.
[0093] In addition, as an example, when the Ethernet state manager receives the target communication request sent by the communication management module, it can send a first target request to the network card abstraction layer for the first communication node, and then wait for feedback information corresponding to the first target request.
[0094] Based on this, in order to ensure that the network card abstraction layer receives the first target request, as another example, for the first communication node, the Ethernet state manager can send multiple first target requests to the network card abstraction layer. Specifically, the Ethernet state manager can send the first target request corresponding to the first communication node to the network card abstraction layer according to the first preset period. The first preset period can be, for example, 400ms, 500ms, 600ms, etc., which is not limited here.
[0095] In this way, by determining that the first communication node is abnormal when no feedback information corresponding to the first target request is received within the first preset time period, it is possible to accurately determine whether the first communication node is abnormal.
[0096] Based on this, in order to improve the success rate of opening or closing the first communication node, in some embodiments, sending the first target request corresponding to the first communication node to the network card abstraction layer may specifically include:
[0097] Sending a first target request corresponding to the first communication node to the network card abstraction layer according to a first preset period;
[0098] Based on this, when no feedback information corresponding to the first target request is received within the first preset time period, determining that the first communication node is abnormal may specifically include:
[0099] In the case where no feedback information corresponding to the first target request is received, obtaining a first sending number of the first target request;
[0100] When the first number of transmissions reaches the first preset number of transmissions and no feedback information corresponding to the first target request is received, it is determined that the first communication node is abnormal.
[0101] Here, the first preset period may be, for example, 400ms, 500ms, 600ms, etc., and the first preset number of transmissions may be, for example, 5 times, 6 times, 7 times, etc., which are not limited here. In addition, the product of the first preset period and the first preset number of transmissions may not be greater than the first preset duration.
[0102] As an example, Figure 3 As shown, take the request to turn on the controller during the communication request process as an example. The Ethernet state manager can send a request to turn on the controller to the Ethernet abstraction layer at intervals of 500ms. If the first preset number of sending times is 5, then before the end of the 5 requests, if a notification of a successful request has been received, the next step of turning on the communication can be continued. If 5 requests to turn on the controller have been sent consecutively, and no information on successful controller startup has been received after the 5 requests have been completed, the Ethernet state manager can generate an exception message with a fault code of 0x01. In addition, if Figure 3 As shown, after the Ethernet status manager generates abnormal information with a fault code of 0x01, the abnormal information can be reported to the diagnostic event management module.
[0103] In this way, by sending the first target request corresponding to the first communication node to the network card abstraction layer multiple times in succession when no feedback information corresponding to the first target request is received, the success rate of opening or closing the first communication node can be improved.
[0104] Based on this, when the first communication node is a transceiver, in order to improve the comprehensiveness of locating the abnormal cause, in some embodiments, the above S210 may further specifically include:
[0105] In the case where feedback information corresponding to the first target request is received within the first preset time period, determining that there is no abnormality in the transceiver;
[0106] When the link status information corresponding to the communication link sent by the network card abstraction layer is not received within the second preset time period, it is determined that the communication link is abnormal.
[0107] Here, the second preset duration may be, for example, 5s, 10s, 15s, etc. In addition, the second preset duration may be the same as or different from the first preset duration, which is not limited here.
[0108] As an example, in the process of starting communication, after the controller and the transceiver are successfully turned on, the communication link can be automatically connected. Since the transceiver is turned on after the controller is turned on, after the transceiver is successfully turned on, the Ethernet state manager can wait to receive the link state information sent by the network card abstraction layer. If the Ethernet state manager receives link state information that the communication link is ACTIVE within the second preset time length, the next step of starting communication can be continued. If not received, it can be determined that the communication link is abnormal. Among them, the abnormal information can include fault codes 0x03 and 0x07.
[0109] As another example, in the process of shutting down communication, after both the controller and the transceiver are shut down successfully, the communication link can be automatically disconnected. Generally, the Ethernet state manager can receive link state information indicating that the communication link is DOWN within the second preset time period. After the Ethernet state manager receives the link state information indicating that the communication link is DOWN, the next step of shutting down communication can be performed.
[0110] In this way, by determining that the communication link is abnormal when the communication link is not successfully connected during the process of starting communication, the comprehensiveness of locating the cause of the abnormality can be improved.
[0111] Based on this, in order to further improve the comprehensiveness of locating the abnormal cause, in some embodiments, the above S210 may further specifically include:
[0112] When there is no abnormality in the transceiver and the link status information is received within the second preset time period, a second target request is sent to the protocol stack, where the second target request includes any one of a request to open the protocol stack and a request to close the protocol stack;
[0113] If no feedback information corresponding to the second target request is received within the third preset time period, it is determined that the protocol stack is abnormal.
[0114] Here, the second target request may include a request to open the protocol stack and a request to close the protocol stack. When the second target request is a request to open the protocol stack, the feedback information corresponding to the second target request may be a protocol stack ONLINE. When the second target request is a request to close the protocol stack, the feedback information corresponding to the second target request may be a protocol stack OFFLINE. In addition, the third preset duration may be, for example, 5s, 10s, 15s, etc. The third preset duration may be the same as or different from the first preset duration and / or the second preset duration, which is not limited here.
[0115] As an example, when receiving the communication link connection success signal from the network card abstraction layer, the Ethernet state manager may send a second target request to the protocol stack once, and then wait for feedback information corresponding to the second target request.
[0116] Based on this, in order to ensure that the protocol stack receives the second target request, as another example, the Ethernet state manager may send the first target request to the protocol stack multiple times. Specifically, the Ethernet state manager may send the second target request to the protocol stack according to a second preset period. The second preset period may be, for example, 400ms, 500ms, 600ms, etc., which is not limited here. In addition, the second preset period may be the same as or different from the first preset period.
[0117] As an example, if the feedback information corresponding to the second target request is not received within the third preset time, it can be considered that the protocol stack fails to be opened or closed, that is, the protocol stack can be determined to be abnormal. Specifically, the abnormal information corresponding to the protocol stack can include fault codes 0x04 and 0x08.
[0118] In this way, by determining that the protocol stack is abnormal when no feedback information corresponding to the second target request is received within the third preset time period, the comprehensiveness of locating the cause of the abnormality can be further improved.
[0119] Based on this, in order to improve the success rate of opening or closing the protocol stack, in some embodiments, sending the second target request to the protocol stack may specifically include:
[0120] Sending a second target request to the protocol stack according to a second preset period;
[0121] Based on this, when no feedback information corresponding to the second target request is received within the third preset time period, determining that the protocol stack is abnormal may specifically include:
[0122] In the case where no feedback information corresponding to the second target request is received, obtaining a second number of sending times of the second target request;
[0123] When the second sending number reaches the second preset sending number and no feedback information corresponding to the second target request is received, it is determined that the protocol stack is abnormal.
[0124] Here, the second preset period may be, for example, 400ms, 500ms, 600ms, etc., and the second preset number of transmissions may be, for example, 5 times, 6 times, 7 times, etc., which are not limited here. The second preset period may be the same as or different from the first preset period. The second preset number of transmissions may be the same as or different from the first preset number of transmissions. In addition, the product of the second preset period and the second preset number of transmissions may not be greater than the third preset duration.
[0125] For a specific implementation, reference may be made to the above description of the request to turn on the controller in the process of turning on the communication request as an example, which will not be described in detail here.
[0126] In this way, by sending the second target request to the protocol stack multiple times in succession when no feedback information corresponding to the second target request is received, the success rate of opening or closing the protocol stack can be improved.
[0127] Since even if a communication node has been successfully started, the communication node may still fail in the subsequent process of starting communication, in order to improve the accuracy of locating the cause of the abnormality, in some embodiments, after generating the abnormal information corresponding to the first target communication node and before sending the abnormal information to the diagnostic event management module, the following may also be included:
[0128] Acquire the state of a second target communication node, where the second target communication node is any one of the communication nodes that have been successfully started before the abnormal information is generated;
[0129] In a case where the state of the second target communication node indicates that the second target communication node is abnormal, abnormality information corresponding to the second target communication node is generated.
[0130] Here, if the abnormal information corresponding to the transceiver has been generated, the second target communication node may be a controller. If the fault information corresponding to the communication link has been generated, the second target communication node may be any one of the transceiver and the controller. If the fault information corresponding to the protocol stack has been generated, the second target communication node may be any one of the transceiver, the controller and the communication link.
[0131] As an example, if the abnormal information corresponding to the communication link has been generated, the Ethernet state manager can check the controller (network card) and the transceiver in turn to see if they are abnormal. If neither is abnormal, the Ethernet state manager can directly report the fault code 0x03 to the diagnostic event management module, that is, the link cannot be ACTIVE during the communication process. If the above-mentioned Ethernet peripherals (including controllers and transceivers) have an abnormality that causes the link information to be unable to be ACTIVE, the fault code reported by the Ethernet state manager may include 0x01 and / or 0x02. Among them, the order of checking whether the controller and transceiver are abnormal is not limited. In addition, checking whether the controller is abnormal can specifically be requesting the status information of the controller from the network card abstraction layer. If the status information is ACTIVE, the controller is normal. If the status information is DOWN, the controller is abnormal. Checking whether the transceiver is abnormal can specifically be requesting the status information of the transceiver from the network card abstraction layer. If the status information is ACTIVE, the transceiver is normal. If the status information is DOWN, the transceiver is abnormal.
[0132] As another example, Figure 4 As shown, if the abnormal information corresponding to the protocol stack has been generated, the Ethernet state manager can check the controller (network card), transceiver and communication link in turn to see if they are abnormal. If none of them are abnormal, the Ethernet state manager can directly report the fault code 0x04 (that is, the protocol stack is abnormal) to the diagnostic event management module, that is, the protocol stack cannot be ONLINE during the communication process. If the above-mentioned Ethernet peripherals (including controllers, transceivers and communication links) have an abnormality that causes the protocol stack to be unable to be ONLINE, the fault code reported by the Ethernet state manager may include 0x01 (that is, controller abnormality) and / or 0x02 (that is, transceiver abnormality) and / or 0x03 (that is, communication link abnormality). Among them, the order of checking whether the controller, transceiver and communication link are abnormal is not limited. In addition, checking whether the communication link is abnormal can specifically be to request the status information of the communication link from the network card abstraction layer. If the status information is ACTIVE, the communication link is normal. If the status information is DOWN, the communication link is abnormal. In addition, the order of reporting protocol stack abnormality, controller abnormality, transceiver abnormality and communication link abnormality is also not limited. That is, if multiple exception information is generated, each time the exception information is generated, the exception information can be sent to the diagnostic event management module. Alternatively, after all checks are completed, multiple exception information can be sent to the diagnostic event management module at the same time. If there is only exception information corresponding to the protocol stack, the exception information can be sent to the diagnostic event management module after the exception information is generated, or the exception information can be sent to the diagnostic event management module after all checks are completed.
[0133] In this way, by generating abnormality information corresponding to the target communication node when the state of the second target communication node indicates that the second target communication node is abnormal, the accuracy of locating the cause of the abnormality can be improved.
[0134] Based on the vehicle Ethernet abnormality cause location method provided in the above embodiment, the present application also provides a specific implementation of the vehicle Ethernet abnormality cause location device. Please refer to the following embodiment.
[0135] like Figure 5 As shown, the vehicle-mounted Ethernet abnormality cause locating device 500 provided in the embodiment of the present application includes the following modules:
[0136] The detection module 510 is used to detect whether the multiple communication nodes are abnormal in sequence according to the operation sequence of the multiple communication nodes corresponding to the target communication request when receiving the target communication request sent by the communication management module, and the target communication request includes any one of a communication opening request and a communication closing request;
[0137] An execution module 520 is used for, for each communication node, if the communication node is normal, returning to execute the operation sequence of the multiple communication nodes corresponding to the target communication request, and sequentially detecting whether the multiple communication nodes are abnormal, until the first target communication node is abnormal or the target communication request is completed, and the first target communication node is any one of the multiple communication nodes;
[0138] A first generating module 530 is used to generate abnormal information corresponding to the first target communication node when the first target communication node is abnormal;
[0139] The first sending module 540 is used to send abnormal information to the diagnosis event management module.
[0140] The above-mentioned vehicle-mounted Ethernet abnormality cause location device 500 is described in detail below, as shown below:
[0141] In some embodiments, the detection module 510 may specifically include:
[0142] A first sending submodule, configured to send a first target request corresponding to the first communication node to the network card abstraction layer, wherein the first target request includes any one of a request to open the first communication node and a request to close the first communication node;
[0143] The first determination submodule is used to determine that the first communication node is abnormal when no feedback information corresponding to the first target request is received within a first preset time period.
[0144] In some embodiments, the first sending submodule may specifically include:
[0145] A first sending unit, configured to send a first target request corresponding to the first communication node to the network card abstraction layer according to a first preset period;
[0146] Based on this, the first determination submodule may specifically include:
[0147] A first acquiring unit, configured to acquire a first sending number of the first target request when no feedback information corresponding to the first target request is received;
[0148] The first determining unit is configured to determine that the first communication node is abnormal when the first sending number reaches a first preset sending number and no feedback information corresponding to the first target request is received.
[0149] In some embodiments, the first communication node is a transceiver, and the detection module 510 may further include:
[0150] A second determination submodule is used to determine that there is no abnormality in the transceiver when feedback information corresponding to the first target request is received within a first preset time period;
[0151] The third determination submodule is used to determine that the communication link is abnormal when the link status information corresponding to the communication link sent by the network card abstraction layer is not received within a second preset time period.
[0152] In some embodiments, the detection module 510 may further include:
[0153] A second sending submodule is used to send a second target request to the protocol stack when there is no abnormality in the transceiver and the link status information is received within a second preset time period, wherein the second target request includes any one of a request to open the protocol stack and a request to close the protocol stack;
[0154] The fourth determining submodule is configured to determine that the protocol stack is abnormal if no feedback information corresponding to the second target request is received within a third preset time period.
[0155] In some embodiments, the second sending submodule may specifically include:
[0156] A second sending unit, configured to send a second target request to the protocol stack according to a second preset period;
[0157] Based on this, the fourth determination submodule may specifically include:
[0158] A second acquiring unit, configured to acquire a second sending number of the second target request when no feedback information corresponding to the second target request is received;
[0159] The second determining unit is configured to determine that the protocol stack is abnormal when the second sending number reaches a second preset sending number and no feedback information corresponding to the second target request is received.
[0160] In some embodiments, the vehicle Ethernet abnormality cause location device 500 may further include:
[0161] An acquisition module, used to acquire the state of a second target communication node after generating abnormal information corresponding to the first target communication node and before sending the abnormal information to the diagnostic event management module, the second target communication node being any one of the communication nodes that have been successfully opened before the abnormal information is generated;
[0162] The second generating module is used to generate abnormal information corresponding to the second target communication node when the state of the second target communication node indicates that the second target communication node is abnormal.
[0163] In some embodiments, the vehicle Ethernet abnormality cause location device 500 may further include:
[0164] The second sending module is used to send a communication interruption request to the communication management module after generating abnormal information corresponding to the first target communication node.
[0165] The vehicle Ethernet abnormality cause location device of the embodiment of the present application, in the process of executing the target communication request, that is, opening the communication request or closing the communication request, detects whether the multiple communication nodes are abnormal in turn according to the operation order of the multiple communication nodes corresponding to the target communication request, and can quickly determine the communication node that causes the failure to open the communication or close the communication when a certain communication node is abnormal. By continuing to execute the target communication request and detecting whether the multiple communication nodes are abnormal when there is no abnormality in the communication node, it can ensure that the target communication request is completed or the abnormal communication node is determined when the target communication request cannot be completed. By generating and sending the abnormal information corresponding to the first target communication node to the diagnostic event management module when the first target communication node is abnormal, it is possible to quickly locate the abnormal cause when the Ethernet communication cannot be opened / closed normally, thereby improving the abnormal processing speed and the Ethernet communication efficiency.
[0166] Based on the method for locating the cause of an abnormality in an in-vehicle Ethernet provided in the above embodiment, the embodiment of the present application also provides a specific implementation of the electronic device. Figure 6 A schematic diagram of an electronic device 600 provided in an embodiment of the present application is shown.
[0167] The electronic device 600 may include a processor 610 and a memory 620 storing computer program instructions.
[0168] Specifically, the processor 610 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.
[0169] The memory 620 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 620 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 620 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 620 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 620 is a non-volatile solid-state memory.
[0170] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) 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 the first aspect of the present application.
[0171] The processor 610 implements any one of the vehicle Ethernet abnormality cause locating methods in the above embodiments by reading and executing computer program instructions stored in the memory 620 .
[0172] In one example, the electronic device 600 may further include a communication interface 630 and a bus 640. Figure 6 As shown, the processor 610, the memory 620, and the communication interface 630 are connected via a bus 640 and communicate with each other.
[0173] The communication interface 630 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0174] Bus 640 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 640 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0175] Exemplarily, the electronic device 600 may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA).
[0176] The electronic device can execute the method for locating the cause of abnormality of the vehicle-mounted Ethernet in the embodiment of the present application, thereby realizing the combination Figures 2 to 5 A method and device for locating the cause of an abnormality in an in-vehicle Ethernet are described.
[0177] In addition, in combination with the vehicle Ethernet abnormality cause location method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any of the vehicle Ethernet abnormality cause location methods in the above embodiment is implemented.
[0178] In addition, the embodiment of the present application further provides a vehicle, which may include at least one of the following:
[0179] The device for locating the cause of abnormality of an in-vehicle Ethernet according to any one of the embodiments of the second aspect;
[0180] Such as the electronic device in any embodiment of the third aspect. No further description will be given here.
[0181] 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.
[0182] 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.
[0183] 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.
[0184] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the 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 realization of the function / action specified in one or more square boxes of the flow chart and / or the 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 square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0185] 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 locating the cause of abnormality in an in-vehicle Ethernet, characterized in that: include: Upon receiving a target communication request sent by the communication management module, sequentially detecting whether the multiple communication nodes are abnormal according to the operation order of the multiple communication nodes corresponding to the target communication request, wherein the target communication request includes any one of a communication opening request and a communication closing request; For each of the communication nodes, if there is no abnormality in the communication node, return to execute the operation sequence of the multiple communication nodes corresponding to the target communication request, and sequentially detect whether the multiple communication nodes are abnormal, until the first target communication node is abnormal or the target communication request is completed, and the first target communication node is any one of the multiple communication nodes; In the case where the first target communication node is abnormal, generating abnormal information corresponding to the first target communication node; The abnormal information is sent to a diagnostic event management module.
2. The method according to claim 1, characterized in that The step of sequentially detecting whether the plurality of communication nodes are abnormal according to the operation sequence of the plurality of communication nodes corresponding to the target communication request comprises: Sending a first target request corresponding to the first communication node to the network card abstraction layer, wherein the first target request includes any one of a request to open the first communication node and a request to close the first communication node; When no feedback information corresponding to the first target request is received within a first preset time period, it is determined that the first communication node is abnormal.
3. The method according to claim 2, characterized in that The sending a first target request corresponding to the first communication node to the network card abstraction layer includes: Sending the first target request corresponding to the first communication node to the network card abstraction layer according to a first preset period; In the case where no feedback information corresponding to the first target request is received within a first preset time period, determining that the first communication node is abnormal includes: In a case where no feedback information corresponding to the first target request is received, obtaining a first sending number of the first target request; When the first sending number reaches a first preset sending number and no feedback information corresponding to the first target request is received, it is determined that the first communication node is abnormal.
4. The method according to claim 2, characterized in that The first communication node is a transceiver, and the detecting whether the multiple communication nodes are abnormal in sequence according to the operation sequence of the multiple communication nodes corresponding to the target communication request further includes: In the case where feedback information corresponding to the first target request is received within the first preset time period, determining that there is no abnormality in the transceiver; When the link status information corresponding to the communication link sent by the network card abstraction layer is not received within the second preset time period, it is determined that the communication link is abnormal.
5. The method according to claim 4, characterized in that The step of sequentially detecting whether the plurality of communication nodes are abnormal according to the operation sequence of the plurality of communication nodes corresponding to the target communication request further comprises: If there is no abnormality in the transceiver and the link status information is received within the second preset time period, sending a second target request to the protocol stack, wherein the second target request includes any one of a request to start the protocol stack and a request to close the protocol stack; If no feedback information corresponding to the second target request is received within a third preset time period, it is determined that the protocol stack is abnormal.
6. The method according to claim 5, characterized in that The sending the second target request to the protocol stack includes: Sending the second target request to the protocol stack according to a second preset period; When no feedback information corresponding to the second target request is received within a third preset time period, determining that the protocol stack is abnormal includes: In a case where no feedback information corresponding to the second target request is received, obtaining a second number of times the second target request is sent; When the second sending number reaches a second preset sending number and feedback information corresponding to the second target request is not received, it is determined that the protocol stack is abnormal.
7. The method according to claim 1, characterized in that After generating the abnormal information corresponding to the first target communication node and before sending the abnormal information to the diagnostic event management module, the method further includes: Acquire a state of a second target communication node, where the second target communication node is any one of the communication nodes that have been successfully started before the abnormal information is generated; In a case where the state of the second target communication node indicates that the second target communication node is abnormal, abnormality information corresponding to the second target communication node is generated.
8. The method according to claim 1, characterized in that After generating the abnormal information corresponding to the first target communication node, the method further includes: A communication interruption request is sent to the communication management module.
9. A device for locating abnormal causes of vehicle-mounted Ethernet, characterized in that: The device comprises: a detection module, configured to detect whether the plurality of communication nodes are abnormal in sequence according to the operation sequence of the plurality of communication nodes corresponding to the target communication request when receiving the target communication request sent by the communication management module, wherein the target communication request includes any one of a communication opening request and a communication closing request; an execution module, for each of the communication nodes, when the communication node is normal, returning to execute the operation sequence of the multiple communication nodes corresponding to the target communication request, and sequentially detecting whether the multiple communication nodes are abnormal, until the first target communication node is abnormal or the target communication request is completed, the first target communication node being any one of the multiple communication nodes; A first generating module, configured to generate abnormal information corresponding to the first target communication node when the first target communication node is abnormal; The first sending module is used to send the abnormal information to the diagnosis event management module.
10. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for locating the cause of an abnormality in an in-vehicle Ethernet as described in any one of claims 1-8 is implemented.
11. A vehicle, characterized in that: Include at least one of the following: The device for locating the cause of abnormality in an in-vehicle Ethernet according to claim 9; The electronic device as claimed in claim 10.
