Network access method and related device

By obtaining and resolving the DNS request of the ECU on T-BOX and dynamically determining the target DNS server, the problem of ECU network access failing due to the crash or abnormal operation of the DNS server is solved, and the stability and flexibility of ECU network access is achieved.

CN119496761APending Publication Date: 2025-02-21BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411612251.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

When the electronic control unit (ECU) on the vehicle borrows the network through T-BOX, the fixed DNS server crashes or runs abnormally, resulting in the DNS domain name resolution failure, which in turn causes the ECU network access to fail.

Method used

The DNS request sent by the ECU is obtained through the target port of T-BOX, and the target DNS server is determined based on the configuration file of the DNS server instance and the domain name to be resolved, and the DNS request is sent to the target DNS server for resolution.

Benefits of technology

It avoids the problem of frequent software updates when changing DNS server address, ensures the stability of ECU network access, and solves the problem of ECU network access failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496761A_ABST
    Figure CN119496761A_ABST
Patent Text Reader

Abstract

The invention discloses a network access method and a related device. The method comprises the following steps: acquiring a DNS request sent by an ECU based on a target port of T-BOX; wherein a mapping relationship exists between the target port and a VLAN port corresponding to the ECU, the target port is a port monitored by the DNS server instance, and the DNS request comprises a domain name to be resolved, then determining a target DNS server corresponding to the DNS request according to a configuration file of the DNS server instance and the domain name to be resolved, and further sending the DNS request to the target DNS server, wherein the target DNS server is used for analyzing the DNS request to determine a target address corresponding to the domain name to be analyzed. Wherein due to the mapping relation between the target port of the TBOX and the VLAN port, each ECU does not need to confirm the specific address of the corresponding DNS server, the domain name resolution failure of the DNS server is avoided, and the problem of ECU network access failure is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a network access method and related devices. Background Art

[0002] Currently, the vehicle's onboard communication terminal, the T-BOX, serves as a medium for connecting electronic control units (ECUs) on the vehicle's Ethernet architecture. Each ECU in the vehicle primarily uses different virtual local area networks (VLANs) within the T-BOX to connect to the internet using different network cards.

[0003] When a vehicle's T-BOX successfully dials up a different network card, the operator will assign a dynamic DNS domain name to the domain name system server (DNS server). However, when each ECU in the vehicle uses the T-BOX to access the Internet, the server corresponding to each ECU is a designated DNS server. In other words, the DNS domain name of the ECU using the T-BOX is fixed. If the DNS server crashes or malfunctions, it may cause DNS domain name resolution failure, resulting in ECU network access failure. Summary of the Invention

[0004] Based on the above problems, the present application provides a network access method and related devices, aiming to solve the problem of ECU network access failure.

[0005] The embodiments of this application disclose the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a network access method, which is applied to a telematics unit T-BOX, comprising:

[0007] Obtaining a Domain Name System (DNS) request sent by an electronic control unit (ECU) based on a target port of the T-BOX; a mapping relationship exists between the target port and a virtual local area network (VLAN) port corresponding to the ECU; the target port is a port monitored by a DNS server instance; and the DNS request includes a domain name to be resolved;

[0008] Determine the target DNS server corresponding to the DNS request according to the configuration file of the DNS server instance and the domain name to be resolved;

[0009] The DNS request is sent to the target DNS server; the target DNS server is used to resolve the DNS request and determine the target address corresponding to the domain name to be resolved.

[0010] Optionally, before acquiring the domain name system DNS request sent by the electronic control unit ECU based on the target port of the T-BOX, the method further includes:

[0011] Determine whether the T-BOX meets the dialing conditions;

[0012] If the T-BOX meets the dial-up conditions, the dial-up operation is started through the access point name APN corresponding to the VLAN port;

[0013] If the APN dialing is successful, obtain the address domain name of the DNS server corresponding to the APN;

[0014] Write the address domain name into the configuration file of the DNS server instance and start the DNS server instance;

[0015] The acquiring, based on the target port of the T-BOX, a domain name system DNS request sent by an electronic control unit ECU includes:

[0016] After the DNS server instance is started, a domain name system DNS request sent by an electronic control unit ECU is obtained based on the target port of the T-BOX.

[0017] Optionally, determining a target DNS server corresponding to the DNS request according to a configuration file of the DNS server instance and the domain name to be resolved includes:

[0018] Determining a forwarding rule according to a configuration file of the DNS server instance; wherein the forwarding rule represents a correspondence between a plurality of domain names to be resolved and the address domain names of the DNS servers corresponding to the respective domain names;

[0019] The domain name to be resolved is matched with the forwarding rule to obtain the address domain name of the target DNS server corresponding to the DNS request.

[0020] Optionally, the method further includes:

[0021] If the T-BOX does not meet the dialing conditions or the APN dialing is unsuccessful, the DNS request is not obtained.

