Interaction method based on routing device, routing device, routing apparatus and storage medium

By introducing proxy modules into the routing device, the networking requests of routing devices are managed uniformly, and networking failures caused by inconsistent communication protocols between routers are solved, and efficient interaction and networking of different types of routing devices are achieved.

CN115913880BActive Publication Date: 2025-08-12BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211405497.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-10
Publication Date
2025-08-12
Estimated Expiration
2042-11-10

AI Technical Summary

Technical Problem

In the prior art, the mesh networking failure occurs due to inconsistent communication protocols between routers, affecting the user experience.

Method used

By introducing a proxy module into the routing device, receiving network permission requests for network request events, determining whether relevant operations are allowed, including checking device role requirements and status, supporting communication protocols, synchronous configuration, etc., to achieve unified management and compatibility with different types of routing devices.

Benefits of technology

It improves the interaction efficiency between routing devices, ensures that routing devices with different communication protocols and implementation methods can successfully form a network and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115913880B_ABST
    Figure CN115913880B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an interaction method based on a routing device, a routing device, a routing apparatus, and a storage medium. The interaction method based on the routing device, wherein the routing device includes a proxy module, and the interaction method includes: the proxy module receives a networking permission request for a networking request event sent by the routing device with other routing devices; wherein the networking request event includes a networking request event for networking with the routing device by other routing devices; based on the networking permission request, the proxy module determines whether to allow the routing device to perform operations related to the networking request event; if the proxy module determines that the routing device is allowed to perform operations related to the networking request event, the routing device is instructed to perform operations related to the networking request event. The interaction method in the present disclosure realizes unified management during the interaction process between the routing device and other routing devices, thereby improving the efficiency of the interaction. At the same time, it can be adapted to different types of interactive services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of router networking, and in particular to an interaction method based on a routing device, a routing device, a routing apparatus, and a storage medium. Background Art

[0002] With the widespread use of routers, the demand for mesh networking capabilities between routers is increasing. Conventional router mesh networking is implemented through various communication protocols. For example, mesh networking can be achieved using well-known protocols, local area networks, or customized communication protocols.

[0003] Therefore, during the mesh networking process of the router, there is a problem of mesh networking failure due to the incompatibility of multiple communication protocols, which seriously affects the user experience. Summary of the Invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides an interaction method based on a routing device, a routing device, a routing apparatus and a storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an interaction method based on a routing device, the routing device including an agent module, the interaction method comprising:

[0006] The proxy module receives a networking permission request for a networking request event with other routing devices sent by the routing device; wherein the networking request event includes a networking request event for the other routing devices to network with the routing device;

[0007] According to the networking permission request, the proxy module determines whether to allow the routing device to perform operations related to the networking request event;

[0008] If the proxy module determines that the routing device is allowed to perform the operation related to the networking request event, the proxy module instructs the routing device to perform the operation related to the networking request event.

[0009] In an exemplary embodiment, based on the networking permission request, the proxy module determines whether to allow the routing device to perform an operation related to the networking request event:

[0010] According to the networking permission request, the proxy module determines whether the routing device meets the role requirements corresponding to the networking request event and the routing device is in a preset state;

[0011] If the proxy module determines that the routing device meets the role requirements corresponding to the networking request event and the routing device processes a preset state, the proxy module determines to allow the routing device to perform operations related to the networking request event.

[0012] In an exemplary embodiment, the agent module determines whether the routing device meets the role requirement corresponding to the networking request event, including:

[0013] The proxy module determines whether the communication protocols supported by the routing device include the communication protocol required in the networking request event;

[0014] If the communication protocols supported by the routing device include the communication protocol required in the networking request event, it is determined that the routing device meets the role requirements.

[0015] In an exemplary embodiment, the method further comprises:

[0016] The proxy module receives a synchronization configuration permission request; the synchronization configuration permission request includes a request to confirm whether the routing device meets the processing requirements for performing synchronization configuration of networking other routing devices;

[0017] If the synchronization configuration corresponding to the synchronization configuration permission request belongs to the synchronization configuration under the current networking request event and the synchronization configuration has not been processed, it is determined that the routing device meets the processing requirements for executing the synchronization configuration.

[0018] In an exemplary embodiment, the interaction method further includes:

[0019] The proxy module receives a synchronization configuration response of the synchronization configuration sent by the routing device;

[0020] The proxy module sets the state of the routing device according to the synchronization configuration response.

[0021] In an exemplary embodiment, the agent module setting the state of the routing device according to the synchronization configuration response includes:

[0022] When the synchronization configuration response includes information that the networking configuration fails, the proxy module sets the state of the routing device to a ready state and instructs the routing device to end the operation corresponding to the synchronization configuration;

