Static configuration table verification method and device, electronic equipment and storage medium
By checking the static configuration table on the Ethernet controller, the problem that static configuration table errors are difficult to detect early, and the effect of quickly judging and correcting static configuration table errors is achieved.
Patent Information
- Application Number
- CN202411752570.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-11
AI Technical Summary
When an error occurs in a static configuration table, the device will directly use the wrong address to communicate, and the error cannot be corrected through dynamic configuration requests, resulting in problems that are difficult to detect early in the static configuration table errors.
Provide a verification method for static configuration table. By obtaining the static configuration table of the test port on the Ethernet controller, modifying the local network configuration based on the configuration information, obtaining the target network configuration, and verifying the test port to generate verification results for the static configuration table.
Send verification packets to the test port through the target network configuration to quickly determine whether there is error message in the static configuration table, avoiding the situation where the vehicle discovers the static configuration table error when conducting business on Ethernet.
Smart Images

Figure CN119603181A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data communication, and in particular to a verification method, device, electronic equipment and storage medium for a static configuration table. Background Art
[0002] With the vigorous development of SOA (Service-Oriented Architecture), intelligent driving, smart cockpit, OTA (Over-The-Air) and other technologies in the automotive field, Ethernet has become one of the most widely used buses in the automotive field. And with the continuous transformation of electronic and electrical architecture from traditional bus type to distributed and centralized type, Ethernet may become the only transmission medium for vehicle communication. Unlike traditional Ethernet, the nodes in the car are generally set to static IP (Internet Protocol) addresses. In order to reduce the delay caused by mutual recognition between the communicating parties and the waste of bandwidth resources caused by undefined node address connections, the nodes in the car are not allowed to learn dynamically and use static configuration tables. During the communication process, only the addresses that meet the configuration of the static configuration table can communicate normally.
[0003] Due to the complexity of vehicle Ethernet services, different services may be deployed in different virtual LANs, each virtual LAN may carry different services or services, different services may be provided by different partners or suppliers, and these nodes may be distributed in different geographical locations or network environments. Since the static configuration table is a manually configured address mapping relationship, it will not be updated through dynamic configuration requests. If an error occurs in the static configuration table, the device will directly use the wrong address for communication instead of correcting the error through dynamic configuration requests.
[0004] Therefore, when an error occurs in the static configuration table, it is difficult to expose it in the early stage, and it will only appear after the relevant business is tested and verified. Summary of the invention
[0005] The embodiment of the present invention provides a static configuration table verification method, device, electronic device and storage medium to solve the problem that when an error occurs in the static configuration table, the device will directly use the wrong address for communication and cannot correct the error through a dynamic configuration request, which makes it difficult to discover the error in the static configuration table in the early stage.
[0006] An embodiment of the present invention discloses a static configuration table verification method, which is applied to an Ethernet controller of a vehicle, wherein the Ethernet controller includes a test port, and the method includes:
[0007] Acquire a static configuration table of the test port, wherein the static configuration table includes configuration information of the test port;
[0008] Modify the local network configuration according to the configuration information to obtain the target network configuration;
[0009] The test port is verified according to the target network configuration to generate a first verification result for the static configuration table.
[0010] Optionally, modifying the local network configuration according to the configuration information includes:
[0011] Get the original configuration information in the local network configuration;
[0012] The original configuration information is modified into the configuration information of the test port.
[0013] Optionally, the verifying the test port according to the target network configuration includes:
[0014] Sending a forward request message to the test port;
[0015] According to the response of the test port to the forward request message, determining whether the configuration information of the static configuration table contains erroneous configuration information;
[0016] When receiving a forward response message fed back by the test port in response to the forward request message, determining that the configuration information of the static configuration table does not contain the erroneous configuration information;
[0017] When the forward response message fed back by the test port in response to the forward request message is not received, it is determined that the configuration information of the static configuration table contains the erroneous configuration information.
[0018] Optionally, the method further comprises:
[0019] Recording first time information of sending the forward request message to the test port and second time information of receiving the forward response message;
[0020] Calculating a message response time of the test port according to a time difference between the first time information and the second time information;
[0021] The performance of the static configuration table is evaluated according to the message response time.
[0022] Optionally, when receiving the forward response message fed back by the test port in response to the forward request message, after determining that the configuration information of the static configuration table does not contain the erroneous configuration information, the method further includes:
[0023] Modify part of the configuration information in the static configuration table to generate an abnormal static configuration table, wherein the abnormal static configuration table includes abnormal configuration information and unmodified configuration information, and the abnormal configuration information is different from the configuration information of the test port;
[0024] Modifying the local network configuration according to the abnormal configuration information to obtain an abnormal network configuration;
[0025] The test port is verified according to the abnormal network configuration to generate a second verification result for the abnormal static configuration table.
[0026] Optionally, the verifying the test port according to the test network configuration includes:
[0027] Sending a reverse request message to the test port;
[0028] When receiving the reverse response message fed back by the test port in response to the reverse request message, the unmodified configuration information of the abnormal static configuration table is detected.
[0029] Optionally, the method further comprises:
[0030] The first verification result is recorded, and a verification report for the static configuration table is generated.
[0031] The embodiment of the present invention further discloses a static configuration table verification device, which is applied to an Ethernet controller of a vehicle, wherein the Ethernet controller includes a test port, and the device includes:
[0032] A first acquisition module, used to acquire a static configuration table of the test port, wherein the static configuration table includes configuration information of the test port;
[0033] A first modification module, used to modify the local network configuration according to the configuration information to obtain the target network configuration;
[0034] The first verification module is used to verify the test port according to the target network configuration and generate a first verification result for the static configuration table.
[0035] Optionally, the first modification module is specifically used to obtain original configuration information in the local network configuration; and modify the original configuration information into configuration information of the test port.
[0036] Optionally, the first verification module includes:
[0037] A forward verification module, used for sending a forward request message to the test port;
[0038] A first judgment module, used for judging whether there is erroneous configuration information in the configuration information of the static configuration table according to the response of the test port to the forward request message;
[0039] A first determining module is used to determine that the configuration information of the static configuration table does not contain the erroneous configuration information when receiving a forward response message fed back by the test port in response to the forward request message;
[0040] The second determining module is configured to determine that the configuration information of the static configuration table contains the erroneous configuration information when no forward response message fed back by the test port in response to the forward request message is received.
[0041] Optionally, the first verification module further includes:
[0042] A time recording module, used for recording first time information of sending the forward request message to the test port and second time information of receiving the forward response message;
[0043] A calculation module, used to calculate the message response time of the test port according to the time difference between the first time information and the second time information;
[0044] A performance evaluation module is used to evaluate the performance of the static configuration table according to the message response time.
[0045] Optionally, the first verification module further includes:
[0046] A first modification module, used for modifying part of the configuration information in the static configuration table to generate an abnormal static configuration table, wherein the abnormal static configuration table includes abnormal configuration information and unmodified configuration information, and the abnormal configuration information is different from the configuration information of the test port;
[0047] A second modification module, configured to modify the local network configuration according to the abnormal configuration information to obtain an abnormal network configuration;
[0048] The second verification module is used to verify the test port according to the abnormal network configuration and generate a second verification result for the abnormal static configuration table.
[0049] Optionally, the second verification module includes:
[0050] A reverse verification module, used for sending a reverse request message to the test port;
[0051] The first detection module is configured to detect the unmodified configuration information of the abnormal static configuration table when receiving a reverse response message fed back by the test port in response to the reverse request message.
[0052] Optionally, the device further comprises:
[0053] A report generation module is used to record the first verification result and generate a verification report for the static configuration table.
[0054] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0055] The memory is used to store computer programs;
[0056] The processor is used to implement the static configuration table verification method described in the embodiment of the present invention when executing the program stored in the memory.
[0057] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon. When the instructions are executed by one or more processors, the processors execute the static configuration table verification method as described in the embodiment of the present invention.
[0058] The present invention includes the following advantages:
[0059] The present invention obtains the static configuration table of the test port on the Ethernet controller, modifies the local network configuration according to the configuration information contained in the static configuration table, obtains the target network configuration, and finally verifies the test port according to the target network configuration to generate a first verification result for the static configuration table. The present invention sends a message for verification to the test port through the target network configuration, so as to quickly determine whether there is error information in the current static configuration table of the test port according to the response of the test port to the message, thereby avoiding the situation that the vehicle finds that error information appears in the static configuration table when conducting related business on the Ethernet, but the static configuration table cannot be updated through the dynamic configuration request. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a flowchart of the steps of a static configuration table verification method provided in an embodiment of the present invention;
[0061] Figure 2 It is a structural block diagram of a static configuration table verification device provided in an embodiment of the present invention;
[0062] Figure 3 It is a block diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0064] Different from the traditional Ethernet environment, in modern vehicle networks, especially Ethernet-based communication systems, static IP addresses are usually selected for communication. Each node (such as vehicle control unit, sensor, actuator, etc.) is pre-configured with a static IP address, which means that before the communication starts, the node already knows the other party's IP address, so there is no need to dynamically obtain the IP address through the dynamic host configuration protocol or other mechanisms. In order to reduce the delay caused by mutual identification between the communicating parties and the waste of bandwidth resources caused by undefined node address connections, the in-vehicle nodes do not allow ARP (Address Resolution Protocol) dynamic learning, and use ARP static configuration table.
[0065] However, when errors occur in the configuration information in the static configuration table, they are often only revealed when the relevant business is tested and verified. At this time, correcting the ARP static configuration table will inevitably affect the advancement of the business. Figure 1 , shows a flowchart of a method for verifying a static configuration table provided in an embodiment of the present invention, the method is applied to an Ethernet controller of a vehicle, the Ethernet controller includes a test port, and specifically may include the following steps:
[0066] In one embodiment of the present invention, it is first necessary to connect the control end and the prototype under test through an adapter cable. The control end can be a port of a PC (Personal Computer) that can control the prototype under test. The prototype under test can select an Ethernet controller (Ethernet Controller) or a switch, etc. The prototype under test includes a test port for verification.
[0067] Step 101, obtaining a static configuration table of a test port, the static configuration table including configuration information of the test port;
[0068] After connecting the control end and the tested sample, the ARP static configuration table configured at the test port is obtained. The ARP static configuration table configures the configuration information corresponding to the test port, such as IP information, MAC (Media Access Control) information and VLAN (Virtual Local Area Network) information.
[0069] Step 102, modifying the local network configuration according to the configuration information to obtain the target network configuration;
[0070] In the embodiment of the present invention, after obtaining the ARP static configuration table, it is necessary to traverse the configuration information in the ARP static configuration table, and modify the configuration information in the local network configuration to the configuration information in the ARP static configuration table to obtain the modified target network configuration.
[0071] Local network configuration refers to the network configuration of the control end.
[0072] Step 103: Verify the test port according to the target network configuration and generate a first verification result for the static configuration table.
[0073] In an embodiment of the present invention, a series of checks are performed on the test port using the modified target network configuration, such as ARP table entry check, network connectivity check, data packet capture and analysis, switch configuration check, security check, fault simulation and other types of check methods, but the present invention is not limited to this.
[0074] In the embodiment of the present invention, modifying the local network configuration according to the configuration information in step 102 includes:
[0075] Obtain original configuration information in the local network configuration; modify the original configuration information to the configuration information of the test port.
[0076] For example: Modify the IP address configured in the local network to make it consistent with the IP address of the test port. The IP address is used to identify the unique address of the device in the network, and is usually divided into two versions: IPv4 and IPv6. Modify the MAC address configured in the local network to make it consistent with the MAC address of the test port. The MAC address is used to identify the unique address of the network interface card, and is usually represented by a 48-bit binary number, which is divided into two parts: the manufacturer identification and the device identification. Modify the VLAN information configured in the local network to make it consistent with the VLAN information of the test port.
[0077] In the embodiment of the present invention, the local network configuration of the control end has original configuration information, and the original configuration information of the local network configuration needs to be modified into the configuration information of the test port.
[0078] In the embodiment of the present invention, step 103 verifies the test port according to the target network configuration, which means that the test port is firstly forward verified. The specific steps are as follows:
[0079] A forward request message is sent to the test port. In one embodiment, the forward request message may be a PING (Packet Internet Groper) message. The PING message is a general term for ICMP Echo Request messages and ICMP Echo Reply messages, and is used to test the connectivity between two devices in the network. The control end sends an ICMP Echo Request forward message to the test port, and determines whether an ICMP Echo Reply message returned by the test port can be received.
[0080] According to the response of the test port to the forward request message, determine whether there is incorrect configuration information in the configuration information of the static configuration table; when receiving the positive response message fed back by the test port to the forward request message, determine that there is no incorrect configuration information in the configuration information of the static configuration table; when not receiving the positive response message fed back by the test port to the forward request message, determine that there is incorrect configuration information in the configuration information of the static configuration table.
[0081] In the embodiment of the present invention, when performing a forward check, since the configuration information in the local network configuration is the configuration information of the test port at this time, sending a forward request message is equivalent to checking whether the configuration information in the ARP static configuration table has error information. If the response information (i.e., PONG message) returned by the test port can be received, it can be determined that the configuration information in the ARP static configuration table has no error information. On the contrary, if the response information (i.e., PONG message) returned by the test port is not received, it can be determined that the configuration information in the ARP static configuration table has error information.
[0082] In an embodiment of the present invention, the response message returned by the test port may include: a correct response, an error response and a timeout without response. For an error response and a timeout without response, the step of sending a PING message may be repeated. If the result does not change after sending the PING message multiple times, it can be determined that error information has appeared in the configuration information in the ARP static configuration table.
[0083] In the embodiment of the present invention, a series of checks are performed on the test port using the modified target network configuration, which may also include performance checks. The specific steps are as follows:
[0084] In the embodiment of the present invention, the PING message sent and the PONG message received during verification may carry a timestamp, and the timestamp is used to indicate the sending time of the PING message and the receiving time of the PONG message.
[0085] Recording the first time information of sending a positive request message (PING message) to the test port and the second time information of receiving a positive response message (PONG message);
[0086] Calculate the message response time of the test port according to the time difference between the first time information and the second time information;
[0087] Evaluate the performance of the static configuration table based on the message response time.
[0088] In an embodiment of the present invention, when receiving a positive response message fed back by the test port for a positive request message, after determining that the configuration information of the static configuration table does not contain the erroneous configuration information, it also includes performing a reverse check on the test port, and the specific steps are as follows:
[0089] Modify part of the configuration information in the static configuration table to generate an abnormal static configuration table. Since only part of the configuration information in the static configuration table is modified, the abnormal static configuration table contains unmodified configuration information and modified abnormal configuration information, wherein the unmodified configuration information is the same as the configuration information of the test port, and the abnormal configuration information is different from the configuration information of the test port.
[0090] The local network configuration is modified according to the abnormal configuration information to obtain the abnormal network configuration. During reverse verification, the original configuration information in the local network configuration of the control end is modified to the abnormal configuration information in the abnormal static configuration table to obtain the abnormal network configuration for reverse verification.
[0091] Perform reverse verification on the test port according to the abnormal network configuration to generate a second verification result for the abnormal static configuration table. The steps of reverse verification are as follows:
[0092] A reverse request message is sent to the test port. In one embodiment, the reverse request message may be a PING message. When a reverse response message fed back by the test port in response to the reverse request message is received, unmodified information of the abnormal static configuration table is detected.
[0093] In an embodiment of the present invention, when performing a reverse check, since a forward check has been performed before, during the forward check process, a forward response message returned by the test port can be received after a PING message is sent to the test port, indicating that the configuration information in the static configuration table at this time can ensure two-way communication with the test port. However, there is another abnormal situation, that is, the configuration information at this time is "mandatory" to request a forward response message from the test port, rather than receiving a forward response message under normal circumstances. In order to eliminate such abnormal situations in the static configuration table of the present invention, it is necessary to reversely verify the static configuration table. During the reverse verification, the present invention does not modify all the configuration information in the static configuration table, but modifies the configuration information in the static configuration table to check whether the unmodified configuration information is mandatory information. The mandatory information in the present invention refers to information that does not wait for the response message sent by the test port to be received, but "mandatory" requests a response message from the test port. For example, there are configuration information A, configuration information B, configuration information C, configuration information D and configuration information E in the static configuration table. First, only configuration information A, configuration information B and configuration information C are modified to configuration information a, configuration information b and configuration information c, while configuration information D and configuration information E are not modified. That is, the abnormal configuration information generated at this time includes configuration information a, configuration information b, configuration information c, configuration information D and configuration information E. Based on the abnormal configuration information at this time, the local network configuration is modified to obtain an abnormal network configuration, and a reverse request message is sent to the test port with the abnormal network configuration. Since the abnormal network configuration at this time contains the abnormal configuration information, it is impossible to communicate normally with the test port, and thus It is impossible to receive a reverse response message from the test port. Therefore, if the response information returned by the test port, that is, the PONG message, can be received, then it can be determined that at least one of the configuration information D and the configuration information E is mandatory information. In order to thoroughly find out which configuration information is mandatory information, the configuration information D or the configuration information E can be modified to test them separately, so as to determine the configuration information that is mandatory information, modify it to new configuration information, and re-perform forward and reverse checks on the new configuration information until the modified new configuration information can receive the forward response message returned by the test port during the forward check, and cannot receive the reverse response message returned by the test port during the reverse check.
[0094] In an embodiment of the present invention, if no PONG message is received during forward verification, it indicates that an abnormal situation exists; if a PONG message is received during reverse verification, it indicates that an abnormal situation exists. The verification results of the forward verification and the reverse verification can be recorded and a verification report for the static configuration table can be generated based on this.
[0095] The first verification result is recorded, and a verification report for the static configuration table is generated.
[0096] In an embodiment of the present invention, the first verification result can be obtained from the test port, and the first verification result can be stored in a local or remote database for subsequent analysis and report generation. Extract key information from the collected first verification result, such as the duration used for this verification, whether a PONG message is received, etc. The tester can also select or create a suitable report template, and the report template is used to display the first verification result. The final verification report can be in PDF, HTML, Excel and other formats. The present invention does not specifically limit the display method, and the generated verification report can also be stored in a specified location, such as a local file system or cloud storage, and the verification report can be sent to relevant personnel via email, message system or other communication methods. For the second verification result, the present invention can also generate its corresponding verification report, and the specific steps refer to the process of generating the verification report from the first verification result.
[0097] The present invention obtains the static configuration table of the test port on the Ethernet controller, modifies the local network configuration according to the configuration information contained in the static configuration table, obtains the target network configuration, and finally verifies the test port according to the target network configuration to generate a first verification result for the static configuration table. The present invention sends a message for verification to the test port through the target network configuration, so as to quickly determine whether there is error information in the current static configuration table of the test port according to the response of the test port to the message, thereby avoiding the situation that the vehicle finds that error information appears in the static configuration table when conducting related business on the Ethernet, but the static configuration table cannot be updated through the dynamic configuration request.
[0098] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0099] Reference Figure 2 , shows a structural block diagram of a static configuration table verification device provided in an embodiment of the present invention, the device is applied to an Ethernet controller of a vehicle, the Ethernet controller includes a test port, and specifically may include the following modules:
[0100] A first acquisition module 201 is used to acquire a static configuration table of a test port, where the static configuration table includes configuration information of the test port;
[0101] A first modification module 202, configured to modify the local network configuration according to the configuration information to obtain the target network configuration;
[0102] The first verification module 203 is used to verify the test port according to the target network configuration and generate a first verification result for the static configuration table.
[0103] Optionally, the first modifying module 202 is specifically configured to obtain original configuration information in the local network configuration; and modify the original configuration information into configuration information of the test port.
[0104] Optionally, the first verification module 203 includes:
[0105] A forward verification module, used for sending a forward request message to the test port;
[0106] A first judgment module is used to judge whether there is wrong configuration information in the configuration information of the static configuration table according to the response of the test port to the forward request message;
[0107] A first determination module is used to determine that there is no erroneous configuration information in the configuration information of the static configuration table when receiving a positive response message fed back by the test port in response to the positive request message;
[0108] The second determining module is used to determine that there is wrong configuration information in the configuration information of the static configuration table when no positive response message fed back by the test port in response to the positive request message is received.
[0109] Optionally, the first verification module 203 further includes:
[0110] A time recording module, used to record first time information of sending a forward request message to the test port and second time information of receiving a forward response message;
[0111] A calculation module, used to calculate the message response time of the test port according to the time difference between the first time information and the second time information;
[0112] The performance evaluation module is used to evaluate the performance of the static configuration table based on the message response time.
[0113] Optionally, the first verification module 203 further includes:
[0114] A first modification module is used to modify part of the configuration information in the static configuration table to generate an abnormal static configuration table, wherein the abnormal static configuration table includes abnormal configuration information and unmodified configuration information, and the abnormal configuration information is different from the configuration information of the test port;
[0115] A second modification module is used to modify the local network configuration according to the abnormal configuration information to obtain the abnormal network configuration;
[0116] The second verification module is used to verify the test port according to the abnormal network configuration and generate a second verification result for the abnormal static configuration table.
[0117] Optionally, the second verification module includes:
[0118] A reverse check module, used for sending a reverse request message to the test port;
[0119] The first detection module is used to detect the unmodified configuration information of the abnormal static configuration table when receiving a reverse response message fed back by the test port in response to the reverse request message.
[0120] Optionally, the device further comprises:
[0121] The report generation module is used to record the first verification result and generate a verification report for the static configuration table.
[0122] The present invention obtains the static configuration table of the test port on the Ethernet controller, modifies the local network configuration according to the configuration information contained in the static configuration table, obtains the target network configuration, and finally verifies the test port according to the target network configuration to generate a first verification result for the static configuration table. The present invention sends a message for verification to the test port through the target network configuration, so as to quickly determine whether there is error information in the current static configuration table of the test port according to the response of the test port to the message, thereby avoiding the situation that the vehicle finds that error information appears in the static configuration table when conducting related business on the Ethernet, but the static configuration table cannot be updated through the dynamic configuration request.
[0123] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0124] Figure 3 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0125] The electronic device includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302 and the memory 303 communicate with each other via the communication bus 304;
[0126] Memory 303, used for storing computer programs;
[0127] The processor 301 is used to execute the program stored in the memory 303 to implement the following steps:
[0128] Obtain a static configuration table of the test port, the static configuration table including configuration information of the test port;
[0129] Modify the local network configuration according to the configuration information to obtain the target network configuration;
[0130] The test port is verified according to the target network configuration to generate a first verification result for the static configuration table.
[0131] The bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0132] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0133] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0134] The present invention also provides a computer-readable storage medium having instructions stored thereon, and when the instructions are executed by one or more processors, the processors are enabled to execute the static configuration table verification method of the aforementioned embodiment.
[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0137] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0138] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0139] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0140] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0141] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0142] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0143] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0144] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for checking a static configuration table, characterized in that: An Ethernet controller applied to a vehicle, the Ethernet controller comprising a test port, the method comprising: Acquire a static configuration table of the test port, wherein the static configuration table includes configuration information of the test port; Modify the local network configuration according to the configuration information to obtain the target network configuration; The test port is verified according to the target network configuration to generate a first verification result for the static configuration table.
2. The method according to claim 1, characterized in that The modifying the local network configuration according to the configuration information includes: Get the original configuration information in the local network configuration; The original configuration information is modified into the configuration information of the test port.
3. The method according to claim 1, characterized in that The verifying the test port according to the target network configuration includes: Sending a forward request message to the test port; According to the response of the test port to the forward request message, determining whether the configuration information of the static configuration table contains erroneous configuration information; When receiving a forward response message fed back by the test port in response to the forward request message, determining that the configuration information of the static configuration table does not contain the erroneous configuration information; When the forward response message fed back by the test port in response to the forward request message is not received, it is determined that the configuration information of the static configuration table contains the erroneous configuration information.
4. The method according to claim 3, characterized in that The method further comprises: Recording first time information of sending the forward request message to the test port and second time information of receiving the forward response message; Calculating a message response time of the test port according to a time difference between the first time information and the second time information; The performance of the static configuration table is evaluated according to the message response time.
5. The method according to claim 3, characterized in that: After receiving the forward response message fed back by the test port in response to the forward request message and determining that the configuration information of the static configuration table does not contain the erroneous configuration information, the method further includes: Modify part of the configuration information in the static configuration table to generate an abnormal static configuration table, wherein the abnormal static configuration table includes abnormal configuration information and unmodified configuration information, and the abnormal configuration information is different from the configuration information of the test port; Modifying the local network configuration according to the abnormal configuration information to obtain an abnormal network configuration; The test port is verified according to the abnormal network configuration to generate a second verification result for the abnormal static configuration table.
6. The method according to claim 5, characterized in that The verifying the test port according to the abnormal network configuration includes: Sending a reverse request message to the test port; When receiving the reverse response message fed back by the test port in response to the reverse request message, the unmodified configuration information of the abnormal static configuration table is detected.
7. The method according to claim 1, characterized in that The method further comprises: The first verification result is recorded, and a verification report for the static configuration table is generated.
8. A static configuration table verification device, characterized in that: An Ethernet controller applied to a vehicle, the Ethernet controller comprising a test port, the device comprising: A first acquisition module, used to acquire a static configuration table of the test port, wherein the static configuration table includes configuration information of the test port; A first modification module, used to modify the local network configuration according to the configuration information to obtain the target network configuration; The first verification module is used to verify the test port according to the target network configuration and generate a first verification result for the static configuration table.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method described in any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to execute the method according to any one of claims 1 to 7.