[0022] Optionally, sending the DNS request to the target DNS server includes:

[0023] Bind the access point name APN corresponding to the DNS server instance;

[0024] The DNS request is sent to the target server via the APN.

[0025] In a second aspect, an embodiment of the present application provides a network access method, which is applied to a domain name system (DNS) server, including:

[0026] receiving a DNS request sent by a telematics processing unit (T-BOX); wherein the DNS request includes a domain name to be resolved; the DNS request is sent by an electronic control unit (ECU) to a target port of the T-BOX; a mapping relationship exists between the target port and a virtual local area network (VLAN) port corresponding to the ECU; the target port is a port monitored by a DNS server instance; the DNS server obtains the domain name based on a configuration file of the DNS server instance and the domain name to be resolved;

[0027] Resolve the domain name to be resolved to obtain the target address corresponding to the domain name to be resolved;

[0028] The target address is sent to the DNS server instance; the DNS server instance is used to send the target address to the ECU.

[0029] In a third aspect, an embodiment of the present application provides a network access device, which is applied to a telematics unit T-BOX, including:

[0030] a first acquisition module configured to acquire a domain name system (DNS) request sent by an electronic control unit (ECU) based on a target port of the T-BOX; a mapping relationship exists between the target port and a virtual local area network (VLAN) port corresponding to the ECU; the target port is a port monitored by a DNS server instance; and the DNS request includes a domain name to be resolved;

[0031] A determination module is used to determine a target DNS server corresponding to the DNS request according to a configuration file of the DNS server instance and the domain name to be resolved;

[0032] The first sending module is used to send the DNS request to the target DNS server; the target DNS server is used to resolve the DNS request and determine the target address corresponding to the domain name to be resolved.

[0033] In a fourth aspect, an embodiment of the present application provides a network access device, which is applied to a domain name system (DNS) server, including:

[0034] A second acquisition module is configured to receive a DNS request sent by a telematics unit (T-BOX); wherein the DNS request includes a domain name to be resolved; the DNS request is sent by an electronic control unit (ECU) to a target port of the T-BOX; a mapping relationship exists between the target port and a virtual local area network (VLAN) port corresponding to the ECU; the target port is a port monitored by a DNS server instance; the DNS server obtains the domain name to be resolved based on a configuration file of the DNS server instance and the domain name to be resolved;

[0035] A resolution module, configured to resolve the domain name to be resolved and obtain a target address corresponding to the domain name to be resolved;

[0036] The second sending module is used to send the target address to the DNS server instance; the DNS server instance is used to send the target address to the ECU.

[0037] In a fifth aspect, an embodiment of the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the network access method as described in the first aspect is implemented.

[0038] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions. When the instructions are executed on a terminal device, the terminal device executes the network access method as described in the first aspect.

[0039] Compared with the prior art, this application has the following beneficial effects:

[0040] The network access method provided in the embodiment of the present application obtains the domain name system DNS request sent by the electronic control unit ECU through the target port based on the T-BOX; wherein, there is a mapping relationship between the target port and the virtual local area network VLAN port corresponding to the ECU, and the target port is the port monitored by the DNS server instance. The DNS request includes the domain name to be resolved, and then the target DNS server corresponding to the DNS request is determined based on the configuration file of the DNS server instance and the domain name to be resolved, and the DNS request is further sent to the target DNS server, wherein the target DNS server is used to resolve the DNS request to determine the target address corresponding to the domain name to be resolved. Among them, due to the mapping relationship between the target port of the TBOX and the VLAN port, each ECU does not need to confirm the specific address of the corresponding DNS server, but only needs to send the DNS request to the target port of the T-BOX. Even if the address of the DNS server changes, there is no need to frequently update the software to adapt to the new DNS server, thereby avoiding the failure of the DNS server's domain name resolution, thereby solving the problem of ECU network access failure. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1A flowchart of a network access method provided in an embodiment of the present application;

[0043] Figure 2 A flowchart of another network access method provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of an ECU accessing the network through different VLANs provided in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of a network access process provided in an embodiment of the present application;

[0046] Figure 5 A schematic diagram of the structure of a network access device provided in an embodiment of the present application;

[0047] Figure 6 A schematic diagram of the structure of another network access device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] As previously described, research on network access revealed that the existing T-BOX can serve as a medium for connecting individual ECUs to the internet within a vehicle's Ethernet architecture. This means that each ECU can access the network through different network cards using different VLANs. Specifically, if an ECU wishes to access the network, it must send packets to the T-BOX using different VLAN tags (virtual local area network tags). The T-BOX then uses the VLAN tags to distinguish these packets and directs them to the designated network card. The DNS configuration upstream of the ECU uses a fixed DNS server, and DNS requests are transparently transmitted by the T-BOX to the designated DNS server.