[0023] When the synchronization configuration response includes information that the networking configuration is successful, the proxy module sets the state of the routing device to a ready state, and instructs the routing device to send a response message indicating that the synchronization configuration is successful to other routing devices.

[0024] In an exemplary embodiment, the interaction method further includes:

[0025] The identifier of the role of the routing device is set as the identifier of the networking device.

[0026] In an exemplary embodiment, the agent module determines whether the routing device meets the role requirement corresponding to the networking request event, including:

[0027] The proxy module determines whether the networking permission request includes response information based on the networking request event sent by the other routing device, and whether the routing device needs to perform networking;

[0028] If the networking permission request includes response information based on the networking request event sent by the other routing device and the routing device needs to perform networking, it is determined that the routing device meets the role requirements.

[0029] In an exemplary embodiment, the interaction method further includes:

[0030] The identifier of the role of the routing device is set as the identifier of the device to be networked.

[0031] In an exemplary embodiment, the preset state includes a ready state.

[0032] In an exemplary embodiment, the interaction method further includes:

[0033] The proxy module detects whether the operation related to the networking request event has timed out;

[0034] If it times out, the routing device is set to a ready state.

[0035] In an exemplary embodiment, the interaction method further includes:

[0036] The proxy module receives the networking permission request in a queue manner.

[0037] In an exemplary embodiment, the interaction method further includes:

[0038] The proxy module forwards the networking permission request to a corresponding queue according to the priority of the networking permission request.

[0039] In an exemplary embodiment, the initial role identifier of the routing device is a master device role identifier.

[0040] According to a second aspect of an embodiment of the present disclosure, a routing device is provided, the routing device including a proxy module, the proxy module being configured to:

[0041] Receiving a networking permission request for a networking request event with another routing device sent by the routing device; wherein the networking request event includes a networking request event for the other routing device to network with the routing device;

[0042] Determining, based on the networking permission request, whether to allow the routing device to perform operations related to the networking request event;

[0043] If the proxy module determines that the routing device is allowed to perform the operation related to the networking request event, the proxy module instructs the routing device to perform the operation related to the networking request event.

[0044] According to a third aspect of an embodiment of the present disclosure, a routing device is provided, including:

[0045] processor;

[0046] a memory for storing processor-executable instructions;

[0047] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.

[0048] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, which, when instructions in the storage medium are executed by a processor of a device, enables the device to execute the method described in the first aspect of the embodiment of the present disclosure.

[0049] The method disclosed herein has the following beneficial effects: the proxy module in the routing device implements unified management of the interaction between the routing device and other routing devices, improving interaction efficiency. This method also maintains the original design and architecture of the routing device and can adapt to different types of interactive services.

[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0052] Figure 1 is a flowchart showing an interaction method based on a routing device according to an exemplary embodiment;

[0053] Figure 2 is a structural block diagram of a routing device according to an exemplary embodiment;

[0054] Figure 3is a schematic diagram showing an interaction method based on a routing device according to an exemplary embodiment;

[0055] Figure 4 is a schematic diagram showing an interaction method based on a routing device according to an exemplary embodiment;

[0056] Figure 5 is a timing diagram of wired networking according to an exemplary embodiment;

[0057] Figure 6 is a timing diagram of wireless networking according to an exemplary embodiment;

[0058] Figure 7 is a target networking timing diagram according to an exemplary embodiment;

[0059] Figure 8 The present invention is a block diagram showing a device for executing a method for interacting based on a routing device according to an exemplary embodiment. DETAILED DESCRIPTION

[0060] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.

[0061] In an exemplary embodiment of the present disclosure, to overcome the problems in the prior art, a method for interaction based on a routing device is provided. The routing device includes a proxy module that receives networking permission requests sent by the routing device in connection with networking request events with other routing devices, wherein the networking request events include networking request events for other routing devices to network with the routing device. Based on the networking permission requests, the proxy module determines whether the routing device is allowed to perform operations related to the networking request events. If the operations related to the networking request events are allowed, the proxy module instructs the routing device to perform operations related to the registration request. By uniformly managing the interaction process with other routing devices through the proxy module of the routing device, the efficiency of interaction can be improved, and networking interoperability between routing devices with different communication protocols, different implementation methods, and different release versions can be achieved.

[0062] In the exemplary embodiment of the present disclosure, Figure 1 is a flow chart showing an interactive method based on a routing device according to an exemplary embodiment. Figure 1 As shown, the interactive method includes the following steps:

[0063] Step S101: The proxy module receives a networking permission request for a networking request event with another routing device sent by a routing device; wherein the networking request event includes a networking request event for another routing device to network with the routing device;

[0064] Step S102: Based on the networking permission request, the proxy module determines whether to allow the routing device to perform operations related to the networking request event;

