Message transmission method and device, electronic equipment and storage medium

By automatically configuring port attributes and transmission paths in the visual network access router, the problem of complex configuration of the visual network access router is solved, plug-and-play is achieved, the configuration process is simplified and technical requirements are reduced.

CN120602392APending Publication Date: 2025-09-05VISIONVERA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510833901.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

The number of visual network access routers is large and the configuration is complex. Site engineers need to be familiar with business requirements and manually configure ports, which makes configuration difficult.

Method used

After accessing the target network, the system obtains the request message from the target terminal, automatically configures the port attributes according to the message type, transmits the message based on the port attributes, establishes a network tunnel, and realizes plug-and-play.

Benefits of technology

There is no need to manually configure router ports, which simplifies the configuration process, enables plug-and-play of the router, reduces the technical requirements for site engineers, and improves configuration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602392A_ABST
    Figure CN120602392A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message transmission method and device, electronic equipment and a storage medium. The method comprises the following steps: after accessing a target network, acquiring a request message sent by a target terminal; according to the message type of the request message, the port attribute of a target port is configured, and the target port is a port for the target terminal to access the router; and transmitting the request message to a network terminal of the target network according to a message transmission path corresponding to the port attribute, the network terminal being a terminal requesting to establish a service by the target terminal in the target network. According to the embodiment of the invention, the service can be opened without configuring the router, so that the purpose of plug and play is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of message transmission technology, and in particular to a message transmission method, device, electronic device and storage medium. Background Art

[0002] For visual network access routers, there are a large number of devices and the configuration is relatively simple. Dedicated terminal ports and service ports are required so that the visual network tunnel can carry multiple business systems. Site engineers need to be familiar with business requirements, insert network cables or optical fibers into the correct ports, and log in to the device for configuration, which places high demands on site engineers. Summary of the Invention

[0003] In view of the above problems, embodiments of the present application are proposed to provide a message transmission method, device, electronic device and storage medium that overcome the above problems or at least partially solve the above problems.

[0004] In a first aspect, an embodiment of the present application provides a message transmission method, applied to a router, the method comprising:

[0005] After accessing the target network, obtain the request message sent by the target terminal;

[0006] According to the message type of the request message, configure the port attribute of the target port, where the target port is the port through which the target terminal accesses the router;

[0007] The request message is transmitted to a network terminal of the target network according to a message transmission path corresponding to the port attribute, where the network terminal is a terminal in the target network for which the target terminal requests to establish a service.

[0008] Optionally, the method further includes:

[0009] After accessing the target network, obtaining a tunnel establishment request message sent by the aggregation router;

[0010] Parsing the tunnel establishment request message to obtain tunnel establishment parameters;

[0011] A network tunnel is established with the aggregation router based on the tunnel establishment parameters, and the network tunnel is added to the target forwarding instance.

[0012] Optionally, configuring the port attribute of the target port according to the message type of the request message includes:

[0013] When the message type is the first message type, configuring the port attribute of the target port as a dedicated terminal port;

[0014] When the message type is the second message type, configuring the port attribute of the target port as a service port, and adding the target port to the target forwarding instance;

[0015] The first message type refers to a message type that matches the target network, and the second message type refers to a message type that does not match the target network.

[0016] Optionally, transmitting the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute includes:

[0017] In a case where the port attribute of the target port is a dedicated terminal port, the request message is sent to the network terminal of the target network through the target network port.

[0018] Optionally, transmitting the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute includes:

[0019] When the port attribute of the target port is a service port, performing tunnel encapsulation of the target network protocol on the request message according to the first message type to obtain an encapsulated message;

[0020] The encapsulated message is transmitted to the aggregation router through the network tunnel in the target forwarding instance, so that the aggregation router forwards the request message to the network terminal.

[0021] Optionally, after transmitting the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute, the method further includes:

[0022] Detecting whether the target port receives a service message matching the port attribute within a preset time period;

[0023] In the case where the service message is not detected, the configuration of the port attribute of the target port is cancelled.

[0024] Optionally, the method further includes:

[0025] Receiving a network entry message sent by a server of the target network;

[0026] Parsing the incoming message to obtain the network address for accessing the target network;

[0027] The target network is accessed based on the network address, and a port attribute of a port between the target network and the target network is configured as a target network port.