[0049] However, when each ECU on a vehicle uses T-BOX to access the network, the server corresponding to each ECU is a designated DNS server. This means that the DNS domain name used by each ECU when using T-BOX is fixed. This means that the DNS server used by each ECU in the vehicle when using T-BOX is not dynamically assigned by the operator. Therefore, if this DNS server crashes or malfunctions, DNS domain name resolution may fail, leading to ECU network access failure. Furthermore, since DNS domain names accessed in different regions may vary, each ECU currently uses a fixed DNS domain name at the software level, resulting in low software platform reusability.

[0050] In order to solve this technical problem, an embodiment of the present application provides a network access method and related devices, which include: obtaining a domain name system DNS request sent by an electronic control unit ECU based on a target port of the T-BOX; wherein, there is a mapping relationship between the target port and the virtual local area network VLAN port corresponding to the ECU, and the target port is the port monitored by the DNS server instance. The DNS request includes the domain name to be resolved, and then the target DNS server corresponding to the DNS request is determined according to the configuration file of the DNS server instance and the domain name to be resolved, and the DNS request is further sent to the target DNS server, wherein the target DNS server is used to resolve the DNS request to determine the target address corresponding to the domain name to be resolved.

[0051] In this way, due to the mapping relationship between the TBOX's target port and the VLAN port, each ECU does not need to confirm the specific address of the corresponding DNS server. It only needs to send the DNS request to the T-BOX's target port. Even if the DNS server address changes, there is no need to frequently update the software to adapt to the new DNS server, avoiding DNS server domain name resolution failure, thereby solving the problem of ECU network access failure.

[0052] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0053] To facilitate understanding of the following embodiments, the terms that may appear in the following embodiments are first explained:

[0054] ECU (Electronic Control Unit), also known as the car's "on-board computer", is mainly used to control the car's driving status and realize its various functions.

[0055] The T-BOX (Telematics Box) is an intelligent in-vehicle terminal within the connected vehicle system, primarily responsible for data collection, remote communication, and command execution. The T-BOX collects various vehicle data (such as fault monitoring, driving behavior analysis, driving data collection, tire pressure, and door status) and uploads it to the TSP backend. Alternatively, it receives commands from the backend and returns the results. Vehicle owners can remotely control their vehicles using a smart key or mobile app, enabling remote control (such as air conditioning and window control, engine start / stop, door unlocking and locking), remote fault diagnosis, and vehicle safety monitoring.

[0056] The Domain Name System (DNS) is a distributed database system used to convert domain names (such as www.xxxxxx.com) that are easy for people to remember into IP addresses (such as 192.0000.200.1000) that machines can understand. Specifically, the DNS is a distributed database that maps domain names to IP addresses, making it easier for users to access the internet without having to memorize complex strings of numbers. Users can simply enter a website's domain name to access the corresponding website, without having to remember each website's IP address.

[0057] VLAN (Virtual Local Area Network) is a network technology that allows the creation of logically independent network segments within a physical network. VLANs are not restricted by physical location and can organize devices and users based on functional or application requirements, allowing them to communicate as if they were on the same network segment. Specifically, VLANs are configured on switches to logically partition a group of devices and users into an independent broadcast domain. Devices within the same VLAN can communicate with each other, but devices in different VLANs cannot communicate directly by default and must be forwarded through a router or Layer 3 switch.

[0058] DNS server tools are software or applications used to manage and operate DNS (Domain Name System) servers. These tools play a vital role in network management because they handle the translation between domain names and IP addresses, making resources on the Internet easily accessible to users.

[0059] APN (Access Point Name) is a parameter that users must configure when accessing the Internet through their mobile phones or mobile terminals. The APN determines the access method used by the user device to access the network.

[0060] See also Figure 1 , which is a flow chart of a network access method provided in an embodiment of the present application.

[0061] Combine Figure 1 As shown, the network access method provided in the embodiment of the present application can be applied to the telematics unit T-BOX, including:

[0062] S101: Acquire a Domain Name System (DNS) request sent by an Electronic Control Unit (ECU) based on a target port of the T-BOX.

[0063] The target port is the port on the T-BOX that receives DNS requests from each ECU. A DNS request is a network request used to resolve a domain name to its corresponding IP address. A DNS request includes the domain name to be resolved. The domain name to be resolved is the domain name used to obtain the corresponding IP address, such as www.xxxxxx.com.

[0064] The target port is mapped to the VLAN port corresponding to the ECU. The target port is the port monitored by the DNS server instance. The DNS server instance refers to a specific example of setting up and configuring a DNS server in a real environment.

[0065] As a possible implementation, the embodiment of the present application is to integrate the DNS server tool into the T-BOX application, that is, to configure a DNS server instance in the T-BOX. Since the DNS requests in the current requirements are all entered through port 53 of the T-BOX, the DNS server monitors port 53 of the T-BOX by default.

