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

By creating a virtual domain controller on an Ethernet card and configuring it to share the same Ethernet channel as the real domain controller, the problem of low testing efficiency caused by manual cable changes during Ethernet interface switching was solved, and automated testing was achieved.

CN119363570BActive Publication Date: 2026-02-17CHINA FAW CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411351398.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2026-02-17
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

In existing technologies, the switching process of Ethernet interfaces requires manual cable rewiring, resulting in low testing efficiency and making it difficult to achieve automated testing.

Method used

By creating a virtual domain controller on an Ethernet card, configuring it to be in the same Ethernet channel as the real domain controller, and automatically switching the port status, the Ethernet interface can be automatically switched.

Benefits of technology

It reduces the complexity of manual configuration, improves testing efficiency, and enables rapid switching without line modification, achieving the effect of test automation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363570B_ABST
    Figure CN119363570B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses an Ethernet interface switching method, device, equipment, medium and product, and relates to the field of computer networks. The specific implementation scheme is as follows: an Ethernet board card has at least two ports, the ports are connected through a wire harness with a domain controller through an Ethernet interface, the two ports are in the same Ethernet channel, and the method comprises the following steps: 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; setting the port connected with the Ethernet interface of the target domain controller to a disabled state, and configuring running parameters for the virtual domain controller, so that the virtual domain controller and the domain controller not switched are located in the same Ethernet channel based on the running parameters. The embodiment of the application can quickly switch the virtual domain controller and the target domain controller, reduces the workload of rack rewiring, and improves the efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of computer networks, and particularly to an Ethernet interface switching method, device, equipment, medium and product. BACKGROUND

[0002] As a new type of communication protocol, the Ethernet bus has been increasingly applied in the process of automobile intelligentization due to its advantages in transmission rate and transmission bandwidth.

[0003] In bench testing and verification, there is a light demand for Ethernet simulation development. For the simulation of Ethernet, it is usually signal level, and the signal level simulation may not meet the verification demand of a functional system level, especially for the controller such as the instrument cluster in a vehicle. The controller involves human-computer interaction, and the system level verification needs to cover the test of human-computer interaction, for example, the sound prompt of the instrument, the text pop-up window, and the function switch light of the cluster. In the above case, the direct operation of the tester can meet the functional system test demand by connecting the real instrument cluster controller, but the main disadvantage of the above case is that it is difficult to realize automatic testing.

[0004] In order to achieve the effect of automatic testing, the instrument cluster can be simulated at the signal level, at this time, the real instrument cluster controller node needs to be disconnected and the simulated instrument cluster controller node needs to be connected. The main way of connecting the instrument cluster controller node is to manually disconnect the wiring of the instrument cluster controller and the opponent controller, and then reconnect the wiring of the opponent controller and the instrument cluster controller to the board card of the simulated node, that is, the wiring of the bench needs to be changed. This way not only increases the workload of node switching, but also reduces the test efficiency. SUMMARY

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

[0006] In a first aspect, embodiments of the present application provide an Ethernet interface switching method. An Ethernet board card has at least two ports, the ports are connected to a domain controller through an Ethernet interface, the two ports are in the same Ethernet channel, and the method comprises:

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

[0008] setting a port connected with an Ethernet interface of the target domain controller to a disabled state, and configuring a running parameter for the virtual domain controller, so as to make the virtual domain controller and the domain controller not switched in the same Ethernet channel based on the running parameter.

[0009] Further, the method further comprises:

[0010] configuring an Ethernet channel for the two ports, so that the domain controllers corresponding to the two ports acquire communication message data and analyze and process the communication message data to determine test result data in a communication process.

[0011] Further, the creating of the virtual domain controller corresponding to the target domain controller comprises:

[0012] sending a domain controller creation instruction to a target simulation model, so as to create a virtual domain controller corresponding to the target domain controller in the target simulation model;

[0013] wherein the virtual domain controller performs the same function as the target domain controller.

[0014] Further, the method further comprises:

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

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

