Vehicle machine network management method, system and device and readable storage medium
By creating four virtual network cards on the side of the car and establishing a virtual Ethernet pair between the custom namespace and the default namespace, the problem of poor Internet access in the existing technology is solved, and network management without modifying the Google native framework is realized to meet the interface calls of three-party applications.
Patent Information
- Application Number
- CN202510462719.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-11
AI Technical Summary
The implementation method of virtually launching two network cards on the vehicle side requires modifying the Google native framework, resulting in poor user experience of Internet access and difficulty in meeting the calls of the native network-related interfaces by the three-party applications.
By creating four virtual network cards on the side of the car, they are used to receive and send WiFi and mobile data, and establish a virtual Ethernet pair between the custom namespace and the default namespace, data distinction and priority management are achieved, and Google's native framework is avoided.
It improves the user's Internet experience and meets the calls of native network-related interfaces by three-party applications, realizing network management without modifying Google's native framework.
Smart Images

Figure CN120302256A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of network management, and in particular, to a vehicle-mounted device network management method, system, device, and readable storage medium. Background Art
[0002] Most current vehicle-mounted device systems use an external TBox to access the Internet. The TBox can provide functions for accessing the Internet via WiFi and mobile networks (also known as cellular networks). On the vehicle-mounted device side, the WiFi and mobile network status control, information acquisition, and APP Internet access are usually achieved by connecting to the TBox through an Ethernet bus.
[0003] In current mainstream solutions, only one network card is virtualized on the vehicle-mounted device side. When receiving data from the TBox, it does not distinguish between WiFi data and mobile data. When sending data to the TBox, one of the WiFi data and mobile data is fixedly used. However, the Google framework usually configures two network cards for WiFi data and mobile data respectively, so that a better Internet access experience can be provided to users during network switching. Therefore, the current mainstream solutions may lead to a poor Internet access experience for users.
[0004] In order to improve the user's Internet access experience, some solutions virtualize two network cards on the vehicle-mounted device side, but most of the implementation methods involve modifying the Google native framework, which does not meet the requirements of GAS (Google Automotive Services). When the Android version changes or a new project is ported, a large amount of work is required for the modification and verification of the native system. At the same time, it is impossible to meet the calls of third-party applications for native network-related interfaces, and additional interfaces need to be added for adaptation. Summary of the Invention
[0005] This application provides a vehicle-mounted device network management method, system, device, and readable storage medium, which can solve the technical problem in the prior art that the implementation method of virtualizing two network cards on the vehicle-mounted device side requires modifying the Google native framework.
[0006] In a first aspect, an embodiment of this application provides a vehicle-mounted device network management method, and the vehicle-mounted device network management method includes:
[0007] Receiving first WiFi data from the TBox through a first virtual network card, sending the first WiFi data to a second virtual network card, and sending the first WiFi data to a vehicle-mounted device upper-layer application through the second virtual network card;
[0008] Receiving second WiFi data from the vehicle-mounted device upper-layer application through the second virtual network card, sending the second WiFi data to the first virtual network card, and sending the second WiFi data to the TBox through the first virtual network card;
[0009] Receive the first mobile data from the TBox through the third virtual network card, send the first mobile data to the fourth virtual network card, and send the first mobile data to the upper-layer application of the in-vehicle unit through the fourth virtual network card.
[0010] Receive the second mobile data from the upper-layer application of the in-vehicle unit through the fourth virtual network card, send the second mobile data to the third virtual network card, and send the second mobile data to the TBox through the third virtual network card.
[0011] Among them, the first virtual network card and the third virtual network card are set in a custom namespace, the second virtual network card and the fourth virtual network card are set in the default namespace of the Android system, the first virtual network card and the second virtual network card are connected through a virtual Ethernet pair, and the third virtual network card and the fourth virtual network card are connected through a virtual Ethernet pair.
[0012] Furthermore, in one embodiment, the in-vehicle unit network management method further includes:
[0013] Perform network connectivity verification on the second virtual network card and the fourth virtual network card to determine the priorities of the second virtual network card and the fourth virtual network card.
[0014] If the priority of the second virtual network card is higher than that of the fourth virtual network card, send the outgoing data from the upper-layer application of the in-vehicle unit as the second WiFi data to the second virtual network card.
[0015] If the priority of the fourth virtual network card is higher than that of the second virtual network card, send the outgoing data from the upper-layer application of the in-vehicle unit as the second mobile data to the fourth virtual network card.
[0016] Furthermore, in one embodiment, the in-vehicle unit network management method further includes:
[0017] Create a custom namespace, and create the first virtual network card and the third virtual network card in the custom namespace.
[0018] Create the second virtual network card and the fourth virtual network card in the default namespace.
[0019] Create a virtual Ethernet pair for connecting the first virtual network card and the second virtual network card.
[0020] Create a virtual Ethernet pair for connecting the third virtual network card and the fourth virtual network card.
[0021] Configure the network parameters of the first virtual network card and the third virtual network card.
[0022] Configure the network parameters of the second virtual network card.
[0023] Configure the network parameters of the fourth virtual network card.
[0024] Further, in one embodiment, a network configuration script is started during the startup process of the init process to implement the following operations:
[0025] Create a custom namespace, and create a first virtual network card and a third virtual network card in the custom namespace;
[0026] Create a second virtual network card and a fourth virtual network card in the default namespace;
[0027] Create a virtual Ethernet pair for connecting the first virtual network card and the second virtual network card;
[0028] Create a virtual Ethernet pair for connecting the third virtual network card and the fourth virtual network card;
[0029] Configure the network parameters of the first virtual network card and the third virtual network card.
[0030] Further, in one embodiment, the steps of configuring the network parameters of the fourth virtual network card include:
[0031] Configure the network parameters of the fourth virtual network card during the startup process of the system service in the java layer.
[0032] Further, in one embodiment, the steps of configuring the network parameters of the second virtual network card include:
[0033] Continuously receive private protocol data from the TBox;
[0034] Judge whether the TBox WiFi is in a connected state according to the private protocol data;
[0035] If the TBox WiFi is in a connected state, configure the network parameters of the second virtual network card.
[0036] Further, in one embodiment, after the step of judging whether the TBox WiFi is in a connected state according to the private protocol data, the following is further included:
[0037] If the TBox WiFi is not in a connected state, clear the network parameters of the second virtual network card.
[0038] In a second aspect, an embodiment of the present application further provides a vehicle-mounted network management system, and the vehicle-mounted network management system includes a first virtual network card, a second virtual network card, a third virtual network card, and a fourth virtual network card;
[0039] The first virtual network card and the third virtual network card are set in a custom namespace, the second virtual network card and the fourth virtual network card are set in the default namespace of the Android system, the first virtual network card and the second virtual network card are connected through a virtual Ethernet pair, and the third virtual network card and the fourth virtual network card are connected through a virtual Ethernet pair;
[0040] The first virtual network card is used to receive the first WiFi data from the TBox and send the first WiFi data to the second virtual network;
[0041] The second virtual network card is used to send the first WiFi data to the in-vehicle upper-layer application;
[0042] The second virtual network card is also used to receive the second WiFi data from the in-vehicle upper-layer application and send the second WiFi data to the first virtual network card;
[0043] The first virtual network card is also used to send the second WiFi data to the TBox;
[0044] The third virtual network card is used to receive the first mobile data from the TBox and send the first mobile data to the fourth virtual network card;
[0045] The fourth virtual network card is used to send the first mobile data to the in-vehicle upper-layer application;
[0046] The fourth virtual network card is also used to receive the second mobile data from the in-vehicle upper-layer application and send the second mobile data to the third virtual network card;
[0047] The third virtual network card is also used to send the second mobile data to the TBox.
[0048] In a third aspect, an embodiment of the present application further provides a vehicle-mounted network management device, where the vehicle-mounted network management device includes a processor, a memory, and a vehicle-mounted network management program stored on the memory and executable by the processor. When the vehicle-mounted network management program is executed by the processor, the steps of the above vehicle-mounted network management method are implemented.
[0049] In a fourth aspect, an embodiment of the present application further provides a readable storage medium, where a vehicle-mounted network management program is stored on the readable storage medium. When the vehicle-mounted network management program is executed by a processor, the steps of the above vehicle-mounted network management method are implemented.
[0050] In this application, data from the TBox is distinguished in a custom namespace. WiFi data flows to the first virtual network card, and mobile data flows to the third virtual network card. Outgoing data from the upper-layer applications of the in-vehicle unit selects the type in the default namespace. When it is WiFi data, it flows to the third virtual network card, and when it is mobile data, it flows to the fourth virtual network card. A communication channel is established between the custom namespace and the default namespace through the virtual Ethernet, enabling the WiFi data to be transmitted between the first virtual network card and the second virtual network card, and the mobile data to be transmitted between the third virtual network card and the fourth virtual network card. Thus, the second virtual network card is used as the WiFi network card of the in-vehicle unit, and the fourth virtual network card is used as the mobile network card of the in-vehicle unit. Through this application, two network cards can be virtualized on the in-vehicle unit side without modifying the Google native framework, improving the user's Internet experience while meeting the calls of third-party applications for native network-related interfaces. Description of the Drawings
[0051] Figure 1 It is a schematic flowchart of the in-vehicle unit network management method in an embodiment of this application;
[0052] Figure 2 It is a system architecture diagram of the in-vehicle unit network management method in an embodiment of this application;
[0053] Figure 3 It is a schematic flowchart of creating and configuring virtual network cards on the in-vehicle unit side in an embodiment of this application;
[0054] Figure 4 It is a schematic hardware structure diagram of the in-vehicle unit network management device involved in the solution of the embodiment of this application. Detailed Embodiment
[0055] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0056] To make the purpose, technical solution, and advantages of this application clearer, the embodiments of this application will be further described in detail below in conjunction with the drawings.
[0057] First, an embodiment of this application provides an in-vehicle unit network management method.
[0058] Figure 1 It shows a schematic flowchart of the in-vehicle unit network management method in an embodiment of this application.
[0059] Refer toFigure 1 In one embodiment, the in-vehicle network management method includes the following steps:
[0060] S1. Receive first WiFi data from the TBox through a first virtual network card, send the first WiFi data to a second virtual network card, and send the first WiFi data to the upper-layer application of the in-vehicle device through the second virtual network card;
[0061] S2. Receive second WiFi data from the upper-layer application of the in-vehicle device through the second virtual network card, send the second WiFi data to the first virtual network card, and send the second WiFi data to the TBox through the first virtual network card;
[0062] S3. Receive first mobile data from the TBox through a third virtual network card, send the first mobile data to a fourth virtual network card, and send the first mobile data to the upper-layer application of the in-vehicle device through the fourth virtual network card;
[0063] S4. Receive second mobile data from the upper-layer application of the in-vehicle device through the fourth virtual network card, send the second mobile data to the third virtual network card, and send the second mobile data to the TBox through the third virtual network card;
[0064] Among them, the first virtual network card and the third virtual network card are set in a custom namespace, the second virtual network card and the fourth virtual network card are set in the default namespace of the Android system, the first virtual network card and the second virtual network card are connected through a virtual Ethernet pair, and the third virtual network card and the fourth virtual network card are connected through a virtual Ethernet pair.
[0065] In network virtualization, a network namespace is used to create an isolated network environment. Each network namespace has its own independent network stack, including network interfaces, routing tables, ARP tables, iptables rules, etc. This enables multiple isolated network instances to run on the same physical host. For example, in container technology, each container can have its own network namespace to achieve network-level isolation. A veth pair can establish a communication channel between different namespaces, enabling network applications in different namespaces to communicate with each other.
[0066] In this embodiment, data from the TBox is distinguished in a custom namespace. The WiFi data flows to the first virtual network card, and the mobile data flows to the third virtual network card. Data from the upper-layer applications of the in-vehicle unit is used to select the type in the default namespace. When it is used as WiFi data, it flows to the third virtual network card, and when it is used as mobile data, it flows to the fourth virtual network card. A communication channel is established between the custom namespace and the default namespace through the virtual Ethernet, so that the WiFi data can be transmitted between the first virtual network card and the second virtual network card, and the mobile data can be transmitted between the third virtual network card and the fourth virtual network card. Thus, the second virtual network card is used as the WiFi network card of the in-vehicle unit, and the fourth virtual network card is used as the mobile network card of the in-vehicle unit. Through this embodiment, without modifying the Google native framework, two network cards can be virtualized on the in-vehicle unit side, which can improve the user's Internet experience while meeting the calls of third-party applications for native network-related interfaces.
[0067] It can be understood that step S1 represents the process of transmitting the WiFi data from the TBox to the upper-layer applications of the in-vehicle unit, step S2 represents the process of transmitting the outgoing data from the upper-layer applications of the in-vehicle unit as WiFi data to the TBox, step S3 represents the process of transmitting the mobile data from the TBox to the upper-layer applications of the in-vehicle unit, and step S4 represents the process of transmitting the outgoing data from the upper-layer applications of the in-vehicle unit as mobile data to the TBox. These four processes are relatively independent and do not have a specific execution order.
[0068] Figure 2 The system architecture diagram of the in-vehicle unit network management method in an embodiment of the present application is shown.
[0069] Refer to Figure 2 , in the Android OS of the in-vehicle unit, maps, music, and multimedia belong to the upper-layer applications of the in-vehicle unit, ConnectivityService, EthernetService, NetworkStack, and netd belong to the Google native framework, and TBoxWiFiService and AndroidRuntimeResourceOverlay belong to the newly added functional modules of the present application, and their functions will be described later. The mobile network card and the WiFi network card in the TBox are both physical network cards, and the network cards in the in-vehicle unit are all virtual network cards. The TBox and the in-vehicle unit are connected through an Ethernet bus.
[0070] In the Google native framework, ConnectivityService interacts with upper-layer applications of the in-vehicle device, the second virtual network card, and the fourth virtual network card to uniformly manage all networks, including network connection, network disconnection, network switching, network connectivity verification, and so on. The upper-layer applications of the in-vehicle device can call the interfaces provided by ConnectivityService to obtain the network type, determine network connectivity, and so on.
[0071] Further, in one embodiment, the in-vehicle network management method further includes:
[0072] Performing network connectivity verification on the second virtual network card and the fourth virtual network card to determine the priorities of the second virtual network card and the fourth virtual network card;
[0073] If the priority of the second virtual network card is higher than that of the fourth virtual network card, the outbound data from the upper-layer application of the in-vehicle device is sent to the second virtual network card as the second WiFi data;
[0074] If the priority of the fourth virtual network card is higher than that of the second virtual network card, the outbound data from the upper-layer application of the in-vehicle device is sent to the fourth virtual network card as the second mobile data.
[0075] In this embodiment, the upper-layer application of the in-vehicle device only needs to prepare the content of the outbound data and call the data outbound interface, without caring about the form in which the outbound data is sent to the TBox. After the data outbound interface is called, the outbound data is sent to the virtual network card with the higher priority among the second virtual network card and the fourth virtual network card.
[0076] Specifically Figure 2 in the shown embodiment, the above operations are performed by ConnectivityService.
[0077] For example, in network connectivity verification, first determine whether the link where the network card is located is available. The priority of an available link is higher than that of an unavailable link. In the case where all links are available, determine the communication quality of the network card. The network card with higher communication quality has a higher priority.
[0078] Further, in one embodiment, the in-vehicle network management method further includes:
[0079] Create a custom namespace and create a first virtual network card and a third virtual network card in the custom namespace;
[0080] Create a second virtual network card and a fourth virtual network card in the default namespace;
[0081] Create a virtual Ethernet pair for connecting the first virtual network card and the second virtual network card;
[0082] Create a virtual Ethernet pair for connecting the third virtual network card and the fourth virtual network card;
[0083] Configure the network parameters of the first virtual network card and the third virtual network card;
[0084] Configure the network parameters of the second virtual network card;
[0085] Configure the network parameters of the fourth virtual network card.
[0086] It can be understood that the above steps are executed on the basis of the Google native framework to configure the network environment required for steps S1 to S4.
[0087] Exemplarily, the network parameters include IP, gateway, DNS, broadcast, routing information, ip_forward, nat, etc.
[0088] Figure 3 The flowchart shows the process of creating and configuring virtual network cards on the in-vehicle device side in an embodiment of the present application.
[0089] Refer to Figure 3 , in an embodiment, during the startup process of the init process, a network configuration script is started to implement the following operations:
[0090] Create a custom namespace, and create the first virtual network card and the third virtual network card in the custom namespace;
[0091] Create the second virtual network card and the fourth virtual network card in the default namespace;
[0092] Create a virtual Ethernet pair for connecting the first virtual network card and the second virtual network card;
[0093] Create a virtual Ethernet pair for connecting the third virtual network card and the fourth virtual network card;
[0094] Configure the network parameters of the first virtual network card and the third virtual network card.
[0095] In this embodiment, the creation operation of the custom namespace, the creation operations of each virtual network card, the creation operation of the virtual Ethernet pair, and the network parameter configuration operation of the first virtual network card and the third virtual network card are relatively simple and basic. Writing them into a network configuration script and starting the network configuration script during the startup process of the init process to implement the above operations can thus shorten the time required to configure the network environment.
[0096] Further, in an embodiment, the step of configuring the network parameters of the fourth virtual network card includes:
[0097] During the startup process of the system service in the java layer, configure the network parameters of the fourth virtual network card.
[0098] In this embodiment, the mobile network is in a connected state for a long time by default, and the network parameter configuration of the fourth virtual network card is completed during the startup of the Java layer system service, so that the network environment can be prepared in advance to ensure the normal operation of the system service.
[0099] Specific to Figure 2 , Figure 3 In the illustrated embodiment, EthernetService reads the mobile network configuration by parsing the XML configuration file in AndroidRuntimeResourceOverlay, and calls networkstack and netd to implement the configuration of the fourth virtual network card.
[0100] Furthermore, in one embodiment, the step of configuring the network parameters of the second virtual network card includes:
[0101] Continue to receive private protocol data from TBox;
[0102] Determine whether TBox WiFi is connected based on private protocol data;
[0103] If TBox WiFi is in connected state, configure the network parameters of the second virtual network card.
[0104] In this embodiment, TBox WiFi may be in a connected state or an unconnected state according to user selection. TBox obtains the status of TBox WiFi through private protocol data, and configures the network parameters of the second virtual network card when TBox WiFi is in a connected state, thereby ensuring that the vehicle computer can send and receive WiFi data normally.
[0105] Specific to Figure 2 , Figure 3 In the illustrated embodiment, the network parameter configuration operation of the second virtual network card is performed through TBoxWiFiService, and there is no need to modify EthernetService. During operation, TBoxWifiService obtains the connection status of TBox Wifi and calls networkstack and netd to dynamically configure the network parameters of the second virtual network card.
[0106] Furthermore, in one embodiment, after the step of determining whether the TBox WiFi is in a connected state according to the private protocol data, the following step is further included:
[0107] If the TBox WiFi is not in a connected state, clear the network parameters of the second virtual network card.
[0108] Through this embodiment, unnecessary occupation of system resources can be reduced.
[0109] In a second aspect, an embodiment of the present application further provides a vehicle-mounted network management system.
[0110] In one embodiment, the vehicle-mounted network management system includes a first virtual network card, a second virtual network card, a third virtual network card, and a fourth virtual network card;
[0111] The first virtual network card and the third virtual network card are set in a custom namespace, the second virtual network card and the fourth virtual network card are set in the default namespace of the Android system, the first virtual network card and the second virtual network card are connected through a virtual Ethernet pair, and the third virtual network card and the fourth virtual network card are connected through a virtual Ethernet pair;
[0112] The first virtual network card is used to receive the first WiFi data from the TBox and send the first WiFi data to the second virtual network;
[0113] The second virtual network card is used to send the first WiFi data to the upper-layer application of the vehicle-mounted device;
[0114] The second virtual network card is further used to receive the second WiFi data from the upper-layer application of the vehicle-mounted device and send the second WiFi data to the first virtual network card;
[0115] The first virtual network card is further used to send the second WiFi data to the TBox;
[0116] The third virtual network card is used to receive the first mobile data from the TBox and send the first mobile data to the fourth virtual network card;
[0117] The fourth virtual network card is used to send the first mobile data to the upper-layer application of the vehicle-mounted device;
[0118] The fourth virtual network card is further used to receive the second mobile data from the upper-layer application of the vehicle-mounted device and send the second mobile data to the third virtual network card;
[0119] The third virtual network card is further used to send the second mobile data to the TBox.
[0120] Furthermore, in one embodiment, the vehicle-mounted network management system further includes a network management module for:
[0121] Performing network connectivity verification on the second virtual network card and the fourth virtual network card to determine the priorities of the second virtual network card and the fourth virtual network card;
[0122] If the priority of the second virtual network card is higher than that of the fourth virtual network card, the outgoing data from the upper-layer application of the vehicle-mounted device is sent as the second WiFi data to the second virtual network card;
[0123] If the priority of the fourth virtual network card is higher than that of the second virtual network card, the outgoing data from the in-vehicle upper-layer application is sent as the second mobile data to the fourth virtual network card.
[0124] Further, in an embodiment, the in-vehicle network management system further includes an environment configuration module for:
[0125] Create a custom namespace, and create a first virtual network card and a third virtual network card in the custom namespace;
[0126] Create a second virtual network card and a fourth virtual network card in the default namespace;
[0127] Create a virtual Ethernet pair for connecting the first virtual network card and the second virtual network card;
[0128] Create a virtual Ethernet pair for connecting the third virtual network card and the fourth virtual network card;
[0129] Configure the network parameters of the first virtual network card and the third virtual network card;
[0130] Configure the network parameters of the second virtual network card;
[0131] Configure the network parameters of the fourth virtual network card.
[0132] Further, in an embodiment, the environment configuration module includes a basic configuration sub-module for:
[0133] Start a network configuration script during the startup process of the init process to implement the following operations:
[0134] Create a custom namespace, and create a first virtual network card and a third virtual network card in the custom namespace;
[0135] Create a second virtual network card and a fourth virtual network card in the default namespace;
[0136] Create a virtual Ethernet pair for connecting the first virtual network card and the second virtual network card;
[0137] Create a virtual Ethernet pair for connecting the third virtual network card and the fourth virtual network card;
[0138] Configure the network parameters of the first virtual network card and the third virtual network card.
[0139] Further, in an embodiment, the environment configuration module includes a mobile network configuration sub-module for:
[0140] During the startup process of the system service in the Java layer, configure the network parameters of the fourth virtual network card.
[0141] Further, in one embodiment, the environment configuration module includes a WiFi configuration sub-module, which is used for:
[0142] Receiving private protocol data from the TBox;
[0143] Judging whether the TBox WiFi is in a connected state according to the private protocol data;
[0144] If the TBox WiFi is in a connected state, configuring the network parameters of the second virtual network card.
[0145] Further, in one embodiment, the WiFi configuration sub-module is also used for:
[0146] If the TBox WiFi is not in a connected state, clearing the network parameters of the second virtual network card.
[0147] Among them, the function implementation of each module in the above vehicle-mounted network management system corresponds to each step in the above vehicle-mounted network management method embodiment, and its function and implementation process will not be elaborated here one by one.
[0148] In a third aspect, an embodiment of the present application provides a vehicle-mounted network management device.
[0149] Figure 4 The hardware structure diagram of the vehicle-mounted network management device involved in the embodiment solution of the present application is shown.
[0150] Refer to Figure 4 , in an embodiment of the present application, the vehicle-mounted network management device may include a processor, a memory, a communication interface, and a communication bus.
[0151] Among them, the communication bus can be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0152] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces, etc., which are used to implement the interconnection of components inside the vehicle-mounted network management device, as well as interfaces for implementing the interconnection of the vehicle-mounted network management device with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display screen (Display), a keyboard (Keyboard), etc.
[0153] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical memory, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0154] The processor can be a general-purpose processor, which can call the vehicle-mounted network management program stored in the memory and execute the vehicle-mounted network management method provided by the embodiments of the present application. For example, the general-purpose processor can be a central processing unit (CPU). Among them, the method executed when the vehicle-mounted network management program is called can refer to the various embodiments of the vehicle-mounted network management method of the present application, which will not be elaborated here.
[0155] Those skilled in the art can understand that Figure 4 the hardware structure shown in does not constitute a limitation to the present application, and may include more or fewer components than shown in the figure, or combine some components, or different component arrangements.
[0156] In a fourth aspect, the embodiments of the present application further provide a readable storage medium.
[0157] The vehicle-mounted network management program is stored on the readable storage medium of the present application. When the vehicle-mounted network management program is executed by the processor, the steps of the vehicle-mounted network management method as described above are implemented.
[0158] Among them, the method implemented when the vehicle-mounted network management program is executed can refer to the various embodiments of the vehicle-mounted network management method of the present application, which will not be elaborated here.
[0159] It should be noted that the serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0160] In the description of the specification, claims and the above-mentioned drawings of this application, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices. Descriptions such as "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit that "first", "second" and "third" are different types.
[0161] In the description of the embodiments of this application, terms such as "exemplary", "for example" or "for instance" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary", "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "for example" or "for instance" is intended to present relevant concepts in a specific manner.
[0162] In the description of the embodiments of this application, unless otherwise specified, " / " means "or". For example, A / B may represent A or B; "and / or" in the text is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "a plurality of" means two or more than two.
[0163] In some processes described in the embodiments of this application, a plurality of operations or steps appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of this application or may be executed in parallel. The serial numbers of the operations are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0164] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of this application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device to execute the methods described in the various embodiments of this application.
[0165] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall equally be included in the patent protection scope of the present application.
Claims
1. A vehicle-mounted computer network management method, characterized in that, The vehicle-mounted network management method includes: Receiving first WiFi data from the TBox through a first virtual network card, sending the first WiFi data to a second virtual network card, and sending the first WiFi data to the upper-layer application of the vehicle-mounted device through the second virtual network card; Receiving second WiFi data from the upper-layer application of the vehicle-mounted device through the second virtual network card, sending the second WiFi data to the first virtual network card, and sending the second WiFi data to the TBox through the first virtual network card; Receiving first mobile data from the TBox through a third virtual network card, sending the first mobile data to a fourth virtual network card, and sending the first mobile data to the upper-layer application of the vehicle-mounted device through the fourth virtual network card; Receiving second mobile data from the upper-layer application of the vehicle-mounted device through the fourth virtual network card, sending the second mobile data to the third virtual network card, and sending the second mobile data to the TBox through the third virtual network card; Among them, the first virtual network card and the third virtual network card are set in a custom namespace, the second virtual network card and the fourth virtual network card are set in the default namespace of the Android system, the first virtual network card and the second virtual network card are connected through a virtual Ethernet pair, and the third virtual network card and the fourth virtual network card are connected through a virtual Ethernet pair.
2. The vehicle-mounted network management method according to claim 1, wherein, The vehicle-mounted network management method further includes: Performing network connectivity verification on the second virtual network card and the fourth virtual network card to determine the priorities of the second virtual network card and the fourth virtual network card; If the priority of the second virtual network card is higher than that of the fourth virtual network card, the outgoing data from the upper-layer application of the vehicle-mounted device is sent as second WiFi data to the second virtual network card; If the priority of the fourth virtual network card is higher than that of the second virtual network card, the outgoing data from the upper-layer application of the vehicle-mounted device is sent as second mobile data to the fourth virtual network card.
3. The vehicle-mounted network management method according to claim 1, wherein The vehicle-mounted network management method further includes: Creating a custom namespace and creating a first virtual network card and a third virtual network card in the custom namespace; Creating a second virtual network card and a fourth virtual network card in the default namespace; Creating a virtual Ethernet pair for connecting the first virtual network card and the second virtual network card; Creating a virtual Ethernet pair for connecting the third virtual network card and the fourth virtual network card; Configuring the network parameters of the first virtual network card and the third virtual network card; Configuring the network parameters of the second virtual network card; Configuring the network parameters of the fourth virtual network card.
4. The vehicle-mounted network management method according to claim 3, wherein Starting a network configuration script during the startup process of the init process to implement the following operations: Creating a custom namespace and creating a first virtual network card and a third virtual network card in the custom namespace; Creating a second virtual network card and a fourth virtual network card in the default namespace; Creating a virtual Ethernet pair for connecting the first virtual network card and the second virtual network card; Creating a virtual Ethernet pair for connecting the third virtual network card and the fourth virtual network card; Configuring the network parameters of the first virtual network card and the third virtual network card.
5. The vehicle-mounted network management method according to claim 3, wherein The step of configuring the network parameters of the fourth virtual network card includes: Configuring the network parameters of the fourth virtual network card during the startup process of the system service in the Java layer.
6. The vehicle-mounted network management method according to claim 3, wherein The step of configuring the network parameters of the second virtual network card includes: Continuously receiving private protocol data from the TBox; Judge whether the TBox WiFi is in a connected state according to the private protocol data; If the TBox WiFi is in a connected state, configure the network parameters of the second virtual network card.
7. The vehicle-mounted network management method according to claim 6, wherein After the step of judging whether the TBox WiFi is in a connected state according to the private protocol data, the following steps are further included: If the TBox WiFi is not in a connected state, clear the network parameters of the second virtual network card.
8. A vehicle-mounted computer network management system, characterized in that, The in-vehicle network management system includes a first virtual network card, a second virtual network card, a third virtual network card, and a fourth virtual network card; The first virtual network card and the third virtual network card are set in a custom namespace, the second virtual network card and the fourth virtual network card are set in the default namespace of the Android system, the first virtual network card and the second virtual network card are connected through a virtual Ethernet pair, and the third virtual network card and the fourth virtual network card are connected through a virtual Ethernet pair; The first virtual network card is used to receive the first WiFi data from the TBox and send the first WiFi data to the second virtual network; The second virtual network card is used to send the first WiFi data to the upper-layer application of the in-vehicle unit; The second virtual network card is also used to receive the second WiFi data from the upper-layer application of the in-vehicle unit and send the second WiFi data to the first virtual network card; The first virtual network card is also used to send the second WiFi data to the TBox; The third virtual network card is used to receive the first mobile data from the TBox and send the first mobile data to the fourth virtual network card; The fourth virtual network card is used to send the first mobile data to the upper-layer application of the in-vehicle unit; The fourth virtual network card is also used to receive the second mobile data from the upper-layer application of the in-vehicle unit and send the second mobile data to the third virtual network card; The third virtual network card is also used to send the second mobile data to the TBox.
9. A vehicle-mounted computer network management device, characterized in that, The in-vehicle network management device includes a processor, a memory, and an in-vehicle network management program stored on the memory and executable by the processor. When the in-vehicle network management program is executed by the processor, the steps of the in-vehicle network management method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that, An in-vehicle network management program is stored on the readable storage medium. When the in-vehicle network management program is executed by a processor, the steps of the in-vehicle network management method according to any one of claims 1 to 7 are implemented.