[0028] In a second aspect, an embodiment of the present application provides a message transmission device, applied to a router, the device comprising:

[0029] A request message acquisition module is used to obtain the request message sent by the target terminal after accessing the target network;

[0030] A port attribute configuration module, configured to configure the port attribute of a target port according to the message type of the request message, wherein the target port is the port through which the target terminal accesses the router;

[0031] The request message transmission module is used to transmit the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute, and the network terminal is the terminal in the target network that the target terminal requests to establish a service.

[0032] Optionally, the device further comprises:

[0033] An establishment request acquisition module, configured to acquire a tunnel establishment request message sent by a convergence router after accessing the target network;

[0034] A tunnel parameter acquisition module, configured to parse the tunnel establishment request message to obtain tunnel establishment parameters;

[0035] The network tunnel establishing module is used to establish a network tunnel with the aggregation router based on the tunnel establishing parameters, and add the network tunnel to the target forwarding instance.

[0036] Optionally, the port attribute configuration module includes:

[0037] a dedicated port configuration unit, configured to configure the port attribute of the target port as a dedicated terminal port when the message type is the first message type;

[0038] a service port configuration unit, configured to, when the message type is the second message type, configure the port attribute of the target port as a service port, and add the target port to a target forwarding instance;

[0039] The first message type refers to a message type that matches the target network, and the second message type refers to a message type that does not match the target network.

[0040] Optionally, the request message transmission module includes:

[0041] The first message transmission unit is configured to send the request message to the network terminal of the target network through the target network port when the port attribute of the target port is a dedicated terminal port.

[0042] Optionally, the request message transmission module includes:

[0043] a request message encapsulation unit, configured to, when the port attribute of the target port is a service port, perform tunnel encapsulation of the request message using a target network protocol according to the first message type to obtain an encapsulated message;

[0044] The second message transmission unit is configured to transmit the encapsulated message to the aggregation router through the network tunnel in the target forwarding instance, so that the aggregation router forwards the request message to the network terminal.

[0045] Optionally, the device further comprises:

[0046] A service message detection module, configured to detect whether the target port receives a service message matching the port attribute within a preset time period;

[0047] The port configuration canceling module is used to cancel the configuration of the port attribute of the target port when the service message is not detected.

[0048] Optionally, the device further comprises:

[0049] A network entry message receiving module, configured to receive a network entry message sent by a server of the target network;

[0050] A network address acquisition module, configured to parse the incoming message and obtain the network address for accessing the target network;

[0051] The target port configuration module is used to access the target network based on the network address and configure the port attribute of the port between the target network and the target network as the target network port.

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

[0053] one or more processors; and

[0054] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the apparatus to perform any of the above-described message transmission methods.

[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that enables a processor to execute any of the above-mentioned message transmission methods.

[0056] The embodiments of the present application include the following advantages:

[0057] The solution provided by the embodiment of the present application obtains the request message sent by the target terminal after accessing the target network. According to the message type of the request message, the port attributes of the target port are configured, and the target port is the port through which the target terminal accesses the router. According to the message transmission path corresponding to the port attributes, the request message is transmitted to the network terminal of the target network, and the network terminal is the terminal through which the target terminal in the target network requests to establish a service. The embodiment of the present application configures the port attributes of the target terminal accessing the router in combination with the message type of the target network, so as to transmit the message according to the message transmission path corresponding to the port attributes, so that the message can still be transmitted without configuring the port of the router, thereby achieving the purpose of plug-and-play of the router. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A flowchart of a message transmission method provided in an embodiment of the present application;

[0059] Figure 2 A flowchart of a target network access method provided in an embodiment of the present application;

[0060] Figure 3 A flowchart of a method for establishing a network tunnel provided in an embodiment of the present application;

[0061] Figure 4 A flowchart of the steps of a port attribute configuration method provided in an embodiment of the present application;

[0062] Figure 5 A flowchart of another message transmission method provided in an embodiment of the present application;

[0063] Figure 6 A flowchart of the steps of a method for canceling port attribute configuration provided in an embodiment of the present application;

[0064] Figure 7 A schematic diagram of a visual networking architecture provided in an embodiment of the present application;

[0065] Figure 8 A schematic diagram of a port configuration process provided in an embodiment of the present application;

[0066] Figure 9 A schematic structural diagram of a message transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0068] Reference Figure 1, shows a flow chart of the steps of a message transmission method provided by an embodiment of the present application, which can be applied to a router. Figure 1 As shown, the message transmission method may include: step 101, step 102 and step 103.

