Ethernet interface switching method, device, equipment, medium and product

By creating a virtual domain controller on the Ethernet card and configured its operating parameters, the Ethernet interface automation switching problem is solved, the test efficiency is improved, and the test automation is achieved.

CN119363570AActive Publication Date: 2025-01-24CHINA FAW CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411351398.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-24
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

In bench test verification, it is difficult for the prior art to realize automated switching of Ethernet interfaces, resulting in inefficient testing, especially when human-computer interaction testing is required.

Method used

By the existence of at least two ports on the Ethernet card, when switching operations in the domain controller, create a virtual domain controller corresponding to the target domain controller. The port of the target domain controller is set. The domain controller configures the running parameters so that it is located in the same Ethernet channel as the unavailable domain controller.

Benefits of technology

It realizes automatic switching of Ethernet interfaces, reduces the complexity of manual configuration, improves work efficiency, omits the step of bench modification, achieves the effect of test automation, and thereby improves test efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363570A_ABST
    Figure CN119363570A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an Ethernet interface switching method, device and equipment, a medium and a product, and relates to the field of computer networks. According to the specific implementation scheme, the Ethernet board card has at least two ports, the ports and the domain controllers are in wire harness connection through Ethernet interfaces, the two ports are located in the same Ethernet channel, and the method comprises the steps that in response to domain controller switching operation, a target domain controller to be switched is determined, and the target domain controller to be switched is sent to the Ethernet board card; creating a virtual domain controller corresponding to the target domain controller; and setting a port connected with the Ethernet interface of the target domain controller to be in a forbidden state, and configuring operation parameters for the virtual domain controller, so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operation parameters. According to the embodiment of the invention, the virtual domain controller and the target domain controller can be quickly switched, the rack rerouting workload is reduced, and meanwhile, the efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer networks, and in particular to an Ethernet interface switching method, device, equipment, medium and product. Background Art

[0002] As a new communication protocol, Ethernet bus is increasingly used in the process of automobile intelligence due to its advantages in transmission rate and transmission bandwidth.

[0003] In bench testing and verification, there is a very light demand for Ethernet simulation development. For Ethernet simulation, it is usually at the signal level, and signal-level simulation may not meet the verification requirements for a functional system level, especially for controllers such as the instrument center console installed in the vehicle. The above controller involves human-computer interaction, and system-level verification needs to cover human-computer interaction testing, such as the instrument's sound reminder, text pop-up window, and the function switch light of the center console. In the above situation, connecting to a real center console instrument controller and the tester's direct operation can meet the functional system testing requirements, but the disadvantage of the above situation is that it is difficult to achieve automated testing.

[0004] In order to achieve the effect of automated testing, the central control instrument can be simulated at the signal level. At this time, it is necessary to disconnect the real central control instrument controller node and connect to the simulated central control instrument controller node. The main method used to connect the instrument controller node is: manually disconnect the wiring between the central control instrument controller and the opponent controller, and then reconnect the wiring between the opponent controller and the central control instrument controller to the board card of the simulation node, that is, the test bench needs to be rewired. This method not only increases the workload of node switching, but also reduces the test efficiency. Summary of the invention

[0005] The embodiments of the present invention provide an Ethernet interface switching method, device, equipment, medium and product to realize automatic switching of Ethernet interfaces, thereby improving the effect of test efficiency.

[0006] In a first aspect, an embodiment of the present invention provides an Ethernet interface switching method, wherein an Ethernet board has at least two ports, the ports are connected to a domain controller via an Ethernet interface, and the two ports are in the same Ethernet channel, and the method includes:

[0007] In response to a domain controller switching operation, determining a target domain controller to be switched, and creating a virtual domain controller corresponding to the target domain controller;

[0008] The port to which the Ethernet interface of the target domain controller is connected is set to a disabled state, and operating parameters are configured for the virtual domain controller so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters.

[0009] Furthermore, the method further comprises:

[0010] An Ethernet channel is configured for the two ports so that the domain controllers corresponding to the two ports can obtain communication message data during the communication process and analyze and process the communication message data to determine the test result data.

[0011] Further, the creating a virtual domain controller corresponding to the target domain controller includes:

[0012] Sending a domain controller creation instruction to a target simulation model to create a virtual domain controller corresponding to the target domain controller in the target simulation model;