[0066] It should be understood that the embodiments of the present application involve using different VLANs corresponding to different public network cards, such as VLAN 100 corresponding to public network card 1 and VLAN 200 corresponding to public network card 200. However, in a complex network environment, especially when using VLANs and multiple public network cards, directly using the default port 53 may cause traffic confusion or routing errors. Therefore, in order to enable DNS requests to go through different public network cards in different VLANs, it is necessary to use the iptables rules of the Linux firewall to perform destination address (DNAT) port mapping.

[0067] Specifically, the destination address port mapping is to map the port 53 monitored by the DNS service instance to the corresponding port 8053 of VLAN 100, and to map VLAN 200 to the corresponding port 9053, which can ensure that DNS requests from different VLANs are correctly routed to the corresponding network cards and VLANs.

[0068] In addition, other non-DNS network traffic is still transmitted according to the original network configuration and routing rules and will not be affected by the destination address port mapping. That is, on the original basis, network communication packets are guaranteed to go through the original link, and DNS requests are also guaranteed to go through the corresponding link.

[0069] As an example, consider a new energy vehicle with multiple ECUs that need to access the internet for data or remote control. In related technologies, each ECU must be configured with a fixed DNS server address. When the DNS server address changes, the software of all ECUs must be updated. Failure to promptly update the DNS server address can lead to the risk of ECU network access failure.

[0070] In this embodiment, each ECU's DNS request is sent to the designated target port of the TBOX. The TBOX then forwards the request to the correct DNS server based on pre-set port mappings. If a DNS server fails, the TBOX automatically switches to another DNS server, ensuring that the ECU's network access is not affected. In other words, due to the mapping between the TBOX's target port and the VLAN port, each ECU does not need to confirm the specific address of the corresponding DNS server; it only needs to send the DNS request to the T-BOX's target port. Even if the DNS server address changes, there is no need to frequently update the software to adapt to the new DNS server, thus avoiding DNS server domain name resolution failures and thus resolving the issue of ECU network access failures.

[0071] S102: Determine a target DNS server corresponding to the DNS request according to the configuration file of the DNS server instance and the domain name to be resolved.

[0072] Configuration files are files used to configure the TBOX's network functions and DNS proxy behavior. These files include, but are not limited to: VLAN 200 network configuration information, public network card dial-up parameters (such as username and password), public network card IP address, subnet mask, gateway, primary and secondary DNS domain names, DNS server instance configuration parameters (such as port number and timeout), routing table update rules, and more. Routing table update rules specify how routing table information is updated when specific conditions are met (such as disconnecting the local network card).

[0073] DNS Server Instance Target DNS Server means the DNS server corresponding to the DNS request.

[0074] It should be understood that after the DNS server instance monitors the DNS request received by the target port, it can determine the target DNS server corresponding to the DNS request based on the configuration file and the domain name to be resolved in the DNS request. The target DNS server is used to resolve the domain name to be resolved in the DNS request.

[0075] S103: Send the DNS request to the target DNS server.

[0076] The target DNS server is used to resolve the DNS request and determine the target address corresponding to the domain name to be resolved. The target address refers to the resolution result corresponding to the domain name to be resolved, and the ECU can access the network through this target address.

[0077] It should be understood that after determining the target DNS server, T-BOX will send a DNS request to the target DNS server, and the target DNS server will resolve the domain name to be resolved in the DNS request to obtain the target address.

[0078] As a possible implementation, step S103 specifically includes binding the access point name (APN) corresponding to the DNS server instance and sending the DNS request to the target server via the APN. That is, the T-BOX needs to bind the APN corresponding to the DNS server instance and send the DNS request to the target server via the APN.

[0079] Because there's a mapping between the T-BOX's target port and the VLAN port, and the DNS server instance can monitor the target port, the ECU doesn't need to configure the corresponding DNS server address. Instead, it simply sends a DNS request to the target port. Upon detecting the DNS request received by the target port, the DNS server instance determines the target address based on the configuration file and the domain name to be resolved in the DNS request, enabling the ECU to access the target address. Even if the target DNS server address changes, the ECU or T-BOX doesn't need to frequently update software to adapt to the new DNS server, preventing DNS server domain name resolution failures and thus resolving ECU network access issues.

[0080] Based on the network access method provided in the above embodiment, before executing step S101, the method may further include:

[0081] A1: Determine whether the T-BOX meets the dialing conditions.

[0082] Dial-up conditions refer to the prerequisites for T-BOX to allow dialing. For example, before attempting to dial, T-BOX may check the current network signal quality, such as signal strength and stability, to ensure dial-up success rate and communication quality. As another example, in some cases, T-BOX may trigger the dial-up process based on a preset timed task or periodic task.