[0069] Step 101: After accessing the target network, obtain a request message sent by the target terminal.

[0070] The embodiments of the present application can be applied to a router, that is, the execution subject is a router. A router refers to an intermediate network device that connects a terminal device with a target network (such as a visual network, the Internet, etc.).

[0071] The target network refers to the target communication network to which the router is connected. In this example, the target network can be, but is not limited to, a network with a specific protocol and architecture, such as a visual network, the Internet, or an enterprise intranet.

[0072] The target terminal refers to the terminal device that accesses the target network through a router, such as a PC (Personal Computer), a V2V terminal, a dedicated hardware device, etc.

[0073] A request message refers to a data packet sent by a target terminal to a network terminal for establishing a service connection, and contains key information of the service request (such as target address, protocol type, data content, etc.).

[0074] After the router accesses the target network, it can obtain the request message sent by the target terminal. Specifically, the target terminal can send the request message to the router through the port connected to the router.

[0075] The implementation process of router access to the target network can be combined with Figure 2 A detailed description is given below.

[0076] Reference Figure 2 , shows a flowchart of the steps of a target network access method provided by an embodiment of the present application. Figure 2 As shown, the target network access method may include: step 201, step 202 and step 203.

[0077] Step 201: Receive a network entry message sent by a server of the target network.

[0078] In this embodiment, the network access message refers to a data packet in a specific format sent by a server of a target network to a router, and is used to notify or authorize the router to access the target network.

[0079] In actual applications, the port of the router can be inserted with an optical fiber or a network cable to achieve physical access to the target network, and then the router can receive the network access message sent by the server of the target network so that the router can perform the network access operation.

[0080] After receiving the network entry message sent by the server of the target network, step 202 is executed.

[0081] Step 202: Parse the incoming message to obtain the network address for accessing the target network.

[0082] A network address is a unique identification address assigned to an access device by the target network. It is used to locate the device in the network and establish a communication path.

[0083] After receiving the network access message sent by the server of the target network, the network access message can be parsed to obtain the network address of the target network, such as the MAC address.

[0084] After parsing the incoming message to obtain the network address of the target network, step 203 is executed.

[0085] Step 203: Access the target network based on the network address, and configure the port attribute of the port between the target network and the target network as the target network port.

[0086] After parsing the incoming message to obtain the network address of the target network, you can access the target network based on the network address and configure the port attributes of the port to the target network as the target network port. For example, if the target network is a visual network and the router is a visual access router, after parsing the network address (MAC address), you can access the visual network based on the MAC address and configure the port attributes of the port to the visual network as the visual network port.

[0087] After configuring the port attributes between the router and the target network as the target network port, when the router receives a message of a type that does not match the target network, it needs to encapsulate the message from the service port into a message of the type that matches the target network through the network tunnel and forward it to the target network. For example, using the visual network as an example, the visual network port needs to encapsulate the non-V2V message from the service port into a V2V message through the tunnel and forward it to the visual network.

[0088] Of course, if the incoming message doesn't contain the target address, or if the included target address doesn't allow the user to access the target network, the port attributes of the port to the target network can be configured as a dedicated terminal port. This dedicated terminal port can be used to instruct the router not to access the target network. Upon receiving a subsequent incoming message from the target network that allows network access, the port attributes of the port can be changed to the target network port. For example, if the port doesn't receive a message that allows the router to access the network, the port can be set as a dedicated terminal port. If a message that allows network access is subsequently received, the port can be changed to a visual network port.

[0089] The embodiments of the present application dynamically configure port attributes based on incoming network messages, eliminating the need to configure the router's port attributes, thus reducing the difficulty of configuration operations. Furthermore, for a video-linked access router, simply plugging a network cable or optical fiber into any port automatically deploys the service, and subsequent port changes will not affect service usage.

[0090] After obtaining the request message sent by the target terminal, step 102 is executed.

[0091] Step 102: According to the message type of the request message, configure the port attribute of the target port, where the target port is the port through which the target terminal accesses the router.