[0017] Further, when the number of ports comprises at least three, the method further comprises:

[0018] determining a target number in the same Ethernet channel according to bandwidth information;

[0019] configuring corresponding connection data for the ports consistent with the target number, so as to make the domain controller and the corresponding ports connected through the Ethernet interface based on the connection data, wherein the connection data further comprises Ethernet channel data.

[0020] In a second aspect, an embodiment of the present application provides an Ethernet interface switching device, an Ethernet board card has at least two ports, the ports are connected with domain controllers through Ethernet interfaces, the two ports are in the same Ethernet channel, and the method comprises:

[0021] The virtual domain controller determining module is configured to determine a target domain controller to be switched and create a virtual domain controller corresponding to the target domain controller in response to a domain controller switching operation;

[0022] The parameter configuring module is configured to set a port connected by an Ethernet interface of the target domain controller to a disabled state and configure running parameters for the virtual domain controller, so that the virtual domain controller is located in the same Ethernet channel as a domain controller that is not switched based on the running parameters.

[0023] In a third aspect, an electronic device is provided, and the electronic device comprises:

[0024] at least one processor;

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

[0026] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the Ethernet interface switching method provided in any of the embodiments of the present application.

[0027] In a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, and the computer instructions are used to enable a computer to perform the Ethernet interface switching method provided in any of the embodiments of the present application.

[0028] In a fifth aspect, a computer program product is provided, and the computer program product comprises a computer program, and the computer program is used to enable a processor to perform the Ethernet interface switching method provided in any of the embodiments of the present application. The technical solution of the embodiments of the present application determines a target domain controller to be switched and creates a virtual domain controller corresponding to the target domain controller in response to a domain controller switching operation, thereby reducing the complexity of manual configuration and improving work efficiency. The port connected by the Ethernet interface of the target domain controller is set to a disabled state, and running parameters are configured for the virtual domain controller, so that the virtual domain controller is located in the same Ethernet channel as a domain controller that is not switched based on the running parameters. All lines are connected in advance, and the target domain controller and the virtual domain controller can be quickly switched without line modification during testing, the step of modifying the rack line is omitted, the effect of test automation is achieved, and the test efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to make the technical solution in the embodiments of the present application clearer, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings described below are only some of the embodiments of the present application, and all other drawings obtained by those skilled in the art without any creative effort should be within the protection scope of the present application.

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

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

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

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

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

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

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

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

[0038] Figure 9 is a block diagram of an Ethernet interface switching electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the technical solution in the embodiments of the present application clearer, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings described below are only some of the embodiments of the present application, and all other drawings obtained by those skilled in the art without any creative effort should be within the protection scope of the present application.

[0040] It is to be understood that the terminology "first", "second" and the like used in the specification and the claims of the application as well as the foregoing drawings is merely intended to distinguish between similar objects and not necessarily for describing a special sequential order. It is to be understood that the use of the singular herein includes the plural unless specifically stated otherwise. The use of the term "including", "comprising" and variations thereof as well as the terms "consisting of" and variations thereof are intended to cover the various steps of a process, method, system, product, or apparatus, including for example, those steps or elements not specifically listed or consisting of those steps or elements specifically listed. It is to be understood that such processes, methods, systems, products, or apparatuses can include more steps or elements than those specifically listed.

[0041] In order to introduce the scheme provided by the embodiment of the application, the application scenario can be exemplarily described. The scheme provided by the embodiment of the application can be applied to any scenario requiring Ethernet interface testing, that is, as long as the switching of the Ethernet port is involved, the scheme provided by the embodiment of the application can be used for processing.

[0042] Before performing the operation of the Ethernet port switching based on the scheme provided by the embodiment of the application, the Ethernet board card and the port on the Ethernet board card can be introduced.

[0043] As shown in Figure 1 The Ethernet board card has at least two ports, the ports are connected to the domain controller through the Ethernet interface, the Ethernet channel is configured for the two ports, and the two ports are in the same Ethernet channel, so that the domain controller corresponding to the two ports obtains the communication message data and analyzes and processes the communication message data in the communication process, and determines the test result data.