[0083] A2: If the T-BOX meets the dial-up conditions, the dial-up operation is started through the access point name APN corresponding to the VLAN port.

[0084] It should be understood that if the T-BOX meets the dial-up conditions, it proves that the T-BOX allows dial-up, and the dial-up operation can be started through the APN corresponding to the VLAN port.

[0085] In some possible implementations, the dialing process may be:

[0086] Step 1: When the T-BOX meets the dial-up conditions (such as user request, scheduled task, etc.), the T-BOX triggers the dial-up process through the APN corresponding to the VLAN.

[0087] Step 2: T-BOX sends a connection request to the mobile network operator through the built-in mobile network module. The connection request includes the APN configuration information.

[0088] Step 3: After receiving the connection request, the mobile network operator will perform identity authentication. Authentication includes but is not limited to verifying username, password, and other information to ensure that the request comes from a legitimate user.

[0089] Step 4: If the authentication is successful, the mobile network operator will assign a network address (such as an IP address) and related network configuration information (such as the address of the DNS server) to the T-BOX. Then, a network connection will be established between the T-BOX and the mobile network operator.

[0090] A3: If the APN dial-up is successful, obtain the address domain name of the DNS server corresponding to the APN.

[0091] It should be understood that during the dial-up process, T-BOX will continuously monitor the connection status. Once the connection is successful (i.e., APN1 dial-up is successful), T-BOX will receive an event notification. After receiving the dial-up success event, T-BOX can obtain the network configuration information assigned by the operator, update the routing table, start the DNS SERVER100 instance, etc. Furthermore, T-BOX can also obtain the IP address and upstream gateway address of the local network card from the mobile network operator. At the same time, T-BOX will also obtain the addresses of the primary domain name and backup domain name of the DNS server (i.e., the address domain name).

[0092] A4: Write the address and domain name to the configuration file of the DNS server instance and start the DNS server instance.

[0093] It should be understood that T-BOX writes the acquired network configuration information (such as the address and domain name) into its configuration file for subsequent use. Based on the acquired DNS server address and domain name, T-BOX then launches a DNS server instance to handle local DNS requests. Furthermore, T-BOX updates its internal routing table based on the new network configuration information to ensure that data packets are routed correctly.

[0094] It's important to note that if the T-BOX doesn't meet the dialup requirements or the APN dialup fails, no DNS request is received. This means that the DNS server instance hasn't been started, so there's no need to receive a DNS request. If the T-BOX dials successfully and the DNS server instance is started, the DNS request sent by the ECU can be received based on the T-BOX's target port.

[0095] As a possible implementation, step S102 includes determining a forwarding rule based on a configuration file of the DNS server instance, matching the domain name to be resolved with the forwarding rule to obtain the address domain name of the target DNS server corresponding to the DNS request. The forwarding rule represents a correspondence between multiple domain names to be resolved and the address domain names of their corresponding DNS servers.

[0096] Forwarding rules define the path of how data packets are forwarded from one network node to another in the network. As an example, the destination address corresponding to the domain name to be resolved in the DNS request will be matched with the configuration file in the DNS server instance. If the destination address corresponding to the DNS request (that is, the IP address corresponding to the domain name to be resolved) matches the address domain name of a DNS server in the configuration file (such as 116.116.116.116), a specific forwarding behavior will be triggered. Furthermore, when the destination address matches successfully, the DNS request will be bound to a specific egress network card APN, and the DNS request will be sent to the target DNS server through the APN for resolution.

[0097] Based on the network access method provided in the above embodiment, see Figure 2 , which is a flow chart of another network access method provided by an embodiment of the present application. Figure 2 As shown, the network access method provided in the embodiment of the present application can be applied to a domain name system DNS server, including:

[0098] S201: Receive a DNS request sent by the telematics unit T-BOX.

[0099] The DNS request includes the domain name to be resolved. The DNS request is sent by the electronic control unit (ECU) to the target port of the T-BOX. The target port is mapped to the virtual local area network (VLAN) port corresponding to the ECU. The target port is the port monitored by the DNS server instance. The DNS server instance is obtained based on the DNS server instance configuration file and the domain name to be resolved.

[0100] S202: Resolve the domain name to be resolved and obtain the target address corresponding to the domain name to be resolved.

[0101] S203: Send the target address to the DNS server instance.

[0102] The DNS server instance is used to send the target address to the ECU.

[0103] In one possible implementation, the DNS server resolves and processes DNS requests as follows: First, the DNS server analyzes the received DNS request and extracts the domain name to be resolved, the request type (such as A record, CNAME record, etc.), and other related information. Then, the DNS server checks whether there is a resolution result for the domain name in its local cache. If it exists in the cache, the server will directly return the result to T-BOX without further query. If there is no result in the local cache, the DNS server will continue to query according to the configured query method (recursive query or iterative query).