[0092] The message type is a classification identifier used to identify the protocol attributes or functional type of the request message. In the visual Internet, it is divided into V2V messages (messages using a dedicated protocol for the visual Internet) and non-V2V messages (such as TCP / IP messages).

[0093] The target port refers to the physical port to which the target terminal is connected when accessing the router.

[0094] Port attributes refer to the functional role identifier set by the router for the target port, which determines the port's message processing method and transmission path. For example, in the visual networking scenario, port attributes include business ports (processing non-V2V messages and participating in Layer 2 forwarding instances) and dedicated terminal ports (processing only V2V messages).

[0095] After obtaining the request message sent by the target terminal, the message type corresponding to the request message can be obtained, and the port attributes of the target port can be configured according to the message type of the request message. Figure 4 A detailed description is given below.

[0096] Reference Figure 4 , shows a flow chart of the steps of a port attribute configuration method provided by an embodiment of the present application. Figure 4 As shown, the port attribute configuration method may include: step 401 and step 402.

[0097] Step 401: When the message type is the first message type, the port attribute of the target port is configured as a dedicated terminal port.

[0098] In this embodiment, the first message type refers to a message type that matches the target network. For example, if the target network is a visual network, the first message type is a V2V message type.

[0099] When the message type of the request message is the first message type, the port attribute of the target port may be configured as a dedicated terminal port.

[0100] Step 402: When the message type is the second message type, configure the port attribute of the target port as a service port, and add the target port to a target forwarding instance.

[0101] The second message type refers to a message type that does not match the target network. For example, if the target network is a visual network, the second message type is a non-V2V message type.

[0102] A target forwarding instance is a logical grouping mechanism used in routers to manage packet forwarding policies. Its core function is to aggregate ports with the same forwarding requirements (such as service ports and tunnel interfaces) into a whole, implementing Layer 2 switching or cross-network transmission through unified rules.

[0103] When the message type of the request message is the second message type, the port attribute of the target port may be configured as a service port, and the target port may be added to the target forwarding instance.

[0104] The embodiment of the present application configures the port attributes of the terminal access port according to the message type, eliminating the need for site engineers to configure each port of the router, reducing the workload of port configuration, and enabling the router to be used without configuration, achieving the purpose of plug-and-play.

[0105] After the port attributes of the target port are configured according to the message type of the request message, step 103 is executed.

[0106] Step 103: Transmitting the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute, where the network terminal is the terminal in the target network that requests the target terminal to establish a service.

[0107] The network terminal may be a terminal that requests to establish a service for a target terminal in a target network.

[0108] After configuring the port attribute of the target port according to the message type of the request message, the request message can be transmitted to the target terminal of the target network according to the message transmission path corresponding to the port attribute of the target port to establish the service between the target terminal and the network terminal. Figure 5 A detailed description is given below.

[0109] Reference Figure 5 , shows a flowchart of another message transmission method provided by an embodiment of the present application. Figure 5 As shown, the message transmission method may include: step 501, step 502 and step 503.

[0110] Step 501: When the port attribute of the target port is a dedicated terminal port, the request message is sent to the network terminal of the target network through the target network port.

[0111] In this embodiment, if the port attribute of the target port is a dedicated terminal port, the request message can be sent to the network terminal of the target network through the target network port. For example, the target network is the visual network, and the target network port is the visual network port. In this case, the visual network access router can forward the request message to the visual network through the visual network port. The V2V terminal connected to the visual network (i.e., the network terminal in this embodiment) responds to the request and sends a response message to the visual network port of the visual network access router. The router forwards the response message to the target terminal through the dedicated terminal port, thus establishing the target terminal service.

[0112] Step 502: When the port attribute of the target port is a service port, tunnel encapsulate the request message using the target network protocol according to the first message type to obtain an encapsulated message.

[0113] In the case that the port attribute of the target port is a service port, the request message may be tunnel-encapsulated using the target network protocol according to the first message type to obtain an encapsulated message.

[0114] After tunnel encapsulation of the target network protocol is performed on the request message according to the first message type to obtain an encapsulated message, step 503 is executed.

[0115] Step 503: Transmit the encapsulated message to the aggregation router through the network tunnel in the target forwarding instance, so that the aggregation router forwards the request message to the network terminal.