[0044] The port is located on the Ethernet board card, and the common port type can be an RJ45 port. The domain controller can be a server for managing a computer network. For example, in a car, the domain controller can be a cabin domain controller or an intelligent driving domain controller. The Ethernet interface can be a key component for communication between the domain controller and other domain controllers. For example, if the Ethernet interface fails, it can cause the signal interruption between the domain controller and the network. The wire harness connection can be a physical connection between the port and the domain controller using a cable harness. The wire harness connection can use twisted pair or optical fiber cable. The communication message can be the encapsulation form of data transmission in the network, and the communication message exists in the form of signals in the communication interaction process.

[0045] Specifically, the port of the Ethernet board card and the interface of the domain controller are connected through a twisted pair cable or an optical fiber cable, the ports of the Ethernet board card are located in the same Ethernet channel, and when the two domain controllers interact, the communication messages between the two domain controllers can be acquired, the communication message data can be analyzed and processed, and the test result data can be determined. Through the analysis and processing of the messages, it can be judged whether the communication interaction between the two domain controllers conforms to the actual situation.

[0046] For example, in the bench test of the intelligent driving function of a certain vehicle model, when the interactive function of the intelligent driving function is tested, the center screen of the cabin domain controller needs to be connected to directly verify the setting of the function in the center screen and the display of the function in the center screen. At this time, the real nodes of the intelligent driving domain controller corresponding to the intelligent driving function and the cabin domain controller corresponding to the cabin need to be connected. The ports of the Ethernet board card are connected to the interfaces corresponding to the cabin domain controller and the interfaces corresponding to the intelligent driving domain controller through a twisted pair cable, the communication messages in the communication interaction process of the cabin domain controller and the intelligent driving domain controller are acquired, and the messages are analyzed and processed to determine the test result between the cabin domain controller and the intelligent driving domain controller.

[0047] According to the method shown in Figure 1 After the wiring harness is connected according to the method, when testing, two real domain controllers need to be connected at the same time. When only the communication messages between the two domain controllers need to be monitored, the Ethernet port 1 and the Ethernet port 2 can be activated at the same time in the network configuration of the Ethernet board card, and the Ethernet channel containing the two ports is 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 analyzed after the arxml file is loaded.

[0048] Embodiment one

[0049] Figure 2 is a flowchart of an Ethernet interface switching method provided by the embodiment one of the present application. The embodiment is applicable to any scene where the Ethernet port needs to be switched. The method can be executed by an Ethernet interface switching device, which can be realized in the form of hardware / software, and can be integrated on an electronic device. Optionally, the electronic device can be a mobile terminal or a PC terminal. Figure 2 As shown in

[0050] S110, 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.

[0051] The user can trigger a corresponding program or a certain function control to issue a switching controller instruction, and the above operation can be taken as a switching operation. When detecting a domain controller switching operation, a domain controller switching instruction can be issued to make the server or the client respond to the domain controller switching operation. For example, in order to test the demand, one of the real domain controllers needs to be switched to a virtual domain controller, and the domain controller switching operation can be triggered to make the server or the client respond to the domain controller switching operation. The domain controller to be switched is taken as a target domain controller. The target domain controller can be a real domain controller or a virtual domain controller, and the specific type thereof can be set according to actual demand. If the target domain controller is a real domain controller, it can be converted into a virtual domain controller for simulation. The virtual domain controller has the same functions as the target domain controller, and 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 testing demand and needing to switch the domain controller, the domain controller to be switched is determined, and the virtual domain controller corresponding to the domain controller is connected for testing.

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

[0054] S120, set the port connected to the Ethernet interface of the target domain controller to a disabled state, and configure running parameters for the virtual domain controller, so that the virtual domain controller and the domain controller not switched are located in the same Ethernet channel based on the running parameters.