[0013] The function performed by the virtual domain controller is the same as the function performed by the target domain controller.

[0014] Furthermore, the method further comprises:

[0015] When receiving a request to switch back to the target domain controller, activating the port corresponding to the target domain controller and updating the configuration data of the port, wherein the configuration data at least includes data that the port is in a working state and is in the same Ethernet channel as another port;

[0016] An instruction to stop using the virtual domain controller is sent to the target simulation model, so that the target simulation model adjusts the current state of the virtual domain controller to a disabled state.

[0017] Furthermore, when the number of the ports includes at least three, the method further includes:

[0018] According to the bandwidth information, determine the number of targets located in the same Ethernet channel;

[0019] Corresponding connection data are configured for ports consistent with the target number, so that the domain controller and the corresponding ports are connected to each other through an Ethernet interface based on the connection data, wherein the connection data also includes Ethernet channel data.

[0020] In a second aspect, an embodiment of the present invention provides an Ethernet interface switching device, wherein an Ethernet board has at least two ports, the ports are connected to a domain controller via an Ethernet interface, and the two ports are in the same Ethernet channel. The method includes:

[0021] A virtual domain controller determination and creation module, configured to determine a target domain controller to be switched in response to a domain controller switching operation, and to create a virtual domain controller corresponding to the target domain controller;

[0022] A parameter configuration module is used to set the port connected to the Ethernet interface of the target domain controller to a disabled state, and configure operating parameters for the virtual domain controller so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters.

[0023] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0024] at least one processor;

[0025] and a memory in communication with the at least one processor;

[0026] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the Ethernet interface switching method provided by any embodiment of the present invention.

[0027] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable a computer to execute the Ethernet interface switching method provided by any embodiment of the present invention.

[0028] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, characterized in that the computer program is executed by a processor according to the Ethernet interface switching method provided by any embodiment of the present invention. The technical solution of the embodiment of the present invention reduces the complexity of manual configuration and improves work efficiency by responding to the domain controller switching operation, determining the target domain controller to be switched, and creating a virtual domain controller corresponding to the target domain controller; setting the port connected to the Ethernet interface of the target domain controller to a disabled state, and configuring operating parameters for the virtual domain controller, so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters, connecting all lines in advance, and quickly switching the target domain controller and the virtual domain controller without changing the line during the test process, omitting the step of changing the line of the test bench, achieving the effect of test automation, and thus improving the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0030] Figure 1 is a schematic diagram of an Ethernet board provided by an embodiment of the present invention;

[0031] Figure 2 is a flow chart of an Ethernet interface switching method provided by an embodiment of the present invention;

[0032] Figure 3 is a schematic diagram of an Ethernet board provided by an embodiment of the present invention;

[0033] Figure 4 is a flow chart of an Ethernet interface switching method provided by an embodiment of the present invention;

[0034] Figure 5 is a schematic diagram of an Ethernet board provided by an embodiment of the present invention;

[0035] Figure 6 is a schematic diagram of an Ethernet board provided by an embodiment of the present invention;

[0036] Figure 7 is a schematic diagram of an Ethernet board provided by an embodiment of the present invention;

[0037] Figure 8 It is a structural schematic diagram of an Ethernet interface switching device provided by an embodiment of the present invention;

[0038] Fig. 9 The present invention provides a block diagram of an Ethernet interface switching electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] When introducing the solution provided by the embodiment of the present invention, the application scenario can be illustrated first. The solution provided by the embodiment of the present invention can be applied to any scenario that requires testing of the Ethernet interface, that is, as long as the switching of the Ethernet port is involved, the solution provided by the embodiment of the present invention can be used to handle it.

[0042] Before performing the Ethernet port switching operation based on the solution provided in the embodiment of the present invention, the Ethernet board and the ports on the Ethernet board may be introduced first.

[0043] like Figure 1 As shown, the Ethernet board has at least two ports, and the ports are connected to the domain controller through an Ethernet interface. Ethernet channels are configured for the two ports, and the two ports are in the same Ethernet channel, so that the domain controllers corresponding to the two ports can obtain communication message data and analyze and process the communication message data during the communication process to determine the test result data.