[0104] A recursive query is one in which the DNS server initiates queries to other DNS servers on behalf of the client and returns the query results to the client (T-BOX). An iterative query is one in which the DNS server only provides the client (T-BOX) with the address of the next DNS server to be queried, and the client initiates subsequent queries on its own.

[0105] It should be understood that when the ECU sends a DNS request to the target DNS server through the T-BOX's DNS server instance, the target DNS server will resolve the DNS request and return the resolution result to the ECU via the same path. During this process, due to the mapping relationship between the TBOX's target port and the VLAN port, each ECU does not need to confirm the specific address of the corresponding DNS server. It only needs to send the DNS request to the T-BOX's target port. Even if the address of the target DNS server changes, there is no need to frequently update the software to adapt to the new DNS server, thus avoiding the failure of DNS server domain name resolution and solving the problem of ECU network access failure.

[0106] Based on the network access method provided in the above embodiment, see Figure 3 , which is a schematic diagram of an ECU accessing the network through different VLANs provided by an embodiment of the present application. Figure 3As shown, the present invention uses the intelligent front-view camera IFC as an example. The IFC is designed to set the primary DNS server for two VLANs to the IP address of the T-BOX's corresponding VLAN. Assume that the primary DNS server for VLAN 100 is set to the IP address 192.16.100.2 of T-BOX's VLAN 100, and the primary DNS server for VLAN 200 is set to the IP address 192.16.200.2 of T-BOX's VLAN 200. VLAN 100 corresponds to public network card APN1, and VLAN 200 corresponds to public network card APN2. Specifically, different VLANs can be selected to send DNS requests based on business needs. T-BOX acts as a DNS proxy, forwarding DNS requests from different VLANs to different public network card APNs.

[0107] based on Figure 3 , further combined with Figure 4 As shown, the embodiment of the present application also provides a network access method, which may include:

[0108] Step 1: The vehicle is powered on, the T-BOX system starts, and the T-BOX performs Destination Address Translation (DNAT) port mapping on the corresponding port for the DNS request.

[0109] That is, the T-BOX needs to map the target port for receiving DNS requests to the corresponding VLAN port. As an example, port 53 monitored by the DNS server instance can be mapped to port 8053 corresponding to VLAN 100, and VLAN 200 can be mapped to port 9053 corresponding to VLAN 9053.

[0110] Step 2: After the public network card APN dial-up is successful, start the corresponding DNS server instance.

[0111] As an example, the dialing process can be:

[0112] B1: If the T-BOX meets the dial-up conditions, it performs the dial-up operation. The T-BOX internally monitors the event that the public network card APN1 corresponding to VLAN 100 dials successfully.

[0113] B2: If the dial-up is successful, the IP address and upstream gateway address of the local network card assigned by the operator as well as the DNS primary and backup domain name information (that is, the address and domain name of the DNS server) will be obtained.

[0114] B3: After the acquisition is successful, the address domain name of the DNS server is written into the configuration file, and the DNS SERVER 100 instance (ie, DNS server instance 100) is started.

[0115] B4: Update the routing table. If the DNS packet meets the conditions for stopping dialing the local network card, close the DNSSERVER100 instance.

[0116] Among them, the dialing operation of the public network card APN2 corresponding to VLAN200 and the process of starting the DNS SERVER200 instance are the same as the dialing operation and the process of starting the DNS SERVER100 instance for the public network card APN1 corresponding to VLAN100 in the above steps B1 to B4, and are not repeated here.

[0117] Step 3: The IFC accesses the network through the VLAN.

[0118] Combine Figure 4 As shown in the figure, taking the example of an IFC accessing the network through VLAN 100, if the public network APN 1 corresponding to VLAN 100 is in a dial-up state, the IFC sends a DNS request to the T-BOX via port 8053. After the DNS SERVER 100 instance receives the DNS request, the configuration file corresponding to the DNS SERVER 100 instance determines the destination address of the DNS request. The DNS request is then routed to the public network APN 1 using routing rules (also known as forwarding rules). The routing rules can be: if the destination address of the domain name to be resolved in the DNS request is the DNS server's address domain name in the configuration file (e.g., 116.116.116.116), and the public network card APN 1 is bound, then a DNS request is sent to the DNS server (with an address domain name such as 116.116.116.116).

[0119] The process of IFC accessing the network through VLAN 200 is similar to that of IFC accessing the network through VLAN 100 and is not repeated here. Specifically, the DNS request sent by the IFC is sent to the T-BOX through port 9053. The routing rule corresponding to VLAN 200 can be: if the destination address of the domain name to be resolved in the DNS request is the DNS server's address domain name in the configuration file (such as 114.114.114.114), and the public network card APN2 is bound, then a DNS request is sent to the DNS server (with an address domain name such as 114.114.114.114).