[0116] The network tunnel refers to the network transmission tunnel established in advance between the router and the aggregation router. The process of establishing the network tunnel will be combined with the following embodiments. Figure 3The present embodiment will be described in detail and will not be described in detail here.

[0117] After obtaining the encapsulated message, the encapsulated message can be transmitted to the aggregation router through the network tunnel in the target forwarding instance, so that the aggregation router can forward the request message to the network terminal. For example, the target network is the visual network, the network tunnel is the visual network tunnel, the aggregation router is the visual aggregation router, and the target forwarding instance is the Layer 2 forwarding instance. After the visual access router receives the non-V2V request message sent by the target terminal, it can encapsulate the message in a V2V tunnel and pass it to the visual aggregation router. After the visual aggregation router decapsulates it, it sends it to the network terminal of the visual network through the service port, so that services can communicate with each other.

[0118] The embodiment of the present application constructs a dual-track transmission mechanism of "visual native service high-speed channel + IP service tunnel conversion" through the linkage of port attributes and forwarding instances. Its core technical effects are reflected in three aspects: heterogeneous protocol fusion capability, dynamic resource scheduling efficiency, and network architecture flexibility. It is particularly suitable for complex scenarios where visual network and traditional IP network coexist, and provides a lightweight and highly reliable solution for unified carrying of multiple services.

[0119] Next, combine Figure 3 Describe in detail the process of establishing a network tunnel.

[0120] Step 301: After accessing the target network, obtain a tunnel establishment request message sent by a convergence router.

[0121] In this embodiment, after the router accesses the target network, it can obtain the tunnel establishment request message sent by the aggregation router. For example, in the case of the target network, after the Vision Link access router accesses the network, it will receive the tunnel establishment request message from the Vision Link aggregation router.

[0122] After obtaining the tunnel establishment request message sent by the aggregation router, step 302 is executed.

[0123] Step 302: Parse the tunnel establishment request message to obtain tunnel establishment parameters.

[0124] After receiving the tunnel establishment request message sent by the aggregation router, the tunnel establishment request message can be parsed to obtain tunnel establishment parameters, such as tunnel type: Layer 2 tunnel or Layer 3 tunnel, peer link address: the unique link identifier of the aggregation router (such as VID = 1001:2001), and encapsulation protocol: the unique link encapsulation format (such as V2V encapsulation, including the MAC address transparent transmission field).

[0125] Step 303: Based on the tunnel establishment parameters, establish a network tunnel with the aggregation router, and add the network tunnel to the target forwarding instance.

[0126] After the tunnel establishment parameters are obtained through parsing, a network tunnel may be established with the aggregation router based on the tunnel establishment parameters, and the network tunnel may be added to the target forwarding instance.

[0127] By constructing a network tunnel between a router and an aggregation router, the embodiment of the present application can decouple tunnel configuration from forwarding control, and realize centralized scheduling of tunnel resources through forwarding instances, thereby providing a standardized solution for the large-scale expansion of visual network and heterogeneous service carrying.

[0128] Next, combine Figure 6 The implementation process of the port aging timeout mechanism is described in detail.

[0129] Reference Figure 6 , shows a flow chart of the steps of a method for canceling port attribute configuration provided by an embodiment of the present application. Figure 6 As shown, the port attribute unconfiguration method may include: step 601 and step 602.

[0130] Step 601: Detect whether the target port receives a service message matching the port attribute within a preset time period.

[0131] In this embodiment, after receiving a request message through the target port, it is possible to detect whether the target port has received a service message matching the port attributes within a preset time period (which is a predefined value, such as 1 minute or 3 minutes). Specifically, after receiving the request message sent through the target port, a timer is started to detect whether a service message matching the port attributes is received through the target port within the preset time period.

[0132] Step 602: If the service message is not detected, cancel the configuration of the port attribute of the target port.

[0133] If no service packets are detected from the target port within a preset time, the port attribute configuration of the target port can be canceled. That is, an aging timeout mechanism can be activated for the target port with configured port attributes. If the port does not receive packets with corresponding characteristics for a period of time, the port configuration will be removed.

[0134] The embodiment of the present application sets a port aging timeout mechanism. If no corresponding characteristic message is received within a period of time, the port attribute is changed to the default value (i.e., the configuration of the port attribute is canceled). In this way, plug-and-play of the service can be achieved, and the port can be re-adapted after switching.