[0044] Among them, the port is located on the Ethernet board, and a common port type may be an RJ45 port. The domain controller may be a server for managing a computer network. For example, in a car, the domain controller may be a cockpit domain controller or an intelligent driving domain controller. The Ethernet interface may be a key component for a domain controller to communicate with other domain controllers. For example, a failure in the Ethernet interface may cause the signal between the domain controller and the network to be interrupted. The wiring harness connection may be the use of a cable harness to achieve a physical connection between the port and the domain controller. The wiring harness connection may use twisted pair or fiber optic cable. The communication message may be the encapsulation form of data when it is transmitted in the network, and the communication message exists in the form of a signal during the communication interaction process.

[0045] Specifically, the port of the Ethernet board and the interface of the domain controller are connected through a twisted pair or optical fiber cable. The port of the Ethernet board is located in the same Ethernet channel. When the two domain controllers interact, the communication message between the two domain controllers can be obtained, the communication message data can be analyzed and processed, and the test result data can be determined. By analyzing and processing the message, it can be determined whether the communication interaction between the two domain controllers is in line with reality.

[0046] For example, in a test bench of the intelligent driving function of a certain vehicle model, when testing the interactive function of the intelligent driving function, it is necessary to connect the central control screen of the cockpit domain controller to directly verify the setting of the function in the central control screen and the display of the function on the central control screen. At this time, it is necessary to connect the real nodes of the intelligent driving domain controller corresponding to the intelligent driving function and the cockpit domain controller corresponding to the cockpit. Connect the port of the Ethernet board to the interface corresponding to the cockpit domain controller and the interface corresponding to the intelligent driving domain controller through a twisted pair cable, obtain the communication message in the communication interaction process between the cockpit domain controller and the intelligent driving domain controller, analyze and process the message to determine the test result between the cockpit domain controller and the intelligent driving domain controller.

[0047] According to Figure 1 After the harness connection is completed using the method shown, when two real domain controllers need to be connected at the same time during testing, and only the communication messages between the two domain controllers need to be monitored, Ethernet port 1 and Ethernet port 2 can be activated at the same time in the network configuration of the Ethernet board, and the Ethernet channel containing these two ports can be associated with the Ethernet channel of the monitoring software, so that the communication messages between the two domain controllers can be monitored, and the communication messages can be parsed after loading the arxml file.

[0048] Embodiment 1

[0049] Figure 2 This is a flow chart of an Ethernet interface switching method provided in the first embodiment of the present invention. This embodiment is applicable to any scenario where Ethernet ports need to be switched. The method can be executed by an Ethernet interface switching device, which can be implemented in hardware / software, and can be integrated in an electronic device. Optionally, the electronic device can be a mobile terminal or a PC. Figure 2 As shown, an Ethernet interface switching method disclosed in this embodiment may include:

[0050] S110. In response to the domain controller switching operation, determine a target domain controller to be switched, and create a virtual domain controller corresponding to the target domain controller.

[0051] Among them, the user can trigger the corresponding program or a certain functional control to issue an instruction to switch the controller, and the above operation can be used as a switching operation. When a domain controller switching operation is detected, a domain controller switching instruction can be issued to enable the server or client to respond to the domain controller switching operation. For example, in order to test the requirements, one of the real domain controllers needs to be switched to a virtual domain controller, and the domain controller switching operation can be triggered so that the server or client responds to the domain controller switching operation. The domain controller to be switched is used as the target domain controller. The target domain controller can be a real domain controller or a virtual domain controller, and its specific type can be set according to actual needs. If the target domain controller is a real domain controller, it can be converted into a virtual domain controller for simulation. The functions of the virtual domain controller are the same as those of the target domain controller. For testing, the virtual domain controller needs to be connected to the domain controller to be switched, and the communication messages between the two are analyzed.

[0052] Specifically, when the test requires switching of the domain controller, the domain controller to be switched is determined, and the corresponding virtual domain controller is connected to complete the test.

[0053] For example, in a test bench of the intelligent driving function of a certain vehicle model, the main function of the intelligent driving is in the intelligent driving domain controller, and the cockpit domain controller mainly implements the interaction with the intelligent driving function, such as function setting, function display, etc. When testing the main function, the signal of the interaction between the cockpit domain controller and the intelligent driving domain controller can be simulated to facilitate automated testing. At this time, the intelligent driving domain controller and the simulated cockpit domain controller need to be connected.