[0120] It should be noted that if the APN dial-up status of the public network card corresponding to the VLAN is disconnected, since the DNSSERVER instance is not started at this time, the process is terminated, that is, no DNS request is sent.

[0121] Step 4: The DNS request is returned to the IFC via the original path corresponding to the DNS server.

[0122] It should be understood that the source address of the DNS request after port mapping conversion is the address of the corresponding VLAN100. After the DNS request is sent to the DNS server, the resolution result corresponding to the DNS request will be sent by the DNS server to the gateway of the public network card APN1 according to the original path, and then sent to IFC VLAN100 by the gateway through VLAN100.

[0123] As the first example, IFC makes a DNS request through VLAN200. The source address of the DNS request is the address of the corresponding VLAN200. After the DNS request is sent to the DNS server of the public network card APN2, the resolution result corresponding to the DNS request is sent by the DNS server to the gateway of the public network APN2, and then sent by the gateway of APN2 to IFC through VLAN200 of the T-BOX.

[0124] Based on the network access method provided in the above embodiment, see Figure 5 , the present application embodiment provides a schematic diagram of the structure of a network access device. Figure 5 As shown, the network access device 500 provided in an embodiment of the present application is applied to a telematics unit T-BOX, including:

[0125] The first acquisition module 501 is configured to acquire a domain name system (DNS) request sent by an electronic control unit (ECU) based on a target port of the T-BOX; a mapping relationship exists between the target port and a virtual local area network (VLAN) port corresponding to the ECU; the target port is a port monitored by a DNS server instance; and the DNS request includes a domain name to be resolved;

[0126] A determination module 502 is configured to determine a target DNS server corresponding to the DNS request based on a configuration file of the DNS server instance and the domain name to be resolved;

[0127] The first sending module 503 is used to send the DNS request to the target DNS server; the target DNS server is used to resolve the DNS request and determine the target address corresponding to the domain name to be resolved.

[0128] As an example, before the first obtaining module 501, the apparatus further includes:

[0129] The judgment module is used to judge whether the T-BOX meets the dialing conditions;

[0130] The dial-up module is used to start the dial-up operation through the access point name APN corresponding to the VLAN port if the T-BOX meets the dial-up conditions;

[0131] The address domain name acquisition module is used to obtain the address domain name of the DNS server corresponding to the APN if the APN dialing is successful;

[0132] The write module is used to write the address domain name into the configuration file of the DNS server instance and start the DNS server instance;

[0133] The determination module 502 is configured to: after the DNS server instance is started, obtain a domain name system DNS request sent by the electronic control unit ECU based on the target port of the T-BOX.

[0134] As an example, determination module 502 is used to: determine forwarding rules based on the configuration file of the DNS server instance; wherein the forwarding rules represent the correspondence between multiple domain names to be resolved and the address domain names of their respective corresponding DNS servers; match the domain names to be resolved with the forwarding rules to obtain the address domain name of the target DNS server corresponding to the DNS request.

[0135] As an example, the apparatus 500 further includes: a stop obtaining module, configured to not obtain a DNS request if the T-BOX does not meet the dialing condition or the APN dialing is unsuccessful.

[0136] As an example, the first sending module 503 is configured to: bind an access point name APN corresponding to a DNS server instance; and send a DNS request to a target server via the APN.

[0137] The network access device provided in the embodiment of the present application has the same beneficial effects as the network access method provided in the above embodiment, so they are not described in detail.

[0138] Based on the network access method provided in the above embodiment, see Figure 6 , which is a schematic diagram of the structure of a network access device of the system according to the embodiment of the present application. Figure 6 As shown, the network access device 600 provided in the embodiment of the present application is applied to a domain name system DNS server, including:

[0139] The second acquisition module 601 is configured to receive a DNS request sent by the telematics processing unit (T-BOX); wherein the DNS request includes the domain name to be resolved; the DNS request is sent by the electronic control unit (ECU) to the target port of the T-BOX; a mapping relationship exists between the target port and the virtual local area network (VLAN) port corresponding to the ECU; the target port is the port monitored by the DNS server instance; the DNS server is obtained based on the configuration file of the DNS server instance and the domain name to be resolved;

[0140] The resolution module 602 is used to resolve the domain name to be resolved and obtain the target address corresponding to the domain name to be resolved;

[0141] The second sending module 603 is used to send the target address to the DNS server instance; the DNS server instance is used to send the target address to the ECU.

[0142] The network access device provided in the embodiment of the present application has the same beneficial effects as the network access method provided in the above embodiment, so they are not described in detail.

[0143] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.

[0144] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the network access method described in any embodiment of the present application.

[0145] The computer storage medium stores code, and when the code is executed, the device executing the code implements the network access method described in any embodiment of the present application.

[0146] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and equipment embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0147] The "first" and "second" (if any) in the names mentioned in the embodiments of this application are only used as name identifiers and do not represent the first or second in order.