[0055] The disabled state can be a state in which the function is closed, for example, port disabled, at which time the function corresponding to the port is closed. Configuring running parameters can be setting various parameters of the virtual domain controller, for example, selecting a corresponding port for the virtual domain controller, so that the virtual domain controller and the port of the domain controller not switched are located in the same Ethernet board card, 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 domain controller not switched are located in the same Ethernet channel.

[0057] For example, as shown in FIG. 6, the port of the real 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 real domain controller to be switched, so that the virtual domain controller and the domain controller not switched are located in the same Ethernet channel. Figure 3As shown, the Ethernet port 1 connected with the Ethernet interface A of the cockpit domain controller in the Ethernet card is disabled, while the cockpit domain controller can be powered off, the cockpit domain controller simulation node is opened, the Ethernet port 2 connected with the Ethernet interface B of the intelligent driving domain controller in the Ethernet card is activated, and the Ethernet channel containing the Ethernet port 2 is configured as the hardware channel of the cockpit domain controller simulation node. In this way, the connection of 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 card, the two ports to be used are configured in the form of a switch, and the two ports for testing can be configured in one Ethernet channel, facilitating subsequent data monitoring and data simulation.

[0059] Referring to Figure 3 Continuing the exemplary description, when one of the real domain controllers needs to be switched to a simulation domain controller, for example, the real domain controller A node needs to be switched to a simulation domain controller A node, at this time, the Ethernet port 1 connected with the Ethernet interface A of the real domain controller A needs to be disabled in the network configuration of the Ethernet card, and a virtual simulation node domain controller A is added in the Ethernet simulation software, the hardware channel associated with this simulation node is the Ethernet channel containing the Ethernet port 2, and the Ethernet port 2 connected with the Ethernet interface B of the domain controller B remains activated. After running the node simulation, the real domain controller B and the domain controller A simulation node can realize communication interaction. This switching process does not require additional rack wiring work.

[0060] The technical scheme of the embodiment of the application determines the target domain controller to be switched in response to the domain controller switching operation, and creates a virtual domain controller corresponding to the target domain controller, thereby reducing the complexity of manual configuration and improving work efficiency; the port connected with the Ethernet interface of the target domain controller is set to a disabled state, and the virtual domain controller is configured with running parameters, so that the virtual domain controller and the domain controller not switched are located in the same Ethernet channel based on the running parameters, all lines are connected in advance, the target domain controller and the virtual domain controller can be quickly switched without rewiring during testing, the step of rack rewiring is omitted, the effect of test automation is achieved, and the test efficiency is improved.

[0061] Embodiment two

[0062] Figure 4 is a flowchart of an Ethernet interface switching method provided by the embodiment two of the application, and the switching process of the target domain controller and the virtual domain controller is further refined based on the above-mentioned embodiments. The specific implementation manner can be referred to the detailed description of the embodiment, and the same or corresponding technical terms as the above-mentioned embodiments are not described herein.

[0063] As Figure 4 shown, the Ethernet interface switching method disclosed in the embodiment can include:

[0064] S210, in response to the domain controller switching operation, 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.

[0065] Wherein, the target simulation model can be a model for generating a simulation domain controller. Specifically, when the 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 simulation domain controller. It should be noted that the function performed by the virtual domain controller is the same as the function performed by the target domain controller. That is, the virtual domain controller and the target controller are different in form, but the corresponding functions are the same.

[0066] S220, setting the port connected to the Ethernet interface of the target domain controller to a disabled state, and configuring the running parameters for the virtual domain controller, so that the virtual domain controller and the domain controller that has not been switched are in the same Ethernet channel based on the running parameters.

[0067] S230, 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.

[0068] Wherein, activation can be to make the function in an open state, for example, port activation, at which time the function corresponding to the port is open. The configuration data can be data that the port is in a working state and in the same Ethernet channel as the port corresponding to the domain controller that has not been switched, 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 domain controller that has not been switched.