[0065] Step S103: If the proxy module determines that the routing device is allowed to perform operations related to the networking request event, the proxy module instructs the routing device to perform operations related to the networking request event.

[0066] In an exemplary embodiment of the present disclosure, Figure 2 is a structural block diagram of a routing device according to an exemplary embodiment. Figure 2 As shown, the routing device includes a user interface layer 201, a logic control layer 202 and a database layer 203. The user interface layer 201 is used to connect to the user management interface, the logic control layer 202 is used to manage the networking interaction of the routing device, and the database layer 203 stores relevant data of the routing device. Among them, the logic control layer 202 includes an agent module.

[0067] When a routing device interacts with other routing devices, including networking permission requests for networking-related events initiated by the routing device itself and networking permission requests for networking-related events initiated by other routing devices, the routing device needs to send the networking permission requests for networking-related events to the proxy module. After receiving the networking permission requests for networking-related events, the proxy module determines whether to allow the routing device to perform operations related to the networking request events based on the networking permission requests. If the proxy module allows the routing device to perform operations related to the networking request events, it will instruct the routing device to perform operations related to the networking request events. If the routing device does not allow the routing device to perform operations related to the networking request events, it will terminate the networking permission request.

[0068] During mesh networking, different routing devices support different communication protocols. For example, some routing devices only support protocol A, some only support protocol B, and some support both protocols A and B. To facilitate identification of the supported protocols, routing devices supporting different protocols are identified separately during the networking process. For example, a routing device supporting only protocol A may be identified as meshA, a routing device supporting only protocol B may be identified as meshB, and a routing device supporting both protocols A and B may be identified as a mixmesh.

[0069] In an exemplary embodiment, in step S102, when the proxy module determines whether to allow the routing device to perform operations related to the networking request event based on the networking permission request, the proxy module determines whether the routing device meets the role requirements corresponding to the networking request event based on the networking permission request, and the routing device is in a preset state.

[0070] During interactions between routing devices, such as networking, routing devices can assume roles including master, slave, and undefined. The role of a routing device is determined by the type of interaction. When the routing device receives a networking permission request in a networking request event and supports all required communication protocols, the routing device can be set to master. When the routing device issues a networking permission request in a networking request event, the routing device can be set to slave. When the same interaction is initiated, the roles of all routing devices are in the undefined state. For example, when networking is initiated, all routing devices are in the undefined state. Once a role is determined within the same interaction, it cannot be directly switched, for example, between master and slave. Only after the interaction is completed do all routing devices switch to the undefined state. When a new interaction is initiated, the role of each routing device is redefined based on the interaction type.

[0071] The proxy module has three states: blocked, ready, running, and working. The initial state is blocked. After the routing device completes initialization, the proxy module enters the ready state. Upon receiving a networking permission request in a networking request event, it switches from the ready state to the running state. While in the running state, the proxy module no longer processes other networking permission requests. When executing a networking request event corresponding to a networking permission request in the running state, if the network request event fails, the proxy module sets the routing device's state to ready and instructs the routing device to terminate the operation corresponding to the networking request event. If the network request event succeeds, the proxy module sets the routing device's state to ready and instructs the routing device to send a successful network request event response message to other routing devices. After switching from the running state to the ready state, the proxy module resumes receiving networking permission requests. If resource preemption occurs in the running state due to a networking permission request event, the proxy module switches from the running state to the blocked state. If the network request event corresponding to the running state succeeds, the proxy module switches from the running state to the working state.

[0072] If the proxy module determines that the routing device meets the role requirements corresponding to the networking request event and the routing device processes the preset state, the proxy module determines that the routing device is allowed to perform operations related to the networking request event; if the routing device does not meet the role requirements corresponding to the networking request event, or the routing device is not in the preset state, operations related to the registration request event are not allowed to be performed.

[0073] In one embodiment, determining whether the routing device meets the role requirements corresponding to the networking request event includes the following two situations:

[0074] The first method is: the proxy module determines whether the communication protocols supported by the routing device include the communication protocols required in the networking request event.

[0075] If the communication protocols supported by the routing device include the communication protocols required in the networking request event, it is determined that the routing device meets the role requirements; if the communication protocols supported by the routing device do not include the communication protocols required in the networking request event, it is determined that the routing device does not meet the role requirements.

[0076] When the proxy module receives a networking permission request for a networking request event, it will parse the networking permission request. If the networking permission request includes a networking request event for networking with other routing devices, it will determine all the communication protocol types required in the networking request event. When the routing device supports all the communication protocols required in the networking request event, the proxy module determines that the routing device meets the role requirements. For example, if the networking permission request for the routing device to be networked that sends the networking request event supports communication protocol A, and the communication protocol type supported by the target network is communication protocol B, if the routing device that receives the networking request event supports both communication protocol A and communication protocol B, the proxy module determines that the routing device meets the role requirements and can set the role of the routing device to be the master device.

