AC-AP interaction management and control method based on RPC calling
By introducing the RPC mechanism and event rotation state machine in AC-AP interaction control, combined with the socket-AP corresponding model, the problem of poor AP stability under the AP thread model is solved, and efficient AC-AP interaction and more stable system performance are achieved.
Patent Information
- Application Number
- CN202411705282.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the one-to-one corresponding model of AP threads leads to poor AP stability under the pressure of a certain number of APs, which often shows off offline problems. In addition, when the number of APs increases, the hardware performance of the embedded system may be tested, which may cause the tunnel to be disconnected and affect business data.
The AC-AP interaction control method based on RPC calls is adopted to realize efficient communication between AC and AP through the RPC abstract method set. The RPC event is dynamically processed by an event rotation state machine, replacing the traditional thread-AP corresponding model, and using the socket-AP corresponding model for management.
It improves the interaction efficiency between AC and AP, reduces communication delay, enhances the flexibility and resource utilization of the system, and improves the stability and overall performance of AP.
Smart Images

Figure CN119583616A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data transmission and processing, and specifically relates to an AC-AP interaction management and control method based on RPC call. Background Art
[0002] The traditional management and control methods between access controllers (AC) and access points (AP) mainly rely on the industry open source CAPWAP protocol software package. This protocol is designed to achieve efficient communication between AC and AP, thereby ensuring the stability and manageability of wireless networks. By using the CAPWAP protocol, network administrators can easily configure, monitor and maintain access points, thereby improving the overall performance and security of the network. At the same time, since CAPWAP is an open source protocol, it allows developers to customize and expand it according to specific needs, enhancing the flexibility and adaptability of the system. With the development of wireless network technology, traditional AC-AP management and control methods continue to evolve to cope with the growing network needs and complexity.
[0003] In the prior art, for example, the technical solution described in the patent with publication number CN113518383A: a network management method, apparatus, system, device and computer-readable storage medium. The technical solution includes two different network management methods, namely, two methods based on designated ports and based on undesignated ports. The network management method based on designated ports includes receiving a discovery request message sent by a first access point AP. If the number of APs associated with the designated port reaches a threshold, a pair of ports is selected from one or more pairs of first ports as the second port, a first discovery response message is sent to the designated port, and the access controller AC is accessed through the designated port. The network management method based on undesignated ports is to access the access controller AC through the second port after sending the discovery request message.
[0004] In the prior art, the encryption of data sets, tunnel management, AP thread management, and TLV data retrieval and unpacking mechanisms provided by Capwap provide a ready-made management method for AC-AP control in the industry. However, due to the design considerations and extensiveness, in embedded systems, with limited hardware resources, an AP thread one-to-one correspondence model is adopted, which results in poor stability of the AP under the pressure of a certain number of APs, and often shows offline phenomena. At the same time, its data tunnel technology will greatly test the hardware performance of the embedded system when the number of APs reaches a certain amount, often causing probabilistic tunnel disconnection, thereby affecting business data. At the same time, it uses the TLV data format for unpacking, and in actual business iterations and additions of new and old versions of APs, it is very difficult to perform in terms of data compatibility. Summary of the invention
[0005] The purpose of the present invention is to provide an AC-AP interaction management and control method based on RPC calls to solve the problem that the prior art proposed in the background technology adopts an AP thread one-to-one correspondence model, which causes the AP to have poor stability and often show offline problems under the pressure of a certain number of APs.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] An AC-AP interaction management and control method based on RPC call includes the following steps:
[0008] Step S1, AC and AP start up and initialize basic services;
[0009] Step S2, the AC and AP respectively register and initialize the RPC abstract method set, enter the RPC event rotation state machine, and wait for the RPC event;
[0010] Furthermore, the RPC abstract method set here is a set of methods (functions) abstracted by AC and AP according to their respective services, such as AP's method for obtaining user information table GetStatI nfo(), and method for obtaining BSSID information GetBss id Info(); AC's method for modifying wireless channel SetWire l essChannel(), and obtaining AP status GetAPStatus(), etc.
[0011] Step S3, AC and AP respectively enter the RPC event loop monitoring;
[0012] Step S4, performing a match judgment on the RPC event, if the RPC event matches successfully, then performing RPC event processing, if not, then returning to step S3 to continue monitoring.
[0013] According to the above technical solution, in step S3, the AC and AP respectively enter the RPC event loop monitoring, which specifically includes the following steps:
[0014] Step S301, the AP initiates a DI SCOVERY state machine RPC event call to the AC;
[0015] Furthermore, the interaction between AC and AP is based on the existence of a communication channel between the two. Usually, AP needs to actively initiate events in the environment to find the existence of AC in the environment and negotiate to establish a communication channel.
[0016] Step S302: The AC receives the DI SCOVERY state machine call from the AP, searches the RPC abstract method set, finds the corresponding pre-registered RPC method Discovery(), and calls the method to respond;
[0017] Step S303, after receiving the response, the AP performs rotation of the state machine FUNREG of the next stage and registers the supported function method set to the AC;
[0018] Step S304, after receiving the FUNREG state machine from the AP, the AC searches the RPC method set, finds the corresponding pre-registered RPC method FunReg(), and calls the method to respond;
[0019] Step S305, after receiving the response, the AP performs a rotation of the next stage state machine HEARTBEAT and enters the heartbeat logic.
[0020] According to the above technical solution, the heartbeat logic includes the following steps:
[0021] Step S306, after receiving the heartbeat, the AC searches the RPC method set to find the pre-registered RPC method HeartBeat() for response;
[0022] Step S307: The AC actively initiates a call to the RPC method GetBaseInfo() to obtain the global information of the AP.
[0023] Step S308: The AP receives the call of the RPC method GetBaseInfo(), searches the RPC method set, finds a matching method, and calls it in response.
[0024] According to the above technical solution, in step S3, configuration information needs to be sent, specifically: the AC end calls the RPC service method according to the user configuration information or the default configuration information, and sends the configuration information to the AP end;
[0025] The AP receives the call of the configuration RPC business method from the AC, matches the corresponding method, and makes the configuration information effective.
[0026] According to the above technical solution, in step S303, registering supported functions with the AC specifically includes: registering a function list supported by the AP with the AC, so as to allow the AC to learn the function support status of different APs.
[0027] Furthermore, in actual implementation, the method in the present invention will act on APs of different hardware platforms to realize peer entities. Different APs here will have differences in hardware and functional service profiles. Therefore, in the present invention, the function list supported by the AP will be registered to the AC to allow the AC to know the functional support status of different APs, that is, different function method sets.
[0028] According to the above technical solution, the AP side sends a heartbeat to the AP side at a fixed interval, and the AC side matches and responds.
[0029] According to the above technical solution, AC-AP interaction is completed through the socket-AP correspondence model.
[0030] According to the above technical solution, the socket-AP corresponding model is specifically as follows:
[0031] After the AC service is started, it will listen to the requests of the corresponding client AP. When the AP is connected to the AC, a socket is automatically created on the AC side to manage the AP, and the socket is registered and listened on the AC side. This socket is used as the management mapping of the AP on the AC; subsequent management data packets of this AP are sent and received through this socket, thereby realizing the mapping and implementation of the socket-AP model.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] In the present invention, efficient communication and collaboration between AC (controller) and AP (access point) is achieved by introducing the remote procedure call (RPC) mechanism. The effects include: the RPC mechanism allows AC and AP to make remote calls in a network environment, thereby reducing communication delays and improving interaction efficiency. Through the abstract RPC method set, good modularization can be achieved, which is convenient for later maintenance and expansion. The event carousel state machine can dynamically process various RPC events, adapt to different interaction requirements, and enhance the flexibility of the system. The efficient interaction between AC and AP can better utilize system resources and improve overall performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a schematic diagram of the RPC call model of the present invention;
[0035] Figure 2 It is a schematic diagram of the Socet-AP control model of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] Embodiment 1
[0038] like Figure 1 As shown, an AC-AP interaction management and control method based on RPC call includes the following steps:
[0039] Step S1, AC and AP start up and initialize basic services;
[0040] Step S2, the AC and AP respectively register and initialize the RPC abstract method set, enter the RPC event rotation state machine, and wait for the RPC event;
[0041] The RPC abstract method set here is a set of methods (functions) abstracted by AC and AP according to their respective services, such as AP's method for obtaining user information table GetStatInfo() and method for obtaining BSSID information GetBssidInfo(); AC's method for modifying wireless channel SetWirelessChannel() and obtaining AP status GetAPStatus(), etc.
[0042] Step S3, AC and AP respectively enter the RPC event loop monitoring;
[0043] Step S4, performing a match judgment on the RPC event, if the RPC event matches successfully, then performing RPC event processing, if not, then returning to step S3 to continue monitoring.
[0044] In the present invention, efficient communication and collaboration between AC (controller) and AP (access point) is achieved by introducing the remote procedure call (RPC) mechanism. The effects include: the RPC mechanism allows AC and AP to make remote calls in a network environment, thereby reducing communication delays and improving interaction efficiency. Through the abstract RPC method set, good modularization can be achieved, which is convenient for later maintenance and expansion. The event carousel state machine can dynamically process various RPC events, adapt to different interaction requirements, and enhance the flexibility of the system. The efficient interaction between AC and AP can better utilize system resources and improve overall performance.
[0045] Embodiment 2
[0046] This embodiment provides a specific implementation method:
[0047] 1. RPC call model:
[0048] like Figure 1 As shown, in the present invention, the communication mechanism of AC and AP is equal in terms of communication itself, and the so-called control is because the business layer is imposed by AC controlling AP. Therefore, the present invention is designed to make more flexible business profile processing in the control logic layer of AC-AP, and abstract the data communication layer into RPC call logic for implementation.
[0049] The RPC call model used in the present invention aims to treat both parties equally at the business communication level to ensure business flexibility, maintainability and subsequent business expansibility. The RPC call logic provides a more friendly backward interface for subsequent active or passive reverse data transmission by the AP.
[0050] The implementation logic of RPC in the present invention is that the AC and AP abstract the corresponding methods according to the business logic needs and form a method set. When the service designed by this method of AC and AP is started, the method list is registered in the system for business calls. That is to say, when the business is executed, for AC, it initiates RPC network communication calls according to the needs of the business layer, and calls the methods registered in the method set by AP to implement the corresponding business; conversely, AP also calls the methods in the method set of the AC side according to business needs through the same method, so as to realize a flexible RPC business call model.
[0051] In the RPC peer-to-peer call model, the AC-AP side uses the same model logic to complete the abstraction of the implementation layer and the registration of services, is responsible for the scheduling of actual services according to the RPC services of the actual service layer, and completes the corresponding services in the registration method of the RPC peer model.
[0052] In the present invention, when the service end initiates a service request to the AC end, the corresponding RPC method registered by the AC end will be called to complete the service. Of course, in the specific implementation of the RPC method on the AC end, it is supported to trigger the RPC method associated with the AP end through the management tunnel to assist in completing the request specified by the service end. In other words, in the present invention, the service end is responsible for triggering the call of the RPC method set, which can be completed only on the AC end or only on the AP end. It also supports the linkage of the RPC method corresponding to the AC with the scheduling of the method corresponding to the AP end, and the linkage of the method corresponding to the AP end with the scheduling of the method corresponding to the AC end.
[0053] According to the initiator of the service, the calling service in the RPC model is divided into forward service and reverse service. When the initiator of the activity service is AC, we call it forward service in this design. Of course, the forward service in this design includes the scheduling request initiated by AC's own service demand, and also includes the service scheduling request initiated by AC triggered by the human-machine interface side. When the initiator of the activity is AP, we call it reverse service in this design.
[0054] In the RPC model of the present invention, the logic of RPC covers but is not limited to: device online state rotation, timed services, event services, etc. The following uses the RPC device online state machine rotation to illustrate the working logic of the model, and is used to illustrate the design principle of the RPC call model in the present invention:
[0055] Step 1: Start the AC and initialize basic services
[0056] Step 2, AC registers and initializes the RPC,engine, enters the RPC event rotation state machine, and waits for the RPC event.
[0057] Step 3: The AP starts and initializes basic services.
[0058] Step 4: The AP initializes the RPC engine and enters the RPC rotation state machine
[0059] Step 5: The AP initiates a DI SCOVERY state machine RPC event call to the AC.
[0060] Step 6: The AC receives the DI SCOVERY state machine call from the AP, searches the RPC abstract method set, finds the corresponding pre-registered RPC method, and calls the method to respond.
[0061] Step 7: After receiving the response, the AP performs rotation of the state machine FUNREG in the next stage and registers the supported functions to the AC.
[0062] Step 8: After receiving the FUNREG state machine from the AP, the AC searches the RPC method set, finds the corresponding pre-registered RPC method, and calls the method to respond.
[0063] Step 9: After receiving the response, the AP performs the rotation of the next stage state machine HEARTBEAT and enters the heartbeat logic.
[0064] Step 10: After receiving the heartbeat, the AC searches the RPC method set to find the pre-registered RPC method for response.
[0065] Step 11: The AC actively initiates a call to the RPC method GetBaseInfo() to obtain the global information of the AP.
[0066] Step 12: The AP receives the call of the RPC method GetBaseInfo(), searches the RPC method set, finds a matching method, and calls it in response.
[0067] Step 13: The AC side calls the RPC service method according to the user configuration information or the default configuration information, and sends the configuration information to the AP side.
[0068] Step 14: The AP receives the call of the configuration RPC service method from the AC, matches the corresponding method, and makes the configuration information effective.
[0069] Step 15: The AP sends a heartbeat to the AP at a fixed interval, and the AC matches and responds.
[0070] From the above model description, it can be seen that the DI SCOVERY, FUNREG, and HEARTBEAT state machine calls initiated by AP are all
[0071] Reverse service calls, GetBase Info initiated by AC, service configuration delivery, etc. are all forward service calls. The HEARTBEAT service initiated by AP is also a scheduled service. Of course, in the above model, after the device is online, it starts to accept real-time RPC service calls and responses from the business layer.
[0072] 2. Socet-AP control model:
[0073] like Figure 2 As shown, in the communication logic of AC-AP, the service management of AC-AP presents a one-to-many service presentation form. Therefore, in order to maintain real-time AC-AP bidirectional link communication, it is necessary to maintain the unique corresponding mapping of AP on the AC side. In the present invention, the one-to-one correspondence model between thread and AP is abandoned, and the one-to-one correspondence model between socket and AP is adopted. The specific implementation steps are as follows:
[0074] After the AC service is started, it will listen to the requests of the corresponding client AP. When the AP is connected to the AC, a socket is automatically created on the AC side to manage the AP, and the socket is registered and listened on the AC side. This socket is used as the management mapping of the AP on the AC. All subsequent management data packets of this AP are sent and received through this socket, thereby realizing the mapping and implementation of the socket-AP model.
[0075] 3. JSON data model:
[0076] The JSON data model is a definition of the communication language format between the AC and the AP. In the present invention, JSON is used as a carrier and the RPC method abstraction idea is used to abstract the above data model set.
[0077] The specific implementation method is as follows:
[0078] According to the data profile of the business layer, each business is modularly divided and abstracted to form modules corresponding to the business. For each module, the corresponding implementation method and implementation conditions are abstracted. In the data model of the present invention, the implementation method corresponds to "method a" in the above model, and the method implementation conditions correspond to "parameters" in the above model. The parameters in the above model are presented in the form of objects, that is, the parameters may be strings, integers, arrays, etc.
[0079] In the AC-AP of the present invention, service abstraction is a complex and huge process, which abstracts many modules, such as spectrum configuration, radio frequency configuration, SSID configuration, channel configuration, STA information acquisition, etc. Each module corresponds to a most basic JSON data model abstraction, and multiple modules can form a method set in the "RPC call model". This aggregate abstract method provides great convenience for product development and maintenance, code unification and optimization.
[0080] In the JSON data model abstraction of the present invention, AC and AP are equal. AC-AP abstracts their respective RPC method sets based on the business logic requirements using this model as a unified template, and completes registration when starting the service, so that the business party can use the "RPC call model" for scheduling and use.
[0081] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0082] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An AC-AP interaction management and control method based on RPC call, characterized in that: The following steps are involved: Step S1, AC and AP start up and initialize basic services; Step S2, the AC and AP respectively register and initialize the RPC abstract method set, enter the RPC event rotation state machine, and wait for the RPC event; Step S3, AC and AP respectively enter the RPC event loop monitoring; Step S4, performing a match judgment on the RPC event, if the RPC event matches successfully, then performing RPC event processing, if not, then returning to step S3 to continue monitoring.
2. According to claim 1, the AC-AP interaction management and control method based on RPC call is characterized in that: In step S3, the AC and AP respectively enter the RPC event loop monitoring, which specifically includes the following steps: Step S301: The AP initiates a DISCOVERY state machine RPC event call to the AC. Step S302: The AC receives the DISCOVERY state machine call from the AP, searches the RPC abstract method set, finds the corresponding pre-registered RPC method Discovery(), and calls the method to respond; Step S303, after receiving the response, the AP performs rotation of the state machine FUNREG of the next stage and registers the supported function method set to the AC; Step S304, after receiving the FUNREG state machine from the AP, the AC searches the RPC method set, finds the corresponding pre-registered RPC method FunReg(), and calls the method to respond; Step S305, after receiving the response, the AP performs a rotation of the next stage state machine HEARTBEAT and enters the heartbeat logic.
3. According to claim 2, the AC-AP interaction management and control method based on RPC call is characterized in that: The heartbeat logic includes the following steps: Step S306, after receiving the heartbeat, the AC searches the RPC method set to find the pre-registered RPC method HeartBeat() for response; Step S307: The AC actively initiates a call to the RPC method GetBaseInfo() to obtain the global information of the AP. Step S308: The AP receives the call of the RPC method GetBaseInfo(), searches the RPC method set, finds a matching method, and calls it in response.
4. According to claim 3, the AC-AP interaction management and control method based on RPC call is characterized in that: In step S3, configuration information needs to be sent, specifically: the AC side calls the RPC service method according to the user configuration information or the default configuration information, and sends the configuration information to the AP side; The AP receives the call of the configuration RPC business method from the AC, matches the corresponding method, and makes the configuration information effective.
5. According to claim 4, the AC-AP interaction management and control method based on RPC call is characterized in that: In step S303, registering supported functions with the AC specifically includes: registering a function list supported by the AP with the AC, so as to allow the AC to learn the function support status of different APs.
6. According to claim 5, the AC-AP interaction management and control method based on RPC call is characterized in that: The AP sends a heartbeat to the AP at a fixed interval, and the AC matches and responds.
7. According to claim 1, the AC-AP interaction management and control method based on RPC call is characterized in that: AC-AP interaction is completed through the socket-AP correspondence model.
8. According to claim 7, the AC-AP interaction management and control method based on RPC call is characterized in that: The socket-AP corresponding model is as follows: After the AC service is started, it will listen to the requests of the corresponding client AP. When the AP is connected to the AC, a socket is automatically created on the AC side to manage the AP, and the socket is registered and listened on the AC side. This socket is used as the management mapping of the AP on the AC; subsequent management data packets of this AP are sent and received through this socket, thereby realizing the mapping and implementation of the socket-AP model.
Citation Information
Patent Citations
Network management method, device and system, equipment and computer readable storage medium
CN113518383A