[0054] S120: Set the port to which the Ethernet interface of the target domain controller is connected to a disabled state, and configure operating parameters for the virtual domain controller so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters.

[0055] The disabled state may be to disable a function, for example, a port is disabled, and the function corresponding to the port is disabled. Configuring the operation parameters may be to set various parameters of the virtual domain controller, for example, to select a corresponding port for the virtual domain controller, so that the ports of the virtual domain controller and the unswitched domain controller are located on the same Ethernet board, that is, the two domain controllers are located in the same Ethernet channel.

[0056] Specifically, the port corresponding to the domain controller to be switched is set to a disabled state, and a corresponding port is selected for the virtual domain controller corresponding to the domain controller to be switched so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel.

[0057] For example, Figure 3As shown, the Ethernet port 1 in the Ethernet board connected to the Ethernet interface A of the cockpit domain controller is disabled, and the cockpit domain controller can be powered off at the same time, the cockpit domain controller simulation node is turned on, and the Ethernet port 2 in the Ethernet board connected to the Ethernet port B of the intelligent driving domain controller is activated, and the Ethernet channel containing Ethernet port 2 is configured as the hardware channel of the cockpit domain controller simulation node. In this way, the connection between the real domain controller and the cockpit domain controller simulation node can be realized.

[0058] It should be noted that in the port configuration of the Ethernet board, the two ports to be used are configured in the form of a switch, and the two ports to be tested can be configured in one Ethernet channel to facilitate subsequent data monitoring and data simulation.

[0059] See also Figure 3 Continuing with the example explanation, when it is necessary to switch one of the real domain controllers to a simulated domain controller, for example, it is necessary to switch the real domain controller A node to the simulated domain controller A node, then it is necessary to disable Ethernet port 1 connected to Ethernet interface A of the real domain controller A in the network configuration of the Ethernet board, and add a virtual simulation node domain controller A in the Ethernet simulation software. The hardware channel associated with this simulation node includes 2 Ethernet channels on the Ethernet end, and Ethernet port 2 connected to Ethernet interface B of domain controller B remains activated. After running the node simulation, the real domain controller B and the simulated node of domain controller A can communicate and interact, and this switching process does not require additional rack rewiring work.

[0060] The technical solution of the embodiment of the present invention reduces the complexity of manual configuration and improves work efficiency by responding to a domain controller switching operation, determining a target domain controller to be switched, and creating a virtual domain controller corresponding to the target domain controller; setting the port connected to the Ethernet interface of the target domain controller to a disabled state, and configuring operating parameters for the virtual domain controller, so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters, connecting all lines in advance, and quickly switching the target domain controller and the virtual domain controller without changing the line during the test process, omitting the step of changing the line of the test bench, achieving the effect of test automation, and thus improving test efficiency.

[0061] Embodiment 2

[0062] Figure 4 It is a flowchart of an Ethernet interface switching method provided in Example 2 of the present invention. Based on the above implementation, the switching process of the target domain controller and the virtual domain controller is further refined. The specific implementation method can be found in the detailed description of this embodiment, wherein the technical terms that are the same as or corresponding to the above embodiment are not repeated in this embodiment.

[0063] like Figure 4 As shown, an Ethernet interface switching method disclosed in this embodiment may include:

[0064] S210. In response to a domain controller switching operation, send a domain controller creation instruction to a target simulation model to create a virtual domain controller corresponding to the target domain controller in the target simulation model.

[0065] Among them, the target simulation model can be a pre-established model for generating a simulated domain controller. Specifically, when a domain controller switching operation is detected, a creation instruction for creating a virtual domain controller can be generated and sent to the target simulation model. When the target simulation model receives the domain controller creation instruction, a virtual domain controller corresponding to the target domain controller can be created in the target simulation model. The virtual domain controller mentioned above can be used as a simulated domain controller. It should be noted that the functions performed by the virtual domain controller are the same as those performed by the target domain controller. In other words, except for the different forms of existence, the other corresponding functions of the virtual domain controller and the target controller are the same.

[0066] S220: Set the port to which the Ethernet interface of the target domain controller is connected to a disabled state, and configure operating parameters for the virtual domain controller so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters.