[0077] In one example, the proxy module receives a synchronization configuration permission request, wherein the synchronization configuration permission request includes a request to confirm whether the routing device meets processing requirements for performing synchronization configuration for networking other routing devices.

[0078] When a routing device executes multiple networking processes at the same time, there will be multiple networking request events. If the synchronization configuration corresponding to the synchronization configuration permission request belongs to the synchronization configuration under the current networking request event and the synchronization configuration has not been processed, it is determined that the routing device meets the processing requirements for executing the synchronization configuration.

[0079] In one example, the proxy module receives a synchronization configuration response of the synchronization configuration sent by the routing device, and according to the synchronization configuration response, the proxy module sets the state of the routing device.

[0080] After the operation related to the synchronization configuration permission request is executed, the synchronization configuration response is used to represent the operation result corresponding to the synchronization configuration. The routing device sends the synchronization configuration response to the proxy module. After receiving the synchronization configuration response, the proxy module sets the status of the routing device according to the synchronization configuration response.

[0081] For example, when the synchronization configuration response includes information that the network configuration failed, the proxy module sets the state of the routing device to the ready state and instructs the routing device to end the operation corresponding to the synchronization configuration request; when the synchronization configuration response includes information that the network configuration was successful, the proxy module sets the state of the routing device to the ready state and instructs the routing device to send a response message of successful synchronization configuration to other routing devices.

[0082] In one example, when the routing device is a master device, the routing device may further include a first receiving module and a first sending module. Figure 3 is a schematic diagram showing an interactive method based on a routing device according to an exemplary embodiment. Figure 3 As shown, the interaction process with the routing device to be networked includes the following steps:

[0083] Step S301: receiving, by a first receiving module, a first request message of a networking request event of a routing device to be networked;

[0084] Step S302: The first receiving module initiates a first registration request for a networking request event to the proxy module;

[0085] Step S303: The proxy module sends the interaction information corresponding to the first registration request to the target network according to the first registration request, so as to complete the processing of the networking request event corresponding to the first registration request;

[0086] Step S304: The first receiving module receives a networking response to the networking request event sent by the target network;

[0087] Step S305: The first receiving module sends the target network's networking response to the proxy module;

[0088] Step S306: The proxy module generates a first response message according to the networking response;

[0089] Step S307: The proxy module sends the first response message to the first sending module;

[0090] Step S308: The first sending module sends the first response message to the routing device to be networked;

[0091] Step S309: the routing device to be networked and the routing device perform operations related to the networking request event.

[0092] When the routing device is the master device and the routing device to be networked is the slave device, when interacting with the routing device to be networked, the routing device to be networked sends a first request message for a networking request event. After receiving the first request message, the first receiving module in the master device initiates a first registration request for the networking request event to the proxy module of the master device. The proxy module sends the interaction information corresponding to the first registration request to the target network based on the first registration request to complete the processing of the networking request event corresponding to the first registration request. The first receiving module receives the networking response related to the networking request event sent by the target network, and sends the networking response to the proxy module. The received networking response of the target network can be a response of successful networking or a response of failed networking. The proxy module generates a first response message based on the networking response, and sends the first response message to the first sending module. The first sending module receives the first response message and sends the first response message to the routing device to be networked, so that the routing device to be networked completes the corresponding operation related to the networking request event with the master device based on the first response message.

[0093] It should be noted that when the communication protocol supported by the routing device to be networked is different from the protocol supported by the target network, the proxy module converts the interactive information interacting with the target network into interactive information corresponding to the communication protocol supported by the target network when processing the networking request event corresponding to the first registration request; when the proxy module generates the first response message, the first response message is the first response message corresponding to the communication protocol supported by the routing device to be networked.

[0094] For example, after receiving the first request message of a networking request event from a routing device to be networked (a slave device), the master device parses and determines that the communication protocol type supported by the routing device to be networked is communication protocol A, and the communication protocol type supported by the target network is communication protocol B. The master device converts the first request message into interaction information corresponding to communication protocol B supported by the target network, and sends the interaction information to the target network to establish a connection between the routing device to be networked and the target network. After receiving the corresponding networking response from the target network, the master device converts the networking response into a first response message corresponding to communication protocol A supported by the routing device to be networked, and sends the first response message to the routing device to be networked, completing the connection with the target network.

[0095] In one example, the identifier of the role of the routing device is set as the identifier of the networking device.