[0069] Specifically, when the simulation test is completed, the target domain controller corresponding to the virtual domain controller needs to be reconnected to the domain controller that has not been switched. At this time, the port of the target domain controller is activated and the data of the port is updated.

[0070] For example, as Figure 5As shown, after the simulation test of the intelligent driving domain controller and the cockpit virtual domain controller is completed, the real nodes of the intelligent driving domain controller and the cockpit domain controller need to be reconnected. The Ethernet port 1 connected with the Ethernet interface A of the cockpit domain controller in the activated Ethernet card is activated, the Ethernet port 2 of the Ethernet card is kept activated, the Ethernet port 1 and the Ethernet port 2 are configured as Switch connection, and are configured in the same Ethernet channel. The Ethernet channel can be used as a hardware channel for communication monitoring, and the interaction signals between the cockpit domain controller and the intelligent driving domain controller are monitored. In this way, the intelligent driving domain controller can be switched to be connected with the real nodes of the cockpit domain controller without changing the bench harness connection.

[0071] Optionally, 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. The port is in a normal working state, and it and another port are in the same Ethernet channel.

[0072] For example, when it is required to switch the 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 in the simulation model is disabled. At this time, the communication interaction mode of the two real domain controller nodes can be quickly switched back.

[0073] S240, sending an instruction of stopping using the virtual domain controller to the target simulation model, so as to adjust the current state of the virtual domain controller to a disabled state by the target simulation model.

[0074] It can be understood that when the target source controller is switched back, an instruction of stopping using the virtual domain controller can be sent to the target simulation model. After receiving the instruction of stopping using the virtual domain controller, the target simulation model can adjust the current state of the virtual domain controller from a used state to a disabled state, so that the virtual domain controller no longer receives a new data processing request or transmits data.

[0075] On the basis of the above technical solution, the method further comprises: when the number of the ports comprises at least three, the method further comprises: determining a 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 to be connected with the corresponding ports through the Ethernet interface based on the connection data, wherein the connection data further comprises Ethernet channel data.

[0076] It can be understood that the scheme provided by the embodiment of the application can be extended to a mode of multiple domain controllers, at this time, only the number of ports of the Ethernet channel needs to be increased, that is, under the condition of meeting the bandwidth, if there are n domain controllers, the n Ethernet ports are connected and configured in the same Ethernet channel, and the switching of one or more real domain controllers and simulated domain controllers can be realized.

[0077] It should be further pointed out that the target number of the maximum configurable Ethernet ports can be determined according to the bandwidth information and the communication bandwidth corresponding to each Ethernet port. The connection data can be configured for the ports consistent with the target number, so that the domain controller and the corresponding port are connected by the Ethernet interface based on the connection data.

[0078] The technical scheme of the embodiment of the application determines the target domain controller to be switched in response to the domain controller switching operation, and creates a virtual domain controller corresponding to the target domain controller, which reduces the complexity of manual configuration and improves the work efficiency; the port connected to the Ethernet interface of the target domain controller is set to a disabled state, and the virtual domain controller is configured with operating parameters, so that the virtual domain controller and the domain controller not switched are located in the same Ethernet channel based on the operating parameters, all lines are connected in advance, the target domain controller and the virtual domain controller can be quickly switched without rewiring during the test process, the step of bench rewiring is omitted, the effect of test automation is achieved, and the test efficiency is improved.

[0079] Embodiment three

[0080] As an optional embodiment of the above embodiment, the technical scheme provided by the embodiment of the application is explained with a specific example, referring to Figure 1 The technical scheme provided by the embodiment of the application can simultaneously use two ports, port 1 and port 2, in the Ethernet board card, and the two ports are respectively connected to the Ethernet interfaces of two real domain controllers, that is, the Ethernet port 1 and the Ethernet interface A of the domain controller A are connected, and the Ethernet port 2 and the Ethernet interface B of the domain controller B are connected. In the port configuration of the Ethernet board card, the two ports used are configured in the form of Switch (switch), which is realized by an automatic script, and the two ports are configured in an Ethernet channel, which is convenient for subsequent data monitoring and data simulation.