[0067] S230: When receiving a request to switch back to the target domain controller, activate the port corresponding to the target domain controller and update the configuration data of the port.

[0068] Activation may be to enable a function, for example, a port is activated, and the function corresponding to the port is enabled. Configuration data may be data that the port is in a working state and is in the same Ethernet channel as the port corresponding to the unswitched domain controller, for example, activating the port corresponding to the target domain controller so that it is in the same Ethernet channel as the port corresponding to the unswitched domain controller.

[0069] Specifically, after the simulation test is completed, the target domain controller corresponding to the virtual domain controller needs to be reconnected to the unswitched domain controller. At this time, the port of the target domain controller is activated and the data of the port is updated.

[0070] For example, Figure 5As shown, after the simulation test of the intelligent driving domain controller and the cockpit virtual domain controller is completed, it is necessary to reconnect the real nodes of the intelligent driving domain controller and the cockpit domain controller. Activate Ethernet port 1 in the Ethernet board that is connected to Ethernet interface A of the cockpit domain controller, keep Ethernet port 2 of the Ethernet board activated, and configure Ethernet port 1 and Ethernet port 2 as Switch connections. Configure them in the same Ethernet channel. This Ethernet channel can be used as a hardware channel for communication monitoring to monitor the interaction signals between the cockpit domain controller and the intelligent driving domain controller. In this way, the intelligent driving domain controller can be switched to connect to the real node of the cockpit domain controller without changing the test bench wiring harness connection.

[0071] Optionally, the configuration data at least includes data indicating that the port is in a working state and is in the same Ethernet channel as another port. The port is in a normal working state, and it is in the same Ethernet channel as another port.

[0072] For example, when it is necessary to switch domain controller A back to the real node, the disabled Ethernet port 1 needs to be activated again, and the simulated domain controller A node needs to be disabled in the simulation model. At this time, it is possible to quickly switch back to the communication and interaction mode between the two real domain controller nodes.

[0073] S240: Send an instruction to stop using the virtual domain controller to the target simulation model, so that the target simulation model adjusts the current state of the virtual domain controller to a disabled state.

[0074] It can be understood that when switching back to the target source controller, an instruction to stop using the virtual domain controller can be sent to the target simulation model. After receiving the instruction to stop using the virtual domain controller, the target simulation model can adjust the current state of the virtual domain controller from the use state to the disabled state, so that the subsequent virtual domain controller no longer receives new data processing requests or transmits data.

[0075] Based on the above technical solution, the method also includes: when the number of the ports includes at least three, the method also includes: determining the target number located in the same Ethernet channel according to the bandwidth information; configuring corresponding connection data for the ports consistent with the target number, so as to enable the domain controller and the corresponding port to be connected by a wiring harness through the Ethernet interface based on the connection data, wherein the connection data also includes Ethernet channel data.

[0076] It can be understood that the solution provided by the embodiment of the present invention can be expanded into a mode of multiple domain controllers. In this case, it is only necessary to increase the number of ports of the Ethernet channel. That is, if there are n domain controllers, they are connected to n Ethernet ports accordingly, and the n Ethernet ports are configured in the same Ethernet channel. Accordingly, switching between one or more real domain controllers and simulated domain controllers can be achieved under the condition that the bandwidth is met.

[0077] It should also be noted that the target number of Ethernet ports that can be configured at most can be determined based on the bandwidth information and the communication bandwidth corresponding to each Ethernet port. Connection data can be configured for ports that are consistent with the target number, so that the domain controller and the corresponding port are connected by wire harness through the Ethernet interface based on the connection data.

[0078] The technical solution of the embodiment of the present invention reduces the complexity of manual configuration and improves work efficiency by responding to a domain controller switching operation, determining a target domain controller to be switched, and creating a virtual domain controller corresponding to the target domain controller; setting the port connected to the Ethernet interface of the target domain controller to a disabled state, and configuring operating parameters for the virtual domain controller, so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters, connecting all lines in advance, and quickly switching the target domain controller and the virtual domain controller without changing the line during the test process, omitting the step of changing the line of the test bench, achieving the effect of test automation, and thus improving test efficiency.

[0079] Embodiment 3