[0096] To facilitate the distinction between routing device roles, routing devices of different roles are identified. For example, the role identifier of the routing device can be set as the networking device identifier. The routing device in the master role is identified as the master role identifier. Since the master device can support multiple communication protocols, its representation can be set to, for example, mixmesh. The routing device in the slave role is identified as the slave role device identifier. If the slave device only supports a certain communication protocol, such as communication protocol A, the slave device identifier can be set to, for example, meshA. This can identify both the role of the device and the type of communication protocol that the device can support.

[0097] In an exemplary embodiment of the present disclosure, the initial role identifier of the routing device is a master device role identifier, such as mixmesh. When the routing device is determined to be a master device, there is no need to modify the role identifier.

[0098] The second method: the proxy module determines whether the networking permission request includes response information based on the networking request event sent by other routing devices and whether the routing device needs to perform networking.

[0099] If the networking permission request includes response information based on the networking request event sent by other routing devices and the routing device needs to perform networking, it is determined that the routing device meets the role requirements; if the networking permission request includes response information based on the networking request event sent by other routing devices, but the routing device does not need to perform networking, it is determined that the routing device does not meet the role requirements.

[0100] When the proxy module receives a networking permission request for a networking request event, it parses the networking permission request. If the networking permission request includes response information based on the networking request event sent by other routing devices, it determines whether the routing device needs to be networked. When the routing device needs to be networked, the proxy module determines that the routing device meets the role requirements, and then the role of the routing device can be set to a slave device.

[0101] In one example, when the routing device is a slave device, the routing device may further include a second receiving module and a second sending module. Figure 4 is a schematic diagram showing an interactive method based on a routing device according to an exemplary embodiment. Figure 4 As shown, the interaction process with the routing device to be networked includes the following steps:

[0102] Step S401: Sending a second registration request of a networking request event to an agent module via a second sending module;

[0103] Step S402: The proxy module completes the networking request event processing corresponding to the second registration request according to the second registration request, generates a second request message, and sends the second request message to the second sending module;

[0104] Step S403: The second sending module sends a second request message to the master device;

[0105] Step S404: The second receiving module receives a second response message based on the second request message from the master device;

[0106] Step S405: The second receiving module sends the second response message to the proxy module;

[0107] Step S406: The proxy module executes operations related to the networking request event.

[0108] When the routing device is a slave device, that is, a routing device to be networked, when interacting with the master device, the slave device needs to send a request message for a networking request event. Before sending the request message, the slave device first sends a registration request to the proxy module of the slave device, and then sends the request message for the networking request event after the proxy module authorizes the registration. The second sending module of the slave device sends the second registration request for the networking request event to the proxy module of the slave device. The proxy module completes the networking request event processing corresponding to the second registration request according to the second registration request, generates a second request message, and sends the second request message to the second sending module. The second sending module sends the second request message to the master device. After the master device processes the networking request event according to the second request message, it sends a corresponding second response message to the slave device. The second receiving module of the slave device receives the second response message based on the second request message, and sends the second response message to the slave device, so that the slave device completes the corresponding networking request event. The way the second sending module sends the second request message to the master device can be any feasible way, for example, it can be sent in a broadcast manner.

[0109] In one example, the identifier of the role of the routing device is set as the identifier of the networking device.

[0110] To facilitate the distinction between routing device roles, routing devices of different roles are identified. For example, the role identifier of the routing device can be set as the networking device identifier. The routing device in the master role is identified as the master role identifier. Since the master device can support multiple communication protocols, its representation can be set to, for example, mixmesh. The routing device in the slave role is identified as the slave role device identifier. If the slave device only supports a certain communication protocol, such as communication protocol A, the slave device identifier can be set to, for example, meshA. This can identify both the role of the device and the type of communication protocol that the device can support.

[0111] In an exemplary embodiment of the present disclosure, the initial role identifier of the routing device is a master device role identifier, such as mixmesh. When the routing device is determined to be a slave device, the initial role identifier is modified to a slave device identifier.

[0112] In one embodiment, when determining whether the routing device is in a preset state, the preset state is a ready state, and determining whether the routing device is in the ready state.

[0113] In an exemplary embodiment, the proxy module detects whether an operation related to the networking request event has timed out; if so, the proxy module sets the routing device to a ready state.

[0114] When the proxy module is processing a networking request event, if it detects that the operation related to the networking request event has timed out, it means that the networking request event no longer needs to be processed. At this time, the next networking request event can be processed. Therefore, the routing device is set to the ready state to receive the networking permission request for the next networking request event.

[0115] In an exemplary embodiment, the proxy module accepts networking permission requests in a queue manner.

[0116] When the proxy module receives a request for network permission, it creates a request message queue and starts a thread to receive and process the request messages to ensure orderly processing of the interaction-related requests. When receiving and sending request messages, the request messages are forwarded to the proxy module via inter-process communication. A dedicated thread receives and processes the request messages, without blocking the main process.