[0148] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above embodiment methods can be implemented by means of software plus a general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment or certain parts of the embodiments of the present application.

[0149] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A network access method, characterized in that: The method is applied to a telematics unit T-BOX, comprising: A domain name system DNS request sent by an electronic control unit ECU is obtained based on a target port of the T-BOX; a mapping relationship exists between the target port and a virtual local area network VLAN port corresponding to the ECU; the target port is a port monitored by a DNS server instance; and the DNS request includes a domain name to be resolved; Determine the target DNS server corresponding to the DNS request according to the configuration file of the DNS server instance and the domain name to be resolved; The DNS request is sent to the target DNS server; the target DNS server is used to resolve the DNS request and determine the target address corresponding to the domain name to be resolved.

2. The method according to claim 1, characterized in that Before acquiring a domain name system DNS request sent by an electronic control unit ECU based on the target port of the T-BOX, the method further includes: Determine whether the T-BOX meets the dialing condition; If the T-BOX meets the dial-up condition, the dial-up operation is started through the access point name APN corresponding to the VLAN port; If the APN dialing is successful, the address domain name of the DNS server corresponding to the APN is obtained; Write the address domain name into the configuration file of the DNS server instance, and start the DNS server instance; The obtaining of a domain name system DNS request sent by an electronic control unit ECU based on the target port of the T-BOX includes: After the DNS server instance is started, a domain name system DNS request sent by an electronic control unit ECU is obtained based on the target port of the T-BOX.

3. The method according to claim 2, characterized in that The step of determining a target DNS server corresponding to the DNS request according to the configuration file of the DNS server instance and the domain name to be resolved includes: Determine a forwarding rule according to a configuration file of the DNS server instance; wherein the forwarding rule represents a correspondence between a plurality of domain names to be resolved and the address domain names of the DNS servers corresponding to the respective domain names; The domain name to be resolved is matched with the forwarding rule to obtain the address domain name of the target DNS server corresponding to the DNS request.

4. The method according to claim 2, characterized in that: The method further comprises: If the T-BOX does not meet the dialing condition or the APN dialing is unsuccessful, the DNS request is not obtained.

5. The method according to claim 1, characterized in that The sending the DNS request to the target DNS server includes: Bind the access point name APN corresponding to the DNS server instance; The DNS request is sent to the target server via the APN.

6. A network access method, characterized in that: The method is applied to a domain name system DNS server, comprising: Receive a DNS request sent by a telematics processing unit T-BOX; wherein the DNS request includes a domain name to be resolved; the DNS request is a request sent by an electronic control unit ECU to a target port of the T-BOX; there is a mapping relationship between the target port and a virtual local area network VLAN port corresponding to the ECU; the target port is a port monitored by a DNS server instance; the DNS server is obtained based on a configuration file of the DNS server instance and the domain name to be resolved; Resolve the domain name to be resolved to obtain a target address corresponding to the domain name to be resolved; The target address is sent to the DNS server instance; the DNS server instance is used to send the target address to the ECU.

7. A network access device, characterized in that: The device is applied to a telematics unit T-BOX, comprising: A first acquisition module is used to acquire a domain name system DNS request sent by an electronic control unit ECU based on a target port of the T-BOX; there is a mapping relationship between the target port and a virtual local area network VLAN port corresponding to the ECU; the target port is a port monitored by a DNS server instance; the DNS request includes a domain name to be resolved; A determination module, configured to determine a target DNS server corresponding to the DNS request according to a configuration file of the DNS server instance and the domain name to be resolved; The first sending module is used to send the DNS request to the target DNS server; the target DNS server is used to resolve the DNS request and determine the target address corresponding to the domain name to be resolved.

8. A network access device, characterized in that: The device is applied to a domain name system DNS server, and includes: The second acquisition module is used to receive a DNS request sent by a telematics processing unit T-BOX; wherein the DNS request includes a domain name to be resolved; the DNS request is a request sent by an electronic control unit ECU to a target port of the T-BOX; there is a mapping relationship between the target port and a virtual local area network VLAN port corresponding to the ECU; the target port is a port monitored by a DNS server instance; the DNS server is obtained based on a configuration file of the DNS server instance and the domain name to be resolved; A resolution module, used to resolve the domain name to be resolved and obtain a target address corresponding to the domain name to be resolved; The second sending module is used to send the target address to the DNS server instance; the DNS server instance is used to send the target address to the ECU.

9. A computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the network access method according to any one of claims 1 to 5 is implemented, or the network access method according to claim 6 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on the terminal device, the terminal device executes the network access method according to any one of claims 1 to 5, or executes the network access method according to claim 6.

Citation Information

Cited By

  • Local area network flow routing control method, device and medium

    CN120567771A

  • Vehicle-mounted network connection method, system, equipment and medium

    CN121691416A