[0080] As an alternative embodiment to the above embodiment, the technical solution provided by the embodiment of the present invention is explained with a specific example. Figure 1 The technical solution provided by the embodiment of the present invention can use two ports in the Ethernet board at the same time, port 1 and port 2. The two ports are respectively connected to the Ethernet interfaces of two real domain controllers by wire harnesses, that is, Ethernet port 1 is connected to Ethernet interface A of domain controller A, and Ethernet port 2 is connected to Ethernet interface B of domain controller B. In the port configuration of the Ethernet board, the two used ports are configured in the form of a Switch, which is implemented by an automated script, and the two ports are configured in an Ethernet channel to facilitate subsequent data monitoring and data simulation.

[0081] Since the switch connection of the port in this embodiment is implemented through software configuration, when software configuration cannot be implemented, it can also be implemented in the form of a real switch.

[0082] After completing the harness connection, when two real domain controllers need to be connected at the same time during the test, and only the communication messages between the two domain controllers need to be monitored, Ethernet port 1 and Ethernet port 2 can be activated at the same time in the network configuration of the Ethernet board, and the Ethernet channel containing these two ports can be associated with the Ethernet channel of the monitoring software, that is, the communication messages between the two domain controllers can be monitored, and the communication messages can be parsed after loading the arxml file. The activation or deactivation of the port is realized through software configuration. If the software configuration cannot be realized, it can also be realized by controlling the connection and disconnection of the port through a relay.

[0083] like Figure 6 As shown in the figure, when one of the real controllers needs to be switched to a simulated controller, for example, the real domain controller A node needs to be switched to the simulated domain controller A node, then the Ethernet port 1 connected to the Ethernet interface A of the real domain controller A needs to be disabled in the network configuration of the Ethernet board, and a virtual simulation node domain controller A needs to be added in the Ethernet simulation software. The hardware channel associated with this simulation node is a two-port Ethernet channel including the Ethernet end, and the Ethernet port 2 connected to the Ethernet interface B of the domain controller B remains activated. At this time, after running the node simulation, the real domain controller B and the simulated node of the domain controller A can realize communication and interaction, and this switching process does not require additional bench rewiring work.

[0084] like Figure 7 As shown, when it is necessary to switch domain controller A back to the real node, the disabled Ethernet port 1 needs to be activated again, and the simulated domain controller A node needs to be disabled in the simulation model. At this time, it is possible to quickly switch back to the communication and interaction mode between the two real domain controller nodes.

[0085] Similarly, this method can also be used for switching between real and simulated nodes of domain controller node B. This solution can also be expanded to a mode with multiple domain controllers. In this case, it is only necessary to increase the number of ports of the Ethernet channel. That is, if there are n domain controllers, they are connected to n Ethernet ports accordingly, and the n Ethernet ports are configured in the same Ethernet channel. Accordingly, the switching between one or more real domain controller nodes and simulated domain controller nodes can be realized.

[0086] The technical solution of this embodiment connects the ports through Switch, and realizes the quick switching of real Ethernet nodes and simulated Ethernet nodes by means of port configuration, and realizes the switching of real nodes and simulated nodes in the Ethernet network in the software configuration conveniently and quickly, without adding additional re-line workload; connects the ports through Switch, and realizes the signal monitoring of real Ethernet nodes by means of port configuration, and can realize the monitoring of communication between two controllers whether it is connected to real nodes or simulated nodes, without adding additional re-line workload. This connection method can be expanded to the connection of many Ethernet nodes within the range allowed by the Ethernet bandwidth, and the convenient switching of real nodes and simulated nodes of any Ethernet node can be realized by means of port configuration. The technical solution of this embodiment reduces the re-line workload of the test bench, speeds up the switching speed of the test environment, and improves the test efficiency. At the same time, the switching of nodes can be realized by automated scripts, which is conducive to the implementation of automated testing and improves test efficiency.

[0087] Embodiment 4

[0088] Figure 8 1 is a schematic diagram of the structure of an Ethernet interface switching device provided in Embodiment 4 of the present invention, and the device can implement the Ethernet interface switching method of the embodiment of the present invention. The specific structure of the device is as follows:

[0089] The virtual domain controller determination and creation module 410 is used to determine the target domain controller to be switched in response to the domain controller switching operation, and to create a virtual domain controller corresponding to the target domain controller; the parameter configuration module 420 is used to set the port connected to the Ethernet interface of the target domain controller to a disabled state, and to configure operating parameters for the virtual domain controller so that the virtual domain controller and the non-switched domain controller are located in the same Ethernet channel based on the operating parameters.

[0090] The technical solution of the embodiment of the present invention reduces the complexity of manual configuration and improves work efficiency by responding to a domain controller switching operation, determining a target domain controller to be switched, and creating a virtual domain controller corresponding to the target domain controller; setting the port connected to the Ethernet interface of the target domain controller to a disabled state, and configuring operating parameters for the virtual domain controller, so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters, connecting all lines in advance, and quickly switching the target domain controller and the virtual domain controller without changing the line during the test process, omitting the step of changing the line of the test bench, achieving the effect of test automation, and thus improving test efficiency.

[0091] On the basis of the above technical solution, the device also includes: a parameter configuration module, which is used to configure Ethernet channels for the two ports so that the domain controllers corresponding to the two ports can obtain communication message data and analyze and process the communication message data during the communication process to determine the test result data.

[0092] Based on the above technical solutions, the device also includes: an instruction sending module, which is used to send a domain controller creation instruction to the target simulation model to create a virtual domain controller corresponding to the target domain controller in the target simulation model; wherein the function performed by the virtual domain controller is the same as the function performed by the target domain controller.

[0093] On the basis of the above-mentioned technical solutions, the device also includes: a data update module, which is used to activate the port corresponding to the target domain controller and update the configuration data of the port when receiving a request to switch back to the target domain controller, wherein the configuration data at least includes data that the port is in a working state and is in the same Ethernet channel as another port; and send an instruction to the target simulation model to stop using the virtual domain controller, so that the target simulation model adjusts the current state of the virtual domain controller to a disabled state.

[0094] On the basis of the above technical solutions, the device also includes: a quantity determination module, which is used to determine the target quantity located in the same Ethernet channel according to the bandwidth information; a data configuration module, which is used to configure corresponding connection data for ports consistent with the target quantity, so as to enable the domain controller and the corresponding port to be connected by a wiring harness through the Ethernet interface based on the connection data, wherein the connection data also includes Ethernet channel data.

[0095] The Ethernet interface switching device provided in the embodiment of the present invention can execute the Ethernet interface switching method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. The contents not described in detail in this embodiment can refer to the description in any method embodiment of the present invention.

[0096] Embodiment 5

[0097] Fig. 91 is a block diagram of an Ethernet interface switching electronic device provided in Embodiment 5 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can represent any vehicle-mounted device, and can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0098] like Fig. 9 As shown, the electronic device includes: one or more processors 801, a memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a graphical user interface (GUI) on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations, for example, as a server array, a group of blade servers, or a multi-processor system. Fig. 9 A processor 801 is taken as an example.

[0099] The memory 802 is a non-transient computer-readable storage medium provided by the present invention. The memory stores instructions executable by at least one processor to enable at least one processor to perform the Ethernet interface switching method provided by the embodiment of the present invention. The non-transient computer-readable storage medium of the present invention stores computer instructions, which are used to enable a computer to perform the Ethernet interface switching method provided by the embodiment of the present invention.

[0100] The memory 802 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the Ethernet interface switching method in the embodiment of the present invention, for example, Figure 8 The virtual domain controller determination and creation module 410 and parameter configuration module 420 are shown. The processor 801 executes various functional applications and data processing of the server by running non-transient software programs, instructions and modules stored in the memory 802, that is, implements the Ethernet interface switching method in the above method embodiment.

[0101] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of an electronic device for implementing the Ethernet interface switching method in the embodiment of the present invention, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the electronic device for implementing the Ethernet interface switching method in the embodiment of the present invention via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0102] The electronic device for implementing the Ethernet interface switching method in the embodiment of the present invention may further include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803 and the output device 804 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0103] The input device 803 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device used to implement the Ethernet interface switching method in the embodiment of the present invention, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 804 may include a display device, an auxiliary lighting device and a tactile feedback device, wherein the auxiliary lighting device is such as a light emitting diode (LED); the tactile feedback device is such as a vibration motor. The display device may include, but is not limited to, a liquid crystal display (LCD), an LED display and a plasma display. In some embodiments, the display device may be a touch screen.