[0117] In an exemplary embodiment, the proxy module forwards the registration request to a corresponding queue according to the priority of the registration request.

[0118] Network permission requests are prioritized through a thread pool. Multiple hierarchical queues are set up within the thread pool, each with its own execution permission priority. The proxy module processes network permission requests sequentially, starting with the highest-priority queue. A timestamp is recorded when a network permission request is added to the queue. If the task remains unprocessed after a period of time, it is placed in a higher-priority queue, hoping for faster processing. The proxy module is in the ready state when no network permission requests are received. Upon receiving a network permission request, the proxy module switches to the running state and begins processing the request. To prevent a herd effect, mutual exclusion and counting are implemented to prevent duplicate interactive requests and avoid meaningless network permission requests. The number of network permission requests can be dynamically adjusted based on business model changes. When the number of requests surges, new threads are dynamically created. When the number of tasks decreases, unnecessary threads are destroyed to free up resources.

[0119] The implementation of a thread pool improves the concurrent / parallel processing capabilities of the proxy module. This ensures that routing devices with different protocols and implementations can maintain high processing efficiency and responsiveness when interacting through the proxy module, and fully utilizes the operating system's capabilities when business volume increases. While ensuring business execution order and mutually exclusive resource access, the thread pool meets the basic design requirements.

[0120] In an exemplary embodiment, when a master device having an agent module and a slave device having an agent module perform wired networking, Figure 5 is a timing diagram of wired networking according to an exemplary embodiment, as shown in FIG. Figure 5 As shown, the following steps are included:

[0121] Step S501: The slave device actively initiates a device discovery process and searches for a master device in the network in a broadcasting manner to form a network;

[0122] Step S502: After receiving the request message of the networking request event sent by the slave device, the first receiving module of the master device sends a registration request to the proxy module to register the current networking request event;

[0123] Step S503: The proxy module determines whether to authorize the registration request for this networking request event;

[0124] Step S504: After authorizing the registration request, the proxy module sends a registration success response message corresponding to the registration request to the first sending module of the master device;

[0125] Step S505: The first sending module of the master device sends a response message to the slave device to inform the slave device that there is a master device that can be networked in the current network;

[0126] Step S506: The second receiving module of the slave device receives the response message and sends a registration request for the current networking request event to the proxy module of the slave device;

[0127] Step S507: The proxy module of the slave device determines whether to authorize the registration request for this networking request event;

[0128] Step S508: After the proxy module of the slave device authorizes the registration request, it sends a registration success response message corresponding to the registration request to the second sending module of the slave device;

[0129] Step S509: After receiving the response message, the second sending module of the slave device sends a configuration synchronization request to the master device through the second sending module;

[0130] Step S510: After receiving the configuration synchronization request, the first receiving module of the master device sends a registration request for configuration synchronization of the networking request event to the proxy module of the master device;

[0131] Step S511: The proxy module determines whether to authorize the registration request for this networking request event;

[0132] Step S512: After authorizing the registration request, the proxy module completes processing of the networking event and sends a response message to the first sending module of the master device. At the same time, the master device status is switched to the master device, and the master device identifier is switched to the master device identifier mixmesh.

[0133] Step S513, synchronizing the network configuration to the slave device through the first sending module;

[0134] Step S514: The second receiving module of the slave device receives the network configuration and sends a registration request for the network configuration to the proxy module;

[0135] Step S515: The proxy module determines whether to authorize the registration request for this networking request event;

[0136] Step S516: After the proxy module authorizes the registration request, it completes the processing of the networking event and sends a response message to the second sending module of the slave device. At the same time, it switches the state of the slave device to the slave state and switches the identifier of the slave device to the slave identifier, for example, meshA.

[0137] Step S517: The slave device performs a pairing and networking process.

[0138] It should be noted that Figure 5 The master device proxy module and the slave device proxy module are both structures in the routing device, and the networking between routing devices supporting different communication protocols is completed through the proxy module.

[0139] In an exemplary embodiment, when a master device having a proxy module and a slave device having a proxy module perform wireless networking, Figure 6 is a timing diagram of wireless networking according to an exemplary embodiment, as shown in FIG. Figure 6 As shown, the following steps are included:

[0140] Step S601: The first receiving module of the master device and the second receiving module of the slave device receive a networking instruction within a certain time interval;

[0141] Step S602: The first receiving module of the master device sends a registration request to the proxy module to register the establishment of the wireless transmission link;

[0142] Step S603: The proxy module determines whether to authorize the registration request for the wireless transmission link establishment event;

[0143] Step S604: After the proxy module authorizes the registration request, it sends a corresponding registration success response message to the first sending module of the master device;