[0135] Next, combine Figure 7 Taking the visual network as an example, the automatic deployment process of the visual network router is described in detail. Figure 7 As shown, the video link architecture may include: a video link access router and a video link aggregation router.

[0136] Among them, the visual access router is a key node device in the visual network that is responsible for terminal device access and basic data processing. It is mainly deployed at the edge of the network to connect terminal devices (such as PCs, V2V terminals, etc.) with the visual network core network. Its core function is to realize the network access management, port attribute configuration and preliminary processing of data packets of terminal devices. For example, when the terminal device is connected to the port of the visual access router through optical fiber or network cable, the router will capture the message received by the port, set the port to the visual port according to the network access message of the visual server, and start the network access process. In business interaction, it will set the port connected to the terminal as a business port or a dedicated terminal port, and perform V2V tunnel encapsulation on non-V2V messages to realize the communication connection between the terminal and other devices in the visual network. It is the "entry gateway" for terminal devices to access the visual network.

[0137] The visual aggregation router is an aggregation node device located between the access layer and the core layer in the visual network. It is mainly used to aggregate the traffic of multiple visual access routers and perform data forwarding, decapsulation and other processing. It plays a connecting role in the visual network. On the one hand, it receives the encapsulated messages transmitted by the visual access router, decapsulates them, restores the original data, and then forwards them to the target device (such as Server1). On the other hand, it also sends a tunnel establishment request message to the visual access router to promote the establishment of a communication tunnel to build a communication link within the visual network. The visual aggregation router focuses more on the aggregation of network traffic, tunnel management, and data forwarding and scheduling between different network layers. It is the "hub node" for realizing data interaction between the access layer and the core layer in the visual network.

[0138] The Vision aggregation router is located in the core position and is manually configured. The tunnel between it and the Vision access router is configured in advance and is configured as the calling end.

[0139] The processing flow of the video link access router can be as follows:

[0140] 1. Insert an optical fiber or network cable into the port of the VisionLink access router. After the port successfully establishes a link connection, it starts to capture all packets received by the port.

[0141] 2. After the port is connected to the video network, the video server will send a network access message to the router. After receiving this message, the video access router will set this port as the video port and start the network access process of the router.

[0142] 3. After the device is connected to the network, it will receive a tunnel establishment request message from the VisionLink aggregation router, accept the request message, establish the corresponding tunnel according to the parameters of the request message, and add the tunnel to the Layer 2 forwarding instance.

[0143] 4. PC1 (or PC2, PC1 is used in this example) sends a request to establish a service with Server1. The Vision access router receives the non-v2v message from PC1 and configures the port connected to PC1 as a service port, adding it to a Layer 2 forwarding instance. A Layer 2 forwarding instance is a mechanism or environment for implementing data forwarding at the data link layer. When a device joins the network, a tunnel is established based on the tunnel establishment request message from the Vision aggregation router and added to the Layer 2 forwarding instance. This places the tunnel within a specific Layer 2 forwarding environment, where data is processed and transmitted according to Layer 2 forwarding rules. When PC1 sends a service request, the Vision access router configures the port connected to PC1 as a service port and adds it to the Layer 2 forwarding instance. This ensures that data related to that port is forwarded according to the corresponding rules within this specific Layer 2 forwarding instance, enabling Layer 2 communication and data exchange between PC1 and Server1. In general, a Layer 2 forwarding instance defines a set of processes, rules, and configurations for forwarding data frames at the data link layer, ensuring accurate and efficient data transmission between devices at the Layer 2 level.

[0144] 5. The Vision access router encapsulates the packet in a V2V tunnel and passes it to the Vision aggregation router. The Vision aggregation router decapsulates the packet and sends it to Server 1 through service port 1. This allows services to communicate with each other.

[0145] 6. The v2v terminal sends a service request to other v2v terminals. When the visual access router receives the v2v message sent by the terminal, it sets the port as a dedicated terminal port and forwards the message to the visual network through the visual network port. The v2v terminal under the visual network responds to the request and sends a response message to the visual port of the visual access router. The router forwards the response message to the v2v terminal through the dedicated terminal port, so that the v2v terminal service can be established.

[0146] Next, combine Figure 7 The process of configuring the port attributes of the video link access router to the video network is described in detail.