[0104] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0105] These computer programs, also referred to as programs, software, software applications, or codes, include machine instructions for programmable processors, and may be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means for providing machine instructions and / or data to a programmable processor, such as a disk, an optical disk, a memory, a programmable logic device (PLD), including a machine-readable medium that receives machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0106] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to a user, such as a cathode ray tube (CRT) or an LCD monitor; and a keyboard and a pointing device, such as a mouse or a trackball, through which a user can provide input to the computer. Other types of devices can also be used to provide interaction with a user; for example, the feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic input, voice input, or tactile input.

[0107] The systems and techniques described herein may be implemented in a computing system that includes back-end components, e.g., as a data server, or in a computing system that includes middleware components, e.g., an application server, or in a computing system that includes front-end components, e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein, or in a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication, such as a communication network. Examples of communication networks include: a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.

[0108] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0109] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.

[0110] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. An Ethernet interface switching method, characterized in that: The Ethernet board has at least two ports, the ports are connected to the domain controller via an Ethernet interface, and the two ports are in the same Ethernet channel. The method includes: In response to a domain controller switching operation, determining a target domain controller to be switched, and creating a virtual domain controller corresponding to the target domain controller; The port to which the Ethernet interface of the target domain controller is connected is set to a disabled state, and operating parameters are configured for the virtual domain controller so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters.

2. The method according to claim 1, characterized in that: The method further comprises: An Ethernet channel is configured for the two ports so that the domain controllers corresponding to the two ports can obtain communication message data during the communication process and analyze and process the communication message data to determine the test result data.

3. The method according to claim 1, characterized in that The step of creating a virtual domain controller corresponding to the target domain controller includes: Sending a domain controller creation instruction to a target simulation model to create a virtual domain controller corresponding to the target domain controller in the target simulation model; The function performed by the virtual domain controller is the same as the function performed by the target domain controller.

4. The method according to claim 1, characterized in that: The method further comprises: When receiving a request to switch back to the target domain controller, activating the port corresponding to the target domain controller and updating the configuration data of the port, wherein the configuration data at least includes data that the port is in a working state and is in the same Ethernet channel as another port; An instruction to stop using the virtual domain controller is sent to the target simulation model, so that the target simulation model adjusts the current state of the virtual domain controller to a disabled state.

5. The method according to claim 1, characterized in that When the number of the ports includes at least three, the method further includes: Determine the target number of ports in the same Ethernet channel based on the bandwidth information; Corresponding connection data are configured for ports consistent with the target number, so that the domain controller and the corresponding ports are connected to each other through an Ethernet interface based on the connection data, wherein the connection data also includes Ethernet channel data.

6. An Ethernet interface switching device, characterized in that: The Ethernet board has at least two ports, the ports are connected to the domain controller via an Ethernet interface, and the two ports are in the same Ethernet channel. The device includes: A virtual domain controller determination and creation module, configured to determine a target domain controller to be switched in response to a domain controller switching operation, and to create a virtual domain controller corresponding to the target domain controller; A parameter configuration module is used to set the port connected to the Ethernet interface of the target domain controller to a disabled state, and configure operating parameters for the virtual domain controller so that the virtual domain controller and the unswitched domain controller are located in the same Ethernet channel based on the operating parameters.

7. The device according to claim 6, characterized in that The device also includes: The configuration module is used to configure Ethernet channels for the two ports so that the domain controllers corresponding to the two ports can obtain communication message data and analyze and process the communication message data during the communication process to determine the test result data.

8. An electronic device, characterized in that: include: at least one processor; and a memory in communication with the at least one process; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the Ethernet interface switching method according to any one of claims 1 to 5.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the Ethernet interface switching method according to any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the Ethernet interface switching method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • WLAN (Wireless Local Area Network) controller switching device and WLAN test and disaster recovery method, device and system

    CN103179595A

  • Vehicle-mounted network architecture based on gigabit Ethernet bus and communication method thereof

    CN111464417A

  • Simulation test system and method for automobile

    CN114675614A

  • Domain controller simulation test method and system

    CN115220749A

  • Unmanned aerial vehicle bus data monitoring method, device and equipment and storage medium

    CN117579510A