[0144] Step S605: The second receiving module of the slave device sends a registration request for establishing a wireless transmission link to the proxy module;

[0145] Step S606, the proxy module determines whether to authorize the registration request for the wireless transmission link establishment event;

[0146] Step S607: After the proxy module authorizes the registration request, it sends a corresponding registration success response message to the second sending module of the slave device;

[0147] Step S608: The first sending module of the master device and the second sending module of the slave device send wireless transmission link establishment requests to each other to establish the wireless transmission link between the master device and the slave device.

[0148] During the wireless transmission link establishment process, if an exception occurs, the master device and the slave device respectively send a failure event registration to the proxy module to end the current networking request event.

[0149] Step S609: After the wireless transmission link is successfully established, the same networking process as the wired networking process is performed.

[0150] In an exemplary embodiment, when a master device having an agent module and a slave device having an agent module perform target networking, Figure 7 is a target networking timing diagram according to an exemplary embodiment. Figure 7 As shown, the following steps are included:

[0151] Step S701: When the slave device is in an uninitialized state, the broadcast protocol carries a slave device-specific tag for the master device to record and store the slave devices that can be networked;

[0152] Step S702: The master device selects a slave device from the list of networkable slave devices for networking;

[0153] Step S703: The master device sends a registration request for establishing a wireless transmission link to the proxy module;

[0154] Step S704, the proxy module determines whether to authorize the registration request for the wireless transmission link establishment event;

[0155] Step S705: After the proxy module authorizes the registration request, it sends a corresponding registration success response message to the first sending module of the master device;

[0156] Step S706: The first sending module of the master device sends a wireless transmission link establishment request to the selected slave device;

[0157] Step S707: The second receiving module of the slave device confirms that there is a master device that can be networked, and sends a registration request for establishing a wireless transmission link to the proxy module;

[0158] Step S708, the proxy module determines whether to authorize the registration request for the wireless transmission link establishment event;

[0159] Step S709: After the proxy module authorizes the registration request, it sends a corresponding registration success response message to the second sending module of the slave device;

[0160] Step S710: The second sending module of the slave device sends a response message of wireless transmission link establishment to the master device, and establishes a wireless transmission link with the master device;

[0161] During the wireless transmission link establishment process, if an exception occurs, the master device and the slave device respectively send a failure event registration to the proxy module to end the current networking request event.

[0162] Step S711: After the wireless transmission link is successfully established, the same networking process as the wired networking process is performed.

[0163] In an exemplary embodiment of the present disclosure, a routing device is provided, the routing device including a proxy module, the proxy module being configured to:

[0164] Receiving a networking permission request for a networking request event sent by a routing device to form a network with another routing device; wherein the networking request event includes a networking request event for forming a network with the routing device by another routing device;

[0165] Determine whether to allow the routing device to perform operations related to the networking request event based on the networking permission request;

[0166] If the proxy module determines that the routing device is allowed to perform operations related to the networking request event, the proxy module instructs the routing device to perform operations related to the networking request event.

[0167] Figure 8 It is a block diagram showing an apparatus 800 for executing a routing device-based interaction method according to an exemplary embodiment.

[0168] Reference Figure 8 , apparatus 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0169] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.

[0170] The memory 804 is configured to store various types of data to support the operations of the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0171] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 800.

[0172] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensors can not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide action. In some embodiments, the multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a capture mode or a video mode, the front-facing camera and / or the rear-facing camera can receive external multimedia data. Each front-facing camera and the rear-facing camera can have a fixed optical lens system or have focal length and optical zoom capabilities.

[0173] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0174] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to, a home button, volume buttons, a start button, and a lock button.

[0175] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800. The sensor assembly 814 can also detect changes in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and temperature changes of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0176] The communication component 816 is configured to facilitate wired or wireless communication between the apparatus 800 and other devices. The apparatus 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0177] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0178] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions. The instructions can be executed by the processor 820 of the apparatus 800 to perform the above method. 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.

[0179] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a device, enables the device to perform an interaction method based on a routing device, the method including any of the above methods.

[0180] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.

[0181] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. An interactive method based on a routing device, characterized in that: The routing device includes a proxy module, and the interaction method includes: The proxy module receives a networking permission request for a networking request event with another routing device sent by the routing device; wherein the networking request event includes a networking request event for the other routing device to network with the routing device, and the proxy module is used to uniformly manage the interaction process with the other routing devices. When the communication protocol supported by the other routing device is different from the communication protocol supported by the target network, the proxy module is used to convert the interaction information with the other routing device into interaction information corresponding to the communication protocol supported by the target network; According to the networking permission request, the proxy module determines whether to allow the routing device to perform operations related to the networking request event; If the proxy module determines that the routing device is allowed to perform the operation related to the networking request event, the proxy module instructs the routing device to perform the operation related to the networking request event.