[0147] like Figure 7As shown in the figure, after the port of the video link access router receives a message, it can determine whether the message is a v2v message. If it is not a v2v message (i.e., a non-v2v message), it means that the port is the port for receiving messages from the access terminal. The port can be set as a service port and added to the Layer 2 forwarding instance.

[0148] If the message received by the port is a v2v message, it can be determined whether the message is an incoming message, and whether the video link access router can use the destination MAC of the message to access the network.

[0149] When the video access router receives the v2v network entry message sent by the video network, it can determine that this port should be the video network port. When it receives the v2v message (i.e., non-network entry message) sent by the video network, this port is a dedicated terminal port.

[0150] When the video link port receives the tunnel establishment request message sent by the video link aggregation router, it accepts the request, establishes the tunnel, and adds the tunnel to the Layer 2 forwarding instance.

[0151] In the above solution, if the port that physically connects the video link access router to the video network is a dedicated terminal port, it means that the video link access router is not allowed to access the video network, and there is no need to perform the subsequent port attribute setting process.

[0152] The message transmission method provided in the embodiment of the present application obtains the request message sent by the target terminal after accessing the target network. According to the message type of the request message, the port attribute of the target port is configured, and the target port is the port through which the target terminal accesses the router. According to the message transmission path corresponding to the port attribute, the request message is transmitted to the network terminal of the target network, and the network terminal is the terminal through which the target terminal in the target network requests to establish a service. The embodiment of the present application configures the port attribute of the target terminal accessing the router in combination with the message type of the target network, so as to transmit the message according to the message transmission path corresponding to the port attribute, so that the message can still be transmitted without configuring the port of the router, thereby achieving the purpose of plug-and-play of the router.

[0153] It should be noted that for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the order of the actions described, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.

[0154] Reference Figure 9, shows a schematic structural diagram of a message transmission device provided by an embodiment of the present application, which can be applied to a router. Figure 9 As shown, the message transmission device 900 may include the following modules:

[0155] The request message acquisition module 910 is used to obtain the request message sent by the target terminal after accessing the target network;

[0156] A port attribute configuration module 920 is configured to configure the port attribute of a target port according to the message type of the request message, where the target port is the port through which the target terminal accesses the router;

[0157] The request message transmission module 930 is configured to transmit the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute, where the network terminal is the terminal in the target network that requests the target terminal to establish a service.

[0158] Optionally, the device further comprises:

[0159] An establishment request acquisition module, configured to acquire a tunnel establishment request message sent by a convergence router after accessing the target network;

[0160] A tunnel parameter acquisition module, configured to parse the tunnel establishment request message to obtain tunnel establishment parameters;

[0161] The network tunnel establishing module is used to establish a network tunnel with the aggregation router based on the tunnel establishing parameters, and add the network tunnel to the target forwarding instance.

[0162] Optionally, the port attribute configuration module includes:

[0163] a dedicated port configuration unit, configured to configure the port attribute of the target port as a dedicated terminal port when the message type is the first message type;

[0164] a service port configuration unit, configured to, when the message type is the second message type, configure the port attribute of the target port as a service port, and add the target port to a target forwarding instance;

[0165] The first message type refers to a message type that matches the target network, and the second message type refers to a message type that does not match the target network.

[0166] Optionally, the request message transmission module includes:

[0167] The first message transmission unit is configured to send the request message to the network terminal of the target network through the target network port when the port attribute of the target port is a dedicated terminal port.

[0168] Optionally, the request message transmission module includes:

[0169] a request message encapsulation unit, configured to, when the port attribute of the target port is a service port, perform tunnel encapsulation of the request message using a target network protocol according to the first message type to obtain an encapsulated message;

[0170] The second message transmission unit is configured to transmit the encapsulated message to the aggregation router through the network tunnel in the target forwarding instance, so that the aggregation router forwards the request message to the network terminal.

[0171] Optionally, the device further comprises:

[0172] A service message detection module, configured to detect whether the target port receives a service message matching the port attribute within a preset time period;

[0173] The port configuration canceling module is used to cancel the configuration of the port attribute of the target port when the service message is not detected.

[0174] Optionally, the device further comprises:

[0175] A network entry message receiving module, configured to receive a network entry message sent by a server of the target network;