[0081] Since the Switch connection of the port in the embodiment is realized by software configuration, in the case that software configuration cannot be realized, it can also be realized in the form of a real switch.

[0082] After the completion of the wiring harness connection, when testing requires simultaneous access to two real domain controllers, only the communication packets between the two domain controllers need to be monitored, the Ethernet port 1 and the Ethernet port 2 can be activated at the same time in the network configuration of the Ethernet card, and the Ethernet channel containing the two ports is associated with the Ethernet channel of the monitoring software, that is, the communication packets between the two domain controllers can be monitored, and after the arxml file is loaded, the communication packets can be parsed. The activation or disablement of the port is achieved by software configuration, and in the case where software configuration cannot be achieved, a relay can also be used to control the connection and disconnection of the port.

[0083] As shown in Figure 6 When one of the real controllers needs to be switched to an emulated controller, for example, the real domain controller A node needs to be switched to an emulated domain controller A node, at this time, 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 card, and a virtual emulated node domain controller A is added in the Ethernet emulation software. The hardware channel associated with this emulated node is an Ethernet channel containing two Ethernet channels, and the Ethernet port 2 connected to the Ethernet interface B of the domain controller B remains activated. After running the node emulation, the real domain controller B and the domain controller A emulation node can communicate and interact with each other. This switching process does not require additional rack wiring work.

[0084] As shown in Figure 7 When the domain controller A needs to be switched back to a real node, the disabled Ethernet port 1 needs to be activated again, and the emulated domain controller A node in the emulation model needs to be disabled. At this time, the communication and interaction mode of the two real domain controller nodes can be quickly switched back.

[0085] Similarly, the switching of the real and emulated nodes of the domain controller B node can also be performed in this way. This scheme can also be extended to a multi-domain controller mode. At this time, only the number of Ethernet channel ports needs to be increased, that is, under the condition that the bandwidth is sufficient, if there are n domain controllers, the n Ethernet ports are connected and configured to the same Ethernet channel, and the switching of one or more real domain controller nodes and emulated domain controller nodes can be realized.

[0086] The technical scheme of the embodiment connects ports through a switch, and realizes quick switching of real Ethernet nodes and simulated Ethernet nodes through port configuration, so that switching of real nodes and simulated nodes in an Ethernet network is realized conveniently and quickly in software configuration without increasing additional rewiring workload; the ports are connected through the switch, and signal monitoring of the real Ethernet nodes is realized through port configuration, so that monitoring of communication between two controllers can be realized whether real nodes or simulated nodes are accessed, without increasing additional rewiring workload. The connection mode can be extended to connection of any Ethernet nodes within the range allowed by Ethernet bandwidth, and convenient switching of real nodes and simulated nodes of any Ethernet node can be realized through port configuration. The technical scheme of the embodiment reduces rewiring workload of a test bench, speeds up switching of a test environment, and improves test efficiency, and meanwhile, switching of nodes can be realized through an automatic script, which is beneficial to implementation of automatic testing and improves test efficiency.

[0087] Embodiment four

[0088] Figure 8 is a structural schematic diagram of an Ethernet interface switching device provided by the embodiment four of the application, and the device can realize the Ethernet interface switching method of the embodiment of the application. The specific structure of the device is as follows:

[0089] The virtual domain controller determining and creating module 410 is configured to determine a target domain controller to be switched and create a virtual domain controller corresponding to the target domain controller in response to a domain controller switching operation; and the parameter configuration module 420 is configured to set a port connected to an Ethernet interface of the target domain controller to a disabled state, and configure running parameters for the virtual domain controller, so that the virtual domain controller is located in the same Ethernet channel as an unswitched domain controller based on the running parameters.