2. The method for interacting with a routing device according to claim 1, wherein: According to the networking permission request, the proxy module determines whether to allow the routing device to perform operations related to the networking request event, including: According to the networking permission request, the proxy module determines whether the routing device meets the role requirements corresponding to the networking request event and the routing device is in a preset state; If the proxy module determines that the routing device meets the role requirements corresponding to the networking request event and the routing device is in a preset state, the proxy module determines to allow the routing device to perform operations related to the networking request event.

3. The method for interacting with a routing device according to claim 2, wherein: The agent module determines whether the routing device meets the role requirement corresponding to the networking request event, including: The proxy module determines whether the communication protocols supported by the routing device include the communication protocol required in the networking request event; If the communication protocols supported by the routing device include the communication protocol required in the networking request event, it is determined that the routing device meets the role requirements.

4. The method for interacting with a routing device according to claim 3, wherein: The interaction method further includes: The proxy module receives a synchronization configuration permission request; the synchronization configuration permission request includes a request to confirm whether the routing device meets the processing requirements for executing the synchronization configuration of the other routing devices for networking; If the synchronization configuration corresponding to the synchronization configuration permission request belongs to the synchronization configuration under the current networking request event and the synchronization configuration has not been processed, it is determined that the routing device meets the processing requirements for executing the synchronization configuration.

5. The method for interacting with a routing device according to claim 4, wherein: The interaction method further includes: The proxy module receives a synchronization configuration response of the synchronization configuration sent by the routing device; The proxy module sets the state of the routing device according to the synchronization configuration response.

6. The method for interacting with a routing device according to claim 5, wherein: The agent module setting the state of the routing device according to the synchronization configuration response includes: When the synchronization configuration response includes information that the networking configuration fails, the proxy module sets the state of the routing device to a ready state and instructs the routing device to end the operation corresponding to the synchronization configuration; When the synchronization configuration response includes information that the networking configuration is successful, the proxy module sets the state of the routing device to a ready state, and instructs the routing device to send a response message indicating that the synchronization configuration is successful to other routing devices.

7. The method for interacting with a routing device according to claim 3, wherein: The interaction method further includes: The identifier of the role of the routing device is set as the identifier of the networking device.

8. The method for interacting with a routing device according to claim 2, wherein: The agent module determines whether the routing device meets the role requirement corresponding to the networking request event, including: The proxy module determines whether the networking permission request includes response information based on the networking request event sent by the other routing device and whether the routing device needs to perform networking; If the networking permission request includes response information based on the networking request event sent by the other routing device and the routing device needs to perform networking, it is determined that the routing device meets the role requirements.

9. The method for interacting with a routing device according to claim 8, wherein: The interaction method further includes: The identifier of the role of the routing device is set as the identifier of the device to be networked.

10. The interactive method of a routing device according to claim 3 or 8, characterized in that: The preset state includes a ready state.

11. The method for interacting with a routing device according to claim 10, wherein: The interaction method further includes: The proxy module detects whether the operation related to the networking request event has timed out; If it times out, the routing device is set to a ready state.

12. The method for interacting with a routing device according to claim 1, wherein: The interaction method further includes: The proxy module receives the networking permission request in a queue manner.

13. The method for interacting with a routing device according to claim 12, wherein: The interaction method further includes: The proxy module forwards the networking permission request to a corresponding queue according to the priority of the networking permission request.

14. The method for interacting with a routing device according to claim 7 or 9, characterized in that: The initial role identifier of the routing device is a master device role identifier.

15. A routing device, characterized in that: The routing device includes a proxy module, and the proxy module is configured to: receiving a networking permission request for a networking request event with another routing device sent by the routing device; wherein the networking request event includes a networking request event for the other routing device to network with the routing device, the proxy module is used to uniformly manage the interaction process with the other routing devices, and when the communication protocol supported by the other routing device is different from the communication protocol supported by the target network, the proxy module is used to convert the interaction information with the other routing device into interaction information corresponding to the communication protocol supported by the target network; Determining, based on the networking permission request, whether to allow the routing device to perform operations related to the networking request event; If the proxy module determines that the routing device is allowed to perform the operation related to the networking request event, the proxy module instructs the routing device to perform the operation related to the networking request event.

16. A routing device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method according to any one of claims 1 to 14. 17 . A non-transitory computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of a device, enables the device to perform the method according to claim 1 .

Citation Information

Patent Citations

  • Data transmission method and device based on block chain

    CN110601906A

  • Network distribution method and device of low-power-consumption equipment, proxy equipment and storage medium

    CN114666196A