[0176] A network address acquisition module, configured to parse the incoming message and obtain the network address for accessing the target network;

[0177] The target port configuration module is used to access the target network based on the network address and configure the port attribute of the port between the target network and the target network as the target network port.

[0178] The message transmission device provided in the embodiment of the present application obtains the request message sent by the target terminal after accessing the target network. According to the message type of the request message, the port attribute of the target port is configured, and the target port is the port through which the target terminal accesses the router. According to the message transmission path corresponding to the port attribute, the request message is transmitted to the network terminal of the target network, and the network terminal is the terminal through which the target terminal in the target network requests to establish a service. The embodiment of the present application configures the port attribute of the target terminal accessing the router in combination with the message type of the target network, so as to transmit the message according to the message transmission path corresponding to the port attribute, so that the message can still be transmitted without configuring the port of the router, thereby achieving the purpose of plug-and-play of the router.

[0179] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0180] In an embodiment of the present application, an electronic device is further provided. The electronic device may include one or more processors and one or more machine-readable media storing instructions, such as application programs. When the instructions are executed by the one or more processors, the processors perform any of the above-described message transmission methods.

[0181] In an embodiment of the present application, a non-transitory computer-readable storage medium is further provided, on which a computer program is stored. The program can be executed by a processor of an electronic device to implement any of the above-mentioned message transmission methods. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0182] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0183] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0184] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0185] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0186] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0187] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0188] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0189] The above is a detailed introduction to the message transmission method, device, electronic device and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A message transmission method, applied to a router, characterized in that: The method comprises: After accessing the target network, obtain the request message sent by the target terminal; According to the message type of the request message, configure the port attribute of the target port, where the target port is the port through which the target terminal accesses the router; The request message is transmitted to a network terminal of the target network according to a message transmission path corresponding to the port attribute, where the network terminal is a terminal in the target network for which the target terminal requests to establish a service.

2. The method according to claim 1, characterized in that The method further comprises: After accessing the target network, obtaining a tunnel establishment request message sent by the aggregation router; Parsing the tunnel establishment request message to obtain tunnel establishment parameters; A network tunnel is established with the aggregation router based on the tunnel establishment parameters, and the network tunnel is added to the target forwarding instance.

3. The method according to claim 1, characterized in that The configuring the port attribute of the target port according to the message type of the request message includes: When the message type is the first message type, configuring the port attribute of the target port as a dedicated terminal port; When the message type is the second message type, configuring the port attribute of the target port as a service port, and adding the target port to the target forwarding instance; The first message type refers to a message type that matches the target network, and the second message type refers to a message type that does not match the target network.

4. The method according to claim 3, characterized in that The transmitting the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute includes: In a case where the port attribute of the target port is a dedicated terminal port, the request message is sent to the network terminal of the target network through the target network port.

5. The method according to claim 3, characterized in that The transmitting the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute includes: When the port attribute of the target port is a service port, performing tunnel encapsulation of the target network protocol on the request message according to the first message type to obtain an encapsulated message; The encapsulated message is transmitted to the aggregation router through the network tunnel in the target forwarding instance, so that the aggregation router forwards the request message to the network terminal.

6. The method according to claim 1, characterized in that After transmitting the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute, the method further includes: Detecting whether the target port receives a service message matching the port attribute within a preset time period; In the case where the service message is not detected, the configuration of the port attribute of the target port is cancelled.

7. The method according to claim 4, characterized in that The method further comprises: Receiving a network entry message sent by a server of the target network; Parsing the incoming message to obtain the network address for accessing the target network; The target network is accessed based on the network address, and a port attribute of a port between the target network and the target network is configured as a target network port.

8. A message transmission device, applied to a router, characterized in that: The device comprises: A request message acquisition module is used to obtain the request message sent by the target terminal after accessing the target network; A port attribute configuration module, configured to configure the port attribute of a target port according to the message type of the request message, wherein the target port is the port through which the target terminal accesses the router; The request message transmission module is used to transmit the request message to the network terminal of the target network according to the message transmission path corresponding to the port attribute, and the network terminal is the terminal in the target network that the target terminal requests to establish a service.

9. An electronic device, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to perform the message transmission method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer program stored therein enables the processor to execute the message transmission method according to any one of claims 1 to 7.