[0090] The technical scheme of the embodiment of the application determines a target domain controller to be switched and creates a virtual domain controller corresponding to the target domain controller in response to a domain controller switching operation, which reduces complexity of manual configuration and improves work efficiency; the port connected to the Ethernet interface of the target domain controller is set to a disabled state, and running parameters are configured for the virtual domain controller, so that the virtual domain controller is located in the same Ethernet channel as an unswitched domain controller based on the running parameters, all lines are connected in advance, the target domain controller and the virtual domain controller can be quickly switched without rewiring in a test process, the step of rewiring of a test bench is omitted, the effect of test automation is achieved, and test efficiency is improved.

[0091] On the basis of the above technical solutions, the device further comprises a parameter configuration module configured to configure Ethernet channels for the two ports, so that the domain controllers corresponding to the two ports acquire communication message data and analyze and process the communication message data to determine test result data during communication.

[0092] On the basis of the above technical solutions, the device further comprises an instruction sending module configured to 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, wherein the virtual domain controller performs the same function as the target domain controller.

[0093] On the basis of the above technical solutions, the device further comprises a data updating module configured to activate the port corresponding to the target domain controller and update 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 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.

[0094] On the basis of the above technical solutions, the device further comprises a quantity determining module configured to determine a target quantity located in the same Ethernet channel according to bandwidth information; and a data configuration module configured to configure corresponding connection data for the ports corresponding to the target quantity, so that the domain controller and the corresponding ports are connected through the Ethernet interface based on the connection data, wherein the connection data further includes Ethernet channel data.

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

[0096] Embodiment five

[0097] Figure 9is a block diagram of an Ethernet interface switching electronic device provided by an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent any of a variety of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.

[0098] As shown in Figure 9 The electronic device includes one or more processors 801, memory 802, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected using different busses, and can be mounted on a common motherboard or in other manners, as desired. The processor can process instructions for execution within the electronic device, including instructions stored in the memory or on storage devices to display graphical information for a graphical user interface (GUI) on an external input / output device, such as a display device coupled to the high-speed interface. In other implementations, multiple processors and / or multiple buses can be employed as desired to implement the described functionality, and a variety of other devices can be connected to the different busses. Also, various devices can be removed from the electronic device and replaced with other devices, as desired. Similarly, the electronic device can take the form of a server array, a group of blade servers, or a multi-processor system. Figure 9 The processor 801 is taken as an example in the embodiment of the present application.

[0099] The memory 802 is a non-transitory computer readable storage medium provided by the present application. The memory stores instructions executable by at least one processor, so that the at least one processor executes the Ethernet interface switching method provided by the embodiment of the present application. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to execute the Ethernet interface switching method provided by the embodiment of the present application.

[0100] The memory 802, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the Ethernet interface switching method in the embodiment of the present application, for example, the virtual domain controller determination and creation module 410 and the parameter configuration module 420 shown in Figure 8 The processor 801 executes various function applications and data processing of the server by running the non-transitory 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 can include a program storage area and a data storage area, where the program storage area can store an operating system, at least one application required by a function, and the data storage area can store data created according to the use of the electronic device for implementing the Ethernet interface switching method in the embodiments of the present application, etc. In addition, the memory 802 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory 802 can optionally include a memory disposed remotely with respect to the processor 801, and these remote memories can be connected to the electronic device for implementing the Ethernet interface switching method in the embodiments of the present application through 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 a combination thereof.

[0102] The electronic device for implementing the Ethernet interface switching method in the embodiments of the present application can 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 can be connected through a bus or other means, Figure 9 For example, by way of a bus connection.

[0103] The input device 803 can receive inputted digital or character information, and generate key signal inputs related to the user settings and function controls of the electronic device for implementing the Ethernet interface switching method in the embodiments of the present application, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 804 can include a display device, an auxiliary lighting device, and a tactile feedback device, etc., where the auxiliary lighting device is, for example, a light emitting diode (LED), and the tactile feedback device is, for example, a vibration motor, etc. The display device can include, but is not limited to, a liquid crystal display (LCD), an LED display, and a plasma display. In some embodiments, the display device can be a touch screen.

[0104] Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, specially designed application specific integrated circuits (ASICs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0105] These computer programs (also known as programs, software, software applications or code) include machine instructions for the programmable processor, and can be implemented in a high-level procedural and / or object-oriented programming language, and / or in assembly / machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus and / or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0106] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a Cathode Ray Tube (CRT) or Liquid Crystal Display (LCD) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0107] The systems and techniques described here can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here, or any combination of these, e.g., a backend component, an middleware component, or a front end component. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0108] The computer system can include clients and servers. This description uses the terms "client" and "server" to refer to the roles of these computational entities. A client is a computational entity that requests a service from another computational entity that is acting as a server.

[0109] It should be understood that various forms of flow shown above can be used, with steps reordered, added, or removed. For example, steps recited in the application can be performed in parallel, in series, or in a different order, without limitation, as long as the desired results of the technology disclosed in the application are achieved.

[0110] It should be understood that the above-mentioned are only the preferred embodiments of the present application and the principles of the technology applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. An Ethernet interface switching method, characterized by, The Ethernet board card has at least two ports, the ports are connected with the domain controllers through the Ethernet interface, the two ports are in the same Ethernet channel, and the method comprises: In response to a domain controller switching operation, a target domain controller to be switched is determined, and a virtual domain controller corresponding to the target domain controller is created; The port connected with the Ethernet interface of the target domain controller is set to a disabled state, and operating parameters of the virtual domain controller are configured, so that the virtual domain controller is located in the same Ethernet channel with the domain controller which is not switched based on the operating parameters; wherein the configuration of the operating parameters comprises selecting a corresponding port for the virtual domain controller; The method further comprises: The two ports are configured with an Ethernet channel, so that the domain controllers corresponding to the two ports obtain communication message data and analyze and process the communication message data in the communication process, and determine test result data.

2. The method of claim 1, wherein, The creation of the virtual domain controller corresponding to the target domain controller comprises: 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; Wherein, the function executed by the virtual domain controller is the same as the function executed by the target domain controller.

3. The method of claim 1, wherein, The method further comprises: When a request to switch back to the target domain controller is received, the port corresponding to the target domain controller is activated, and configuration data of the port is updated, wherein the configuration data at least includes data that the port is in a working state and is in the same Ethernet channel with another port; Sending 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.

4. The method of claim 1, wherein, When the number of ports includes at least three, the method further comprises: According to the bandwidth information, the target number of ports located in the same Ethernet channel is determined; The corresponding connection data is configured for the ports consistent with the target number, so that the domain controller is connected with the corresponding port through the Ethernet interface based on the connection data, wherein the connection data further includes Ethernet channel data.

5. An Ethernet interface switching device, characterized by The Ethernet board card has at least two ports, the ports are connected with the domain controllers through the Ethernet interface, the two ports are in the same Ethernet channel, and the method comprises: A virtual domain controller determination and creation module is configured to determine a target domain controller to be switched in response to a domain controller switching operation, and create a virtual domain controller corresponding to the target domain controller; An operating parameter configuration module is configured to set a port connected with an Ethernet interface of the target domain controller to a disabled state, and configure operating parameters of the virtual domain controller, so that the virtual domain controller is located in the same Ethernet channel with the domain controller which is not switched based on the operating parameters; wherein the configuration of the operating parameters comprises selecting a corresponding port for the virtual domain controller; The device further comprises: The configuration module is configured to configure an Ethernet channel for the two ports, so that the domain controllers corresponding to the two ports acquire communication message data and analyze and process the communication message data to determine test result data during communication.

6. An electronic device, comprising: The computer program product comprises: at least one processor; and a memory in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the Ethernet interface switching method of any one of claims 1-4.

7. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are configured to cause the computer to perform the Ethernet interface switching method of any one of claims 1-4.

8. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the Ethernet interface switching method of any one of claims 1-4.

Citation Information

Patent Citations

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

    CN111464417A

  • Simulation test system and method for automobile

    CN114675614A

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

    CN117579510A